ScummVM API documentation
map_overworld.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 ULTIMA_ULTIMA1_MAP_MAP_OVERWORLD_H
23#define ULTIMA_ULTIMA1_MAP_MAP_OVERWORLD_H
24
25#include "ultima/ultima1/maps/map_base.h"
26
27namespace Ultima {
28namespace Ultima1 {
29namespace Maps {
30
31enum OverworldTile {
32 OTILE_OCEAN = 0, OTILE_GRASS = 1, OTILE_WOODS = 2
33};
34
35class MapOverworld : public MapBase {
36private:
40 void loadWidgets();
41public:
42 MapOverworld(Ultima1Game *game, Ultima1Map *map) : MapBase(game, map) {}
43 ~MapOverworld() override {}
44
48 void load(Shared::Maps::MapId mapId) override;
49
53 bool isMapWrapped() const override { return true; }
54
58 void shiftViewport(const Point &delta) override;
59
63 Point getViewportPosition(const Point &viewportSize) override;
64
68 Point getDeltaPosition(const Point &delta) override;
69
79 void attack(int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget) override;
80
84 void board() override;
85
89 void enter() override;
90
94 void inform() override;
95
99 void disembark() override;
100
104 uint getLandsNumber() const;
105
109 void addOnFoot();
110
115};
116
117} // End of namespace Maps
118} // End of namespace Ultima1
119} // End of namespace Ultima
120
121#endif
Definition: str.h:59
Definition: map_base.h:39
MapBase(Ultima1Game *game, Ultima1Map *map)
Definition: map_overworld.h:35
void attack(int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget) override
bool isMapWrapped() const override
Definition: map_overworld.h:53
Point getDeltaPosition(const Point &delta) override
void shiftViewport(const Point &delta) override
void load(Shared::Maps::MapId mapId) override
Point getViewportPosition(const Point &viewportSize) override
Definition: game.h:42
Definition: rect.h:144