CRM64Pro GDK v0.15.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
CRM64Pro::SceneMgr

Scene Manager class. More...

Detailed Description

Scene Manager class.

Public Member Functions

bool info (Sint32 iMode=0) override
 Request Scene Manager information.
Sint32 create (const string &sName, Uint32 iNumLayers=3) override
 Create a new Scene.
bool close (Sint32 idScene) override
 Close and destroy a Scene.
Sint32 getCount () const override
 Get number of loaded objects.
Sint32 setName (Sint32 idScene, const string &sName) override
 Change the object name.
Sceneget (Sint32 idScene=0)
 Get a pointer to the Scene using its handler.
Sint32 loadFromFile (const string &sTMXFile, ISceneObjectFactory *pFactory=nullptr)
 Load a level from a TMX file.
Sint32 load (const string &sCDCFile, const string &sTMXFile, ISceneObjectFactory *pFactory=nullptr)
 Load a level from a TMX file stored in a CDC file.
Sint32 load (const Sint32 idCDC, const string &sTMXFile, ISceneObjectFactory *pFactory=nullptr)
 Load a level from a TMX file stored in a CDC file.

Member Function Documentation

◆ loadFromFile()

Sint32 CRM64Pro::SceneMgr::loadFromFile ( const string & sTMXFile,
ISceneObjectFactory * pFactory = nullptr )

Load a level from a TMX file.

Parameters
sTMXFilestring containing [directory]+filename+[extension] of the TMX file. Directory separators '\' and '/' are supported.
pFactoryOptional pointer to a custom object factory for creating objects during load.
Returns
greater than 0 on success (the Scene id) or a negative error code on failure.

◆ load() [1/2]

Sint32 CRM64Pro::SceneMgr::load ( const string & sCDCFile,
const string & sTMXFile,
ISceneObjectFactory * pFactory = nullptr )

Load a level from a TMX file stored in a CDC file.

Parameters
sCDCFilestring containing [directory]+filename+[extension] of a CDC file.
sTMXFilestring containing the name of the TMX file inside the CDC.
pFactoryOptional pointer to a custom object factory for creating objects during load.
Returns
greater than 0 on success (the Scene id) or a negative error code on failure.

◆ load() [2/2]

Sint32 CRM64Pro::SceneMgr::load ( const Sint32 idCDC,
const string & sTMXFile,
ISceneObjectFactory * pFactory = nullptr )

Load a level from a TMX file stored in a CDC file.

Parameters
idCDCCDC id of an open CDC file.
sTMXFilestring containing the name of the TMX file inside the CDC.
pFactoryOptional pointer to a custom object factory for creating objects during load.
Returns
greater than 0 on success (the Scene id) or a negative error code on failure.