aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-13 00:51:15 +0200
committerEugene Sandulenko2019-09-03 17:17:18 +0200
commit24468bf630dbefb17d72211e5a8cbc67730dcd24 (patch)
treefb41e53345fd299bdf17810699ae82aec2904c0b
parent812a8c7c9dd7cf7d330580594c3c256224fcd429 (diff)
downloadscummvm-rg350-24468bf630dbefb17d72211e5a8cbc67730dcd24.tar.gz
scummvm-rg350-24468bf630dbefb17d72211e5a8cbc67730dcd24.tar.bz2
scummvm-rg350-24468bf630dbefb17d72211e5a8cbc67730dcd24.zip
HDB: Fix warnings
-rw-r--r--engines/hdb/gfx.cpp5
-rw-r--r--engines/hdb/gfx.h2
-rw-r--r--engines/hdb/menu.cpp13
-rw-r--r--engines/hdb/menu.h10
4 files changed, 16 insertions, 14 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 9ba60400a9..999cf3e7cb 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -625,6 +625,9 @@ void Gfx::drawSky() {
}
}
+static const int snowXVList[13] = {0, -1, -1, -2, -2, -1, 0, 0, 0, -1, -2, -1, 0};
+
+
void Gfx::drawSnow() {
int i;
if (_snowInfo.active == false)
@@ -632,7 +635,7 @@ void Gfx::drawSnow() {
for (i = 0; i < MAX_SNOW; i++) {
_snowflake->drawMasked((int)_snowInfo.x[i], (int)_snowInfo.y[i]);
- _snowInfo.x[i] += _snowXVList[_snowInfo.xvindex[i]++];
+ _snowInfo.x[i] += snowXVList[_snowInfo.xvindex[i]++];
_snowInfo.y[i] += _snowInfo.yv[i];
if (_snowInfo.xvindex[i] == MAX_SNOW_XV)
_snowInfo.xvindex[i] = 0;
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index 28ebcbafec..371174b113 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -195,8 +195,6 @@ private:
int xvindex[MAX_SNOW];
} _snowInfo;
- int _snowXVList[13] = {0, -1, -1, -2, -2, -1, 0, 0, 0, -1, -2, -1, 0};
-
struct {
int x, y, speed;
uint16 color;
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index 11c8817c84..2c524fc21f 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -153,6 +153,17 @@ void Menu::writeConfig() {
ConfMan.set(CONFIG_CHEAT, "1");
}
+static const char nebulaNames[kNebulaCount][32] = {
+ BACKSCROLL_PLANET1,
+ BACKSCROLL_PLANET2,
+ BACKSCROLL_PLANET3,
+ BACKSCROLL_PLANET4,
+ BACKSCROLL_PLANET5,
+ BACKSCROLL_GALAXY1,
+ BACKSCROLL_GALAXY2
+};
+
+
void Menu::startMenu() {
int i;
@@ -1183,7 +1194,7 @@ void Menu::processInput(int x, int y) {
int xit = getMenuKey();
- if (y >= kMenuExitY && x < kMenuExitXLeft || xit) {
+ if ((y >= kMenuExitY && x < kMenuExitXLeft) || xit) {
_menuActive = true;
_warpActive = false;
g_hdb->_sound->playSound(SND_MENU_BACKOUT);
diff --git a/engines/hdb/menu.h b/engines/hdb/menu.h
index 59650b6451..0a0cb0d0cd 100644
--- a/engines/hdb/menu.h
+++ b/engines/hdb/menu.h
@@ -229,16 +229,6 @@ public:
Star _fStars[kMaxStars];
- char nebulaNames[kNebulaCount][32] = {
- BACKSCROLL_PLANET1,
- BACKSCROLL_PLANET2,
- BACKSCROLL_PLANET3,
- BACKSCROLL_PLANET4,
- BACKSCROLL_PLANET5,
- BACKSCROLL_GALAXY1,
- BACKSCROLL_GALAXY2
- };
-
int _menuKey;
};