aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek
diff options
context:
space:
mode:
authorD G Turner2018-08-09 19:02:00 +0100
committerD G Turner2018-08-09 19:02:00 +0100
commit86c6e3f4604c0932ed450f0c349383bc2f375dea (patch)
tree936468cc967caacad18debb306facae6c08a11d4 /engines/startrek
parentcb55775f608aae8df8b27ca73d8a54c539dae7f2 (diff)
downloadscummvm-rg350-86c6e3f4604c0932ed450f0c349383bc2f375dea.tar.gz
scummvm-rg350-86c6e3f4604c0932ed450f0c349383bc2f375dea.tar.bz2
scummvm-rg350-86c6e3f4604c0932ed450f0c349383bc2f375dea.zip
STARTREK: Fix Various Compiler Warnings.
Diffstat (limited to 'engines/startrek')
-rw-r--r--engines/startrek/actors.cpp6
-rw-r--r--engines/startrek/graphics.cpp8
-rw-r--r--engines/startrek/graphics.h4
-rw-r--r--engines/startrek/intro.cpp2
-rw-r--r--engines/startrek/rooms/demon1.cpp2
-rw-r--r--engines/startrek/space.cpp18
6 files changed, 23 insertions, 17 deletions
diff --git a/engines/startrek/actors.cpp b/engines/startrek/actors.cpp
index 04c2a175c4..9f16f0f8ec 100644
--- a/engines/startrek/actors.cpp
+++ b/engines/startrek/actors.cpp
@@ -744,6 +744,12 @@ SharedPtr<Bitmap> StarTrekEngine::loadAnimationFrame(const Common::String &filen
case 's': // Spock
colorShift = 0;
break;
+ case 'm': // McCoy
+ colorShift = 0;
+ break;
+ default:
+ colorShift = 0;
+ break;
}
if (colorShift == 0) {
diff --git a/engines/startrek/graphics.cpp b/engines/startrek/graphics.cpp
index 023ca99b57..d2e626bc4e 100644
--- a/engines/startrek/graphics.cpp
+++ b/engines/startrek/graphics.cpp
@@ -460,7 +460,7 @@ bool compareSpritesByLayer(Sprite *s1, Sprite *s2) {
return s1->pos.x < s2->pos.x;
}
-void Graphics::drawAllSprites(bool updateScreen) {
+void Graphics::drawAllSprites(bool updateScreenFlag) {
// TODO: different video modes?
if (_numSprites != 0) {
@@ -584,7 +584,7 @@ void Graphics::drawAllSprites(bool updateScreen) {
surface.free();
}
- if (updateScreen)
+ if (updateScreenFlag)
this->updateScreen();
}
@@ -603,10 +603,10 @@ void Graphics::drawAllSpritesInRectToSurface(const Common::Rect &rect, ::Graphic
}
}
-void Graphics::forceDrawAllSprites(bool updateScreen) {
+void Graphics::forceDrawAllSprites(bool updateScreenFlag) {
for (int i = 0; i < _numSprites; i++)
_sprites[i]->bitmapChanged = true;
- drawAllSprites(updateScreen);
+ drawAllSprites(updateScreenFlag);
}
void Graphics::updateScreen() {
diff --git a/engines/startrek/graphics.h b/engines/startrek/graphics.h
index 8ba46f2d66..c0d7d272cf 100644
--- a/engines/startrek/graphics.h
+++ b/engines/startrek/graphics.h
@@ -115,7 +115,7 @@ public:
@ @param rectTop Y-offset to subtract before drawing to surface.
*/
void drawSprite(const Sprite &sprite, ::Graphics::Surface *surface, const Common::Rect &rect, int rectLeft = 0, int rectTop = 0);
- void drawAllSprites(bool updateScreen = true);
+ void drawAllSprites(bool updateScreenFlag = true);
/**
* This function should only be called after "drawAllSprites" (so that sprite rects
* are updated).
@@ -124,7 +124,7 @@ public:
/**
* Sets "bitmapChanged" to true on all sprites before calling drawAllSprites.
*/
- void forceDrawAllSprites(bool updateScreen = true);
+ void forceDrawAllSprites(bool updateScreenFlag = true);
/**
* Flushes the screen. Usually called by "drawAllSprites".
*/
diff --git a/engines/startrek/intro.cpp b/engines/startrek/intro.cpp
index 7ba865a378..745b8fefc3 100644
--- a/engines/startrek/intro.cpp
+++ b/engines/startrek/intro.cpp
@@ -104,7 +104,7 @@ void StarTrekEngine::playIntro() {
_sound->loadMusicFile("title");
clockTicks = _clockTicks;
- int32 starfieldZoomSpeed;
+ int32 starfieldZoomSpeed = 0;
int16 frame = 0;
bool buttonPressed = false;
diff --git a/engines/startrek/rooms/demon1.cpp b/engines/startrek/rooms/demon1.cpp
index 92882abf4b..a33673c9fe 100644
--- a/engines/startrek/rooms/demon1.cpp
+++ b/engines/startrek/rooms/demon1.cpp
@@ -174,7 +174,7 @@ void Room::demon1KlingonFinishedAimingWeapon() {
playSoundEffectIndex(0x06);
_roomVar.demon.attackIndex++;
- int crewman;
+ int crewman = OBJECT_REDSHIRT;
if (_roomVar.demon.attackIndex == 1) {
loadActorAnim2(OBJECT_REDSHIRT, "rstunn", -1, -1, 0);
crewman = OBJECT_REDSHIRT;
diff --git a/engines/startrek/space.cpp b/engines/startrek/space.cpp
index 60c37c89db..6d2c469aec 100644
--- a/engines/startrek/space.cpp
+++ b/engines/startrek/space.cpp
@@ -238,14 +238,14 @@ void StarTrekEngine::drawR3Shape(R3 *r3) {
double dbl68 = ((double)r3->field24 * _starfieldPointDivisor) / r3->field36.z;
double dbl70 = 1.0 / dbl68;
- double dbl30;
- double dbl28;
- double dbl20;
- double dbl18;
- double dbl60;
- double dbl58;
- double dbl50;
- double dbl48;
+ double dbl30 = 1.0;
+ double dbl28 = 0.0;
+ double dbl20 = 0.0;
+ double dbl18 = 1.0;
+ double dbl60 = 1.0;
+ double dbl58 = 0.0;
+ double dbl50 = 0.0;
+ double dbl48 = 0.0;
switch (r3->field1e) {
case 1: // TODO
@@ -392,7 +392,7 @@ void StarTrekEngine::drawR3Shape(R3 *r3) {
debug("Top: %d, Bot: %d", shpImageTop, shpImageBottom);
if (shpImageTop <= shpImageBottom) {
- bool var3fa;
+ bool var3fa = false;
if (r3->field1e == 2) {
// TODO
} else