22 #ifndef MM1_MAPS_MAP_H 23 #define MM1_MAPS_MAP_H 25 #include "common/array.h" 26 #include "common/str.h" 27 #include "mm/mm1/events.h" 28 #include "mm/mm1/game/game_logic.h" 36 #define MAP_SIZE (MAP_W * MAP_H) 46 MAP_NORTH_EXIT_ID = 8,
47 MAP_NORTH_EXIT_SECTION = 10,
48 MAP_EAST_EXIT_ID = 11,
49 MAP_EAST_EXIT_SECTION = 13,
50 MAP_SOUTH_EXIT_ID = 14,
51 MAP_SOUTH_EXIT_SECTION = 16,
52 MAP_WEST_EXIT_ID = 17,
53 MAP_WEST_EXIT_SECTION = 19,
56 MAP_FLEE_THRESHOLD = 22,
59 MAP_SURRENDER_THRESHOLD = 25,
62 MAP_BRIBE_THRESHOLD = 28,
68 MAP_MAX_MONSTERS = 34,
72 MAP_DISPEL_THRESHOLD = 38,
74 MAP_SURFACE_SECTION = 41,
81 MAP_TRAP_THRESHOLD = 48,
83 MAP_SPECIAL_COUNT = 50
87 WALL_NONE = 0, WALL_NORMAL = 1, WALL_DOOR = 2,
92 CELL_SPECIAL = 0x80, CELL_DARK = 0x20
103 byte _defaultSection;
132 void encounter(
const byte *id1,
const byte *id2);
135 byte _walls[MAP_SIZE];
136 byte _states[MAP_SIZE];
137 uint8 _visited[MAP_SIZE];
140 byte defaultSection,
const char *desc =
nullptr);
176 uint16
getId()
const {
return _id; }
182 return _defaultSection;
194 byte dataByte(uint ofs)
const {
197 uint16 dataWord(uint16 ofs)
const;
198 void dataWord(uint16 ofs, uint16 val);
211 return g_events->send(msg);
215 return g_events->send(name, msg);
virtual bool mappingAllowed() const
Definition: map.h:158
Common::String getDescription() const
Definition: map.h:170
static void none160()
Definition: map.h:127
byte getDefaultSection() const
Definition: map.h:181
const byte & operator[](uint ofs) const
Definition: map.h:188
uint16 getId() const
Definition: map.h:176
Definition: detection.h:27
Definition: game_logic.h:29
Common::String getName() const
Definition: map.h:165
uint getMapIndex() const
Definition: map.h:221
void encounter(const byte *id1, const byte *id2)
bool send(const T &msg)
Definition: map.h:210