diff options
Diffstat (limited to 'engines/titanic/room_flags.h')
-rw-r--r-- | engines/titanic/room_flags.h | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/engines/titanic/room_flags.h b/engines/titanic/room_flags.h index 961452535e..553e0a32d6 100644 --- a/engines/titanic/room_flags.h +++ b/engines/titanic/room_flags.h @@ -43,6 +43,8 @@ private: int getRoomCategory() const; + int getRoomArea() const; + /** * Set the bits for the elevator number */ @@ -63,27 +65,27 @@ private: */ uint decodeFloorBits(uint bits) const; - uint getRoomArea() const; - /** - * Returns true if the current flags are in the succubus list + * Compares two room flags together */ - bool isSuccUBusRoomFlags() const; + bool compareFlags(CRoomFlags flags1, CRoomFlags flags2) const; /** - * Gets the special flags for a transport or succubus room + * Compares the current flags against the specified flags + * for a matching elevator, floor, and room */ - uint getSpecialRoomFlags(const CString &roomName); + bool compareLocation(uint roomFlags); /** - * Gets the succubus number associated with a given room + * Returns true if the current flags is for Titania's room */ - uint getSuccUBusNum(const CString &roomName); + bool isTitania() const { return _data == 0x8A397; } - /** - * Gets the succubus room name associated with the current room flags - */ - CString getSuccUBusRoomName() const; + 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; } public: CRoomFlags() : _data(0) {} CRoomFlags(uint data) : _data(data) {} @@ -99,9 +101,15 @@ public: */ uint get() const { return _data; } - bool test5(const CRoomFlags &roomFlags) const { - return roomFlags.not5(); - } + /** + * Gets the special flags for a transport or succubus room + */ + uint getSpecialRoomFlags(const CString &roomName); + + /** + * Returns true if the current flags are in the succubus list + */ + bool isSuccUBusRoomFlags() const; /** * Get a description for the room @@ -195,6 +203,21 @@ public: * Change the passenger class */ void changeLocation(int action); + + /** + * Sets a random destination in the flags + */ + void setRandomLocation(int classNum, bool flag); + + /** + * Gets the succubus number associated with a given room + */ + uint getSuccUBusNum(const CString &roomName) const; + + /** + * Gets the succubus room name associated with the current room flags + */ + CString getSuccUBusRoomName() const; }; } // End of namespace Titanic |