ScummVM API documentation
star_field.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_FIELD_H
23#define TITANIC_STAR_FIELD_H
24
25#include "titanic/star_control/star_field_base.h"
26#include "titanic/star_control/star_closeup.h"
27#include "titanic/star_control/star_markers.h"
28#include "titanic/star_control/star_crosshairs.h"
29#include "titanic/star_control/const_boundaries.h"
30#include "titanic/star_control/constellations.h"
31
32namespace Titanic {
33
34#define STAR_SCALE 1024.0F
35#define UNIVERSE_SCALE 3000000.0f
36
37class CStarField : public CStarFieldBase {
38private:
39 CStarMarkers _markers;
40 CStarCrosshairs _crosshairs;
41 CConstBoundaries _constBounds;
42 CConstellations _constMap;
43 CStarCloseup _starCloseup;
44 bool _renderBoundaries;
45 bool _renderConstMap;
46 StarMode _mode;
47 bool _showBox;
48 bool _closeToMarker;
49 bool _isSolved;
50private:
54 void drawBox(CSurfaceArea *surfaceArea);
55
60 void renderLockLine(CSurfaceArea *surfaceArea, CCamera *camera);
61public:
62 CStarField();
63
67 void load(SimpleFile *file) override;
68
72 void save(SimpleFile *file, int indent) override;
73
74 bool initDocument();
75
79 void render(CVideoSurface *surface, CCamera *camera);
80
81 bool getBoundaryState() const;
82
83 void setBoundaryState(bool state);
84
85 bool getConstMapState() const;
86
87 void setConstMapState(bool state);
88
89 int get54() const;
90 void set54(int val);
91
95 StarMode getMode() const;
96
100 void setMode(StarMode mode);
101
105 void toggleBox();
106
110 bool setBoxVisible(bool isVisible);
111
115 int getMatchedIndex() const;
116
120 bool isCloseToMarker() const;
121
125 void setSolved();
126
130 bool isSolved() const;
131
135 bool isSkipped() const;
136
141
145 int getMarkerCount() const {
146 return _markers.size();
147 }
148
149 void fn1(CErrorCode *errorCode);
150
154 double lockDistance(CSurfaceArea *surfaceArea, CCamera *camera,
155 FVector &screenCoord, FVector &worldCoord, FVector &photoPos);
156
157 void fn6(CVideoSurface *surface, CCamera *camera);
158
163
168
169 void ToggleSolarRendering() { _starCloseup.fn1(); }
170
174 bool mouseButtonDown(CVideoSurface *surface, CCamera *camera,
175 int flags, const Common::Point &pt);
176
181
185 const CBaseStarEntry *getStar(int index) const;
186};
187
188} // End of namespace Titanic
189
190#endif /* TITANIC_STAR_FIELD_H */
Definition: camera.h:42
Definition: const_boundaries.h:33
Definition: constellations.h:33
Definition: error_code.h:27
Definition: star_closeup.h:39
Definition: star_crosshairs.h:39
Definition: star_field_base.h:29
Definition: star_field.h:37
void render(CVideoSurface *surface, CCamera *camera)
bool isSolved() const
int getMatchedIndex() const
void save(SimpleFile *file, int indent) override
const CBaseStarEntry * getRandomStar() const
bool isCloseToMarker() const
StarMode getMode() const
bool mouseButtonDown(CVideoSurface *surface, CCamera *camera, int flags, const Common::Point &pt)
int getMarkerCount() const
Definition: star_field.h:145
void setMode(StarMode mode)
bool isSkipped() const
void load(SimpleFile *file) override
const CBaseStarEntry * getStar(int index) const
bool setBoxVisible(bool isVisible)
void decLockLevel(CVideoSurface *surface)
double lockDistance(CSurfaceArea *surfaceArea, CCamera *camera, FVector &screenCoord, FVector &worldCoord, FVector &photoPos)
Definition: star_markers.h:29
Definition: surface_area.h:36
Definition: video_surface.h:43
Definition: fvector.h:36
Definition: simple_file.h:49
Definition: rect.h:144
Definition: base_stars.h:42