Clean up some magic values

This commit is contained in:
Anders Jenbo
2021-01-02 22:34:32 +01:00
parent aa154e5231
commit e2a98b75fe
3 changed files with 33 additions and 29 deletions
+2 -2
View File
@@ -737,7 +737,7 @@ void LoadMapObjects(BYTE *pMap, int startx, int starty, int x1, int y1, int w, i
InitObjFlag = TRUE;
lm = pMap;
rw = lm[0];
rw = *lm;
lm += 2;
rh = *lm;
mapoff = (rw * rh + 1) * 2;
@@ -749,7 +749,7 @@ void LoadMapObjects(BYTE *pMap, int startx, int starty, int x1, int y1, int w, i
for (j = 0; j < rh; j++) {
for (i = 0; i < rw; i++) {
if (*lm) {
type = lm[0];
type = *lm;
AddObject(ObjTypeConv[type], startx + 16 + i, starty + 16 + j);
oi = ObjIndex(startx + 16 + i, starty + 16 + j);
SetObjMapRange(oi, x1, y1, x1 + w, y1 + h, leveridx);