diff options
Diffstat (limited to 'engines/hopkins/hopkins.cpp')
-rw-r--r-- | engines/hopkins/hopkins.cpp | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 96131f2968..9940391f64 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -166,7 +166,7 @@ bool HopkinsEngine::runWin95Demo() { _globals->_characterType = CHARACTER_HOPKINS; _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; - memset(_globals->_saveData, 0, 2000); + memset(_globals->_saveData, 0, sizeof(Savegame)); _globals->_exitId = 0; if (getLanguage() != Common::PL_POL) @@ -210,12 +210,17 @@ bool HopkinsEngine::runWin95Demo() { if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) _graphicsMan->loadImage("fond"); else { - if (_globals->_language == LANG_FR) + switch (_globals->_language) { + case LANG_FR: _graphicsMan->loadImage("fondfr"); - else if (_globals->_language == LANG_EN) + break; + case LANG_EN: _graphicsMan->loadImage("fondan"); - else if (_globals->_language == LANG_SP) + break; + case LANG_SP: _graphicsMan->loadImage("fondes"); + break; + } } _graphicsMan->fadeInLong(); _events->delay(500); @@ -227,7 +232,7 @@ bool HopkinsEngine::runWin95Demo() { if (!_globals->_censorshipFl) _animMan->playAnim("BANQUE.ANM", "BANKUK.ANM", 200, 28, 200); else - _animMan->playAnim("BANQUE.ANM", "BANKUK.ANM", 200, 28, 200); + _animMan->playAnim("BANKUK.ANM", "BANQUE.ANM", 200, 28, 200); _soundMan->_specialSoundNum = 0; _soundMan->removeSample(1); _soundMan->removeSample(2); @@ -465,7 +470,7 @@ bool HopkinsEngine::runLinuxDemo() { _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = CHARACTER_HOPKINS; _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; - memset(_globals->_saveData, 0, 2000); + memset(_globals->_saveData, 0, sizeof(Savegame)); _globals->_exitId = 0; if (_startGameSlot != -1) @@ -521,12 +526,17 @@ bool HopkinsEngine::runLinuxDemo() { if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) _graphicsMan->loadImage("fond"); else { - if (_globals->_language == LANG_FR) + switch (_globals->_language) { + case LANG_FR: _graphicsMan->loadImage("fondfr"); - else if (_globals->_language == LANG_EN) + break; + case LANG_EN: _graphicsMan->loadImage("fondan"); - else if (_globals->_language == LANG_SP) + break; + case LANG_SP: _graphicsMan->loadImage("fondes"); + break; + } } _graphicsMan->fadeInLong(); _events->delay(500); @@ -826,7 +836,7 @@ bool HopkinsEngine::runFull() { _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR"); _globals->_characterType = CHARACTER_HOPKINS; _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0; - memset(_globals->_saveData, 0, 2000); + memset(_globals->_saveData, 0, sizeof(Savegame)); _globals->_exitId = 0; @@ -867,12 +877,17 @@ bool HopkinsEngine::runFull() { if (getPlatform() == Common::kPlatformOS2 || getPlatform() == Common::kPlatformBeOS) _graphicsMan->loadImage("fond"); else { - if (_globals->_language == LANG_FR) + switch (_globals->_language) { + case LANG_FR: _graphicsMan->loadImage("fondfr"); - else if (_globals->_language == LANG_EN) + break; + case LANG_EN: _graphicsMan->loadImage("fondan"); - else if (_globals->_language == LANG_SP) + break; + case LANG_SP: _graphicsMan->loadImage("fondes"); + break; + } } _graphicsMan->fadeInLong(); _events->delay(500); @@ -1908,7 +1923,6 @@ void HopkinsEngine::bombExplosion() { } void HopkinsEngine::restoreSystem() { - quitGame(); _events->refreshEvents(); } @@ -2846,7 +2860,6 @@ void HopkinsEngine::syncSoundSettings() { } bool HopkinsEngine::displayAdultDisclaimer() { - int xp, yp; int buttonIndex; _graphicsMan->_minX = 0; @@ -2866,8 +2879,8 @@ bool HopkinsEngine::displayAdultDisclaimer() { _events->_mouseSpriteId = 0; do { - xp = _events->getMouseX(); - yp = _events->getMouseY(); + int xp = _events->getMouseX(); + int yp = _events->getMouseY(); buttonIndex = 0; if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445) |