HDB: Fix warnings

This commit is contained in:
Eugene Sandulenko 2019-07-13 00:51:15 +02:00
parent 812a8c7c9d
commit 24468bf630
4 changed files with 16 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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