1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-12 20:13:47 +00:00

Match entity actors O-T (#1826)

This commit is contained in:
cadmic 2024-02-26 18:39:44 -08:00 committed by GitHub
parent cdd24f2ac6
commit c86bf5011b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 243 additions and 134 deletions

View file

@ -679,10 +679,11 @@ s32 EnOkuta_GetSnoutScale(EnOkuta* this, f32 curFrame, Vec3f* scale) {
s32 EnOkuta_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnOkuta* this = (EnOkuta*)thisx;
f32 curFrame = this->skelAnime.curFrame;
f32 curFrame;
Vec3f scale;
s32 doScale = false;
curFrame = this->skelAnime.curFrame;
if (this->actionFunc == EnOkuta_Die) {
curFrame += this->timer;
}

View file

@ -141,6 +141,7 @@ static s16 sItemShelfRot[] = { 0xEAAC, 0xEAAC, 0xEAAC, 0xEAAC, 0x1554, 0x1554, 0
// unused values?
static s16 D_80AC8904[] = { 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025 };
#if OOT_DEBUG
static char* sShopkeeperPrintName[] = {
"コキリの店 ", // "Kokiri Shop"
"薬屋 ", // "Potion Shop"
@ -154,6 +155,7 @@ static char* sShopkeeperPrintName[] = {
"インゴーの店", // "Ingo Store"
"お面屋 ", // "Mask Shop"
};
#endif
typedef struct {
/* 0x00 */ s16 objId;
@ -888,6 +890,8 @@ void EnOssan_State_StartConversation(EnOssan* this, PlayState* play, Player* pla
if (this->actor.params == OSSAN_TYPE_MASK && dialogState == TEXT_STATE_CHOICE) {
if (!EnOssan_TestEndInteraction(this, play, &play->state.input[0]) && Message_ShouldAdvance(play)) {
s32 pad;
switch (play->msgCtx.choiceIndex) {
case 0:
EnOssan_StartShopping(play, this);
@ -1691,6 +1695,8 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player
selectedItem = this->shelfSlots[this->cursorIndex];
selectedItem->updateStockedItemFunc(play, selectedItem);
if (!EnOssan_TestEndInteraction(this, play, &play->state.input[0])) {
s32 pad;
switch (play->msgCtx.choiceIndex) {
case 0:
PRINTF(VT_FGCOL(YELLOW) "★★★ 続けるよ!! ★★★" VT_RST "\n");
@ -2275,15 +2281,17 @@ void EnOssan_DrawTextRec(PlayState* play, s32 r, s32 g, s32 b, s32 a, f32 x, f32
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, r, g, b, a);
w = 8.0f * z;
ulx = (x - w) * 4.0f;
lrx = (x + w) * 4.0f;
h = 12.0f * z;
uly = (y - h) * 4.0f;
lry = (y + h) * 4.0f;
texCoordScale = (1.0f / z) * 1024;
dsdx = texCoordScale * dx;
dtdy = dy * texCoordScale;
ulx = (x - w) * 4.0f;
uly = (y - h) * 4.0f;
lrx = (x + w) * 4.0f;
lry = (y + h) * 4.0f;
gSPTextureRectangle(OVERLAY_DISP++, ulx, uly, lrx, lry, G_TX_RENDERTILE, s, t, dsdx, dtdy);
CLOSE_DISPS(play->state.gfxCtx, "../z_en_oB1.c", 4242);
}

View file

@ -1368,6 +1368,7 @@ void func_80ACD2CC(EnOwl* this, PlayState* play) {
Vec3f pos;
s32 angle;
f32 t = func_80ACD1C4(play, 7);
f32 phi_f2;
pos.x = play->csCtx.actorCues[7]->startPos.x;
pos.y = play->csCtx.actorCues[7]->startPos.y;
@ -1379,8 +1380,7 @@ void func_80ACD2CC(EnOwl* this, PlayState* play) {
angle = (s16)((t * angle) + this->actor.world.rot.z);
angle = (u16)angle;
if (this->actionFlags & 4) {
f32 phi_f2 = play->csCtx.actorCues[7]->rot.x;
phi_f2 = play->csCtx.actorCues[7]->rot.x;
phi_f2 *= 10.0f * (360.0f / 0x10000);
if (phi_f2 < 0.0f) {
phi_f2 += 360.0f;

View file

@ -416,6 +416,8 @@ void EnPeehat_Ground_SetStateRise(EnPeehat* this) {
}
void EnPeehat_Ground_StateRise(EnPeehat* this, PlayState* play) {
Vec3f pos;
Math_SmoothStepToF(&this->actor.shape.yOffset, 0.0f, 1.0f, 50.0f, 0.0f);
if (Math_SmoothStepToS(&this->bladeRotVel, 4000, 1, 800, 0) == 0) {
if (this->animTimer != 0) {
@ -433,7 +435,7 @@ void EnPeehat_Ground_StateRise(EnPeehat* this, PlayState* play) {
this->actor.world.pos.y += 6.5f;
}
if (this->actor.world.pos.y - this->actor.floorHeight < 80.0f) {
Vec3f pos = this->actor.world.pos;
pos = this->actor.world.pos;
pos.y = this->actor.floorHeight;
func_80033480(play, &pos, 90.0f, 1, 0x96, 100, 1);
}
@ -457,6 +459,8 @@ void EnPeehat_Flying_SetStateRise(EnPeehat* this) {
}
void EnPeehat_Flying_StateRise(EnPeehat* this, PlayState* play) {
Vec3f pos;
Math_SmoothStepToF(&this->actor.shape.yOffset, 0.0f, 1.0f, 50.0f, 0.0f);
if (Math_SmoothStepToS(&this->bladeRotVel, 4000, 1, 800, 0) == 0) {
if (this->animTimer != 0) {
@ -476,7 +480,7 @@ void EnPeehat_Flying_StateRise(EnPeehat* this, PlayState* play) {
this->actor.world.pos.y += 18.0f;
}
if (this->actor.world.pos.y - this->actor.floorHeight < 80.0f) {
Vec3f pos = this->actor.world.pos;
pos = this->actor.world.pos;
pos.y = this->actor.floorHeight;
func_80033480(play, &pos, 90.0f, 1, 0x96, 100, 1);
}
@ -854,12 +858,11 @@ void EnPeehat_SetStateExplode(EnPeehat* this) {
}
void EnPeehat_StateExplode(EnPeehat* this, PlayState* play) {
EnBom* bomb;
s32 pad[2];
if (this->animTimer == 5) {
bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x602, 0);
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x602, 0);
if (bomb != NULL) {
bomb->timer = 0;
}
@ -919,6 +922,10 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
EnPeehat* this = (EnPeehat*)thisx;
s32 i;
Player* player = GET_PLAYER(play);
Vec3f posResult;
CollisionPoly* poly;
s32 bgId;
Vec3f* posB;
// If Adult Peahat
if (thisx->params <= 0) {
@ -978,10 +985,8 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
// if PEAHAT_TYPE_GROUNDED
if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_6)) {
for (i = 1; i >= 0; i--) {
Vec3f posResult;
CollisionPoly* poly = NULL;
s32 bgId;
Vec3f* posB = &this->bladeTip[i];
poly = NULL;
posB = &this->bladeTip[i];
if (BgCheck_EntityLineTest1(&play->colCtx, &thisx->world.pos, posB, &posResult, &poly, true, true,
false, true, &bgId) == true) {

View file

@ -795,6 +795,9 @@ void EnPoField_DrawFlame(EnPoField* this, PlayState* play) {
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_en_po_field.c", 1709),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_po_field.c", 1712);
}
}
@ -996,6 +999,9 @@ void EnPoField_DrawSoul(Actor* thisx, PlayState* play) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gPoeFieldSoulDL);
}
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_po_field.c", 2149);
EnPoField_DrawFlame(this, play);
}

View file

@ -290,8 +290,6 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) {
Vec3f vec;
f32 multiplier;
s32 pad;
Vec3f sp60;
s32 pad1;
this->actionTimer++;
if (this->actionTimer < 8) {
@ -323,6 +321,9 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) {
}
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) {
if (this->hookshotSlotFull != 0) {
Vec3f sp60;
s32 pad1;
sp60.x = this->actor.world.pos.x;
sp60.y = this->actor.floorHeight;
sp60.z = this->actor.world.pos.z;

View file

@ -466,10 +466,12 @@ void EnRd_SetupWalkToParent(EnRd* this) {
* fade away.
*/
void EnRd_WalkToParent(EnRd* this, PlayState* play) {
s32 pad;
s16 targetY;
Vec3f parentPos;
if (this->actor.parent != NULL) {
s32 pad;
s16 targetY;
Vec3f parentPos = this->actor.parent->world.pos;
parentPos = this->actor.parent->world.pos;
targetY = Actor_WorldYawTowardPoint(&this->actor, &parentPos);
@ -992,5 +994,7 @@ void EnRd_Draw(Actor* thisx, PlayState* play) {
func_80033C30(&thisPos, &sShadowScale, this->alpha, play);
}
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_rd.c", 1735);
}

View file

@ -50,6 +50,7 @@ void func_80AE72D0(EnRl* this) {
}
}
#if OOT_DEBUG
void func_80AE7358(EnRl* this) {
Animation_Change(&this->skelAnime, &object_rl_Anim_000A3C, 1.0f, 0.0f,
Animation_GetLastFrame(&object_rl_Anim_000A3C), ANIMMODE_LOOP, 0.0f);
@ -75,6 +76,7 @@ void func_80AE73D8(EnRl* this, PlayState* play) {
D_80AE81AC = 1;
}
}
#endif
void func_80AE744C(EnRl* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
@ -243,8 +245,9 @@ void func_80AE79A4(EnRl* this, PlayState* play) {
void func_80AE7AF8(EnRl* this, PlayState* play) {
if (func_80AE74B4(this, play, 3, 0)) {
Animation_Change(&this->skelAnime, &object_rl_Anim_00040C, 1.0f, 0.0f,
Animation_GetLastFrame(&object_rl_Anim_00040C), ANIMMODE_ONCE, -8.0f);
f32 frame = Animation_GetLastFrame(&object_rl_Anim_00040C);
Animation_Change(&this->skelAnime, &object_rl_Anim_00040C, 1.0f, 0.0f, frame, ANIMMODE_ONCE, -8.0f);
this->action = 6;
} else if (func_80AE74FC(this, play, 4, 0)) {
this->action = 5;
@ -269,7 +272,9 @@ void func_80AE7BF8(EnRl* this, s32 arg1) {
void func_80AE7C64(EnRl* this, PlayState* play) {
func_80AE7954(this, play);
#if OOT_DEBUG
func_80AE73D8(this, play);
#endif
}
void func_80AE7C94(EnRl* this, PlayState* play) {
@ -277,7 +282,9 @@ void func_80AE7C94(EnRl* this, PlayState* play) {
func_80AE7494(this);
func_80AE72D0(this);
func_80AE79A4(this, play);
#if OOT_DEBUG
func_80AE73D8(this, play);
#endif
}
void func_80AE7CE8(EnRl* this, PlayState* play) {
@ -287,7 +294,9 @@ void func_80AE7CE8(EnRl* this, PlayState* play) {
temp = func_80AE7494(this);
func_80AE72D0(this);
func_80AE7BF8(this, temp);
#if OOT_DEBUG
func_80AE73D8(this, play);
#endif
}
void func_80AE7D40(EnRl* this, PlayState* play) {
@ -295,7 +304,9 @@ void func_80AE7D40(EnRl* this, PlayState* play) {
func_80AE7494(this);
func_80AE72D0(this);
func_80AE7AF8(this, play);
#if OOT_DEBUG
func_80AE73D8(this, play);
#endif
}
void func_80AE7D94(EnRl* this, PlayState* play) {

View file

@ -76,10 +76,12 @@ ActorInit En_Rr_InitVars = {
/**/ EnRr_Draw,
};
#if OOT_DEBUG
static char* sDropNames[] = {
// "type 7", "small magic jar", "arrow", "fairy", "20 rupees", "50 rupees"
"タイプ7 ", "魔法の壷小", "", "妖精 ", "20ルピー ", "50ルピー ",
};
#endif
static ColliderCylinderInitType1 sCylinderInit1 = {
{
@ -337,8 +339,8 @@ void EnRr_SetupDamage(EnRr* this) {
s32 i;
this->reachState = 0;
this->actionTimer = 20;
this->segMoveRate = 0.0f;
this->actionTimer = 20;
this->segPhaseVelTarget = 2500.0f;
this->pulseSizeTarget = 0.0f;
this->wobbleSizeTarget = 0.0f;

View file

@ -341,6 +341,7 @@ s32 func_80AEB1B4(PlayState* play) {
return Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING;
}
#if OOT_DEBUG
void func_80AEB1D8(EnRu1* this) {
this->action = 36;
this->drawConfig = 0;
@ -358,6 +359,7 @@ void func_80AEB220(EnRu1* this, PlayState* play) {
func_80AEB1D8(this);
}
}
#endif
void func_80AEB264(EnRu1* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {
s32 pad[2];
@ -634,10 +636,10 @@ void func_80AEBD94(EnRu1* this, PlayState* play) {
void func_80AEBE3C(EnRu1* this, PlayState* play, s32 arg2) {
s32 pad[2];
f32 frameCount;
if (arg2 != 0) {
frameCount = Animation_GetLastFrame(&gRutoChildTreadWaterAnim);
f32 frameCount = Animation_GetLastFrame(&gRutoChildTreadWaterAnim);
func_80AEB7D0(this);
Animation_Change(&this->skelAnime, &gRutoChildTreadWaterAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 3;
@ -661,6 +663,8 @@ void func_80AEBEC8(EnRu1* this, PlayState* play) {
void func_80AEBF60(EnRu1* this, PlayState* play) {
if (func_80AEB480(play, 6)) {
s32 pad;
func_80AEB7D0(this);
this->action = 5;
this->unk_364 = this->actor.world.pos;
@ -759,14 +763,14 @@ void func_80AEC2C0(EnRu1* this, PlayState* play) {
}
void func_80AEC320(EnRu1* this, PlayState* play) {
s8 actorRoom;
if (!GET_INFTABLE(INFTABLE_141)) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 7;
EnRu1_SetMouthIndex(this, 1);
} else if (GET_INFTABLE(INFTABLE_147) && !GET_INFTABLE(INFTABLE_140) && !GET_INFTABLE(INFTABLE_145)) {
if (!func_80AEB020(this, play)) {
s8 actorRoom;
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room;
this->action = 22;
@ -911,6 +915,8 @@ void func_80AEC9C4(EnRu1* this) {
void func_80AECA18(EnRu1* this) {
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
s32 pad;
this->action = 13;
this->unk_26C = 0.0f;
this->actor.velocity.y = 0.0f;
@ -1168,11 +1174,11 @@ void func_80AED414(EnRu1* this, PlayState* play) {
}
void func_80AED44C(EnRu1* this, PlayState* play) {
s8 actorRoom;
if (GET_INFTABLE(INFTABLE_141) && !GET_INFTABLE(INFTABLE_145) && !GET_INFTABLE(INFTABLE_140) &&
!GET_INFTABLE(INFTABLE_147)) {
if (!func_80AEB020(this, play)) {
s8 actorRoom;
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room;
this->action = 22;
@ -1253,12 +1259,13 @@ void func_80AED6F8(PlayState* play) {
}
void func_80AED738(EnRu1* this, PlayState* play) {
u32 temp_v0;
if (func_80AED624(this, play)) {
s32 pad;
this->unk_2A4 += 1.0f;
if (this->unk_2A4 < 20.0f) {
temp_v0 = ((20.0f - this->unk_2A4) * 255.0f) / 20.0f;
u32 temp_v0 = ((20.0f - this->unk_2A4) * 255.0f) / 20.0f;
this->alpha = temp_v0;
this->actor.shape.shadowAlpha = temp_v0;
} else {
@ -1321,17 +1328,13 @@ void func_80AEDAE0(EnRu1* this, PlayState* play) {
}
void func_80AEDB30(EnRu1* this, PlayState* play) {
DynaPolyActor* dynaPolyActor;
f32* velocityY;
f32* speedXZ;
f32* gravity;
s16 wallYaw;
s16 rotY;
s32 temp_a1_2;
s32 temp_a0;
s32 phi_v1;
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
DynaPolyActor* dynaPolyActor;
velocityY = &this->actor.velocity.y;
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.floorBgId);
if (*velocityY <= 0.0f) {
@ -1368,6 +1371,8 @@ void func_80AEDB30(EnRu1* this, PlayState* play) {
}
}
if (this->actor.bgCheckFlags & BGCHECKFLAG_CEILING) {
s32 pad;
speedXZ = &this->actor.speed;
velocityY = &this->actor.velocity.y;
if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {
@ -1383,6 +1388,12 @@ void func_80AEDB30(EnRu1* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
speedXZ = &this->actor.speed;
if (*speedXZ != 0.0f) {
s16 wallYaw;
s16 rotY;
s32 temp_a1_2;
s32 temp_a0;
s32 phi_v1;
rotY = this->actor.world.rot.y;
wallYaw = this->actor.wallYaw;
temp_a0 = (wallYaw * 2) - rotY;
@ -1443,7 +1454,6 @@ void func_80AEE050(EnRu1* this) {
s32 pad;
f32 sp28;
f32 sp24;
f32 temp_f10;
EnRu1* thisx = this; // necessary to match
if (this->unk_350 == 0) {
@ -1476,6 +1486,8 @@ void func_80AEE050(EnRu1* this) {
this->unk_350 = 2;
this->unk_360 = 0.0f;
} else {
f32 temp_f10;
sp28 = this->unk_358;
sp24 = this->unk_354;
temp_f10 = Math_CosS(this->unk_35C) * -sp28;
@ -1561,6 +1573,8 @@ void func_80AEE488(EnRu1* this, PlayState* play) {
this->action = 31;
func_80AED520(this, play);
} else if (!func_80AEE394(this, play) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
s32 pad;
this->actor.minVelocityY = -((kREG(24) * 0.01f) + 6.8f);
this->actor.gravity = -((kREG(23) * 0.01f) + 1.3f);
this->action = 28;
@ -1571,11 +1585,16 @@ void func_80AEE568(EnRu1* this, PlayState* play) {
if (!func_80AEE394(this, play)) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.speed == 0.0f) &&
(this->actor.minVelocityY == 0.0f)) {
s32 pad;
func_80AEE02C(this);
Actor_OfferCarry(&this->actor, play);
this->action = 27;
func_80AEADD8(this);
} else if (this->actor.yDistToWater > 0.0f) {
return;
}
if (this->actor.yDistToWater > 0.0f) {
this->action = 29;
this->unk_350 = 0;
}
@ -1617,13 +1636,13 @@ s32 func_80AEE6D0(EnRu1* this, PlayState* play) {
}
void func_80AEE7C4(EnRu1* this, PlayState* play) {
f32 frameCount;
s32 pad[13];
s32 pad[9];
Player* player;
f32* unk_370 = &this->unk_370;
if (Actor_HasNoParent(&this->actor, play)) {
frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
func_80AED6DC(this, play);
this->actor.speed *= (kREG(25) * 0.01f) + 1.0f;
@ -1633,45 +1652,49 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
func_80AED57C(this);
this->action = 28;
*unk_370 = 0.0f;
return;
}
} else if (func_80AEE6D0(this, play)) {
s32 pad;
if (func_80AEE6D0(this, play)) {
*unk_370 = 0.0f;
return;
}
} else {
player = GET_PLAYER(play);
if (player->stateFlags2 & PLAYER_STATE2_28) {
this->unk_370 += 1.0f;
if (this->action != 32) {
if (*unk_370 > 30.0f) {
if (Rand_S16Offset(0, 3) == 0) {
f32 frameCount = Animation_GetLastFrame(&gRutoChildSquirmAnim);
player = GET_PLAYER(play);
if (player->stateFlags2 & PLAYER_STATE2_28) {
this->unk_370 += 1.0f;
if (this->action != 32) {
if (*unk_370 > 30.0f) {
if (Rand_S16Offset(0, 3) == 0) {
frameCount = Animation_GetLastFrame(&gRutoChildSquirmAnim);
Animation_Change(&this->skelAnime, &gRutoChildSquirmAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
-8.0f);
func_80AED5DC(this);
this->action = 32;
Animation_Change(&this->skelAnime, &gRutoChildSquirmAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
-8.0f);
func_80AED5DC(this);
this->action = 32;
}
*unk_370 = 0.0f;
}
} else {
if (*unk_370 > 50.0f) {
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP,
-8.0f);
this->action = 31;
*unk_370 = 0.0f;
}
*unk_370 = 0.0f;
}
} else {
if (*unk_370 > 50.0f) {
frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
this->action = 31;
*unk_370 = 0.0f;
}
f32 frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
*unk_370 = 0.0f;
}
} else {
frameCount = Animation_GetLastFrame(&gRutoChildSittingAnim);
Animation_Change(&this->skelAnime, &gRutoChildSittingAnim, 1.0f, 0, frameCount, ANIMMODE_LOOP, -8.0f);
*unk_370 = 0.0f;
}
}
s32 func_80AEEAC8(EnRu1* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
s32 pad;
func_80AEE02C(this);
Actor_OfferCarry(&this->actor, play);
this->action = 27;
@ -1809,10 +1832,9 @@ void func_80AEF080(EnRu1* this) {
}
s32 func_80AEF0BC(EnRu1* this, PlayState* play) {
s32 frameCount;
if (GET_INFTABLE(INFTABLE_142)) {
frameCount = Animation_GetLastFrame(&gRutoChildSitAnim);
f32 frameCount = Animation_GetLastFrame(&gRutoChildSitAnim);
Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f);
play->msgCtx.msgMode = MSGMODE_PAUSED;
this->action = 26;
@ -2001,7 +2023,7 @@ void func_80AEF890(EnRu1* this, PlayState* play) {
s32 pad[2];
s8 curRoomNum;
if (!IS_CUTSCENE_LAYER && (EnRu1_IsCsStateIdle(play))) {
if (!(OOT_DEBUG && IS_CUTSCENE_LAYER) && EnRu1_IsCsStateIdle(play)) {
curRoomNum = play->roomCtx.curRoom.num;
SET_INFTABLE(INFTABLE_145);
Flags_SetSwitch(play, func_80AEADE0(this));
@ -2034,7 +2056,9 @@ void func_80AEF9D8(EnRu1* this, PlayState* play) {
EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF624(this, play);
#if OOT_DEBUG
func_80AEB220(this, play);
#endif
}
void func_80AEFA2C(EnRu1* this, PlayState* play) {
@ -2048,7 +2072,9 @@ void func_80AEFA2C(EnRu1* this, PlayState* play) {
func_80AEF5B8(this);
func_80AEF40C(this);
func_80AEF728(this, something);
#if OOT_DEBUG
func_80AEB220(this, play);
#endif
}
void func_80AEFAAC(EnRu1* this, PlayState* play) {
@ -2056,7 +2082,9 @@ void func_80AEFAAC(EnRu1* this, PlayState* play) {
func_80AEAECC(this, play);
EnRu1_UpdateSkelAnime(this);
func_80AEF79C(this, play);
#if OOT_DEBUG
func_80AEB220(this, play);
#endif
}
void func_80AEFB04(EnRu1* this, PlayState* play) {
@ -2067,7 +2095,9 @@ void func_80AEFB04(EnRu1* this, PlayState* play) {
something = EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF820(this, something);
#if OOT_DEBUG
func_80AEB220(this, play);
#endif
}
void func_80AEFB68(EnRu1* this, PlayState* play) {
@ -2076,7 +2106,9 @@ void func_80AEFB68(EnRu1* this, PlayState* play) {
EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF890(this, play);
#if OOT_DEBUG
func_80AEB220(this, play);
#endif
}
void func_80AEFBC8(EnRu1* this, PlayState* play) {
@ -2095,6 +2127,8 @@ void func_80AEFC24(EnRu1* this, PlayState* play) {
void func_80AEFC54(EnRu1* this, PlayState* play) {
if (GET_INFTABLE(INFTABLE_145) && !GET_INFTABLE(INFTABLE_146)) {
s32 pad;
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 41;
this->unk_28C = EnRu1_FindSwitch(play);
@ -2197,6 +2231,7 @@ void func_80AEFF94(EnRu1* this, PlayState* play) {
}
}
#if OOT_DEBUG
void func_80AF0050(EnRu1* this, PlayState* play) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 36;
@ -2204,6 +2239,7 @@ void func_80AF0050(EnRu1* this, PlayState* play) {
this->unk_28C = EnRu1_FindSwitch(play);
this->actor.room = -1;
}
#endif
void EnRu1_Update(Actor* thisx, PlayState* play) {
EnRu1* this = (EnRu1*)thisx;
@ -2246,9 +2282,11 @@ void EnRu1_Init(Actor* thisx, PlayState* play) {
case 6:
func_80AEFF94(this, play);
break;
#if OOT_DEBUG
case 10:
func_80AF0050(this, play);
break;
#endif
default:
Actor_Kill(&this->actor);
// "Relevant arge_data = %d unacceptable"
@ -2288,10 +2326,11 @@ s32 EnRu1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
void EnRu1_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) {
EnRu1* this = (EnRu1*)thisx;
Vec3f vec1;
Vec3f vec2;
if (limbIndex == RUTO_CHILD_HEAD) {
Vec3f vec1;
Vec3f vec2;
vec1 = sMultVec;
Matrix_MultVec3f(&vec1, &vec2);
this->actor.focus.pos.x = vec2.x;

View file

@ -137,6 +137,7 @@ s32 func_80AF26A0(EnRu2* this) {
return params & 0xFF;
}
#if OOT_DEBUG
void func_80AF26AC(EnRu2* this) {
this->action = 7;
this->drawConfig = 0;
@ -164,6 +165,7 @@ void func_80AF26D0(EnRu2* this, PlayState* play) {
}
}
}
#endif
void func_80AF2744(EnRu2* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_2);
@ -450,7 +452,9 @@ void func_80AF30AC(EnRu2* this, PlayState* play) {
void func_80AF3144(EnRu2* this, PlayState* play) {
func_80AF2F04(this, play);
#if OOT_DEBUG
func_80AF26D0(this, play);
#endif
}
void func_80AF3174(EnRu2* this, PlayState* play) {
@ -458,7 +462,9 @@ void func_80AF3174(EnRu2* this, PlayState* play) {
EnRu2_UpdateSkelAnime(this);
func_80AF2608(this);
func_80AF2F58(this, play);
#if OOT_DEBUG
func_80AF26D0(this, play);
#endif
}
void func_80AF31C8(EnRu2* this, PlayState* play) {
@ -466,7 +472,9 @@ void func_80AF31C8(EnRu2* this, PlayState* play) {
EnRu2_UpdateSkelAnime(this);
func_80AF2608(this);
func_80AF30AC(this, play);
#if OOT_DEBUG
func_80AF26D0(this, play);
#endif
}
void func_80AF321C(EnRu2* this, PlayState* play) {

View file

@ -613,10 +613,12 @@ void func_80AF6448(EnSa* this, PlayState* play) {
}
void func_80AF67D0(EnSa* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
Animation_Change(&this->skelAnime, &gSariaStopPlayingOcarinaAnim, 0.0f, 10.0f, 0.0f, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80AF6448;
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
return;
}
Animation_Change(&this->skelAnime, &gSariaStopPlayingOcarinaAnim, 0.0f, 10.0f, 0.0f, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80AF6448;
}
void func_80AF683C(EnSa* this, PlayState* play) {

View file

@ -118,8 +118,6 @@ void func_80AFBE8C(EnSiofuki* this, PlayState* play) {
f32 dZ;
s16 angle;
s16 dAngle;
f32 dist2d;
f32 speedScale;
dX = player->actor.world.pos.x - this->dyna.actor.world.pos.x;
dY = player->actor.world.pos.y - this->dyna.actor.world.pos.y;
@ -139,7 +137,8 @@ void func_80AFBE8C(EnSiofuki* this, PlayState* play) {
this->appliedSpeed = 0.0f;
this->targetAppliedSpeed = 0.0f;
} else {
dist2d = sqrtf(SQ(dX) + SQ(dZ));
f32 dist2d = sqrtf(SQ(dX) + SQ(dZ));
this->applySpeed = true;
this->splashTimer = 0;
angle = RAD_TO_BINANG(Math_FAtan2F(dX, dZ));
@ -149,6 +148,8 @@ void func_80AFBE8C(EnSiofuki* this, PlayState* play) {
Math_SmoothStepToF(&player->actor.world.pos.y, this->dyna.actor.world.pos.y, 0.5f, 4.0f, 1.0f);
if ((dAngle < 0x4000) && (dAngle > -0x4000)) {
f32 speedScale;
this->appliedYaw = player->actor.world.rot.y ^ 0x8000;
speedScale = dist2d / (this->dyna.actor.scale.x * 40.0f * 10.0f);
speedScale = CLAMP_MIN(speedScale, 0.0f);
@ -292,6 +293,9 @@ void EnSiofuki_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, x, y, 64, 64, 1, x, y, 64, 64));
gSPDisplayList(POLY_XLU_DISP++, object_siofuki_DL_000B70);
if (1) {}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_siofuki.c", 674);
if (this->sfxFlags & 1) {

View file

@ -531,10 +531,10 @@ void EnSkb_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
s32 EnSkb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
s32 EnSkb_OverrideLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnSkb* this = (EnSkb*)thisx;
PlayState* play = (PlayState*)play2;
s16 color;
s16 pad[2];
if (limbIndex == 11) {
if ((this->breakFlags & 2) == 0) { // head limb, head is still attached

View file

@ -1513,7 +1513,8 @@ void EnSkj_WaitForOfferResponse(EnSkj* this, PlayState* play) {
player->stateFlags3 |= PLAYER_STATE3_5; // makes player take ocarina out right away after closing box
this->actionFunc = EnSkj_SetupWaitForOcarina;
} break;
break;
}
case 1: // no
this->actionFunc = EnSkj_CleanupOcarinaGame;
break;

View file

@ -40,7 +40,9 @@ void EnSyatekiMan_RestartGame(EnSyatekiMan* this, PlayState* play);
void EnSyatekiMan_BlinkWait(EnSyatekiMan* this);
void EnSyatekiMan_Blink(EnSyatekiMan* this);
#if OOT_DEBUG
void EnSyatekiMan_SetBgm(void);
#endif
ActorInit En_Syateki_Man_InitVars = {
/**/ ACTOR_EN_SYATEKI_MAN,
@ -54,6 +56,7 @@ ActorInit En_Syateki_Man_InitVars = {
/**/ EnSyatekiMan_Draw,
};
#if OOT_DEBUG
static u16 sBgmList[] = {
NA_BGM_GENERAL_SFX,
NA_BGM_NATURE_AMBIENCE,
@ -144,6 +147,7 @@ static u16 sBgmList[] = {
NA_BGM_GANON_BOSS,
NA_BGM_END_DEMO,
};
#endif
static s16 sTextIds[] = { 0x2B, 0x2E, 0xC8, 0x2D };
@ -468,7 +472,11 @@ void EnSyatekiMan_Update(Actor* thisx, PlayState* play) {
this->timer--;
}
this->actionFunc(this, play);
#if OOT_DEBUG
EnSyatekiMan_SetBgm();
#endif
this->blinkFunc(this);
this->actor.focus.pos.y = 70.0f;
Actor_SetFocus(&this->actor, 70.0f);
@ -503,9 +511,11 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) {
EnSyatekiMan_OverrideLimbDraw, NULL, this);
}
#if OOT_DEBUG
void EnSyatekiMan_SetBgm(void) {
if (BREG(80)) {
BREG(80) = false;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, sBgmList[BREG(81)]);
}
}
#endif

View file

@ -760,9 +760,11 @@ void EnSyatekiNiw_UpdateEffects(EnSyatekiNiw* this, PlayState* play) {
void EnSyatekiNiw_DrawEffects(EnSyatekiNiw* this, PlayState* play) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
s16 i;
EnSyatekiNiwEffect* effect = &this->effects[0];
EnSyatekiNiwEffect* effect;
u8 materialFlag = 0;
effect = &this->effects[0];
OPEN_DISPS(gfxCtx, "../z_en_syateki_niw.c", 1234);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);

View file

@ -27,6 +27,7 @@ ActorInit En_Tana_InitVars = {
/**/ NULL,
};
#if OOT_DEBUG
//! @bug A third entry is missing here. When printing the string indexed by `params` for type 2, the
//! next data entry will be dereferenced and print garbage, stopping any future printing.
//! In a non-matching context, this can cause a crash if the next item isn't a valid pointer.
@ -37,6 +38,7 @@ static const char* sShelfTypes[] = {
"",
#endif
};
#endif
static const ActorFunc sDrawFuncs[] = {
EnTana_DrawWoodenShelves,

View file

@ -568,12 +568,11 @@ void EnTest_SetupWalkAndBlock(EnTest* this) {
void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
s32 pad;
f32 checkDist = 0.0f;
s32 pad1;
s32 absPlaySpeed;
s32 prevFrame;
s32 beforeCurFrame;
f32 playSpeed;
Player* player = GET_PLAYER(play);
s32 absPlaySpeed;
s16 yawDiff;
if (!EnTest_ReactToProjectile(play, this)) {
@ -601,6 +600,8 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
}
if (ABS(this->actor.speed) < 3.0f) {
s32 pad;
Animation_Change(&this->skelAnime, &gStalfosSlowAdvanceAnim, 0.0f, this->skelAnime.curFrame,
Animation_GetLastFrame(&gStalfosSlowAdvanceAnim), 0, -6.0f);
playSpeed = this->actor.speed * 10.0f;
@ -1819,9 +1820,9 @@ void EnTest_Update(Actor* thisx, PlayState* play) {
}
}
s32 EnTest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
s32 EnTest_OverrideLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnTest* this = (EnTest*)thisx;
s32 pad;
PlayState* play = (PlayState*)play2;
if (limbIndex == STALFOS_LIMB_HEAD_ROOT) {
rot->x += this->headRot.y;

View file

@ -265,7 +265,6 @@ void EnTite_SetupAttack(EnTite* this) {
void EnTite_Attack(EnTite* this, PlayState* play) {
s16 angleToPlayer;
s32 attackState;
Vec3f ripplePos;
if (SkelAnime_Update(&this->skelAnime)) {
attackState = this->vAttackState; // for deciding whether to change animation
@ -303,7 +302,8 @@ void EnTite_Attack(EnTite* this, PlayState* play) {
} else {
this->actor.gravity = 0.0f;
if (this->actor.velocity.y < -8.0f) {
ripplePos = this->actor.world.pos;
Vec3f ripplePos = this->actor.world.pos;
ripplePos.y += this->actor.yDistToWater;
this->vAttackState++; // TEKTITE_SUBMERGED
this->actor.velocity.y *= 0.75f;

View file

@ -202,15 +202,10 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
Input* input = &sInput;
Camera* mainCam;
s16 sp66;
u8 staggerThreshold;
s8 stickY;
s32 pad60;
u32 pad54;
Actor* attackItem;
s16 sp5A;
s16 pad58;
u32 pad54;
f32 sp50;
s16 sp4E;
sp5A = player->actor.shape.rot.y - this->actor.shape.rot.y;
input->cur.button = 0;
@ -410,44 +405,47 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
// Handles movement and attacks when not reacting to Link's actions
sStickAngle = thisx->yawTowardsPlayer;
sp50 = 0.0f;
if ((90.0f >= this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 70.0f) &&
(ABS(sp5A) >= 0x7800) &&
(this->actor.isTargeted || !(player->stateFlags1 & PLAYER_STATE1_22))) {
EnTorch2_SwingSword(play, input, this);
} else if (((this->actor.xzDistToPlayer <= 70.0f) ||
((this->actor.xzDistToPlayer <= 80.0f + sp50) &&
(player->meleeWeaponState != 0))) &&
(this->meleeWeaponState == 0)) {
if (!EnTorch2_SwingSword(play, input, this) && (this->meleeWeaponState == 0) &&
(sCounterState == 0)) {
EnTorch2_Backflip(this, input, &this->actor);
}
} else if (this->actor.xzDistToPlayer <= 50 + sp50) {
sStickTilt = 127.0f;
sStickAngle = this->actor.yawTowardsPlayer;
if (!this->actor.isTargeted) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
}
} else if (this->actor.xzDistToPlayer > 100.0f + sp50) {
if ((player->meleeWeaponState == 0) ||
!((player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) &&
(player->meleeWeaponAnimation <= PLAYER_MWA_BIG_SPIN_2H)) ||
(this->actor.xzDistToPlayer >= 280.0f)) {
} else {
f32 sp50 = 0.0f;
if (((this->actor.xzDistToPlayer <= 70.0f) ||
((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->meleeWeaponState != 0))) &&
(this->meleeWeaponState == 0)) {
if (!EnTorch2_SwingSword(play, input, this) && (this->meleeWeaponState == 0) &&
(sCounterState == 0)) {
EnTorch2_Backflip(this, input, &this->actor);
}
} else if (this->actor.xzDistToPlayer <= 50 + sp50) {
sStickTilt = 127.0f;
sStickAngle = this->actor.yawTowardsPlayer;
if (!this->actor.isTargeted) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
}
} else {
EnTorch2_Backflip(this, input, &this->actor);
}
} else if (((ABS(sp5A) < 0x7800) && (ABS(sp5A) >= 0x3000)) ||
!EnTorch2_SwingSword(play, input, this)) {
sStickAngle = this->actor.yawTowardsPlayer;
sStickTilt = 127.0f;
if (!this->actor.isTargeted) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
} else if (this->actor.xzDistToPlayer > 100.0f + sp50) {
if ((player->meleeWeaponState == 0) ||
!((player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) &&
(player->meleeWeaponAnimation <= PLAYER_MWA_BIG_SPIN_2H)) ||
(this->actor.xzDistToPlayer >= 280.0f)) {
sStickTilt = 127.0f;
sStickAngle = this->actor.yawTowardsPlayer;
if (!this->actor.isTargeted) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328,
0);
}
} else {
EnTorch2_Backflip(this, input, &this->actor);
}
} else if (((ABS(sp5A) < 0x7800) && (ABS(sp5A) >= 0x3000)) ||
!EnTorch2_SwingSword(play, input, this)) {
sStickAngle = this->actor.yawTowardsPlayer;
sStickTilt = 127.0f;
if (!this->actor.isTargeted) {
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
}
}
}
}
@ -495,8 +493,9 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
this->actor.world.pos.x = (Math_SinS(player->actor.shape.rot.y) * -120.0f) + player->actor.world.pos.x;
this->actor.world.pos.z = (Math_CosS(player->actor.shape.rot.y) * -120.0f) + player->actor.world.pos.z;
if (Actor_WorldDistXYZToPoint(&this->actor, &sSpawnPoint) > 800.0f) {
sp50 = Rand_ZeroOne() * 20.0f;
sp4E = Rand_CenteredFloat(4000.0f);
f32 sp50 = Rand_ZeroOne() * 20.0f;
s16 sp4E = Rand_CenteredFloat(4000.0f);
this->actor.shape.rot.y = this->actor.world.rot.y =
Math_Vec3f_Yaw(&sSpawnPoint, &player->actor.world.pos);
this->actor.world.pos.x =
@ -640,7 +639,8 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
* if he's had to counter with enough different sword animations in a row.
*/
if (this->speedXZ == -18.0f) {
staggerThreshold = (u32)Rand_CenteredFloat(2.0f) + 6;
u8 staggerThreshold = (u32)Rand_CenteredFloat(2.0f) + 6;
if (gSaveContext.save.info.playerData.health < 0x50) {
staggerThreshold = (u32)Rand_CenteredFloat(2.0f) + 3;
}

View file

@ -241,6 +241,8 @@ void func_80B23254(EnTr* this, PlayState* play, s32 arg2, f32 arg3, f32 scale) {
}
void EnTr_ShrinkVanish(EnTr* this, PlayState* play) {
s32 temp_hi;
if (this->timer >= 17) {
this->actor.shape.rot.y = (this->actor.shape.rot.y - (this->timer * 0x28F)) + 0x3D68;
} else {
@ -248,7 +250,7 @@ void EnTr_ShrinkVanish(EnTr* this, PlayState* play) {
Actor_SetScale(&this->actor, this->actor.scale.x * 0.9f);
this->actor.shape.rot.y = (this->actor.shape.rot.y - (this->timer * 0x28F)) + 0x3D68;
} else if (this->timer > 0) {
s32 temp_hi = (this->timer * 2) % 7;
temp_hi = (this->timer * 2) % 7;
func_80B23254(this, play, temp_hi, 5.0f, 0.2f);
func_80B23254(this, play, (temp_hi + 1) % 7, 5.0f, 0.2f);

View file

@ -135,7 +135,6 @@ void EnTrap_Update(Actor* thisx, PlayState* play) {
Vec3f colPoint; // unused return value from function
CollisionPoly* colPoly; // unused return value from function
s32 bgId; // unused return value from function
f32 temp_cond;
touchingActor = false;
blockedOnReturn = false;
@ -209,7 +208,8 @@ void EnTrap_Update(Actor* thisx, PlayState* play) {
Actor_PlaySfx(thisx, NA_SE_EV_SPINE_TRAP_MOVE);
}
} else if (thisx->params & SPIKETRAP_MODE_CIRCULAR) {
temp_cond = Math_SinS(this->vAngularPos);
f32 temp_cond = Math_SinS(this->vAngularPos);
this->vAngularPos += this->vAngularVel;
// Every full circle make a sound:
if ((temp_cond < 0.0f) && (Math_SinS(this->vAngularPos) >= 0.0f)) {