28 #ifndef WINTERMUTE_SCENGINE_H 29 #define WINTERMUTE_SCENGINE_H 31 #include "engines/wintermute/persistent.h" 32 #include "engines/wintermute/coll_templ.h" 33 #include "engines/wintermute/base/base.h" 34 #include "engines/wintermute/platform_osystem.h" 38 #define MAX_CACHED_SCRIPTS 20 42 class BaseScriptHolder;
48 _timestamp = BasePlatform::getTime();
49 _buffer =
new byte[size];
51 memcpy(_buffer, buffer, size);
54 size_t filenameSize = strlen(filename) + 1;
55 _filename =
new char[filenameSize];
74 bool clearGlobals(
bool includingNatives =
false);
75 bool tickUnbreakable();
76 bool removeFinishedScripts();
77 bool isValidScript(
ScScript *script);
85 bool emptyScriptCache();
86 byte *getCompiledScript(
const char *filename, uint32 *outSize,
bool ignoreCache =
false);
89 int getNumScripts(
int *running =
nullptr,
int *waiting =
nullptr,
int *persistent =
nullptr);
93 bool isRunningScript(
const char *filename);
94 static const bool _compilerAvailable =
false;
98 static byte *loadFile(
void *data,
char *filename, uint32 *size);
99 static void closeFile(
void *data, byte *buffer);
100 static void parseElement(
void *data,
int line,
int type,
void *elementData);
104 void enableProfiling();
105 void disableProfiling();
110 void addScriptTime(
const char *filename, uint32 time);
117 uint32 _profilingStartTime;
120 ScriptTimes _scriptTimes;
Definition: base_game.h:79
Definition: script_value.h:42
Definition: script_engine.h:45
Definition: base_script_holder.h:37
Definition: coll_templ.h:347
void strcpy_s(char *dst, size_t size, const char *src)
Definition: script_engine.h:43
Definition: base_object.h:49
Definition: achievements_tables.h:27