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/star_control/camera.h"
26 #include "titanic/star_control/surface_fader.h"
27 #include "titanic/star_control/viewport.h"
28 #include "titanic/support/rect.h"
29 
30 namespace Titanic {
31 
32 class CErrorCode;
33 class CGameObject;
34 class CStarControl;
35 class CStarField;
36 class CVideoSurface;
37 class FVector;
38 
39 class CStarView {
40 private:
41  CStarControl *_owner;
42  CStarField *_starField;
43  CVideoSurface *_videoSurface;
44  CCamera _camera;
45  bool _lensValid;
46  CViewport _photoViewport;
47  CSurfaceFader _fader;
48  CVideoSurface *_photoSurface;
49  CGameObject *_homePhotoMask;
50  bool _stereoPair;
51  bool _showingPhoto;
52 private:
56  void takeHomePhotoHelper(CCamera *camera);
57 
61  void viewRequiredStar(int index);
62 
66  void getRandomViewpoint(FVector &pos, FVector &orientation);
67 
71  void getRandomPhotoViewpoint(FVector &pos, FVector &orientation);
72 
76  void resizeSurface(CScreenManager *scrManager, int width, int height,
77  CVideoSurface **surface);
78 public:
79  CStarView();
80  ~CStarView();
81 
85  void load(SimpleFile *file, int param);
86 
90  void save(SimpleFile *file, int indent);
91 
95  void setup(CScreenManager *screenManager, CStarField *starField, CStarControl *starControl);
96 
100  void takeCurrentHomePhoto();
101 
105  void draw(CScreenManager *screenManager);
106 
110  bool updateCamera();
111 
115  bool MouseButtonDownMsg(int unused, const Point &pt);
116 
120  bool MouseMoveMsg(int unused, const Point &pt);
121 
125  bool KeyCharMsg(int key, CErrorCode *errorCode);
126 
130  bool canSetStarDestination() const;
131 
135  void starDestinationSet();
136 
140  void resetView();
141 
142  void triggerFade(bool fadeIn);
143 
147  void viewEarth();
148 
152  void viewFromEarth();
153 
157  void viewBoundaries();
158 
162  void viewConstellations();
163 
167  void viewRandomStar();
168 
172  void fullSpeed();
173 
177  void toggleSteroPair();
178 
182  void toggleHomePhoto();
183 
187  void toggleSolarRendering();
188 
192  void TogglePosFrame();
193 
197  void stereoPairOn();
198 
202  void stereoPairOff();
203 
208  void takeHomePhoto();
209 
213  void lockStar();
214 
218  void unlockStar();
219 };
220 
221 } // End of namespace Titanic
222 
223 #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
bool KeyCharMsg(int key, CErrorCode *errorCode)
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
Definition: star_field.h:37
Definition: rect.h:45
bool MouseMoveMsg(int unused, const Point &pt)
Definition: arm.h:30
bool canSetStarDestination() const
Definition: star_view.h:39
void toggleSolarRendering()
void load(SimpleFile *file, int param)
void takeCurrentHomePhoto()
Definition: video_surface.h:43
Definition: fvector.h:36
Definition: star_control.h:33