2016-05-29 10:16:15 -04:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Script : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Script();
|
2016-08-15 10:40:30 -04:00
|
|
|
~Script();
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2016-05-29 10:16:15 -04:00
|
|
|
const char* GetName() { return "Script"; };
|
2016-08-15 10:40:30 -04:00
|
|
|
#endif
|
2016-05-29 10:16:15 -04:00
|
|
|
|
|
|
|
static int LoadScriptAndLabel(std::string script, std::string label);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static std::string ScriptName;
|
|
|
|
static std::vector<int> ScriptHandles;
|
|
|
|
static std::vector<std::string> ScriptNameStack;
|
|
|
|
static unsigned short FunctionName;
|
|
|
|
|
2016-06-04 08:25:55 -04:00
|
|
|
static void CompileError(unsigned int offset, const char* message, ...);
|
|
|
|
static void PrintSourcePos(const char* filename, unsigned int offset);
|
2016-05-29 10:16:15 -04:00
|
|
|
|
|
|
|
static void FunctionError();
|
|
|
|
static void StoreFunctionNameStub();
|
|
|
|
|
|
|
|
static void StoreScriptName(const char* name);
|
|
|
|
static void StoreScriptNameStub();
|
|
|
|
|
|
|
|
static void RestoreScriptName();
|
|
|
|
static void RestoreScriptNameStub();
|
|
|
|
|
|
|
|
static void LoadGameType();
|
|
|
|
static void LoadGameTypeScript();
|
|
|
|
};
|
|
|
|
}
|