Skip to content

Commit

Permalink
General documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JaceCear committed Dec 22, 2024
1 parent 9fe5866 commit c00c930
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 52 deletions.
4 changes: 2 additions & 2 deletions asm/code.s
Original file line number Diff line number Diff line change
Expand Up @@ -20457,7 +20457,7 @@ sub_806FC2C: @ 0x0806FC2C
strh r0, [r5, #0x18]
movs r0, #0xff
strb r0, [r5, #0x1b]
movs r0, #0x8a
movs r0, #0x8a @ SE_POOF
bl m4aSongNumStart
_0806FC72:
ldrh r1, [r5, #0xc]
Expand Down Expand Up @@ -20675,7 +20675,7 @@ _0806FE0E:
strh r0, [r5, #0x18]
movs r0, #0xff
strb r0, [r5, #0x1b]
movs r0, #0x8a
movs r0, #0x8a @ SE_POOF
bl m4aSongNumStart
b _0806FE4E
.align 2, 0
Expand Down
56 changes: 28 additions & 28 deletions asm/code_0.s
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sub_80001EC: @ 0x080001EC
strh r5, [r2]
str r5, [r0, #0x1c]
strb r1, [r0, #8]
ldr r0, _0800023C @ =gUnknown_03001CFC
ldr r0, _0800023C @ =gTask_03001CFC
str r5, [r0]
ldr r1, _08000240 @ =gVramHeapMaxTileSlots
ldr r2, _08000244 @ =0x06014D80
Expand All @@ -59,7 +59,7 @@ sub_80001EC: @ 0x080001EC
b _08000266
.align 2, 0
_08000238: .4byte gStageData
_0800023C: .4byte gUnknown_03001CFC
_0800023C: .4byte gTask_03001CFC
_08000240: .4byte gVramHeapMaxTileSlots
_08000244: .4byte 0x06014D80
_08000248: .4byte gVramHeapStartAddr
Expand Down Expand Up @@ -5018,7 +5018,7 @@ _08002776:
ldrb r0, [r4, #3]
cmp r0, #7
beq _0800281C
bl sub_802AD64
bl Create_gTask_03001CFC
ldrb r0, [r4, #3]
cmp r0, #1
bne _080027F4
Expand Down Expand Up @@ -5055,7 +5055,7 @@ _08002816:
b _08002826
_0800281C:
bl sub_8022FB0
ldr r0, _08002834 @ =0x00000322
ldr r0, _08002834 @ =0x00000322 @ MUS_VS_BGM_7
bl m4aSongNumStart
_08002826:
add sp, #4
Expand Down Expand Up @@ -88164,8 +88164,8 @@ sub_802AD50: @ 0x0802AD50
pop {r0}
bx r0

thumb_func_start sub_802AD64
sub_802AD64: @ 0x0802AD64
thumb_func_start Create_gTask_03001CFC
Create_gTask_03001CFC: @ 0x0802AD64
push {r4, lr}
sub sp, #8
ldr r0, _0802AD7C @ =gStageData
Expand All @@ -88174,28 +88174,28 @@ sub_802AD64: @ 0x0802AD64
beq _0802AD98
cmp r0, #5
bhi _0802AD88
ldr r4, _0802AD80 @ =gUnknown_03001CFC
ldr r0, _0802AD84 @ =sub_802B71C
ldr r4, _0802AD80 @ =gTask_03001CFC
ldr r0, _0802AD84 @ =Task_802B71C
b _0802AD9C
.align 2, 0
_0802AD7C: .4byte gStageData
_0802AD80: .4byte gUnknown_03001CFC
_0802AD84: .4byte sub_802B71C
_0802AD80: .4byte gTask_03001CFC
_0802AD84: .4byte Task_802B71C
_0802AD88:
ldr r4, _0802AD90 @ =gUnknown_03001CFC
ldr r4, _0802AD90 @ =gTask_03001CFC
ldr r0, _0802AD94 @ =sub_802B744
b _0802AD9C
.align 2, 0
_0802AD90: .4byte gUnknown_03001CFC
_0802AD90: .4byte gTask_03001CFC
_0802AD94: .4byte sub_802B744
_0802AD98:
ldr r4, _0802ADCC @ =gUnknown_03001CFC
ldr r4, _0802ADCC @ =gTask_03001CFC
ldr r0, _0802ADD0 @ =sub_802B76C
_0802AD9C:
movs r1, #0xad
lsls r1, r1, #2
ldr r2, _0802ADD4 @ =0x00002001
ldr r3, _0802ADD8 @ =sub_802B778
ldr r3, _0802ADD8 @ =TaskDestructor_802B778
str r3, [sp]
movs r3, #0
bl TaskCreate
Expand All @@ -88215,10 +88215,10 @@ _0802AD9C:
ldr r0, _0802ADE0 @ =0x06014180
b _0802ADE6
.align 2, 0
_0802ADCC: .4byte gUnknown_03001CFC
_0802ADCC: .4byte gTask_03001CFC
_0802ADD0: .4byte sub_802B76C
_0802ADD4: .4byte 0x00002001
_0802ADD8: .4byte sub_802B778
_0802ADD8: .4byte TaskDestructor_802B778
_0802ADDC: .4byte gStageData
_0802ADE0: .4byte 0x06014180
_0802ADE4:
Expand Down Expand Up @@ -88291,7 +88291,7 @@ sub_802AE64: @ 0x0802AE64
push {r5, r6, r7}
mov r8, r0
lsls r1, r1, #0x10
ldr r0, _0802AEC0 @ =gUnknown_03001CFC
ldr r0, _0802AEC0 @ =gTask_03001CFC
ldr r0, [r0]
ldrh r2, [r0, #6]
movs r0, #0xc0
Expand Down Expand Up @@ -88331,7 +88331,7 @@ _0802AE90:
bne _0802AEDA
b _0802AED4
.align 2, 0
_0802AEC0: .4byte gUnknown_03001CFC
_0802AEC0: .4byte gTask_03001CFC
_0802AEC4: .4byte 0x03000028
_0802AEC8: .4byte gStageData
_0802AECC: .4byte gPlayers
Expand Down Expand Up @@ -89370,7 +89370,7 @@ _0802B6B4: .4byte 0x0000FFFC
thumb_func_start sub_802B6B8
sub_802B6B8: @ 0x0802B6B8
push {r4, lr}
ldr r4, _0802B6CC @ =gUnknown_03001CFC
ldr r4, _0802B6CC @ =gTask_03001CFC
ldr r0, [r4]
bl TaskDestroy
movs r0, #0
Expand All @@ -89379,7 +89379,7 @@ sub_802B6B8: @ 0x0802B6B8
pop {r0}
bx r0
.align 2, 0
_0802B6CC: .4byte gUnknown_03001CFC
_0802B6CC: .4byte gTask_03001CFC

thumb_func_start sub_802B6D0
sub_802B6D0: @ 0x0802B6D0
Expand All @@ -89388,7 +89388,7 @@ sub_802B6D0: @ 0x0802B6D0
lsrs r3, r0, #0x10
lsls r1, r1, #0x10
lsrs r1, r1, #0x10
ldr r0, _0802B714 @ =gUnknown_03001CFC
ldr r0, _0802B714 @ =gTask_03001CFC
ldr r0, [r0]
cmp r0, #0
beq _0802B70C
Expand Down Expand Up @@ -89420,11 +89420,11 @@ _0802B70C:
pop {r0}
bx r0
.align 2, 0
_0802B714: .4byte gUnknown_03001CFC
_0802B714: .4byte gTask_03001CFC
_0802B718: .4byte 0x03000028

thumb_func_start sub_802B71C
sub_802B71C: @ 0x0802B71C
thumb_func_start Task_802B71C
Task_802B71C: @ 0x0802B71C
push {lr}
ldr r0, _0802B734 @ =gCurTask
ldr r0, [r0]
Expand Down Expand Up @@ -89475,14 +89475,14 @@ sub_802B76C: @ 0x0802B76C
bx r0
.align 2, 0

thumb_func_start sub_802B778
sub_802B778: @ 0x0802B778
ldr r1, _0802B780 @ =gUnknown_03001CFC
thumb_func_start TaskDestructor_802B778
TaskDestructor_802B778: @ 0x0802B778
ldr r1, _0802B780 @ =gTask_03001CFC
movs r0, #0
str r0, [r1]
bx lr
.align 2, 0
_0802B780: .4byte gUnknown_03001CFC
_0802B780: .4byte gTask_03001CFC

thumb_func_start sub_802B784
sub_802B784: @ 0x0802B784
Expand Down
17 changes: 9 additions & 8 deletions asm/code_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -7614,7 +7614,7 @@ _08053190:
ldrh r0, [r0]
cmp r1, r0
bhi _08053270
movs r0, #0x56
movs r0, #0x56 @ MUS_BOSS_CLEAR_GOLD
bl m4aSongNumStart
b _08053276
.align 2, 0
Expand All @@ -7623,7 +7623,7 @@ _08053264: .4byte 0x0000FFF0
_08053268: .4byte gStageData
_0805326C: .4byte gUnknown_080D1A40
_08053270:
movs r0, #0x57
movs r0, #0x57 @ MUS_BOSS_CLEAR
bl m4aSongNumStart
_08053276:
add sp, #4
Expand Down Expand Up @@ -11558,7 +11558,7 @@ _080551F8:
movs r0, #0
strh r0, [r1]
movs r0, #0x82
lsls r0, r0, #2
lsls r0, r0, #2 @ SE_GOAL_RING_RESULT
bl m4aSongNumStart
ldr r0, _08055234 @ =gCurTask
ldr r1, [r0]
Expand Down Expand Up @@ -13327,7 +13327,7 @@ sub_8056090: @ 0x08056090
strb r6, [r1]
bl sub_8055E50
bl sub_80299FC
movs r0, #0x61
movs r0, #0x61 @ MUS_VS_BGM_4
bl m4aSongNumStart
add sp, #4
pop {r4, r5, r6}
Expand Down Expand Up @@ -13690,7 +13690,7 @@ sub_8056370: @ 0x08056370
movs r0, #0
strh r0, [r4, #4]
movs r0, #0x82
lsls r0, r0, #2
lsls r0, r0, #2 @ SE_GOAL_RING_RESULT
bl m4aSongNumStart
ldr r1, [r5]
ldr r0, _080563B8 @ =sub_80547DC
Expand Down Expand Up @@ -14504,7 +14504,7 @@ sub_8056A20: @ 0x08056A20
ldr r0, _08056A50 @ =0x0000F0FF
ands r0, r1
strh r0, [r2]
movs r0, #0x59
movs r0, #0x59 @ MUS_EXTRA_CLEAR
bl m4aSongNumStart
ldr r0, _08056A54 @ =gCurTask
ldr r0, [r0]
Expand Down Expand Up @@ -14652,6 +14652,7 @@ _08056B6C: .4byte 0x0000DFFF
_08056B70: .4byte gWinRegs
_08056B74: .4byte gBldRegs

@ Seems to create the Stage Intro graphics?
thumb_func_start sub_8056B78
sub_8056B78: @ 0x08056B78
push {r4, r5, r6, r7, lr}
Expand Down Expand Up @@ -15196,9 +15197,9 @@ _08056EBA:
str r2, [r7]
strh r4, [r7, #0x14]
movs r0, #0xd7
lsls r0, r0, #2
lsls r0, r0, #2 @ ANIM_ACT_EMBLEM
strh r0, [r7, #0xc]
mov r1, r8
mov r1, r8 @ 0-3: "ACT 01" ... "ACT 04" | 4: "VS BOSS"
ldrb r0, [r1, #2]
strb r0, [r7, #0x1a]
strh r4, [r7, #0x16]
Expand Down
8 changes: 4 additions & 4 deletions asm/enemy_bu_bu.s
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ sub_805EEB4: @ 0x0805EEB4
lsls r1, r1, #8
adds r2, r2, r1
mov sl, r2
ldr r1, _0805EF5C @ =gUnknown_03001CFC
ldr r1, _0805EF5C @ =gTask_03001CFC
ldr r3, [r1]
cmp r3, #0
bne _0805EEEE
Expand Down Expand Up @@ -436,7 +436,7 @@ _0805EF1A:
strh r1, [r4, #0x30]
b _0805EF84
.align 2, 0
_0805EF5C: .4byte gUnknown_03001CFC
_0805EF5C: .4byte gTask_03001CFC
_0805EF60: .4byte gStageData
_0805EF64:
mov r0, sb
Expand Down Expand Up @@ -746,7 +746,7 @@ _0805F19C: .4byte 0xFFFFFF00
thumb_func_start sub_805F1A0
sub_805F1A0: @ 0x0805F1A0
push {lr}
ldr r1, _0805F1D0 @ =gUnknown_03001CFC
ldr r1, _0805F1D0 @ =gTask_03001CFC
ldr r1, [r1]
cmp r1, #0
beq _0805F1D8
Expand All @@ -770,7 +770,7 @@ _0805F1B4:
bls _0805F1B4
b _0805F1DA
.align 2, 0
_0805F1D0: .4byte gUnknown_03001CFC
_0805F1D0: .4byte gTask_03001CFC
_0805F1D4:
movs r0, #1
b _0805F1DA
Expand Down
Empty file removed asm/enemy_jousun.s
Empty file.
6 changes: 3 additions & 3 deletions asm/enemy_unknown_code.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Task_805C03C: @ 0x0805C03C
mov r7, r8
push {r7}
movs r5, #0
ldr r0, _0805C068 @ =gUnknown_03001CFC
ldr r0, _0805C068 @ =gTask_03001CFC
ldr r0, [r0]
ldrh r0, [r0, #6]
movs r2, #0xc0
Expand All @@ -30,7 +30,7 @@ Task_805C03C: @ 0x0805C03C
mov r8, r1
b _0805C07C
.align 2, 0
_0805C068: .4byte gUnknown_03001CFC
_0805C068: .4byte gTask_03001CFC
_0805C06C: .4byte 0x03000028
_0805C070: .4byte gCurTask
_0805C074:
Expand Down Expand Up @@ -152,7 +152,7 @@ sub_805C138: @ 0x0805C138
str r1, [r4, #0x18]
movs r6, #0
movs r5, #0
ldr r1, _0805C190 @ =0x0000053A
ldr r1, _0805C190 @ =0x0000053A @ ANIM_ITEM_BOX_CLOUD_EFFECT but spawned after enemy is dead
strh r1, [r0, #0xc]
strb r6, [r0, #0x1a]
movs r1, #0xff
Expand Down
6 changes: 6 additions & 0 deletions include/constants/anim_sizes.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,12 @@
#define ANIM_GAOGAO_WIDTH 32
#define ANIM_GAOGAO_HEIGHT 32

// 1191
#define ANIM_YADOKK_WIDTH 32
#define ANIM_YADOKK_HEIGHT 32
#define ANIM_YADOKK_VAR2_WIDTH 32
#define ANIM_YADOKK_VAR2_HEIGHT 32

// 1315
#define ANIM_ITEM_BOX_TYPE_WIDTH 16
#define ANIM_ITEM_BOX_TYPE_HEIGHT 16
Expand Down
2 changes: 1 addition & 1 deletion include/constants/animations.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@

#define ANIM_RING 1333
#define ANIM_RING_COLLECT_EFFECT 1334
#define ANIM_ITEM_BOX_CLOUD_EFFECT 1338
#define ANIM_ITEM_BOX_CLOUD_EFFECT 1338 // Also used for enemies
#define ANIM_CONDOR_PROJ_EXPLOSION 1339

#define ANIM_ICE_SHIVER 1344
Expand Down
2 changes: 1 addition & 1 deletion include/constants/songs.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

/* Dummy Entries from 0xAB to 0xDB */

#define SE_DC 0xDC
#define SE_220 0xDC
#define SE_CHAR_BOOST 0xDD

#define MUS_DUMMY__225 0xE1
Expand Down
8 changes: 4 additions & 4 deletions src/game/enemies/condor.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,17 +357,17 @@ NONMATCH("asm/non_matching/game/enemies/condor__sub_805933C.inc", bool32 sub_805
}
END_NONMATCH

static void InitSpriteProjectile(CondorProjectile *enemy)
static void InitSpriteProjectile(CondorProjectile *proj)
{
void *tiles = ALLOC_TILES(ANIM_CONDOR_PROJ_EXPLOSION);
Sprite *s = &enemy->s;
Sprite *s = &proj->s;
s->tiles = tiles;

s->anim = gUnknown_080D1E84[0].anim;
s->variant = gUnknown_080D1E84[0].variant;
s->prevVariant = -1;
s->x = I(enemy->qPos.x) - gCamera.x;
s->y = I(enemy->qPos.y) - gCamera.y;
s->x = I(proj->qPos.x) - gCamera.x;
s->y = I(proj->qPos.y) - gCamera.y;
s->oamFlags = SPRITE_OAM_ORDER(19);
s->animCursor = 0;
s->qAnimDelay = 0;
Expand Down
2 changes: 1 addition & 1 deletion sym_iwram.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tools/agbcc/lib/libgcc.a:fp-bit.o(.bss);
. = 0x00001BF0; gUnknown_03001BF0 = .;
. = 0x00001CC0; gUnknown_03001CC0 = .;
. = 0x00001CF0; gUnknown_03001CF0 = .;
. = 0x00001CFC; gUnknown_03001CFC = .;
. = 0x00001CFC; gTask_03001CFC = .; /* (struct Task*)someTaskThatIs_x2B4_bytes */
. = 0x00001D00; gUnknown_03001D00 = .;
. = 0x00001D10; gCamera = .;
. = 0x00001D76; gUnknown_03001D76 = .;
Expand Down

0 comments on commit c00c930

Please sign in to comment.