aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge
diff options
context:
space:
mode:
authorFilippos Karapetis2019-05-27 14:45:13 +0300
committerFilippos Karapetis2019-05-27 14:53:43 +0300
commitf4e8eed13d7da5bcd87db7424358bf0d8759208f (patch)
tree8d1027565f453c6c14fe5f82abff449ead741c7c /engines/sludge
parent174721e911497ab232915da5ebed7c5d5f2b86ba (diff)
downloadscummvm-rg350-f4e8eed13d7da5bcd87db7424358bf0d8759208f.tar.gz
scummvm-rg350-f4e8eed13d7da5bcd87db7424358bf0d8759208f.tar.bz2
scummvm-rg350-f4e8eed13d7da5bcd87db7424358bf0d8759208f.zip
SLUDGE: Fix MSVC warnings
- Fix invalid check with empty() - Change float suffixes to uppercase - Fix potentially uninitialized variables
Diffstat (limited to 'engines/sludge')
-rw-r--r--engines/sludge/fonttext.cpp2
-rw-r--r--engines/sludge/movie.cpp2
-rw-r--r--engines/sludge/people.cpp2
-rw-r--r--engines/sludge/sprites.cpp8
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/sludge/fonttext.cpp b/engines/sludge/fonttext.cpp
index da380f4f0b..6163c445ac 100644
--- a/engines/sludge/fonttext.cpp
+++ b/engines/sludge/fonttext.cpp
@@ -175,7 +175,7 @@ bool TextManager::loadFont(int filenum, const Common::String &charOrder, int h)
// load & save
void TextManager::saveFont(Common::WriteStream *stream) {
stream->writeByte(!_fontTable.empty());
- if (!_fontTable.empty() > 0) {
+ if (!_fontTable.empty()) {
stream->writeUint16BE(_loadedFontNum);
stream->writeUint16BE(_fontHeight);
writeString(_fontOrder.getUTF8String(), stream);
diff --git a/engines/sludge/movie.cpp b/engines/sludge/movie.cpp
index 2c43c3cceb..4fc2beeb42 100644
--- a/engines/sludge/movie.cpp
+++ b/engines/sludge/movie.cpp
@@ -38,7 +38,7 @@ MovieStates movieIsPlaying = nothing;
int movieIsEnding = 0;
-float movieAspect = 1.6;
+float movieAspect = 1.6F;
#if 0
typedef struct audioBuffers {
char *buffer;
diff --git a/engines/sludge/people.cpp b/engines/sludge/people.cpp
index 433ab2d895..2d293194da 100644
--- a/engines/sludge/people.cpp
+++ b/engines/sludge/people.cpp
@@ -66,7 +66,7 @@ PersonaAnimation::PersonaAnimation(int num, VariableStack *&stacky) {
theSprites = nullptr;
numFrames = num;
frames = new AnimFrame[num];
- int a = num, frameNum, howMany;
+ int a = num, frameNum = 0, howMany = 0;
while (a) {
a--;
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index 49c27dbed8..a7f82de0a8 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -384,11 +384,11 @@ Graphics::Surface *GraphicsManager::applyLightmapToSprite(Graphics::Surface *&bl
// calculate light map color
float fr, fg, fb;
- fr = fg = fb = 0.f;
+ fr = fg = fb = 0.0F;
if (thisPerson->colourmix) {
- fr = curLight[0]*thisPerson->r * thisPerson->colourmix / 65025 / 255.f;
- fg = curLight[1]*thisPerson->g * thisPerson->colourmix / 65025 / 255.f;
- fb = curLight[2]*thisPerson->b * thisPerson->colourmix / 65025 / 255.f;
+ fr = curLight[0]*thisPerson->r * thisPerson->colourmix / 65025 / 255.0F;
+ fg = curLight[1]*thisPerson->g * thisPerson->colourmix / 65025 / 255.0F;
+ fb = curLight[2]*thisPerson->b * thisPerson->colourmix / 65025 / 255.0F;
}
uint32 primaryColor = TS_ARGB((uint8)(255 - thisPerson->transparency),