fix black issues

This commit is contained in:
Ethan 2024-02-02 15:11:32 +09:00
parent 6710c93baf
commit 0d94b5ed7d
No known key found for this signature in database
GPG Key ID: 9BCC97FDA5482E7A
3 changed files with 5 additions and 9 deletions

View File

@ -85,7 +85,7 @@ def write_ninja_rules(
ninja.variable("python", sys.executable)
ld_args = f"-T ver/$version/build/undefined_syms.txt -T ver/$version/undefined_syms_auto.txt -T ver/$version/undefined_funcs_auto.txt -Map $mapfile --no-check-sections -T $in -o $out"
ld = f"{cross}ld" if not 'PAPERMARIO_LD' in os.environ else os.environ['PAPERMARIO_LD']
ld = f"{cross}ld" if not "PAPERMARIO_LD" in os.environ else os.environ["PAPERMARIO_LD"]
if shift:
# For the shiftable build, we link twice to resolve some addresses that gnu ld can't figure out all in one go.

View File

@ -424,9 +424,9 @@ def write_player_xmls(
raster_attributes["special"] = f"{back_raster.width & 0xFF:X},{back_raster.height & 0xFF:X}"
else:
back_name_offset = raster_sets[sprite_idx + 1].raster_offsets[i]
raster_attributes[
"back"
] = f"{get_sprite_name_from_offset(back_name_offset, sprite_offsets, raster_names)}.png"
raster_attributes["back"] = (
f"{get_sprite_name_from_offset(back_name_offset, sprite_offsets, raster_names)}.png"
)
if back_raster.palette_idx != raster.palette_idx:
raster_attributes[BACK_PALETTE_XML] = f"{back_raster.palette_idx:X}"

View File

@ -385,11 +385,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0, namespace
var_name = (
var_names[1]
if i == 0x4
else var_names[3]
if i == 0x14
else var_names[4]
if i == 0x18
else var_names[17]
else var_names[3] if i == 0x14 else var_names[4] if i == 0x18 else var_names[17]
)
addr = unpack_from(f">I", staticNpc, curr_base + i)[0]
if not addr == 0: