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 
27 namespace Ultima {
28 namespace Ultima1 {
29 
30 class Ultima1Game;
31 
32 namespace Maps {
33 
34 class Ultima1Map;
35 
40 private:
44  void unknownAction();
45 protected:
46  Ultima1Game *_game;
47 public:
51  MapBase(Ultima1Game *game, Ultima1Map *map);
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: map_tile.h:36
Definition: str.h:59
~MapBase() override
Definition: map_base.h:56
virtual void attack(int direction, int effectId)
Definition: map_base.h:39
Shared::Maps::MapWidget * createWidget(const Common::String &name) override
Definition: detection.h:27
Definition: rect.h:45
Definition: game.h:42
Definition: map_widget.h:50
MapBase(Ultima1Game *game, Ultima1Map *map)
Definition: map_base.h:47
void castSpell(uint spell) override
void getTileAt(const Point &pt, Shared::Maps::MapTile *tile, bool includePlayer=true) override
virtual void dropCoins(uint coins)
Definition: map_base.h:119