ScummVM API documentation
star_crosshairs.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_CROSSHAIRS_H
23#define TITANIC_STAR_CROSSHAIRS_H
24
25#include "titanic/star_control/base_stars.h"
26#include "titanic/star_control/fpoint.h"
27#include "titanic/star_control/surface_area.h"
28#include "titanic/support/video_surface.h"
29#include "common/array.h"
30#include "common/rect.h"
31
32namespace Titanic {
33
34class CStarField;
35class CStarMarkers;
36class CCamera;
37class SimpleFile;
38
40private:
42 CStarPosition _entries[3];
43private:
47 void allocate(int count);
48
52 void clear();
53public:
54 int _matchIndex;
55 int _entryIndex;
56public:
58 ~CStarCrosshairs() { clear(); }
59
63 void load(SimpleFile *file) {}
64
68 void save(SimpleFile *file, int indent) {}
69
73 bool isEmpty() const { return _entryIndex == -1; }
74
75 void selectStar(int starNum, CVideoSurface *surface, CStarField *starField,
76 CStarMarkers *markers);
77
78 void draw(CSurfaceArea *surfaceArea);
79
80 bool fn1(CStarField *starField, CSurfaceArea *surfaceArea, CCamera *camera);
81
85 void incMatches();
86
90 void decMatches(CVideoSurface *surface, CStarField *starField, CStarMarkers *markers);
91
95 void drawStar(int index, CSurfaceArea *surfaceArea);
96
101 void drawEntry(int index, CVideoSurface *surface, CStarField *starField, CStarMarkers *markers);
102
106 void eraseCurrent(CSurfaceArea *surfaceArea);
107
111 void drawAt(const FPoint &pt, CSurfaceArea *surfaceArea);
112
117
121 int indexOf(const Common::Point &pt) const;
122
126 bool isSolved() const { return _matchIndex >= 2; }
127
131 bool isSkipped() const { return _matchIndex == 3; }
132};
133
134} // End of namespace Titanic
135
136#endif /* TITANIC_STAR_CROSSHAIRS_H */
Definition: array.h:52
Definition: camera.h:42
Definition: star_crosshairs.h:39
bool isEmpty() const
Definition: star_crosshairs.h:73
bool isSkipped() const
Definition: star_crosshairs.h:131
void load(SimpleFile *file)
Definition: star_crosshairs.h:63
void decMatches(CVideoSurface *surface, CStarField *starField, CStarMarkers *markers)
FPoint getPosition() const
void save(SimpleFile *file, int indent)
Definition: star_crosshairs.h:68
void eraseCurrent(CSurfaceArea *surfaceArea)
void drawAt(const FPoint &pt, CSurfaceArea *surfaceArea)
void drawStar(int index, CSurfaceArea *surfaceArea)
int indexOf(const Common::Point &pt) const
void drawEntry(int index, CVideoSurface *surface, CStarField *starField, CStarMarkers *markers)
bool isSolved() const
Definition: star_crosshairs.h:126
Definition: star_field.h:37
Definition: star_markers.h:29
Definition: surface_area.h:36
Definition: video_surface.h:43
Definition: fpoint.h:32
Definition: simple_file.h:49
Definition: rect.h:144
Definition: base_stars.h:61