aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-11 14:17:03 -0400
committerPaul Gilbert2017-10-15 21:20:09 -0400
commit11a72a5e0e6500294204a985419a83a49331dece (patch)
tree12f89298eb97baad3b7ee8dfcc12a821d7ec2d2e /engines
parentff9c0a9a8906e54845d9dd917007a6c29bf1aaf7 (diff)
downloadscummvm-rg350-11a72a5e0e6500294204a985419a83a49331dece.tar.gz
scummvm-rg350-11a72a5e0e6500294204a985419a83a49331dece.tar.bz2
scummvm-rg350-11a72a5e0e6500294204a985419a83a49331dece.zip
TITANIC: Add missing strings for Floor & Room # to titanic.dat
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/room_flags.cpp13
-rw-r--r--engines/titanic/room_flags.h28
-rw-r--r--engines/titanic/support/files_manager.cpp2
-rw-r--r--engines/titanic/support/strings.h2
4 files changed, 27 insertions, 18 deletions
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,