aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-01-24 22:04:01 -0500
committerPaul Gilbert2018-01-24 22:04:01 -0500
commitf1170a4ab1f2fee7f0b502f0c2f5f2c14f6aac4d (patch)
tree31020220a2904c7569ab1bc20a0ba162ec82ff7a /engines
parent101f7fb2b490c07e5d0928dcfb61934a26601df7 (diff)
downloadscummvm-rg350-f1170a4ab1f2fee7f0b502f0c2f5f2c14f6aac4d.tar.gz
scummvm-rg350-f1170a4ab1f2fee7f0b502f0c2f5f2c14f6aac4d.tar.bz2
scummvm-rg350-f1170a4ab1f2fee7f0b502f0c2f5f2c14f6aac4d.zip
XEEN: Extra comments for map code
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/map.cpp6
-rw-r--r--engines/xeen/map.h27
2 files changed, 30 insertions, 3 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index b00642b825..9da9feff37 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -791,7 +791,7 @@ void MonsterObjectData::synchronize(XeenSerializer &s, MonsterData &monsterData)
} else {
// Load monster/obbject data and merge together with sprite Ids
- // Merge together object data
+ // Load objects
mobStruct.synchronize(s);
do {
MazeObject obj;
@@ -811,7 +811,7 @@ void MonsterObjectData::synchronize(XeenSerializer &s, MonsterData &monsterData)
mobStruct.synchronize(s);
} while (mobStruct._id != 255 || mobStruct._pos.x != -1);
- // Merge together monster data
+ // Load monsters
mobStruct.synchronize(s);
do {
MazeMonster mon;
@@ -838,7 +838,7 @@ void MonsterObjectData::synchronize(XeenSerializer &s, MonsterData &monsterData)
mobStruct.synchronize(s);
} while (mobStruct._id != 255 || mobStruct._pos.x != -1);
- // Merge together wall item data
+ // Load wall items
mobStruct.synchronize(s);
do {
if (mobStruct._id < (int)_wallItemSprites.size()) {
diff --git a/engines/xeen/map.h b/engines/xeen/map.h
index e4cf148dcf..71af89e305 100644
--- a/engines/xeen/map.h
+++ b/engines/xeen/map.h
@@ -459,14 +459,23 @@ public:
public:
Map(XeenEngine *vm);
+ /**
+ * Loads a specified map
+ */
void load(int mapId);
int mazeLookup(const Common::Point &pt, int layerShift, int wallMask = 0xf);
void cellFlagLookup(const Common::Point &pt);
+ /**
+ * Sets the surface flags for a given position
+ */
void setCellSurfaceFlags(const Common::Point &pt, int bits);
+ /**
+ * Sets the value for the wall in a given direction from a given point
+ */
void setWall(const Common::Point &pt, Direction dir, int v);
/**
@@ -474,14 +483,32 @@ public:
*/
void saveMaze();
+ /**
+ * Gets the data for a map position at one of the relative indexes
+ * surrounding the current position
+ */
int getCell(int idx);
+ /**
+ * Returns the data for the primary active map
+ */
MazeData &mazeData() { return _mazeData[0]; }
+ /**
+ * Returns the data for the currently indexed map
+ */
MazeData &mazeDataCurrent() { return _mazeData[_mazeDataIndex]; }
+ /**
+ * Loads the sprites needed for rendering the skyline
+ */
void loadSky();
+ /**
+ * Tests the current position, and if it's moved beyond the valid (0,0) to (15,15)
+ * range for a map, loads in the correct surrounding map, and adjusts the
+ * position to the relative position on the new map
+ */
void getNewMaze();
};