diff options
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/backdrop.cpp | 12 | ||||
-rw-r--r-- | engines/dreamweb/dreambase.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index 9fe3c74150..b806ba43a0 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -179,22 +179,20 @@ bool DreamBase::addLength(const uint8 *mapFlags) { } void DreamBase::getDimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize) { - const uint8 *mapFlags = getSegment(data.word(kBuffers)).ptr(kMapflags, 0); - uint8 yStart = 0; - while (! addAlong(mapFlags + 3 * 11 * yStart)) + while (! addAlong(_mapFlags + 3 * 11 * yStart)) ++yStart; uint8 xStart = 0; - while (! addLength(mapFlags + 3 * xStart)) + while (! addLength(_mapFlags + 3 * xStart)) ++xStart; uint8 yEnd = 10; - while (! addAlong(mapFlags + 3 * 11 * (yEnd - 1))) + while (! addAlong(_mapFlags + 3 * 11 * (yEnd - 1))) --yEnd; uint8 xEnd = 11; - while (! addLength(mapFlags + 3 * (xEnd - 1))) + while (! addLength(_mapFlags + 3 * (xEnd - 1))) --xEnd; *mapXstart = xStart; @@ -243,7 +241,7 @@ void DreamBase::showAllFree() { } void DreamBase::drawFlags() { - uint8 *mapFlags = getSegment(data.word(kBuffers)).ptr(kMapflags, 0); + uint8 *mapFlags = _mapFlags; const uint8 *mapData = getSegment(data.word(kMapdata)).ptr(kMap + data.byte(kMapy) * kMapwidth + data.byte(kMapx), 0); const uint8 *backdropFlags = getSegment(data.word(kBackdrop)).ptr(kFlags, 0); diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index b739c9cbbe..7816308e03 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -69,6 +69,7 @@ protected: ReelRoutine *_personData; // from Buffers + uint8 _mapFlags[11*10*3]; uint8 _startPal[3*256]; uint8 _endPal[3*256]; uint8 _mainPal[3*256]; diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index cc6b09fd68..17d3ccd765 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -552,7 +552,7 @@ void DreamGenContext::checkOne() { void DreamBase::checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) { *flagX = x / 16; *flagY = y / 16; - const uint8 *tileData = getSegment(data.word(kBuffers)).ptr(kMapflags + (*flagY * 11 + *flagX) * 3, 3); + const uint8 *tileData = &_mapFlags[(*flagY * 11 + *flagX) * 3]; *flag = tileData[0]; *flagEx = tileData[1]; *type = tileData[2]; |