Skip to content

Commit

Permalink
XEEN: Yet more bugfixes for automap dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 31, 2015
1 parent d67b8d3 commit 73a5221
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 5 additions & 3 deletions engines/xeen/dialogs_automap.cpp
Expand Up @@ -120,7 +120,7 @@ void AutoMapDialog::execute() {
// Draw indoors map
frame2 = (frame2 + 2) % 8;

// Draw ground tiles
// Draw default ground for all the valid explored areas
for (int yp = 38, yDiff = pt.y + 7; yp < 166; yp += 8, --yDiff) {
for (int xp = 80, xDiff = pt.x - 7; xp < 240; xp += 10, ++xDiff) {
v = map.mazeLookup(Common::Point(xDiff, yDiff), 0, 0xffff);
Expand Down Expand Up @@ -159,8 +159,9 @@ void AutoMapDialog::execute() {
for (int xp = 85, xDiff = pt.x - 7; xp < 245; xp += 10, ++xDiff) {
v = map.mazeLookup(Common::Point(xDiff, yDiff), 0, 0xffff);

if (v != INVALID_CELL && map._currentSteppedOn)
map._tileSprites.draw(screen, 0, Common::Point(xp, yp));
if (v != INVALID_CELL && map._currentSurfaceId && map._currentSteppedOn)
map._tileSprites.draw(screen, map.mazeData()._surfaceTypes[
map._currentSurfaceId], Common::Point(xp, yp));
}
}

Expand Down Expand Up @@ -272,6 +273,7 @@ void AutoMapDialog::execute() {
map._tileSprites.draw(screen, frame, Common::Point(xp, 30));
}

// Draw any walls on the cells
for (int yCtr = 0, yp = 38, yDiff = pt.y + 7; yCtr < 16; ++yCtr, yp += 8, --yDiff) {
for (int xCtr = 0, xp = 80, xDiff = pt.x - 7; xCtr < 16; ++xCtr, xp += 10, ++xDiff) {
// Draw the arrow if at the correct position
Expand Down
8 changes: 7 additions & 1 deletion engines/xeen/interface_map.cpp
Expand Up @@ -756,7 +756,13 @@ void InterfaceMap::draw3d(bool updateFlag) {
if (_vm->_mode == MODE_9) {
// TODO
}
events.wait(2);

// TODO: Check use of updateFlag here. Original doesn't have it, but I
// wanted to ensure in places like the AutoMapDialog, that the draw3d
// doesn't result in the screen updating until the dialog has had
// a chance to full render itself
if (updateFlag)
events.wait(2);
}

/**
Expand Down

0 comments on commit 73a5221

Please sign in to comment.