Skip to content

Commit

Permalink
Small pieces of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JaceCear committed Dec 30, 2024
1 parent 53c8ade commit 5f19c09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/game/amy_attack_heart_effect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down Expand Up @@ -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];
Expand All @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions src/game/stage/collision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down
6 changes: 3 additions & 3 deletions src/game/stage/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5f19c09

Please sign in to comment.