diff options
| -rw-r--r-- | engines/prince/script.cpp | 14 | ||||
| -rw-r--r-- | engines/prince/script.h | 5 | 
2 files changed, 11 insertions, 8 deletions
| diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 6e74b353f5..a0ee5bd3b4 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -1606,19 +1606,17 @@ void Interpreter::O_GETHEROD() {  }  void Interpreter::O_PUSHSTRING() { +	_stringStack.string = _string; +	_stringStack.dialogData = _vm->_dialogData; +	_stringStack.currentString = _currentString;  	debugInterpreter("O_PUSHSTRING"); -	// push on the stack -	// _currentString -	// _dialogData -	// _string  }  void Interpreter::O_POPSTRING() { +	_string = _stringStack.string; +	_vm->_dialogData = _stringStack.dialogData; +	_currentString = _stringStack.currentString;  	debugInterpreter("O_POPSTRING"); -	// pop from the stack -	// _currentString -	// _dialogData -	// _string  }  void Interpreter::O_SETFGCODE() { diff --git a/engines/prince/script.h b/engines/prince/script.h index af448f004b..80afe52cb6 100644 --- a/engines/prince/script.h +++ b/engines/prince/script.h @@ -215,6 +215,11 @@ private:  	static const uint32 _STACK_SIZE = 500;  	uint32 _stack[_STACK_SIZE]; +	struct stringStack { +		byte *string; +		byte *dialogData; +		uint32 currentString; +	} _stringStack;  	uint8 _stacktop;  	//uint8 _savedStacktop;  	uint32 _waitFlag; | 
