diff options
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 18 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.h | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index f03fb90eaa..87639b5715 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -2264,16 +2264,18 @@ void Scene1337::Action1337::subD18B5(int resNum, int stripNum, int frameNum) { warning("STUBBED: Action1337::subD18B5()"); } -void Scene1337::Action1337::waitFrames(int32 skipCount) { - warning("STUBBED: waitFrames()"); -/* +void Scene1337::Action1337::waitFrames(int32 frameCount) { uint32 firstFrameNumber = g_globals->_events.getFrameNumber(); - uint32 tmpFrameNumber = firstFrameNumber; + uint32 curFrame = firstFrameNumber; + uint32 destFrame = firstFrameNumber + frameCount; - while (tmpFrameNumber < firstFrameNumber + skipCount) - tmpFrameNumber = g_globals->_events.getFrameNumber(); -*/ - warning("_eventManager.waitEvent(-1)"); + while (curFrame < destFrame) { + TsAGE::Event event; + g_globals->_events.getEvent(event); + curFrame = g_globals->_events.getFrameNumber(); + } + + // CHECKME: The original is calling _eventManager.waitEvent(); } void Scene1337::Action1::signal() { diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index ecc4c1f2ca..ed66f98921 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -214,7 +214,7 @@ class Scene1337 : public SceneExt { class Action1337: public Action { public: void subD18B5(int resNum, int stripNum, int frameNum); - void waitFrames(int32 skipCount); + void waitFrames(int32 frameCount); }; class Action1: public Action1337 { |