diff options
Diffstat (limited to 'pokemontools/map_editor.py')
-rw-r--r-- | pokemontools/map_editor.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index 4970d9e..4c0bec5 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -31,9 +31,6 @@ if version == 'crystal': header_dir = os.path.join(conf.path, 'maps/') - # todo - display_connections = False - elif version == 'red': map_dir = os.path.join(conf.path, 'maps/') gfx_dir = os.path.join(conf.path, 'gfx/tilesets/') @@ -49,9 +46,6 @@ elif version == 'red': header_path = os.path.join(conf.path, 'main.asm') - # todo - display_connections = False - else: raise Exception, 'version must be "crystal" or "red"' @@ -67,6 +61,7 @@ get_constants() class Application(Frame): def __init__(self, master=None): + self.display_connections = False Frame.__init__(self, master) self.grid() Style().configure("TFrame", background="#444") @@ -650,18 +645,23 @@ def asm_at_label(asm, label): content += [[l, comment]] return content - -root = Tk() -root.wm_title("MAP EDITOR") -app = Application(master=root) - -try: - app.mainloop() -except KeyboardInterrupt: - pass - -try: - root.destroy() -except TclError: - pass - +def main(): + """ + Launches the map editor. + """ + root = Tk() + root.wm_title("MAP EDITOR") + app = Application(master=root) + + try: + app.mainloop() + except KeyboardInterrupt: + pass + + try: + root.destroy() + except TclError: + pass + +if __name__ == "__main__": + main() |