mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-28 14:13:24 +00:00
DREAMWEB: Move mapflags out of buffers
This commit is contained in:
parent
1749182e98
commit
109acaab3c
@ -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);
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user