Skip to content

Commit

Permalink
rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhaLeee committed Jul 19, 2024
1 parent 90702ff commit cb9420a
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 63 deletions.
2 changes: 2 additions & 0 deletions FireEmblem7J.lds
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ SECTIONS
asm/debug-menu.o(.text);
asm/player-phase.o(.text);
asm/bmfx.o(.text);
src/bmfx-swingsword.o(.text);
asm/bmfx-swingsword.o(.text);
asm/bmfx-minefx.o(.text);
asm/bmfx-niniantransform.o(.text);
Expand Down Expand Up @@ -359,6 +360,7 @@ SECTIONS
. = ALIGN(4); src/sprite-anim.o(.data)
. = ALIGN(4); data/gamecontrol.o(.data)
. = ALIGN(4); data/data.o(.data)
. = ALIGN(4); src/bmfx-swingsword.o(.data)
. = ALIGN(4); asm/bmfx-swingsword.o(.data)
. = ALIGN(4); asm/bmfx-minefx.o(.data)
. = ALIGN(4); asm/bmfx-niniantransform.o(.data)
Expand Down
24 changes: 12 additions & 12 deletions asm/bm.s
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ _08015D08:
bx r0
.align 2, 0

thumb_func_start sub_8015D10
sub_8015D10: @ 0x08015D10
thumb_func_start GetCameraAdjustedX
GetCameraAdjustedX: @ 0x08015D10
push {r4, lr}
adds r3, r0, #0
ldr r0, _08015D50 @ =gBmSt
Expand Down Expand Up @@ -869,8 +869,8 @@ _08015D46:
.align 2, 0
_08015D50: .4byte gBmSt

thumb_func_start sub_8015D54
sub_8015D54: @ 0x08015D54
thumb_func_start GetCameraAdjustedY
GetCameraAdjustedY: @ 0x08015D54
push {r4, lr}
adds r3, r0, #0
ldr r0, _08015D94 @ =gBmSt
Expand Down Expand Up @@ -1350,8 +1350,8 @@ _080160C8:
.align 2, 0
_080160D0: .4byte gBmMapSize

thumb_func_start sub_80160D4
sub_80160D4: @ 0x080160D4
thumb_func_start EnsureCameraOntoCenteredPosition
EnsureCameraOntoCenteredPosition: @ 0x080160D4
push {r4, r5, r6, r7, lr}
sub sp, #8
adds r5, r0, #0
Expand Down Expand Up @@ -1422,8 +1422,8 @@ _08016150:
.align 2, 0
_08016158: .4byte gBmSt

thumb_func_start sub_801615C
sub_801615C: @ 0x0801615C
thumb_func_start EnsureCameraOntoPosition
EnsureCameraOntoPosition: @ 0x0801615C
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
Expand All @@ -1432,12 +1432,12 @@ sub_801615C: @ 0x0801615C
mov r8, r1
mov sb, r2
lsls r0, r1, #4
bl sub_8015D10
bl GetCameraAdjustedX
lsls r0, r0, #0x10
lsrs r7, r0, #0x10
mov r1, sb
lsls r0, r1, #4
bl sub_8015D54
bl GetCameraAdjustedY
lsls r0, r0, #0x10
lsrs r6, r0, #0x10
ldr r1, _080161A4 @ =gBmSt
Expand Down Expand Up @@ -1501,13 +1501,13 @@ sub_80161EC: @ 0x080161EC
push {r4, r5, lr}
adds r5, r1, #0
lsls r0, r0, #4
bl sub_8015D10
bl GetCameraAdjustedX
adds r4, r0, #0
lsls r4, r4, #0x10
lsrs r4, r4, #0x10
lsls r5, r5, #4
adds r0, r5, #0
bl sub_8015D54
bl GetCameraAdjustedY
lsls r0, r0, #0x10
lsrs r2, r0, #0x10
ldr r1, _08016220 @ =gBmSt
Expand Down
8 changes: 4 additions & 4 deletions asm/bmfx.s
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ _0801DB5C:
cmp r2, #0
blt _0801DB76
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
ldr r0, [sp]
ldr r1, [sp, #4]
bl SetMapCursorPosition
Expand All @@ -502,7 +502,7 @@ sub_801DB80: @ 0x0801DB80
adds r0, r6, #0
adds r1, r4, #0
adds r2, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
adds r0, r4, #0
adds r1, r5, #0
bl SetMapCursorPosition
Expand Down Expand Up @@ -3391,7 +3391,7 @@ sub_801F260: @ 0x0801F260
ldr r1, [r5, #0x2c]
adds r0, r5, #0
movs r2, #0x1f
bl sub_801615C
bl EnsureCameraOntoPosition
add sp, #8
pop {r4, r5}
pop {r0}
Expand Down Expand Up @@ -3434,7 +3434,7 @@ sub_801F2E8: @ 0x0801F2E8
adds r2, r0, r2
adds r0, r5, #0
adds r1, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
str r4, [r5, #0x34]
pop {r4, r5}
pop {r0}
Expand Down
8 changes: 4 additions & 4 deletions asm/code-ai.s
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ sub_80355FC: @ 0x080355FC
_0803564E:
adds r0, r4, #0
adds r2, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
b _08035690
.align 2, 0
_08035658: .4byte gPlaySt
Expand All @@ -1152,7 +1152,7 @@ _08035668:
ldrb r1, [r3, #2]
ldrb r2, [r3, #3]
adds r0, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
b _08035690
_0803567E:
ldr r0, _08035698 @ =gActiveUnit
Expand All @@ -1162,7 +1162,7 @@ _0803567E:
movs r2, #0x11
ldrsb r2, [r0, r2]
adds r0, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
_08035690:
pop {r4, r5, r6}
pop {r0}
Expand Down Expand Up @@ -1689,7 +1689,7 @@ _08035AEA:
mov r0, r8
adds r1, r6, #0
adds r2, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
lsls r0, r6, #4
lsls r1, r5, #4
movs r2, #2
Expand Down
12 changes: 6 additions & 6 deletions asm/code1.s
Original file line number Diff line number Diff line change
Expand Up @@ -4891,7 +4891,7 @@ _080309EC:
ldrb r2, [r0]
adds r0, r6, #0
adds r1, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
pop {r4, r5, r6}
pop {r0}
bx r0
Expand Down Expand Up @@ -5793,7 +5793,7 @@ sub_8031114: @ 0x08031114
movs r2, #0x11
ldrsb r2, [r0, r2]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
ldr r0, _08031190 @ =gPlaySt
adds r0, #0x41
ldrb r0, [r0]
Expand Down Expand Up @@ -5989,7 +5989,7 @@ sub_80312E8: @ 0x080312E8
movs r2, #0x11
ldrsb r2, [r0, r2]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
pop {r4, r5}
pop {r0}
bx r0
Expand Down Expand Up @@ -6252,7 +6252,7 @@ _08031504:
movs r3, #2
ldrsh r2, [r4, r3]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
movs r1, #0
ldrsh r0, [r4, r1]
movs r2, #2
Expand Down Expand Up @@ -10143,7 +10143,7 @@ MassEffectDisplay_Watch: @ 0x08033400
movs r2, #1
ldrsb r2, [r0, r2]
adds r0, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
pop {r4}
pop {r0}
bx r0
Expand Down Expand Up @@ -10514,7 +10514,7 @@ sub_80336E0: @ 0x080336E0
lsls r2, r2, #0x18
asrs r2, r2, #0x18
adds r0, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
_0803370A:
pop {r4}
pop {r0}
Expand Down
2 changes: 1 addition & 1 deletion asm/code_0807F9EC.s
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ForceCenteredDragon: @ 0x0807FAFC
movs r2, #0x11
ldrsb r2, [r4, r2]
adds r0, r5, #0
bl sub_80160D4
bl EnsureCameraOntoCenteredPosition
pop {r4, r5}
pop {r0}
bx r0
Expand Down
2 changes: 1 addition & 1 deletion asm/eventcall.s
Original file line number Diff line number Diff line change
Expand Up @@ -5922,7 +5922,7 @@ sub_807B158: @ 0x0807B158
movs r2, #1
ldrsb r2, [r0, r2]
movs r0, #0
bl sub_801615C
bl EnsureCameraOntoPosition
ldr r1, [r6]
movs r0, #0x10
ldrsb r0, [r1, r0]
Expand Down
2 changes: 1 addition & 1 deletion asm/eventcallfx.s
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,7 @@ _0807EAA0:
movs r2, #0x11
ldrsb r2, [r4, r2]
adds r0, r6, #0
bl sub_801615C
bl EnsureCameraOntoPosition
movs r0, #0x10
ldrsb r0, [r4, r0]
movs r1, #0x11
Expand Down
18 changes: 9 additions & 9 deletions asm/eventscr.s
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ _0800BDE0:
adds r0, r2, #0
adds r1, r4, #0
adds r2, r5, #0
bl sub_80160D4
bl EnsureCameraOntoCenteredPosition
adds r0, r4, #0
adds r1, r5, #0
bl SetMapCursorPosition
Expand Down Expand Up @@ -823,11 +823,11 @@ sub_800BDFC: @ 0x0800BDFC
_0800BE28:
adds r6, r4, #0
lsls r0, r6, #4
bl sub_8015D10
bl GetCameraAdjustedX
ldr r4, _0800BE4C @ =gBmSt
strh r0, [r4, #0xc]
lsls r0, r5, #4
bl sub_8015D54
bl GetCameraAdjustedY
strh r0, [r4, #0xe]
adds r0, r6, #0
adds r1, r5, #0
Expand All @@ -841,7 +841,7 @@ _0800BE50:
adds r0, r2, #0
adds r1, r4, #0
adds r2, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
adds r0, r4, #0
adds r1, r5, #0
bl SetMapCursorPosition
Expand Down Expand Up @@ -878,13 +878,13 @@ _0800BE96:
movs r0, #0x10
ldrsb r0, [r5, r0]
lsls r0, r0, #4
bl sub_8015D10
bl GetCameraAdjustedX
ldr r4, _0800BEE8 @ =gBmSt
strh r0, [r4, #0xc]
movs r0, #0x11
ldrsb r0, [r5, r0]
lsls r0, r0, #4
bl sub_8015D54
bl GetCameraAdjustedY
strh r0, [r4, #0xe]
movs r0, #0x10
ldrsb r0, [r5, r0]
Expand All @@ -899,7 +899,7 @@ _0800BEC4:
movs r2, #0x11
ldrsb r2, [r5, r2]
adds r0, r6, #0
bl sub_801615C
bl EnsureCameraOntoPosition
movs r0, #0x10
ldrsb r0, [r5, r0]
movs r1, #0x11
Expand All @@ -924,7 +924,7 @@ sub_800BEEC: @ 0x0800BEEC
movs r2, #0x11
ldrsb r2, [r4, r2]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
movs r0, #0x10
ldrsb r0, [r4, r0]
movs r1, #0x11
Expand Down Expand Up @@ -955,7 +955,7 @@ sub_800BF1C: @ 0x0800BF1C
adds r0, r4, #0
adds r1, r5, #0
adds r2, r6, #0
bl sub_801615C
bl EnsureCameraOntoPosition
lsls r0, r0, #0x18
cmp r0, #0
bne _0800BF60
Expand Down
2 changes: 1 addition & 1 deletion asm/eventscr_08012378.s
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ _08012578:
ldr r1, [r7, #0x2c]
ldr r2, [r7, #0x30]
adds r0, r7, #0
bl sub_801615C
bl EnsureCameraOntoPosition
_08012582:
add sp, #0x10
pop {r3, r4, r5}
Expand Down
6 changes: 3 additions & 3 deletions asm/item-use.s
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ sub_8027BA4: @ 0x08027BA4
ldrsb r2, [r0, r2]
adds r0, r6, #0
adds r1, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
bl sub_801D6D8
ldr r0, _08027C4C @ =gActiveUnit
ldr r4, [r0]
Expand Down Expand Up @@ -1379,7 +1379,7 @@ sub_8027D98: @ 0x08027D98
movs r2, #0x11
ldrsb r2, [r0, r2]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
pop {r4, r5}
pop {r0}
bx r0
Expand Down Expand Up @@ -2090,7 +2090,7 @@ sub_8028354: @ 0x08028354
movs r2, #0x11
ldrsb r2, [r0, r2]
adds r0, r5, #0
bl sub_801615C
bl EnsureCameraOntoPosition
_08028398:
pop {r4, r5}
pop {r0}
Expand Down
8 changes: 4 additions & 4 deletions asm/map-menu.s
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ sub_8021ACC: @ 0x08021ACC
ldrb r2, [r2, #0x11]
lsls r2, r2, #0x18
asrs r2, r2, #0x18
bl sub_801615C
bl EnsureCameraOntoPosition
movs r0, #0x19
pop {r1}
bx r1
Expand Down Expand Up @@ -222,7 +222,7 @@ sub_8021B28: @ 0x08021B28
ldr r0, _08021B84 @ =ProcScr_CamMove
bl Proc_EndEach
lsls r0, r4, #4
bl sub_8015D54
bl GetCameraAdjustedY
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
ldr r2, _08021B88 @ =gBmSt
Expand All @@ -240,7 +240,7 @@ _08021B6C:
ldrsb r1, [r0, r1]
adds r0, r6, #0
adds r2, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
_08021B7A:
pop {r4, r5, r6}
pop {r0}
Expand Down Expand Up @@ -1014,7 +1014,7 @@ sub_80221A0: @ 0x080221A0
movs r2, #0x11
ldrsb r2, [r0, r2]
movs r0, #0
bl sub_801615C
bl EnsureCameraOntoPosition
pop {r0}
bx r0
.align 2, 0
Expand Down
2 changes: 1 addition & 1 deletion asm/map-sel.s
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ _0804B61C:
ldr r2, [sp, #4]
asrs r2, r2, #4
adds r0, r4, #0
bl sub_801615C
bl EnsureCameraOntoPosition
lsls r0, r0, #0x18
asrs r0, r0, #0x18
cmp r0, #1
Expand Down
Loading

0 comments on commit cb9420a

Please sign in to comment.