22 #ifndef TITANIC_PET_CONTROL_H 23 #define TITANIC_PET_CONTROL_H 25 #include "titanic/core/game_object.h" 26 #include "titanic/core/node_item.h" 27 #include "titanic/core/room_item.h" 28 #include "titanic/messages/messages.h" 29 #include "titanic/messages/mouse_messages.h" 30 #include "titanic/pet_control/pet_conversations.h" 31 #include "titanic/pet_control/pet_frame.h" 32 #include "titanic/pet_control/pet_inventory.h" 33 #include "titanic/pet_control/pet_translation.h" 34 #include "titanic/pet_control/pet_starfield.h" 35 #include "titanic/pet_control/pet_real_life.h" 36 #include "titanic/pet_control/pet_remote.h" 37 #include "titanic/pet_control/pet_rooms.h" 38 #include "titanic/support/strings.h" 39 #include "titanic/room_flags.h" 43 enum SummonResult { SUMMON_CANT = 0, SUMMON_PRESENT = 1, SUMMON_CAN = 2 };
50 PetEventInfo() : _id(0), _target(
nullptr) {}
69 PetEventInfo _timers[2];
99 bool isBotInView(
const CString &name)
const;
109 void setTimerPersisent(
int id,
bool flag);
122 PetArea _currentArea;
182 PetArea
setArea(PetArea newSection,
bool forceChange =
false);
273 bool refreshUI =
true,
bool sendMsg =
true);
296 bool checkNode(
const CString &name);
372 _areaLockCount =
MAX(_areaLockCount - 1, 0);
375 bool isSuccUBusActive()
const;
446 uint getRoomFlags()
const {
454 _rooms.setElevatorNum(elevNum);
461 return _rooms.getElevatorNum();
468 _rooms.setFloorNum(floorNum);
475 return _rooms.getFloorNum();
482 _rooms.setRoomNum(roomNum);
489 return _rooms.getRoomNum();
510 _rooms.setSublevel(level);
517 return _rooms.getSublevel();
527 int getAssignedRoomFlags()
const {
531 uint getSpecialRoomFlags(
const CString &name) {
Definition: mouse_messages.h:150
void enterRoom(CRoomItem *room)
void onSummonBot(const CString &name, int val)
void convAddLine(const CString &line)
Definition: pet_control.h:419
int getAssignedFloorNum() const
Definition: pet_control.h:557
bool isAssignedRoom(uint roomFlags) const
void incInputLocks()
Definition: pet_control.h:351
PetArea setArea(PetArea newSection, bool forceChange=false)
int getRoomsSublevel() const
Definition: pet_control.h:516
void setRoomsFloorNum(int floorNum)
Definition: pet_control.h:467
bool isFirstClassSuite() const
Definition: room_flags.h:227
void reassignRoom(PassengerClass passClassNum)
Definition: pet_control.h:428
int getAssignedElevatorNum() const
bool isInAssignedRoom() const
Definition: pet_control.h:442
Definition: mouse_messages.h:117
bool contains(int16 x, int16 y) const
Definition: rect.h:210
Definition: pet_section.h:51
int getWellEntry() const
Definition: pet_rooms.h:213
void startPetTimer(uint timerIndex, uint firstDuration, uint duration, CPetSection *target)
Rect getBounds() const override
void save(SimpleFile *file, int indent) override
Definition: true_talk_npc.h:43
Definition: mouse_messages.h:139
void addLine(const CString &line)
void draw(CScreenManager *screenManager) override
Definition: room_flags.h:30
Definition: pet_inventory.h:35
void displayMessage(StringId stringId, int param=0) const
bool contains(const Point &pt) const
Definition: pet_control.h:219
Definition: simple_file.h:49
bool isAreaUnlocked() const
Definition: pet_control.h:361
void setRoomsSublevel(int level)
Definition: pet_control.h:509
Definition: room_item.h:33
void setAreaChangeType(int changeType)
Definition: pet_control.h:294
Definition: node_item.h:29
int getAssignedElevatorNum() const
Definition: pet_control.h:564
bool isSuccUBusRoom(const CRoomFlags &roomFlags)
Definition: pet_control.h:585
Definition: messages.h:188
CRoomItem * getHiddenRoom()
Definition: screen_manager.h:49
void decAreaLocks()
Definition: pet_control.h:371
CGameObject * getNextObject(CGameObject *prior) const
void convResetDials(int flag=1)
void summonBot(const CString &name, int val)
Definition: game_object.h:79
int getRoomsRoomNum() const
Definition: pet_control.h:488
void enterNode(CNodeItem *node)
Definition: pet_starfield.h:33
Definition: messages.h:408
Definition: pet_remote.h:33
uint getAssignedRoomFlags() const
void invChange(CGameObject *item)
Definition: mouse_messages.h:181
Definition: pet_rooms.h:32
void incAreaLocks()
Definition: pet_control.h:366
Definition: tree_item.h:37
void playSound(int soundNum)
int getRoomsFloorNum() const
Definition: pet_control.h:474
void moveToHiddenRoom(CTreeItem *item)
Definition: mouse_messages.h:103
void starsSetButtons(int matchIndex, bool isMarkerClose)
bool changeLocationClass(PassengerClass newClassNum)
Definition: pet_control.h:435
Definition: pet_real_life.h:34
bool isSuccUBusRoomFlags() const
void removeFromInventory(CGameObject *item, CTreeItem *newParent, bool refreshUI=true, bool sendMsg=true)
void resetRoomsHighlight()
Definition: pet_control.h:523
void addToInventory(CGameObject *item)
PassengerClass getMailDestClass(const CRoomFlags &roomFlags) const
void stopPetTimer(uint timerIndex)
int getAssignedRoomNum() const
Definition: pet_control.h:550
CGameObject * getHiddenObject(const CString &name)
bool isInputLocked() const
Definition: pet_control.h:346
int getRoomsWellEntry() const
Definition: pet_control.h:502
int getRoomsElevatorNum() const
Definition: pet_control.h:460
bool isDoorOrBellbotPresent() const
void drawSquares(CScreenManager *screenManager, int count)
void highlightGlyph(int id)
void setActiveNPC(const CString &name)
void phonographAction(const CString &action)
Definition: pet_control.h:592
void setRoomsElevatorNum(int elevNum)
Definition: pet_control.h:453
static uint getSpecialRoomFlags(const CString &roomName)
void setElevatorBroken(bool flag)
Definition: pet_rooms.h:218
Definition: messages.h:307
uint getRoomFlags() const
void decInputLocks()
Definition: pet_control.h:356
CGameObject * dragEnd(const Point &pt) const
int getAssignedFloorNum() const
bool checkDragEnd(CGameObject *item) const
void load(SimpleFile *file) override
T MAX(T a, T b)
Definition: util.h:62
int getAssignedRoomNum() const
Definition: pet_conversations.h:34
bool isSuccUBusDest() const
Definition: room_flags.h:222
Definition: pet_frame.h:34
void setRemoteTarget(CGameObject *item)
void convResetNPC()
Definition: pet_control.h:402
int canSummonBot(const CString &name)
void setRoomsWellEntry(int entryNum)
Definition: pet_control.h:495
Definition: pet_translation.h:30
void addTranslation(StringId id1, StringId id2)
void setRoomsElevatorBroken(bool flag)
Definition: pet_control.h:571
bool changeLocationClass(PassengerClass newClassNum)
void setRoomsRoomNum(int roomNum)
Definition: pet_control.h:481
bool dismissBot(const CString &name)
void reassignRoom(PassengerClass passClassNum)
bool isFirstClassSuite() const
Definition: pet_control.h:578
Definition: pet_control.h:45
void setWellEntry(int val)
Definition: pet_rooms.h:208
CGameObject * getFirstObject() const
bool isSuccUBusDest(uint roomFlags)
Definition: pet_control.h:543