From bfe0307300a36042e7b82fcc3275d317126b3af4 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sat, 22 Jan 2011 21:22:12 +0000 Subject: MOHAWK: Implement kCSTimeEventCharSomeNIS55. svn-id: r55445 --- engines/mohawk/cstime.cpp | 24 ++++++++++++++++++++++++ engines/mohawk/cstime.h | 1 + 2 files changed, 25 insertions(+) diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp index 6d4b370a30..44c61176be 100644 --- a/engines/mohawk/cstime.cpp +++ b/engines/mohawk/cstime.cpp @@ -310,6 +310,24 @@ void MohawkEngine_CSTime::eventIdle() { } break; + case kCSTimeEventCharSomeNIS55: + // This is like kCSTimeEventCharPlayNIS, only using a different flag variable. + if (_processingNIS55) { + CSTimeChar *chr = _case->getCurrScene()->getChar(event.param1); + if (chr->NISIsDone()) { + chr->removeNIS(); + _processingNIS55 = false; + chr->setupAmbientAnims(true); + _events.pop_front(); + processEvent = false; + } else { + done = true; + } + } else { + advanceQueue = false; + } + break; + default: break; } @@ -350,6 +368,7 @@ bool MohawkEngine_CSTime::NISIsRunning() { void MohawkEngine_CSTime::reset() { _NISRunning = false; + _processingNIS55 = false; _lastTimeout = 0xffffffff; _processingEvent = false; } @@ -531,6 +550,11 @@ void MohawkEngine_CSTime::triggerEvent(CSTimeEvent &event) { // FIXME break; + case kCSTimeEventCharSomeNIS55: + _processingNIS55 = true; + _case->getCurrScene()->getChar(event.param1)->playNIS(event.param2); + break; + case kCSTimeEventUpdateBubble: switch (event.param2) { case 0: diff --git a/engines/mohawk/cstime.h b/engines/mohawk/cstime.h index dca966f8b6..3b5be08c2c 100644 --- a/engines/mohawk/cstime.h +++ b/engines/mohawk/cstime.h @@ -178,6 +178,7 @@ private: uint16 _nextSceneId; bool _processingEvent; + bool _processingNIS55; bool _NISRunning; uint32 _lastTimeout; void reset(); -- cgit v1.2.3