From 784cc2bd7fa597a4f7350ed8bca8142b15d090ea Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 22 Oct 2011 23:13:16 +1100 Subject: TSAGE: Added character display to the user interface --- engines/tsage/user_interface.cpp | 16 ++++++++++++++-- engines/tsage/user_interface.h | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'engines/tsage') diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index 0fb8137c86..b7f96b3806 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -267,6 +267,7 @@ void UICollection::draw() { UIElements::UIElements(): UICollection() { _cursorVisage.setVisage(1, 5); g_saver->addLoadNotifier(&UIElements::loadNotifierProc); + _characterIndex = 0; } void UIElements::synchronize(Serializer &s) { @@ -294,6 +295,9 @@ void UIElements::synchronize(Serializer &s) { s.syncAsSint16LE(itemId); } } + + if (g_vm->getGameID() == GType_Ringworld2) + s.syncAsSint16LE(_characterIndex); } void UIElements::process(Event &event) { @@ -394,10 +398,18 @@ void UIElements::setup(const Common::Point &pt) { add(&_scrollRight); _scrollRight._isLeft = false; - // Set up the score - if (g_vm->getGameID() == GType_BlueForce) { + switch (g_vm->getGameID()) { + case GType_BlueForce: + // Set up the score _score.postInit(); add(&_score); + case GType_Ringworld2: + // Set up the character display + _character.setup(1, 5, _characterIndex, 285, 11, 255); + add(&_character); + break; + default: + break; } // Set interface area diff --git a/engines/tsage/user_interface.h b/engines/tsage/user_interface.h index 7a9a78478d..94a2444e39 100644 --- a/engines/tsage/user_interface.h +++ b/engines/tsage/user_interface.h @@ -128,6 +128,8 @@ public: bool _active; Common::Array _itemList; Visage _cursorVisage; + UIElement _character; + int _characterIndex; UIElements(); virtual Common::String getClassName() { return "UIElements"; } -- cgit v1.2.3