diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index 9c7aea4c476..ec6403a9552 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -948,8 +948,8 @@ bool AI::init() { _useSwitchOn = g_hdb->_gfx->getTileIndex("t32_switch_on"); _useSwitch2Off = g_hdb->_gfx->getTileIndex("anim_t32_1switch_off01"); _useSwitch2On = g_hdb->_gfx->getTileIndex("t32_1switch_on"); -// _useHandswitchOn = g_hdb->_gfx->getTileIndex("t32_ship_handswitch_on"); -// _useHandswitchOff = g_hdb->_gfx->getTileIndex("anim_t32_ship_handswitch_off1"); + _useHandswitchOn = g_hdb->_gfx->getTileIndex("t32_ship_handswitch_on"); + _useHandswitchOff = g_hdb->_gfx->getTileIndex("anim_t32_ship_handswitch_off1"); _useHolderEmpty = g_hdb->_gfx->getTileIndex("anim_t32_holder_empty1"); _useHolderFull = g_hdb->_gfx->getTileIndex("t32_holder_full"); _useMailsorter = g_hdb->_gfx->getTileIndex("anim_t32_mailsort1"); diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 8b2ac3dc62b..b497b53b051 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -34,8 +34,11 @@ Gfx::Gfx() { _cosines = new Common::CosineTable(360); _systemInit = false; + _numTiles = 0; + memset(&_fadeInfo, 0, sizeof(_fadeInfo)); memset(&_snowInfo, 0, sizeof(_snowInfo)); + memset(&_skyTiles, 0, sizeof(_skyTiles)); } Gfx::~Gfx() { @@ -574,7 +577,7 @@ int Gfx::isSky(int index) { } for (int i = 0; i < kMaxSkies; i++) { - if(_skyTiles[i] == index) { + if (_skyTiles[i] == index) { return i + 1; // The skyTiles are indexed from 1. 0 => No Sky tile } } diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index 195b673e31a..a17b0db1f18 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -1169,7 +1169,7 @@ bool Map::checkXYOnScreen(int x, int y) { } bool Map::checkOneTileExistInRange(int tileIndex, int count) { - for (int i = 0; i < _width*_height; i++) { + for (int i = 0; i < _width * _height; i++) { if (_background[i] >= tileIndex && _background[i] < tileIndex + count) return true; if (_foreground[i] >= tileIndex && _foreground[i] < tileIndex + count)