ScummVM API documentation
map_base.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_MAPS_MAP_BASE_H
23#define ULTIMA_ULTIMA1_MAPS_MAP_BASE_H
24
25#include "ultima/shared/maps/map_base.h"
26
27namespace Ultima {
28namespace Ultima1 {
29
30class Ultima1Game;
31
32namespace Maps {
33
34class Ultima1Map;
35
40private:
44 void unknownAction();
45protected:
46 Ultima1Game *_game;
47public:
52
56 ~MapBase() override {}
57
61 void getTileAt(const Point &pt, Shared::Maps::MapTile *tile, bool includePlayer = true) override;
62
67
71 #define DEFAULT_ACTION(NAME) virtual void NAME() { unknownAction(); }
72 DEFAULT_ACTION(drop)
73 DEFAULT_ACTION(enter)
74 DEFAULT_ACTION(get)
75 DEFAULT_ACTION(hyperjump)
76 DEFAULT_ACTION(inform)
77 DEFAULT_ACTION(climb)
78 DEFAULT_ACTION(open)
79 DEFAULT_ACTION(steal)
80 DEFAULT_ACTION(talk)
81 DEFAULT_ACTION(unlock)
82 DEFAULT_ACTION(view)
83 DEFAULT_ACTION(disembark)
84
85
88 virtual void attack(int direction, int effectId);
89
99 virtual void attack(int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget) = 0;
100
104 virtual void board();
105
109 virtual void cast();
110
114 void castSpell(uint spell) override;
115
119 virtual void dropCoins(uint coins) {}
120};
121
122} // End of namespace Maps
123} // End of namespace Ultima1
124} // End of namespace Ultima
125
126#endif
Definition: str.h:59
Definition: map_base.h:47
Definition: map_tile.h:36
Definition: map_widget.h:50
Definition: str.h:38
Definition: map_base.h:39
virtual void dropCoins(uint coins)
Definition: map_base.h:119
Shared::Maps::MapWidget * createWidget(const Common::String &name) override
void castSpell(uint spell) override
virtual void attack(int direction, int effectId)
~MapBase() override
Definition: map_base.h:56
void getTileAt(const Point &pt, Shared::Maps::MapTile *tile, bool includePlayer=true) override
MapBase(Ultima1Game *game, Ultima1Map *map)
Definition: game.h:42
Definition: algorithm.h:29
Definition: rect.h:144