1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

Various minor cleanups (#940)

* Fix includes using braces instead of quotes

* Remove some unused printf arguments

* Fix a condition in Door_Shutter

* Run the formatter

* Cleanup incorrect uses of DynaPolyMoveFlag as function arguments

* Cleanup combined Math_StepToF checks
This commit is contained in:
Roman971 2021-09-05 14:00:24 +02:00 committed by GitHub
parent 3de7c21196
commit 2862aa6d03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 75 additions and 77 deletions

View file

@ -483,8 +483,8 @@ void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, GlobalContext* globalCtx);
void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
s16 objectId);
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, GlobalContext* globalCtx, s16 type);
void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne, f32 randAccelWeight,
s16 scale, s16 scaleStep, u8 useLighting);
void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne,
f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s16 arg4, s16 arg5, u8 arg6);
Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider);
Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor);
@ -681,7 +681,7 @@ void BgCheck_DrawDynaCollision(GlobalContext*, CollisionContext*);
void BgCheck_DrawStaticCollision(GlobalContext*, CollisionContext*);
void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId);
s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
void func_800434A0(DynaPolyActor* dynaActor);
void func_800434A8(DynaPolyActor* dynaActor);
void func_800434C8(CollisionContext* colCtx, s32 floorBgId);

View file

@ -1,8 +1,8 @@
#ifndef _Z64CAMERA_H_
#define _Z64CAMERA_H_
#include <ultra64.h>
#include <z64cutscene.h>
#include "ultra64.h"
#include "z64cutscene.h"
#define CAM_STAT_CUT 0
#define CAM_STAT_WAIT 1

View file

@ -1,6 +1,6 @@
#include "global.h"
void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags) {
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) {
dynaActor->bgId = -1;
dynaActor->unk_15C = flags;
dynaActor->unk_160 = 0;

View file

@ -1,5 +1,5 @@
#include <ultra64.h>
#include <global.h>
#include "ultra64.h"
#include "global.h"
typedef struct {
s16 val;

View file

@ -91,8 +91,7 @@ static InitChainEntry sInitChain[] = {
static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f };
void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) {
s16 pad1;
CollisionHeader* colHeader = NULL;
s16 pad2;

View file

@ -237,7 +237,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
case FAIRY_UPGRADE_MAGIC:
if (!gSaveContext.magicAcquired || BREG(2)) {
// Spin Attack speed UP
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST, &gSaveContext);
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}
@ -245,7 +245,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
case FAIRY_UPGRADE_DOUBLE_MAGIC:
if (!gSaveContext.doubleMagic) {
// Magic Meter doubled
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST, &gSaveContext);
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}
@ -253,7 +253,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
case FAIRY_UPGRADE_HALF_DAMAGE:
if (!gSaveContext.doubleDefense) {
// Damage halved
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST, &gSaveContext);
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}

View file

@ -68,8 +68,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag moveFlag) {
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -45,7 +45,7 @@ static InitChainEntry sInitChain[] = {
};
void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s32 flag) {
s32 pad1;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -64,8 +64,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) {
s16 pad1;
CollisionHeader* colHeader = NULL;
s16 pad2;

View file

@ -132,8 +132,7 @@ void func_808958F0(Vec3f* dest, Vec3f* src, f32 arg2, f32 arg3) {
dest->z = (src->z * arg3) - (src->x * arg2);
}
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -41,8 +41,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -16,8 +16,6 @@ void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx);
void BgJyaLift_Draw(Actor* thisx, GlobalContext* globalCtx);
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader,
DynaPolyMoveFlag moveFlag);
void BgJyaLift_SetFinalPosY(BgJyaLift* this);
void BgJyaLift_SetInitPosY(BgJyaLift* this);
void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx);
@ -45,8 +43,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_STOP),
};
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader,
DynaPolyMoveFlag moveFlag) {
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;

View file

@ -106,8 +106,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) {
s32 pad;
CollisionHeader* colHeader = NULL;

View file

@ -62,7 +62,7 @@ static InitChainEntry sInitChain[] = {
};
void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s32 flag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -41,7 +41,7 @@ void BgSpot08Iceblock_SetupAction(BgSpot08Iceblock* this, BgSpot08IceblockAction
}
void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -44,8 +44,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -42,7 +42,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -56,7 +56,7 @@ static Vec3f D_808B45DC[] = {
{ 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f },
};
void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
u32 pad2;

View file

@ -118,8 +118,9 @@ void func_808B9698(BgSpot18Shutter* this, GlobalContext* globalCtx) {
void func_808B971C(BgSpot18Shutter* this, GlobalContext* globalCtx) {
f32 sin = Math_SinS(this->dyna.actor.world.rot.y);
f32 cos = Math_CosS(this->dyna.actor.world.rot.y);
s32 flag =
Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x + (125.0f * cos), fabsf(cos)) & 1;
s32 flag = true;
flag &= Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x + (125.0f * cos), fabsf(cos));
flag &= Math_StepToF(&this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.z - (125.0f * sin), fabsf(sin));
if (flag) {

View file

@ -663,8 +663,8 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
}
if (this->unk_398 == 80) {
BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON2, false);
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160,
180, 128, 40);
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40);
}
this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f;
this->unk_3A4.y = this->actor.world.pos.y;

View file

@ -503,7 +503,8 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
swingRateAccel = 30.0f;
swingSizeAccel = 60.0f;
if ((this->sfxTimer % 32) == 0) {
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable);
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
gMorphaTransposeTable);
func_800AA000(0, 100, 5, 2);
func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92);
}
@ -517,7 +518,8 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
swingRateAccel = 70.0f;
swingSizeAccel = 70.0f;
if ((this->sfxTimer % 16) == 0) {
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable);
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
gMorphaTransposeTable);
func_800AA000(0, 160, 5, 4);
func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92);
}

View file

@ -581,7 +581,7 @@ void func_80997528(DoorShutter* this, GlobalContext* globalCtx) {
}
void func_80997568(DoorShutter* this, GlobalContext* globalCtx) {
if ((this->unk_16F++ < 0x1F) ^ 1) {
if (this->unk_16F++ > 30) {
func_8002DF54(globalCtx, NULL, 7);
DoorShutter_SetupDoor(this, globalCtx);
}

View file

@ -686,7 +686,9 @@ void EnDekubaba_Lunge(EnDekubaba* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x222);
curFrame10 = this->skelAnime.curFrame * 10.0f;
allStepsDone = Math_ScaledStepToS(&this->stemSectionAngle[0], -0xE38, curFrame10 + 0x38E) & 1;
allStepsDone = true;
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[0], -0xE38, curFrame10 + 0x38E);
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[1], -0xE38, curFrame10 + 0x71C);
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[2], -0xE38, curFrame10 + 0xE38);
@ -862,7 +864,8 @@ void EnDekubaba_Hit(EnDekubaba* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
allStepsDone = Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0xE38) & 1;
allStepsDone = true;
allStepsDone &= Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0xE38);
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[0], -0x4000, 0xE38);
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[1], -0x4000, 0xE38);
allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[2], -0x4000, 0xE38);

View file

@ -395,8 +395,8 @@ Gfx sMantTexDL[] = {
gsDPPipeSync(),
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(sMantTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, MANT_TEX_WIDTH, MANT_TEX_HEIGHT, 0, G_TX_MIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsDPLoadTextureBlock(sMantTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, MANT_TEX_WIDTH, MANT_TEX_HEIGHT, 0,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList(),
};

View file

@ -304,7 +304,8 @@ s32 EnGoroiwa_MoveAndFall(EnGoroiwa* this, GlobalContext* globalCtx) {
func_8002D868(&this->actor);
path = &globalCtx->setupPathList[this->actor.params & 0xFF];
nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
result = Math_StepToF(&this->actor.world.pos.x, nextPointPos->x, fabsf(this->actor.velocity.x)) & 1;
result = true;
result &= Math_StepToF(&this->actor.world.pos.x, nextPointPos->x, fabsf(this->actor.velocity.x));
result &= Math_StepToF(&this->actor.world.pos.z, nextPointPos->z, fabsf(this->actor.velocity.z));
this->actor.world.pos.y += this->actor.velocity.y;
return result;
@ -334,7 +335,8 @@ s32 EnGoroiwa_Move(EnGoroiwa* this, GlobalContext* globalCtx) {
this->actor.velocity.x *= this->actor.speedXZ;
this->actor.velocity.y *= this->actor.speedXZ;
this->actor.velocity.z *= this->actor.speedXZ;
nextPointReached = Math_StepToF(&this->actor.world.pos.x, nextPointPosF.x, fabsf(this->actor.velocity.x)) & 1;
nextPointReached = true;
nextPointReached &= Math_StepToF(&this->actor.world.pos.x, nextPointPosF.x, fabsf(this->actor.velocity.x));
nextPointReached &= Math_StepToF(&this->actor.world.pos.y, nextPointPosF.y, fabsf(this->actor.velocity.y));
nextPointReached &= Math_StepToF(&this->actor.world.pos.z, nextPointPosF.z, fabsf(this->actor.velocity.z));
return nextPointReached;

View file

@ -84,7 +84,8 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.flags &= ~0x10;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable,
this->morphTable, 16);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment);
Animation_Change(&this->skelAnime, &gObjOsAnim_42AC, 1.0f, 0.0f, Animation_GetLastFrame(&gObjOsAnim_42AC),
ANIMMODE_LOOP, 0.0f);

View file

@ -364,7 +364,8 @@ void EnHonotrap_FlameMove(EnHonotrap* this, GlobalContext* globalCtx) {
speed.x = fabsf(this->speedMod * this->actor.velocity.x);
speed.y = fabsf(this->speedMod * this->actor.velocity.y);
speed.z = fabsf(this->speedMod * this->actor.velocity.z);
ready = Math_StepToF(&this->actor.world.pos.x, this->targetPos.x, speed.x) & 1;
ready = true;
ready &= Math_StepToF(&this->actor.world.pos.x, this->targetPos.x, speed.x);
ready &= Math_StepToF(&this->actor.world.pos.y, this->targetPos.y, speed.y);
ready &= Math_StepToF(&this->actor.world.pos.z, this->targetPos.z, speed.z);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 7.0f, 10.0f, 0.0f, 0x1D);

View file

@ -338,12 +338,12 @@ void func_80A7492C(EnIk* this, GlobalContext* globalCtx) {
void func_80A74AAC(EnIk* this) {
this->unk_2F8 = 5;
if (this->unk_2FB == 0) {
Animation_Change(&this->skelAnime, &object_ik_Anim_00ED24, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00ED24), ANIMMODE_LOOP,
-4.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_00ED24, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_00ED24), ANIMMODE_LOOP, -4.0f);
this->actor.speedXZ = 0.9f;
} else {
Animation_Change(&this->skelAnime, &object_ik_Anim_006734, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_006734), ANIMMODE_LOOP,
-4.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_006734, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_006734), ANIMMODE_LOOP, -4.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DASH);
this->actor.speedXZ = 2.5f;
}
@ -592,12 +592,12 @@ void func_80A75790(EnIk* this) {
this->unk_2F8 = 0;
yawDiff = yaw - this->actor.shape.rot.y;
if (ABS(yawDiff) <= 0x4000) {
Animation_Change(&this->skelAnime, &object_ik_Anim_006194, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_006194), ANIMMODE_ONCE,
-4.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_006194, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_006194), ANIMMODE_ONCE, -4.0f);
this->actor.speedXZ = -6.0f;
} else {
Animation_Change(&this->skelAnime, &object_ik_Anim_0045BC, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_0045BC), ANIMMODE_ONCE,
-4.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_0045BC, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_0045BC), ANIMMODE_ONCE, -4.0f);
this->actor.speedXZ = 6.0f;
}
this->unk_2FE = 0;
@ -1070,8 +1070,8 @@ void func_80A77148(EnIk* this) {
}
void func_80A77158(EnIk* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE,
0.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, 0.0f);
func_80A770C0(this, globalCtx, 4);
this->action = 1;
this->drawMode = 1;
@ -1079,8 +1079,8 @@ void func_80A77158(EnIk* this, GlobalContext* globalCtx) {
}
void func_80A771E4(EnIk* this) {
Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE,
0.0f);
Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f,
Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, 0.0f);
this->action = 2;
this->drawMode = 1;
this->unk_4D4 = 0;
@ -1111,7 +1111,8 @@ void func_80A7735C(EnIk* this, GlobalContext* globalCtx) {
s32 pad[3];
f32 frames = Animation_GetLastFrame(&object_ik_Anim_0203D8);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_0205C0, NULL, this->jointTable, this->morphTable, 30);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_0205C0, NULL, this->jointTable, this->morphTable,
30);
Animation_Change(&this->skelAnime, &object_ik_Anim_0203D8, 1.0f, 0.0f, frames, ANIMMODE_ONCE, 0.0f);
this->action = 3;
this->drawMode = 2;
@ -1442,8 +1443,8 @@ void EnIk_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
} else {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_01E178, &object_ik_Anim_00C114, this->jointTable, this->morphTable,
30);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_01E178, &object_ik_Anim_00C114,
this->jointTable, this->morphTable, 30);
func_80A74398(&this->actor, globalCtx);
func_80A780D0(this, globalCtx);
}

View file

@ -463,9 +463,9 @@ void func_80A9C00C(EnKusa* this) {
}
void func_80A9C068(EnKusa* this, GlobalContext* globalCtx) {
s32 sp24;
s32 sp24 = true;
sp24 = Math_StepToF(&this->actor.scale.y, 0.4f, 0.014f) & 1;
sp24 &= Math_StepToF(&this->actor.scale.y, 0.4f, 0.014f);
sp24 &= Math_StepToF(&this->actor.scale.x, 0.4f, 0.011f);
this->actor.scale.z = this->actor.scale.x;

View file

@ -135,8 +135,7 @@ void ObjBean_InitCollider(Actor* thisx, GlobalContext* globalCtx) {
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
}
void ObjBean_InitDynaPoly(ObjBean* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag moveFlag) {
void ObjBean_InitDynaPoly(ObjBean* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader;
s32 pad2;
@ -572,9 +571,9 @@ void func_80B8FE6C(ObjBean* this) {
// The leaves are visable and growing
void func_80B8FEAC(ObjBean* this, GlobalContext* globalCtx) {
s32 temp_v1;
s32 temp_v1 = true;
temp_v1 = Math_StepToF(&this->dyna.actor.scale.y, 0.16672663f, 0.01f) & 1;
temp_v1 &= Math_StepToF(&this->dyna.actor.scale.y, 0.16672663f, 0.01f);
temp_v1 &= Math_StepToF(&this->dyna.actor.scale.x, 0.03569199f, 0.00113f);
this->dyna.actor.scale.z = this->dyna.actor.scale.x;

View file

@ -45,7 +45,7 @@ void ObjElevator_SetupAction(ObjElevator* this, ObjElevatorActionFunc actionFunc
this->actionFunc = actionFunc;
}
void func_80B92B08(ObjElevator* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
void func_80B92B08(ObjElevator* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) {
s16 pad1;
CollisionHeader* colHeader = NULL;
s16 pad2;

View file

@ -54,7 +54,7 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag moveFlags) {
void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2[2];

View file

@ -62,7 +62,7 @@ void ObjLift_SetupAction(ObjLift* this, ObjLiftActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void ObjLift_InitDynaPoly(ObjLift* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) {
void ObjLift_InitDynaPoly(ObjLift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -85,8 +85,7 @@ static Vec2f sFaceDirection[] = {
{ -1.0f, -1.0f },
};
void ObjOshihiki_InitDynapoly(ObjOshihiki* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag moveFlag) {
void ObjOshihiki_InitDynapoly(ObjOshihiki* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;

View file

@ -184,8 +184,7 @@ void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 angle) {
dest->z = src->z * c - src->x * s;
}
void ObjSwitch_InitDynapoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag moveFlag) {
void ObjSwitch_InitDynapoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;