[Scummvm-cvs-logs] scummvm master -> 6749f22981baa0d8d7b53711f2611cbe90b99e93

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Feb 1 16:12:53 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6749f22981 AGI: Remove _game.hasPrompt, no longer needed


Commit: 6749f22981baa0d8d7b53711f2611cbe90b99e93
    https://github.com/scummvm/scummvm/commit/6749f22981baa0d8d7b53711f2611cbe90b99e93
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-01T16:13:19+01:00

Commit Message:
AGI: Remove _game.hasPrompt, no longer needed

Changed paths:
    engines/agi/agi.h
    engines/agi/cycle.cpp
    engines/agi/saveload.cpp



diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index f4768019..58fb173 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 cff1cd9..dd31fee 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 f05655e..90e42ca 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






More information about the Scummvm-git-logs mailing list