mirror of https://github.com/mgba-emu/mgba.git
Precompute some parameters in mode 0
This commit is contained in:
parent
7132c873e3
commit
1e0f400091
|
@ -727,12 +727,11 @@ static void _composite(struct GBAVideoSoftwareRenderer* renderer, uint32_t* pixe
|
|||
if (background->size & 1) { \
|
||||
xBase += (localX & 0x100) << 5; \
|
||||
} \
|
||||
screenBase = (background->screenBase >> 1) + (xBase >> 3) + (yBase << 2); \
|
||||
screenBase = yBase + (xBase >> 3); \
|
||||
mapData = renderer->d.vram[screenBase]; \
|
||||
if (!GBA_TEXT_MAP_VFLIP(mapData)) { \
|
||||
localY = inY & 0x7; \
|
||||
} else { \
|
||||
localY = 7 - (inY & 0x7); \
|
||||
localY = inY & 0x7; \
|
||||
if (GBA_TEXT_MAP_VFLIP(mapData)) { \
|
||||
localY = 7 - localY; \
|
||||
}
|
||||
|
||||
#define PREPARE_OBJWIN \
|
||||
|
@ -781,6 +780,7 @@ static void _drawBackgroundMode0(struct GBAVideoSoftwareRenderer* renderer, stru
|
|||
} else if (background->size == 3) {
|
||||
yBase += (inY & 0x100) << 1;
|
||||
}
|
||||
yBase = (background->screenBase >> 1) + (yBase << 2);
|
||||
|
||||
int localX;
|
||||
int localY;
|
||||
|
|
Loading…
Reference in New Issue