aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/gui_v2.cpp16
-rw-r--r--engines/kyra/gui_v2.h3
-rw-r--r--engines/kyra/staticres.cpp35
3 files changed, 42 insertions, 12 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 141bb74afb..a62b12336c 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -581,21 +581,21 @@ const char *GUI_v2::getMenuTitle(const Menu &menu) {
if (!menu.menuNameId)
return 0;
- return _vm->getTableString(menu.menuNameId, _vm->_optionsBuffer, 1);
+ return _vm->getTableString(menu.menuNameId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 1);
}
const char *GUI_v2::getMenuItemTitle(const MenuItem &menuItem) {
if (!menuItem.itemId)
return 0;
- return _vm->getTableString(menuItem.itemId, _vm->_optionsBuffer, 1);
+ return _vm->getTableString(menuItem.itemId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 1);
}
const char *GUI_v2::getMenuItemLabel(const MenuItem &menuItem) {
if (!menuItem.labelId)
return 0;
- return _vm->getTableString(menuItem.labelId, _vm->_optionsBuffer, 1);
+ return _vm->getTableString(menuItem.labelId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 1);
}
#pragma mark -
@@ -1329,7 +1329,7 @@ void GUI_v2::resetState(int item) {
void GUI_v2::setupSavegameNames(Menu &menu, int num) {
for (int i = 0; i < num; ++i) {
- strcpy(_vm->getTableString(menu.item[i].itemId, _vm->_optionsBuffer, 0), "");
+ strcpy(_vm->getTableString(menu.item[i].itemId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 0), "");
menu.item[i].saveSlot = -1;
menu.item[i].enabled = false;
}
@@ -1338,16 +1338,16 @@ void GUI_v2::setupSavegameNames(Menu &menu, int num) {
Common::InSaveFile *in;
for (int i = 0; i < num; ++i) {
if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(i + _savegameOffset), header)) != 0) {
- strncpy(_vm->getTableString(menu.item[i].itemId, _vm->_optionsBuffer, 0), header.description.c_str(), 80);
+ strncpy(_vm->getTableString(menu.item[i].itemId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 0), header.description.c_str(), 80);
menu.item[i].saveSlot = i + _savegameOffset;
menu.item[i].enabled = true;
delete in;
}
}
-
+
if (_savegameOffset == 0) {
- char *dst = _vm->getTableString(menu.item[0].itemId, _vm->_optionsBuffer, 0);
- const char *src = _vm->getTableString(34, _vm->_optionsBuffer, 0);
+ char *dst = _vm->getTableString(menu.item[0].itemId, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 0);
+ const char *src = _vm->getTableString(_vm->gameFlags().isTalkie ? 34 : 42, _vm->gameFlags().isTalkie ? _vm->_optionsBuffer : _vm->_cCodeBuffer, 0);
strcpy(dst, src);
}
}
diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h
index 3d4c471f7b..55387208f4 100644
--- a/engines/kyra/gui_v2.h
+++ b/engines/kyra/gui_v2.h
@@ -163,6 +163,9 @@ private:
// load menu
int loadMenu(Button *caller);
int clickLoadSlot(Button *caller);
+
+ static const uint16 MenuStrings_TALKIE[];
+ static const uint16 MenuStrings_OTHER[];
};
} // end of namespace Kyra
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 0b5b99ea29..e35196b021 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1508,7 +1508,9 @@ void GUI_v2::initStaticData() {
Button::Callback clickLoadSlotFunctor = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::clickLoadSlot);
Button::Callback clickLoadMenuFunctor = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::loadMenu);
- GUI_V2_MENU(_loadMenu, -1, -1, 0x120, 0xA0, 0xF8, 0xF9, 0xFA, 8, 0xFB, -1, 8, 0, 6, 0x84, 0x16, 0x84, 0x7C);
+ const uint16 *menuStr = _vm->gameFlags().isTalkie ? MenuStrings_TALKIE : MenuStrings_OTHER;
+
+ GUI_V2_MENU(_loadMenu, -1, -1, 0x120, 0xA0, 0xF8, 0xF9, 0xFA, menuStr[4 * 8], 0xFB, -1, 8, 0, 6, 0x84, 0x16, 0x84, 0x7C);
GUI_V2_MENU_ITEM(_loadMenu.item[0], 1, 0x29, -1, 0x27, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
GUI_V2_MENU_ITEM(_loadMenu.item[1], 1, 0x2A, -1, 0x38, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
GUI_V2_MENU_ITEM(_loadMenu.item[2], 1, 0x2B, -1, 0x49, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
@@ -1516,18 +1518,43 @@ void GUI_v2::initStaticData() {
GUI_V2_MENU_ITEM(_loadMenu.item[4], 1, 0x2D, -1, 0x6B, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
for (int i = 0; i <= 4; ++i)
_loadMenu.item[i].callback = clickLoadSlotFunctor;
-
GUI_V2_MENU_ITEM(_loadMenu.item[5], 1, 0x0B, 0xB8, 0x86, 0x58, 0xF, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
- _loadMenu.item[6].enabled = false;
+ _loadMenu.item[6].enabled = false;
+ for (int i = 0; i < 7; ++i)
+ _loadMenu.item[i].itemId = menuStr[4 * 8 + i + 1];
- GUI_V2_MENU(_deathMenu, -1, -1, 0xD0, 0x4C, 0xF8, 0xF9, 0xFA, 0xE, 0xFB, -1, 8, 0, 2, -1, -1, -1, -1);
+ GUI_V2_MENU(_deathMenu, -1, -1, 0xD0, 0x4C, 0xF8, 0xF9, 0xFA, menuStr[7 * 8], 0xFB, -1, 8, 0, 2, -1, -1, -1, -1);
GUI_V2_MENU_ITEM(_deathMenu.item[0], 1, 2, -1, 0x1E, 0xB4, 0x0F, 0xFC, 0xFD, 8, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
_deathMenu.item[0].callback = clickLoadMenuFunctor;
GUI_V2_MENU_ITEM(_deathMenu.item[1], 1, 5, -1, 0x2F, 0xB4, 0x0F, 0xFC, 0xFD, 8, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
for (int i = 2; i <= 6; ++i)
_deathMenu.item[i].enabled = false;
+ for (int i = 0; i < 2; ++i)
+ _deathMenu.item[i].itemId = menuStr[7 * 8 + i + 1];
}
+const uint16 GUI_v2::MenuStrings_TALKIE[] = {
+ 0x001, 0x002, 0x003, 0x023, 0x004, 0x025, 0x005, 0x006, // Main Menu String IDs
+ 0x025, 0x000, 0x000, 0x000, 0x010, 0x000, 0x000, 0x000, // Options Menu String IDs
+ 0x007, 0x000, 0x000, 0x000, 0x010, 0x000, 0x000, 0x000, // Audio Menu String IDs
+ 0x000, 0x014, 0x013, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu3 Menu String IDs
+ 0x008, 0x029, 0x02A, 0x02B, 0x02C, 0x02D, 0x00B, 0x000, // Load Menu String IDs
+ 0x009, 0x029, 0x02A, 0x02B, 0x02C, 0x02D, 0x00B, 0x000, // Save Menu String IDs
+ 0x00C, 0x00D, 0x00B, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu6 Menu String IDs
+ 0x00E, 0x002, 0x005, 0x000, 0x000, 0x000, 0x000, 0x000 // Death Menu String IDs
+};
+
+const uint16 GUI_v2::MenuStrings_OTHER[] = {
+ 0x009, 0x00A, 0x00B, 0x001, 0x00C, 0x00D, 0x00E, 0x000, // Main Menu String IDs
+ 0x00F, 0x02B, 0x02C, 0x02D, 0x02E, 0x018, 0x000, 0x000, // Options Menu String IDs
+ 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, // Dummy
+ 0x000, 0x01C, 0x01B, 0x000, 0x000, 0x000, 0x000, 0x000, // Menu3 Menu String IDs
+ 0x010, 0x02F, 0x030, 0x031, 0x032, 0x033, 0x013, 0x000, // Load Menu String IDs
+ 0x011, 0x02F, 0x030, 0x031, 0x032, 0x033, 0x013, 0x000, // Save Menu String IDs
+ 0x014, 0x015, 0x013, 0x3E8, 0x000, 0x000, 0x000, 0x000, // Menu6 String IDs
+ 0x016, 0x00A, 0x00D, 0x000, 0x000, 0x000, 0x000, 0x000 // Death Menu String IDs
+};
+
const uint16 KyraEngine_v2::_itemMagicTable[] = {
0x0D, 0x0A, 0x0B, 0,
0x0D, 0x0B, 0x0A, 0,