diff options
-rw-r--r-- | devtools/create_titanic/create_titanic_dat.cpp | 14 | ||||
-rw-r--r-- | engines/titanic/room_flags.cpp | 13 | ||||
-rw-r--r-- | engines/titanic/room_flags.h | 28 | ||||
-rw-r--r-- | engines/titanic/support/files_manager.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/support/strings.h | 2 |
5 files changed, 36 insertions, 23 deletions
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp index 909e21a866..eb87dbb5d3 100644 --- a/devtools/create_titanic/create_titanic_dat.cpp +++ b/devtools/create_titanic/create_titanic_dat.cpp @@ -56,7 +56,7 @@ * ASCIIZ - name of the resource */ -#define VERSION_NUMBER 4 +#define VERSION_NUMBER 5 #define HEADER_SIZE 0x1700 Common::File inputFile, outputFile; @@ -615,7 +615,7 @@ static const BedheadEntry OFF_RESTING_D_WRONG[1] = { { "Any", "Any", "Any", "ClosedWrong", 59, 70 } }; -static const char *const STRINGS_EN[153] = { +static const char *const STRINGS_EN[156] = { "", "You are standing outside the Pellerator.", "I'm sorry, you cannot enter this pellerator at present as a bot is in the way.", @@ -761,6 +761,8 @@ static const char *const STRINGS_EN[153] = { "Saved Chevron: ", "Current location: ", "Elevator %d", + "Floor %d", + "Room %d", " (shift-click edits)", "A hot", "A cold", @@ -776,7 +778,7 @@ static const char *const STRINGS_EN[153] = { "Speech volume" }; -static const char *const STRINGS_DE[199] = { +static const char *const STRINGS_DE[202] = { "", "Sie befinden sich vor dem Pellerator.", "Wir bedauern, da ein Bot den Weg versperrt, ist Ihnen der " @@ -938,6 +940,8 @@ static const char *const STRINGS_DE[199] = { "Gespeichertes Abzeichen: ", "Derzeitige Position: ", "Aufzug %d", + "Stock %d", + "Kabine %d", " (Chevrons ver\xE4" "ndern mit Umschalt-Taste+Klicken)", "Eine hei\xDF""e", "Eine kalte", @@ -1573,8 +1577,8 @@ void writeData() { writeStringArray("TEXT/ITEM_NAMES", ITEM_NAMES, 46); writeStringArray("TEXT/ITEM_IDS", ITEM_IDS, 40); writeStringArray("TEXT/ROOM_NAMES", ROOM_NAMES, 34); - writeStringArray("TEXT/STRINGS", STRINGS_EN, 153); - writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 199); + writeStringArray("TEXT/STRINGS", STRINGS_EN, 156); + writeStringArray("TEXT/STRINGS/DE", STRINGS_DE, 202); const int TEXT_PHRASES[3] = { 0x61D3C8, 0x618340, 0x61B1E0 }; const int TEXT_REPLACEMENTS1[3] = { 0x61D9B0, 0x61C788, 0x61B7C8 }; const int TEXT_REPLACEMENTS2[3] = { 0x61DD20, 0x61CAF8, 0x61BB38 }; diff --git a/engines/titanic/room_flags.cpp b/engines/titanic/room_flags.cpp index a28a4bd68c..8ca1a9e07d 100644 --- a/engines/titanic/room_flags.cpp +++ b/engines/titanic/room_flags.cpp @@ -22,6 +22,7 @@ #include "titanic/room_flags.h" #include "titanic/titanic.h" +#include "titanic/support/strings.h" namespace Titanic { @@ -440,6 +441,18 @@ void CRoomFlags::changeClass(PassengerClass newClassNum) { setRoomBits(roomNum); } +CString CRoomFlags::getElevatorDesc() const { + return CString::format(g_vm->_strings[ELEVATOR_NUM].c_str(), getElevatorNum()); +} + +CString CRoomFlags::getFloorDesc() const { + return CString::format(g_vm->_strings[FLOOR_NUM].c_str(), getFloorNum()); +} + +CString CRoomFlags::getRoomNumDesc() const { + return CString::format(g_vm->_strings[ROOM_NUM].c_str(), getRoomNum()); +} + bool CRoomFlags::compareClassElevator(uint flags1, uint flags2) { CRoomFlags f1(flags1); CRoomFlags f2(flags2); diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h index 3ce86bbddd..95b65330cf 100644 --- a/engines/titanic/room_flags.h +++ b/engines/titanic/room_flags.h @@ -124,13 +124,6 @@ public: uint getElevatorNum() const { return getElevatorBits() + 1; } /** - * Get a description for the elevator number - */ - CString getElevatorDesc() const { - return CString::format("Elevator %d", getElevatorNum()); - } - - /** * Gets the bits for the passenger class */ uint getPassengerClassBits() const; @@ -168,13 +161,6 @@ public: uint getFloorNum() const; /** - * Get a description for the floor number - */ - CString getFloorDesc() const { - return CString::format("Floor %d", getFloorNum()); - } - - /** * Sets the bits for the room number */ void setRoomBits(uint roomBits); @@ -190,11 +176,19 @@ public: uint getRoomNum() const { return getRoomBits(); } /** + * Get a description for the elevator number + */ + CString getElevatorDesc() const; + + /** + * Get a description for the floor number + */ + CString getFloorDesc() const; + + /** * Gets a string for the room number */ - CString getRoomNumDesc() const { - return CString::format("Room %d", getRoomNum()); - } + CString getRoomNumDesc() const; bool getBit0() const; diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp index ce4d0d049f..9a07b68e35 100644 --- a/engines/titanic/support/files_manager.cpp +++ b/engines/titanic/support/files_manager.cpp @@ -50,7 +50,7 @@ bool CFilesManager::loadResourceIndex() { return false; } - if (_version != 4) { + if (_version != 5) { g_vm->GUIError("titanic.dat is out of date"); return false; } diff --git a/engines/titanic/support/strings.h b/engines/titanic/support/strings.h index 1213285b99..0fa807d85f 100644 --- a/engines/titanic/support/strings.h +++ b/engines/titanic/support/strings.h @@ -169,6 +169,8 @@ enum StringId { SAVED_CHEVRON, CURRENT_LOCATION, ELEVATOR_NUM, + FLOOR_NUM, + ROOM_NUM, SHIFT_CLICK_TO_EDIT, A_HOT, A_COLD, |