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 
33 namespace DM {
34 
35 /* Object info */
36 enum 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 
47 enum 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 
63 enum 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 
79 enum ArmourAttribute {
80  kDMArmourAttributeShield = 0x0080, // @ MASK0x0080_IS_A_SHIELD
81  kDMArmourAttributeSharpDefense = 0x0007 // @ MASK0x0007_SHARP_DEFENSE
82 };
83 
84 enum 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 
102 enum 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 
111 enum 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 
128 enum TeleporterScope {
129  kDMTeleporterScopeCreatures = 1, // @ MASK0x0001_SCOPE_CREATURES
130  kDMTeleporterScopeObjectsOrParty = 2 // @ MASK0x0002_SCOPE_OBJECTS_OR_PARTY
131 };
132 
133 enum 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 
165 enum 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 
179 enum 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 
187 enum 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 
203 enum 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 
216 enum 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 
230 enum 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 
254 public:
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 
273 class ArmourInfo {
274 public:
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 
287 class WeaponInfo {
288 public:
289  uint16 _weight;
290  uint16 _class;
291  uint16 _strength;
292  uint16 _kineticEnergy;
293 private:
294  uint16 _attributes; /* Bits 15-13 Unreferenced */
295 public:
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 
305 public:
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 
335 class Door {
336  Thing _nextThing;
337  uint16 _attributes;
338 public:
339  explicit Door(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
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 
349 class Teleporter {
350  Thing _nextThing;
351  uint16 _attributes;
352  uint16 _destMapIndex;
353 public:
354  explicit Teleporter(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]), _destMapIndex(rawDat[2]) {}
355  Thing getNextThing() { return _nextThing; }
356  bool isAudible() { return (_attributes >> 15) & 1; }
357  TeleporterScope getScope() { return (TeleporterScope)((_attributes >> 13) & 1); }
358  bool getAbsoluteRotation() { return (_attributes >> 12) & 1; }
359  Direction getRotation() { return (Direction)((_attributes >> 10) & 1); }
360  byte getTargetMapY() { return (_attributes >> 5) & 0xF; }
361  byte getTargetMapX() { return _attributes & 0xF; }
362  uint16 getTargetMapIndex() { return _destMapIndex >> 8; }
363 }; // @ TELEPORTER
364 
365 class TextString {
366  Thing _nextThing;
367  uint16 _textDataRef;
368 public:
369  explicit TextString(uint16 *rawDat) : _nextThing(rawDat[0]), _textDataRef(rawDat[1]) {}
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 
377 class Sensor {
378  Thing _nextThing;
379  uint16 _datAndType;
380  uint16 _attributes; // A
381  uint16 _action; // B
382 public:
383  explicit Sensor(uint16 *rawDat) : _nextThing(rawDat[0]), _datAndType(rawDat[1]), _attributes(rawDat[2]), _action(rawDat[3]) {}
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 = dat; } // @ 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 
415 class Weapon {
416  Thing _nextThing;
417  uint16 _desc;
418 public:
419  explicit Weapon(uint16 *rawDat) : _nextThing(rawDat[0]), _desc(rawDat[1]) {}
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 
442 class Armour {
443  Thing _nextThing;
444  uint16 _attributes;
445 public:
446  explicit Armour(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
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 }; // @ ARMOUR
456 
457 class Scroll {
458  Thing _nextThing;
459  uint16 _attributes;
460 public:
461  explicit Scroll(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
462  void set(Thing next, uint16 attribs) {
463  _nextThing = next;
464  _attributes = attribs;
465  }
466  Thing getNextThing() { return _nextThing; }
467  uint16 getClosed() { return (_attributes >> 10) & 0x3F; } // ??? dunno why, the original bitfield is 6 bits long
468  void setClosed(bool val) {
469  if (val)
470  _attributes |= (1 << 10);
471  else
472  _attributes &= (~(0x3F << 10));
473  }
474  uint16 getTextStringThingIndex() { return _attributes & 0x3FF; }
475 }; // @ SCROLL
476 
477 class Potion {
478 public:
479  Thing _nextThing;
480  uint16 _attributes;
481  explicit Potion(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
482 
483  PotionType getType() { return (PotionType)((_attributes >> 8) & 0x7F); }
484  void setType(PotionType val) { _attributes = (_attributes & ~(0x7F << 8)) | ((val & 0x7F) << 8); }
485  Thing getNextThing() { return _nextThing; }
486  uint16 getPower() { return _attributes & 0xFF; }
487  void setPower(uint16 val) { _attributes = (_attributes & ~0xFF) | (val & 0xFF); }
488  uint16 getDoNotDiscard() { return (_attributes >> 15) & 1; }
489 }; // @ POTION
490 
491 class Container {
492  Thing _nextThing;
493  Thing _slot;
494  uint16 _type;
495 public:
496  explicit Container(uint16 *rawDat) : _nextThing(rawDat[0]), _slot(rawDat[1]), _type(rawDat[2]) {}
497 
498  uint16 getType() { return (_type >> 1) & 0x3; }
499  Thing &getSlot() { return _slot; }
500  Thing &getNextThing() { return _nextThing; }
501 }; // @ CONTAINER
502 
503 class Junk {
504  Thing _nextThing;
505  uint16 _attributes;
506 public:
507  explicit Junk(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
508 
509  JunkType getType() { return (JunkType)(_attributes & 0x7F); }
510  void setType(uint16 val) { _attributes = (_attributes & ~0x7F) | (val & 0x7F); }
511  uint16 getChargeCount() { return (_attributes >> 14) & 0x3; }
512  void setChargeCount(uint16 val) { _attributes = (_attributes & ~(0x3 << 14)) | ((val & 0x3) << 14); }
513  uint16 getDoNotDiscard() { return (_attributes >> 7) & 1; }
514  void setDoNotDiscard(uint16 val) { _attributes = (_attributes & ~(1 << 7)) | ((val & 1) << 7); }
515 
516  Thing getNextThing() { return _nextThing; }
517  void setNextThing(Thing thing) { _nextThing = thing; }
518 }; // @ JUNK
519 
520 class Projectile {
521 public:
522  Thing _nextThing;
523  Thing _slot;
524  uint16 _kineticEnergy;
525  uint16 _attack;
526  uint16 _eventIndex;
527  explicit Projectile(uint16 *rawDat) : _nextThing(rawDat[0]), _slot(rawDat[1]), _kineticEnergy(rawDat[2]),
528  _attack(rawDat[3]), _eventIndex(rawDat[4]) {}
529 
530 }; // @ PROJECTILE
531 
532 class Explosion {
533  Thing _nextThing;
534  uint16 _attributes;
535 public:
536  explicit Explosion(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]) {}
537 
538  Thing getNextThing() { return _nextThing; }
539  Thing setNextThing(Thing val) { return _nextThing = val; }
540  uint16 getType() { return _attributes & 0x7F; }
541  uint16 setType(uint16 val) { _attributes = (_attributes & ~0x7F) | (val & 0x7F); return (val & 0x7F); }
542  uint16 getAttack() { return (_attributes >> 8) & 0xFF; }
543  void setAttack(uint16 val) { _attributes = (_attributes & ~(0xFF << 8)) | ((val & 0xFF) << 8); }
544  uint16 getCentered() { return (_attributes >> 7) & 0x1; }
545  void setCentered(uint16 val) { _attributes = (_attributes & ~(1 << 7)) | ((val & 1) << 7); }
546 }; // @ EXPLOSION
547 
548 class Square {
549  byte _data;
550 public:
551  explicit Square(byte dat = 0) : _data(dat) {}
552  explicit Square(ElementType type) { setType(type); }
553  explicit Square(byte element, byte mask) : _data((element << 5) | mask) {}
554  Square &set(byte dat) { this->_data = dat; return *this; }
555  Square &set(SquareMask mask) { _data |= mask; return *this; }
556  byte get(SquareMask mask) { return _data & mask; }
557  byte getDoorState() { return _data & 0x7; } // @ M36_DOOR_STATE
558  void setDoorState(byte state) { _data = ((_data & ~0x7) | state); } // @ M37_SET_DOOR_STATE
559  ElementType getType() { return (ElementType)(_data >> 5); } // @ M34_SQUARE_TYPE
560  void setType(ElementType type) { _data = (_data & 0x1F) | type << 5; }
561  byte toByte() { return _data; } // I don't like 'em casts
562 }; // wrapper for bytes which are used as squares
563 
565  uint16 _ornamentRandomSeed;
566  uint16 _rawMapDataSize;
567  uint8 _mapCount;
568  uint16 _textDataWordCount;
569  uint16 _partyStartLocation;
570  uint16 _squareFirstThingCount; // @ SquareFirstThingCount
571  uint16 _thingCounts[16]; // @ ThingCount[16]
572 }; // @ DUNGEON_HEADER
573 
574 struct Map {
575  uint32 _rawDunDataOffset;
576  uint8 _offsetMapX, _offsetMapY;
577 
578  uint8 _level; // only used in DMII
579  uint8 _width, _height; // !!! THESRE ARE INCLUSIVE BOUNDARIES
580  // orn short for Ornament
581  uint8 _wallOrnCount; /* May be used in a Sensor on a Wall or closed Fake Wall square */
582  uint8 _randWallOrnCount; /* Used only on some Wall squares and some closed Fake Wall squares */
583  uint8 _floorOrnCount; /* May be used in a Sensor on a Pit, open Fake Wall, Corridor or Teleporter square */
584  uint8 _randFloorOrnCount; /* Used only on some Corridor squares and some open Fake Wall squares */
585 
586  uint8 _doorOrnCount;
587  uint8 _creatureTypeCount;
588  uint8 _difficulty;
589 
590  FloorSet _floorSet;
591  WallSet _wallSet;
592  uint8 _doorSet0, _doorSet1;
593 }; // @ MAP
594 
595 
596 class DoorInfo {
597 public:
598  byte _attributes;
599  byte _defense;
600  DoorInfo(byte b1, byte b2) : _attributes(b1), _defense(b2) {}
601  DoorInfo() { resetToZero(); }
602  void resetToZero() { _attributes = _defense = 0; }
603 }; // @ DOOR_INFO
604 
605 class Group;
606 
607 class DungeonMan {
608  DMEngine *_vm;
609 
610  DungeonMan(const DungeonMan &other); // no implementation on purpose
611  void operator=(const DungeonMan &rhs); // no implementation on purpose
612 
613  Square getRelSquare(Direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY); // @ F0152_DUNGEON_GetRelativeSquare
614 
615  void decompressDungeonFile(); // @ F0455_FLOPPY_DecompressDungeon
616 
617  int16 getSquareFirstThingIndex(int16 mapX, int16 mapY); // @ F0160_DUNGEON_GetSquareFirstThingIndex
618 
619  int16 getRandomOrnOrdinal(bool allowed, int16 count, int16 mapX, int16 mapY, int16 modulo); // @ F0170_DUNGEON_GetRandomOrnamentOrdinal
620  void setSquareAspectOrnOrdinals(uint16 *aspectArray, bool leftAllowed, bool frontAllowed, bool rightAllowed, int16 dir,
621  int16 mapX, int16 mapY, bool isFakeWall); // @ F0171_DUNGEON_SetSquareAspectRandomWallOrnamentOrdinals
622 
623 public:
624  explicit DungeonMan(DMEngine *dmEngine);
625  ~DungeonMan();
626 
627  Square getSquare(int16 mapX, int16 mapY); // @ F0151_DUNGEON_GetSquare
628  void setCurrentMap(uint16 mapIndex); // @ F0173_DUNGEON_SetCurrentMap
629  Thing getSquareFirstThing(int16 mapX, int16 mapY); // @ F0161_DUNGEON_GetSquareFirstThing
630  Thing getNextThing(Thing thing); // @ F0159_DUNGEON_GetNextThing(THING P0280_T_Thing)
631  uint16 *getThingData(Thing thing); // @ F0156_DUNGEON_GetThingData
632  uint16 *getSquareFirstThingData(int16 mapX, int16 mapY); // @ F0157_DUNGEON_GetSquareFirstThingData
633 
634  // TODO: this does stuff other than load the file!
635  void loadDungeonFile(Common::InSaveFile *file); // @ F0434_STARTEND_IsLoadDungeonSuccessful_CPSC
636  void setCurrentMapAndPartyMap(uint16 mapIndex); // @ F0174_DUNGEON_SetCurrentMapAndPartyMap
637 
638  bool isWallOrnAnAlcove(int16 wallOrnIndex); // @ F0149_DUNGEON_IsWallOrnamentAnAlcove
639  void mapCoordsAfterRelMovement(Direction dir, int16 stepsForward, int16 stepsRight, int16 &posX, int16 &posY); // @ F0150_DUNGEON_UpdateMapCoordinatesAfterRelativeMovement
640  ElementType getRelSquareType(Direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY) {
641  return Square(getRelSquare(dir, stepsForward, stepsRight, posX, posY)).getType();
642  } // @ F0153_DUNGEON_GetRelativeSquareType
643  void setSquareAspect(uint16 *aspectArray, Direction dir, int16 mapX, int16 mapY); // @ F0172_DUNGEON_SetSquareAspect
644  void decodeText(char *destString, size_t maxSize, Thing thing, TextType type); // F0168_DUNGEON_DecodeText
645  Thing getUnusedThing(uint16 thingType); // @ F0166_DUNGEON_GetUnusedThing
646 
647  uint16 getObjectWeight(Thing thing); // @ F0140_DUNGEON_GetObjectWeight
648  int16 getObjectInfoIndex(Thing thing); // @ F0141_DUNGEON_GetObjectInfoIndex
649  void linkThingToList(Thing thingToLink, Thing thingInList, int16 mapX, int16 mapY); // @ F0163_DUNGEON_LinkThingToList
650  WeaponInfo *getWeaponInfo(Thing thing); // @ F0158_DUNGEON_GetWeaponInfo
651  int16 getProjectileAspect(Thing thing); // @ F0142_DUNGEON_GetProjectileAspect
652  int16 getLocationAfterLevelChange(int16 mapIndex, int16 levelDelta, int16 *mapX, int16 *mapY); // @ F0154_DUNGEON_GetLocationAfterLevelChange
653  Thing getSquareFirstObject(int16 mapX, int16 mapY); // @ F0162_DUNGEON_GetSquareFirstObject
654  uint16 getArmourDefense(ArmourInfo *armourInfo, bool useSharpDefense); // @ F0143_DUNGEON_GetArmourDefense
655  Thing getDiscardThing(uint16 thingType); // @ F0165_DUNGEON_GetDiscardedThing
656  uint16 getCreatureAttributes(Thing thing); // @ F0144_DUNGEON_GetCreatureAttributes
657  void setGroupCells(Group *group, uint16 cells, uint16 mapIndex); // @ F0146_DUNGEON_SetGroupCells
658  void setGroupDirections(Group *group, int16 dir, uint16 mapIndex); // @ F0148_DUNGEON_SetGroupDirections
659  bool isCreatureAllowedOnMap(Thing thing, uint16 mapIndex); // @ F0139_DUNGEON_IsCreatureAllowedOnMap
660  void unlinkThingFromList(Thing thingToUnlink, Thing thingInList, int16 mapX, int16 mapY); // @ F0164_DUNGEON_UnlinkThingFromList
661  int16 getStairsExitDirection(int16 mapX, int16 mapY); // @ F0155_DUNGEON_GetStairsExitDirection
662  Thing getObjForProjectileLaucherOrObjGen(uint16 iconIndex); // @ F0167_DUNGEON_GetObjectForProjectileLauncherOrObjectGenerator
663  int16 getRandomOrnamentIndex(uint16 val1, uint16 val2, int16 modulo); // @ F0169_DUNGEON_GetRandomOrnamentIndex
664 
665  uint32 _rawDunFileDataSize; // @ probably NONE
666  byte *_rawDunFileData; // @ ???
667  DungeonFileHeader _dungeonFileHeader; // @ G0278_ps_DungeonHeader
668 
669  uint16 *_dungeonMapsFirstColumnIndex; // @ G0281_pui_DungeonMapsFirstColumnIndex
670  uint16 _dungeonColumCount; // @ G0282_ui_DungeonColumnCount
671  uint16 *_dungeonColumnsCumulativeSquareThingCount; // @ G0280_pui_DungeonColumnsCumulativeSquareThingCount
672  Thing *_squareFirstThings; // @ G0283_pT_SquareFirstThings
673  uint16 *_dungeonTextData; // @ G0260_pui_DungeonTextData
674  uint16 *_thingData[16]; // @ G0284_apuc_ThingData
675  byte ***_dungeonMapData; // @ G0279_pppuc_DungeonMapData
676 
677  Direction _partyDir; // @ G0308_i_PartyDirection
678  int16 _partyMapX; // @ G0306_i_PartyMapX
679  int16 _partyMapY; // @ G0307_i_PartyMapY
680  uint8 _partyMapIndex; // @ G0309_i_PartyMapIndex
681  int16 _currMapIndex; // @ G0272_i_CurrentMapIndex
682  byte **_currMapData; // @ G0271_ppuc_CurrentMapData
683  Map *_currMap; // @ G0269_ps_CurrentMap
684  uint16 _currMapWidth; // @ G0273_i_CurrentMapWidth
685  uint16 _currMapHeight; // @ G0274_i_CurrentMapHeight
686  uint16 *_currMapColCumulativeSquareFirstThingCount; // @G0270_pui_CurrentMapColumnsCumulativeSquareFirstThingCount
687 
688  Map *_dungeonMaps; // @ G0277_ps_DungeonMaps
689  byte *_dungeonRawMapData; // @ G0276_puc_DungeonRawMapData
690 
691  int16 _currMapInscriptionWallOrnIndex; // @ G0265_i_CurrentMapInscriptionWallOrnamentIndex
692  Box _dungeonViewClickableBoxes[6]; // G0291_aauc_DungeonViewClickableBoxes
693  bool _isFacingAlcove; // @ G0286_B_FacingAlcove
694  bool _isFacingViAltar; // @ G0287_B_FacingViAltar
695  bool _isFacingFountain; // @ G0288_B_FacingFountain
696  ElementType _squareAheadElement; // @ G0285_i_SquareAheadElement
697  Thing _pileTopObject[5]; // @ G0292_aT_PileTopObject
698  DoorInfo _currMapDoorInfo[2]; // @ G0275_as_CurrentMapDoorInfo
699 
700  ObjectInfoIndex _objectInfos[180]; // @ G0237_as_Graphic559_ObjectInfo
701  ArmourInfo _armourInfos[58]; // @ G0239_as_Graphic559_ArmourInfo
702  WeaponInfo _weaponInfos[46]; // @ G0238_as_Graphic559_WeaponInfo
703  CreatureInfo _creatureInfos[k27_CreatureTypeCount]; // @ G0243_as_Graphic559_CreatureInfo
704  byte _thingDataWordCount[16]; // @ G0235_auc_Graphic559_ThingDataByteCount
705 
706  void setupConstants();
707 };
708 
709 }
710 
711 #endif
Definition: dungeonman.h:503
Definition: dm.h:117
Definition: dungeonman.h:335
Definition: dungeonman.h:532
Definition: dungeonman.h:564
Definition: stream.h:745
Definition: group.h:127
Definition: dungeonman.h:491
Definition: dungeonman.h:304
Definition: dungeonman.h:273
Definition: dungeonman.h:596
Definition: dungeonman.h:457
Definition: gfx.h:372
Definition: dungeonman.h:520
Definition: dungeonman.h:607
Definition: champion.h:35
Definition: dungeonman.h:253
Definition: dungeonman.h:574
Definition: dungeonman.h:377
Definition: dungeonman.h:365
Definition: dm.h:155
Definition: dungeonman.h:442
Definition: dungeonman.h:415
Definition: dungeonman.h:477
Definition: dungeonman.h:349
Definition: dungeonman.h:548
Definition: dungeonman.h:287