aboutsummaryrefslogtreecommitdiff
path: root/queen/grid.cpp
diff options
context:
space:
mode:
authorGregory Montoir2004-01-09 13:36:37 +0000
committerGregory Montoir2004-01-09 13:36:37 +0000
commit634df6923d644a5de603beb14c5f9720b5ff44fb (patch)
treeb44aebd45f697dfe1c448ee460f204e2fa7945ac /queen/grid.cpp
parent93f3c0df348b77d284d66309e36d775df4765c99 (diff)
downloadscummvm-rg350-634df6923d644a5de603beb14c5f9720b5ff44fb.tar.gz
scummvm-rg350-634df6923d644a5de603beb14c5f9720b5ff44fb.tar.bz2
scummvm-rg350-634df6923d644a5de603beb14c5f9720b5ff44fb.zip
renamed some methods and moved some code to Display
svn-id: r12276
Diffstat (limited to 'queen/grid.cpp')
-rw-r--r--queen/grid.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/queen/grid.cpp b/queen/grid.cpp
index 46d26c553c..97a0efe47c 100644
--- a/queen/grid.cpp
+++ b/queen/grid.cpp
@@ -41,17 +41,17 @@ void Grid::readDataFrom(uint16 numObjects, uint16 numRooms, byte *&ptr) {
_objMax = new int16[numRooms + 1];
_areaMax = new int16[numRooms + 1];
- _area = new Area[numRooms + 1][MAX_AREAS];
+ _area = new Area[numRooms + 1][MAX_AREAS_NUMBER];
_objMax[0] = 0;
_areaMax[0] = 0;
- memset(&_area[0], 0, sizeof(Area) * MAX_AREAS);
+ memset(&_area[0], 0, sizeof(Area) * MAX_AREAS_NUMBER);
for (i = 1; i <= numRooms; i++) {
_objMax[i] = (int16)READ_BE_UINT16(ptr); ptr += 2;
_areaMax[i] = (int16)READ_BE_UINT16(ptr); ptr += 2;
memset(&_area[i][0], 0, sizeof(Area));
for (j = 1; j <= _areaMax[i]; j++) {
- assert(j < MAX_AREAS);
+ assert(j < MAX_AREAS_NUMBER);
_area[i][j].readFromBE(ptr);
}
}
@@ -89,7 +89,7 @@ uint16 Grid::findZoneForPos(GridScreen screen, uint16 x, uint16 y) const {
if (screen == GS_PANEL) {
y -= ROOM_ZONE_HEIGHT;
}
- for(i = 1; i < MAX_ZONES; ++i) {
+ for(i = 1; i < MAX_ZONES_NUMBER; ++i) {
const ZoneSlot *pzs = &_zones[screen][i];
if (pzs->valid && pzs->box.contains(x, y)) {
return i;
@@ -113,7 +113,7 @@ uint16 Grid::findAreaForPos(GridScreen screen, uint16 x, uint16 y) const {
void Grid::clear(GridScreen screen) {
debug(9, "Grid::clear(%d)", screen);
- for(int i = 1; i < MAX_ZONES; ++i) {
+ for(int i = 1; i < MAX_ZONES_NUMBER; ++i) {
_zones[screen][i].valid = false;
}
}
@@ -163,7 +163,7 @@ void Grid::setupPanel() {
void Grid::drawZones() {
- for(int i = 1; i < MAX_ZONES; ++i) {
+ for(int i = 1; i < MAX_ZONES_NUMBER; ++i) {
const ZoneSlot *pzs = &_zones[GS_ROOM][i];
if (pzs->valid) {
const Box *b = &pzs->box;