ScummVM API documentation
pet_rooms.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TITANIC_PET_ROOMS_H
23#define TITANIC_PET_ROOMS_H
24
25#include "titanic/pet_control/pet_section.h"
26#include "titanic/gfx/text_control.h"
27#include "titanic/pet_control/pet_rooms_glyphs.h"
28#include "titanic/game_location.h"
29
30namespace Titanic {
31
32class CPetRooms : public CPetSection {
33private:
34 CPetRoomsGlyphs _glyphs;
35 CPetRoomsGlyph _glyphItem;
36 CGameObject *_chevLeftOnDim;
37 CGameObject *_chevLeftOffDim;
38 CGameObject *_chevRightOnDim;
39 CGameObject *_chevRightOffDim;
40 CGameObject *_chevLeftOnLit;
41 CGameObject *_chevLeftOffLit;
42 CGameObject *_chevRightOnLit;
43 CGameObject *_chevRightOffLit;
44 CPetGfxElement _plinth;
45 CTextControl _text;
46 int _floorNum;
47 int _elevatorNum;
48 int _roomNum;
49 int _sublevel;
50 int _wellEntry;
51 bool _elevatorBroken;
52private:
56 bool setupControl(CPetControl *petControl);
57
61 Point getGlyphPos() const { return Point(509, 388); }
62
66 CPetRoomsGlyph *addRoom(uint roomFlags, bool highlight);
67
71 CPetRoomsGlyph *addGlyph(uint roomFlags, bool highlight);
72public:
73 CPetRooms();
74
78 bool setup(CPetControl *petControl) override;
79
83 bool reset() override;
84
88 void draw(CScreenManager *screenManager) override;
89
95 bool MouseDragStartMsg(CMouseDragStartMsg *msg) override;
96 bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) override;
97 bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg) override;
98 bool ActionMsg(CActionMsg *msg) override;
99
103 bool checkDragEnd(CGameObject *item) override;
104
108 void displayMessage(const CString &msg) override;
109
113 bool isValid(CPetControl *petControl) override;
114
118 void load(SimpleFile *file, int param) override;
119
123 void postLoad() override;
124
128 void save(SimpleFile *file, int indent) override;
129
133 void enter(PetArea oldArea) override;
134
138 void enterRoom(CRoomItem *room) override;
139
144
148 CGameObject *getBackground(int index) const override;
149
154
158 void reassignRoom(PassengerClass passClassNum);
159
163 bool changeLocationClass(PassengerClass newClassNum);
164
169 bool isAssignedRoom(uint roomFlags) const;
170
175
180
185
190
194 uint getRoomFlags() const;
195
196 void setFloorNum(int floorNum) { _floorNum = floorNum; }
197 int getFloorNum() const { return _floorNum; }
198 void setElevatorNum(int elevNum) { _elevatorNum = elevNum; }
199 int getElevatorNum() const { return _elevatorNum; }
200 void setRoomNum(int roomNum) { _roomNum = roomNum; }
201 int getRoomNum() const { return _roomNum; }
202 void setSublevel(int level) { _sublevel = level; }
203 int getSublevel() const { return _sublevel; }
204
208 void setWellEntry(int val) { _wellEntry = val; }
209
213 int getWellEntry() const { return _wellEntry; }
214
218 void setElevatorBroken(bool flag) { _elevatorBroken = flag; }
219};
220
221} // End of namespace Titanic
222
223#endif /* TITANIC_PET_ROOMS_H */
Definition: messages.h:410
Definition: game_object.h:79
Definition: mouse_messages.h:71
Definition: mouse_messages.h:87
Definition: mouse_messages.h:117
Definition: mouse_messages.h:150
Definition: pet_control.h:45
Definition: pet_gfx_element.h:29
Definition: pet_rooms_glyphs.h:36
Definition: pet_rooms_glyphs.h:147
Definition: pet_rooms.h:32
uint getRoomFlags() const
CTextControl * getText() override
int getAssignedElevatorNum() const
uint getAssignedRoomFlags() const
bool setup(CPetControl *petControl) override
bool isValid(CPetControl *petControl) override
void displayMessage(const CString &msg) override
void save(SimpleFile *file, int indent) override
int getAssignedRoomNum() const
CGameObject * getBackground(int index) const override
void load(SimpleFile *file, int param) override
void reassignRoom(PassengerClass passClassNum)
bool changeLocationClass(PassengerClass newClassNum)
bool reset() override
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override
void enter(PetArea oldArea) override
void setElevatorBroken(bool flag)
Definition: pet_rooms.h:218
int getWellEntry() const
Definition: pet_rooms.h:213
void setWellEntry(int val)
Definition: pet_rooms.h:208
int getAssignedFloorNum() const
void draw(CScreenManager *screenManager) override
void enterRoom(CRoomItem *room) override
bool checkDragEnd(CGameObject *item) override
void postLoad() override
bool isAssignedRoom(uint roomFlags) const
Definition: pet_section.h:51
virtual void highlight(int id)
Definition: pet_section.h:229
Definition: room_item.h:33
Definition: screen_manager.h:49
Definition: string.h:40
Definition: text_control.h:35
Definition: simple_file.h:49
Definition: rect.h:144