aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dungeonman.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dm/dungeonman.h')
-rw-r--r--engines/dm/dungeonman.h41
1 files changed, 27 insertions, 14 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 2afc2aab88..dbe13d3018 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -26,15 +26,28 @@ enum ThingType {
kThingTypeTotal = 16 // +1 than the last
}; // @ C[00..15]_THING_TYPE_...
-enum SquareType {
- kWallSquareType = 0,
- kCorridorSquareType = 1,
- kPitSquareType = 2,
- kStairsSquareType = 3,
- kDoorSquareType = 4,
- kTeleporterSquareType = 5,
- kFakeWallSquareType = 6
-}; // @ C[00..06]_ELEMENT_...
+enum ElementType {
+ kChampionElemType = -2,
+ kCreatureElemType = -1,
+ kWallElemType = 0,
+ kCorridorElemType = 1,
+ kPitElemType = 2,
+ kStairsElemType = 3,
+ kDoorElemType = 4,
+ kTeleporterElemType = 5,
+ kFakeWallElemType = 6,
+ kDoorSideElemType = 16,
+ kDoorFrontElemType = 17,
+ kStairsSideElemType = 18,
+ kStairsFrontElemType = 19
+}; // @ C[-2..19]_ELEMENT_...
+
+enum WallOrnMask {
+ kWallWestRandOrnAllowed = 0x1,
+ kWallSouthRandOrnAllowed = 0x2,
+ kWallEastRandOrnAllowed = 0x4,
+ kWallNorthRandOrnAllowed = 0x8
+};
class DungeonFileHeader {
@@ -156,11 +169,10 @@ class DungeonMan {
DungeonMan(const DungeonMan &other); // no implementation on purpose
void operator=(const DungeonMan &rhs); // no implementation on purpose
- void mapCoordsAfterRelMovement(direction dir, uint16 stepsForward, uint16 stepsRight, uint16 &posX, uint16 &posY); // @ F0150_DUNGEON_UpdateMapCoordinatesAfterRelativeMovement
- byte getSquare(uint16 mapX, uint16 mapY); // @ F0151_DUNGEON_GetSquare
- byte getRelSquare(direction dir, uint16 stepsForward, uint16 stepsRight, uint16 posX, uint16 posY); // @ F0152_DUNGEON_GetRelativeSquare
+ byte getSquare(int16 mapX, int16 mapY); // @ F0151_DUNGEON_GetSquare
+ byte getRelSquare(direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY); // @ F0152_DUNGEON_GetRelativeSquare
- SquareType getSquareType(uint16 square) { return (SquareType)(square << 5); } // @ M34_SQUARE_TYPE
+ ElementType getSquareType(int16 square) { return (ElementType)(square << 5); } // @ M34_SQUARE_TYPE
void decompressDungeonFile(); // @ F0455_FLOPPY_DecompressDungeon
public:
@@ -169,7 +181,8 @@ public:
// TODO: this does stuff other than load the file!
void loadDungeonFile(); // @ F0434_STARTEND_IsLoadDungeonSuccessful_CPSC
void setCurrentMap(uint16 mapIndex); // @ F0173_DUNGEON_SetCurrentMap
- SquareType getRelSquareType(direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY) {
+ void mapCoordsAfterRelMovement(direction dir, int16 stepsForward, int16 stepsRight, int16 &posX, int16 &posY); // @ F0150_DUNGEON_UpdateMapCoordinatesAfterRelativeMovement
+ ElementType getRelSquareType(direction dir, int16 stepsForward, int16 stepsRight, int16 posX, int16 posY) {
return getSquareType(getRelSquare(dir, stepsForward, stepsRight, posX, posY));
}// @ F0153_DUNGEON_GetRelativeSquareType
};