diff options
| author | lukaslw | 2014-07-23 15:07:54 +0200 | 
|---|---|---|
| committer | lukaslw | 2014-07-23 15:07:54 +0200 | 
| commit | 275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0 (patch) | |
| tree | 0b80149c4892824864d710474575cbfc1dca2056 | |
| parent | d7ad1b0c14af14500e0e35c447ecd579414e9203 (diff) | |
| download | scummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.tar.gz scummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.tar.bz2 scummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.zip | |
PRINCE: O_PUSHSTRING, O_POPSTRING
| -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; | 
