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
31namespace Titanic {
32
33class CErrorCode;
34class CGameObject;
35class CStarControl;
36class CStarField;
37class CVideoSurface;
38class FVector;
39
40class CStarView {
41private:
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;
53private:
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);
79public:
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
102
106 void draw(CScreenManager *screenManager);
107
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
132
137
141 void resetView();
142
143 void triggerFade(bool fadeIn);
144
148 void viewEarth();
149
154
159
164
169
173 void fullSpeed();
174
179
184
189
194
199
204
210
214 void lockStar();
215
220};
221
222} // End of namespace Titanic
223
224#endif /* TITANIC_STAR_VIEW_H */
Definition: messages.h:410
Definition: camera.h:42
Definition: error_code.h:27
Definition: game_object.h:79
Definition: screen_manager.h:49
Definition: star_control.h:33
Definition: star_field.h:37
Definition: star_view.h:40
void setup(CScreenManager *screenManager, CStarField *starField, CStarControl *starControl)
bool canSetStarDestination() const
bool ActionMsg(CActionMsg *msg, CErrorCode *errorCode)
void load(SimpleFile *file, int param)
void save(SimpleFile *file, int indent)
bool MouseMoveMsg(int unused, const Point &pt)
void toggleSolarRendering()
bool MouseButtonDownMsg(int unused, const Point &pt)
void takeCurrentHomePhoto()
void draw(CScreenManager *screenManager)
Definition: surface_fader.h:33
Definition: video_surface.h:43
Definition: viewport.h:44
Definition: fvector.h:36
Definition: simple_file.h:49
Definition: rect.h:144