aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_rooms.cpp4
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.cpp6
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.h6
3 files changed, 10 insertions, 6 deletions
diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp
index a10bd0d63d..fb3b7d1c17 100644
--- a/engines/titanic/pet_control/pet_rooms.cpp
+++ b/engines/titanic/pet_control/pet_rooms.cpp
@@ -67,7 +67,7 @@ bool CPetRooms::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (!_glyphItem.contains(getGlyphPos(), msg->_mousePos))
return false;
- _glyphItem.MouseButtonDownMsg(msg->_mousePos);
+ _glyphItem.selectGlyph(getGlyphPos(), msg->_mousePos);
return true;
}
@@ -335,7 +335,7 @@ bool CPetRooms::changeLocationClass(PassengerClass newClassNum) {
if (!glyph)
return 0;
- glyph->changeLocation(newClassNum);
+ glyph->changeClass(newClassNum);
return true;
}
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
index e89e8072dc..6855e5b98e 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
@@ -102,7 +102,7 @@ void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool
}
void CPetRoomsGlyph::selectGlyph(const Point &topLeft, const Point &pt) {
- if (isAssigned()) {
+ if (!isAssigned()) {
bool isShiftPressed = g_vm->_window->getSpecialButtons() & MK_SHIFT;
if (isShiftPressed) {
@@ -183,9 +183,9 @@ void CPetRoomsGlyph::loadFlags(SimpleFile *file, int val) {
}
}
-void CPetRoomsGlyph::changeLocation(int newClassNum) {
+void CPetRoomsGlyph::changeClass(PassengerClass newClassNum) {
CRoomFlags roomFlags(_roomFlags);
- roomFlags.changeLocation(newClassNum);
+ roomFlags.changeClass(newClassNum);
_roomFlags = roomFlags.get();
}
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h
index 11de6c4a8e..1c060c511c 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.h
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.h
@@ -25,6 +25,7 @@
#include "titanic/pet_control/pet_glyphs.h"
#include "titanic/support/simple_file.h"
+#include "titanic/game_location.h"
namespace Titanic {
@@ -119,7 +120,10 @@ public:
*/
void setMode(RoomGlyphMode mode) { _mode = mode; }
- void changeLocation(int newClassNum);
+ /**
+ * Change the current class
+ */
+ void changeClass(PassengerClass newClassNum);
/**
* Returns true if the room is either currently or previously assigned