Pyrogenesis  trunk
Macros | Functions
JSInterface_GameView.cpp File Reference
#include "precompiled.h"
#include "JSInterface_GameView.h"
#include "graphics/GameView.h"
#include "ps/Game.h"
#include "ps/CLogger.h"
#include "ps/Profile.h"
#include "scriptinterface/ScriptInterface.h"
Include dependency graph for JSInterface_GameView.cpp:

Macros

#define IMPLEMENT_BOOLEAN_SCRIPT_SETTING(NAME)
 
#define REGISTER_BOOLEAN_SCRIPT_SETTING(NAME)
 

Functions

 IMPLEMENT_BOOLEAN_SCRIPT_SETTING (Culling)
 
 IMPLEMENT_BOOLEAN_SCRIPT_SETTING (LockCullCamera)
 
 IMPLEMENT_BOOLEAN_SCRIPT_SETTING (ConstrainCamera)
 

Macro Definition Documentation

#define IMPLEMENT_BOOLEAN_SCRIPT_SETTING (   NAME)
Value:
bool JSI_GameView::Get##NAME##Enabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)) \
{ \
if (!g_Game || !g_Game->GetView()) \
{ \
LOGERROR("Trying to get a setting from GameView when it's not initialized!"); \
return false; \
} \
return g_Game->GetView()->Get##NAME##Enabled(); \
} \
\
void JSI_GameView::Set##NAME##Enabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool Enabled) \
{ \
if (!g_Game || !g_Game->GetView()) \
{ \
LOGERROR("Trying to set a setting of GameView when it's not initialized!"); \
return; \
} \
g_Game->GetView()->Set##NAME##Enabled(Enabled); \
}
#define LOGERROR(...)
Definition: CLogger.h:36
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
CGame * g_Game
Globally accessible pointer to the CGame object.
Definition: Game.cpp:60
void Get(const CStr &value, T &ret)
Definition: ConfigDB.cpp:61
CGameView * GetView()
Get the pointer to the game view object.
Definition: Game.h:156
Definition: ScriptInterface.h:99
#define REGISTER_BOOLEAN_SCRIPT_SETTING (   NAME)
Value:
scriptInterface.RegisterFunction<bool, &JSI_GameView::Get##NAME##Enabled>("GameView_Get" #NAME "Enabled"); \
scriptInterface.RegisterFunction<void, bool, &JSI_GameView::Set##NAME##Enabled>("GameView_Set" #NAME "Enabled");
void Get(const CStr &value, T &ret)
Definition: ConfigDB.cpp:61

Function Documentation

IMPLEMENT_BOOLEAN_SCRIPT_SETTING ( Culling  )
IMPLEMENT_BOOLEAN_SCRIPT_SETTING ( LockCullCamera  )
IMPLEMENT_BOOLEAN_SCRIPT_SETTING ( ConstrainCamera  )