all repos — mgba @ fefbf7a2963b17bf9ae8198bc194e375b44ee8e1

mGBA Game Boy Advance Emulator

Flip sprites vertically after applying boundary operations
Jeffrey Pfau jeffrey@endrift.com
Thu, 25 Apr 2013 01:55:47 -0700
commit

fefbf7a2963b17bf9ae8198bc194e375b44ee8e1

parent

cea8109c06aa6ccf20915e65d85de0e2c4445362

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -402,11 +402,11 @@ .target2 = renderer->target2Obj

}; 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;