SCUMM: Fix MSVC warnings

- Change float suffix to uppercase
- Initialize potentially uninitialized variables
- Fix default cases in switch statements
This commit is contained in:
Filippos Karapetis 2019-05-27 14:43:13 +03:00
parent 9da3d22703
commit 174721e911
2 changed files with 10 additions and 6 deletions

View file

@ -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;
}

View file

@ -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) {