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 "config/C4Reloc.h"
19 #include "control/C4Record.h"
20 #include "object/C4Def.h"
21 #include "object/C4ObjectList.h"
22 #include "script/C4Aul.h"
23 #include "script/C4AulDebug.h"
24 #include "script/C4PropList.h"
25 
26 /* Parts of the ScriptEngine that are normally in C4Globals for initialization order reasons. */
27 #ifdef _DEBUG
28 C4Set<C4PropList *> C4PropList::PropLists;
29 #endif
32 std::vector<C4PropListNumbered *> C4PropListNumbered::ShelvedPropLists;
34 C4LangStringTable C4LangStringTable::system_string_table;
37 
38 /* Avoid a C4Object dependency */
40 {
41  if (pTarget == ScriptEngine.GetPropList())
42  return &ScriptEngine.pGlobalEffects;
43  if (pTarget == GameScript.ScenPropList.getPropList())
45  if (pTarget) throw C4AulExecError("Only global and scenario effects are supported");
46  return &ScriptEngine.pGlobalEffects;
47 }
48 
49 /* Stubs */
51 C4Config::C4Config() = default;
52 C4Config::~C4Config() = default;
53 const char * C4Config::AtRelativePath(char const*s) {return s;}
54 
55 C4AulDebug *C4AulDebug::pDebug;
57 
59 bool C4Reloc::Open(C4Group&, char const*) const { return false; }
60 
62 bool EraseItemSafe(const char *szFilename) {return false;}
63 void AddDbgRec(C4RecordChunkType, const void *, int) {}
64 
65 void RecordRandom(uint32_t range, uint32_t val) { }
C4PropListStatic * GetPropList()
Definition: C4Aul.h:151
static C4Set< C4PropListScript * > PropLists
Definition: C4PropList.h:254
C4StringTable Strings
C4Config Config
C4GameScriptHost GameScript
bool EraseItemSafe(const char *szFilename)
static std::vector< C4PropListNumbered * > ShelvedPropLists
Definition: C4PropList.h:237
void AddDbgRec(C4RecordChunkType, const void *, int)
void IncludeDefinition(C4Def *pIncludeDef)
Definition: C4Def.cpp:631
C4Reloc Reloc
C4RecordChunkType
Definition: C4Record.h:44
C4Effect ** FnGetEffectsFor(C4PropList *pTarget)
C4AulScriptEngine ScriptEngine
C4Value ScenPropList
Definition: C4ScriptHost.h:163
Definition: C4Def.h:98
bool Open(C4Group &hGroup, const char *filename) const
Definition: C4Reloc.cpp:82
void DebugStep(C4AulBCC *pCPos, C4Value *stackTop)
Definition: C4AulDebug.cpp:354
C4Effect * pScenarioEffects
Definition: C4ScriptHost.h:165
const char * AtRelativePath(const char *szFilename)
Definition: C4Config.cpp:656
static C4Set< C4PropListNumbered * > PropLists
Definition: C4PropList.h:236
static int32_t EnumerationIndex
Definition: C4PropList.h:238
void RecordRandom(uint32_t range, uint32_t val)
#define s
C4Effect * pGlobalEffects
Definition: C4Aul.h:144
C4PropList * getPropList() const
Definition: C4Value.h:116