Open source Star Ruler 2 source code!

This commit is contained in:
Lucas de Vries
2018-07-17 14:15:37 +02:00
commit cc307720ff
4342 changed files with 2365070 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include "angelscript.h"
#include "threads.h"
#include <string>
#include <vector>
#include <stack>
#include <map>
//Logs every line that triggers a line callback
//#define LOG_EXECUTION
//Samples all execution randomly, recording results
// The define also specifies how often to check for an executed line (higher is less often)
//#define PROFILE_EXECUTION 25
#if defined(LOG_EXECUTION) || defined(PROFILE_EXECUTION)
#define DO_LINE_CALLBACK
#endif
namespace scripts {
void initContextCache();
void resetContextCache(bool resetMenu = false);
void freeContextCache();
asIScriptContext* makeContext(asIScriptEngine* engine);
asIScriptContext* fetchContext(asIScriptEngine* engine);
std::string getStackVariables(asIScriptContext* context, unsigned frame = 0);
std::string getStackTrace(asIScriptContext* context, bool verbose = false);
std::string getScriptVariable(void *value, asUINT typeId, bool expandMembers, asIScriptEngine *engine);
void logException();
};