ScummVM API documentation
pet_inventory.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_INVENTORY_H
23#define TITANIC_PET_INVENTORY_H
24
25#include "titanic/support/simple_file.h"
26#include "titanic/pet_control/pet_section.h"
27#include "titanic/pet_control/pet_inventory_glyphs.h"
28#include "titanic/gfx/text_control.h"
29
30namespace Titanic {
31
35class CPetInventory : public CPetSection {
36private:
37 CTextControl _text;
39 CGameObject *_itemBackgrounds[46];
40 CGameObject *_movie;
41 bool _isLoading;
42 int _titaniaBitFlags;
43private:
47 bool setPetControl(CPetControl *petControl);
48
52 int getItemIndex(CGameObject *item) const;
53
57 void removeInvalid();
58public:
60
64 bool setup(CPetControl *petControl) override;
65
69 bool reset() override;
70
74 void draw(CScreenManager *screenManager) override;
75
79 Rect getBounds() const override;
80
84 void changed(int changeType) override;
85
89 void enterRoom(CRoomItem *room) override;
90
96 bool MouseDragStartMsg(CMouseDragStartMsg *msg) override;
97 bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) override;
98 bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg) override;
99 bool ActionMsg(CActionMsg *msg) override;
100 bool MouseWheelMsg(CMouseWheelMsg *msg) override;
101
105 CGameObject *dragEnd(const Point &pt) const override;
106
110 bool isValid(CPetControl *petControl) override;
111
115 void load(SimpleFile *file, int param) override;
116
120 void postLoad() override;
121
125 void save(SimpleFile *file, int indent) override;
126
130 void enter(PetArea oldArea) override;
131
135 void leave() override;
136
140 CTextControl *getText() override { return &_text; }
141
145 CGameObject *getBackground(int index) const override;
146
150 void change(CGameObject *item);
151
156
161
166
172
176 void playMovie(CGameObject *movie, bool repeat = true);
177};
178
179} // End of namespace Titanic
180
181#endif /* TITANIC_PET_INVENTORY_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: mouse_messages.h:103
Definition: pet_control.h:45
Definition: pet_inventory_glyphs.h:145
Definition: pet_inventory.h:35
void draw(CScreenManager *screenManager) override
void itemRemoved(CGameObject *item)
void leave() override
CGameObject * getTransformAnimation(int index)
void changed(int changeType) override
void playMovie(CGameObject *movie, bool repeat=true)
CGameObject * dragEnd(const Point &pt) const override
void enter(PetArea oldArea) override
CGameObject * getBackground(int index) const override
CTextControl * getText() override
Definition: pet_inventory.h:140
bool isValid(CPetControl *petControl) override
void load(SimpleFile *file, int param) override
bool setup(CPetControl *petControl) override
void enterRoom(CRoomItem *room) override
Rect getBounds() const override
void postLoad() override
void save(SimpleFile *file, int indent) override
void highlightItem(CGameObject *item)
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override
bool reset() override
Definition: pet_section.h:51
Definition: room_item.h:33
Definition: screen_manager.h:49
Definition: text_control.h:35
Definition: rect.h:35
Definition: simple_file.h:49
Definition: rect.h:144