ref: 19166f80d0a7fff5fb4b43b66217aa24d4eb2ada
parent: 31196e15ecd690ec310ca05e697d2c702fbe1092
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Jun 21 07:02:20 EDT 2019
Correct some misdecompiled switchcases
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -140,11 +140,13 @@
// Escape menu
if (gKey & KEY_ESCAPE)
{
- int escRet = Call_Escape(ghWnd);
- if (escRet == 0)
- return 0;
- if (escRet == 2)
- return 1;
+ switch (Call_Escape(ghWnd))
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
}
// Skip intro if OK is pressed
@@ -182,11 +184,13 @@
PutFade();
// Update Text Script
- int tscRet = TextScriptProc();
- if (tscRet == 0)
- return 0;
- if (tscRet == 2)
- return 1;
+ switch (TextScriptProc())
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
PutMapName(FALSE);
PutTextScript();
@@ -334,11 +338,13 @@
if (gKey & KEY_ESCAPE)
{
- int escRet = Call_Escape(ghWnd);
- if (escRet == 0)
- return 0;
- if (escRet == 2)
- return 1;
+ switch (Call_Escape(ghWnd))
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
}
// Move cursor
@@ -478,11 +484,13 @@
// Escape menu
if (gKey & KEY_ESCAPE)
{
- int escRet = Call_Escape(ghWnd);
- if (escRet == 0)
- return 0;
- if (escRet == 2)
- return 1;
+ switch (Call_Escape(ghWnd))
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
}
if (swPlay % 2 && g_GameFlags & 1)
@@ -586,11 +594,13 @@
if (swPlay % 2)
{
- int tscRet = TextScriptProc();
- if (tscRet == 0)
- return 0;
- if (tscRet == 2)
- return 1;
+ switch (TextScriptProc())
+ {
+ case 0:
+ return 0;
+ case 2:
+ return 1;
+ }
}
PutMapName(FALSE);