OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ScriptStandaloneStubs.cpp
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2011-2016, The OpenClonk Team and contributors
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #include "C4Include.h"
17 
18 #include "script/C4Aul.h"
19 #include "script/C4AulDebug.h"
20 #include "config/C4Config.h"
21 #include "object/C4Def.h"
22 #include "script/C4PropList.h"
23 #include "control/C4Record.h"
24 #include "config/C4Reloc.h"
25 #include "object/C4ObjectList.h"
26 
27 /* Parts of the ScriptEngine that are normally in C4Globals for initialization order reasons. */
28 #ifdef _DEBUG
29 C4Set<C4PropList *> C4PropList::PropLists;
30 #endif
33 std::vector<C4PropListNumbered *> C4PropListNumbered::ShelvedPropLists;
35 C4LangStringTable C4LangStringTable::system_string_table;
38 
39 /* Avoid a C4Object dependency */
41 {
42  if (pTarget == ScriptEngine.GetPropList())
43  return &ScriptEngine.pGlobalEffects;
44  if (pTarget == GameScript.ScenPropList.getPropList())
46  if (pTarget) throw C4AulExecError("Only global and scenario effects are supported");
47  return &ScriptEngine.pGlobalEffects;
48 }
49 
50 /* Stubs */
54 const char * C4Config::AtRelativePath(char const*s) {return s;}
55 
56 C4AulDebug *C4AulDebug::pDebug;
58 
60 bool C4Reloc::Open(C4Group&, char const*) const { return false; }
61 
63 bool EraseItemSafe(const char *szFilename) {return false;}
64 void AddDbgRec(C4RecordChunkType, const void *, int) {}
65 
66 void RecordRandom(uint32_t range, uint32_t val) { }
C4PropListStatic * GetPropList()
Definition: C4Aul.h:153
static C4Set< C4PropListScript * > PropLists
Definition: C4PropList.h:256
C4StringTable Strings
C4Config Config
C4GameScriptHost GameScript
bool EraseItemSafe(const char *szFilename)
static std::vector< C4PropListNumbered * > ShelvedPropLists
Definition: C4PropList.h:239
void AddDbgRec(C4RecordChunkType, const void *, int)
void IncludeDefinition(C4Def *pIncludeDef)
Definition: C4Def.cpp:635
C4Reloc Reloc
C4RecordChunkType
Definition: C4Record.h:44
C4Effect ** FnGetEffectsFor(C4PropList *pTarget)
C4AulScriptEngine ScriptEngine
C4Value ScenPropList
Definition: C4ScriptHost.h:163
Definition: C4Def.h:100
bool Open(C4Group &hGroup, const char *filename) const
Definition: C4Reloc.cpp:69
void DebugStep(C4AulBCC *pCPos, C4Value *stackTop)
Definition: C4AulDebug.cpp:356
C4Effect * pScenarioEffects
Definition: C4ScriptHost.h:165
const char * AtRelativePath(const char *szFilename)
Definition: C4Config.cpp:660
static C4Set< C4PropListNumbered * > PropLists
Definition: C4PropList.h:238
static int32_t EnumerationIndex
Definition: C4PropList.h:240
void RecordRandom(uint32_t range, uint32_t val)
#define s
C4Effect * pGlobalEffects
Definition: C4Aul.h:146
C4PropList * getPropList() const
Definition: C4Value.h:116