aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-12 20:33:59 -0500
committerPaul Gilbert2013-12-12 20:33:59 -0500
commit1187a4fc2516e01f951f0f165f287098f133cfee (patch)
tree85acd8b7d678a22df3116bb9587f188f38d41a71
parentdfd4e765f2072a108308be183427504c2efad643 (diff)
downloadscummvm-rg350-1187a4fc2516e01f951f0f165f287098f133cfee.tar.gz
scummvm-rg350-1187a4fc2516e01f951f0f165f287098f133cfee.tar.bz2
scummvm-rg350-1187a4fc2516e01f951f0f165f287098f133cfee.zip
VOYEUR: Implemented goToState method
-rw-r--r--engines/voyeur/files_threads.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 8176a4f925..7ba3c5e62d 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -833,7 +833,15 @@ bool ThreadResource::goToStateID(int stackId, int sceneId) {
}
bool ThreadResource::goToState(int stackId, int sceneId) {
- error("TODO: goToState");
+ savePrevious();
+ if (stackId == -1 || loadAStack(stackId)) {
+ if (sceneId != -1)
+ _threadId = sceneId;
+
+ return doState();
+ } else {
+ return false;
+ }
}
void ThreadResource::savePrevious() {