GBA BIOS: Fix more potential regressions with signed 16-bit loads

This commit is contained in:
Jeffrey Pfau 2015-02-21 11:01:08 -08:00
parent 01f7036401
commit d4d42a2eee
1 changed files with 4 additions and 4 deletions

View File

@ -90,10 +90,10 @@ static void _BgAffineSet(struct GBA* gba) {
// [ 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;
cx = cpu->memory.load16(cpu, offset + 8, 0);
cy = cpu->memory.load16(cpu, offset + 10, 0);
sx = cpu->memory.load16(cpu, offset + 12, 0) / 256.f;
sy = cpu->memory.load16(cpu, offset + 14, 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;
sy = (int16_t) cpu->memory.load16(cpu, offset + 14, 0) / 256.f;
theta = (cpu->memory.load16(cpu, offset + 16, 0) >> 8) / 128.f * M_PI;
offset += 20;
// Rotation