OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GameScript.h File Reference
#include "script/C4Value.h"
Include dependency graph for C4GameScript.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PSF_Initialize   "~Initialize"
 
#define PSF_InitializePlayers   "~InitializePlayers"
 
#define PSF_InitializeAmbience   "~InitializeAmbience"
 
#define PSF_Construction   "~Construction"
 
#define PSF_Destruction   "~Destruction"
 
#define PSF_ContentsDestruction   "~ContentsDestruction"
 
#define PSF_InitializePlayer   "~InitializePlayer"
 
#define PSF_InitializeScriptPlayer   "~InitializeScriptPlayer"
 
#define PSF_PreInitializePlayer   "~PreInitializePlayer"
 
#define PSF_InitializePlayerControl   "~InitializePlayerControl"
 
#define PSF_InitializeMap   "~InitializeMap"
 
#define PSF_InitializeObjects   "~InitializeObjects"
 
#define PSF_RemovePlayer   "~RemovePlayer"
 
#define PSF_RelaunchPlayer   "~RelaunchPlayer"
 
#define PSF_Time1   "~Time1"
 
#define PSF_Hit   "~Hit"
 
#define PSF_Hit2   "~Hit2"
 
#define PSF_Hit3   "~Hit3"
 
#define PSF_Grab   "~Grab"
 
#define PSF_Grabbed   "~Grabbed"
 
#define PSF_Get   "~Get"
 
#define PSF_Put   "~Put"
 
#define PSF_Collection   "~Collection"
 
#define PSF_Collection2   "~Collection2"
 
#define PSF_Ejection   "~Ejection"
 
#define PSF_Entrance   "~Entrance"
 
#define PSF_Departure   "~Departure"
 
#define PSF_Purchase   "~Purchase"
 
#define PSF_Sale   "~Sale"
 
#define PSF_Damage   "~Damage"
 
#define PSF_Incineration   "~Incineration"
 
#define PSF_IncinerationEx   "~IncinerationEx"
 
#define PSF_Death   "~Death"
 
#define PSF_ActivateEntrance   "~ActivateEntrance"
 
#define PSF_LiftTop   "~LiftTop"
 
#define PSF_Contact   "~Contact%s"
 
#define PSF_ControlCommand   "~ControlCommand"
 
#define PSF_ControlCommandFinished   "~ControlCommandFinished"
 
#define PSF_CatchBlow   "~CatchBlow"
 
#define PSF_QueryCatchBlow   "~QueryCatchBlow"
 
#define PSF_Stuck   "~Stuck"
 
#define PSF_GrabLost   "~GrabLost"
 
#define PSF_OnLineBreak   "~OnLineBreak"
 
#define PSF_OnLineChange   "~OnLineChange"
 
#define PSF_ControlTransfer   "~ControlTransfer"
 
#define PSF_OnSynchronized   "~OnSynchronized"
 
#define PSF_CalcValue   "~CalcValue"
 
#define PSF_CalcDefValue   "~CalcDefValue"
 
#define PSF_InputCallback   "InputCallback"
 
#define PSF_MenuQueryCancel   "~MenuQueryCancel"
 
#define PSF_IsFulfilled   "~IsFulfilled"
 
#define PSF_AttachTargetLost   "~AttachTargetLost"
 
#define PSF_CrewSelection   "~CrewSelection"
 
#define PSF_GetObject2Drop   "~GetObject2Drop"
 
#define PSF_LeagueGetResult   "~LeagueGetResult"
 
#define PSF_FireMode   "~FireMode"
 
#define PSF_FrameDecoration   "~FrameDecoration%s"
 
#define PSF_CalcBuyValue   "~CalcBuyValue"
 
#define PSF_CalcSellValue   "~CalcSellValue"
 
#define PSF_OnJoinCrew   "~Recruitment"
 
#define PSF_OnRemoveCrew   "~DeRecruitment"
 
#define PSF_OnInIncendiaryMaterial   "OnInIncendiaryMaterial"
 
#define PSF_EditCursorSelection   "~EditCursorSelection"
 
#define PSF_EditCursorDeselection   "~EditCursorDeselection"
 
#define PSF_EditCursorMoved   "~EditCursorMoved"
 
#define PSF_DigOutObject   "~DigOutObject"
 
#define PSF_OnDugOut   "~DugOut"
 
#define PSF_SaveScenarioObjects   "~SaveScenarioObjects"
 
#define PSF_CommandFailure   "~CommandFailure"
 
#define PSF_OnCompletionChange   "~OnCompletionChange"
 
#define PSF_CollectStatistics   "CollectStatistics"
 
#define PSF_FxStart   "Fx%sStart"
 
#define PSF_FxStop   "Fx%sStop"
 
#define PSF_FxTimer   "Fx%sTimer"
 
#define PSF_FxEffect   "Fx%sEffect"
 
#define PSF_FxDamage   "Fx%sDamage"
 
#define PSF_FxCustom   "Fx%s%s"
 
#define PSF_PlayerControl   "PlayerControl"
 
#define PSF_MouseSelection   "~MouseSelection"
 
#define PSF_MouseSelectionAlt   "~MouseSelectionAlt"
 
#define PSF_MouseDragDrop   "~MouseDragDrop"
 
#define PSF_MouseHover   "~MouseHover"
 
#define PSF_Definition   "~Definition"
 
#define PSF_RejectHostilityChange   "~RejectHostilityChange"
 
#define PSF_RejectTeamSwitch   "~RejectTeamSwitch"
 
#define PSF_RejectEntrance   "~RejectEntrance"
 
#define PSF_RejectCollection   "~RejectCollect"
 
#define PSF_RejectContents   "~RejectContents"
 
#define PSF_OnGameOver   "~OnGameOver"
 
#define PSF_MenuSelection   "~OnMenuSelection"
 
#define PSF_OnActionJump   "~OnActionJump"
 
#define PSF_OnOwnerChanged   "~OnOwnerChanged"
 
#define PSF_EnergyChange   "~OnEnergyChange"
 
#define PSF_BreathChange   "~OnBreathChange"
 
#define PSF_OnHostilityChange   "~OnHostilityChange"
 
#define PSF_OnTeamSwitch   "~OnTeamSwitch"
 
#define PSF_OnOwnerRemoved   "~OnOwnerRemoved"
 
#define PSF_Promotion   "~OnPromotion"
 
#define PSF_CrewEnabled   "~OnCrewEnabled"
 
#define PSF_CrewDisabled   "~OnCrewDisabled"
 
#define PSF_NameChange   "~OnNameChanged"
 
#define PSF_OnWealthChanged   "~OnWealthChanged"
 
#define PSF_OnActionChanged   "~OnActionChanged"
 
#define PSF_OnMaterialChanged   "~OnMaterialChanged"
 
#define PSFS_FxAdd   "Add"
 
#define PSFS_FxInfo   "Info"
 
#define PSF_ControlCommandAcquire   "~ControlCommandAcquire"
 
#define PSF_ControlCommandConstruction   "~ControlCommandConstruction"
 

Functions

void InitGameFunctionMap (C4AulScriptEngine *pEngine)
 
void InitObjectFunctionMap (C4AulScriptEngine *pEngine)
 
bool C4ValueToMatrix (C4Value &value, StdMeshMatrix *matrix)
 
bool C4ValueToMatrix (const C4ValueArray &array, StdMeshMatrix *matrix)
 

Macro Definition Documentation

#define PSF_ActivateEntrance   "~ActivateEntrance"

Definition at line 67 of file C4GameScript.h.

Referenced by C4Object::ActivateEntrance().

#define PSF_AttachTargetLost   "~AttachTargetLost"

Definition at line 85 of file C4GameScript.h.

Referenced by C4Object::ExecAction().

#define PSF_BreathChange   "~OnBreathChange"

Definition at line 143 of file C4GameScript.h.

Referenced by C4Object::DoBreath().

#define PSF_CalcBuyValue   "~CalcBuyValue"

Definition at line 91 of file C4GameScript.h.

Referenced by C4Def::GetValue().

#define PSF_CalcDefValue   "~CalcDefValue"

Definition at line 81 of file C4GameScript.h.

Referenced by C4Def::GetValue().

#define PSF_CalcSellValue   "~CalcSellValue"

Definition at line 92 of file C4GameScript.h.

Referenced by C4Object::GetValue().

#define PSF_CalcValue   "~CalcValue"

Definition at line 80 of file C4GameScript.h.

Referenced by C4Object::GetValue().

#define PSF_CatchBlow   "~CatchBlow"

Definition at line 72 of file C4GameScript.h.

Referenced by C4GameObjects::CrossCheck(), and ObjectComPunch().

#define PSF_Collection   "~Collection"

Definition at line 56 of file C4GameScript.h.

Referenced by C4Object::Collect(), and ObjectComPut().

#define PSF_Collection2   "~Collection2"

Definition at line 57 of file C4GameScript.h.

Referenced by C4Object::Enter().

#define PSF_CollectStatistics   "CollectStatistics"

Definition at line 105 of file C4GameScript.h.

Referenced by C4RoundResults::EvaluateGame().

#define PSF_CommandFailure   "~CommandFailure"

Definition at line 102 of file C4GameScript.h.

Referenced by C4Command::Fail().

#define PSF_Construction   "~Construction"

Definition at line 37 of file C4GameScript.h.

Referenced by C4Game::NewObject().

#define PSF_Contact   "~Contact%s"

Definition at line 69 of file C4GameScript.h.

Referenced by C4Object::Contact().

#define PSF_ContentsDestruction   "~ContentsDestruction"

Definition at line 39 of file C4GameScript.h.

Referenced by C4Object::AssignRemoval().

#define PSF_ControlCommand   "~ControlCommand"

Definition at line 70 of file C4GameScript.h.

Referenced by C4Object::SetCommand().

#define PSF_ControlCommandAcquire   "~ControlCommandAcquire"

Definition at line 163 of file C4GameScript.h.

Referenced by C4Command::Acquire().

#define PSF_ControlCommandConstruction   "~ControlCommandConstruction"

Definition at line 164 of file C4GameScript.h.

#define PSF_ControlCommandFinished   "~ControlCommandFinished"

Definition at line 71 of file C4GameScript.h.

Referenced by C4Object::ExecuteCommand().

#define PSF_ControlTransfer   "~ControlTransfer"

Definition at line 78 of file C4GameScript.h.

Referenced by C4Command::Transfer().

#define PSF_CrewDisabled   "~OnCrewDisabled"

Definition at line 149 of file C4GameScript.h.

#define PSF_CrewEnabled   "~OnCrewEnabled"

Definition at line 148 of file C4GameScript.h.

#define PSF_CrewSelection   "~CrewSelection"

Definition at line 86 of file C4GameScript.h.

Referenced by C4Object::DoSelect(), and C4Object::UnSelect().

#define PSF_Damage   "~Damage"

Definition at line 63 of file C4GameScript.h.

Referenced by C4Object::DoDamage().

#define PSF_Death   "~Death"

Definition at line 66 of file C4GameScript.h.

Referenced by C4Object::AssignDeath().

#define PSF_Definition   "~Definition"

Definition at line 126 of file C4GameScript.h.

#define PSF_Departure   "~Departure"

Definition at line 60 of file C4GameScript.h.

Referenced by C4Object::Exit().

#define PSF_Destruction   "~Destruction"

Definition at line 38 of file C4GameScript.h.

Referenced by C4Object::AssignRemoval().

#define PSF_DigOutObject   "~DigOutObject"
#define PSF_EditCursorDeselection   "~EditCursorDeselection"

Definition at line 97 of file C4GameScript.h.

Referenced by C4EditCursor::PerformDuplicationLegacy().

#define PSF_EditCursorMoved   "~EditCursorMoved"

Definition at line 98 of file C4GameScript.h.

#define PSF_EditCursorSelection   "~EditCursorSelection"

Definition at line 96 of file C4GameScript.h.

Referenced by C4EditCursor::PerformDuplicationLegacy().

#define PSF_Ejection   "~Ejection"

Definition at line 58 of file C4GameScript.h.

Referenced by C4Object::Exit().

#define PSF_EnergyChange   "~OnEnergyChange"

Definition at line 142 of file C4GameScript.h.

Referenced by C4Object::DoEnergy().

#define PSF_Entrance   "~Entrance"

Definition at line 59 of file C4GameScript.h.

Referenced by C4Object::Enter().

#define PSF_FireMode   "~FireMode"

Definition at line 89 of file C4GameScript.h.

#define PSF_FrameDecoration   "~FrameDecoration%s"

Definition at line 90 of file C4GameScript.h.

Referenced by C4GUI::FrameDecoration::SetByDef().

#define PSF_FxCustom   "Fx%s%s"

Definition at line 114 of file C4GameScript.h.

Referenced by C4Effect::DoCall().

#define PSF_FxDamage   "Fx%sDamage"

Definition at line 113 of file C4GameScript.h.

Referenced by C4Effect::AssignCallbackFunctions().

#define PSF_FxEffect   "Fx%sEffect"

Definition at line 112 of file C4GameScript.h.

Referenced by C4Effect::AssignCallbackFunctions().

#define PSF_FxStart   "Fx%sStart"

Definition at line 109 of file C4GameScript.h.

Referenced by C4Effect::AssignCallbackFunctions().

#define PSF_FxStop   "Fx%sStop"

Definition at line 110 of file C4GameScript.h.

Referenced by C4Effect::AssignCallbackFunctions().

#define PSF_FxTimer   "Fx%sTimer"

Definition at line 111 of file C4GameScript.h.

Referenced by C4Effect::AssignCallbackFunctions().

#define PSF_Get   "~Get"

Definition at line 54 of file C4GameScript.h.

Referenced by C4Command::GetTryEnter().

#define PSF_GetObject2Drop   "~GetObject2Drop"

Definition at line 87 of file C4GameScript.h.

Referenced by C4Object::PutAwayUnusedObject().

#define PSF_Grab   "~Grab"

Definition at line 52 of file C4GameScript.h.

Referenced by ObjectComGrab(), and ObjectComUnGrab().

#define PSF_Grabbed   "~Grabbed"

Definition at line 53 of file C4GameScript.h.

Referenced by ObjectComGrab(), and ObjectComUnGrab().

#define PSF_GrabLost   "~GrabLost"

Definition at line 75 of file C4GameScript.h.

Referenced by GrabLost().

#define PSF_Hit   "~Hit"

Definition at line 49 of file C4GameScript.h.

Referenced by C4Object::Collect(), and C4Object::DoMovement().

#define PSF_Hit2   "~Hit2"

Definition at line 50 of file C4GameScript.h.

Referenced by C4Object::Collect(), and C4Object::DoMovement().

#define PSF_Hit3   "~Hit3"

Definition at line 51 of file C4GameScript.h.

Referenced by C4Object::Collect(), and C4Object::DoMovement().

#define PSF_Incineration   "~Incineration"

Definition at line 64 of file C4GameScript.h.

#define PSF_IncinerationEx   "~IncinerationEx"

Definition at line 65 of file C4GameScript.h.

#define PSF_Initialize   "~Initialize"

Definition at line 34 of file C4GameScript.h.

Referenced by C4Object::DoCon(), and C4Game::InitGameFinal().

#define PSF_InitializeAmbience   "~InitializeAmbience"

Definition at line 36 of file C4GameScript.h.

Referenced by C4Game::InitGameFinal().

#define PSF_InitializeMap   "~InitializeMap"

Definition at line 44 of file C4GameScript.h.

Referenced by C4MapScriptHost::InitializeMap().

#define PSF_InitializeObjects   "~InitializeObjects"

Definition at line 45 of file C4GameScript.h.

Referenced by C4Game::InitGame().

#define PSF_InitializePlayer   "~InitializePlayer"

Definition at line 40 of file C4GameScript.h.

Referenced by C4Player::ScenarioInit().

#define PSF_InitializePlayerControl   "~InitializePlayerControl"

Definition at line 43 of file C4GameScript.h.

#define PSF_InitializePlayers   "~InitializePlayers"

Definition at line 35 of file C4GameScript.h.

Referenced by C4Game::LoadScenarioSection(), and C4Game::OnPlayerJoinFinished().

#define PSF_InitializeScriptPlayer   "~InitializeScriptPlayer"

Definition at line 41 of file C4GameScript.h.

Referenced by C4Player::Init().

#define PSF_InputCallback   "InputCallback"

Definition at line 82 of file C4GameScript.h.

#define PSF_IsFulfilled   "~IsFulfilled"

Definition at line 84 of file C4GameScript.h.

Referenced by C4RoundResults::EvaluateGoals().

#define PSF_LeagueGetResult   "~LeagueGetResult"

Definition at line 88 of file C4GameScript.h.

#define PSF_LiftTop   "~LiftTop"

Definition at line 68 of file C4GameScript.h.

Referenced by C4Object::ExecAction().

#define PSF_MenuQueryCancel   "~MenuQueryCancel"

Definition at line 83 of file C4GameScript.h.

Referenced by C4ObjectMenu::IsCloseDenied().

#define PSF_MenuSelection   "~OnMenuSelection"

Definition at line 139 of file C4GameScript.h.

Referenced by C4ObjectMenu::OnSelectionChanged().

#define PSF_MouseDragDrop   "~MouseDragDrop"

Definition at line 121 of file C4GameScript.h.

#define PSF_MouseHover   "~MouseHover"

Definition at line 122 of file C4GameScript.h.

#define PSF_MouseSelection   "~MouseSelection"

Definition at line 119 of file C4GameScript.h.

#define PSF_MouseSelectionAlt   "~MouseSelectionAlt"

Definition at line 120 of file C4GameScript.h.

#define PSF_NameChange   "~OnNameChanged"

Definition at line 150 of file C4GameScript.h.

#define PSF_OnActionChanged   "~OnActionChanged"

Definition at line 152 of file C4GameScript.h.

Referenced by C4Object::SetAction().

#define PSF_OnActionJump   "~OnActionJump"

Definition at line 140 of file C4GameScript.h.

Referenced by ObjectActionJump().

#define PSF_OnCompletionChange   "~OnCompletionChange"

Definition at line 103 of file C4GameScript.h.

Referenced by C4Object::DoCon().

#define PSF_OnDugOut   "~DugOut"
#define PSF_OnGameOver   "~OnGameOver"

Definition at line 138 of file C4GameScript.h.

Referenced by C4Game::DoGameOver().

#define PSF_OnHostilityChange   "~OnHostilityChange"

Definition at line 144 of file C4GameScript.h.

#define PSF_OnInIncendiaryMaterial   "OnInIncendiaryMaterial"

Definition at line 95 of file C4GameScript.h.

Referenced by C4Object::ExecLife().

#define PSF_OnJoinCrew   "~Recruitment"

Definition at line 93 of file C4GameScript.h.

Referenced by C4Player::MakeCrewMember(), and C4Player::PlaceReadyCrew().

#define PSF_OnLineBreak   "~OnLineBreak"

Definition at line 76 of file C4GameScript.h.

Referenced by C4Object::ExecAction().

#define PSF_OnLineChange   "~OnLineChange"

Definition at line 77 of file C4GameScript.h.

Referenced by C4Object::ExecAction().

#define PSF_OnMaterialChanged   "~OnMaterialChanged"

Definition at line 153 of file C4GameScript.h.

#define PSF_OnOwnerChanged   "~OnOwnerChanged"

Definition at line 141 of file C4GameScript.h.

Referenced by C4Object::SetOwner().

#define PSF_OnOwnerRemoved   "~OnOwnerRemoved"

Definition at line 146 of file C4GameScript.h.

Referenced by C4Player::NotifyOwnedObjects().

#define PSF_OnRemoveCrew   "~DeRecruitment"

Definition at line 94 of file C4GameScript.h.

Referenced by C4Player::SetObjectCrewStatus().

#define PSF_OnSynchronized   "~OnSynchronized"

Definition at line 79 of file C4GameScript.h.

Referenced by C4GameObjects::OnSynchronized(), and C4Object::StatusActivate().

#define PSF_OnTeamSwitch   "~OnTeamSwitch"

Definition at line 145 of file C4GameScript.h.

#define PSF_OnWealthChanged   "~OnWealthChanged"

Definition at line 151 of file C4GameScript.h.

Referenced by C4Player::SetWealth().

#define PSF_PlayerControl   "PlayerControl"

Definition at line 118 of file C4GameScript.h.

#define PSF_PreInitializePlayer   "~PreInitializePlayer"

Definition at line 42 of file C4GameScript.h.

Referenced by C4Player::Init().

#define PSF_Promotion   "~OnPromotion"

Definition at line 147 of file C4GameScript.h.

Referenced by C4Object::Promote().

#define PSF_Purchase   "~Purchase"

Definition at line 61 of file C4GameScript.h.

#define PSF_Put   "~Put"

Definition at line 55 of file C4GameScript.h.

Referenced by ObjectComPut().

#define PSF_QueryCatchBlow   "~QueryCatchBlow"

Definition at line 73 of file C4GameScript.h.

Referenced by C4GameObjects::CrossCheck(), and ObjectComPunch().

#define PSF_RejectCollection   "~RejectCollect"

Definition at line 133 of file C4GameScript.h.

Referenced by C4ObjectMenu::DoRefillInternal(), and C4Object::Enter().

#define PSF_RejectContents   "~RejectContents"

Definition at line 134 of file C4GameScript.h.

Referenced by C4Object::ActivateMenu(), and C4Command::GetTryEnter().

#define PSF_RejectEntrance   "~RejectEntrance"

Definition at line 132 of file C4GameScript.h.

Referenced by C4Object::Enter().

#define PSF_RejectHostilityChange   "~RejectHostilityChange"

Definition at line 130 of file C4GameScript.h.

#define PSF_RejectTeamSwitch   "~RejectTeamSwitch"

Definition at line 131 of file C4GameScript.h.

#define PSF_RelaunchPlayer   "~RelaunchPlayer"

Definition at line 47 of file C4GameScript.h.

Referenced by C4Object::AssignDeath().

#define PSF_RemovePlayer   "~RemovePlayer"

Definition at line 46 of file C4GameScript.h.

Referenced by C4PlayerList::Remove().

#define PSF_Sale   "~Sale"

Definition at line 62 of file C4GameScript.h.

#define PSF_SaveScenarioObjects   "~SaveScenarioObjects"

Definition at line 101 of file C4GameScript.h.

Referenced by C4EditCursor::PerformDuplication(), and C4Game::SaveData().

#define PSF_Stuck   "~Stuck"

Definition at line 74 of file C4GameScript.h.

Referenced by C4Object::Lift(), and C4Object::Push().

#define PSF_Time1   "~Time1"

Definition at line 48 of file C4GameScript.h.

#define PSFS_FxAdd   "Add"

Definition at line 156 of file C4GameScript.h.

Referenced by C4Effect::Check().

#define PSFS_FxInfo   "Info"

Definition at line 157 of file C4GameScript.h.

Referenced by C4Object::GetInfoString().

Function Documentation

bool C4ValueToMatrix ( C4Value value,
StdMeshMatrix *  matrix 
)

Definition at line 42 of file C4ObjectScript.cpp.

References C4Value::getArray().

Referenced by C4DefGraphics::Draw(), C4GraphicsOverlay::Draw(), and C4Object::DrawFaceImpl().

43 {
44  const C4ValueArray* array = value.getArray();
45  if (!array) return false;
46  return C4ValueToMatrix(*array, matrix);
47 }
C4ValueArray * getArray() const
Definition: C4Value.h:118
bool C4ValueToMatrix(C4Value &value, StdMeshMatrix *matrix)

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4ValueToMatrix ( const C4ValueArray array,
StdMeshMatrix *  matrix 
)

Definition at line 49 of file C4ObjectScript.cpp.

References C4ValueArray::GetSize().

50 {
51  if (array.GetSize() != 12) return false;
52 
53  StdMeshMatrix& trans = *matrix;
54  trans(0,0) = array[0].getInt()/1000.0f;
55  trans(0,1) = array[1].getInt()/1000.0f;
56  trans(0,2) = array[2].getInt()/1000.0f;
57  trans(0,3) = array[3].getInt()/1000.0f;
58  trans(1,0) = array[4].getInt()/1000.0f;
59  trans(1,1) = array[5].getInt()/1000.0f;
60  trans(1,2) = array[6].getInt()/1000.0f;
61  trans(1,3) = array[7].getInt()/1000.0f;
62  trans(2,0) = array[8].getInt()/1000.0f;
63  trans(2,1) = array[9].getInt()/1000.0f;
64  trans(2,2) = array[10].getInt()/1000.0f;
65  trans(2,3) = array[11].getInt()/1000.0f;
66 
67  return true;
68 }
int32_t GetSize() const
Definition: C4ValueArray.h:36

Here is the call graph for this function:

void InitGameFunctionMap ( C4AulScriptEngine pEngine)

Definition at line 2732 of file C4GameScript.cpp.

References AddFunc(), C4V_Int, F, GBackLiquid(), GBackSemiSolid(), GBackSolid(), C4AulScriptEngine::GetPropList(), Hostile(), C4ScriptConstDef::Identifier, Object(), PathFree(), C4AulScriptEngine::RegisterGlobalConstant(), and SimFlight().

Referenced by C4Game::InitScriptEngine().

2733 {
2734  // add all def constants (all Int)
2735  for (C4ScriptConstDef *pCDef = &C4ScriptGameConstMap[0]; pCDef->Identifier; pCDef++)
2736  {
2737  assert(pCDef->ValType == C4V_Int); // only int supported currently
2738  pEngine->RegisterGlobalConstant(pCDef->Identifier, C4VInt(pCDef->Data));
2739  }
2740  C4PropListStatic * p = pEngine->GetPropList();
2741  // add all def script funcs
2742  for (C4ScriptFnDef *pDef = &C4ScriptGameFnMap[0]; pDef->Identifier; pDef++)
2743  new C4AulDefFunc(p, pDef);
2744 #define F(f) ::AddFunc(p, #f, Fn##f)
2745  F(GetX);
2746  F(GetY);
2747  F(GetDefinition);
2748  F(GetDefinitionGroupPath);
2749  F(GetPlayerName);
2750  F(GetPlayerType);
2751  F(GetPlayerColor);
2752  F(GetPlrClonkSkin);
2753  F(CreateObject);
2754  F(CreateObjectAbove);
2755  F(CreateConstruction);
2756  F(FindConstructionSite);
2757  F(CheckConstructionSite);
2758  F(Sound);
2759  F(SoundAt);
2760  F(ChangeSoundModifier);
2761  F(SetGlobalSoundModifier);
2762  F(Music);
2763  F(MusicLevel);
2764  F(SetPlayList);
2765  F(SetPlrView);
2766  F(SetPlrKnowledge);
2767  F(GetPlrViewMode);
2768  F(ResetCursorView);
2769  F(GetPlrView);
2770  F(GetWealth);
2771  F(SetWealth);
2772  F(DoPlayerScore);
2773  F(GetPlayerScore);
2774  F(GetPlayerScoreGain);
2775  F(GetWind);
2776  F(SetWind);
2777  F(GetTemperature);
2778  F(SetTemperature);
2779  F(ShakeFree);
2780  F(DigFree);
2781  F(DigFreeRect);
2782  F(ClearFreeRect);
2783  F(Hostile);
2784  F(SetHostility);
2785  F(PlaceVegetation);
2786  F(PlaceAnimal);
2787  F(GameOver);
2788  F(GetHiRank);
2789  F(GetCrew);
2790  F(GetCrewCount);
2791  F(GetPlayerCount);
2792  F(GetPlayerByIndex);
2793  F(EliminatePlayer);
2794  F(SurrenderPlayer);
2795  F(GetLeagueScore);
2796  F(SetLeaguePerformance);
2797  F(SetLeagueProgressData);
2798  F(GetLeagueProgressData);
2799  F(CreateScriptPlayer);
2800  F(GetCursor);
2801  F(GetViewCursor);
2802  F(SetCursor);
2803  F(SetViewCursor);
2804  F(GetMaterial);
2805  F(GetBackMaterial);
2806  F(GetTexture);
2807  F(GetBackTexture);
2808  F(GetAverageTextureColor);
2809  F(GetMaterialCount);
2810  F(GBackSolid);
2811  F(GBackSemiSolid);
2812  F(GBackLiquid);
2813  F(GBackSky);
2814  F(Material);
2815  F(BlastFree);
2816  F(InsertMaterial);
2817  F(CanInsertMaterial);
2818  F(LandscapeWidth);
2819  F(LandscapeHeight);
2820  F(SetAmbientBrightness);
2821  F(GetAmbientBrightness);
2822  F(SetSeason);
2823  F(GetSeason);
2824  F(SetClimate);
2825  F(GetClimate);
2826  F(SetPlayerZoomByViewRange);
2827  F(GetPlayerZoomLimits);
2828  F(SetPlayerZoom);
2829  F(SetPlayerViewLock);
2830  F(DoBaseMaterial);
2831  F(DoBaseProduction);
2832  F(GainMissionAccess);
2833  F(IsNetwork);
2834  F(IsEditor);
2835  F(GetLeague);
2836  ::AddFunc(p, "TestMessageBoard", FnTestMessageBoard, false);
2837  ::AddFunc(p, "CallMessageBoard", FnCallMessageBoard, false);
2838  ::AddFunc(p, "AbortMessageBoard", FnAbortMessageBoard, false);
2839  F(SetFoW);
2840  F(SetMaxPlayer);
2841  F(Object);
2842  F(GetTime);
2843  F(GetMissionAccess);
2844  F(MaterialName);
2845  F(DrawMap);
2846  F(DrawDefMap);
2847  F(CreateParticle);
2848  F(ClearParticles);
2849  F(SetSky);
2850  F(SetSkyAdjust);
2851  F(SetMatAdjust);
2852  F(GetSkyAdjust);
2853  F(GetMatAdjust);
2854  F(SetSkyParallax);
2855  F(ReloadDef);
2856  F(ReloadParticle);
2857  F(SetGamma);
2858  F(ResetGamma);
2859  F(AddFragmentShader);
2860  F(RemoveShader);
2861  F(FrameCounter);
2862  F(DrawMaterialQuad);
2863  F(SetFilmView);
2864  F(AddMsgBoardCmd);
2865  ::AddFunc(p, "SetGameSpeed", FnSetGameSpeed, false);
2866  ::AddFunc(p, "DrawMatChunks", FnDrawMatChunks, false);
2867  F(GetPathLength);
2868  F(SetTextureIndex);
2869  F(RemoveUnusedTexMapEntries);
2870  F(SimFlight);
2871  F(LoadScenarioSection);
2872  F(SetViewOffset);
2873  ::AddFunc(p, "SetPreSend", FnSetPreSend, false);
2874  F(GetPlayerID);
2875  F(GetPlayerTeam);
2876  F(SetPlayerTeam);
2877  F(GetScriptPlayerExtraID);
2878  F(GetTeamConfig);
2879  F(GetTeamName);
2880  F(GetTeamColor);
2881  F(GetTeamByIndex);
2882  F(GetTeamCount);
2883  ::AddFunc(p, "InitScenarioPlayer", FnInitScenarioPlayer, false);
2884  F(SetScoreboardData);
2885  ::AddFunc(p, "GetScoreboardString", FnGetScoreboardString, false);
2886  ::AddFunc(p, "GetScoreboardData", FnGetScoreboardData, false);
2887  F(DoScoreboardShow);
2888  F(SortScoreboard);
2889  F(AddEvaluationData);
2890  F(HideSettlementScoreInEvaluation);
2891  F(ExtractMaterialAmount);
2892  F(CustomMessage);
2893  F(GuiOpen);
2894  F(GuiUpdateTag);
2895  F(GuiClose);
2896  F(GuiUpdate);
2897  ::AddFunc(p, "PauseGame", FnPauseGame, false);
2898  F(PathFree);
2899  F(PathFree2);
2900  F(SetNextMission);
2901  F(GetPlayerControlState);
2902  F(SetPlayerControlEnabled);
2903  F(GetPlayerControlEnabled);
2904  F(GetPlayerControlAssignment);
2905  F(PlayRumble);
2906  F(StopRumble);
2907  F(GetStartupPlayerCount);
2908  F(GetStartupTeamCount);
2909  F(EditCursor);
2910  F(GainScenarioAchievement);
2911  F(GetPXSCount);
2912  F(GetPlrKnowledge);
2913  F(GetBaseMaterial);
2914  F(GetBaseProduction);
2915  F(GetDefCoreVal);
2916  F(GetObjectVal);
2917  F(GetObjectInfoCoreVal);
2918  F(GetScenarioVal);
2919  F(GetPlayerVal);
2920  F(GetPlayerInfoCoreVal);
2921  F(GetMaterialVal);
2922  F(SetPlrExtraData);
2923  F(GetPlrExtraData);
2924  F(PV_Linear);
2925  F(PV_Random);
2926  F(PV_Direction);
2927  F(PV_Step);
2928  F(PV_Speed);
2929  F(PV_Wind);
2930  F(PV_Gravity);
2931  // F(PV_KeyFrames); added below
2932  F(PV_Sin);
2933  F(PV_Cos);
2934  F(PC_Die);
2935  F(PC_Bounce);
2936  F(PC_Stop);
2937  F(IncinerateLandscape);
2938  F(GetGravity);
2939  F(SetGravity);
2940 #undef F
2941 }
void RegisterGlobalConstant(const char *szName, const C4Value &rValue)
bool SimFlight(C4Real &x, C4Real &y, C4Real &xdir, C4Real &ydir, int32_t iDensityMin, int32_t iDensityMax, int32_t &iIter)
Definition: C4Movement.cpp:611
C4PropListStatic * GetPropList()
Definition: C4Aul.h:153
C4Value C4VInt(int32_t i)
Definition: C4Value.h:242
#define F(f)
const char * Identifier
Definition: C4AulDefFunc.h:277
C4ScriptFnDef C4ScriptGameFnMap[]
int32_t Hostile(int32_t plr1, int32_t plr2)
bool PathFree(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
C4Object * Object(C4PropList *_this)
Definition: C4AulDefFunc.h:35
const char * Identifier
Definition: C4AulDefFunc.h:269
bool GBackSemiSolid(int32_t x, int32_t y)
Definition: C4Landscape.h:237
C4ScriptConstDef C4ScriptGameConstMap[]
void AddFunc(C4PropListStatic *Parent, const char *Name, RType(*pFunc)(ThisType *, ParTypes...), bool Public=true)
Definition: C4AulDefFunc.h:261
bool GBackLiquid(int32_t x, int32_t y)
Definition: C4Landscape.h:242
bool GBackSolid(int32_t x, int32_t y)
Definition: C4Landscape.h:232

Here is the call graph for this function:

Here is the caller graph for this function:

void InitObjectFunctionMap ( C4AulScriptEngine pEngine)

Definition at line 2550 of file C4ObjectScript.cpp.

References AddFunc(), AddMenuItem(), C4V_Int, C4VInt(), F, GetClrModulation(), C4AulScriptEngine::GetPropList(), C4ScriptConstDef::Identifier, and C4AulScriptEngine::RegisterGlobalConstant().

Referenced by C4Game::InitScriptEngine().

2551 {
2552  // add all def constants (all Int)
2553  for (C4ScriptConstDef *pCDef = &C4ScriptObjectConstMap[0]; pCDef->Identifier; pCDef++)
2554  {
2555  assert(pCDef->ValType == C4V_Int); // only int supported currently
2556  pEngine->RegisterGlobalConstant(pCDef->Identifier, C4VInt(pCDef->Data));
2557  }
2558  C4PropListStatic * p = pEngine->GetPropList();
2559 #define F(f) ::AddFunc(p, #f, Fn##f)
2560 
2561  F(DoCon);
2562  F(GetCon);
2563  F(DoDamage);
2564  F(DoEnergy);
2565  F(DoBreath);
2566  F(GetEnergy);
2567  F(OnFire);
2568  F(Stuck);
2569  F(InLiquid);
2570  F(SetAction);
2571  F(SetActionData);
2572 
2573  F(SetBridgeActionData);
2574  F(GetAction);
2575  F(GetActTime);
2576  F(GetOwner);
2577  F(GetMass);
2578  F(GetBreath);
2579  F(GetMenu);
2580  F(GetVertexNum);
2581  F(GetVertex);
2582  F(SetVertex);
2583  F(AddVertex);
2584  F(InsertVertex);
2585  F(RemoveVertex);
2586  ::AddFunc(p, "SetContactDensity", FnSetContactDensity, false);
2587  F(GetController);
2588  F(SetController);
2589  F(SetName);
2590  F(GetKiller);
2591  F(SetKiller);
2592  F(GetPhase);
2593  F(SetPhase);
2594  F(GetCategory);
2595  F(GetOCF);
2596  F(SetAlive);
2597  F(GetAlive);
2598  F(GetDamage);
2599  F(SetComDir);
2600  F(GetComDir);
2601  F(SetDir);
2602  F(GetDir);
2603  F(SetEntrance);
2604  F(GetEntrance);
2605  F(SetCategory);
2606  F(FinishCommand);
2607  F(ActIdle);
2608  F(SetRDir);
2609  F(GetRDir);
2610  F(GetXDir);
2611  F(GetYDir);
2612  F(GetR);
2613  F(SetXDir);
2614  F(SetYDir);
2615  F(SetR);
2616  F(SetOwner);
2617  F(MakeCrewMember);
2618  F(GrabObjectInfo);
2619  F(CreateContents);
2620  F(ShiftContents);
2621  F(GetID);
2622  F(Contents);
2623  F(ScrollContents);
2624  F(Contained);
2625  F(ContentsCount);
2626  ::AddFunc(p, "FindContents", FnFindContents, false);
2627  ::AddFunc(p, "FindOtherContents", FnFindOtherContents, false);
2628  F(RemoveObject);
2629  F(GetActionTarget);
2630  F(SetActionTargets);
2631  ::AddFunc(p, "SetCrewStatus", FnSetCrewStatus, false);
2632  F(SetPosition);
2633  F(CreateMenu);
2634  F(AddMenuItem);
2635  F(SelectMenuItem);
2636  F(SetMenuDecoration);
2637  F(SetMenuTextProgress);
2638  F(ObjectDistance);
2639  F(GetValue);
2640  F(GetRank);
2641  F(SetTransferZone);
2642  F(SetMass);
2643  F(GetColor);
2644  F(SetColor);
2645  F(SetLightRange);
2646  F(GetLightColor);
2647  F(SetLightColor);
2648  F(SetPicture);
2649  F(GetProcedure);
2650  F(CanConcatPictureWith);
2651  F(SetGraphics);
2652  F(ObjectNumber);
2653  F(ShowInfo);
2654  F(CheckVisibility);
2655  F(SetClrModulation);
2657  F(CloseMenu);
2658  F(GetMenuSelection);
2659  F(GetDefBottom);
2660  F(SetMenuSize);
2661  F(GetCrewEnabled);
2662  F(SetCrewEnabled);
2663  F(DoCrewExp);
2664  F(ClearMenuItems);
2665  F(GetObjectLayer);
2666  F(SetObjectLayer);
2667  F(SetShape);
2668  F(SetObjDrawTransform);
2669  ::AddFunc(p, "SetObjDrawTransform2", FnSetObjDrawTransform2, false);
2670  ::AddFunc(p, "SetObjectStatus", FnSetObjectStatus, false);
2671  ::AddFunc(p, "GetObjectStatus", FnGetObjectStatus, false);
2672  ::AddFunc(p, "AdjustWalkRotation", FnAdjustWalkRotation, false);
2673  F(GetContact);
2674  F(SetObjectBlitMode);
2675  F(GetObjectBlitMode);
2676  ::AddFunc(p, "GetUnusedOverlayID", FnGetUnusedOverlayID, false);
2677  F(ExecuteCommand);
2678 
2679  F(PlayAnimation);
2680  F(TransformBone);
2681  F(StopAnimation);
2682  F(GetRootAnimation);
2683  F(GetAnimationList);
2684  F(GetAnimationLength);
2685  F(GetAnimationName);
2686  F(GetAnimationPosition);
2687  F(GetAnimationWeight);
2688  F(SetAnimationPosition);
2689  F(SetAnimationBoneTransform);
2690  F(SetAnimationWeight);
2691  F(AttachMesh);
2692  F(DetachMesh);
2693  F(SetAttachBones);
2694  F(SetAttachTransform);
2695  F(GetMeshMaterial);
2696  F(SetMeshMaterial);
2697  F(CreateParticleAtBone);
2698  F(ChangeDef);
2699  F(GrabContents);
2700  F(Punch);
2701  F(Kill);
2702  F(Fling);
2703  ::AddFunc(p, "Jump", FnJump, false);
2704  F(Enter);
2705  F(DeathAnnounce);
2706  F(SetSolidMask);
2707  F(SetHalfVehicleSolidMask);
2708  F(Exit);
2709  F(Collect);
2710 
2711  F(SetCommand);
2712  F(AddCommand);
2713  F(AppendCommand);
2714  F(GetCommand);
2715  F(SetCrewExtraData);
2716  F(GetCrewExtraData);
2717  F(GetDefWidth);
2718  F(GetDefHeight);
2719 #undef F
2720 }
void RegisterGlobalConstant(const char *szName, const C4Value &rValue)
DWORD GetClrModulation(DWORD dwSrcClr, DWORD dwDstClr, DWORD &dwBack)
Definition: StdColors.h:114
C4PropListStatic * GetPropList()
Definition: C4Aul.h:153
C4Value C4VInt(int32_t i)
Definition: C4Value.h:242
bool AddMenuItem(C4ConsoleGUI *console, HMENU hMenu, DWORD dwID, const char *szString, bool fEnabled)
#define F(f)
const char * Identifier
Definition: C4AulDefFunc.h:269
void AddFunc(C4PropListStatic *Parent, const char *Name, RType(*pFunc)(ThisType *, ParTypes...), bool Public=true)
Definition: C4AulDefFunc.h:261
C4ScriptConstDef C4ScriptObjectConstMap[]

Here is the call graph for this function:

Here is the caller graph for this function: