| 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 module » 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.
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.
Scene * | get (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

  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 | ( | const 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.