ScummVM API documentation
star_control.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_STAR_CONTROL_H
23#define TITANIC_STAR_CONTROL_H
24
25#include "titanic/core/game_object.h"
26#include "titanic/star_control/star_field.h"
27#include "titanic/star_control/star_view.h"
28
29namespace Titanic {
30
31class CPetControl;
32
33class CStarControl : public CGameObject {
34 DECLARE_MESSAGE_MAP;
35 bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
36 bool MouseMoveMsg(CMouseMoveMsg *msg);
37 bool ActionMsg(CActionMsg *msg);
38 bool FrameMsg(CFrameMsg *msg);
39 bool MovementMsg(CMovementMsg *msg);
40private:
41 bool _enabled;
42 CStarField _starField;
43 CStarView _view;
44 Rect _starRect;
45 CPetControl *_petControl;
46private:
50 void newFrame();
51public:
52 CLASSDEF;
54 ~CStarControl() override;
55
59 void save(SimpleFile *file, int indent) override;
60
64 void load(SimpleFile *file) override;
65
69 void draw(CScreenManager *screenManager) override;
70
75
79 void doAction(StarControlAction action);
80
84 bool isSolved() const;
85
89 bool isSkipped() const;
90
95
100
105
109 void updateCamera() { _view.updateCamera(); }
110};
111
112} // End of namespace Titanic
113
114#endif /* TITANIC_STAR_CONTROL_H */
Definition: messages.h:410
Definition: messages.h:293
Definition: game_object.h:79
Definition: mouse_messages.h:71
Definition: mouse_messages.h:47
Definition: messages.h:234
Definition: pet_control.h:45
Definition: screen_manager.h:49
Definition: star_control.h:33
void updateCamera()
Definition: star_control.h:109
void save(SimpleFile *file, int indent) override
bool isSolved() const
bool canSetStarDestination() const
void doAction(StarControlAction action)
void draw(CScreenManager *screenManager) override
bool isSkipped() const
void load(SimpleFile *file) override
Definition: star_field.h:37
Definition: star_view.h:40
Definition: rect.h:35
Definition: simple_file.h:49