mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-03 10:41:30 -04:00
Update from decomp (#34)
* Update menus.c (#634) * Update common_data.yml (#635) * Renames for screenId and other changes (#636) * screenId renames * Rename surface map to collision mesh (#637) * Rename some stack vars (#638) * Fix syntax error (#639) * Rename some stack vars * Update collision.c * Collision Documentation (#640) * Collision related renames * update doxygen (#649) * change bool (#644) * Update (#642) * Delete trig_tables_bss.c (#650) * fix typo audio (#656) * fix typo src actor (#657) * fix typo include (#658) * fix course (#659) * fix typo debug (#660) * fix typo data (#661) * Update common_structs.h * replace number with const (#665) * fix typo buffers (#655) * fix typo buffers * tweak ld file * rename to sMemoryPool * add a warning --------- * fix typo src (#654) * fix typo src * fix non matcing * Update code_80091750.c --------- * fix typo racing (#653) * fix typo racing * get it match * replace G_LINE3D to G_QUAD --------- * fix typo src (#652) * fix ending typo (#651) * Action more info when it doesn't match and fix first diff (#662) * Update linux-compile.yml * fix first-diff * Update first-diff.py --------- * document texture of kart (#663) * document texture of kart * change screenPlayerId to screenId * some documentation around object * Revert "some documentation around object" This reverts commit cbb39078e036bf2a417bed67359e910213acab28. * more rename --------- * Make evaluate_collision_players_palm_tree better (#667) This matches just the same as before, but using those two casts instead of shifts seems more likely to be accurate to the original source code Signed-off-by: Gabriel Ravier <gabravier@gmail.com> * add fedora instruciton (#666) * start documenting animation (#668) * start documenting animation * Update course_data.c * change comment * fix error of compilation * fix error of compilation * Update animation.c
This commit is contained in:
+9
-6
@@ -2,6 +2,7 @@
|
||||
import os.path
|
||||
import argparse
|
||||
from subprocess import check_call
|
||||
import re
|
||||
|
||||
# TODO: -S argument for shifted ROMs
|
||||
|
||||
@@ -118,8 +119,9 @@ def search_map(rom_addr):
|
||||
if "noload" in line or "noload" in prev_line:
|
||||
ram_offset = None
|
||||
continue
|
||||
ram = int(line[16 : 16 + 18], 0)
|
||||
rom = int(line[59 : 59 + 18], 0)
|
||||
hex_number = re.findall(r"0x[0-9a-fA-F]+", line)
|
||||
ram = int(hex_number[0], 0) # int(line[16 : 16 + 18], 0)
|
||||
rom = int(hex_number[2], 0)# int(line[59 : 59 + 18], 0)
|
||||
ram_offset = ram - rom
|
||||
continue
|
||||
prev_line = line
|
||||
@@ -131,10 +133,11 @@ def search_map(rom_addr):
|
||||
or " 0x" not in line
|
||||
):
|
||||
continue
|
||||
ram = int(line[16 : 16 + 18], 0)
|
||||
hex_number = re.findall(r"0x[0-9a-fA-F]+", line)
|
||||
ram = int(hex_number[0], 0) # int(line[16 : 16 + 18], 0)
|
||||
rom = ram - ram_offset
|
||||
fn = line.split()[-1]
|
||||
if "0x" in fn:
|
||||
if fn.startswith("0x"):
|
||||
ram_offset = None
|
||||
continue
|
||||
if rom > rom_addr or (rom_addr & 0x80000000 and ram > rom_addr):
|
||||
@@ -265,7 +268,7 @@ for i in range(24, len(mybin), 4):
|
||||
map_search_diff.append(search_map(i))
|
||||
if diffs == 0:
|
||||
print("No differences!")
|
||||
exit()
|
||||
exit(0)
|
||||
definite_shift = diffs > shift_cap
|
||||
if not definite_shift:
|
||||
if (diffs > 1):
|
||||
@@ -288,7 +291,7 @@ if diffs > 100:
|
||||
+ basemap
|
||||
+ " and rerun this script."
|
||||
)
|
||||
exit()
|
||||
exit(1)
|
||||
|
||||
if not map_diff():
|
||||
print(f"No ROM shift{' (!?)' if definite_shift else ''}")
|
||||
|
||||
Reference in New Issue
Block a user