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/tcgdisasm.py | |
parent | 74c620d01ad59bfb09cf4111ace549b925fcb9ab (diff) | |
parent | 766dea11bd63dee939db2b47198410e6c6e0fc7e (diff) |
Merge pull request #103 from eevee/py3
Python 3 compatibility, sort of, maybe
Diffstat (limited to 'pokemontools/tcgdisasm.py')
-rwxr-xr-x | pokemontools/tcgdisasm.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pokemontools/tcgdisasm.py b/pokemontools/tcgdisasm.py index 2e9e8b3..e34d944 100755 --- a/pokemontools/tcgdisasm.py +++ b/pokemontools/tcgdisasm.py @@ -2,6 +2,8 @@ """ GBC disassembler, specialized for TCG macros """ +from __future__ import print_function +from __future__ import absolute_import import os import sys @@ -10,9 +12,9 @@ from ctypes import c_int8 import random import json -import configuration -import labels -import wram +from . import configuration +from . import labels +from . import wram # New versions of json don't have read anymore. if not hasattr(json, "read"): @@ -663,7 +665,7 @@ class Disassembler(object): """ bank_id = original_offset / 0x4000 - if debug: print "bank id is: " + str(bank_id) + if debug: print("bank id is: " + str(bank_id)) last_hl_address = None #for when we're scanning the main map script last_a_address = None @@ -995,4 +997,4 @@ if __name__ == "__main__": else: output = "Func_{:02x}: ; {:02x} ({:0x}:{:02x})\n".format(addr, addr, addr / 0x4000, addr % 0x4000 + 0x4000) output += disasm.output_bank_opcodes(addr)[0] - print output + print(output) |