aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova
diff options
context:
space:
mode:
Diffstat (limited to 'engines/supernova')
-rw-r--r--engines/supernova/rooms.cpp12
-rw-r--r--engines/supernova/rooms.h4
2 files changed, 7 insertions, 9 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp
index 08ee12ebb9..6d5ddf87dd 100644
--- a/engines/supernova/rooms.cpp
+++ b/engines/supernova/rooms.cpp
@@ -2565,16 +2565,10 @@ bool AxacussCorridor5::handleMoneyDialog() {
removeSentence(2, 2);
removeSentence(3, 2);
} else {
- // TODO: Handle string manipulation in dialogs
- // _dialog3[2] and _dialog3[3] are both using kStringDialogAxacussCorridor5_7
- // ("Wenn Sie mich durchlassen gebe ich Ihnen %d Xa.")
- // One way could be to keep an array of string[6], replace the %d of the previous sentence by a %s,
- // and format the dialog string when the associated parameter string isn't empty.
- // The following code is broken and only kept in order to remember the values used.
- // _dialog3[2] += Common::String::format(kStringDialogAxacussCorridor5_7, _gm->_state._money - 200);
- // _dialog3[3] += Common::String::format(kStringDialogAxacussCorridor5_7, _gm->_state._money);
+ _varTexts3[2] = Common::String::format("%d", _gm->_state._money - 200);
+ _varTexts3[3] = Common::String::format("%d", _gm->_state._money);
}
- switch (_gm->dialog(4, _rows, _dialog3, 2)) {
+ switch (_gm->dialog(4, _rows, _dialog3, 2, _varTexts3)) {
case 1:
_gm->wait2(3);
_vm->renderImage(1);
diff --git a/engines/supernova/rooms.h b/engines/supernova/rooms.h
index ad28afb991..62c7d8f6d0 100644
--- a/engines/supernova/rooms.h
+++ b/engines/supernova/rooms.h
@@ -1015,6 +1015,9 @@ public:
_rows[3] = 1;
_rows[4] = 0;
_rows[5] = 0;
+
+ for (int i = 0; i < 6; i++)
+ _varTexts3[i] = "";
}
virtual void onEntrance();
@@ -1028,6 +1031,7 @@ private:
StringID _dialog1[2];
StringID _dialog2[2];
StringID _dialog3[4];
+ Common::String _varTexts3[6];
byte _rows[6];
};