ScummVM API documentation
star_view.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_VIEW_H
23 #define TITANIC_STAR_VIEW_H
24 
25 #include "titanic/messages/messages.h"
26 #include "titanic/star_control/camera.h"
27 #include "titanic/star_control/surface_fader.h"
28 #include "titanic/star_control/viewport.h"
29 #include "titanic/support/rect.h"
30 
31 namespace Titanic {
32 
33 class CErrorCode;
34 class CGameObject;
35 class CStarControl;
36 class CStarField;
37 class CVideoSurface;
38 class FVector;
39 
40 class CStarView {
41 private:
42  CStarControl *_owner;
43  CStarField *_starField;
44  CVideoSurface *_videoSurface;
45  CCamera _camera;
46  bool _lensValid;
47  CViewport _photoViewport;
48  CSurfaceFader _fader;
49  CVideoSurface *_photoSurface;
50  CGameObject *_homePhotoMask;
51  bool _stereoPair;
52  bool _showingPhoto;
53 private:
57  void takeHomePhotoHelper(CCamera *camera);
58 
62  void viewRequiredStar(int index);
63 
67  void getRandomViewpoint(FVector &pos, FVector &orientation);
68 
72  void getRandomPhotoViewpoint(FVector &pos, FVector &orientation);
73 
77  void resizeSurface(CScreenManager *scrManager, int width, int height,
78  CVideoSurface **surface);
79 public:
80  CStarView();
81  ~CStarView();
82 
86  void load(SimpleFile *file, int param);
87 
91  void save(SimpleFile *file, int indent);
92 
96  void setup(CScreenManager *screenManager, CStarField *starField, CStarControl *starControl);
97 
101  void takeCurrentHomePhoto();
102 
106  void draw(CScreenManager *screenManager);
107 
111  bool updateCamera();
112 
116  bool MouseButtonDownMsg(int unused, const Point &pt);
117 
121  bool MouseMoveMsg(int unused, const Point &pt);
122 
126  bool ActionMsg(CActionMsg *msg, CErrorCode *errorCode);
127 
131  bool canSetStarDestination() const;
132 
136  void starDestinationSet();
137 
141  void resetView();
142 
143  void triggerFade(bool fadeIn);
144 
148  void viewEarth();
149 
153  void viewFromEarth();
154 
158  void viewBoundaries();
159 
163  void viewConstellations();
164 
168  void viewRandomStar();
169 
173  void fullSpeed();
174 
178  void toggleSteroPair();
179 
183  void toggleHomePhoto();
184 
188  void toggleSolarRendering();
189 
193  void TogglePosFrame();
194 
198  void stereoPairOn();
199 
203  void stereoPairOff();
204 
209  void takeHomePhoto();
210 
214  void lockStar();
215 
219  void unlockStar();
220 };
221 
222 } // End of namespace Titanic
223 
224 #endif /* TITANIC_STAR_VIEW_H */
void setup(CScreenManager *screenManager, CStarField *starField, CStarControl *starControl)
void save(SimpleFile *file, int indent)
Definition: error_code.h:27
Definition: viewport.h:44
Definition: messages.h:410
Definition: simple_file.h:49
void draw(CScreenManager *screenManager)
Definition: surface_fader.h:33
bool MouseButtonDownMsg(int unused, const Point &pt)
Definition: screen_manager.h:49
Definition: game_object.h:79
Definition: camera.h:42
bool ActionMsg(CActionMsg *msg, CErrorCode *errorCode)
Definition: star_field.h:37
Definition: rect.h:144
bool MouseMoveMsg(int unused, const Point &pt)
Definition: arm.h:30
bool canSetStarDestination() const
Definition: star_view.h:40
void toggleSolarRendering()
void load(SimpleFile *file, int param)
void takeCurrentHomePhoto()
Definition: video_surface.h:43
Definition: fvector.h:36
Definition: star_control.h:33