Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc FAKE fixes #1783

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
95d4aee
CutsceneCamera_UpdateSplines fake match
hensldm Jan 5, 2025
6750247
CutsceneCamera_Init -1 splineIndex
hensldm Jan 5, 2025
37c446e
Eye Point comment
hensldm Jan 5, 2025
e96e94f
func_80B781DC better fake
hensldm Jan 5, 2025
baac7c4
func_80B32F04
hensldm Jan 5, 2025
8557576
ObjSwitch_Update
hensldm Jan 5, 2025
2a9beb6
ObjSwitch_InitTrisCollider
hensldm Jan 5, 2025
1a8be38
ObjAqua_Init
hensldm Jan 5, 2025
fcbfd33
EnTrt_ItemGiven
hensldm Jan 5, 2025
f959f47
func_80C10E98 partly
hensldm Jan 5, 2025
93178d8
EnTest7_WarpCsWarp this to 1
hensldm Jan 5, 2025
0f37123
EnTest6_InvertedSoTCutscene better fake
hensldm Jan 5, 2025
6202c60
EnTest6_DrawAmmoDropRupee
hensldm Jan 5, 2025
51c96b7
EnPoSisters_MatchPlayerY
hensldm Jan 5, 2025
ba87caa
func_8095B76C
hensldm Jan 5, 2025
9fce856
EnMinifrog_Init
hensldm Jan 5, 2025
d2f7cb2
func_80A5C0B8
hensldm Jan 5, 2025
28f6980
EnKnight_UpdateEffects
hensldm Jan 5, 2025
cdc46b9
EnKnight_FlyingHeadAttack
hensldm Jan 5, 2025
3f97d7d
EnKakasi_Init
hensldm Jan 5, 2025
bafbbe6
EnInvadepoh_ModelInfo_GetNextFaceAnim
hensldm Jan 5, 2025
66bb87f
BgAstrBombwall_InitCollider like func_809CE068
hensldm Jan 5, 2025
719fd15
Player_UpdateInterface
hensldm Jan 5, 2025
480ab55
Player_CsAction_TranslateReverse
hensldm Jan 5, 2025
e3c796d
DynaPoly_AddBgActorToLookup better fake
hensldm Jan 6, 2025
37324e5
CutsceneManager_FindEntranceCsId
hensldm Jan 6, 2025
ee694d7
func_800AE930 better fake
hensldm Jan 6, 2025
3bfd942
Math3D_CylVsLineSeg better fake
hensldm Jan 6, 2025
dbf3fd4
MapDisp_InitBossRoomStorey
hensldm Jan 6, 2025
4e3cddf
Play_Init
hensldm Jan 6, 2025
ef60542
EnTimeTag_Diary_Wait better fake
hensldm Jan 6, 2025
698f171
Remove fake label from Player_SwordFromIA
hensldm Jan 7, 2025
244e323
Player_PostLimbDrawGameplay partly
hensldm Jan 7, 2025
bec3dfd
EffectBlure_AddVertex prev temp
hensldm Jan 7, 2025
04268f3
Player_PostLimbDrawGameplay attempt 2
hensldm Jan 7, 2025
59034c2
AudioMgr_StopAllSfxExceptSystem
hensldm Jan 7, 2025
d025cdb
Camera_Normal0
hensldm Jan 7, 2025
6e2e36c
Camera_Jump2
hensldm Jan 7, 2025
923a140
Camera_Normal3
hensldm Jan 7, 2025
1a0198c
PR review
hensldm Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/z64player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ s32 Player_IsFacingActor(Actor* actor, s16 maxAngleDiff, struct PlayState* play)

PlayerItemAction Player_GetExchangeItemAction(struct PlayState* play);

void func_800B8D10(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_800B8D10(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, s32 arg5, u32 arg6);
void func_800B8D50(struct PlayState* play, Actor* actor, f32 arg2, s16 yaw, f32 arg4, u32 arg5);
void func_800B8D98(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_800B8DD4(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
Expand Down
10 changes: 4 additions & 6 deletions src/code/cutscene_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ s32 CutsceneCamera_Init(Camera* camera, CutsceneCamera* csCamera) {

csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
csCamera->cmdIndex = 0;
csCamera->splineIndex = 0xFFFF;
csCamera->splineIndex = -1;
csCamera->splineNeedsInit = true;
csCamera->state = CS_CAM_STATE_UPDATE_ALL;

Expand Down Expand Up @@ -298,7 +298,7 @@ s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera) {
csCamera->atCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));

// Misc Point
// Eye Point
csCamera->eyeCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));

Expand All @@ -307,12 +307,10 @@ s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera) {
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamMisc));

// Other Params
csCamera->eyeInterp.curPoint = 0;
csCamera->atInterp.curPoint = 0;
csCamera->eyeInterp.curPoint = csCamera->atInterp.curPoint = 0;

csCamera->splineNeedsInit = false;
//! FAKE: csCamera->splineIndex++;
csCamera->splineIndex = (csCamera->splineIndex & 0xFFFF) + 1;
csCamera->splineIndex++;
csCamera->state = CS_CAM_STATE_UPDATE_ALL;
csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
csCamera->eyeInterp.type = csCamera->atInterp.type = CS_CAM_INTERP_OFF;
Expand Down
6 changes: 3 additions & 3 deletions src/code/sys_math3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1900,12 +1900,12 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V
fracA = 0.0f;
fracB = 0.0f;

//! FAKE:
dummy:;

zero = 0.0f;
intFlags = 0;

//! FAKE:
if (1) {}

if (Math3D_PointInCyl(cyl, linePointA) && Math3D_PointInCyl(cyl, linePointB)) {
// both points are in the cylinder
*intersectA = *linePointA;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ s32 Actor_HasNoRider(PlayState* play, Actor* horse) {
return false;
}

void func_800B8D10(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
void func_800B8D10(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, s32 arg5, u32 arg6) {
Player* player = GET_PLAYER(play);

player->unk_B74 = arg6;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_bgcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
pos.y += actor->shape.yOffset * actor->scale.y;

//! FAKE:
if (pbgdata && pbgdata) {}
if (1) {}

ScaleRotPos_SetValue(&dyna->bgActors[bgId].curTransform, &actor->scale, &actor->shape.rot, &pos);

Expand Down
7 changes: 4 additions & 3 deletions src/code/z_eff_tire_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
spA8->p2.y = sp78.y;
spA8->p2.z = sp78.z;
spA8->life = this->elemDuration;

//! FAKE:
if (1) {}

spA8->colPoly = NULL;
this->numElements++;

Expand All @@ -82,9 +86,6 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
}

//! FAKE:
if (spA8) {}

spA8 = &this->elements[this->numElements];
spA8->flags = 0;
spA8->p1 = spB0;
Expand Down
14 changes: 8 additions & 6 deletions src/code/z_eventmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,14 @@ s16 CutsceneManager_FindEntranceCsId(void) {
s32 csId;

for (csId = 0; csId < sSceneCutsceneCount; csId++) {
//! FAKE:
if ((sSceneCutsceneList[csId].scriptIndex != CS_SCRIPT_ID_NONE) &&
(sSceneCutsceneList[csId].scriptIndex < (play = sCutsceneMgr.play)->csCtx.scriptListCount) &&
(sCutsceneMgr.play->curSpawn ==
sCutsceneMgr.play->csCtx.scriptList[sSceneCutsceneList[csId].scriptIndex].spawn)) {
return csId;
if (sSceneCutsceneList[csId].scriptIndex != CS_SCRIPT_ID_NONE) {
PlayState* play = sCutsceneMgr.play;

if ((sSceneCutsceneList[csId].scriptIndex < play->csCtx.scriptListCount) &&
(sCutsceneMgr.play->curSpawn ==
sCutsceneMgr.play->csCtx.scriptList[sSceneCutsceneList[csId].scriptIndex].spawn)) {
return csId;
}
}
}

Expand Down
17 changes: 7 additions & 10 deletions src/code/z_map_disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,17 +659,14 @@ void MapDisp_InitBossRoomStorey(PlayState* play) {
s32 i;

for (i = 0; i < transitionActors->count; i++) {
if (MapDisp_IsBossDoor(sTransitionActors[i].params)) {
if (ABS_ALT(sTransitionActors[i].id) != ACTOR_EN_HOLL) {
TransitionActorEntry* entry = &sTransitionActors[i];

if (MapDisp_IsBossDoor(entry->params)) {
if (ABS_ALT(entry->id) != ACTOR_EN_HOLL) {
for (storey = 0; storey < sMapDisp.numStoreys; storey++) {
//! FAKE: needed for matching
s32 temp = (sMapDisp.storeyYList[storey] - 5);

if (((storey == sMapDisp.numStoreys - 1) &&
(sTransitionActors[i].pos.y >= (sMapDisp.storeyYList[storey] - 5))) ||
((storey != sMapDisp.numStoreys - 1) &&
(sTransitionActors[i].pos.y >= (sMapDisp.storeyYList[storey] - 5)) &&
(sTransitionActors[i].pos.y < (sMapDisp.storeyYList[storey + 1] - 5)))) {
if (((storey == sMapDisp.numStoreys - 1) && (entry->pos.y >= (sMapDisp.storeyYList[storey] - 5))) ||
((storey != sMapDisp.numStoreys - 1) && (entry->pos.y >= (sMapDisp.storeyYList[storey] - 5)) &&
(entry->pos.y < (sMapDisp.storeyYList[storey + 1] - 5)))) {
sMapDisp.bossRoomStorey = storey;
return;
}
Expand Down
6 changes: 2 additions & 4 deletions src/code/z_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,6 @@ void Play_Init(GameState* thisx) {

if ((gSaveContext.nextCutsceneIndex == 0xFFEF) || (gSaveContext.nextCutsceneIndex == 0xFFF0)) {
scene = ((void)0, gSaveContext.save.entrance) >> 9;
spawn = (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F;

if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) {
if (scene == ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER) {
Expand Down Expand Up @@ -2145,9 +2144,8 @@ void Play_Init(GameState* thisx) {
gSaveContext.nextCutsceneIndex = 0xFFF4;
}
}
//! FAKE:
gSaveContext.save.entrance =
Entrance_Create(((void)0, scene), spawn, ((void)0, gSaveContext.save.entrance) & 0xF);
gSaveContext.save.entrance = Entrance_Create(scene, (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F,
((void)0, gSaveContext.save.entrance) & 0xF);
}

GameState_Realloc(&this->state, 0);
Expand Down
21 changes: 10 additions & 11 deletions src/code/z_player_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1687,9 +1687,8 @@ PlayerExplosive Player_GetExplosiveHeld(Player* player) {
PlayerSword Player_SwordFromIA(Player* player, PlayerItemAction itemAction) {
PlayerSword sword = PLAYER_SWORD_KOKIRI;

//! FAKE:
if ((itemAction == PLAYER_IA_LAST_USED) ||
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note I just removed the fake label here as I actually don't think this is a fake.

((sword = GET_SWORD_FROM_IA(itemAction), (sword > PLAYER_SWORD_NONE)) && (sword < PLAYER_SWORD_MAX))) {
(sword = GET_SWORD_FROM_IA(itemAction), ((sword > PLAYER_SWORD_NONE) && (sword < PLAYER_SWORD_MAX)))) {
return sword;
}

Expand Down Expand Up @@ -3803,29 +3802,28 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
}
}
} else if (limbIndex == PLAYER_LIMB_HEAD) {
//! FAKE:
if (((*dList1 != NULL) && ((((void)0, player->currentMask)) != (((void)0, PLAYER_MASK_NONE)))) &&
if (((*dList1 != NULL) && ((u32)player->currentMask != PLAYER_MASK_NONE)) &&
hensldm marked this conversation as resolved.
Show resolved Hide resolved
(((player->transformation == PLAYER_FORM_HUMAN) &&
((player->skelAnime.animation != &gPlayerAnim_cl_setmask) || (player->skelAnime.curFrame >= 12.0f))) ||
((((player->transformation != PLAYER_FORM_HUMAN) && (player->currentMask >= PLAYER_MASK_FIERCE_DEITY)) &&
((player->transformation + PLAYER_MASK_FIERCE_DEITY) != player->currentMask)) &&
(player->skelAnime.curFrame >= 10.0f)))) {
if (func_80127438(play, player, player->currentMask)) {
s32 maskMinusOne = ((void)0, player->currentMask) - 1;
s32 maskMinusOne = player->currentMask - 1;

OPEN_DISPS(play->state.gfxCtx);

if (((void)0, player->currentMask) == PLAYER_MASK_COUPLE) {
if (player->currentMask == PLAYER_MASK_COUPLE) {
Player_DrawCouplesMask(play, player);
} else if (((void)0, player->currentMask) == PLAYER_MASK_CIRCUS_LEADER) {
} else if (player->currentMask == PLAYER_MASK_CIRCUS_LEADER) {
Player_DrawCircusLeadersMask(play, player);
} else if (((void)0, player->currentMask) == PLAYER_MASK_BLAST) {
} else if (player->currentMask == PLAYER_MASK_BLAST) {
Player_DrawBlastMask(play, player);
} else if (((void)0, player->currentMask) == PLAYER_MASK_BUNNY) {
} else if (player->currentMask == PLAYER_MASK_BUNNY) {
Player_DrawBunnyHood(play);
} else if (((void)0, player->currentMask) == PLAYER_MASK_GREAT_FAIRY) {
} else if (player->currentMask == PLAYER_MASK_GREAT_FAIRY) {
Player_DrawGreatFairysMask(play, player);
} else if (((void)0, player->currentMask) >= PLAYER_MASK_FIERCE_DEITY) {
} else if (player->currentMask >= PLAYER_MASK_FIERCE_DEITY) {
static Vec2f D_801C0E04[PLAYER_FORM_MAX] = {
{ 140.0f, -130.0f }, // PLAYER_FORM_FIERCE_DEITY
{ 0.0f, -200.0f }, // PLAYER_FORM_GORON
Expand Down Expand Up @@ -3970,6 +3968,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
static Vec3f sPlayerFocusHeadLimbModelPos = { 1100.0f, -700.0f, 0.0f };
static Vec3f D_801C0E88 = { 1600.0f, -1700.0f, -70.0f }; // unused
Actor* spA8 = NULL;
s32 pad;

if (player->transformation != PLAYER_FORM_DEKU) {
Matrix_MultVec3f(&sPlayerFocusHeadLimbModelPos, &player->actor.focus.pos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ void BgAstrBombwall_InitCollider(ColliderTrisInit* init, Vec3f* pos, Vec3s* rot,

for (i = 0; i < init->count; i++) {
for (j = 0; j < 3; j++) {
//! FAKE:
// https://decomp.me/scratch/JrEnl
Matrix_MultVec3f(&(init->elements + i)->dim.vtx[j], &sp54[j]);
Matrix_MultVec3f(init->elements[i].dim.vtx + j, &sp54[j]);
Copy link
Collaborator Author

@hensldm hensldm Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better (though might still be considered a fake). Note this matches what was already in func_809CE068 in BgSpdweb

Math_Vec3f_Sum(&sp54[j], pos, &sp54[j]);
}
Collider_SetTrisVertices(collider, i, &sp54[0], &sp54[1], &sp54[2]);
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,8 +1684,8 @@ s8 EnInvadepoh_ModelInfo_GetNextFaceAnim(EnInvadepohFaceAnimNext* nextAnims, s32
}
}

//! FAKE:
return (nextAnims + nextIndex)->index;
nextAnim = &nextAnims[nextIndex];
return nextAnim->index;
}

void EnInvadepoh_ModelInfo_SetNextFaceAnim(EnInvadepohFaceAnimInfo* faceInfo, EnInvadepohFaceAnimBase* faceAnim) {
Expand Down
6 changes: 4 additions & 2 deletions src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) {
i = 0;
csId = this->picto.actor.csId;
while (csId != CS_ID_NONE) {
//! FAKE:
csId = CutsceneManager_GetAdditionalCsId(this->csIdList[i] = csId);
// clang-format off
this->csIdList[i] = csId; \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps still a fake, but I prefer this over what it was. Possibly a macro of some kind?

csId = CutsceneManager_GetAdditionalCsId(csId);
// clang-format on
i++;
}

Expand Down
28 changes: 6 additions & 22 deletions src/overlays/actors/ovl_En_Knight/z_en_knight.c
Original file line number Diff line number Diff line change
Expand Up @@ -3465,27 +3465,11 @@ void EnKnight_FlyingHeadAttack(EnKnight* this, PlayState* play) {
if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_B)) {

if (1) {} //! FAKE:
if (this->timers[0] != 0) {
this->timers[0]--;
if (1) {}
}

if (this->timers[0] != 0) {
this->timers[0]--;
}

if (this->timers[0] != 0) {
this->timers[0]--;
}

if (this->timers[0] != 0) {
this->timers[0]--;
}

if (this->timers[0] != 0) {
this->timers[0]--;
}
DECR(this->timers[0]);
DECR(this->timers[0]);
DECR(this->timers[0]);
DECR(this->timers[0]);
DECR(this->timers[0]);
}

Math_ApproachF(&this->actor.world.pos.x, player->actor.world.pos.x + targetHeight.x, 1.0f,
Expand Down Expand Up @@ -4342,7 +4326,7 @@ void EnKnight_UpdateEffects(EnKnight* this, PlayState* play) {

eff->accel.y = BREG(56) * 0.01f + 1.0f;

if (eff->active == (u32) true) { //! FAKE:
if (eff->active == true) {
Math_ApproachF(&eff->scale, (KREG(59) * 0.01f + 1.0f) * eff->scaleTarget, 0.1f,
eff->scaleTarget * 0.1f);

Expand Down
8 changes: 4 additions & 4 deletions src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,12 @@ EnKusa2UnkBssSubStruct* func_80A5C074(EnKusa2UnkBssStruct* arg0) {
EnKusa2UnkBssSubStruct2* func_80A5C0B8(EnKusa2UnkBssStruct* arg0) {
s32 i;
EnKusa2UnkBssSubStruct2* phi_v1 = &arg0->unk_0480[0];
EnKusa2UnkBssSubStruct2* iter;

for (i = 1; i < ARRAY_COUNT(D_80A5F1C0.unk_0480); i++) {
if (phi_v1->unk_2C > arg0->unk_0480[i].unk_2C) {
phi_v1 = &arg0->unk_0480[i];
//! FAKE:
if (1) {}
iter = &arg0->unk_0480[i];
hensldm marked this conversation as resolved.
Show resolved Hide resolved
if (iter->unk_2C < phi_v1->unk_2C) {
phi_v1 = iter;

if (phi_v1->unk_2C <= 0) {
break;
Expand Down
31 changes: 14 additions & 17 deletions src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {
EnMinifrog* this = (EnMinifrog*)thisx;
s32 i;

Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 15.0f);
Actor_ProcessInitChain(thisx, sInitChain);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 15.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gFrogSkel, &gFrogIdleAnim, this->jointTable, this->morphTable,
FROG_LIMB_MAX);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit);

if (!sTexturesDesegmented) {
for (i = 0; i < ARRAY_COUNT(sEyeTextures); i++) {
Expand All @@ -94,20 +94,17 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {
sTexturesDesegmented = true;
}

this->frogIndex = (this->actor.params & 0xF);
this->frogIndex = (thisx->params & 0xF);
if (this->frogIndex >= 5) {
this->frogIndex = FROG_YELLOW;
}

this->actor.speed = 0.0f;
thisx->speed = 0.0f;
this->actionFunc = EnMinifrog_Idle;
this->jumpState = FROG_STATE_GROUND;
this->flags = 0;
this->timer = 0;

//! FAKE:
if (1) {}

if (!EN_FROG_IS_RETURNED(&this->actor)) {
if ((this->frogIndex == FROG_YELLOW) || CHECK_WEEKEVENTREG(sIsFrogReturnedFlags[this->frogIndex])) {
Actor_Kill(&this->actor);
Expand All @@ -116,29 +113,29 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) {

this->timer = 30;
this->actionFunc = EnMinifrog_SpawnGrowAndShrink;
this->actor.textId = 0xD81;
this->actor.colChkInfo.mass = 30;
thisx->textId = 0xD81;
thisx->colChkInfo.mass = 30;
} else { // Frogs in mountain village
if (this->frogIndex == FROG_YELLOW) {
this->actor.textId = 0;
thisx->textId = 0;
this->actionFunc = EnMinifrog_SetupYellowFrogDialog;

if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_34_01)) {
this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
thisx->flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}

this->actor.home.rot.x = this->actor.home.rot.z = 0;
thisx->home.rot.x = thisx->home.rot.z = 0;
this->frog = NULL;
} else {
this->frog = EnMinifrog_GetFrog(play);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;

// Frog has been returned
if (CHECK_WEEKEVENTREG(sIsFrogReturnedFlags[this->frogIndex])) {
this->actionFunc = EnMinifrog_SetupNextFrogInit;
} else {
this->actor.draw = NULL;
this->actor.update = EnMinifrog_UpdateMissingFrog;
thisx->draw = NULL;
thisx->update = EnMinifrog_UpdateMissingFrog;
}
}
}
Expand Down
Loading