diff options
author | Strangerke | 2017-12-02 23:28:57 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:42 +0000 |
commit | 2e95c690d00aab56b1412ac7f74eb3c879c32ac6 (patch) | |
tree | 846bd8f45cdf17174f2e772d52e55da094ecc19e /engines/supernova | |
parent | b4d7a83c753b9e4a32062d44c9d51d905272c8f4 (diff) | |
download | scummvm-rg350-2e95c690d00aab56b1412ac7f74eb3c879c32ac6.tar.gz scummvm-rg350-2e95c690d00aab56b1412ac7f74eb3c879c32ac6.tar.bz2 scummvm-rg350-2e95c690d00aab56b1412ac7f74eb3c879c32ac6.zip |
SUPERNOVA: Add 2 missing translation strings, handle variable dialogs in AxacussCorridor5
Diffstat (limited to 'engines/supernova')
-rw-r--r-- | engines/supernova/rooms.cpp | 12 | ||||
-rw-r--r-- | engines/supernova/rooms.h | 4 |
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]; }; |