RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <cdirector.h>
Public Types | |
enum | GameState { RUNNING, PAUSED, STOPPED } |
Signals | |
virtual void | onRunScene (CGameScene *game_scene) |
virtual void | onPauseScene (CGameScene *game_scene) |
virtual void | onResumeScene (CGameScene *game_scene) |
virtual void | onEndScene (CGameScene *game_scene) |
Public Member Functions | |
CDirector () | |
CDirector (const CDirector &) | |
CDirector & | operator= (const CDirector &) |
GameState | gameState () const |
CGameScene * | currentGameScene () const |
virtual void | runWithScene (CGameScene *game_scene) |
virtual void | pushScene (CGameScene *game_scene) |
virtual void | popScene () |
virtual void | replaceScene () |
virtual void | resume () |
virtual void | pause () |
virtual void | step () |
const std::string & | getActiveCameraId () const |
CActionManager * | actionManager () const |
bool | existsCameraWithId (const std::string &camera_id) const |
CCamera * | getCameraWithId (const std::string &camera_id) const |
CCamera * | createCamera (const std::string &camera_id) |
CCamera * | getActiveCamera () const |
void | resetCameras () |
CCamera * | setActiveCameraHavingId (const std::string &camera_id) |
bool | isActiveCameraWithId (const std::string &camera_id) const |
~CDirector () | |
![]() | |
CObject () | |
CObject (const CObject &object) | |
CObject & | operator= (const CObject &object) |
CObject * | retain () |
unsigned int | release () const |
CObject * | autorelease () |
unsigned int | retainCount () const |
bool | isValidCObject () const |
virtual | ~CObject () |
Protected Member Functions | |
virtual void | setGameState (GameState game_state) |
void | createDefaultCamera () |
void | releaseCameras () |
![]() | |
virtual void | copyValuesFromObject (const CObject &object) |
Protected Attributes | |
GameState | m_gameState |
CGameScene * | m_gameScene |
CActionManager * | m_actionManager |
std::string | m_activeCameraId |
std::map< std::string, CCamera * > * | m_cameras |
Additional Inherited Members | |
![]() | |
static void | safeRetain (void *pointer) |
template<class T > | |
static void | safeRelease (T *pointer) |
template<class T > | |
static void | safeReleaseArray (T *array) |
static void | safeRelease (const char *pointer) |
Controls the lifetime of the running game scene and its behaviour
Definition at line 46 of file cdirector.h.
enum CDirector::GameState |
Enumerator | |
---|---|
RUNNING | |
PAUSED | |
STOPPED |
Definition at line 50 of file cdirector.h.
CDirector::CDirector | ( | void | ) |
Definition at line 42 of file cdirector.cpp.
|
explicit |
CDirector::~CDirector | ( | ) |
Definition at line 208 of file cdirector.cpp.
CActionManager * CDirector::actionManager | ( | ) | const |
Definition at line 51 of file cdirector.cpp.
CCamera * CDirector::createCamera | ( | const std::string & | camera_id | ) |
Definition at line 91 of file cdirector.cpp.
|
protected |
Definition at line 75 of file cdirector.cpp.
CGameScene * CDirector::currentGameScene | ( | ) | const |
Definition at line 69 of file cdirector.cpp.
bool CDirector::existsCameraWithId | ( | const std::string & | camera_id | ) | const |
Definition at line 127 of file cdirector.cpp.
CDirector::GameState CDirector::gameState | ( | ) | const |
Definition at line 57 of file cdirector.cpp.
CCamera * CDirector::getActiveCamera | ( | ) | const |
Definition at line 133 of file cdirector.cpp.
const std::string & CDirector::getActiveCameraId | ( | ) | const |
Definition at line 115 of file cdirector.cpp.
CCamera * CDirector::getCameraWithId | ( | const std::string & | camera_id | ) | const |
Definition at line 105 of file cdirector.cpp.
bool CDirector::isActiveCameraWithId | ( | const std::string & | camera_id | ) | const |
Definition at line 121 of file cdirector.cpp.
|
virtualsignal |
|
virtualsignal |
|
virtualsignal |
|
virtualsignal |
|
virtual |
Definition at line 190 of file cdirector.cpp.
|
virtual |
TODO Forces the removal of the current game scene (e.g. game over)
Definition at line 171 of file cdirector.cpp.
|
virtual |
TODO A queue (LIFO) would be perfect to manage the list of game scenes to reproduce.
Definition at line 165 of file cdirector.cpp.
|
protected |
Definition at line 82 of file cdirector.cpp.
|
virtual |
Definition at line 177 of file cdirector.cpp.
void CDirector::resetCameras | ( | ) |
Definition at line 147 of file cdirector.cpp.
|
virtual |
Definition at line 183 of file cdirector.cpp.
|
virtual |
Definition at line 156 of file cdirector.cpp.
CCamera * CDirector::setActiveCameraHavingId | ( | const std::string & | camera_id | ) |
Definition at line 139 of file cdirector.cpp.
|
protectedvirtual |
Definition at line 63 of file cdirector.cpp.
|
virtual |
Performs a step. If you were to cap the game engine to 30FPS, then at least 30 step() calls per second would be needed.
Definition at line 197 of file cdirector.cpp.
|
protected |
Definition at line 104 of file cdirector.h.
|
protected |
Definition at line 105 of file cdirector.h.
|
protected |
Definition at line 106 of file cdirector.h.
|
protected |
Definition at line 103 of file cdirector.h.
|
protected |
Definition at line 102 of file cdirector.h.