From 5f19c093899c9c5bf9899fe5af4bb0169b34c150 Mon Sep 17 00:00:00 2001 From: JaceCear <11230293+JaceCear@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:00:15 +0100 Subject: [PATCH] Small pieces of documentation --- src/game/amy_attack_heart_effect.c | 10 +++++----- src/game/stage/collision.c | 3 +++ src/game/stage/ui.c | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/game/amy_attack_heart_effect.c b/src/game/amy_attack_heart_effect.c index ccf482433..e85ec9460 100644 --- a/src/game/amy_attack_heart_effect.c +++ b/src/game/amy_attack_heart_effect.c @@ -31,9 +31,9 @@ typedef struct { /* 0x10A */ u16 unk10A; } AmyAtkHearts; /* size: 0x10C */ -void Task_8015CE4(void); +void Task_AmyAttackHeartEffect(void); void sub_8015E28(u16); -void TaskDestructor_8015FF0(struct Task *); +void TaskDestructor_AmyAttackHeartEffect(struct Task *); ALIGNED(4) const s16 sHeartOffsets[AMY_HEART_PATTERN_COUNT][8][3] = { @@ -93,7 +93,7 @@ void CreateAmyAttackHeartEffect(u16 kind) if ((gPlayer.charState == CHARSTATE_BOOSTLESS_ATTACK) || (gPlayer.charState == CHARSTATE_SOME_ATTACK) || (gPlayer.charState == CHARSTATE_TRICK_DOWN)) { - struct Task *t = TaskCreate(Task_8015CE4, sizeof(AmyAtkHearts), 0x3001, 0, TaskDestructor_8015FF0); + struct Task *t = TaskCreate(Task_AmyAttackHeartEffect, sizeof(AmyAtkHearts), 0x3001, 0, TaskDestructor_AmyAttackHeartEffect); AmyAtkHearts *hearts = TASK_DATA(t); hearts->unk100 = sCharStateAnimInfo[gPlayer.charState][0]; @@ -116,7 +116,7 @@ void CreateAmyAttackHeartEffect(u16 kind) // NOTE: Fakematch // (99.97%) https://decomp.me/scratch/Z3oDP -void Task_8015CE4(void) +void Task_AmyAttackHeartEffect(void) { #ifndef NON_MATCHING register struct Task *t asm("r2") = gCurTask; @@ -249,7 +249,7 @@ void sub_8015E28(u16 p0) } } -void TaskDestructor_8015FF0(struct Task *t) +void TaskDestructor_AmyAttackHeartEffect(struct Task *t) { AmyAtkHearts *hearts = TASK_DATA(t); diff --git a/src/game/stage/collision.c b/src/game/stage/collision.c index 13a098e34..271a20dc4 100644 --- a/src/game/stage/collision.c +++ b/src/game/stage/collision.c @@ -183,6 +183,8 @@ s32 sub_801E4E4(s32 p0, s32 p1, s32 p2, s32 p3, u8 *data, Func801F07C func) } } +// TODO: Check whether this is in SA3! It's not in SA1! +#if (GAME >= GAME_SA2) // TODO: // - Wrap this in macros where possible // - Remove gotos @@ -418,6 +420,7 @@ s32 sub_801E6D4(s32 p0, s32 p1, s32 p2, s32 p3, u8 *data, Func801F07C func) } } } +#endif s32 sub_801EB44(s32 p0, s32 p1, s32 layer) { diff --git a/src/game/stage/ui.c b/src/game/stage/ui.c index 685ac9388..a8b2c8d52 100644 --- a/src/game/stage/ui.c +++ b/src/game/stage/ui.c @@ -97,7 +97,7 @@ typedef struct { /* 0x2D8 */ u16 unk2D8[12]; } StageUI; /* size: 0x2F0 */ -void Task_CreateStageUIMain(void); +void Task_StageUIMain(void); void TaskDestructor_CreateStageUI(struct Task *t); struct Task *CreateStageUI(void) @@ -108,7 +108,7 @@ struct Task *CreateStageUI(void) StageUI *ui; Sprite *s; - struct Task *t = TaskCreate(Task_CreateStageUIMain, sizeof(StageUI), 0x2102, 0, TaskDestructor_CreateStageUI); + struct Task *t = TaskCreate(Task_StageUIMain, sizeof(StageUI), 0x2102, 0, TaskDestructor_CreateStageUI); gStageUITask = t; ui = TASK_DATA(t); @@ -218,7 +218,7 @@ struct Task *CreateStageUI(void) return gStageUITask; } -void Task_CreateStageUIMain(void) +void Task_StageUIMain(void) { if (!(gStageFlags & STAGE_FLAG__TURN_OFF_HUD)) { u32 time;