diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-05-29 21:05:33 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-05-29 21:05:33 +0200 |
commit | 529cec565380b3c6689641ea427a1bf973014e02 (patch) | |
tree | 6caafab9dece0f1233f7ac9899d57b83ff421cce /src/control | |
parent | Merge pull request #603 from Fire-Head/miami (diff) | |
download | re3-529cec565380b3c6689641ea427a1bf973014e02.tar re3-529cec565380b3c6689641ea427a1bf973014e02.tar.gz re3-529cec565380b3c6689641ea427a1bf973014e02.tar.bz2 re3-529cec565380b3c6689641ea427a1bf973014e02.tar.lz re3-529cec565380b3c6689641ea427a1bf973014e02.tar.xz re3-529cec565380b3c6689641ea427a1bf973014e02.tar.zst re3-529cec565380b3c6689641ea427a1bf973014e02.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Script.cpp | 11 | ||||
-rw-r--r-- | src/control/Script.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index b9ce5073..d696c090 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1,4 +1,3 @@ -#define WITHWINDOWS // for our script loading hack #include "common.h" #include "Script.h" @@ -599,13 +598,15 @@ void CRunningScript::Init() } #ifdef USE_DEBUG_SCRIPT_LOADER +int scriptToLoad = 0; +const char *scriptfile = "main.scm"; -const char* scriptfile = "main.scm"; - +#ifdef _WIN32 +#include <Windows.h> +#endif int open_script() { - static int scriptToLoad = 1; - + // glfwGetKey doesn't work because of CGame::Initialise is blocking #ifdef _WIN32 if (GetAsyncKeyState('G') & 0x8000) scriptToLoad = 0; diff --git a/src/control/Script.h b/src/control/Script.h index 57b997b1..68d1dc7b 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -520,3 +520,7 @@ private: static bool ThisIsAValidRandomCop(int32 mi, bool cop, bool swat, bool fbi, bool army, bool miami); }; + +#ifdef USE_DEBUG_SCRIPT_LOADER +extern int scriptToLoad; +#endif
\ No newline at end of file |