LAB: Fix a regression in roomCoords()
This commit is contained in:
parent
dddd07cc87
commit
6f3644f377
1 changed files with 10 additions and 2 deletions
|
@ -253,12 +253,20 @@ static void roomCoords(uint16 CurRoom, uint16 *x1, uint16 *y1, uint16 *x2, uint1
|
||||||
case HCORRIDOR:
|
case HCORRIDOR:
|
||||||
curRoomImg = HRoom;
|
curRoomImg = HRoom;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// Some rooms (like the map) do not have an image
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
*x1 = mapScaleX(Maps[CurRoom].x);
|
*x1 = mapScaleX(Maps[CurRoom].x);
|
||||||
*y1 = mapScaleY(Maps[CurRoom].y);
|
*y1 = mapScaleY(Maps[CurRoom].y);
|
||||||
*x2 = *x1 + curRoomImg->_width;
|
*x2 = *x1;
|
||||||
*y2 = *y1 + curRoomImg->_height;
|
*y2 = *y1;
|
||||||
|
|
||||||
|
if (curRoomImg) {
|
||||||
|
*x2 += curRoomImg->_width;
|
||||||
|
*y2 += curRoomImg->_height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue