aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/moonbase/ai_main.cpp
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/scumm/he/moonbase/ai_main.cpp
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/scumm/he/moonbase/ai_main.cpp')
-rw-r--r--engines/scumm/he/moonbase/ai_main.cpp14
1 files changed, 9 insertions, 5 deletions
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) {