diff options
author | Paul Gilbert | 2018-11-09 21:55:23 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | a698756c24c50059b84b6ca8833530b5f8cfef59 (patch) | |
tree | c3fe7d9d681d89747af6644298b1279875339254 /engines | |
parent | a8e656a5de01e18697fa4f0086215d11d9143197 (diff) | |
download | scummvm-rg350-a698756c24c50059b84b6ca8833530b5f8cfef59.tar.gz scummvm-rg350-a698756c24c50059b84b6ca8833530b5f8cfef59.tar.bz2 scummvm-rg350-a698756c24c50059b84b6ca8833530b5f8cfef59.zip |
GLK: SCOTT: Don't show intro text when loading savegame from launcher
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gargoyle/scott/scott.cpp | 22 | ||||
-rw-r--r-- | engines/gargoyle/scott/scott.h | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/engines/gargoyle/scott/scott.cpp b/engines/gargoyle/scott/scott.cpp index 329cfb334e..001eff5aba 100644 --- a/engines/gargoyle/scott/scott.cpp +++ b/engines/gargoyle/scott/scott.cpp @@ -29,7 +29,7 @@ namespace Scott { Scott::Scott(OSystem *syst, const GargoyleGameDescription *gameDesc) : Glk(syst, gameDesc), Items(nullptr), Rooms(nullptr), Verbs(nullptr), Nouns(nullptr), Messages(nullptr), Actions(nullptr), CurrentCounter(0), SavedRoom(0), Options(0), Width(0), TopHeight(0), - split_screen(true), Bottom(0), Top(0), BitFlags(0) { + split_screen(true), Bottom(0), Top(0), BitFlags(0), _saveSlot(-1) { Common::fill(&NounText[0], &NounText[16], '\0'); Common::fill(&Counters[0], &Counters[16], 0); Common::fill(&RoomSaved[0], &RoomSaved[16], 0); @@ -37,7 +37,6 @@ Scott::Scott(OSystem *syst, const GargoyleGameDescription *gameDesc) : Glk(syst, void Scott::runGame(Common::SeekableReadStream *gameFile) { int vb, no; - int saveSlot; initialize(); Bottom = glk_window_open(0, 0, 0, wintype_TextBuffer, 1); @@ -63,24 +62,24 @@ void Scott::runGame(Common::SeekableReadStream *gameFile) { Top = Bottom; } + output("ScummVM support adapted from Scott Free, A Scott Adams game driver in C.\n\n"); + // Check for savegame - saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1; + _saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1; - output("\ -Scott Free, A Scott Adams game driver in C.\n\ -Release 1.14, (c) 1993,1994,1995 Swansea University Computer Society.\n\ -Distributed under the GNU software license\n\n"); + // Load the game loadDatabase(gameFile, (Options & DEBUGGING) ? 1 : 0); + // Main game loop while (!shouldQuit()) { glk_tick(); performActions(0, 0); - if (saveSlot >= 0) { + if (_saveSlot >= 0) { // Load any savegame during startup - loadGameState(saveSlot); - saveSlot = -1; + loadGameState(_saveSlot); + _saveSlot = -1; } look(); @@ -404,7 +403,8 @@ void Scott::loadDatabase(Common::SeekableReadStream *f, bool loud) { } void Scott::output(const char *a) { - display(Bottom, "%s", a); + if (_saveSlot == -1) + display(Bottom, "%s", a); } void Scott::outputNumber(int a) { diff --git a/engines/gargoyle/scott/scott.h b/engines/gargoyle/scott/scott.h index 0ff8d3318b..168476c158 100644 --- a/engines/gargoyle/scott/scott.h +++ b/engines/gargoyle/scott/scott.h @@ -131,6 +131,7 @@ private: bool split_screen; winid_t Bottom, Top; uint32 BitFlags; ///< Might be >32 flags - I haven't seen >32 yet + int _saveSlot; ///< Save slot when loading savegame from launcher private: /** * Initialization code |