mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-04-23 17:07:18 -05:00
Fix a modulo by 0 on a default argument to condense_tiles_to_map.
This commit is contained in:
parent
46492bd907
commit
c6dcd9b9be
|
|
@ -141,8 +141,9 @@ def condense_tiles_to_map(image, pic=0):
|
|||
new_tiles += [tile]
|
||||
|
||||
# Match the first frame where possible.
|
||||
if tile == new_tiles[i % pic]:
|
||||
tilemap += [i % pic]
|
||||
this_i = i % pic if pic else i
|
||||
if tile == new_tiles[this_i]:
|
||||
tilemap += [this_i]
|
||||
else:
|
||||
tilemap += [new_tiles.index(tile)]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user