#include <K3dOptions.h>
Inheritance diagram for K3dOptions:
Public Member Functions | |
K3dOptions (K3dGameData *_pGameData) | |
Constructor. | |
~K3dOptions (void) | |
bool | LoadOptions () |
Load options from ini file. | |
void | DeleteOptions () |
Delete all options. | |
void | PrintGraphicDriverName () |
Print graphic driver name to the screen. | |
void | PrintGraphicDriverInfo () |
Print graphic driver info to the screen. | |
void | PrintOpenglInfo () |
Print graphic driver info to the screen. | |
void | PrintModes () |
Pring SDL modes to the screen. | |
void | PrintParams (int _iWidth, int _iHeight, int _iBpp, bool _bIsSuccess) |
Print parameters to the screen. | |
Private Member Functions | |
void | LoadGraphics () |
Load graphic option from ini file. | |
void | LoadTexture () |
Load texture option from ini file. | |
void | LoadFontBmp () |
Load bitmap font options from ini file. | |
void | LoadScript () |
Load script from ini file. | |
Private Attributes | |
K3dGameData * | m_pGameData |
Global game data, data centered game system. | |
K3dStream * | m_pStream |
Pointer to stream. |
Definition at line 38 of file K3dOptions.h.
K3dOptions::K3dOptions | ( | K3dGameData * | _pGameData | ) |
Constructor.
_pGameData | Pointer to global game data |
Definition at line 38 of file K3dOptions.cpp.
References K3dSceneData::GetStream(), m_pGameData, and m_pStream.
K3dOptions::~K3dOptions | ( | void | ) |
Definition at line 44 of file K3dOptions.cpp.
void K3dOptions::LoadGraphics | ( | ) | [inline, private] |
Load graphic option from ini file.
Definition at line 67 of file K3dOptions.h.
References TGraphicOption::bFullscreen, K3dSceneData::GetLua(), K3dString::GetString(), TGraphicOption::iColorBits, TGraphicOption::iFarPlane, TGraphicOption::iFovy, TGraphicOption::iHeight, TGraphicOption::iNearPlane, TGraphicOption::iWidth, K_STR_COLORBITS, K_STR_FAR, K_STR_FLAGS, K_STR_FOVY, K_STR_FULLSCREEN, K_STR_GRAPHICS, K_STR_NEAR, K_STR_SCREENHEIGHT, K_STR_SCREENWIDTH, K3dLua::LuaError(), K3dLua::LuaGetFieldBool(), K3dLua::LuaGetFieldNumber(), K3dLua::LuaGetGlobal(), K3dLua::LuaIsTable(), m_pGameData, K3dOptionsData::SetGraphicOption(), and TGraphicOption::uiFlags.
Referenced by LoadOptions().
void K3dOptions::LoadTexture | ( | ) | [inline, private] |
Load texture option from ini file.
Definition at line 103 of file K3dOptions.h.
References TTextureOption::bLightmap, TTextureOption::bLinear, TTextureOption::bMipmap, TTextureOption::bMultitexture, TTextureOption::bTexture, TTextureOption::fGamma, K3dSceneData::GetLua(), K3dString::GetString(), K_STR_GAMMA, K_STR_LIGHTMAP, K_STR_LINEAR, K_STR_MIPMAP, K_STR_MULTITEXTURE, K_STR_TEXTURE, K3dLua::LuaError(), K3dLua::LuaGetFieldBool(), K3dLua::LuaGetFieldNumber(), K3dLua::LuaGetGlobal(), K3dLua::LuaIsTable(), m_pGameData, and K3dOptionsData::SetTextureOption().
Referenced by LoadOptions().
void K3dOptions::LoadFontBmp | ( | ) | [private] |
Load bitmap font options from ini file.
Definition at line 79 of file K3dOptions.cpp.
References TFontBmpOption::bDrawCamPos, TFontBmpOption::bDrawFps, TFontBmpOption::bDrawNumFaces, TFontBmpOption::bItalic, K3dSceneData::GetLua(), K3dString::GetString(), K_STR_DRAW_CAM_POS, K_STR_DRAW_NUM_FACES, K_STR_DRAWFPS, K_STR_FONTBMP, K_STR_ITALIC, K3dLua::LuaError(), K3dLua::LuaGetFieldBool(), K3dLua::LuaGetGlobal(), K3dLua::LuaIsTable(), m_pGameData, and K3dOptionsData::SetFontBmpOption().
Referenced by LoadOptions().
void K3dOptions::LoadScript | ( | ) | [inline, private] |
Load script from ini file.
Definition at line 136 of file K3dOptions.h.
References K3dSceneData::GetLua(), K3dString::GetString(), K3dSystemData::GetSysHome(), K3D_STR_SHARE_PATH, K_STR_DEFAULT, K_STR_FONTBMP, K_STR_SCRIPT, K3dLua::LuaError(), K3dLua::LuaGetFieldString(), K3dLua::LuaGetGlobal(), K3dLua::LuaIsTable(), m_pGameData, K3dOptionsData::SetScriptOption(), and TScriptOption::strDefault.
Referenced by LoadOptions().
bool K3dOptions::LoadOptions | ( | ) |
Load options from ini file.
Definition at line 49 of file K3dOptions.cpp.
References K3dString::GetString(), K3dSystemData::GetSysHome(), K3D_STR_INI, K3D_STR_SHARE_PATH, LoadFontBmp(), LoadGraphics(), K3dStream::LoadIni(), LoadScript(), LoadTexture(), m_pGameData, and m_pStream.
Referenced by K3dScene::K3dScene().
void K3dOptions::DeleteOptions | ( | ) | [inline] |
Delete all options.
Definition at line 161 of file K3dOptions.h.
References K3dOptionsData::GetFontBmpOption(), K3dOptionsData::GetGraphicOption(), K3dOptionsData::GetScriptOption(), K3dOptionsData::GetTextureOption(), and m_pGameData.
Referenced by K3dEngine::Destroy().
void K3dOptions::PrintGraphicDriverName | ( | ) | [inline] |
Print graphic driver name to the screen.
Definition at line 194 of file K3dOptions.h.
Referenced by K3dEngine::Init().
void K3dOptions::PrintGraphicDriverInfo | ( | ) | [inline] |
Print graphic driver info to the screen.
Definition at line 204 of file K3dOptions.h.
Referenced by K3dEngine::Init().
void K3dOptions::PrintOpenglInfo | ( | ) | [inline] |
void K3dOptions::PrintModes | ( | ) | [inline] |
Pring SDL modes to the screen.
Definition at line 261 of file K3dOptions.h.
References K_STR_WIN_FLAGS, and K_WIN_FLAGS.
Referenced by K3dEngine::Init().
void K3dOptions::PrintParams | ( | int | _iWidth, | |
int | _iHeight, | |||
int | _iBpp, | |||
bool | _bIsSuccess | |||
) | [inline] |
Print parameters to the screen.
_iWidth | Screen width | |
_iHeight | Screen height | |
_iBpp | Color bits | |
_bIsSuccess | Is parameter succesful? |
Definition at line 292 of file K3dOptions.h.
References K_STR_WIN_FLAGS.
Referenced by K3dEngine::InitEngine(), and K3dEngine::ProcessEvent().
K3dGameData* K3dOptions::m_pGameData [private] |
Global game data, data centered game system.
Reimplemented in K3dScene.
Definition at line 40 of file K3dOptions.h.
Referenced by DeleteOptions(), K3dOptions(), LoadFontBmp(), LoadGraphics(), LoadOptions(), LoadScript(), and LoadTexture().
K3dStream* K3dOptions::m_pStream [private] |
Pointer to stream.
Definition at line 41 of file K3dOptions.h.
Referenced by K3dOptions(), and LoadOptions().