Fixed tile flipping. TODO: terrain edge cases

This commit is contained in:
Luke Hubmayer-Werner 2018-03-24 23:27:36 +10:30
parent 995be34e00
commit b8f2e0e2df
2 changed files with 3 additions and 5 deletions

View File

@ -589,10 +589,10 @@ def apply_battle_terrain_flips(rom, id, battle_terrain):
if a == 0x00: if a == 0x00:
skip = rom[ptr] skip = rom[ptr]
ptr += 1 ptr += 1
buffer += [0]*skip*4 buffer += [0]*skip*8
else: else:
for b in reversed(range(0, 8, 2)): for b in reversed(range(0, 8, 1)):
buffer.append((a>>b)&0x03) buffer.append((a>>b)&0x01)
for i in range(len(battle_terrain)//2): for i in range(len(battle_terrain)//2):
output[i*2+1] |= (buffer[i] << 6) output[i*2+1] |= (buffer[i] << 6)

View File

@ -211,8 +211,6 @@ class Canvas:
del self.painter del self.painter
def draw_pixmap(self, col, row, pixmap, h_flip=False, v_flip=False): def draw_pixmap(self, col, row, pixmap, h_flip=False, v_flip=False):
if h_flip or v_flip:
return
h_s = -1 if h_flip else 1 h_s = -1 if h_flip else 1
v_s = -1 if v_flip else 1 v_s = -1 if v_flip else 1
x = (col+h_flip)*8*h_s x = (col+h_flip)*8*h_s