aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-10-22 23:13:16 +1100
committerPaul Gilbert2011-10-22 23:13:16 +1100
commit784cc2bd7fa597a4f7350ed8bca8142b15d090ea (patch)
tree6802ceb8b9446792d96bf07d7b244349d7cd3e3d /engines/tsage
parent1c4bc2f567a7d31e0f716d5dfb8f57efb7875be1 (diff)
downloadscummvm-rg350-784cc2bd7fa597a4f7350ed8bca8142b15d090ea.tar.gz
scummvm-rg350-784cc2bd7fa597a4f7350ed8bca8142b15d090ea.tar.bz2
scummvm-rg350-784cc2bd7fa597a4f7350ed8bca8142b15d090ea.zip
TSAGE: Added character display to the user interface
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/user_interface.cpp16
-rw-r--r--engines/tsage/user_interface.h2
2 files changed, 16 insertions, 2 deletions
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<int> _itemList;
Visage _cursorVisage;
+ UIElement _character;
+ int _characterIndex;
UIElements();
virtual Common::String getClassName() { return "UIElements"; }