From fabc78f5db572d63d3225cafd97884825e4e7f04 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 20:35:44 -0600 Subject: call it button_new instead of new "new" is sometimes a reserved keyword and it would be nice to not use that name. --- pokemontools/map_editor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pokemontools/map_editor.py') diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index c30fcd8..78edee0 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -149,10 +149,10 @@ class Application(Frame): self.picker_frame = Frame(self) self.picker_frame.grid(row=1, column=1) - self.new = Button(self.button_frame) - self.new["text"] = "New" - self.new["command"] = self.new_map - self.new.grid(row=0, column=0, padx=2) + self.button_new = Button(self.button_frame) + self.button_new["text"] = "New" + self.button_new["command"] = self.new_map + self.button_new.grid(row=0, column=0, padx=2) self.open = Button(self.button_frame) self.open["text"] = "Open" -- cgit v1.2.3 From d3f19c01581e2a7e977d226e6697ff7446c28b49 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 17 Nov 2013 20:39:53 -0600 Subject: remove two unused methods from map_editor.py --- pokemontools/map_editor.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'pokemontools/map_editor.py') diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index 78edee0..1cd9b02 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -683,14 +683,6 @@ def macro_values(line, macro): values = values[1:] return values -def db_value(line): - macro = 'db' - return macro_values(line, macro) - -def db_values(line): - macro = 'db' - return macro_values(line, macro) - def asm_at_label(asm, label): label_def = label + ':' lines = asm.split('\n') -- cgit v1.2.3 From 0cdd66e1b57b7ddd8e7006c3782e446ad91e3913 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Tue, 19 Nov 2013 22:27:50 -0600 Subject: return constants after parsing --- pokemontools/map_editor.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pokemontools/map_editor.py') diff --git a/pokemontools/map_editor.py b/pokemontools/map_editor.py index 1cd9b02..43042cb 100644 --- a/pokemontools/map_editor.py +++ b/pokemontools/map_editor.py @@ -128,6 +128,7 @@ def get_constants(config=config): name, value = [s.strip() for s in line.split(' EQU ')] constants[name] = eval(value.split(';')[0].replace('$','0x').replace('%','0b')) config.constants = constants + return constants class Application(Frame): def __init__(self, master=None, config=config): -- cgit v1.2.3