mirror of https://github.com/mgba-emu/mgba.git
Flip sprites vertically after applying boundary operations
This commit is contained in:
parent
cea8109c06
commit
fefbf7a296
|
@ -402,12 +402,12 @@ static void _drawSprite(struct GBAVideoSoftwareRenderer* renderer, struct GBAObj
|
|||
};
|
||||
int x = sprite->x;
|
||||
int inY = y - sprite->y;
|
||||
if (sprite->vflip) {
|
||||
inY = height - inY - 1;
|
||||
}
|
||||
if (sprite->y + height - 256 >= 0) {
|
||||
inY += 256;
|
||||
}
|
||||
if (sprite->vflip) {
|
||||
inY = height - inY - 1;
|
||||
}
|
||||
unsigned charBase = BASE_TILE + sprite->tile * 0x20;
|
||||
unsigned yBase = (inY & ~0x7) * 0x80 + (inY & 0x7) * 4;
|
||||
for (int outX = x >= 0 ? x : 0; outX < x + width && outX < VIDEO_HORIZONTAL_PIXELS; ++outX) {
|
||||
|
|
Loading…
Reference in New Issue