diff --git a/src/ArmsItem.cpp b/src/ArmsItem.cpp index 9f049586..72e78256 100644 --- a/src/ArmsItem.cpp +++ b/src/ArmsItem.cpp @@ -363,21 +363,25 @@ int CampLoop() if (gKeyTrg & KEY_ESCAPE) { - int escRet = Call_Escape(); - if (escRet == 0) - return 0; - if (escRet == 2) - return 1; + switch (Call_Escape()) + { + case 0: + return 0; + case 2: + return 2; + } } if (g_GameFlags & 2) MoveCampCursor(); - int tscRet = TextScriptProc(); - if (tscRet == 0) - return 0; - if (tscRet == 2) - return 2; + switch (TextScriptProc()) + { + case 0: + return 0; + case 2: + return 2; + } PutBitmap4(&rcView, 0, 0, &rcView, 10); PutCampObject(); diff --git a/src/Game.cpp b/src/Game.cpp index 0402e701..f7f2f8b8 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -532,11 +532,13 @@ int ModeAction() { BackupSurface(10, &grcGame); - int campRet = CampLoop(); - if (campRet == 0) - return 0; - if (campRet == 2) - return 1; + switch (CampLoop()) + { + case 0: + return 0; + case 2: + return 1; + } gMC.cond &= ~1; } @@ -544,11 +546,13 @@ int ModeAction() { BackupSurface(10, &grcGame); - int miniRet = MiniMapLoop(); - if (miniRet == 0) - return 0; - if (miniRet == 2) - return 1; + switch (MiniMapLoop()) + { + case 0: + return 0; + case 2: + return 1; + } } } diff --git a/src/MiniMap.cpp b/src/MiniMap.cpp index ea2e9ea3..f4cc37cd 100644 --- a/src/MiniMap.cpp +++ b/src/MiniMap.cpp @@ -91,11 +91,13 @@ int MiniMapLoop() if (gKey & KEY_ESCAPE) { - int escRet = Call_Escape(); - if (escRet == 0) - return 0; - if (escRet == 2) - return 2; + switch (Call_Escape()) + { + case 0: + return 0; + case 2: + return 2; + } } PutBitmap4(&grcGame, 0, 0, &grcGame, 10); @@ -125,11 +127,13 @@ int MiniMapLoop() if (gKey & KEY_ESCAPE) { - int escRet = Call_Escape(); - if (escRet == 0) - return 0; - if (escRet == 2) - return 2; + switch (Call_Escape()) + { + case 0: + return 0; + case 2: + return 2; + } } PutBitmap4(&grcGame, 0, 0, &grcGame, 10); @@ -157,11 +161,13 @@ int MiniMapLoop() if (gKey & KEY_ESCAPE) { - int escRet = Call_Escape(); - if (escRet == 0) - return 0; - if (escRet == 2) - return 2; + switch (Call_Escape()) + { + case 0: + return 0; + case 2: + return 2; + } } PutBitmap4(&grcGame, 0, 0, &grcGame, 10);