mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2025-02-17 03:30:02 +00:00
HD WRP matching (#1421)
Mostly identical to MAD and PSP. There are four very different functions from US that needs to be decompiled to be 100% complete: * [x] `e_misc.c` `EntityMessageBox` * [x] `e_misc.c` `EntityRelicOrb` * [x] ~`e_stage_name.c` `StageNamePopupHelper`~ it does not exist * [x] `e_stage_name.c` `EntityStageNamePopup` These four very different functions are the only ones that use the JP text instead of the US one. This overlay also lacks of `BlitChar`. `EntityStageNamePopup` is very similar to the PSP counterpart. I used @joshlory scratch to match the HD part. `EntityRelicOrb` had some #ifdef between US and BETA (aka the MAD overlay). I found some code that crossed between BETA and HD, so I just put an `#else` after `VERSION_US`. We are starting to reconstruct how the source code originally evolved across different game builds.
This commit is contained in:
parent
2ec252543a
commit
99bb97e859
5
Makefile
5
Makefile
@ -125,7 +125,7 @@ CHECK_FILES := $(shell cut -d' ' -f3 config/check.$(VERSION).sha)
|
||||
all: build check
|
||||
build: build_$(VERSION)
|
||||
build_us: main dra weapon ric cen dre mad no3 np3 nz0 sel st0 wrp rwrp tt_000
|
||||
build_hd: dra tt_000
|
||||
build_hd: dra $(BUILD_DIR)/WRP.BIN tt_000
|
||||
clean:
|
||||
git clean -fdx assets/
|
||||
git clean -fdx asm/$(VERSION)/
|
||||
@ -170,8 +170,10 @@ format-symbols:
|
||||
./tools/symbols.py remove-orphans config/splat.us.stsel.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.stst0.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.stwrp.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.hd.stwrp.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.strwrp.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.tt_000.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.hd.tt_000.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.stmad.yaml
|
||||
|
||||
# fast-format
|
||||
@ -497,6 +499,7 @@ $(BUILD_DIR)/$(ASSETS_DIR)/ric/%.json.o: $(ASSETS_DIR)/ric/%.json
|
||||
./tools/splat_ext/assets.py $< $(BUILD_DIR)/$(ASSETS_DIR)/ric/$*.s
|
||||
$(AS) $(AS_FLAGS) -o $(BUILD_DIR)/$(ASSETS_DIR)/ric/$*.o $(BUILD_DIR)/$(ASSETS_DIR)/ric/$*.s
|
||||
$(BUILD_DIR)/$(ASSETS_DIR)/%.bin.o: $(ASSETS_DIR)/%.bin
|
||||
mkdir -p $(dir $@)
|
||||
$(LD) -r -b binary -o $(BUILD_DIR)/$(ASSETS_DIR)/$*.o $<
|
||||
$(BUILD_DIR)/$(ASSETS_DIR)/%.dec.o: $(ASSETS_DIR)/%.dec
|
||||
# for now '.dec' files are ignored
|
||||
|
@ -5,7 +5,7 @@ PSX_RSTAGES := rwrp
|
||||
PSX_ALLSTAGES := $(addprefix st,$(PSX_KSTAGES)) $(addprefix st,$(PSX_RSTAGES))
|
||||
PSX_SERVANTS := tt_000
|
||||
PSX_US_TARGETS := main $(PSX_OVLS) $(PSX_ALLSTAGES) $(PSX_SERVANTS)
|
||||
PSX_HD_TARGETS := dra tt_000
|
||||
PSX_HD_TARGETS := dra tt_000 stwrp
|
||||
|
||||
# immovable
|
||||
PSX_BASE_SYMS := $(CONFIG_DIR)/symbols.$(VERSION).txt
|
||||
@ -15,6 +15,8 @@ extract_us: $(addprefix $(BUILD_DIR)/,$(addsuffix .ld,$(PSX_US_TARGETS)))
|
||||
make extract_assets
|
||||
make build_assets
|
||||
extract_hd: $(addprefix $(BUILD_DIR)/,$(addsuffix .ld,$(PSX_HD_TARGETS)))
|
||||
make extract_assets_hd
|
||||
make build_assets
|
||||
|
||||
extract_disk_us: extract_disk_psxus
|
||||
extract_disk_hd: extract_disk_pspeu
|
||||
@ -41,6 +43,9 @@ $(BUILD_DIR)/stmad.ld: $(CONFIG_DIR)/splat.$(VERSION).stmad.yaml $(CONFIG_DIR)/s
|
||||
$(BUILD_DIR)/st%.ld: $(CONFIG_DIR)/splat.$(VERSION).st%.yaml $(PSX_BASE_SYMS) $(CONFIG_DIR)/symbols.$(VERSION).st%.txt | st%_dirs
|
||||
$(SPLAT) $<
|
||||
$(GFXSTAGE) d disks/$(VERSION)/ST/$$(echo '$*' | tr '[:lower:]' '[:upper:]')/F_$$(echo '$*' | tr '[:lower:]' '[:upper:]').BIN $(ASSETS_DIR)/st/$*
|
||||
build/hd/st%.ld: $(CONFIG_DIR)/splat.$(VERSION).st%.yaml $(PSX_BASE_SYMS) $(CONFIG_DIR)/symbols.$(VERSION).st%.txt | st%_dirs
|
||||
$(SPLAT) $<
|
||||
$(GFXSTAGE) d disks/pspeu/PSP_GAME/USRDIR/res/ps/hdbin/f_$*.bin $(ASSETS_DIR)/st/$*
|
||||
$(BUILD_DIR)/tt_%.ld: $(CONFIG_DIR)/splat.$(VERSION).tt_%.yaml $(PSX_BASE_SYMS) $(CONFIG_DIR)/symbols.$(VERSION).tt_%.txt | tt_%_dirs
|
||||
$(SPLAT) $<
|
||||
touch $@
|
||||
@ -57,6 +62,8 @@ extract_assets: $(SOTNASSETS)
|
||||
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/ST0/ST0.BIN -o assets/st/st0
|
||||
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/WRP/WRP.BIN -o assets/st/wrp
|
||||
$(SOTNASSETS) extract -stage_ovl disks/$(VERSION)/ST/RWRP/RWRP.BIN -o assets/st/rwrp
|
||||
extract_assets_hd: $(SOTNASSETS)
|
||||
$(SOTNASSETS) extract -stage_ovl disks/pspeu/PSP_GAME/USRDIR/res/ps/hdbin/wrp.bin -o assets/st/wrp
|
||||
build_assets: $(SOTNASSETS)
|
||||
$(SOTNASSETS) build_all -i assets/st/cen -o src/st/cen/
|
||||
$(SOTNASSETS) build_all -i assets/st/dre -o src/st/dre/
|
||||
|
@ -1,2 +1,3 @@
|
||||
ea268a06a7eb7cd99928ba40e774577c4a1c504d build/hd/DRA.BIN
|
||||
3ae1425d694b0e4d65c6bb71d5a91f1769aec30c build/hd/WRP.BIN
|
||||
2253aee1338fff85351887b4473fb0b02798222b build/hd/tt_000_raw.bin
|
||||
|
88
config/splat.hd.stwrp.yaml
Normal file
88
config/splat.hd.stwrp.yaml
Normal file
@ -0,0 +1,88 @@
|
||||
options:
|
||||
platform: psx
|
||||
basename: stwrp
|
||||
base_path: ..
|
||||
build_path: build/hd
|
||||
target_path: disks/pspeu/PSP_GAME/USRDIR/res/ps/hdbin/wrp.bin
|
||||
asm_path: asm/hd/st/wrp
|
||||
asset_path: assets/st/wrp
|
||||
src_path: src/st/wrp
|
||||
ld_script_path: build/hd/stwrp.ld
|
||||
compiler: GCC
|
||||
symbol_addrs_path:
|
||||
- config/symbols.hd.txt
|
||||
- config/symbols.hd.stwrp.txt
|
||||
undefined_funcs_auto_path: config/undefined_funcs_auto.hd.stwrp.txt
|
||||
undefined_syms_auto_path: config/undefined_syms_auto.hd.stwrp.txt
|
||||
find_file_boundaries: yes
|
||||
use_legacy_include_asm: no
|
||||
migrate_rodata_to_functions: no
|
||||
asm_jtbl_label_macro: jlabel
|
||||
extensions_path: tools/splat_ext
|
||||
section_order:
|
||||
- ".data"
|
||||
- ".rodata"
|
||||
- ".text"
|
||||
- ".bss"
|
||||
- ".sbss"
|
||||
segments:
|
||||
- name: stwrp
|
||||
type: code
|
||||
start: 0x00000000
|
||||
vram: 0x80180000
|
||||
align: 4
|
||||
subalign: 4
|
||||
subsegments:
|
||||
- [0x0, .data, header]
|
||||
- [0xB8, .data, header] # layers
|
||||
- [0x1B8, .data, d_1b8] # entity gfx
|
||||
- [0x23C, .data, e_laydef] # layout entries header
|
||||
- [0x3E4, .data, d_3e4] # entity inits
|
||||
- [0x528, .data, st_debug]
|
||||
- [0x5A8, .data, e_breakable]
|
||||
- [0x608, .data, d_608]
|
||||
- [0x648, .data, warp]
|
||||
- [0x690, .data, st_update]
|
||||
- [0x6BC, .data, collision]
|
||||
- [0xA7C, .data, e_red_door]
|
||||
- [0xA94, .data, st_common]
|
||||
- [0xC94, .data, e_collect]
|
||||
- [0xF84, .data, e_misc]
|
||||
- [0xFE8, .data, e_particles]
|
||||
- [0x1124, .data, e_room_fg]
|
||||
- [0x11B0, .data, rooms]
|
||||
- [0x122C, .data, e_layout] # layout entries data
|
||||
- [0x1424, cmp, D_80181420]
|
||||
- [0x1768, cmp, D_80181764]
|
||||
- [0x1D0C, raw, D_80181D08]
|
||||
- [0x1D6C, .data, tile_data] # tile data
|
||||
- [0x296C, .data, tile_data] # tile definitions
|
||||
- [0x6D8C, .data, sprites]
|
||||
- [0x6E34, .rodata, warp] # warp strings
|
||||
- [0x6E74, .rodata, warp] # EntityWarpRoom
|
||||
- [0x6E94, .rodata, warp] # EntityWarpSmallRocks
|
||||
- [0x6EAC, .rodata, e_red_door] # EntityRedDoor
|
||||
- [0x6EC4, .rodata, e_collect] # CollectGold strings
|
||||
- [0x6F14, .rodata, e_collect] # EntityPrizeDrop
|
||||
- [0x6F34, .rodata, e_collect] # EntityEquipItemDrop
|
||||
- [0x6F4C, .rodata, e_misc] # EntityRelicOrb
|
||||
- [0x6F84, .rodata, e_misc] # EntityMessageBox
|
||||
- [0x6F98, .rodata, e_stage_name] # EntityStageNamePopup
|
||||
- [0x6FAC, .rodata, prim_helpers]
|
||||
- [0x6FB4, c, st_debug]
|
||||
- [0x7250, c, e_breakable]
|
||||
- [0x7384, c, warp]
|
||||
- [0x81BC, c, st_update]
|
||||
- [0x85F0, c, collision]
|
||||
- [0x9DAC, c, create_entity]
|
||||
- [0xA924, c, e_red_door]
|
||||
- [0xB5D4, c, st_common]
|
||||
- [0xCA84, c, e_collect]
|
||||
- [0xDFF4, c, e_misc]
|
||||
- [0x1155C, c, e_stage_name]
|
||||
- [0x11C84, c, e_particles]
|
||||
- [0x124C8, c, e_room_fg]
|
||||
- [0x125B4, c, popup]
|
||||
- [0x1298C, c, prim_helpers]
|
||||
- [0x131BC, .bss, bss]
|
||||
- [0x13E84]
|
@ -54,7 +54,7 @@ segments:
|
||||
- [0x1228, .data, e_layout] # layout entries data
|
||||
- [0x1420, cmp, D_80181420]
|
||||
- [0x1764, cmp, D_80181764]
|
||||
- [0x1D08, cmp, D_80181D08]
|
||||
- [0x1D08, raw, D_80181D08]
|
||||
- [0x1D68, .data, tile_data] # tile data
|
||||
- [0x2968, .data, tile_data] # tile definitions
|
||||
- [0x6D88, .data, sprites]
|
||||
|
@ -2,9 +2,6 @@ D_800AC910 = 0x800AC8BC;
|
||||
D_800AC914 = 0x800AC8D0;
|
||||
D_800AC934 = 0x800AC9FC;
|
||||
D_800ACE88 = 0x800ACE88; // ignore:True
|
||||
D_800ACFEC = 0x800AD0B0;
|
||||
D_800AD014 = 0x800AD0D8;
|
||||
D_800AD01C = 0x800AD0E0;
|
||||
g_FactoryBlueprints = 0x800AD298;
|
||||
D_800AE130 = 0x800AE1F4;
|
||||
D_800AE138 = 0x800AE1FC;
|
||||
@ -38,7 +35,6 @@ func_80113EE0 = 0x80113BD0;
|
||||
func_80113F7C = 0x80113C6C;
|
||||
func_80115394 = 0x80115084;
|
||||
func_80118C28 = 0x80118920;
|
||||
EntityGuardText = 0x80119280;
|
||||
CreateEntFactoryFromEntity = 0x8011A7A8;
|
||||
PlaySfx = 0x801343D4;
|
||||
g_DebugFreeze = 0x80135E88;
|
||||
|
3
config/symbols.hd.stwrp.txt
Normal file
3
config/symbols.hd.stwrp.txt
Normal file
@ -0,0 +1,3 @@
|
||||
D_80181420 = 0x80181424;
|
||||
D_80181764 = 0x80181768;
|
||||
D_80181D08 = 0x80181D0C;
|
@ -1,42 +0,0 @@
|
||||
g_Rooms = 0x801811AC;
|
||||
D_80181228 = 0x80181228;
|
||||
D_80181250 = 0x80181250;
|
||||
D_80181278 = 0x80181278;
|
||||
D_801812A0 = 0x801812A0;
|
||||
D_801812C8 = 0x801812C8;
|
||||
D_801812F0 = 0x801812F0;
|
||||
D_80181304 = 0x80181304;
|
||||
D_80181324 = 0x80181324;
|
||||
D_8018134C = 0x8018134C;
|
||||
D_80181374 = 0x80181374;
|
||||
D_8018139C = 0x8018139C;
|
||||
D_801813C4 = 0x801813C4;
|
||||
D_801813EC = 0x801813EC;
|
||||
D_80181400 = 0x80181400;
|
||||
D_80181420 = 0x80181420;
|
||||
D_80181764 = 0x80181764;
|
||||
D_80181D08 = 0x80181D08;
|
||||
D_80181D68 = 0x80181D68;
|
||||
D_80181F68 = 0x80181F68;
|
||||
D_80182168 = 0x80182168;
|
||||
D_80182368 = 0x80182368;
|
||||
D_80182568 = 0x80182568;
|
||||
D_80182768 = 0x80182768;
|
||||
D_80182D68 = 0x80182D68;
|
||||
D_80186D78 = 0x80186D78;
|
||||
D_80186D88 = 0x80186D88;
|
||||
EntityWarpRoom = 0x801873A0;
|
||||
EntityWarpSmallRocks = 0x80187F1C;
|
||||
EntityRedDoor = 0x8018A9C8;
|
||||
CollectGold = 0x8018CD10;
|
||||
EntityEquipItemDrop = 0x8018DA34;
|
||||
EntityStageNamePopup = 0x8019198C;
|
||||
DestinationWarpRoom = 0x80193AA0;
|
||||
WarpBackgroundAmplitiude = 0x80193AA4;
|
||||
WarpBackgroundPhase = 0x80193AA8;
|
||||
WarpBackgroundBrightness = 0x80193AAC;
|
||||
g_LayoutObjHorizontal = 0x80193AB0;
|
||||
g_LayoutObjVertical = 0x80193AB4;
|
||||
g_LayoutObjPosHorizontal = 0x80193AB8;
|
||||
g_LayoutObjPosVertical = 0x80193ABC;
|
||||
g_ItemIconSlots = 0x80194728;
|
@ -13,6 +13,7 @@ g_CurrentRoom = 0x800730A0;
|
||||
g_Pix = 0x8007EFE4;
|
||||
g_Pix_2 = 0x80082FE4;
|
||||
|
||||
D_80097488 = 0x80097488;
|
||||
g_pads = 0x80097490;
|
||||
g_Status = 0x80097964;
|
||||
|
||||
|
@ -174,11 +174,19 @@ typedef struct {
|
||||
/* 0x80 */ s32 unk80;
|
||||
/* 0x84 */ struct Primitive* unk84;
|
||||
/* 0x88 */ struct Primitive* unk88;
|
||||
/* 0x88 */ struct Primitive* unk8C;
|
||||
/* 0x8C */ struct Primitive* unk8C;
|
||||
/* 0x90 */ s16 unk90;
|
||||
/* 0x92 */ s16 unk92;
|
||||
} ET_StagePopup;
|
||||
|
||||
typedef struct {
|
||||
/* 0x7C */ struct Primitive* prim;
|
||||
/* 0x80 */ s16 unk80;
|
||||
/* 0x84 */ struct Primitive* unk84;
|
||||
/* 0x88 */ struct Primitive* unk88;
|
||||
/* 0x8C */ u8 unk8C;
|
||||
} ET_StagePopupJP;
|
||||
|
||||
typedef struct {
|
||||
/* 0x7C */ char* label;
|
||||
/* 0x80 */ u16 width;
|
||||
@ -1317,6 +1325,7 @@ typedef union { // offset=0x7C
|
||||
ET_RelicOrb relicOrb;
|
||||
ET_Door door;
|
||||
ET_StagePopup stpopup;
|
||||
ET_StagePopupJP stpopupj;
|
||||
ET_MessageBox messageBox;
|
||||
ET_Weapon weapon;
|
||||
ET_Shield shield;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <stage.h>
|
||||
|
||||
#if defined(VERSION_US)
|
||||
static u16 g_testCollEnemyLookup[] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000,
|
||||
0x002B, 0x0000, 0x0010, 0x0000, 0x000D, 0x0068, 0x0068, 0x0016, 0x0000,
|
||||
@ -48,6 +49,57 @@ static u16 g_testCollEnemyLookup[] = {
|
||||
0x008F, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
|
||||
#elif defined(VERSION_HD)
|
||||
static u16 g_testCollEnemyLookup[] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001E, 0x0000, 0x0000,
|
||||
0x002A, 0x0000, 0x0011, 0x0000, 0x000E, 0x0068, 0x0068, 0x0016, 0x0000,
|
||||
0x0000, 0x0000, 0x003D, 0x0000, 0x0028, 0x0052, 0x0000, 0x0000, 0x0000,
|
||||
0x0008, 0x0000, 0x000B, 0x0000, 0x007B, 0x0000, 0x0000, 0x002D, 0x0000,
|
||||
0x0000, 0x006F, 0x007A, 0x0000, 0x0018, 0x0041, 0x0000, 0x0070, 0x0000,
|
||||
0x004D, 0x0000, 0x0000, 0x0035, 0x0015, 0x005C, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0046, 0x0000,
|
||||
0x0000, 0x0005, 0x0056, 0x0042, 0x0025, 0x0034, 0x0000, 0x0002, 0x0059,
|
||||
0x0000, 0x0000, 0x0000, 0x0007, 0x0000, 0x0057, 0x0000, 0x007D, 0x0000,
|
||||
0x0009, 0x0000, 0x0023, 0x0000, 0x001D, 0x0000, 0x0000, 0x002B, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0021, 0x0000, 0x0000, 0x0000, 0x001B, 0x0000,
|
||||
0x0031, 0x0000, 0x0000, 0x0019, 0x0000, 0x008D, 0x000A, 0x002C, 0x0030,
|
||||
0x0020, 0x0000, 0x0004, 0x0048, 0x0000, 0x005E, 0x0037, 0x0036, 0x0069,
|
||||
0x0000, 0x003B, 0x0000, 0x0065, 0x0000, 0x0045, 0x0000, 0x001A, 0x0000,
|
||||
0x006E, 0x0000, 0x0026, 0x0038, 0x0000, 0x004F, 0x0000, 0x004C, 0x0000,
|
||||
0x0000, 0x0040, 0x0000, 0x0076, 0x0000, 0x0000, 0x006D, 0x0000, 0x0000,
|
||||
0x0071, 0x0000, 0x002F, 0x0000, 0x0075, 0x0000, 0x0000, 0x0079, 0x0000,
|
||||
0x007C, 0x0000, 0x0000, 0x0013, 0x000F, 0x0039, 0x0039, 0x0000, 0x005B,
|
||||
0x005B, 0x0000, 0x0000, 0x0067, 0x0000, 0x0077, 0x0000, 0x0001, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0006, 0x0000, 0x0000, 0x000D, 0x0000,
|
||||
0x002E, 0x0000, 0x006A, 0x0029, 0x0000, 0x0000, 0x0054, 0x0000, 0x0053,
|
||||
0x0000, 0x0055, 0x0000, 0x0000, 0x0010, 0x0000, 0x0074, 0x0000, 0x0000,
|
||||
0x008E, 0x0000, 0x0000, 0x0000, 0x0000, 0x004A, 0x0000, 0x0000, 0x0047,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0043, 0x0000, 0x0000, 0x003F, 0x0000,
|
||||
0x0078, 0x008B, 0x0000, 0x0000, 0x0000, 0x004E, 0x0000, 0x0000, 0x008A,
|
||||
0x004B, 0x0000, 0x003E, 0x003C, 0x0089, 0x0000, 0x0000, 0x0000, 0x001F,
|
||||
0x0000, 0x0000, 0x007E, 0x0000, 0x0000, 0x0049, 0x0000, 0x0000, 0x0000,
|
||||
0x0014, 0x0000, 0x0000, 0x000C, 0x0027, 0x0000, 0x0000, 0x0000, 0x0033,
|
||||
0x0000, 0x0024, 0x0012, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0032, 0x0061, 0x0000, 0x0063, 0x0000, 0x0000, 0x0082, 0x0000, 0x0000,
|
||||
0x0000, 0x0051, 0x0000, 0x0073, 0x0000, 0x0000, 0x0000, 0x0050, 0x0000,
|
||||
0x0000, 0x0058, 0x0000, 0x0000, 0x0000, 0x0084, 0x0066, 0x0000, 0x003A,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0022, 0x0064, 0x0064,
|
||||
0x0000, 0x0000, 0x0000, 0x0044, 0x0000, 0x0000, 0x0017, 0x001C, 0x006B,
|
||||
0x0000, 0x008C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0060, 0x0062,
|
||||
0x0088, 0x0000, 0x0000, 0x0000, 0x0086, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0085, 0x0000, 0x0000, 0x0087, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x005F, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x005D,
|
||||
0x0091, 0x0000, 0x0000, 0x0000, 0x0000, 0x0090, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x005A, 0x0000, 0x0000, 0x0083, 0x0000, 0x0000,
|
||||
0x0000, 0x0080, 0x0000, 0x007F, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0092, 0x0000, 0x0000, 0x0000, 0x0000, 0x0003, 0x0000, 0x0072,
|
||||
0x0000, 0x0000, 0x006C, 0x0000, 0x0000, 0x0081, 0x0081, 0x0000, 0x0000,
|
||||
0x008F, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static u8 g_testCollLuckCutoff[] = {
|
||||
0x00,
|
||||
0x40,
|
||||
|
@ -221,10 +221,10 @@ void EntityPrizeDrop(Entity* self) {
|
||||
AnimateEntity(g_SubweaponAnimPrizeDrop[itemId], self);
|
||||
#endif
|
||||
}
|
||||
#if defined(VERSION_PSP)
|
||||
if (self->step && self->step < 5 && self->hitFlags) {
|
||||
#else
|
||||
#if defined(VERSION_US)
|
||||
if (self->step > 1 && self->step < 5 && self->hitFlags) {
|
||||
#else
|
||||
if (self->step && self->step < 5 && self->hitFlags) {
|
||||
#endif
|
||||
self->step = 5;
|
||||
}
|
||||
@ -485,7 +485,13 @@ void EntityEquipItemDrop(Entity* self) {
|
||||
const char* name;
|
||||
|
||||
itemId = self->params & 0x7FFF;
|
||||
if (self->step >= 2 && self->step < 5 && self->hitFlags) {
|
||||
if (
|
||||
#if defined(VERSION_US)
|
||||
self->step >= 2 &&
|
||||
#else
|
||||
self->step &&
|
||||
#endif
|
||||
self->step < 5 && self->hitFlags) {
|
||||
self->step = 5;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include <stage.h>
|
||||
|
||||
#if defined(VERSION_HD)
|
||||
static u32 padding = 0;
|
||||
#endif
|
||||
|
||||
u16 g_ESoulStealOrbAngles[] = {
|
||||
0x820, 0x840, 0x860, 0x880, 0x8C0, 0x900, 0x940, 0xA00,
|
||||
};
|
||||
|
@ -2,6 +2,12 @@
|
||||
// params: message box duration
|
||||
// ext.messageBox.label: box size and text to render
|
||||
void EntityMessageBox(Entity* self) {
|
||||
const u16 VramX = 0;
|
||||
const u16 VramY = 0x180;
|
||||
const int FontW = 12;
|
||||
const int FontH = 16;
|
||||
const int FontLen = FontW * FontH / 2 / sizeof(u16); // 4bpp
|
||||
|
||||
Primitive* prim;
|
||||
s32 i;
|
||||
char* str;
|
||||
@ -12,9 +18,13 @@ void EntityMessageBox(Entity* self) {
|
||||
u8 ch;
|
||||
RECT rect;
|
||||
|
||||
s32 s4;
|
||||
u16 s5;
|
||||
s32 s6;
|
||||
u16 x;
|
||||
u16 y;
|
||||
u16 nCh;
|
||||
|
||||
u16 chjp;
|
||||
u16* srcJpPix;
|
||||
u16* dstJpPix;
|
||||
|
||||
switch (self->step) {
|
||||
case 0:
|
||||
@ -89,7 +99,7 @@ void EntityMessageBox(Entity* self) {
|
||||
self->step++;
|
||||
break;
|
||||
case 2:
|
||||
#if !defined(VERSION_PSP)
|
||||
#if defined(VERSION_US)
|
||||
dstPix = g_Pix[0];
|
||||
chPix = dstPix;
|
||||
str = self->ext.messageBox.label;
|
||||
@ -114,20 +124,45 @@ void EntityMessageBox(Entity* self) {
|
||||
str, &xOffset, chPix, (self->ext.messageBox.width >> 1));
|
||||
}
|
||||
}
|
||||
|
||||
LoadTPage((u_long*)dstPix, 0, 0, 0, 0x180, self->ext.messageBox.width,
|
||||
self->ext.messageBox.height);
|
||||
self->ext.messageBox.duration = 0;
|
||||
self->step++;
|
||||
#else
|
||||
s6 = 0;
|
||||
s4 = 0;
|
||||
s5 = 0x180;
|
||||
LoadTPage((u_long*)dstPix, 0, 0, VramX, VramY,
|
||||
self->ext.messageBox.width, self->ext.messageBox.height);
|
||||
#elif defined(VERSION_PSP)
|
||||
nCh = 0;
|
||||
x = VramX;
|
||||
y = VramY;
|
||||
str = self->ext.messageBox.label;
|
||||
BlitChar(str, 0, 0, 0x180);
|
||||
#elif defined(VERSION_HD)
|
||||
nCh = 0;
|
||||
x = VramX;
|
||||
y = VramY;
|
||||
str = self->ext.messageBox.label;
|
||||
while (true) {
|
||||
chjp = *str++;
|
||||
if (!chjp) {
|
||||
break;
|
||||
}
|
||||
if (chjp == 1) {
|
||||
y += FontH;
|
||||
x = 0;
|
||||
} else {
|
||||
chjp = (*str++ | (chjp << 8));
|
||||
srcJpPix = g_api.func_80106A28(chjp, 1);
|
||||
if (srcJpPix) {
|
||||
dstJpPix = &D_801997E8[nCh * FontLen];
|
||||
for (i = 0; i < FontLen; i++) {
|
||||
*dstJpPix++ = *srcJpPix++;
|
||||
}
|
||||
LoadTPage(
|
||||
&D_801997E8[nCh * FontLen], 0, 0, x, y, FontW, FontH);
|
||||
x += 3;
|
||||
nCh++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
self->ext.messageBox.duration = 0;
|
||||
self->step++;
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
self->ext.messageBox.duration++;
|
||||
|
@ -3,7 +3,7 @@
|
||||
const char* g_RelicOrbTexts[] = {
|
||||
#if defined(VERSION_US)
|
||||
"Obtained ",
|
||||
#elif defined(VERSION_BETA)
|
||||
#else
|
||||
"を入手した"
|
||||
#endif
|
||||
};
|
||||
@ -19,10 +19,10 @@ void EntityRelicOrb(Entity* self) {
|
||||
// prim 0: green rectangle for Obtained text bg
|
||||
// prim 1: blue rectangle for Obtained text bg
|
||||
|
||||
#if defined(VERSION_US)
|
||||
const int MaxItemSlots = LEN(g_ItemIconSlots) - 1;
|
||||
#elif defined(VERSION_BETA)
|
||||
#if defined(VERSION_BETA)
|
||||
const int MaxItemSlots = LEN(g_ItemIconSlots);
|
||||
#else
|
||||
const int MaxItemSlots = LEN(g_ItemIconSlots) - 1;
|
||||
#endif
|
||||
|
||||
u16 relicId;
|
||||
@ -51,7 +51,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
s16 new_var6;
|
||||
u16 var_s0_2_2;
|
||||
|
||||
#if defined(VERSION_BETA)
|
||||
#if !defined(VERSION_US)
|
||||
u16 vramX;
|
||||
u16* chPixSrc;
|
||||
u16* chPixDst;
|
||||
@ -93,7 +93,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
self->primIndex = primIndex;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
self->ext.relicOrb.iconSlot = iconSlot;
|
||||
#if defined(VERSION_US)
|
||||
#if !defined(VERSION_BETA)
|
||||
g_ItemIconSlots[iconSlot] = 0x10;
|
||||
#endif
|
||||
relic = &g_api.relicDefs[relicId];
|
||||
@ -137,7 +137,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
|
||||
case 5:
|
||||
g_api.func_800FE044(relicId, 0x2000);
|
||||
#if defined(VERSION_US)
|
||||
#if !defined(VERSION_BETA)
|
||||
if (relicId > RELIC_DEMON_CARD && relicId < RELIC_FAERIE_CARD) {
|
||||
g_Status.relics[relicId] = g_Status.relics[relicId] ^ 2;
|
||||
}
|
||||
@ -217,7 +217,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
LoadTPage(chPix, 0, 0, 0, 0x100, 0x180, 0x10);
|
||||
self->ext.relicOrb.unk7C = 0;
|
||||
self->ext.relicOrb.unk7E = msgLen;
|
||||
#elif defined(VERSION_BETA)
|
||||
#else
|
||||
msgLen = 0;
|
||||
isObtainedTextStored = false;
|
||||
vramX = 0;
|
||||
@ -309,7 +309,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
#if defined(VERSION_US)
|
||||
prim->x0 = 0x80 - self->ext.relicOrb.unk7E;
|
||||
#elif defined(VERSION_BETA)
|
||||
#else
|
||||
prim->x0 = 0x80 - self->ext.relicOrb.unk7E * 6;
|
||||
#endif
|
||||
prim->drawMode = 0;
|
||||
@ -322,10 +322,7 @@ void EntityRelicOrb(Entity* self) {
|
||||
}
|
||||
|
||||
if (self->step < 2) {
|
||||
#if defined(VERSION_US)
|
||||
BlinkItem(self, g_Timer);
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
#elif defined(VERSION_BETA)
|
||||
#if defined(VERSION_BETA)
|
||||
// This is just the function BlinkItem inlined
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
|
||||
@ -352,6 +349,9 @@ void EntityRelicOrb(Entity* self) {
|
||||
prim->g2 = prim->g3 = prim->b0 = prim->b1 = prim->b2 =
|
||||
prim->b3 = 128;
|
||||
}
|
||||
#else
|
||||
BlinkItem(self, g_Timer);
|
||||
prim = &g_PrimBuf[self->primIndex];
|
||||
#endif
|
||||
|
||||
// Animates the four sparkles while the relic is floating
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <stage.h>
|
||||
|
||||
#if !defined(VERSION_PSP)
|
||||
#if defined(VERSION_US)
|
||||
void BottomCornerText(u8* str, u8 lower_left) {
|
||||
u8 toPrint[64];
|
||||
Primitive* prim;
|
||||
@ -218,7 +218,12 @@ void BottomCornerText(u8* str, u8 lower_left) {
|
||||
prim->g0 = prim->g1 = 0x5F;
|
||||
}
|
||||
|
||||
#if defined(VERSION_HD)
|
||||
ch = 8;
|
||||
textWidth *= ch;
|
||||
#else
|
||||
textWidth *= 8;
|
||||
#endif
|
||||
|
||||
if (lower_left) {
|
||||
textWidth += 4;
|
||||
|
@ -6,5 +6,6 @@ s8 g_LayoutObjPosHorizontal;
|
||||
static u8 pad0[3];
|
||||
s8 g_LayoutObjPosVertical;
|
||||
static u8 pad1[3];
|
||||
static s32 pad2[0x31A];
|
||||
s32 g_ItemIconSlots[16];
|
||||
u16 D_801997E8[0x600];
|
||||
static s32 pad2[0x1A];
|
||||
u16 g_ItemIconSlots[32];
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "wrp.h"
|
||||
|
||||
extern u16 D_80180608[];
|
||||
extern u16 D_801997E8[0x600];
|
||||
|
||||
#include "../entity_relic_orb.h"
|
||||
|
||||
|
@ -1,3 +1,248 @@
|
||||
#include "wrp.h"
|
||||
|
||||
#if defined(VERSION_US)
|
||||
#include "../e_stage_name.h"
|
||||
|
||||
#else
|
||||
void EntityStageNamePopup(Entity* self) {
|
||||
u8 padding[0xD8];
|
||||
Primitive* prim;
|
||||
u8 var_s6;
|
||||
s16 primIndex;
|
||||
s16 var_s4;
|
||||
s16 var_s3;
|
||||
s16 var_s2;
|
||||
s32 i;
|
||||
|
||||
switch (self->step) {
|
||||
case 0:
|
||||
if (g_CastleFlags[2]) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
|
||||
InitializeEntity(g_EInitGeneric);
|
||||
self->ext.stpopupj.unk8C = 0;
|
||||
primIndex = g_api.AllocPrimitives(PRIM_GT4, 181);
|
||||
if (primIndex == -1) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
self->primIndex = primIndex;
|
||||
self->flags |= FLAG_HAS_PRIMS;
|
||||
prim = &g_PrimBuf[primIndex];
|
||||
self->ext.stpopupj.prim = prim;
|
||||
for (i = 0; i < 2; i++) {
|
||||
prim->tpage = 0x11;
|
||||
prim->clut = 0x19F;
|
||||
if (i) {
|
||||
prim->clut = 0x19D;
|
||||
}
|
||||
prim->x2 = prim->x0 = 0x40;
|
||||
prim->y1 = prim->y0 = 0x9D;
|
||||
prim->x3 = prim->x1 = 0xC0;
|
||||
prim->y3 = prim->y2 = 0xC4;
|
||||
prim->u2 = prim->u0 = 0;
|
||||
prim->v0 = prim->v1 = 0;
|
||||
prim->u1 = prim->u3 = 0x80;
|
||||
prim->v2 = prim->v3 = 0x27;
|
||||
prim->r0 = 0x78;
|
||||
prim->g0 = 0x78;
|
||||
prim->b0 = 0xa8;
|
||||
if (i) {
|
||||
prim->r0 = prim->b0 = prim->g0 = 0;
|
||||
}
|
||||
LOW(prim->r1) = LOW(prim->r0);
|
||||
LOW(prim->r2) = LOW(prim->r0);
|
||||
LOW(prim->r3) = LOW(prim->r0);
|
||||
|
||||
prim->priority = 0xC0 - i;
|
||||
prim->drawMode = DRAW_COLORS;
|
||||
if (i) {
|
||||
prim->drawMode =
|
||||
DRAW_TRANSP | DRAW_TPAGE | DRAW_COLORS | DRAW_HIDE;
|
||||
}
|
||||
prim = prim->next;
|
||||
}
|
||||
|
||||
self->ext.stpopupj.unk88 = prim;
|
||||
UnkPolyFunc2(prim);
|
||||
prim->tpage = 0x1A;
|
||||
prim->clut = 0x19E;
|
||||
prim->u0 = 0;
|
||||
prim->u1 = 0x10;
|
||||
prim->u2 = prim->u0;
|
||||
prim->u3 = prim->u1;
|
||||
prim->v0 = 0x40;
|
||||
prim->v1 = prim->v0;
|
||||
prim->v2 = 0x50;
|
||||
prim->v3 = prim->v2;
|
||||
LOH(prim->next->r2) = 0xE;
|
||||
LOH(prim->next->b2) = 0xE;
|
||||
prim->next->b3 = 0x80;
|
||||
prim->priority = 0xC0;
|
||||
prim->drawMode = DRAW_HIDE;
|
||||
prim = prim->next;
|
||||
prim = prim->next;
|
||||
self->ext.stpopupj.unk84 = prim;
|
||||
prim->type = 3;
|
||||
prim->tpage = 0x1A;
|
||||
prim->clut = 0x15F;
|
||||
prim->u0 = 0;
|
||||
prim->u1 = 0x40;
|
||||
prim->u2 = prim->u0;
|
||||
prim->u3 = prim->u1;
|
||||
prim->v0 = 0xC0;
|
||||
prim->v1 = prim->v0;
|
||||
prim->v2 = 0xFF;
|
||||
prim->v3 = prim->v2;
|
||||
prim->x2 = prim->x0 = 8;
|
||||
prim->y1 = prim->y0 = 0x9B;
|
||||
prim->x3 = prim->x1 = 0xF8;
|
||||
prim->y3 = prim->y2 = 0xC6;
|
||||
prim->r0 = 0x10;
|
||||
prim->g0 = 0x28;
|
||||
prim->b0 = 0;
|
||||
LOW(prim->r1) = LOW(prim->r0);
|
||||
prim->r2 = 8;
|
||||
prim->g2 = 0;
|
||||
prim->b2 = 0x38;
|
||||
LOW(prim->r3) = LOW(prim->r2);
|
||||
prim->priority = 0xB0;
|
||||
prim->drawMode = DRAW_TRANSP | DRAW_TPAGE | DRAW_COLORS;
|
||||
prim = prim->next;
|
||||
self->step = 1;
|
||||
case 1:
|
||||
switch (self->step_s) {
|
||||
case 0:
|
||||
prim = self->ext.stpopupj.prim;
|
||||
for (i = 0; i < 2; i++) {
|
||||
prim->u0 = prim->u2 = 0x80;
|
||||
prim->v0 = prim->v1 = 0x14;
|
||||
prim->v2 = prim->v3 = prim->v0 + 2;
|
||||
prim->x3 = prim->x1 = i * 3 + 0xC0;
|
||||
prim->x0 = prim->x2 = i * 3 + 0xC0;
|
||||
prim->y1 = prim->y0 = i * 2 + 0xB1;
|
||||
prim->y3 = prim->y2 = prim->y0 + 2;
|
||||
prim = prim->next;
|
||||
}
|
||||
prim = self->ext.stpopupj.unk84;
|
||||
prim->x0 = prim->x2 = 0x80;
|
||||
prim->x1 = prim->x3 = 0x80;
|
||||
prim->y0 = prim->y1 = 0xB0;
|
||||
prim->y2 = prim->y3 = 0xB0;
|
||||
self->step_s++;
|
||||
case 1:
|
||||
var_s6 = 0;
|
||||
prim = self->ext.stpopupj.unk84;
|
||||
if (prim->y0 >= 0x9C) {
|
||||
prim->y0 -= 4;
|
||||
prim->y1 = prim->y0;
|
||||
prim->y2 += 4;
|
||||
prim->y3 = prim->y2;
|
||||
var_s6 |= 1;
|
||||
}
|
||||
if (prim->x0 >= 0x11) {
|
||||
prim->x0 -= 8;
|
||||
prim->x2 = prim->x0;
|
||||
prim->x1 += 8;
|
||||
prim->x3 = prim->x1;
|
||||
var_s6 |= 1;
|
||||
}
|
||||
if (!var_s6) {
|
||||
self->step_s++;
|
||||
prim = self->ext.stpopupj.prim;
|
||||
prim = prim->next;
|
||||
prim->drawMode = DRAW_TRANSP | DRAW_TPAGE | DRAW_COLORS;
|
||||
prim = self->ext.stpopupj.unk88;
|
||||
prim->drawMode =
|
||||
DRAW_TRANSP | DRAW_TPAGE | DRAW_TPAGE2 | DRAW_COLORS;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
prim = self->ext.stpopupj.prim;
|
||||
for (i = 0; i < 2; i++) {
|
||||
prim->u0 -= 8;
|
||||
prim->u2 = prim->u0;
|
||||
prim->x0 -= 8;
|
||||
prim->x2 = prim->x0;
|
||||
var_s4 = prim->x0;
|
||||
var_s3 = prim->y0;
|
||||
prim = prim->next;
|
||||
}
|
||||
prim = self->ext.stpopupj.unk88;
|
||||
prim->next->x1 = var_s4;
|
||||
prim->next->y0 = var_s3;
|
||||
LOH(prim->next->tpage) -= 0x80;
|
||||
UnkPrimHelper(prim);
|
||||
prim = self->ext.stpopupj.prim;
|
||||
if (!prim->u0) {
|
||||
self->step_s = 3;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
PrimDecreaseBrightness(self->ext.stpopupj.unk88, 4);
|
||||
if (!(g_Timer % 2)) {
|
||||
prim = self->ext.stpopupj.prim;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (prim->y0 > i * 2 + 0x9D) {
|
||||
prim->v0--;
|
||||
prim->v1 = prim->v0;
|
||||
prim->y0--;
|
||||
prim->y1 = prim->y0;
|
||||
} else {
|
||||
self->step_s = 4;
|
||||
}
|
||||
if (prim->y2 < i * 2 + 0xC4) {
|
||||
prim->v2++;
|
||||
prim->v3 = prim->v2;
|
||||
prim->y2++;
|
||||
prim->y3 = prim->y2;
|
||||
}
|
||||
prim = prim->next;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
self->step = 0x20;
|
||||
self->ext.stpopupj.unk80 = 0x20;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
if (self->step_s != 0) {
|
||||
return;
|
||||
}
|
||||
prim = self->ext.stpopupj.unk84;
|
||||
prim->x1 -= 4;
|
||||
var_s2 = prim->x3 = prim->x1;
|
||||
prim = self->ext.stpopupj.prim;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (prim->x1 > var_s2) {
|
||||
prim->x1 -= 4;
|
||||
prim->x3 = prim->x1;
|
||||
if (prim->x1 < prim->x0) {
|
||||
prim->drawMode = DRAW_HIDE;
|
||||
}
|
||||
prim->u1 -= 4;
|
||||
prim->u3 = prim->u1;
|
||||
}
|
||||
prim = prim->next;
|
||||
}
|
||||
prim = self->ext.stpopupj.unk84;
|
||||
if (prim->x0 > prim->x1) {
|
||||
DestroyEntity(self);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
if (!--self->ext.stpopupj.unk80) {
|
||||
g_CastleFlags[2] = 1;
|
||||
self->step_s = 0;
|
||||
self->step = 0x12;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <stage.h>
|
||||
|
||||
#if defined(VERSION_US)
|
||||
#include "tilemap_01D68.h"
|
||||
#include "tilemap_01F68.h"
|
||||
#include "tilemap_02168.h"
|
||||
@ -8,3 +9,15 @@
|
||||
#include "tilemap_02768.h"
|
||||
#include "tiledef_02D68.h"
|
||||
#include "tiledef_06D78.h"
|
||||
|
||||
#elif defined(VERSION_HD)
|
||||
#include "tilemap_01D6C.h"
|
||||
#include "tilemap_01F6C.h"
|
||||
#include "tilemap_0216C.h"
|
||||
#include "tilemap_0236C.h"
|
||||
#include "tilemap_0256C.h"
|
||||
#include "tilemap_0276C.h"
|
||||
#include "tiledef_02D6C.h"
|
||||
#include "tiledef_06D7C.h"
|
||||
|
||||
#endif
|
||||
|
@ -226,20 +226,20 @@ def resolve_jumptables(func: NonMatchingFunc):
|
||||
break
|
||||
print("good nop")
|
||||
# Build a regex to search for the standard jump table setup
|
||||
lw_regex = "lw\s*\\" + jumpreg + ", %lo\(([^)]*)\)\(\$at\)"
|
||||
lw_regex = r'lw\s*\\" + jumpreg + ", %lo\(([^)]*)\)\(\$at\)'
|
||||
lwcheck = re.search(lw_regex, lines[i - 2])
|
||||
if lwcheck == None:
|
||||
break
|
||||
jumptable_name = lwcheck.group(1)
|
||||
print(f"Jumptable: {jumptable_name}")
|
||||
addu_regex = "addu\s*\$at, \$at, \$"
|
||||
addu_regex = r"addu\s*\$at, \$at, \$"
|
||||
adducheck = re.search(addu_regex, lines[i - 3])
|
||||
if adducheck == None:
|
||||
print("Couldn't get the addu")
|
||||
print(lines[i - 3])
|
||||
break
|
||||
print("Good addu")
|
||||
lui_regex = "lui\s*\$at, %hi\(" + jumptable_name + "\)"
|
||||
lui_regex = r'lui\s*\$at, %hi\(" + jumptable_name + "\)'
|
||||
luicheck = re.search(lui_regex, lines[i - 4])
|
||||
if luicheck == None:
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user