| CRM64Pro GDK v0.18.0 A free cross-platform game development kit built on top of SDL 3.0

Loading...
Searching...
No Matches
CRM64Pro::SceneMgrfinal
Scene modules » Scene Manager

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.
Sint32 | 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.
Scene * | get (Sint32 idScene)
| Get a pointer to the Scene using its handle.
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 (Sint32 idCDC, const string &sTMXFile, ISceneObjectFactory *pFactory=nullptr)
| Load a level from a TMX file stored in a CDC file.
Sint32 | loadFromBuffer (const void *pBuffer, Sint32 iSize, const string &sTMXFile, const string &sCDCFile="", ISceneObjectFactory *pFactory=nullptr)
| Load a level from a TMX memory buffer.

## Member Function Documentation

## ◆ loadFromFile()

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

Load a level from a TMX file.

Parameters

  sTMXFile | string containing [directory]+filename+[extension] of the TMX file. Directory separators '\' and '/' are supported.
  pFactory | Optional 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

  sCDCFile | string containing [directory]+filename+[extension] of a CDC file.
  sTMXFile | string containing the name of the TMX file inside the CDC.
  pFactory | Optional 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 | ( | Sint32 | idCDC,
|  | const string & | sTMXFile,
|  | ISceneObjectFactory * | pFactory = nullptr )

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

Parameters

  idCDC | CDC id of an open CDC file.
  sTMXFile | string containing the name of the TMX file inside the CDC.
  pFactory | Optional 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.

## ◆ loadFromBuffer()

Sint32 CRM64Pro::SceneMgr::loadFromBuffer | ( | const void * | pBuffer,
|  | Sint32 | iSize,
|  | const string & | sTMXFile,
|  | const string & | sCDCFile = "",
|  | ISceneObjectFactory * | pFactory = nullptr )

Load a level from a TMX memory buffer.

Parameters

  pBuffer | pointer to buffer data containing the TMX XML.
  iSize | size in bytes of the buffer data.
  sTMXFile | string containing the TMX name used to resolve relative resources.
  sCDCFile | Optional CDC archive path used to resolve CDC resources.
  pFactory | Optional 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.