diff options
author | Paul Gilbert | 2016-06-22 23:20:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:24:08 -0400 |
commit | 5a328ce28f4edfe3da0c261d7abc884aa6af94a2 (patch) | |
tree | 54e4c4ef2d724902310e0b9c1f08a30b52811972 /engines/titanic/room_flags.h | |
parent | 452274dae027933b2199cd26236f1a5e908c4275 (diff) | |
download | scummvm-rg350-5a328ce28f4edfe3da0c261d7abc884aa6af94a2.tar.gz scummvm-rg350-5a328ce28f4edfe3da0c261d7abc884aa6af94a2.tar.bz2 scummvm-rg350-5a328ce28f4edfe3da0c261d7abc884aa6af94a2.zip |
TITANIC: Completed CPetRooms methods
Diffstat (limited to 'engines/titanic/room_flags.h')
-rw-r--r-- | engines/titanic/room_flags.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h index 553e0a32d6..dfb7c89d96 100644 --- a/engines/titanic/room_flags.h +++ b/engines/titanic/room_flags.h @@ -33,8 +33,6 @@ private: private: int getConditionally() const; - bool not5() const { return getConditionally() != 5; } - /** * Returns true if the current flags appear in the * list of transport rooms @@ -51,11 +49,6 @@ private: void setElevatorBits(uint val); /** - * Set the bits for the passenger class - */ - void setPassengerClassBits(uint val); - - /** * Set the bits for the floor number */ void setFloorBits(uint val); @@ -81,11 +74,9 @@ private: */ bool isTitania() const { return _data == 0x8A397; } - bool is59706() const { return _data == 0x59706; } - - bool is2To19(uint v) const { return v >= 2 && v <= 19; } - bool is20To27(uint v) const { return v >= 20 && v <= 27; } - bool is28To38(uint v) const { return v >= 28 && v <= 38; } + static bool is2To19(uint v) { return v >= 2 && v <= 19; } + static bool is20To27(uint v) { return v >= 20 && v <= 27; } + static bool is28To38(uint v) { return v >= 28 && v <= 38; } public: CRoomFlags() : _data(0) {} CRoomFlags(uint data) : _data(data) {} @@ -104,7 +95,7 @@ public: /** * Gets the special flags for a transport or succubus room */ - uint getSpecialRoomFlags(const CString &roomName); + static uint getSpecialRoomFlags(const CString &roomName); /** * Returns true if the current flags are in the succubus list @@ -144,6 +135,11 @@ public: uint getPassengerClassBits() const; /** + * Set the bits for the passenger class + */ + void setPassengerClassBits(uint val); + + /** * Gets the passenger class number */ uint getPassengerClassNum() const { return getPassengerClassBits(); } @@ -218,6 +214,15 @@ public: * Gets the succubus room name associated with the current room flags */ CString getSuccUBusRoomName() const; + + /** + * Returns what passenger class a particular floor number belongs to + */ + static int whatPassengerClass(int floorNum); + + bool not5() const { return getConditionally() != 5; } + + bool is59706() const { return _data == 0x59706; } }; } // End of namespace Titanic |