ScummVM API documentation
dungeonman.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/*
23 * Based on the Reverse Engineering work of Christophe Fontanel,
24 * maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
25 */
26
27#ifndef DM_DUNGEONMAN_H
28#define DM_DUNGEONMAN_H
29
30#include "dm/dm.h"
31#include "dm/gfx.h"
32
33namespace DM {
34
35/* Object info */
36enum ObjectInfoIndexConst {
37 kDMObjectInfoIndexFirstScroll = 0, // @ C000_OBJECT_INFO_INDEX_FIRST_SCROLL
38 kDMObjectInfoIndexFirstContainer = 1, // @ C001_OBJECT_INFO_INDEX_FIRST_CONTAINER
39 kDMObjectInfoIndexFirstPotion = 2, // @ C002_OBJECT_INFO_INDEX_FIRST_POTION
40 kDMObjectInfoIndexFirstWeapon = 23, // @ C023_OBJECT_INFO_INDEX_FIRST_WEAPON
41 kDMObjectInfoIndexFirstArmour = 69, // @ C069_OBJECT_INFO_INDEX_FIRST_ARMOUR
42 kDMObjectInfoIndexFirstJunk = 127 // @ C127_OBJECT_INFO_INDEX_FIRST_JUNK
43};
44
45#define kDMMapXNotOnASquare -1 // @ CM1_MAPX_NOT_ON_A_SQUARE
46
47enum ElementType {
48 kDMElementTypeChampion = -2, // @ CM2_ELEMENT_CHAMPION /* Values -2 and -1 are only used as projectile impact types */
49 kDMElementTypeCreature = -1, // @ CM1_ELEMENT_CREATURE
50 kDMElementTypeWall = 0, // @ C00_ELEMENT_WALL /* Values 0-6 are used as square types and projectile impact types. Values 0-2 and 5-6 are also used for square aspect */
51 kDMElementTypeCorridor = 1, // @ C01_ELEMENT_CORRIDOR
52 kDMElementTypePit = 2, // @ C02_ELEMENT_PIT
53 kDMElementTypeStairs = 3, // @ C03_ELEMENT_STAIRS
54 kDMElementTypeDoor = 4, // @ C04_ELEMENT_DOOR
55 kDMElementTypeTeleporter = 5, // @ C05_ELEMENT_TELEPORTER
56 kDMElementTypeFakeWall = 6, // @ C06_ELEMENT_FAKEWALL
57 kDMElementTypeDoorSide = 16, // @ C16_ELEMENT_DOOR_SIDE /* Values 16-19 are only used for square aspect */
58 kDMElementTypeDoorFront = 17, // @ C17_ELEMENT_DOOR_FRONT
59 kDMElementTypeStairsSide = 18, // @ C18_ELEMENT_STAIRS_SIDE
60 kDMElementTypeStairsFront = 19 // @ C19_ELEMENT_STAIRS_FRONT
61};
62
63enum ObjectAllowedSlot {
64 kDMMaskMouth = 0x0001, // @ MASK0x0001_MOUTH
65 kDMMaskHead = 0x0002, // @ MASK0x0002_HEAD
66 kDMMaskNeck = 0x0004, // @ MASK0x0004_NECK
67 kDMMaskTorso = 0x0008, // @ MASK0x0008_TORSO
68 kDMMaskLegs = 0x0010, // @ MASK0x0010_LEGS
69 kDMMaskFeet = 0x0020, // @ MASK0x0020_FEET
70 kDMMaskQuiverLine1 = 0x0040, // @ MASK0x0040_QUIVER_LINE1
71 kDMMaskQuiverLine2 = 0x0080, // @ MASK0x0080_QUIVER_LINE2
72 kDMMaskPouchPassAndThroughDoors = 0x0100, // @ MASK0x0100_POUCH_PASS_AND_THROUGH_DOORS
73 kDMMaskHands = 0x0200, // @ MASK0x0200_HANDS
74 kDMMaskContainer = 0x0400, // @ MASK0x0400_CONTAINER
75 kDMMaskFootprints = 0x8000, // @ MASK0x8000_FOOTPRINTS
76 kDMMaskRandomDrop = 0x8000 // @ MASK0x8000_RANDOM_DROP
77};
78
79enum ArmourAttribute {
80 kDMArmourAttributeShield = 0x0080, // @ MASK0x0080_IS_A_SHIELD
81 kDMArmourAttributeSharpDefense = 0x0007 // @ MASK0x0007_SHARP_DEFENSE
82};
83
84enum WeaponClass {
85 kDMWeaponClassNone = -1,
86/* Class 0: SWING weapons */
87 kDMWeaponClassSwingWeapon = 0, // @ C000_CLASS_SWING_WEAPON
88/* Class 1 to 15: THROW weapons */
89 kDMWeaponClassDaggerAndAxes = 2, // @ C002_CLASS_DAGGER_AND_AXES
90 kDMWeaponClassBowAmmunition = 10, // @ C010_CLASS_BOW_AMMUNITION
91 kDMWeaponClassSlingAmmunition = 11, // @ C011_CLASS_SLING_AMMUNITION
92 kDMWeaponClassPoisinDart = 12, // @ C012_CLASS_POISON_DART
93/* Class 16 to 111: SHOOT weapons */
94 kDMWeaponClassFirstBow = 16, // @ C016_CLASS_FIRST_BOW
95 kDMWeaponClassLastBow = 31, // @ C031_CLASS_LAST_BOW
96 kDMWeaponClassFirstSling = 32, // @ C032_CLASS_FIRST_SLING
97 kDMWeaponClassLastSling = 47, // @ C047_CLASS_LAST_SLING
98/* Class 112 to 255: Magic and special weapons */
99 kDMWeaponClassFirstMagicWeapon = 112 // @ C112_CLASS_FIRST_MAGIC_WEAPON
100};
101
102enum TextType {
103 /* Used for text on walls */
104 kDMTextTypeInscription = 0, // @ C0_TEXT_TYPE_INSCRIPTION
105 /* Used for messages displayed when the party walks on a square */
106 kDMTextTypeMessage = 1, // @ C1_TEXT_TYPE_MESSAGE
107 /* Used for text on scrolls and champion information */
108 kDMTextTypeScroll = 2 // @ C2_TEXT_TYPE_SCROLL
109};
110
111enum SquareAspect {
112 kDMSquareAspectElement = 0, // @ C0_ELEMENT
113 kDMSquareAspectFirstGroupOrObject = 1, // @ C1_FIRST_GROUP_OR_OBJECT
114 kDMSquareAspectRightWallOrnOrd = 2, // @ C2_RIGHT_WALL_ORNAMENT_ORDINAL
115 kDMSquareFrontWallOrnOrd = 3, // @ C3_FRONT_WALL_ORNAMENT_ORDINAL
116 kDMSquareAspectLeftWallOrnOrd = 4, // @ C4_LEFT_WALL_ORNAMENT_ORDINAL
117 kDMSquareAspectPitInvisible = 2, // @ C2_PIT_INVISIBLE
118 kDMSquareAspectTeleporterVisible = 2, // @ C2_TELEPORTER_VISIBLE
119 kDMSquareAspectStairsUp = 2, // @ C2_STAIRS_UP
120 kDMSquareAspectDoorState = 2, // @ C2_DOOR_STATE
121 kDMSquareAspectDoorThingIndex = 3, // @ C3_DOOR_THING_INDEX
122 kDMSquareAspectFloorOrn = 4 // @ C4_FLOOR_ORNAMENT_ORDINAL
123};
124
125#define kDMImmuneToFire 15 // @ C15_IMMUNE_TO_FIRE
126#define kDMImmuneToPoison 15 // @ C15_IMMUNE_TO_POISON
127
128enum TeleporterScope {
129 kDMTeleporterScopeCreatures = 1, // @ MASK0x0001_SCOPE_CREATURES
130 kDMTeleporterScopeObjectsOrParty = 2 // @ MASK0x0002_SCOPE_OBJECTS_OR_PARTY
131};
132
133enum SensorType {
134 kDMSensorDisabled = 0, // @ C000_SENSOR_DISABLED /* Never triggered, may be used for a floor or wall ornament */
135 kDMSensorFloorTheronPartyCreatureObj = 1, // @ C001_SENSOR_FLOOR_THERON_PARTY_CREATURE_OBJECT /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
136 kDMSensorFloorTheronPartyCreature = 2, // @ C002_SENSOR_FLOOR_THERON_PARTY_CREATURE /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
137 kDMSensorFloorParty = 3, // @ C003_SENSOR_FLOOR_PARTY /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
138 kDMSensorFloorObj = 4, // @ C004_SENSOR_FLOOR_OBJECT /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
139 kDMSensorFloorPartyOnStairs = 5, // @ C005_SENSOR_FLOOR_PARTY_ON_STAIRS /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
140 kDMSensorFloorGroupGenerator = 6, // @ C006_SENSOR_FLOOR_GROUP_GENERATOR /* Triggered by event F0245_TIMELINE_ProcessEvent5_Square_Corridor */
141 kDMSensorFloorCreature = 7, // @ C007_SENSOR_FLOOR_CREATURE /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
142 kDMSensorFloorPartyPossession = 8, // @ C008_SENSOR_FLOOR_PARTY_POSSESSION /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
143 kDMSensorFloorVersionChecker = 9, // @ C009_SENSOR_FLOOR_VERSION_CHECKER /* Triggered by party/thing F0276_SENSOR_ProcessThingAdditionOrRemoval */
144 kDMSensorWallOrnClick = 1, // @ C001_SENSOR_WALL_ORNAMENT_CLICK /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
145 kDMSensorWallOrnClickWithAnyObj = 2, // @ C002_SENSOR_WALL_ORNAMENT_CLICK_WITH_ANY_OBJECT /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
146 kDMSensorWallOrnClickWithSpecObj = 3, // @ C003_SENSOR_WALL_ORNAMENT_CLICK_WITH_SPECIFIC_OBJECT /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
147 kDMSensorWallOrnClickWithSpecObjRemoved = 4, // @ C004_SENSOR_WALL_ORNAMENT_CLICK_WITH_SPECIFIC_OBJECT_REMOVED /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
148 kDMSensorWallAndOrGate = 5, // @ C005_SENSOR_WALL_AND_OR_GATE /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
149 kDMSensorWallCountdown = 6, // @ C006_SENSOR_WALL_COUNTDOWN /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
150 kDMSensorWallSingleProjLauncherNewObj = 7, // @ C007_SENSOR_WALL_SINGLE_PROJECTILE_LAUNCHER_NEW_OBJECT /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
151 kDMSensorWallSingleProjLauncherExplosion = 8, // @ C008_SENSOR_WALL_SINGLE_PROJECTILE_LAUNCHER_EXPLOSION /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
152 kDMSensorWallDoubleProjLauncherNewObj = 9, // @ C009_SENSOR_WALL_DOUBLE_PROJECTILE_LAUNCHER_NEW_OBJECT /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
153 kDMSensorWallDoubleProjLauncherExplosion = 10, // @ C010_SENSOR_WALL_DOUBLE_PROJECTILE_LAUNCHER_EXPLOSION /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
154 kDMSensorWallOrnClickWithSpecObjRemovedRotateSensors = 11, // @ C011_SENSOR_WALL_ORNAMENT_CLICK_WITH_SPECIFIC_OBJECT_REMOVED_ROTATE_SENSORS /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
155 kDMSensorWallObjGeneratorRotateSensors = 12, // @ C012_SENSOR_WALL_OBJECT_GENERATOR_ROTATE_SENSORS /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
156 kDMSensorWallSingleObjStorageRotateSensors = 13, // @ C013_SENSOR_WALL_SINGLE_OBJECT_STORAGE_ROTATE_SENSORS /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
157 kDMSensorWallSingleProjLauncherSquareObj = 14, // @ C014_SENSOR_WALL_SINGLE_PROJECTILE_LAUNCHER_SQUARE_OBJECT /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
158 kDMSensorWallDoubleProjLauncherSquareObj = 15, // @ C015_SENSOR_WALL_DOUBLE_PROJECTILE_LAUNCHER_SQUARE_OBJECT /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
159 kDMSensorWallObjExchanger = 16, // @ C016_SENSOR_WALL_OBJECT_EXCHANGER /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
160 kDMSensorWallOrnClickWithSpecObjRemovedSensor = 17, // @ C017_SENSOR_WALL_ORNAMENT_CLICK_WITH_SPECIFIC_OBJECT_REMOVED_REMOVE_SENSOR /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
161 kDMSensorWallEndGame = 18, // @ C018_SENSOR_WALL_END_GAME /* Triggered by event F0248_TIMELINE_ProcessEvent6_Square_Wall */
162 kDMSensorWallChampionPortrait = 127 // @ C127_SENSOR_WALL_CHAMPION_PORTRAIT /* Triggered by player click F0275_SENSOR_IsTriggeredByClickOnWall */
163};
164
165enum WeaponType {
166 kDMWeaponTorch = 2, // @ C02_WEAPON_TORCH
167 kDMWeaponDagger = 8, // @ C08_WEAPON_DAGGER
168 kDMWeaponFalchion = 9, // @ C09_WEAPON_FALCHION
169 kDMWeaponSword = 10, // @ C10_WEAPON_SWORD
170 kDMWeaponClub = 23, // @ C23_WEAPON_CLUB
171 kDMWeaponStoneClub = 24, // @ C24_WEAPON_STONE_CLUB
172 kDMWeaponArrow = 27, // @ C27_WEAPON_ARROW
173 kDMWeaponSlayer = 28, // @ C28_WEAPON_SLAYER
174 kDMWeaponRock = 30, // @ C30_WEAPON_ROCK
175 kDMWeaponPoisonDart = 31, // @ C31_WEAPON_POISON_DART
176 kDMWeaponThrowingStar = 32 // @ C32_WEAPON_THROWING_STAR
177};
178
179enum ArmourType {
180 kDMArmourWoodenShield = 30, // @ C30_ARMOUR_WOODEN_SHIELD
181 kDMArmourArmet = 38, // @ C38_ARMOUR_ARMET
182 kDMArmourTorsoPlate = 39, // @ C39_ARMOUR_TORSO_PLATE
183 kDMArmourLegPlate = 40, // @ C40_ARMOUR_LEG_PLATE
184 kDMArmourFootPlate = 41 // @ C41_ARMOUR_FOOT_PLATE
185};
186
187enum PotionType {
188 kDMPotionTypeVen = 3, // @ C03_POTION_VEN_POTION,
189 kDMPotionTypeRos = 6, // @ C06_POTION_ROS_POTION,
190 kDMPotionTypeKu = 7, // @ C07_POTION_KU_POTION,
191 kDMPotionTypeDane = 8, // @ C08_POTION_DANE_POTION,
192 kDMPotionTypeNeta = 9, // @ C09_POTION_NETA_POTION,
193 kDMPotionTypeAntivenin = 10, // @ C10_POTION_ANTIVENIN,
194 kDMPotionTypeMon = 11, // @ C11_POTION_MON_POTION,
195 kDMPotionTypeYa = 12, // @ C12_POTION_YA_POTION,
196 kDMPotionTypeEe = 13, // @ C13_POTION_EE_POTION,
197 kDMPotionTypeVi = 14, // @ C14_POTION_VI_POTION,
198 kDMPotionTypeWaterFlask = 15, // @ C15_POTION_WATER_FLASK,
199 kDMPotionTypeFulBomb = 19, // @ C19_POTION_FUL_BOMB,
200 kDMPotionTypeEmptyFlask = 20 // @ C20_POTION_EMPTY_FLASK,
201};
202
203enum JunkType {
204 kDMJunkTypeWaterskin = 1, // @ C01_JUNK_WATERSKIN,
205 kDMJunkTypeBones = 5, // @ C05_JUNK_BONES,
206 kDMJunkTypeBoulder = 25, // @ C25_JUNK_BOULDER,
207 kDMJunkTypeScreamerSlice = 33, // @ C33_JUNK_SCREAMER_SLICE,
208 kDMJunkTypeWormRound = 34, // @ C34_JUNK_WORM_ROUND,
209 kDMJunkTypeDrumstickShank = 35, // @ C35_JUNK_DRUMSTICK_SHANK,
210 kDMJunkTypeDragonSteak = 36, // @ C36_JUNK_DRAGON_STEAK,
211 kDMJunkTypeMagicalBoxBlue = 42, // @ C42_JUNK_MAGICAL_BOX_BLUE,
212 kDMJunkTypeMagicalBoxGreen = 43, // @ C43_JUNK_MAGICAL_BOX_GREEN,
213 kDMJunkTypeZokathra = 51 // @ C51_JUNK_ZOKATHRA,
214};
215
216enum ExplosionType {
217 kDMExplosionTypeFireball = 0, // @ C000_EXPLOSION_FIREBALL
218 kDMExplosionTypeSlime = 1, // @ C001_EXPLOSION_SLIME
219 kDMExplosionTypeLightningBolt = 2, // @ C002_EXPLOSION_LIGHTNING_BOLT
220 kDMExplosionTypeHarmNonMaterial = 3, // @ C003_EXPLOSION_HARM_NON_MATERIAL
221 kDMExplosionTypeOpenDoor = 4, // @ C004_EXPLOSION_OPEN_DOOR
222 kDMExplosionTypePoisonBolt = 6, // @ C006_EXPLOSION_POISON_BOLT
223 kDMExplosionTypePoisonCloud = 7, // @ C007_EXPLOSION_POISON_CLOUD
224 kDMExplosionTypeSmoke = 40, // @ C040_EXPLOSION_SMOKE
225 kDMExplosionTypeFluxcage = 50, // @ C050_EXPLOSION_FLUXCAGE
226 kDMExplosionTypeRebirthStep1 = 100, // @ C100_EXPLOSION_REBIRTH_STEP1
227 kDMExplosionTypeRebirthStep2 = 101 // @ C101_EXPLOSION_REBIRTH_STEP2
228};
229
230enum SquareMask {
231 kDMSquareMaskWallWestRandOrnament = 0x1, // @ MASK0x0001_WALL_WEST_RANDOM_ORNAMENT_ALLOWED
232 kDMSquareMaslWallSouthRandOrnament = 0x2, // @ MASK0x0002_WALL_SOUTH_RANDOM_ORNAMENT_ALLOWED
233 kDMSquareMaskWallEastRandOrnament = 0x4, // @ MASK0x0004_WALL_EAST_RANDOM_ORNAMENT_ALLOWED
234 kDMSquareMaskWallNorthRandOrnament = 0x8, // @ MASK0x0008_WALL_NORTH_RANDOM_ORNAMENT_ALLOWED
235 kDMSquareMaskCorridorRandOrnament = 0x8, // @ MASK0x0008_CORRIDOR_RANDOM_ORNAMENT_ALLOWED
236 kDMSquareMaskPitImaginary = 0x1, // @ MASK0x0001_PIT_IMAGINARY
237 kDMSquareMaskPitInvisible = 0x4, // @ MASK0x0004_PIT_INVISIBLE
238 kDMSquareMaskPitOpen = 0x8, // @ MASK0x0008_PIT_OPEN
239 kDMSquareMaskStairsUp = 0x4, // @ MASK0x0004_STAIRS_UP
240 kDMSquareMaskStairsNorthSouth = 0x8, // @ MASK0x0008_STAIRS_NORTH_SOUTH_ORIENTATION
241 kDMSquareMaskDoorNorthSouth = 0x8, // @ MASK0x0008_DOOR_NORTH_SOUTH_ORIENTATION
242 kDMSquareMaskTeleporterVisible = 0x4, // @ MASK0x0004_TELEPORTER_VISIBLE
243 kDMSquareMaskTeleporterOpen = 0x8, // @ MASK0x0008_TELEPORTER_OPEN
244 kDMSquareMaskFakeWallImaginary = 0x1, // @ MASK0x0001_FAKEWALL_IMAGINARY
245 kDMSquareMaskFakeWallOpen = 0x4, // @ MASK0x0004_FAKEWALL_OPEN
246 kDMSquareMaskFakeWallRandOrnamentOrFootprintsAllowed = 0x8, // @ MASK0x0008_FAKEWALL_RANDOM_ORNAMENT_OR_FOOTPRINTS_ALLOWED
247 kDMSquareMaskThingListPresent = 0x10 // @ MASK0x0010_THING_LIST_PRESENT
248};
249
250#define kDMMaskChampionBones 0x8000 // @ MASK0x8000_CHAMPION_BONES
251#define kDMMaskThingType 0x7FFF // @ MASK0x7FFF_THING_TYPE
252
254public:
255 int16 _type;
256 uint16 _objectAspectIndex;
257 uint16 _actionSetIndex;
258 uint16 _allowedSlots;
259 ObjectInfoIndex(int16 type, uint16 objectAspectIndex, uint16 actionSetIndex, uint16 allowedSlots)
260 : _type(type), _objectAspectIndex(objectAspectIndex), _actionSetIndex(actionSetIndex), _allowedSlots(allowedSlots) {}
261 ObjectInfoIndex() : _type(0), _objectAspectIndex(0), _actionSetIndex(0), _allowedSlots(0) {}
262 bool getAllowedSlot(ObjectAllowedSlot slot) { return _allowedSlots & slot; }
263 uint16 getAllowedSlots() { return _allowedSlots; }
264 void setAllowedSlot(ObjectAllowedSlot slot, bool val) {
265 if (val) {
266 _allowedSlots |= slot;
267 } else {
268 _allowedSlots &= ~slot;
269 }
270 }
271}; // @ OBJECT_INFO
272
274public:
275 uint16 _weight;
276 uint16 _defense;
277 uint16 _attributes;
278
279 ArmourInfo(uint16 weight, uint16 defense, uint16 attributes)
280 :_weight(weight), _defense(defense), _attributes(attributes) {}
281 ArmourInfo() :_weight(0), _defense(0), _attributes(0) {}
282
283 uint16 getAttribute(ArmourAttribute attribute) { return _attributes & attribute; }
284 void setAttribute(ArmourAttribute attribute) { _attributes |= attribute; }
285}; // @ ARMOUR_INFO
286
288public:
289 uint16 _weight;
290 uint16 _class;
291 uint16 _strength;
292 uint16 _kineticEnergy;
293private:
294 uint16 _attributes; /* Bits 15-13 Unreferenced */
295public:
296 WeaponInfo(uint16 weight, uint16 wClass, uint16 strength, uint16 kineticEnergy, uint16 attributes)
297 : _weight(weight), _class(wClass), _strength(strength), _kineticEnergy(kineticEnergy), _attributes(attributes) {}
298 WeaponInfo() : _weight(0), _class(0), _strength(0), _kineticEnergy(0), _attributes(0) {}
299
300 uint16 getShootAttack() { return _attributes & 0xFF; } // @ M65_SHOOT_ATTACK
301 uint16 getProjectileAspectOrdinal() { return (_attributes >> 8) & 0x1F; } // @ M66_PROJECTILE_ASPECT_ORDINAL
302}; // @ WEAPON_INFO
303
305public:
306 byte _creatureAspectIndex;
307 byte _attackSoundOrdinal;
308 uint16 _attributes; /* Bits 15-14 Unreferenced */
309 uint16 _graphicInfo; /* Bits 11 and 6 Unreferenced */
310 byte _movementTicks; /* Value 255 means the creature cannot move */
311 byte _attackTicks; /* Minimum ticks between attacks */
312 byte _defense;
313 byte _baseHealth;
314 byte _attack;
315 byte _poisonAttack;
316 byte _dexterity;
317 uint16 _ranges; /* Bits 7-4 Unreferenced */
318 uint16 _properties;
319 uint16 _resistances; /* Bits 15-12 and 3-0 Unreferenced */
320 uint16 _animationTicks; /* Bits 15-12 Unreferenced */
321 uint16 _woundProbabilities; /* Contains 4 probabilities to wound a champion's Head (Bits 15-12), Legs (Bits 11-8), Torso (Bits 7-4) and Feet (Bits 3-0) */
322 byte _attackType;
323
324 uint16 getFearResistance() { return (_properties >> 4) & 0xF; }
325 uint16 getExperience() { return (_properties >> 8) & 0xF; }
326 uint16 getWariness() { return (_properties >> 12) & 0xF; }
327 uint16 getFireResistance() { return (_resistances >> 4) & 0xF; }
328 uint16 getPoisonResistance() { return (_resistances >> 8) & 0xF; }
329 static uint16 getHeight(uint16 attrib) { return (attrib >> 7) & 0x3; }
330 uint16 getSightRange() { return (_ranges) & 0xF; }
331 uint16 getSmellRange() { return (_ranges >> 8) & 0xF; }
332 uint16 getAttackRange() { return (_ranges >> 12) & 0xF; }
333}; // @ CREATURE_INFO
334
335class Door {
336public:
337 Thing _nextThing;
338 uint16 _attributes;
339 Door() : _nextThing(0xFFFF), _attributes(0) {}
340 Thing getNextThing() { return _nextThing; }
341 bool isMeleeDestructible() { return (_attributes >> 8) & 1; }
342 bool isMagicDestructible() { return (_attributes >> 7) & 1; }
343 bool hasButton() { return (_attributes >> 6) & 1; }
344 bool opensVertically() { return (_attributes >> 5) & 1; }
345 byte getOrnOrdinal() { return (_attributes >> 1) & 0xF; }
346 byte getType() { return _attributes & 1; }
347}; // @ DOOR
348
350public:
351 Thing _nextThing;
352 uint16 _attributes;
353 uint16 _destMapIndex;
354 Teleporter() : _nextThing(0xFFFF), _attributes(0), _destMapIndex(0) {}
355 Thing getNextThing() { return _nextThing; }
356 bool isAudible() { return (_attributes >> 15) & 1; }
357 TeleporterScope getScope() { return (TeleporterScope)((_attributes >> 13) & 3); }
358 bool getAbsoluteRotation() { return (_attributes >> 12) & 1; }
359 Direction getRotation() { return (Direction)((_attributes >> 10) & 3); }
360 byte getTargetMapY() { return (_attributes >> 5) & 0x1F; }
361 byte getTargetMapX() { return _attributes & 0x1F; }
362 uint16 getTargetMapIndex() { return _destMapIndex >> 8; }
363}; // @ TELEPORTER
364
366public:
367 Thing _nextThing;
368 uint16 _textDataRef;
369 TextString() : _nextThing(0xFFFF), _textDataRef(0) {}
370
371 Thing getNextThing() { return _nextThing; }
372 uint16 getWordOffset() { return _textDataRef >> 3; }
373 bool isVisible() { return _textDataRef & 1; }
374 void setVisible(bool visible) { _textDataRef = (_textDataRef & ~1) | (visible ? 1 : 0); }
375}; // @ TEXTSTRING
376
377class Sensor {
378public:
379 Thing _nextThing;
380 uint16 _datAndType;
381 uint16 _attributes; // A
382 uint16 _action; // B
383 Sensor() : _nextThing(0xFFFF), _datAndType(0), _attributes(0), _action(0) {}
384
385 Thing getNextThing() { return _nextThing; }
386 void setNextThing(Thing thing) { _nextThing = thing; }
387 SensorType getType() { return (SensorType)(_datAndType & 0x7F); } // @ M39_TYPE
388 uint16 getData() { return (_datAndType >> 7) & 0x1FF; } // @ M40_DATA
389 static uint16 getDataMask1(uint16 data) { return (data >> 7) & 0xF; } // @ M42_MASK1
390 static uint16 getDataMask2(uint16 data) { return (data >> 11) & 0xF; } // @ M43_MASK2
391 void setData(uint16 dat) { _datAndType = (_datAndType & 0x7F) | (dat << 7); } // @ M41_SET_DATA
392 void setTypeDisabled() { _datAndType &= 0xFF80; } // @ M44_SET_TYPE_DISABLED
393
394 bool getAttrOnlyOnce() { return (_attributes >> 2) & 1; }
395 uint16 getAttrEffectA() { return (_attributes >> 3) & 0x3; }
396 bool getAttrRevertEffectA() { return (_attributes >> 5) & 0x1; }
397 bool getAttrAudibleA() { return (_attributes >> 6) & 0x1; }
398 uint16 getAttrValue() { return (_attributes >> 7) & 0xF; }
399 bool getAttrLocalEffect() { return (_attributes >> 11) & 1; }
400 uint16 getAttrOrnOrdinal() { return _attributes >> 12; }
401
402 uint16 getActionTargetMapY() { return (_action >> 11); }
403 uint16 getActionTargetMapX() { return (_action >> 6) & 0x1F; }
404 Cell getActionTargetCell() { return (Cell)((_action >> 4) & 3); }
405 uint16 getActionHealthMultiplier() { return ((_action >> 4) & 0xF); } // @ M45_HEALTH_MULTIPLIER
406 uint16 getActionTicks() { return ((_action >> 4) >> 4) & 0xFFF; } // @ M46_TICKS
407 uint16 getActionKineticEnergy() { return ((_action >> 4) & 0xFF); }// @ M47_KINETIC_ENERGY
408 uint16 getActionStepEnergy() { return ((_action >> 4) >> 8) & 0xFF; }// @ M48_STEP_ENERGY
409 uint16 getActionLocalEffect() { return (_action >> 4); } // @ M49_LOCAL_EFFECT
410
411 void setDatAndTypeWithOr(uint16 val) { _datAndType |= val; }
412
413}; // @ SENSOR
414
415class Weapon {
416public:
417 Thing _nextThing;
418 uint16 _desc;
419 Weapon() : _nextThing(0xFFFF), _desc(0) {}
420
421 WeaponType getType() { return (WeaponType)(_desc & 0x7F); }
422 void setType(uint16 val) { _desc = (_desc & ~0x7F) | (val & 0x7F); }
423 bool isLit() { return (_desc >> 15) & 1; }
424 void setLit(bool val) {
425 if (val)
426 _desc |= (1 << 15);
427 else
428 _desc &= (~(1 << 15));
429 }
430 uint16 getChargeCount() { return (_desc >> 10) & 0xF; }
431 uint16 setChargeCount(uint16 val) { _desc = (_desc & ~(0xF << 10)) | ((val & 0xF) << 10); return (val & 0xF); }
432 Thing getNextThing() { return _nextThing; }
433 void setNextThing(Thing val) { _nextThing = val; }
434 uint16 getCursed() { return (_desc >> 8) & 1; }
435 void setCursed(uint16 val) { _desc = (_desc & ~(1 << 8)) | ((val & 1) << 8); }
436 uint16 getPoisoned() { return (_desc >> 9) & 1; }
437 uint16 getBroken() { return (_desc >> 14) & 1; }
438 uint16 getDoNotDiscard() { return (_desc >> 7) & 1; }
439 void setDoNotDiscard(uint16 val) { _desc = (_desc & ~(1 << 7)) | ((val & 1) << 7); }
440}; // @ WEAPON
441
442class Armour {
443public:
444 Thing _nextThing;
445 uint16 _attributes;
446 Armour() : _nextThing(0xFFFF), _attributes(0) {}
447
448 ArmourType getType() { return (ArmourType)(_attributes & 0x7F); }
449 Thing getNextThing() { return _nextThing; }
450 uint16 getCursed() { return (_attributes >> 8) & 1; }
451 uint16 getBroken() { return (_attributes >> 13) & 1; }
452 uint16 getDoNotDiscard() { return (_attributes >> 7) & 1; }
453 uint16 getChargeCount() { return (_attributes >> 9) & 0xF; }
454 void setChargeCount(uint16 val) { _attributes = (_attributes & ~(0xF << 9)) | ((val & 0xF) << 9); }
455 void setType(uint16 val) { _attributes = (_attributes & ~0x7F) | (val & 0x7F); }
456 void setCursed(uint16 val) { _attributes = (_attributes & ~(1 << 8)) | ((val & 1) << 8); }
457}; // @ ARMOUR
458
459class Scroll {
460public:
461 Thing _nextThing;
462 uint16 _attributes;
463 Scroll() : _nextThing(0xFFFF), _attributes(0) {}
464 void set(Thing next, uint16 attribs) {
465 _nextThing = next;
466 _attributes = attribs;
467 }
468 Thing getNextThing() { return _nextThing; }
469 uint16 getClosed() { return (_attributes >> 10) & 0x3F; } // ??? dunno why, the original bitfield is 6 bits long
470 void setClosed(bool val) {
471 if (val)
472 _attributes |= (1 << 10);
473 else
474 _attributes &= (~(0x3F << 10));
475 }
476 uint16 getTextStringThingIndex() { return _attributes & 0x3FF; }
477}; // @ SCROLL
478
479class Potion {
480public:
481 Thing _nextThing;
482 uint16 _attributes;
483 Potion() : _nextThing(0xFFFF), _attributes(0) {}
484
485 PotionType getType() { return (PotionType)((_attributes >> 8) & 0x7F); }
486 void setType(PotionType val) { _attributes = (_attributes & ~(0x7F << 8)) | ((val & 0x7F) << 8); }
487 Thing getNextThing() { return _nextThing; }
488 uint16 getPower() { return _attributes & 0xFF; }
489 void setPower(uint16 val) { _attributes = (_attributes & ~0xFF) | (val & 0xFF); }
490 uint16 getDoNotDiscard() { return (_attributes >> 15) & 1; }
491}; // @ POTION
492
494public:
495 Thing _nextThing;
496 Thing _slot;
497 uint16 _type;
498 Container() : _nextThing(0xFFFF), _slot(0xFFFF), _type(0) {}
499
500 uint16 getType() { return (_type >> 1) & 0x3; }
501 Thing &getSlot() { return _slot; }
502 Thing &getNextThing() { return _nextThing; }
503}; // @ CONTAINER
504
505class Junk {
506public:
507 Thing _nextThing;
508 uint16 _attributes;
509 Junk() : _nextThing(0xFFFF), _attributes(0) {}
510
511 JunkType getType() { return (JunkType)(_attributes & 0x7F); }
512 void setType(uint16 val) { _attributes = (_attributes & ~0x7F) | (val & 0x7F); }
513 uint16 getChargeCount() { return (_attributes >> 14) & 0x3; }
514 void setChargeCount(uint16 val) { _attributes = (_attributes & ~(0x3 << 14)) | ((val & 0x3) << 14); }
515 uint16 getDoNotDiscard() { return (_attributes >> 7) & 1; }
516 void setDoNotDiscard(uint16 val) { _attributes = (_attributes & ~(1 << 7)) | ((val & 1) << 7); }
517
518 Thing getNextThing() { return _nextThing; }
519 void setNextThing(Thing thing) { _nextThing = thing; }
520 void setCursed(uint16 val) { _attributes = (_attributes & ~(1 << 8)) | ((val & 1) << 8); }
521}; // @ JUNK
522
524public:
525 Thing _nextThing;
526 Thing _slot;
527 uint16 _kineticEnergy;
528 uint16 _attack;
529 uint16 _eventIndex;
530 Projectile() : _nextThing(0xFFFF), _slot(0xFFFF), _kineticEnergy(0), _attack(0), _eventIndex(0) {}
531
532}; // @ PROJECTILE
533
535public:
536 Thing _nextThing;
537 uint16 _attributes;
538 Explosion() : _nextThing(0xFFFF), _attributes(0) {}
539
540 Thing getNextThing() { return _nextThing; }
541 Thing setNextThing(Thing val) { return _nextThing = val; }
542 uint16 getType() { return _attributes & 0x7F; }
543 uint16 setType(uint16 val) { _attributes = (_attributes & ~0x7F) | (val & 0x7F); return (val & 0x7F); }
544 uint16 getAttack() { return (_attributes >> 8) & 0xFF; }
545 void setAttack(uint16 val) { _attributes = (_attributes & ~(0xFF << 8)) | ((val & 0xFF) << 8); }
546 uint16 getCentered() { return (_attributes >> 7) & 0x1; }
547 void setCentered(uint16 val) { _attributes = (_attributes & ~(1 << 7)) | ((val & 1) << 7); }
548}; // @ EXPLOSION
549
550class Square {
551 byte _data;
552public:
553 explicit Square(byte dat = 0) : _data(dat) {}
554 explicit Square(ElementType type) { setType(type); }
555 explicit Square(byte element, byte mask) : _data((element << 5) | mask) {}
556 Square &set(byte dat) { this->_data = dat; return *this; }
557 Square &set(SquareMask mask) { _data |= mask; return *this; }
558 byte get(SquareMask mask) { return _data & mask; }
559 byte getDoorState() { return _data & 0x7; } // @ M36_DOOR_STATE
560 void setDoorState(byte state) { _data = ((_data & ~0x7) | state); } // @ M37_SET_DOOR_STATE
561 ElementType getType() { return (ElementType)(_data >> 5); } // @ M34_SQUARE_TYPE
562 void setType(ElementType type) { _data = (_data & 0x1F) | type << 5; }
563 byte toByte() { return _data; } // I don't like 'em casts
564}; // wrapper for bytes which are used as squares
565
567 uint16 _ornamentRandomSeed;
568 uint16 _rawMapDataSize;
569 uint8 _mapCount;
570 uint16 _textDataWordCount;
571 uint16 _partyStartLocation;
572 uint16 _squareFirstThingCount; // @ SquareFirstThingCount
573 uint16 _thingCounts[16]; // @ ThingCount[16]
574}; // @ DUNGEON_HEADER
575
576struct Map {
577 uint32 _rawDunDataOffset;
578 uint8 _offsetMapX, _offsetMapY;
579
580 uint8 _level; // only used in DMII
581 uint8 _width, _height; // !!! THESRE ARE INCLUSIVE BOUNDARIES
582 // orn short for Ornament
583 uint8 _wallOrnCount; /* May be used in a Sensor on a Wall or closed Fake Wall square */
584 uint8 _randWallOrnCount; /* Used only on some Wall squares and some closed Fake Wall squares */
585 uint8 _floorOrnCount; /* May be used in a Sensor on a Pit, open Fake Wall, Corridor or Teleporter square */
586 uint8 _randFloorOrnCount; /* Used only on some Corridor squares and some open Fake Wall squares */
587
588 uint8 _doorOrnCount;
589 uint8 _creatureTypeCount;
590 uint8 _difficulty;
591
592 FloorSet _floorSet;
593 WallSet _wallSet;
594 uint8 _doorSet0, _doorSet1;
595}; // @ MAP
596
597
598class DoorInfo {
599public:
600 byte _attributes;
601 byte _defense;
602 DoorInfo(byte b1, byte b2) : _attributes(b1), _defense(b2) {}
603 DoorInfo() { resetToZero(); }
604 void resetToZero() { _attributes = _defense = 0; }
605}; // @ DOOR_INFO
606
607class Group;
608
610 DMEngine *_vm;
611
612 DungeonMan(const DungeonMan &other); // no implementation on purpose
613 void operator=(const DungeonMan &rhs); // no implementation on purpose
614
615 Square getRelSquare(Direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY); // @ F0152_DUNGEON_GetRelativeSquare
616
617 void decompressDungeonFile(); // @ F0455_FLOPPY_DecompressDungeon
618
619 int16 getSquareFirstThingIndex(int16 mapX, int16 mapY); // @ F0160_DUNGEON_GetSquareFirstThingIndex
620
621 int16 getRandomOrnOrdinal(bool allowed, int16 count, int16 mapX, int16 mapY, int16 modulo); // @ F0170_DUNGEON_GetRandomOrnamentOrdinal
622 void setSquareAspectOrnOrdinals(uint16 *aspectArray, bool leftAllowed, bool frontAllowed, bool rightAllowed, int16 dir,
623 int16 mapX, int16 mapY, bool isFakeWall); // @ F0171_DUNGEON_SetSquareAspectRandomWallOrnamentOrdinals
624
625public:
626 explicit DungeonMan(DMEngine *dmEngine);
627 ~DungeonMan();
628
629 Square getSquare(int16 mapX, int16 mapY); // @ F0151_DUNGEON_GetSquare
630 void setCurrentMap(uint16 mapIndex); // @ F0173_DUNGEON_SetCurrentMap
631 Thing getSquareFirstThing(int16 mapX, int16 mapY); // @ F0161_DUNGEON_GetSquareFirstThing
632 Thing getNextThing(Thing thing); // @ F0159_DUNGEON_GetNextThing(THING P0280_T_Thing)
633 Door *getDoor(Thing thing);
634 Teleporter *getTeleporter(Thing thing);
635 TextString *getTextString(Thing thing);
636 Sensor *getSensor(Thing thing);
637 Group *getGroup(Thing thing);
638 Weapon *getWeapon(Thing thing);
639 Armour *getArmour(Thing thing);
640 Scroll *getScroll(Thing thing);
641 Potion *getPotion(Thing thing);
642 Container *getContainer(Thing thing);
643 Junk *getJunk(Thing thing);
644 Projectile *getProjectile(Thing thing);
645 Explosion *getExplosion(Thing thing);
646
647 Door *getDoor(uint16 index);
648 Teleporter *getTeleporter(uint16 index);
649 TextString *getTextString(uint16 index);
650 Sensor *getSensor(uint16 index);
651 Group *getGroup(uint16 index);
652 Weapon *getWeapon(uint16 index);
653 Armour *getArmour(uint16 index);
654 Scroll *getScroll(uint16 index);
655 Potion *getPotion(uint16 index);
656 Container *getContainer(uint16 index);
657 Junk *getJunk(uint16 index);
658 Projectile *getProjectile(uint16 index);
659 Explosion *getExplosion(uint16 index);
660
661 void duplicateThing(Thing thing);
662 Thing *getNextThingPtr(Thing thing);
663 void resetThing(Thing thing);
664
665 // TODO: this does stuff other than load the file!
666 void loadDungeonFile(Common::SeekableReadStream *file); // @ F0434_STARTEND_IsLoadDungeonSuccessful_CPSC
667 void setCurrentMapAndPartyMap(uint16 mapIndex); // @ F0174_DUNGEON_SetCurrentMapAndPartyMap
668
669 bool isWallOrnAnAlcove(int16 wallOrnIndex); // @ F0149_DUNGEON_IsWallOrnamentAnAlcove
670 void mapCoordsAfterRelMovement(Direction dir, int16 stepsForward, int16 stepsRight, int16 &posX, int16 &posY); // @ F0150_DUNGEON_UpdateMapCoordinatesAfterRelativeMovement
671 ElementType getRelSquareType(Direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY) {
672 return Square(getRelSquare(dir, stepsForward, stepsRight, posX, posY)).getType();
673 } // @ F0153_DUNGEON_GetRelativeSquareType
674 void setSquareAspect(uint16 *aspectArray, Direction dir, int16 mapX, int16 mapY); // @ F0172_DUNGEON_SetSquareAspect
675 void decodeText(char *destString, size_t maxSize, Thing thing, int16 type); // F0168_DUNGEON_DecodeText
676 Thing getUnusedThing(uint16 thingType); // @ F0166_DUNGEON_GetUnusedThing
677
678 uint16 getObjectWeight(Thing thing); // @ F0140_DUNGEON_GetObjectWeight
679 int16 getObjectInfoIndex(Thing thing); // @ F0141_DUNGEON_GetObjectInfoIndex
680 void linkThingToList(Thing thingToLink, Thing thingInList, int16 mapX, int16 mapY); // @ F0163_DUNGEON_LinkThingToList
681 WeaponInfo *getWeaponInfo(Thing thing); // @ F0158_DUNGEON_GetWeaponInfo
682 int16 getProjectileAspect(Thing thing); // @ F0142_DUNGEON_GetProjectileAspect
683 int16 getLocationAfterLevelChange(int16 mapIndex, int16 levelDelta, int16 *mapX, int16 *mapY); // @ F0154_DUNGEON_GetLocationAfterLevelChange
684 Thing getSquareFirstObject(int16 mapX, int16 mapY); // @ F0162_DUNGEON_GetSquareFirstObject
685 uint16 getArmourDefense(ArmourInfo *armourInfo, bool useSharpDefense); // @ F0143_DUNGEON_GetArmourDefense
686 Thing getDiscardThing(uint16 thingType); // @ F0165_DUNGEON_GetDiscardedThing
687 uint16 getCreatureAttributes(Thing thing); // @ F0144_DUNGEON_GetCreatureAttributes
688 void setGroupCells(Group *group, uint16 cells, uint16 mapIndex); // @ F0146_DUNGEON_SetGroupCells
689 void setGroupDirections(Group *group, int16 dir, uint16 mapIndex); // @ F0148_DUNGEON_SetGroupDirections
690 bool isCreatureAllowedOnMap(Thing thing, uint16 mapIndex); // @ F0139_DUNGEON_IsCreatureAllowedOnMap
691 void unlinkThingFromList(Thing thingToUnlink, Thing thingInList, int16 mapX, int16 mapY); // @ F0164_DUNGEON_UnlinkThingFromList
692 int16 getStairsExitDirection(int16 mapX, int16 mapY); // @ F0155_DUNGEON_GetStairsExitDirection
693 Thing getObjForProjectileLaucherOrObjGen(uint16 iconIndex); // @ F0167_DUNGEON_GetObjectForProjectileLauncherOrObjectGenerator
694 int16 getRandomOrnamentIndex(uint16 val1, uint16 val2, int16 modulo); // @ F0169_DUNGEON_GetRandomOrnamentIndex
695
696 uint32 _rawDunFileDataSize; // @ probably NONE
697 byte *_rawDunFileData; // @ ???
698 DungeonFileHeader _dungeonFileHeader; // @ G0278_ps_DungeonHeader
699
700 uint16 *_dungeonMapsFirstColumnIndex; // @ G0281_pui_DungeonMapsFirstColumnIndex
701 uint16 _dungeonColumCount; // @ G0282_ui_DungeonColumnCount
702 uint16 *_dungeonColumnsCumulativeSquareThingCount; // @ G0280_pui_DungeonColumnsCumulativeSquareThingCount
703 Thing *_squareFirstThings; // @ G0283_pT_SquareFirstThings
704 uint16 *_dungeonTextData; // @ G0260_pui_DungeonTextData
705 // @ G0284_apuc_ThingData
706 Common::Array<Door> _doors;
707 Common::Array<Teleporter> _teleporters;
708 Common::Array<TextString> _textStrings;
709 Common::Array<Sensor> _sensors;
710 Common::Array<Group> _groups;
711 Common::Array<Weapon> _weapons;
712 Common::Array<Armour> _armours;
713 Common::Array<Scroll> _scrolls;
714 Common::Array<Potion> _potions;
715 Common::Array<Container> _containers;
716 Common::Array<Junk> _junks;
717 Common::Array<Projectile> _projectiles;
718 Common::Array<Explosion> _explosions;
719 byte ***_dungeonMapData; // @ G0279_pppuc_DungeonMapData
720
721 Direction _partyDir; // @ G0308_i_PartyDirection
722 int16 _partyMapX; // @ G0306_i_PartyMapX
723 int16 _partyMapY; // @ G0307_i_PartyMapY
724 uint8 _partyMapIndex; // @ G0309_i_PartyMapIndex
725 int16 _currMapIndex; // @ G0272_i_CurrentMapIndex
726 byte **_currMapData; // @ G0271_ppuc_CurrentMapData
727 Map *_currMap; // @ G0269_ps_CurrentMap
728 uint16 _currMapWidth; // @ G0273_i_CurrentMapWidth
729 uint16 _currMapHeight; // @ G0274_i_CurrentMapHeight
730 uint16 *_currMapColCumulativeSquareFirstThingCount; // @G0270_pui_CurrentMapColumnsCumulativeSquareFirstThingCount
731
732 Map *_dungeonMaps; // @ G0277_ps_DungeonMaps
733 byte *_dungeonRawMapData; // @ G0276_puc_DungeonRawMapData
734
735 int16 _currMapInscriptionWallOrnIndex; // @ G0265_i_CurrentMapInscriptionWallOrnamentIndex
736 Box _dungeonViewClickableBoxes[6]; // G0291_aauc_DungeonViewClickableBoxes
737 bool _isFacingAlcove; // @ G0286_B_FacingAlcove
738 bool _isFacingViAltar; // @ G0287_B_FacingViAltar
739 bool _isFacingFountain; // @ G0288_B_FacingFountain
740 ElementType _squareAheadElement; // @ G0285_i_SquareAheadElement
741 Thing _pileTopObject[5]; // @ G0292_aT_PileTopObject
742 DoorInfo _currMapDoorInfo[2]; // @ G0275_as_CurrentMapDoorInfo
743
744 ObjectInfoIndex _objectInfos[180]; // @ G0237_as_Graphic559_ObjectInfo
745 ArmourInfo _armourInfos[58]; // @ G0239_as_Graphic559_ArmourInfo
746 WeaponInfo _weaponInfos[46]; // @ G0238_as_Graphic559_WeaponInfo
747 CreatureInfo _creatureInfos[k27_CreatureTypeCount]; // @ G0243_as_Graphic559_CreatureInfo
748 byte _thingDataWordCount[16]; // @ G0235_auc_Graphic559_ThingDataByteCount
749
750 void setupConstants();
751};
752
753}
754
755#endif
Definition: array.h:52
Definition: stream.h:745
Definition: dungeonman.h:442
Definition: dungeonman.h:273
Definition: gfx.h:557
Definition: dungeonman.h:493
Definition: dungeonman.h:304
Definition: dm.h:169
Definition: dungeonman.h:335
Definition: dungeonman.h:598
Definition: dungeonman.h:609
Definition: dungeonman.h:534
Definition: group.h:127
Definition: dungeonman.h:505
Definition: dungeonman.h:253
Definition: dungeonman.h:479
Definition: dungeonman.h:523
Definition: dungeonman.h:459
Definition: dungeonman.h:377
Definition: dungeonman.h:550
Definition: dungeonman.h:349
Definition: dungeonman.h:365
Definition: dm.h:135
Definition: dungeonman.h:415
Definition: dungeonman.h:287
Definition: dungeonman.h:566
Definition: dungeonman.h:576