Remove HandleScriptMessage and associated globals - apparently this is no longer supposed to be here.

This commit is contained in:
hispidence 2021-08-02 12:49:17 +01:00
parent f6d1ae0bda
commit 498873bc65
2 changed files with 0 additions and 66 deletions

View file

@ -186,32 +186,11 @@ extern bool BlockAllInput;
extern int skipLoop; extern int skipLoop;
extern int skipFrames; extern int skipFrames;
extern int lockInput; extern int lockInput;
extern int newSkipLoop;
extern int newSkipFrames;
extern int newLockInput;
extern bool newSkipFramesValue;
extern bool newSkipLoopValue;
extern bool newLockInputValue;
GAME_STATUS ControlPhase(int numFrames, int demoMode) GAME_STATUS ControlPhase(int numFrames, int demoMode)
{ {
g_GameScript->OnControlPhase(); g_GameScript->OnControlPhase();
short oldLaraFrame; short oldLaraFrame;
if (newSkipFramesValue)
{
skipFrames = newSkipFrames;
newSkipFramesValue = false;
}
if (newSkipLoopValue)
{
skipLoop = newSkipLoop;
newSkipLoopValue = false;
}
if (newLockInputValue)
{
lockInput = newLockInput;
newLockInputValue = false;
}
GameScriptLevel* level = g_GameFlow->GetLevel(CurrentLevel); GameScriptLevel* level = g_GameFlow->GetLevel(CurrentLevel);

View file

@ -39,12 +39,6 @@ bool BlockAllInput = true;
int skipLoop = -1; int skipLoop = -1;
int skipFrames = 2; int skipFrames = 2;
int lockInput = 0; int lockInput = 0;
int newSkipLoop = -1;
int newSkipFrames = 2;
int newLockInput = 0;
bool newSkipFramesValue = false;
bool newSkipLoopValue = false;
bool newLockInputValue = false;
#if _DEBUG #if _DEBUG
string commit; string commit;
@ -95,45 +89,6 @@ void CALLBACK HandleWmCommand(unsigned short wParam)
} }
} }
void HandleScriptMessage(WPARAM wParam)
{
string ErrorMessage;
string message = *(string*)(wParam);
bool status = false;
//check whether line starts with "lua "
if (message.find("lua ") == 0) {
string scriptSubstring = message.substr(4);
status = g_GameScript->ExecuteScript(scriptSubstring, ErrorMessage);
}
else {
if (message.find("SL=") == 0)
{
string scriptSubstring = message.substr(3);
newSkipLoop = stoi(scriptSubstring);
newSkipLoopValue = true;
}
else if (message.find("SF=") == 0)
{
string scriptSubstring = message.substr(3);
newSkipFrames = stoi(scriptSubstring);
newSkipFramesValue = true;
}
else if (message.find("LI=") == 0)
{
string scriptSubstring = message.substr(3);
newLockInput = stoi(scriptSubstring);
newLockInputValue = true;
}
else
{
status = g_GameScript->ExecuteString(message, ErrorMessage);
}
}
if (!status)
cout << ErrorMessage << endl;
}
LRESULT CALLBACK WinAppProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK WinAppProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
// Disables ALT + SPACE // Disables ALT + SPACE