aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorlukaslw2014-07-23 15:07:54 +0200
committerlukaslw2014-07-23 15:07:54 +0200
commit275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0 (patch)
tree0b80149c4892824864d710474575cbfc1dca2056 /engines
parentd7ad1b0c14af14500e0e35c447ecd579414e9203 (diff)
downloadscummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.tar.gz
scummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.tar.bz2
scummvm-rg350-275bc26c4bf74b19d6bf20ad51f7c70c3e7283f0.zip
PRINCE: O_PUSHSTRING, O_POPSTRING
Diffstat (limited to 'engines')
-rw-r--r--engines/prince/script.cpp14
-rw-r--r--engines/prince/script.h5
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;