mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-08-09 10:47:24 -05:00
fix up map_editor.py extra newlines
This commit is contained in:
parent
f414cf38f6
commit
98d335438a
|
|
@ -179,7 +179,6 @@ class Application(Frame):
|
|||
self.map.canvas.bind('<B1-Motion>', self.paint)
|
||||
|
||||
def init_picker(self):
|
||||
|
||||
self.current_tile = Map(self.button_frame, tileset_id=self.map.tileset_id, config=self.config)
|
||||
self.current_tile.blockdata = [self.paint_tile]
|
||||
self.current_tile.width = 1
|
||||
|
|
@ -202,7 +201,6 @@ class Application(Frame):
|
|||
self.picker_frame.vbar.pack(side=RIGHT, fill=Y)
|
||||
self.picker_frame.vbar.config(command=self.picker.canvas.yview)
|
||||
|
||||
|
||||
self.picker.canvas.config(scrollregion=(0,0,self.picker.canvas_width, self.picker.canvas_height))
|
||||
self.map_frame.update()
|
||||
self.picker.canvas.config(height=self.map_frame.winfo_height())
|
||||
|
|
@ -468,9 +466,6 @@ class Tileset:
|
|||
)
|
||||
self.palettes = get_palettes(filename)
|
||||
|
||||
|
||||
|
||||
|
||||
def get_palettes(filename):
|
||||
pals = bytearray(open(filename, 'rb').read())
|
||||
|
||||
|
|
@ -498,8 +493,6 @@ def get_palettes(filename):
|
|||
]]
|
||||
return palettes
|
||||
|
||||
|
||||
|
||||
def get_available_maps(config=config):
|
||||
for root, dirs, files in os.walk(config.map_dir):
|
||||
for filename in files:
|
||||
|
|
@ -507,7 +500,6 @@ def get_available_maps(config=config):
|
|||
if ext == '.blk':
|
||||
yield base_name
|
||||
|
||||
|
||||
def map_header(name, config=config):
|
||||
if config.version == 'crystal':
|
||||
headers = open(os.path.join(config.header_dir, 'map_headers.asm'), 'r').read()
|
||||
|
|
@ -641,14 +633,12 @@ def read_header_macros(header, attributes, macros):
|
|||
break
|
||||
return values, l
|
||||
|
||||
|
||||
def event_header(asm, name):
|
||||
return {}
|
||||
|
||||
def script_header(asm, name):
|
||||
return {}
|
||||
|
||||
|
||||
def macro_values(line, macro):
|
||||
values = line[line.find(macro) + len(macro):].split(',')
|
||||
values = [v.replace('$','0x').strip() for v in values]
|
||||
|
|
@ -664,8 +654,6 @@ def db_values(line):
|
|||
macro = 'db'
|
||||
return macro_values(line, macro)
|
||||
|
||||
|
||||
|
||||
def asm_at_label(asm, label):
|
||||
label_def = label + ':'
|
||||
lines = asm.split('\n')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user