aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2019-05-27 14:43:13 +0300
committerFilippos Karapetis2019-05-27 14:53:42 +0300
commit174721e911497ab232915da5ebed7c5d5f2b86ba (patch)
tree2b9ebfb8fa7f0b52e444469327ba8393f7963e47 /engines
parent9da3d22703a0dc230d505e9839c3e33cc313b403 (diff)
downloadscummvm-rg350-174721e911497ab232915da5ebed7c5d5f2b86ba.tar.gz
scummvm-rg350-174721e911497ab232915da5ebed7c5d5f2b86ba.tar.bz2
scummvm-rg350-174721e911497ab232915da5ebed7c5d5f2b86ba.zip
SCUMM: Fix MSVC warnings
- Change float suffix to uppercase - Initialize potentially uninitialized variables - Fix default cases in switch statements
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/logic/soccer.cpp2
-rw-r--r--engines/scumm/he/moonbase/ai_main.cpp14
2 files changed, 10 insertions, 6 deletions
diff --git a/engines/scumm/he/logic/soccer.cpp b/engines/scumm/he/logic/soccer.cpp
index 0efe482b5a..e01363c1f2 100644
--- a/engines/scumm/he/logic/soccer.cpp
+++ b/engines/scumm/he/logic/soccer.cpp
@@ -200,7 +200,7 @@ int LogicHEsoccer::op_1005(float x1, float y1, float z1, float x2, float y2, flo
*nextVelX = x2 - 2 * dot * x1;
*nextVelY = y2 - 2 * dot * y1;
*nextVelZ = z2 - 2 * dot * z1;
- *a10 = 1.0f; // It always does this. How curious!
+ *a10 = 1.0F; // It always does this. How curious!
return 1;
}
diff --git a/engines/scumm/he/moonbase/ai_main.cpp b/engines/scumm/he/moonbase/ai_main.cpp
index c5c1f6a8e4..d6ab54c99d 100644
--- a/engines/scumm/he/moonbase/ai_main.cpp
+++ b/engines/scumm/he/moonbase/ai_main.cpp
@@ -491,6 +491,9 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
case -1:
_aiState = STATE_LAUNCH;
break;
+
+ default:
+ break;
}
delete myTree;
@@ -778,8 +781,8 @@ int AI::masterControlProgram(const int paramCount, const int32 *params) {
}
if ((lastSource[currentPlayer] == launchAction[LAUNCH_SOURCE_HUB]) && (lastAngle[currentPlayer] == launchAction[LAUNCH_ANGLE]) && (lastPower[currentPlayer] == launchAction[LAUNCH_POWER])) {
- randomAttenuation -= .2f;
- randomAttenuation = MAX(randomAttenuation, 0.0f);
+ randomAttenuation -= .2F;
+ randomAttenuation = MAX(randomAttenuation, 0.0F);
debugC(DEBUG_MOONBASE_AI, "Attenuating...");
} else {
randomAttenuation = 1;
@@ -1643,7 +1646,7 @@ int AI::chooseTarget(int behavior) {
int returnBuilding = 0;
int savedTally = 0;
- int savedDamage;
+ int savedDamage = 0;
float savedNumDefenses = 0;
int savedWorth = 0;
@@ -2756,9 +2759,10 @@ int AI::energyPoolSize(int pool) {
case 63:
return 60;
+
+ default:
+ return 0;
}
-
- return 0;
}
int AI::getMaxCollectors(int pool) {