aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel.h
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-10 22:21:29 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-10 22:21:29 +0100
commit0a9a44ce15bb772b3193fbee481768e7327db1a9 (patch)
tree855b235161de35ade7d86ce2d847483aa46b31e4 /NorthstarDLL/squirrel.h
parent2ae34b67e36b8ba05132d481876eb4ed7a826283 (diff)
downloadNorthstarLauncher-0a9a44ce15bb772b3193fbee481768e7327db1a9.tar.gz
NorthstarLauncher-0a9a44ce15bb772b3193fbee481768e7327db1a9.zip
completely remove old hooking
Diffstat (limited to 'NorthstarDLL/squirrel.h')
-rw-r--r--NorthstarDLL/squirrel.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/NorthstarDLL/squirrel.h b/NorthstarDLL/squirrel.h
index a32ad5a9..d5c39827 100644
--- a/NorthstarDLL/squirrel.h
+++ b/NorthstarDLL/squirrel.h
@@ -14,6 +14,12 @@ enum SQRESULT : SQInteger
SQRESULT_NOTNULL = 1,
};
+const std::map<SQRESULT, const char*> PrintSQRESULT = {
+ {SQRESULT_ERROR, "SQRESULT_ERROR"},
+ {SQRESULT_NULL, "SQRESULT_NULL"},
+ {SQRESULT_NOTNULL, "SQRESULT_NOTNULL"}
+};
+
typedef SQRESULT (*SQFunction)(void* sqvm);
struct CompileBufferState
@@ -158,12 +164,13 @@ template <ScriptContext context> class SquirrelManager
CompileBufferState bufferState = CompileBufferState(strCode);
SQRESULT compileResult = compilebuffer(&bufferState, "console");
- spdlog::info("sq_compilebuffer returned {}", compileResult);
+ spdlog::info("sq_compilebuffer returned {}", PrintSQRESULT.at(compileResult));
+
if (compileResult != SQRESULT_ERROR)
{
pushroottable(sqvm2);
SQRESULT callResult = call(sqvm2, 0);
- spdlog::info("sq_call returned {}", callResult);
+ spdlog::info("sq_call returned {}", PrintSQRESULT.at(callResult));
}
}