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 
29 namespace Titanic {
30 
31 class CPetControl;
32 
33 class CStarControl : public CGameObject {
34  DECLARE_MESSAGE_MAP;
35  bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
36  bool MouseMoveMsg(CMouseMoveMsg *msg);
37  bool KeyCharMsg(CKeyCharMsg *msg);
38  bool FrameMsg(CFrameMsg *msg);
39  bool MovementMsg(CMovementMsg *msg);
40 private:
41  bool _enabled;
42  CStarField _starField;
43  CStarView _view;
44  Rect _starRect;
45  CPetControl *_petControl;
46 private:
50  void newFrame();
51 public:
52  CLASSDEF;
53  CStarControl();
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 
74  bool isStarFieldMode();
75 
79  void doAction(StarControlAction action);
80 
84  bool isSolved() const;
85 
89  bool isSkipped() const;
90 
94  void forceSolved();
95 
99  bool canSetStarDestination() const;
100 
104  void starDestinationSet();
105 
109  void updateCamera() { _view.updateCamera(); }
110 };
111 
112 } // End of namespace Titanic
113 
114 #endif /* TITANIC_STAR_CONTROL_H */
Definition: mouse_messages.h:47
Definition: simple_file.h:49
Definition: screen_manager.h:49
Definition: game_object.h:79
bool isSolved() const
Definition: star_field.h:37
Definition: rect.h:35
bool isSkipped() const
Definition: arm.h:30
void updateCamera()
Definition: star_control.h:109
void draw(CScreenManager *screenManager) override
Definition: star_view.h:39
Definition: messages.h:307
Definition: mouse_messages.h:71
void doAction(StarControlAction action)
bool canSetStarDestination() const
void save(SimpleFile *file, int indent) override
Definition: messages.h:291
void load(SimpleFile *file) override
Definition: pet_control.h:45
Definition: star_control.h:33
Definition: messages.h:232