ScummVM API documentation
scalpel_map.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 SHERLOCK_SCALPEL_MAP_H
23#define SHERLOCK_SCALPEL_MAP_H
24
25#include "common/scummsys.h"
26#include "common/array.h"
27#include "common/rect.h"
28#include "common/str-array.h"
29#include "sherlock/surface.h"
30#include "sherlock/map.h"
31#include "sherlock/resources.h"
32
33namespace Sherlock {
34
35class SherlockEngine;
36
37namespace Scalpel {
38
39
41 int _translate;
42
43 MapEntry() : Common::Point(), _translate(-1) {}
44
45 MapEntry(int posX, int posY, int translate) : Common::Point(posX, posY), _translate(translate) {}
46};
47
48class MapPaths {
49private:
50 int _numLocations;
52
53public:
54 MapPaths();
55
59 void load(int numLocations, Common::SeekableReadStream &s);
60
64 const byte *getPath(int srcLocation, int destLocation);
65};
66
67class ScalpelMap: public Map {
68private:
69 Common::Array<MapEntry> _points; // Map locations for each scene
70 Common::StringArray _locationNames;
71 MapPaths _paths;
73 Common::Point _savedPos;
74 Common::Point _savedSize;
75 Surface _topLine;
76 ImageFile *_mapCursors;
77 ImageFile *_shapes;
78 ImageFile *_iconShapes;
79 WalkSequences _walkSequences;
80 Point32 _lDrawnPos;
81 int _point;
82 bool _placesShown;
83 int _cursorIndex;
84 bool _drawMap;
85 Surface _iconSave;
86protected:
90 void loadData();
91
96
101
106
111
116
120 void showPlaceName(int idx, bool highlighted);
121
125 void updateMap(bool flushScreen);
126
131
135 void saveIcon(ImageFrame *src, const Common::Point &pt);
136
141
146public:
148 ~ScalpelMap() override {}
149
150 const MapEntry &operator[](int idx) { return _points[idx]; }
151
155 void loadPoints(int count, const int *xList, const int *yList, const int *transList);
156
160 void loadSequences(int count, const byte *seq);
161
165 int show() override;
166};
167
168} // End of namespace Scalpel
169
170} // End of namespace Sherlock
171
172#endif
Definition: array.h:52
Definition: stream.h:745
Definition: image_file.h:78
Definition: map.h:32
Definition: objects.h:101
Definition: scalpel_map.h:48
void load(int numLocations, Common::SeekableReadStream &s)
const byte * getPath(int srcLocation, int destLocation)
Definition: scalpel_map.h:67
void showPlaceName(int idx, bool highlighted)
void highlightIcon(const Common::Point &pt)
void saveIcon(ImageFrame *src, const Common::Point &pt)
void loadPoints(int count, const int *xList, const int *yList, const int *transList)
void updateMap(bool flushScreen)
void loadSequences(int count, const byte *seq)
Definition: sherlock.h:206
Definition: surface.h:130
Definition: objects.h:146
Definition: rect.h:144
Definition: image_file.h:36
Definition: scalpel_map.h:40