Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/scripting/JSInterface_GameView.h
Show All 18 Lines | |||||
#define INCLUDED_JSINTERFACE_GAMEVIEW | #define INCLUDED_JSINTERFACE_GAMEVIEW | ||||
#include "maths/FixedVector3D.h" | #include "maths/FixedVector3D.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
#include "simulation2/helpers/Position.h" | #include "simulation2/helpers/Position.h" | ||||
#include "simulation2/system/Entity.h" | #include "simulation2/system/Entity.h" | ||||
#define DECLARE_BOOLEAN_SCRIPT_SETTING(NAME) \ | #define DECLARE_BOOLEAN_SCRIPT_SETTING(NAME) \ | ||||
bool Get##NAME##Enabled(ScriptInterface::CxPrivate* pCxPrivate); \ | bool Get##NAME##Enabled(); \ | ||||
void Set##NAME##Enabled(ScriptInterface::CxPrivate* pCxPrivate, bool Enabled); | void Set##NAME##Enabled(bool Enabled); | ||||
namespace JSI_GameView | namespace JSI_GameView | ||||
{ | { | ||||
void RegisterScriptFunctions(const ScriptInterface& ScriptInterface); | void RegisterScriptFunctions(const ScriptInterface& ScriptInterface); | ||||
void RegisterScriptFunctions_Settings(const ScriptInterface& scriptInterface); | void RegisterScriptFunctions_Settings(const ScriptInterface& scriptInterface); | ||||
DECLARE_BOOLEAN_SCRIPT_SETTING(Culling); | DECLARE_BOOLEAN_SCRIPT_SETTING(Culling); | ||||
DECLARE_BOOLEAN_SCRIPT_SETTING(LockCullCamera); | DECLARE_BOOLEAN_SCRIPT_SETTING(LockCullCamera); | ||||
DECLARE_BOOLEAN_SCRIPT_SETTING(ConstrainCamera); | DECLARE_BOOLEAN_SCRIPT_SETTING(ConstrainCamera); | ||||
JS::Value GetCameraPivot(ScriptInterface::CxPrivate* pCxPrivate); | JS::Value GetCameraPivot(ScriptInterface::CxPrivate* pCxPrivate); | ||||
void CameraMoveTo(ScriptInterface::CxPrivate* pCxPrivate, entity_pos_t x, entity_pos_t z); | void CameraMoveTo(entity_pos_t x, entity_pos_t z); | ||||
void SetCameraTarget(ScriptInterface::CxPrivate* pCxPrivate, float x, float y, float z); | void SetCameraTarget(float x, float y, float z); | ||||
void SetCameraData(ScriptInterface::CxPrivate* pCxPrivate, entity_pos_t x, entity_pos_t y, entity_pos_t z, entity_pos_t rotx, entity_pos_t roty, entity_pos_t zoom); | void SetCameraData(entity_pos_t x, entity_pos_t y, entity_pos_t z, entity_pos_t rotx, entity_pos_t roty, entity_pos_t zoom); | ||||
void CameraFollow(ScriptInterface::CxPrivate* pCxPrivate, entity_id_t entityid); | void CameraFollow(entity_id_t entityid); | ||||
void CameraFollowFPS(ScriptInterface::CxPrivate* pCxPrivate, entity_id_t entityid); | void CameraFollowFPS(entity_id_t entityid); | ||||
entity_id_t GetFollowedEntity(ScriptInterface::CxPrivate* pCxPrivate); | entity_id_t GetFollowedEntity(); | ||||
CFixedVector3D GetTerrainAtScreenPoint(ScriptInterface::CxPrivate* pCxPrivate, int x, int y); | CFixedVector3D GetTerrainAtScreenPoint(int x, int y); | ||||
} | } | ||||
#undef DECLARE_BOOLEAN_SCRIPT_SETTING | #undef DECLARE_BOOLEAN_SCRIPT_SETTING | ||||
#endif // INCLUDED_JSINTERFACE_GAMEVIEW | #endif // INCLUDED_JSINTERFACE_GAMEVIEW |
Wildfire Games · Phabricator