diff options
author | Strangerke | 2011-08-27 14:05:04 +0200 |
---|---|---|
committer | Strangerke | 2011-08-27 14:05:04 +0200 |
commit | 4d059c0e62f6d1c2a78963a55e86d74a89373a56 (patch) | |
tree | 255abe70897a647ac37005b877cb48fdc1ab1d0c | |
parent | a8ad211c3663130c151b7a5cad8f9fc550226449 (diff) | |
download | scummvm-rg350-4d059c0e62f6d1c2a78963a55e86d74a89373a56.tar.gz scummvm-rg350-4d059c0e62f6d1c2a78963a55e86d74a89373a56.tar.bz2 scummvm-rg350-4d059c0e62f6d1c2a78963a55e86d74a89373a56.zip |
CGE: Remove user first name input, used originally for savegame names
-rw-r--r-- | engines/cge/cge.h | 2 | ||||
-rw-r--r-- | engines/cge/cge_main.cpp | 60 |
2 files changed, 9 insertions, 53 deletions
diff --git a/engines/cge/cge.h b/engines/cge/cge.h index fbb096df07..f4260dc31a 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -124,7 +124,6 @@ public: bool _game; int _now; int _lev; - char _usrFnam[15]; int _mode; int _soundOk; int _gameCase2Cpt; @@ -169,7 +168,6 @@ public: void runGame(); bool showTitle(const char *name); void movie(const char *ext); - void takeName(); void inf(const char *text); void selectSound(); void dummy() {} diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 2d83dce040..5df7ab193e 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -188,10 +188,6 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) { // Delete the thumbnail saveHeader.thumbnail->free(); delete saveHeader.thumbnail; - - // If we're loading the auto-save slot, load the name - if (slotNumber == 0) - strncpy(_usrFnam, saveHeader.saveName.c_str(), 8); } // Get in the savegame @@ -656,7 +652,7 @@ void CGEEngine::qGame() { saveSound(); // Write out the user's progress - saveGame(0, _usrFnam); + saveGame(0, ""); _vga->sunset(); _finis = true; @@ -851,24 +847,6 @@ void CGEEngine::startCountDown() { switchCave(-1); } -void CGEEngine::takeName() { - debugC(1, kCGEDebugEngine, "CGEEngine::takeName()"); - - if (GetText::_ptr) { - _snail_->addCom(kSnKill, -1, 0, GetText::_ptr); - } else { - memset(_usrFnam, 0, 15); - GetText *tn = new GetText(this, _text->getText(kGetNamePrompt), _usrFnam, 8); - if (tn) { - tn->setName(_text->getText(kGetNameTitle)); - tn->center(); - tn->gotoxy(tn->_x, tn->_y - 10); - tn->_z = 126; - _vga->_showQ->insert(tn); - } - } -} - void CGEEngine::switchMapping() { assert(_horzLine); debugC(1, kCGEDebugEngine, "CGEEngine::switchMapping()"); @@ -1487,41 +1465,23 @@ bool CGEEngine::showTitle(const char *name) { _midiPlayer.loadMidi(0); } - bool userOk = false; if (_mode < 2) { - if (_isDemo) { - strcpy(_usrFnam, progName(kSvgExt)); - userOk = true; - } else { -#ifndef EVA + if (!_isDemo) { // At this point the game originally set the protection variables // used by the copy protection check movie("X00"); // paylist _vga->copyPage(1, 2); _vga->copyPage(0, 1); _vga->_showQ->append(_mouse); - //Mouse.On(); - - // For ScummVM, skip prompting for name if a savegame in slot 0 already exists - if ((_startGameSlot == -1) && savegameExists(0)) { - strcpy(_usrFnam, "User"); - userOk = true; - } else { - for (takeName(); GetText::_ptr;) { - mainLoop(); - if (_eventManager->_quitFlag) - return false; - } - if (_keyboard->lastKey() == Enter && *_usrFnam) - userOk = true; - } - //Mouse.Off(); + // In the original game, the user had to enter his name + // As it was only used to name savegames, it has been removed _vga->_showQ->clear(); _vga->copyPage(0, 2); -#endif } - if (userOk && _mode == 0) { + if (_mode == 0) { +// The auto-load of savegame #0 is currently disabled +#if 0 if (savegameExists(0)) { // Load the savegame loadGame(0, NULL, true); // only system vars @@ -1532,6 +1492,7 @@ bool CGEEngine::showTitle(const char *name) { _flag[3] = false; } } else +#endif _mode++; } } @@ -1541,10 +1502,7 @@ bool CGEEngine::showTitle(const char *name) { _vga->copyPage(0, 2); - if (_isDemo) - return true; - else - return (_mode == 2 || userOk); + return true; } void CGEEngine::cge_main() { |