GBA BIOS: Fix regression with BgAffineSet
Jeffrey Pfau jeffrey@endrift.com
Sun, 15 Mar 2015 02:21:22 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gba/bios.c
→
src/gba/bios.c
@@ -88,8 +88,8 @@ while (i--) {
// [ sx 0 0 ] [ cos(theta) -sin(theta) 0 ] [ 1 0 cx - ox ] [ A B rx ] // [ 0 sy 0 ] * [ sin(theta) cos(theta) 0 ] * [ 0 1 cy - oy ] = [ C D ry ] // [ 0 0 1 ] [ 0 0 1 ] [ 0 0 1 ] [ 0 0 1 ] - ox = cpu->memory.load32(cpu, offset, 0) / 256.f; - oy = cpu->memory.load32(cpu, offset + 4, 0) / 256.f; + ox = (int32_t) cpu->memory.load32(cpu, offset, 0) / 256.f; + oy = (int32_t) cpu->memory.load32(cpu, offset + 4, 0) / 256.f; cx = (int16_t) cpu->memory.load16(cpu, offset + 8, 0); cy = (int16_t) cpu->memory.load16(cpu, offset + 10, 0); sx = (int16_t) cpu->memory.load16(cpu, offset + 12, 0) / 256.f;