diff options
author | yenatch <yenatch@gmail.com> | 2017-02-13 18:09:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 18:09:31 -0500 |
commit | 979c98a7c0f67ad6b9685b2d532c66a1f76ffb22 (patch) | |
tree | c67cc7b8500aac4e400d4e8bfdbef57a57b63eb1 /pokemontools/dump_gfx.py | |
parent | 74c620d01ad59bfb09cf4111ace549b925fcb9ab (diff) | |
parent | 766dea11bd63dee939db2b47198410e6c6e0fc7e (diff) |
Merge pull request #103 from eevee/py3
Python 3 compatibility, sort of, maybe
Diffstat (limited to 'pokemontools/dump_gfx.py')
-rw-r--r-- | pokemontools/dump_gfx.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pokemontools/dump_gfx.py b/pokemontools/dump_gfx.py index cddb0b6..01eb069 100644 --- a/pokemontools/dump_gfx.py +++ b/pokemontools/dump_gfx.py @@ -1,7 +1,9 @@ -from gfx import * -from pokemon_constants import pokemon_constants -import trainers -import romstr +from __future__ import print_function +from __future__ import absolute_import +from .gfx import * +from .pokemon_constants import pokemon_constants +from . import trainers +from . import romstr def load_rom(filename=config.rom_path): rom = romstr.RomStr.load(filename=filename) @@ -357,7 +359,7 @@ def dump_pic_animations(addresses={'bitmasks': 'BitmasksPointers', 'frames': 'Fr tiles = (x for x in frame[1]) for j, bit in enumerate(bitmask): if bit: - tmap[(i + 1) * length + j] = tiles.next() + tmap[(i + 1) * length + j] = next(tiles) filename = os.path.join(directory, 'front.{0}x{0}.2bpp.lz'.format(size)) tiles = get_tiles(Decompressed(open(filename).read()).output) @@ -495,7 +497,7 @@ def dump_trainer_pals(): to_file('../'+dir+filename, pal_data) spacing = ' ' * (12 - len(name)) - print name+'Palette:'+spacing+' INCBIN"'+dir+filename+'"' + print(name+'Palette:'+spacing+' INCBIN"'+dir+filename+'"') def get_uncompressed_gfx(start, num_tiles, filename): |