From 58c7e668000b956fefa09b472053af6a00447b56 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 21 Jan 2011 14:17:49 +0000 Subject: MOHAWK: Implement CSTime big note display. svn-id: r55378 --- engines/mohawk/cstime_ui.cpp | 33 ++++++++++++++++++++++++++++----- engines/mohawk/cstime_ui.h | 1 + 2 files changed, 29 insertions(+), 5 deletions(-) (limited to 'engines/mohawk') diff --git a/engines/mohawk/cstime_ui.cpp b/engines/mohawk/cstime_ui.cpp index 1590c75bf7..eef9970f15 100644 --- a/engines/mohawk/cstime_ui.cpp +++ b/engines/mohawk/cstime_ui.cpp @@ -426,7 +426,7 @@ void CSTimeInterface::mouseUp(Common::Point pos) { } if (_note->getState() == 2) { - // TODO: _note->closeNote(); + _note->closeNote(); mouseMove(pos); return; } @@ -1158,9 +1158,6 @@ void CSTimeCarmenNote::drawSmallNote() { if (!havePiece(0xffff)) return; - if (_feature) - _vm->getView()->removeFeature(_feature, true); - uint16 id = 100; if (_pieces[2] != 0xffff) id += 5; @@ -1169,11 +1166,37 @@ void CSTimeCarmenNote::drawSmallNote() { else id += 2; + if (_feature) + _vm->getView()->removeFeature(_feature, true); _feature = _vm->getView()->installViewFeature(id, kFeatureSortStatic | kFeatureNewNoLoop, NULL); } void CSTimeCarmenNote::drawBigNote() { - // FIXME + if (_vm->getCase()->getCurrConversation()->getState() != (uint)~0) { + _vm->getCase()->getCurrConversation()->end(false); + } else if (_vm->getInterface()->getHelp()->getState() != (uint)~0) { + _vm->getInterface()->getHelp()->end(); + } + // TODO: kill symbols too + + uint16 id = 100; + if (_pieces[2] != 0xffff) + id += 9; + else if (_pieces[1] != 0xffff) + id += 8; + else + id += 6; + + if (_feature) + _vm->getView()->removeFeature(_feature, true); + _feature = _vm->getView()->installViewFeature(id, kFeatureSortStatic | kFeatureNewNoLoop, NULL); + // FIXME: attach note drawing proc + _state = 2; +} + +void CSTimeCarmenNote::closeNote() { + _state = 0; + drawSmallNote(); } CSTimeOptions::CSTimeOptions(MohawkEngine_CSTime *vm) : _vm(vm) { diff --git a/engines/mohawk/cstime_ui.h b/engines/mohawk/cstime_ui.h index 2d5aa2a183..a58fc224f0 100644 --- a/engines/mohawk/cstime_ui.h +++ b/engines/mohawk/cstime_ui.h @@ -133,6 +133,7 @@ public: void addPiece(uint16 piece, uint16 speech); void drawSmallNote(); void drawBigNote(); + void closeNote(); protected: MohawkEngine_CSTime *_vm; -- cgit v1.2.3