ScummVM API documentation
minimap.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#include "ultima/ultima8/misc/common_types.h"
23#include "graphics/surface.h"
24
25#ifndef ULTIMA8_WORLD_MINIMAP_H
26#define ULTIMA8_WORLD_MINIMAP_H
27
28namespace Common {
29class Path;
30}
31
32namespace Ultima {
33namespace Ultima8 {
34
35class CurrentMap;
36class Item;
37
38#define MINMAPGUMP_SCALE 8
39
40class MiniMap {
41private:
42 uint32 _mapNum;
43 Graphics::Surface _surface;
44
45 uint32 sampleAtPoint(const CurrentMap &map, int x, int y);
46 uint32 sampleAtPoint(const Item &item, int x, int y);
47
48 const Common::Rect getCropBounds() const;
49public:
50 MiniMap(uint32 mapNum);
51 ~MiniMap();
52
53 void update(const CurrentMap &map);
54 Common::Point getItemLocation(const Item &item, unsigned int chunkSize);
55
56 uint32 getMapNum() const { return _mapNum; }
57 Graphics::Surface *getSurface() { return &_surface; }
58
59 bool load(Common::ReadStream *rs, uint32 version);
60 void save(Common::WriteStream *ws) const;
61 bool dump(const Common::Path &filename) const;
62};
63
64} // End of namespace Ultima8
65} // End of namespace Ultima
66
67#endif
Definition: path.h:52
Definition: stream.h:385
Definition: stream.h:77
Definition: current_map.h:45
Definition: item.h:42
Definition: minimap.h:40
Definition: algorithm.h:29
Path
Definition: game.h:76
Definition: rect.h:144
Definition: rect.h:536
Definition: surface.h:67