aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-01 16:13:19 +0100
committerMartin Kiewitz2016-02-01 16:13:19 +0100
commit6749f22981baa0d8d7b53711f2611cbe90b99e93 (patch)
tree5579dc8e2ade693fb60cf093c931c374fff4932b /engines/agi
parentf86d68d214f01b49045b7bf40d932ad6f537c03c (diff)
downloadscummvm-rg350-6749f22981baa0d8d7b53711f2611cbe90b99e93.tar.gz
scummvm-rg350-6749f22981baa0d8d7b53711f2611cbe90b99e93.tar.bz2
scummvm-rg350-6749f22981baa0d8d7b53711f2611cbe90b99e93.zip
AGI: Remove _game.hasPrompt, no longer needed
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.h1
-rw-r--r--engines/agi/cycle.cpp9
-rw-r--r--engines/agi/saveload.cpp9
3 files changed, 2 insertions, 17 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index f476801960..58fb173575 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -446,7 +446,6 @@ struct AgiGame {
bool playerControl; /**< player is in control */
int exitAllLogics; /**< break cycle after new.room */
bool pictureShown; /**< show.pic has been issued */
- int hasPrompt; /**< input prompt has been printed */
#define ID_AGDS 0x00000001
#define ID_AMIGA 0x00000002
int gameFlags; /**< agi options flags */
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index cff1cd970b..dd31fee887 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -379,14 +379,6 @@ int AgiEngine::playGame() {
if (_passedPlayTimeCycles >= getVar(VM_VAR_TIME_DELAY)) {
_passedPlayTimeCycles = 0;
- if (!_game.hasPrompt && _game.inputMode == INPUTMODE_NORMAL) {
- _text->promptRedraw();
- _game.hasPrompt = 1;
- } else if (_game.hasPrompt && _game.inputMode == INPUTMODE_NONE) {
- _text->promptRedraw();
- _game.hasPrompt = 0;
- }
-
interpretCycle();
// Check if the user has asked to load a game from the command line
@@ -503,7 +495,6 @@ int AgiEngine::runGame() {
setVar(VM_VAR_MAX_INPUT_CHARACTERS, 38);
_game.inputMode = INPUTMODE_NONE;
_text->promptDisable();
- _game.hasPrompt = 0;
_game.state = STATE_RUNNING;
ec = playGame();
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index f05655ea7b..90e42ca613 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -161,7 +161,7 @@ int AgiEngine::saveGame(const Common::String &fileName, const Common::String &de
// (previous in-game-timer, in-game-timer is always enabled during the regular game, so need to save/load it)
out->writeSint16BE((int16)_game.exitAllLogics);
out->writeSint16BE((int16)_game.pictureShown);
- out->writeSint16BE((int16)_game.hasPrompt);
+ out->writeSint16BE((int16)_text->promptIsEnabled()); // was "_game.hasPrompt", no longer needed
out->writeSint16BE((int16)_game.gameFlags);
if (_text->promptIsEnabled()) {
@@ -486,8 +486,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
in->readSint16BE(); // was clock enabled, no longer needed
_game.exitAllLogics = in->readSint16BE();
in->readSint16BE(); // was _game.pictureShown
- //_game.pictureShown = in->readSint16BE();
- _game.hasPrompt = in->readSint16BE();
+ in->readSint16BE(); // was _game.hasPrompt, no longer needed
_game.gameFlags = in->readSint16BE();
if (in->readSint16BE()) {
_text->promptEnable();
@@ -510,9 +509,6 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
int16 textBackground = in->readSint16BE();
_text->charAttrib_Set(textForeground, textBackground);
- // game.hires - rebuilt from image stack
- // game.sbuf - rebuilt from image stack
-
// game.ego_words - fixed by clean_input
// game.num_ego_words - fixed by clean_input
@@ -687,7 +683,6 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
setFlag(VM_FLAG_RESTORE_JUST_RAN, true);
- _game.hasPrompt = 0; // force input line repaint if necessary
_words->clearEgoWords();
// don't delay anything right after restoring a game