diff options
author | entrpntr <entrpntr@gmail.com> | 2020-04-20 21:27:44 -0400 |
---|---|---|
committer | entrpntr <entrpntr@gmail.com> | 2020-04-20 21:36:29 -0400 |
commit | b87cc706430f281d6af24daa942890574449a803 (patch) | |
tree | 6d292a71a1c5d302b57c3e85cf40a5f52dfddfcd /tools/pokemontools/gfx.py | |
parent | 2883bfb9b1d3db35d9f1cb61ee0d9c015df4de30 (diff) |
Miscellaneous cleanup before continuing.
Diffstat (limited to 'tools/pokemontools/gfx.py')
-rw-r--r-- | tools/pokemontools/gfx.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/pokemontools/gfx.py b/tools/pokemontools/gfx.py index e6c9989d..f3e3ed53 100644 --- a/tools/pokemontools/gfx.py +++ b/tools/pokemontools/gfx.py @@ -433,7 +433,7 @@ def convert_2bpp_to_png(image, **kwargs): # Width must be specified to interleave. if interleave and width: - image = interleave_tiles(image, width / 8) + image = interleave_tiles(image, width // 8) # Pad the image by a given number of tiles if asked. image += pad_color * 0x10 * tile_padding @@ -766,11 +766,11 @@ def png_to_2bpp(filein, **kwargs): tiles = get_tiles(image) pic_length = w * h - tile_width = width / 8 + tile_width = width // 8 trailing = len(tiles) % pic_length new_image = [] - for block in range(len(tiles) / pic_length): - offset = (h * tile_width) * ((block * w) / tile_width) + ((block * w) % tile_width) + for block in range(len(tiles) // pic_length): + offset = (h * tile_width) * ((block * w) // tile_width) + ((block * w) % tile_width) pic = [] for row in range(h): index = offset + (row * tile_width) |