Skip to content

Commit

Permalink
add function names
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhaLeee committed Mar 5, 2024
1 parent 39dfb3d commit e141d73
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 11 deletions.
2 changes: 1 addition & 1 deletion asm/code-banim2.s
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ EfxOverrideBgm: @ 0x08067E78
adds r0, r2, #0
bl SetBgmVolume
adds r0, r4, #0
bl sub_800394C
bl OverrideBgm
_08067E96:
pop {r4}
pop {r0}
Expand Down
4 changes: 2 additions & 2 deletions asm/event.s
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ _0800B520:
cmp r0, #0
bne _0800B534
movs r0, #0x2c
bl sub_800394C
bl OverrideBgm
bl sub_807FC14
_0800B534:
adds r4, #0x4c
Expand Down Expand Up @@ -8390,7 +8390,7 @@ sub_800E32C: @ 0x0800E32C
bne _0800E352
ldr r0, [r4, #0x30]
ldrh r0, [r0, #2]
bl sub_800394C
bl OverrideBgm
adds r0, r4, #0
movs r1, #0x21
bl sub_80149B4
Expand Down
4 changes: 2 additions & 2 deletions asm/helpbox.s
Original file line number Diff line number Diff line change
Expand Up @@ -38167,8 +38167,8 @@ _08095E7A:
_08095E84: .4byte gPlaySt
_08095E88: .4byte 0x00000387

thumb_func_start sub_8095E8C
sub_8095E8C: @ 0x08095E8C
thumb_func_start PrepItemUse_HandleItemEffect
PrepItemUse_HandleItemEffect: @ 0x08095E8C
push {r4, lr}
adds r4, r0, #0
ldr r1, [r4, #0x2c]
Expand Down
4 changes: 2 additions & 2 deletions asm/sound.s
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ _08003940: .4byte 0x03005C40
_08003944: .4byte 0x0000FFFF
_08003948: .4byte 0x03000038

thumb_func_start sub_800394C
sub_800394C: @ 0x0800394C
thumb_func_start OverrideBgm
OverrideBgm: @ 0x0800394C
push {r7, lr}
sub sp, #4
mov r7, sp
Expand Down
130 changes: 129 additions & 1 deletion data/data_08D8A368.s
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,135 @@ gUnk_08D8CF74: @ 0x08D8CF74

.global ProcScr_PrepItemUseScreen
ProcScr_PrepItemUseScreen: @ 0x08D8CFBC
.incbin "FireEmblem7J.base.gba", 0xD8CFBC, 0xD8D10C - 0xD8CFBC
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_LABEL
.short 0xb, 0x0
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_8095824
@ PROC_CALL
.short 0x2, 0x0
.word sub_8095830
@ PROC_CALL_ARG
.short 0x18, 0x10
.word NewFadeIn
@ PROC_WHILE
.short 0x14, 0x0
.word FadeInExists
@ PROC_LABEL
.short 0xb, 0x1
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_8095B64
@ PROC_LABEL
.short 0xb, 0x2
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_8095D38
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_8095D58
@ PROC_GOTO
.short 0xc, 0x1
.word 0x0
@ PROC_LABEL
.short 0xb, 0x3
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word PrepItemUse_HandleItemEffect
@ PROC_START_CHILD_BLOCKING
.short 0x6, 0x1
.word ProcScr_PrepItemUseBooster
@ PROC_GOTO
.short 0xc, 0x1
.word 0x0
@ PROC_LABEL
.short 0xb, 0x4
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_80960C4
@ PROC_CALL_ARG
.short 0x18, 0x10
.word NewFadeOut
@ PROC_WHILE
.short 0x14, 0x0
.word FadeOutExists
@ PROC_WHILE
.short 0x14, 0x0
.word sub_800409C
@ PROC_CALL
.short 0x2, 0x0
.word PrepItemUse_ExecPromotionItem
@ PROC_REPEAT
.short 0x3, 0x0
.word PrepItemUse_WaitPromotionDone
@ PROC_SLEEP
.short 0xe, 0x8
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word PrepItemUse_ResetBgmAfterPromo
@ PROC_SLEEP
.short 0xe, 0x1e
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word PrepItemUse_PostPromotion
@ PROC_CALL
.short 0x2, 0x0
.word sub_8095830
@ PROC_CALL_ARG
.short 0x18, 0x10
.word NewFadeIn
@ PROC_WHILE
.short 0x14, 0x0
.word FadeInExists
@ PROC_WHILE
.short 0x14, 0x0
.word sub_800409C
@ PROC_GOTO
.short 0xc, 0x1
.word 0x0
@ PROC_LABEL
.short 0xb, 0x5
.word 0x0
@ PROC_CALL_ARG
.short 0x18, 0x10
.word NewFadeOut
@ PROC_WHILE
.short 0x14, 0x0
.word FadeOutExists
@ PROC_LABEL
.short 0xb, 0x6
.word 0x0
@ PROC_CALL
.short 0x2, 0x0
.word sub_8095C90
@ PROC_END
.short 0x0, 0x0
.word 0x0

.global ProcScr_PrepItemUseBooster
ProcScr_PrepItemUseBooster:
@ PROC_SET_END_CB
.short 0x4, 0x0
.word sub_8096374
@ PROC_CALL
.short 0x2, 0x0
.word sub_80961B8
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_8096330
@ PROC_END
.short 0x0, 0x0
.word 0x0

.global gUnk_08D8D10C
gUnk_08D8D10C: @ 0x08D8D10C
Expand Down
2 changes: 1 addition & 1 deletion include/gbafe/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void Sound_FadeOutSE(int speed);
// sub_8003788
// sub_80037A8
// sub_8003858
// sub_800394C
// OverrideBgm
// RestoreBgm
// sub_8003A68
// MakeBgmOverridePersist
Expand Down
2 changes: 1 addition & 1 deletion include/gbafe/statscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ void ClearHelpBoxText(void);
// sub_8095D1C
// sub_8095D38
// sub_8095D58
// sub_8095E8C
// PrepItemUse_HandleItemEffect
// PrepItemUse_ExecPromotionItem
// PrepItemUse_WaitPromotionDone
// PrepItemUse_PostPromotion
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/dump_proc_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,6 @@ def resolve_and_format_command(cmd):
for start, proc in procs:
symbol = resolve_pointer(start)
start_str = symbol or hex(start)
print(f"Found script at {start_str}")
# print(f"Found script at {start_str}")
for cmd in proc:
print(resolve_and_format_command(cmd))

0 comments on commit e141d73

Please sign in to comment.