Skip to content

Commit

Permalink
Split more game*.s and match GameInit
Browse files Browse the repository at this point in the history
  • Loading branch information
JaceCear committed Jan 2, 2025
1 parent 16e2cfa commit 2063ec5
Show file tree
Hide file tree
Showing 36 changed files with 2,701 additions and 2,296 deletions.
163 changes: 83 additions & 80 deletions asm/game_0_1.s

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions asm/game_1_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ _0803AD54:
movs r3, #0x63
mov sb, r3
_0803AD60:
ldr r1, _0803AD8C @ =gUnknown_03005048
ldr r1, _0803AD8C @ =sa2__gUnknown_030054B4
adds r0, r4, r1
movs r1, #0
ldrsb r1, [r0, r1]
Expand All @@ -528,7 +528,7 @@ _0803AD7C: .4byte gGameMode
_0803AD80: .4byte gLoadedSaveGame
_0803AD84: .4byte gUnknown_03005008
_0803AD88: .4byte 0x0000038E
_0803AD8C: .4byte gUnknown_03005048
_0803AD8C: .4byte sa2__gUnknown_030054B4
_0803AD90:
cmp r1, #4
beq _0803AE84
Expand All @@ -554,7 +554,7 @@ _0803ADB6:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r2, _0803ADE4 @ =gUnknown_03005048
ldr r2, _0803ADE4 @ =sa2__gUnknown_030054B4
adds r0, r0, r2
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -576,7 +576,7 @@ _0803ADDA:
b _0803AED8
.align 2, 0
_0803ADE0: .4byte 0x04000128
_0803ADE4: .4byte gUnknown_03005048
_0803ADE4: .4byte sa2__gUnknown_030054B4
_0803ADE8: .4byte gGameMode
_0803ADEC:
mov r0, sl
Expand Down Expand Up @@ -615,7 +615,7 @@ _0803AE10:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r3, _0803AE68 @ =gUnknown_03005048
ldr r3, _0803AE68 @ =sa2__gUnknown_030054B4
adds r0, r0, r3
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -640,7 +640,7 @@ _0803AE10:
b _0803AEEE
.align 2, 0
_0803AE64: .4byte 0x04000128
_0803AE68: .4byte gUnknown_03005048
_0803AE68: .4byte sa2__gUnknown_030054B4
_0803AE6C:
ldr r3, _0803AE80 @ =gGameMode
ldrb r0, [r3]
Expand Down Expand Up @@ -730,7 +730,7 @@ _0803AF08:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r2, _0803AF34 @ =gUnknown_03005048
ldr r2, _0803AF34 @ =sa2__gUnknown_030054B4
adds r0, r0, r2
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -746,14 +746,14 @@ _0803AF08:
_0803AF28: .4byte 0x04000128
_0803AF2C: .4byte gGameMode
_0803AF30: .4byte gMultiplayerConnections
_0803AF34: .4byte gUnknown_03005048
_0803AF34: .4byte sa2__gUnknown_030054B4
_0803AF38: .4byte gLoadedSaveGame
_0803AF3C: .4byte 0x00000425
_0803AF40:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r3, _0803AF64 @ =gUnknown_03005048
ldr r3, _0803AF64 @ =sa2__gUnknown_030054B4
adds r0, r0, r3
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -768,7 +768,7 @@ _0803AF40:
adds r1, r2, r3
b _0803B518
.align 2, 0
_0803AF64: .4byte gUnknown_03005048
_0803AF64: .4byte sa2__gUnknown_030054B4
_0803AF68: .4byte gLoadedSaveGame
_0803AF6C: .4byte 0x00000427
_0803AF70:
Expand Down Expand Up @@ -797,7 +797,7 @@ _0803AF8E:
str r0, [sp, #0xc]
cmp r4, r1
bhs _0803AFC0
ldr r3, _0803B028 @ =gUnknown_03005048
ldr r3, _0803B028 @ =sa2__gUnknown_030054B4
_0803AFA4:
adds r0, r4, r3
ldrb r0, [r0]
Expand All @@ -824,7 +824,7 @@ _0803AFC6:
ldrb r1, [r1]
cmp r4, r1
bhs _0803B098
ldr r2, _0803B028 @ =gUnknown_03005048
ldr r2, _0803B028 @ =sa2__gUnknown_030054B4
mov sl, r2
ldr r3, _0803B02C @ =gLoadedSaveGame
ldr r0, _0803B030 @ =0x0000038D
Expand Down Expand Up @@ -870,7 +870,7 @@ _0803AFE4:
adds r1, r0, r2
b _0803B080
.align 2, 0
_0803B028: .4byte gUnknown_03005048
_0803B028: .4byte sa2__gUnknown_030054B4
_0803B02C: .4byte gLoadedSaveGame
_0803B030: .4byte 0x0000038D
_0803B034: .4byte gUnknown_03005008
Expand Down Expand Up @@ -929,7 +929,7 @@ _0803B098:
ldr r0, [r0]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r1, _0803B0C0 @ =gUnknown_03005048
ldr r1, _0803B0C0 @ =sa2__gUnknown_030054B4
adds r0, r0, r1
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -944,7 +944,7 @@ _0803B098:
b _0803B518
.align 2, 0
_0803B0BC: .4byte 0x04000128
_0803B0C0: .4byte gUnknown_03005048
_0803B0C0: .4byte sa2__gUnknown_030054B4
_0803B0C4: .4byte gLoadedSaveGame
_0803B0C8: .4byte 0x00000425
_0803B0CC:
Expand Down Expand Up @@ -1032,7 +1032,7 @@ _0803B168:
blo _0803B174
b _0803B27A
_0803B174:
ldr r2, _0803B1E4 @ =gUnknown_03005048
ldr r2, _0803B1E4 @ =sa2__gUnknown_030054B4
mov sb, r2
ldr r3, _0803B1E8 @ =gLoadedSaveGame
ldr r7, _0803B1EC @ =gUnknown_03005008
Expand Down Expand Up @@ -1089,7 +1089,7 @@ _0803B186:
adds r1, r0, r2
b _0803B264
.align 2, 0
_0803B1E4: .4byte gUnknown_03005048
_0803B1E4: .4byte sa2__gUnknown_030054B4
_0803B1E8: .4byte gLoadedSaveGame
_0803B1EC: .4byte gUnknown_03005008
_0803B1F0: .4byte 0x0000038E
Expand Down Expand Up @@ -1167,7 +1167,7 @@ _0803B27A:
ldr r0, [r0]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r1, _0803B2A4 @ =gUnknown_03005048
ldr r1, _0803B2A4 @ =sa2__gUnknown_030054B4
adds r0, r0, r1
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -1183,7 +1183,7 @@ _0803B27A:
b _0803B518
.align 2, 0
_0803B2A0: .4byte 0x04000128
_0803B2A4: .4byte gUnknown_03005048
_0803B2A4: .4byte sa2__gUnknown_030054B4
_0803B2A8: .4byte gLoadedSaveGame
_0803B2AC: .4byte 0x00000427
_0803B2B0:
Expand All @@ -1208,7 +1208,7 @@ _0803B2C8:
str r0, [sp, #0xc]
cmp r4, r1
bhs _0803B2FA
ldr r2, _0803B32C @ =gUnknown_03005048
ldr r2, _0803B32C @ =sa2__gUnknown_030054B4
_0803B2DE:
adds r0, r4, r2
ldrb r0, [r0]
Expand Down Expand Up @@ -1253,14 +1253,14 @@ _0803B314:
blo _0803B314
b _0803B49E
.align 2, 0
_0803B32C: .4byte gUnknown_03005048
_0803B32C: .4byte sa2__gUnknown_030054B4
_0803B330:
movs r4, #0
cmp r4, r0
blo _0803B338
b _0803B49E
_0803B338:
ldr r1, _0803B350 @ =gUnknown_03005048
ldr r1, _0803B350 @ =sa2__gUnknown_030054B4
adds r0, r4, r1
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -1273,7 +1273,7 @@ _0803B338:
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0803B350: .4byte gUnknown_03005048
_0803B350: .4byte sa2__gUnknown_030054B4
_0803B354: .4byte _0803B358
_0803B358: @ jump table
.4byte _0803B370 @ case 0
Expand Down Expand Up @@ -1357,7 +1357,7 @@ _0803B3E4:
ldr r0, [r2]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r3, _0803B424 @ =gUnknown_03005048
ldr r3, _0803B424 @ =sa2__gUnknown_030054B4
adds r0, r0, r3
adds r1, r4, r3
ldrb r0, [r0]
Expand All @@ -1379,14 +1379,14 @@ _0803B3E4:
b _0803B472
.align 2, 0
_0803B420: .4byte 0x04000128
_0803B424: .4byte gUnknown_03005048
_0803B424: .4byte sa2__gUnknown_030054B4
_0803B428: .4byte gUnknown_03005008
_0803B42C: .4byte gLoadedSaveGame
_0803B430:
ldr r0, [r2]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r2, _0803B454 @ =gUnknown_03005048
ldr r2, _0803B454 @ =sa2__gUnknown_030054B4
adds r0, r0, r2
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -1402,7 +1402,7 @@ _0803B430:
ldr r3, _0803B460 @ =0x0000038E
b _0803B472
.align 2, 0
_0803B454: .4byte gUnknown_03005048
_0803B454: .4byte sa2__gUnknown_030054B4
_0803B458: .4byte gUnknown_03005008
_0803B45C: .4byte gLoadedSaveGame
_0803B460: .4byte 0x0000038E
Expand Down Expand Up @@ -1443,7 +1443,7 @@ _0803B49E:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r3, _0803B4D0 @ =gUnknown_03005048
ldr r3, _0803B4D0 @ =sa2__gUnknown_030054B4
adds r0, r0, r3
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -1461,13 +1461,13 @@ _0803B4C0: .4byte gUnknown_03005008
_0803B4C4: .4byte gLoadedSaveGame
_0803B4C8: .4byte 0x0000038D
_0803B4CC: .4byte 0x04000128
_0803B4D0: .4byte gUnknown_03005048
_0803B4D0: .4byte sa2__gUnknown_030054B4
_0803B4D4: .4byte 0x00000425
_0803B4D8:
ldr r0, [r1]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1e
ldr r1, _0803B500 @ =gUnknown_03005048
ldr r1, _0803B500 @ =sa2__gUnknown_030054B4
adds r0, r0, r1
ldrb r0, [r0]
lsls r0, r0, #0x18
Expand All @@ -1486,7 +1486,7 @@ _0803B4F4:
ldr r2, _0803B508 @ =0x00000426
b _0803B516
.align 2, 0
_0803B500: .4byte gUnknown_03005048
_0803B500: .4byte sa2__gUnknown_030054B4
_0803B504: .4byte gLoadedSaveGame
_0803B508: .4byte 0x00000426
_0803B50C:
Expand Down
24 changes: 12 additions & 12 deletions asm/game_1_3.s
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ _0804030C:
_08040318: .4byte gPlayer
_0804031C: .4byte gPartner
_08040320:
ldr r0, _0804033C @ =gUnknown_03006080
ldr r0, _0804033C @ =gWater
movs r2, #2
ldrsh r0, [r0, r2]
_08040326:
Expand All @@ -106,7 +106,7 @@ _08040328:
subs r0, r0, r1
b _08040362
.align 2, 0
_0804033C: .4byte gUnknown_03006080
_0804033C: .4byte gWater
_08040340: .4byte gCamera
_08040344:
ldr r2, _08040358 @ =gCamera
Expand Down Expand Up @@ -291,7 +291,7 @@ sub_80404A0: @ 0x080404A0
sub sp, #4
adds r4, r0, #0
adds r7, r1, #0
ldr r1, _080404C0 @ =gUnknown_03005A10
ldr r1, _080404C0 @ =gDustEffectBrakingTask
ldr r0, [r1, #4]
cmp r0, #0
beq _080404BA
Expand All @@ -304,7 +304,7 @@ _080404BA:
movs r0, #0
b _0804053C
.align 2, 0
_080404C0: .4byte gUnknown_03005A10
_080404C0: .4byte gDustEffectBrakingTask
_080404C4:
subs r0, r2, #1
movs r5, #0
Expand Down Expand Up @@ -386,7 +386,7 @@ _0804056C: .4byte 0x3C6EF35F
thumb_func_start sub_8040570
sub_8040570: @ 0x08040570
push {r4, r5, lr}
ldr r2, _080405A4 @ =gUnknown_03005A10
ldr r2, _080405A4 @ =gDustEffectBrakingTask
ldr r0, _080405A8 @ =gCurTask
ldr r3, [r0]
ldrh r1, [r3, #6]
Expand All @@ -412,7 +412,7 @@ _08040596:
bl TaskDestroy
b _080405DA
.align 2, 0
_080405A4: .4byte gUnknown_03005A10
_080405A4: .4byte gDustEffectBrakingTask
_080405A8: .4byte gCurTask
_080405AC:
ldr r2, _080405E0 @ =gCamera
Expand Down Expand Up @@ -447,7 +447,7 @@ _080405E0: .4byte gCamera
sub_80405E4: @ 0x080405E4
push {r4, lr}
sub sp, #4
ldr r4, _08040610 @ =gUnknown_03005A10
ldr r4, _08040610 @ =gDustEffectBrakingTask
ldr r0, [r4, #4]
cmp r0, #0
bne _08040608
Expand All @@ -468,14 +468,14 @@ _08040608:
pop {r0}
bx r0
.align 2, 0
_08040610: .4byte gUnknown_03005A10
_08040610: .4byte gDustEffectBrakingTask
_08040614: .4byte Task_8040644
_08040618: .4byte sub_8040638

thumb_func_start sub_804061C
sub_804061C: @ 0x0804061C
push {r4, lr}
ldr r4, _08040634 @ =gUnknown_03005A10
ldr r4, _08040634 @ =gDustEffectBrakingTask
ldr r0, [r4, #4]
cmp r0, #0
beq _0804062E
Expand All @@ -487,16 +487,16 @@ _0804062E:
pop {r0}
bx r0
.align 2, 0
_08040634: .4byte gUnknown_03005A10
_08040634: .4byte gDustEffectBrakingTask

thumb_func_start sub_8040638
sub_8040638: @ 0x08040638
ldr r1, _08040640 @ =gUnknown_03005A10
ldr r1, _08040640 @ =gDustEffectBrakingTask
movs r0, #0
str r0, [r1, #4]
bx lr
.align 2, 0
_08040640: .4byte gUnknown_03005A10
_08040640: .4byte gDustEffectBrakingTask

thumb_func_start Task_8040644
Task_8040644:
Expand Down
Loading

0 comments on commit 2063ec5

Please sign in to comment.