#include <K3dScene.h>
Inheritance diagram for K3dScene:
Public Member Functions | |
K3dScene (K3dGameData *_pGameData, int _argc, char *_argv[]) | |
~K3dScene () | |
void | SetScenePaths () |
First argument is application path. Get first application argument and set default paths. | |
void | CheckArguments () |
Checkt input arguments from application. | |
void | Init () |
Init scene. | |
void | LoadNewScript (const char *_strFilename) |
Delete current script and load new script. | |
void | Load (K3dString &_strFilename) |
Load scene. | |
void | Delete () |
Delete scene. | |
void | Update () |
Update scene. | |
void | Draw () |
Draw scene. | |
bool & | GetExit () |
Private Attributes | |
K3dGameData * | m_pGameData |
Global game data, data centered game system. | |
char * | m_pArgumentArray [] |
Array of scene arguments. | |
int | m_iNumArguments |
Number of afguments. | |
bool | m_bIsExit |
Exit engine ? | |
K3dMatrix * | m_pViewMatrix |
OpenGL View matrix. |
Definition at line 45 of file K3dScene.h.
K3dScene::K3dScene | ( | K3dGameData * | _pGameData, | |
int | _argc, | |||
char * | _argv[] | |||
) |
Definition at line 37 of file K3dScene.cpp.
References CheckArguments(), K3dGameData::GetMatrixSP(), K3dConfDataBuild::LoadConf(), K3dOptions::LoadOptions(), m_bIsExit, m_iNumArguments, m_pArgumentArray, m_pGameData, m_pViewMatrix, K3dSafePointer< _T >::New(), K3dSceneData::SetScene(), and K3dSceneData::SetViewMatrix().
K3dScene::~K3dScene | ( | ) |
Definition at line 65 of file K3dScene.cpp.
References K3dSafePointer< _T >::Delete(), K3dGameData::GetMatrixSP(), m_pGameData, and m_pViewMatrix.
void K3dScene::SetScenePaths | ( | ) |
First argument is application path. Get first application argument and set default paths.
Definition at line 71 of file K3dScene.cpp.
References K3dString::GetString(), K3dSystemData::GetSysHome(), K3D_STR_SHARE_PATH, K_PATH_APP, K_PATH_MAP, K_PATH_SCRIPT, K_STR_MAPS_PATH, K_STR_SCRIPT_PATH, m_pGameData, and K3dSceneData::SetPath().
Referenced by CheckArguments().
void K3dScene::CheckArguments | ( | ) |
Checkt input arguments from application.
Definition at line 96 of file K3dScene.cpp.
References SetScenePaths().
Referenced by K3dScene().
void K3dScene::Init | ( | ) |
Init scene.
Definition at line 139 of file K3dScene.cpp.
References K3dMngSystem::InitMngSystem().
Referenced by Load().
void K3dScene::LoadNewScript | ( | const char * | _strFilename | ) |
Delete current script and load new script.
_strFilename | Script file name |
Definition at line 106 of file K3dScene.cpp.
References Delete(), K3dVM::Engine_Init(), K3dVM::GetLua(), K3dSceneData::GetPath(), K3dString::GetString(), K3dSceneData::GetVM(), K_PATH_APP, K3dLua::LuaLoadFile(), m_pGameData, and K3dVM::RegisterFunctions().
Referenced by K3dMenu::LoadMapFromListBox(), and K3dVM::LoadNewScript().
void K3dScene::Load | ( | K3dString & | _strFilename | ) |
Load scene.
_strFilename | Filename string |
Definition at line 126 of file K3dScene.cpp.
References K3dSceneData::GetMapFileName(), K3dSceneData::GetPath(), K3dString::GetString(), Init(), K3dSceneData::InitPath(), K_PATH_APP, and m_pGameData.
Referenced by K3dVM::LoadMap().
void K3dScene::Delete | ( | ) |
Delete scene.
Definition at line 146 of file K3dScene.cpp.
References K3dMngSystem::DeleteMngSystem(), K3dSafePointer< _T >::Get(), K3dTexture::GetId(), K3dSafePointer< _T >::GetNum(), K3dGameData::GetTextureObjSP(), and m_pGameData.
Referenced by K3dEngine::Destroy(), and LoadNewScript().
void K3dScene::Update | ( | ) |
Update scene.
Definition at line 163 of file K3dScene.cpp.
References K3dTimer::CalculateFPS(), K3dSceneData::GetMouse(), K3dSceneData::GetTimer(), m_pGameData, K3dKeyboard::UpdateKeyboard(), K3dMngSystem::UpdateMngSystem(), and K3dMouse::UpdateMouse().
Referenced by K3dEngine::Start().
void K3dScene::Draw | ( | ) |
Draw scene.
Definition at line 174 of file K3dScene.cpp.
References K3dMngSystem::DrawMngSystem().
Referenced by K3dEngine::Start().
bool& K3dScene::GetExit | ( | ) | [inline] |
Definition at line 70 of file K3dScene.h.
References m_bIsExit.
Referenced by K3dVM::Exit(), and K3dEngine::ProcessEvent().
K3dGameData* K3dScene::m_pGameData [private] |
Global game data, data centered game system.
Reimplemented from K3dKeyMap.
Definition at line 53 of file K3dScene.h.
Referenced by Delete(), K3dScene(), Load(), LoadNewScript(), SetScenePaths(), Update(), and ~K3dScene().
char* K3dScene::m_pArgumentArray[] [private] |
int K3dScene::m_iNumArguments [private] |
bool K3dScene::m_bIsExit [private] |
K3dMatrix* K3dScene::m_pViewMatrix [private] |
OpenGL View matrix.
Definition at line 57 of file K3dScene.h.
Referenced by K3dScene(), and ~K3dScene().