mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 06:54:14 -04:00
Animation Cleanup: En_Z* (#1727)
* cleanup * more progress * finish off z * one more thing * one more animIndex * fix spacing
This commit is contained in:
@@ -12,7 +12,7 @@ typedef struct AudioHeapInitSizes {
|
||||
} AudioHeapInitSizes; // size = 0xC
|
||||
|
||||
/**
|
||||
* Meta-data associated with a pool (contain withing the Audio Heap)
|
||||
* Meta-data associated with a pool (contain within the Audio Heap)
|
||||
*/
|
||||
typedef struct AudioAllocPool {
|
||||
/* 0x0 */ u8* startAddr; // start addr of the pool
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ typedef enum PlayerIdleType {
|
||||
*/
|
||||
|
||||
typedef enum PlayerItemAction {
|
||||
/* -1 */ PLAYER_IA_MINUS1 = -1, // TODO: determine usages with more player docs, possibly split into seperate values (see known usages above)
|
||||
/* -1 */ PLAYER_IA_MINUS1 = -1, // TODO: determine usages with more player docs, possibly split into separate values (see known usages above)
|
||||
/* 0x00 */ PLAYER_IA_NONE,
|
||||
/* 0x01 */ PLAYER_IA_LAST_USED,
|
||||
/* 0x02 */ PLAYER_IA_FISHING_ROD,
|
||||
|
||||
+1
-1
@@ -707,7 +707,7 @@ typedef enum {
|
||||
/*
|
||||
* 0xFE00: Index into sSceneEntranceTable (Scene)
|
||||
* 0x01F0: Index into the scenes specific entrance table (Spawn)
|
||||
* 0x000F: Index into the specific entrance table (Layer), stored seperately in sceneLayer
|
||||
* 0x000F: Index into the specific entrance table (Layer), stored separately in sceneLayer
|
||||
*/
|
||||
#define ENTRANCE(scene, spawn) ((((ENTR_SCENE_##scene) & 0x7F) << 9) | (((spawn) & 0x1F) << 4))
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ void* AudioHeap_AllocDmaMemoryZeroed(AudioAllocPool* pool, size_t size) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates space on a pool contained withing the heap and sets all the allocated space to 0
|
||||
* Allocates space on a pool contained within the heap and sets all the allocated space to 0
|
||||
*/
|
||||
void* AudioHeap_AllocZeroed(AudioAllocPool* pool, size_t size) {
|
||||
u8* addr = AudioHeap_Alloc(pool, size);
|
||||
@@ -223,7 +223,7 @@ void* AudioHeap_TestAlloc(AudioAllocPool* pool, size_t size) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates space on the pool contained withing the heap. If there is not enough space on the pool, return NULL
|
||||
* Allocates space on the pool contained within the heap. If there is not enough space on the pool, return NULL
|
||||
*/
|
||||
void* AudioHeap_Alloc(AudioAllocPool* pool, size_t size) {
|
||||
size_t alignedSize = ALIGN16(size);
|
||||
|
||||
@@ -861,9 +861,6 @@ void AudioSfx_SetBankLerp(u8 bankId, u8 target, u16 delay) {
|
||||
sSfxBankLerp[bankId].step = ((sSfxBankLerp[bankId].value - sSfxBankLerp[bankId].target) / delay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused
|
||||
*/
|
||||
void AudioSfx_StepBankLerp(u8 bankId) {
|
||||
if (sSfxBankLerp[bankId].remainingFrames != 0) {
|
||||
sSfxBankLerp[bankId].remainingFrames--;
|
||||
|
||||
+1
-1
@@ -4269,7 +4269,7 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
|
||||
dstPos->x = srcPos->x;
|
||||
dstPos->z = srcPos->z;
|
||||
} else if (useAdjacentLines[0] && useAdjacentLines[1]) {
|
||||
// srcPos is somewhere withing the bend of the path
|
||||
// srcPos is somewhere within the bend of the path
|
||||
if (!isRightSideOfAdjacentLines[0] && !isRightSideOfAdjacentLines[1]) {
|
||||
// srcPos is not inside a loop
|
||||
if (!Math3D_PointDistSqToLine2DImpl(srcPos->x, srcPos->z, closestPos[0].x, closestPos[0].z, closestPos[1].x,
|
||||
|
||||
@@ -41,7 +41,7 @@ f32 __cosf(f32 x) {
|
||||
|
||||
xpt &= 0x1FF; // Remove the sign bit
|
||||
|
||||
// |x| < 2^{28} (beyond this range, floats are too sparse to make the trig functions useable)
|
||||
// |x| < 2^{28} (beyond this range, floats are too sparse to make the trig functions usable)
|
||||
if (xpt < 310) {
|
||||
absx = (x > 0) ? x : -x;
|
||||
dx = absx;
|
||||
|
||||
@@ -55,7 +55,7 @@ f32 __sinf(f32 x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
// |x| < 2^{28} (beyond this range, floats are too sparse to make the trig functions useable)
|
||||
// |x| < 2^{28} (beyond this range, floats are too sparse to make the trig functions usable)
|
||||
if (xpt < 310) {
|
||||
dx = x;
|
||||
dn = dx * rpi.d;
|
||||
|
||||
@@ -1166,7 +1166,7 @@ s32 EnAn_ChangeAnim(EnAn* this, PlayState* play, EnAnAnimation animIndex) {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (animIndex != this->animIndex) {
|
||||
if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -95,7 +95,7 @@ void EnBigslime_DrawShatteringEffects(EnBigslime* this, PlayState* play);
|
||||
* --- See below (variants) for the uses of these copies
|
||||
*
|
||||
* Vtx Rings:
|
||||
* - The vtx mesh was designed to be seperated into distint "rings" of vertices and faces
|
||||
* - The vtx mesh was designed to be separated into distint "rings" of vertices and faces
|
||||
* from top to bottom at discrete y-intervals
|
||||
* - These different rings of vertices lie in the xzPlane along discrete y-direction steps of the sphere
|
||||
* -- There are the single apex nodes at the top (vertex 0 y-coordiante 1000) and bottom (vertex 161
|
||||
|
||||
@@ -15,7 +15,7 @@ void EnGirlA_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnGirlA_Update(Actor* thisx, PlayState* play);
|
||||
void EnGirlA_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnGirlA_InitalUpdate(EnGirlA* this, PlayState* play);
|
||||
void EnGirlA_InitialUpdate(EnGirlA* this, PlayState* play);
|
||||
void EnGirlA_Update2(EnGirlA* this, PlayState* play);
|
||||
|
||||
s32 EnGirlA_CanBuyPotionRed(PlayState* play, EnGirlA* this);
|
||||
@@ -172,7 +172,7 @@ void EnGirlA_InitObjIndex(EnGirlA* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->actor.params = params;
|
||||
this->mainActionFunc = EnGirlA_InitalUpdate;
|
||||
this->mainActionFunc = EnGirlA_InitialUpdate;
|
||||
}
|
||||
|
||||
void EnGirlA_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -560,7 +560,7 @@ s32 EnGirlA_TrySetMaskItemDescription(EnGirlA* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnGirlA_InitalUpdate(EnGirlA* this, PlayState* play) {
|
||||
void EnGirlA_InitialUpdate(EnGirlA* this, PlayState* play) {
|
||||
s16 params = this->actor.params;
|
||||
ShopItemEntry* shopItem = &sShopItemEntries[params];
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ s32 EnGm_UpdateSkelAnime(EnGm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 EnGm_ChangeAnim(EnGm* this, PlayState* play, s32 animIndex) {
|
||||
s8 tmp = this->objectSlot;
|
||||
s8 objectSlot = this->objectSlot;
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
@@ -433,7 +433,7 @@ s32 EnGm_ChangeAnim(EnGm* this, PlayState* play, s32 animIndex) {
|
||||
}
|
||||
|
||||
if (changeAnim) {
|
||||
if (tmp >= 0) {
|
||||
if (objectSlot > OBJECT_SLOT_NONE) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
|
||||
@@ -1365,19 +1365,19 @@ s32 EnGo_UpdateSpringArrivalCutscene(EnGo* this, PlayState* play) {
|
||||
*/
|
||||
s32 EnGo_UpdateSkelAnime(EnGo* this, PlayState* play) {
|
||||
s8 objectSlot = this->actor.objectSlot;
|
||||
s8 extraObjIndex = -1;
|
||||
s8 extraObjectSlot = OBJECT_SLOT_NONE;
|
||||
s32 isAnimFinished = false;
|
||||
|
||||
if ((this->animIndex >= ENGO_ANIM_SPRING_MIN) && (this->hakuginDemoObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
extraObjIndex = this->hakuginDemoObjectSlot;
|
||||
extraObjectSlot = this->hakuginDemoObjectSlot;
|
||||
} else if ((this->animIndex >= ENGO_ANIM_ATHLETICS_MIN) && (this->taisouObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
extraObjIndex = this->taisouObjectSlot;
|
||||
extraObjectSlot = this->taisouObjectSlot;
|
||||
} else if (this->animIndex < ENGO_ANIM_ATHLETICS_MIN) {
|
||||
extraObjIndex = this->actor.objectSlot;
|
||||
extraObjectSlot = this->actor.objectSlot;
|
||||
}
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
if (extraObjectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjectSlot].segment);
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
isAnimFinished = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
@@ -1425,19 +1425,19 @@ s32 EnGo_UpdateSfx(EnGo* this, PlayState* play) {
|
||||
*/
|
||||
s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimation animIndex) {
|
||||
s8 objectSlot = this->actor.objectSlot;
|
||||
s8 extraObjIndex = -1;
|
||||
s8 extraObjectSlot = OBJECT_SLOT_NONE;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if ((animIndex >= ENGO_ANIM_SPRING_MIN) && (this->hakuginDemoObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
extraObjIndex = this->hakuginDemoObjectSlot;
|
||||
extraObjectSlot = this->hakuginDemoObjectSlot;
|
||||
} else if ((animIndex >= ENGO_ANIM_ATHLETICS_MIN) && (this->taisouObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
extraObjIndex = this->taisouObjectSlot;
|
||||
extraObjectSlot = this->taisouObjectSlot;
|
||||
} else if (animIndex < ENGO_ANIM_ATHLETICS_MIN) {
|
||||
extraObjIndex = this->actor.objectSlot;
|
||||
extraObjectSlot = this->actor.objectSlot;
|
||||
}
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
if (extraObjectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjectSlot].segment);
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
|
||||
@@ -772,10 +772,10 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
if (this->colliderTris.base.acFlags & AC_BOUNCED) {
|
||||
f32 frame = Animation_GetLastFrame(&gIronKnuckleBlockAnim) - 2.0f;
|
||||
f32 endFrame = Animation_GetLastFrame(&gIronKnuckleBlockAnim) - 2.0f;
|
||||
|
||||
if (this->skelAnime.curFrame < frame) {
|
||||
this->skelAnime.curFrame = frame;
|
||||
if (this->skelAnime.curFrame < endFrame) {
|
||||
this->skelAnime.curFrame = endFrame;
|
||||
}
|
||||
this->colliderTris.base.acFlags &= ~AC_BOUNCED;
|
||||
this->colliderCylinder.base.acFlags &= ~AC_HIT;
|
||||
|
||||
@@ -992,8 +992,8 @@ void EnJso_SetupStunned(EnJso* this) {
|
||||
AudioSfx_SetChannelIO(&this->actor.projectedPos, NA_SE_EN_ANSATSUSYA_DASH_2, 0);
|
||||
EnJso_ChangeAnim(this, EN_JSO_ANIM_DAMAGED);
|
||||
|
||||
//! @note: This assignment is immediately overriden below. This is probably a leftover from EnJso2's version of this
|
||||
//! function, where the Garo Master is stunned for longer if it's frozen. Garos just use the longer stun
|
||||
//! @note: This assignment is immediately overridden below. This is probably a leftover from EnJso2's version of
|
||||
//! this function, where the Garo Master is stunned for longer if it's frozen. Garos just use the longer stun
|
||||
//! unconditionally, resulting in this useless assignment here.
|
||||
this->timer = 30;
|
||||
this->actor.speed = 0.0f;
|
||||
|
||||
@@ -830,7 +830,7 @@ void EnKnight_TelegraphHeavyAttack(EnKnight* this, PlayState* play) {
|
||||
|
||||
void EnKnight_SetupHeavyAttack(EnKnight* this, PlayState* play) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightHeavyAttackAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightHeavyAttackAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightHeavyAttackAnim);
|
||||
this->actionFunc = EnKnight_HeavyAttack;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ void EnKnight_HeavyAttack(EnKnight* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, this->attackSfx);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
if ((Rand_ZeroOne() < 0.5f) && (this->actor.xzDistToPlayer <= 100.0f)) {
|
||||
EnKnight_SetupLowSwing(this, play);
|
||||
} else {
|
||||
@@ -875,7 +875,7 @@ void EnKnight_HeavyAttack(EnKnight* this, PlayState* play) {
|
||||
|
||||
void EnKnight_SetupLowSwing(EnKnight* this, PlayState* play) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightLowSwingAnim, -5.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightLowSwingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightLowSwingAnim);
|
||||
this->actionFunc = EnKnight_LowSwing;
|
||||
}
|
||||
|
||||
@@ -912,7 +912,7 @@ void EnKnight_LowSwing(EnKnight* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, this->attackSfx);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
EnKnight_SetupLowSwingEnd(this, play);
|
||||
}
|
||||
|
||||
@@ -945,10 +945,10 @@ void EnKnight_LowSwingEnd(EnKnight* this, PlayState* play) {
|
||||
void EnKnight_SetupBasicSwing(EnKnight* this, PlayState* play) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightRightSwingAnim, -2.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightRightSwingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightRightSwingAnim);
|
||||
} else {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightLeftSwingAnim, -2.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightLeftSwingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightLeftSwingAnim);
|
||||
}
|
||||
|
||||
this->actionFunc = EnKnight_BasicSwing;
|
||||
@@ -958,7 +958,7 @@ void EnKnight_SetupBasicSwing(EnKnight* this, PlayState* play) {
|
||||
void EnKnight_BasicSwing(EnKnight* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
if ((Rand_ZeroOne() < 0.6f) && (this->actor.xzDistToPlayer <= 100.0f)) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
EnKnight_SetupBasicSwing(this, play);
|
||||
@@ -984,7 +984,7 @@ void EnKnight_SetupJumpAttack(EnKnight* this, PlayState* play) {
|
||||
|
||||
if (this->actor.xzDistToPlayer <= 200.0f) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightJumpAttackBeginAnim, -3.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightJumpAttackBeginAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightJumpAttackBeginAnim);
|
||||
this->actionFunc = EnKnight_JumpAttack;
|
||||
Matrix_RotateYS(this->yawToPlayer, MTXMODE_NEW);
|
||||
Matrix_MultVecZ(KREG(49) + 7.0f, &translation);
|
||||
@@ -1012,10 +1012,10 @@ void EnKnight_JumpAttack(EnKnight* this, PlayState* play) {
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightJumpAttackEndAnim, 0.0f);
|
||||
Actor_PlaySfx(&this->actor, this->attackSfx);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
|
||||
this->actor.speed = 0.0f;
|
||||
@@ -1041,7 +1041,7 @@ void EnKnight_SetupBlocking(EnKnight* this, PlayState* play) {
|
||||
if (this->actionFunc != EnKnight_Blocking) {
|
||||
this->prevActionFunc = this->actionFunc;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightFastBlockStandingAnim, -2.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightFastBlockStandingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightFastBlockStandingAnim);
|
||||
this->actionFunc = EnKnight_Blocking;
|
||||
}
|
||||
this->timers[0] = 5;
|
||||
@@ -1312,12 +1312,12 @@ void EnKnight_Retreat(EnKnight* this, PlayState* play) {
|
||||
this->subAction = KNIGHT_SUB_ACTION_RETREAT_3;
|
||||
this->drawDmgEffState = KNIGHT_DMGEFF_STATE_30;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightStruckByLightRayAnim, -2.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightStruckByLightRayAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightStruckByLightRayAnim);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STAL_FREEZE_LIGHTS);
|
||||
} else {
|
||||
this->subAction = KNIGHT_SUB_ACTION_RETREAT_1;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightIdleAnim, -5.0f);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1342,10 +1342,10 @@ void EnKnight_Retreat(EnKnight* this, PlayState* play) {
|
||||
goto common_case;
|
||||
|
||||
case KNIGHT_SUB_ACTION_RETREAT_3:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
this->subAction = KNIGHT_SUB_ACTION_RETREAT_2;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightFastBlockStandingAnim, -2.0f);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
goto common_case;
|
||||
|
||||
@@ -1353,7 +1353,7 @@ void EnKnight_Retreat(EnKnight* this, PlayState* play) {
|
||||
this->bodyCollider.base.colMaterial = COL_MATERIAL_NONE;
|
||||
Math_ApproachZeroF(&this->actor.speed, 1.0f, 1.0f);
|
||||
|
||||
if (this->animLastFrame > 10.0f) {
|
||||
if (this->animEndFrame > 10.0f) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, this->yawToPlayer, 2, 0xE00);
|
||||
}
|
||||
|
||||
@@ -1499,11 +1499,11 @@ void EnKnight_SetupFallOver(EnKnight* this, PlayState* play) {
|
||||
if (ABS_ALT(yawDiff) < 0x4000) {
|
||||
// Fall over backwards
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightFallBackwardsAnim, 0.0f);
|
||||
this->animLastFrame = 1.0f;
|
||||
this->animEndFrame = 1.0f;
|
||||
} else {
|
||||
// Fall over forwards
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightFallForwardsAnim, 0.0f);
|
||||
this->animLastFrame = -1.0f;
|
||||
this->animEndFrame = -1.0f;
|
||||
}
|
||||
|
||||
Matrix_RotateYS(this->yawToPlayer, MTXMODE_NEW);
|
||||
@@ -1535,7 +1535,7 @@ void EnKnight_FallOver(EnKnight* this, PlayState* play) {
|
||||
scale = -65.0f;
|
||||
}
|
||||
|
||||
Matrix_MultVecZ((KREG(9) + 1.0f) * (scale * this->animLastFrame), &raycastPos);
|
||||
Matrix_MultVecZ((KREG(9) + 1.0f) * (scale * this->animEndFrame), &raycastPos);
|
||||
raycastPos.x += this->actor.world.pos.x;
|
||||
raycastPos.y += this->actor.world.pos.y + 300.0f;
|
||||
raycastPos.z += this->actor.world.pos.z;
|
||||
@@ -1545,7 +1545,7 @@ void EnKnight_FallOver(EnKnight* this, PlayState* play) {
|
||||
dx = raycastPos.x - this->actor.world.pos.x;
|
||||
dy = floorHeight - this->actor.world.pos.y;
|
||||
dz = raycastPos.z - this->actor.world.pos.z;
|
||||
Math_ApproachS(&this->actor.shape.rot.x, Math_Atan2S(dy, sqrtf(SQ(dx) + SQ(dz))) * (s32)this->animLastFrame,
|
||||
Math_ApproachS(&this->actor.shape.rot.x, Math_Atan2S(dy, sqrtf(SQ(dx) + SQ(dz))) * (s32)this->animEndFrame,
|
||||
1, 0x800);
|
||||
} else {
|
||||
Math_ApproachS(&this->actor.shape.rot.x, 0, 1, 0x800);
|
||||
@@ -1564,7 +1564,7 @@ void EnKnight_FallOver(EnKnight* this, PlayState* play) {
|
||||
|
||||
Math_ApproachZeroF(&this->actor.speed, 1.0f, 1.0f);
|
||||
Math_ApproachZeroF(&this->shadowAlphaFactor, 1.0f, 10.0f);
|
||||
if (this->animLastFrame > 0.0f) {
|
||||
if (this->animEndFrame > 0.0f) {
|
||||
timerTarget = 20;
|
||||
} else {
|
||||
timerTarget = KREG(8) + 8;
|
||||
@@ -2029,7 +2029,7 @@ void EnKnight_IgosSitting(EnKnight* this, PlayState* play) {
|
||||
// fast block
|
||||
this->subAction = KNIGHT_SUB_ACTION_IGOS_SITTING_10;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightFastBlockSittingAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightFastBlockSittingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightFastBlockSittingAnim);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2080,16 +2080,16 @@ void EnKnight_IgosSitting(EnKnight* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case KNIGHT_SUB_ACTION_IGOS_SITTING_10:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
// return to idle
|
||||
this->subAction = KNIGHT_SUB_ACTION_IGOS_SITTING_11;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightEndBlockAndSitAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightEndBlockAndSitAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightEndBlockAndSitAnim);
|
||||
}
|
||||
break;
|
||||
|
||||
case KNIGHT_SUB_ACTION_IGOS_SITTING_11:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightIgosSitDownAnim, -15.0f);
|
||||
this->subAction = KNIGHT_SUB_ACTION_IGOS_SITTING_0;
|
||||
}
|
||||
@@ -2198,7 +2198,7 @@ void EnKnight_FlyingHeadDone(EnKnight* this, PlayState* play) {
|
||||
|
||||
void EnKnight_SetupBreathAttack(EnKnight* this, PlayState* play) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightIgosBreathAttackStartAnim, -5.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightIgosBreathAttackStartAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightIgosBreathAttackStartAnim);
|
||||
this->actionFunc = EnKnight_BreathAttack;
|
||||
this->subAction = KNIGHT_SUB_ACTION_BREATH_ATTACK_0;
|
||||
this->timers[0] = KREG(57) + 150;
|
||||
@@ -2225,7 +2225,7 @@ void EnKnight_BreathAttack(EnKnight* this, PlayState* play) {
|
||||
|
||||
switch (this->subAction) {
|
||||
case KNIGHT_SUB_ACTION_BREATH_ATTACK_0:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
this->subAction = KNIGHT_SUB_ACTION_BREATH_ATTACK_1;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightIgosBreathAttackAnim, 0.0f);
|
||||
}
|
||||
@@ -2244,14 +2244,14 @@ void EnKnight_BreathAttack(EnKnight* this, PlayState* play) {
|
||||
if (this->timers[0] == 0) {
|
||||
this->subAction = KNIGHT_SUB_ACTION_BREATH_ATTACK_2;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightIgosBreathAttackStopAnim, -5.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightIgosBreathAttackStopAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightIgosBreathAttackStopAnim);
|
||||
}
|
||||
break;
|
||||
|
||||
case KNIGHT_SUB_ACTION_BREATH_ATTACK_2:
|
||||
EnKnight_SpawnBreathEffects(this, play, 0x1600);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
EnKnight_SetupWait(this, play);
|
||||
this->timers[2] = Rand_ZeroFloat(150.0f) + 150.0f;
|
||||
}
|
||||
@@ -2514,7 +2514,7 @@ void EnKnight_CaptainsHatCS(EnKnight* this, PlayState* play) {
|
||||
if (this->csTimer == (u32)(KREG(48) + 85)) {
|
||||
this->csState = KNIGHT_CS_2_STATE_3;
|
||||
this->csTimer = 0;
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2522,11 +2522,11 @@ void EnKnight_CaptainsHatCS(EnKnight* this, PlayState* play) {
|
||||
if (this->csTimer == 7) {
|
||||
if (this->prevActionFunc == EnKnight_IgosSitting) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightCaptainsHatCSIgosShockedSittingAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightCaptainsHatCSIgosShockedSittingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightCaptainsHatCSIgosShockedSittingAnim);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BOSU_STAND_RAPID);
|
||||
} else {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightCaptainsHatCSIgosShockedStandingAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightCaptainsHatCSIgosShockedStandingAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightCaptainsHatCSIgosShockedStandingAnim);
|
||||
}
|
||||
Message_StartTextbox(play, 0x153E, NULL);
|
||||
}
|
||||
@@ -2544,9 +2544,9 @@ void EnKnight_CaptainsHatCS(EnKnight* this, PlayState* play) {
|
||||
this->subCamAt.z = this->actor.focus.pos.z;
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightCaptainsHatCSIgosShockedAnim, 0.0f);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BOSU_HAND);
|
||||
}
|
||||
|
||||
@@ -2788,7 +2788,7 @@ void EnKnight_IntroCutscene(EnKnight* this, PlayState* play) {
|
||||
this->csState = KNIGHT_INTRO_CS_STATE_4;
|
||||
this->csTimer = 0;
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightIntroSitDownAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightIntroSitDownAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightIntroSitDownAnim);
|
||||
|
||||
FALLTHROUGH;
|
||||
case KNIGHT_INTRO_CS_STATE_4:
|
||||
@@ -2830,9 +2830,9 @@ void EnKnight_IntroCutscene(EnKnight* this, PlayState* play) {
|
||||
this->jawRotationAmplitudeTarget = KREG(42) + 200.0f;
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightIgosSittingAnim, 0.0f);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
|
||||
this->subCamEye.x = 1349.0f;
|
||||
@@ -2912,13 +2912,13 @@ void EnKnight_IntroCutscene(EnKnight* this, PlayState* play) {
|
||||
if (this->csTimer >= (u32)(BREG(37) + 20)) {
|
||||
if (this->csTimer == (u32)(BREG(37) + 20)) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gKnightIgosStandAndDrawAnim, 0.0f);
|
||||
this->animLastFrame = Animation_GetLastFrame(&gKnightIgosStandAndDrawAnim);
|
||||
this->animEndFrame = Animation_GetLastFrame(&gKnightIgosStandAndDrawAnim);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_BOSU_STAND);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animLastFrame)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, this->animEndFrame)) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gKnightIgosLaughAnim, 0.0f);
|
||||
this->animLastFrame = 1000.0f;
|
||||
this->animEndFrame = 1000.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct EnKnight {
|
||||
/* 0x192 */ u8 canRetreat;
|
||||
/* 0x193 */ u8 shieldingInvulnerabilityTimer;
|
||||
/* 0x194 */ SkelAnime skelAnime;
|
||||
/* 0x1D8 */ f32 animLastFrame;
|
||||
/* 0x1D8 */ f32 animEndFrame;
|
||||
/* 0x1DC */ Vec3f bodyPartsPos[15];
|
||||
/* 0x290 */ u8 igosCurtainReaction;
|
||||
/* 0x291 */ u8 lightRayDamageTimer;
|
||||
|
||||
@@ -210,7 +210,7 @@ typedef enum {
|
||||
*
|
||||
* @return boolean, based on the mode
|
||||
* ENLIFTNUTS_MINIGAME_STATE_MODE_CHECK: true if the current minigame state equals the provided state, false otherwise
|
||||
* ENLIFTNUTS_MINIGAME_STATE_MODE_SET: true if the minigame state was set succesfully to the provided state, false
|
||||
* ENLIFTNUTS_MINIGAME_STATE_MODE_SET: true if the minigame state was set successfully to the provided state, false
|
||||
* otherwise
|
||||
*/
|
||||
s32 EnLiftNuts_MinigameState(EnLiftNutsMiniGameStateMode mode, EnLiftNutsMiniGameState state) {
|
||||
|
||||
@@ -293,7 +293,7 @@ s32 EnNb_ChangeAnim(EnNb* this, EnNbAnimation animIndex) {
|
||||
if ((this->animIndex != EN_NB_ANIM_0) && (this->animIndex != EN_NB_ANIM_1)) {
|
||||
changeAnim = true;
|
||||
}
|
||||
} else if (animIndex != this->animIndex) {
|
||||
} else if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,12 +154,12 @@ void EnNiw_Destroy(Actor* thisx, PlayState* play) {
|
||||
*
|
||||
* AttackNiw has a copy of this function that it barely uses
|
||||
*/
|
||||
void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) {
|
||||
void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animIndex) {
|
||||
f32 tempOne = 1.0f; // hopefully fake match, but no luck
|
||||
|
||||
if (this->unkTimer24C == 0) {
|
||||
// targetLimbRots[0] is bodyRotY
|
||||
if (animationState == NIW_ANIM_STILL) {
|
||||
if (animIndex == NIW_ANIM_STILL) {
|
||||
this->targetLimbRots[0] = 0.0f;
|
||||
} else {
|
||||
this->targetLimbRots[0] = -10000.0f * tempOne;
|
||||
@@ -169,7 +169,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) {
|
||||
this->unkTimer24C = 3;
|
||||
if ((this->unk292 % 2) == 0) {
|
||||
this->targetLimbRots[0] = 0.0f;
|
||||
if (animationState == NIW_ANIM_STILL) {
|
||||
if (animIndex == NIW_ANIM_STILL) {
|
||||
this->unkTimer24C = Rand_ZeroFloat(30.0f);
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) {
|
||||
this->unkToggle296++;
|
||||
this->unkToggle296 &= 1;
|
||||
|
||||
switch (animationState) {
|
||||
switch (animIndex) {
|
||||
case NIW_ANIM_STILL:
|
||||
this->targetLimbRots[2] = 0.0f; // both wingRotZ
|
||||
this->targetLimbRots[1] = 0.0f;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "z_en_pm.h"
|
||||
#include "attributes.h"
|
||||
#include "overlays/actors/ovl_En_Door/z_en_door.h"
|
||||
#include "assets/objects/object_mm/object_mm.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
@@ -348,21 +347,40 @@ static ColliderSphereInit sSphereInit = {
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_mm_Anim_00A4E0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_mm_Anim_00B09C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_00B09C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_mm_Anim_00BA78, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_mm_Anim_00C32C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_mm_Anim_0099B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_000FC4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_00A8D8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_00099C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_001F84, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_mm_Anim_000468, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_mm_Anim_00C640, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
typedef enum EnPmAnimation {
|
||||
/* -1 */ ENPM_ANIM_NONE = -1,
|
||||
/* 0 */ ENPM_ANIM_0,
|
||||
/* 1 */ ENPM_ANIM_1,
|
||||
/* 2 */ ENPM_ANIM_2,
|
||||
/* 3 */ ENPM_ANIM_3,
|
||||
/* 4 */ ENPM_ANIM_4,
|
||||
/* 5 */ ENPM_ANIM_5,
|
||||
/* 6 */ ENPM_ANIM_6,
|
||||
/* 7 */ ENPM_ANIM_7,
|
||||
/* 8 */ ENPM_ANIM_8,
|
||||
/* 9 */ ENPM_ANIM_9,
|
||||
/* 10 */ ENPM_ANIM_10,
|
||||
/* 11 */ ENPM_ANIM_11,
|
||||
/* 12 */ ENPM_ANIM_12,
|
||||
/* 13 */ ENPM_ANIM_13,
|
||||
/* 14 */ ENPM_ANIM_MAX
|
||||
} EnPmAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENPM_ANIM_MAX] = {
|
||||
{ &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_0
|
||||
{ &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENPM_ANIM_1
|
||||
{ &object_mm_Anim_00A4E0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENPM_ANIM_2
|
||||
{ &object_mm_Anim_00B09C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_3
|
||||
{ &object_mm_Anim_00B09C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENPM_ANIM_4
|
||||
{ &object_mm_Anim_00BA78, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENPM_ANIM_5
|
||||
{ &object_mm_Anim_00C32C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENPM_ANIM_6
|
||||
{ &object_mm_Anim_0099B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_7
|
||||
{ &object_mm_Anim_000FC4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_8
|
||||
{ &object_mm_Anim_00A8D8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_9
|
||||
{ &object_mm_Anim_00099C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_10
|
||||
{ &object_mm_Anim_001F84, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // ENPM_ANIM_11
|
||||
{ &object_mm_Anim_000468, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_12
|
||||
{ &object_mm_Anim_00C640, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENPM_ANIM_13
|
||||
};
|
||||
|
||||
s32 func_80AF7B40(void) {
|
||||
@@ -501,44 +519,44 @@ Actor* func_80AF7DC4(EnPm* this, PlayState* play, s32 arg2) {
|
||||
return actorIter;
|
||||
}
|
||||
|
||||
void func_80AF7E6C(EnPm* this) {
|
||||
this->skelAnime.playSpeed = this->unk_35C;
|
||||
void EnPm_UpdateSkelAnime(EnPm* this) {
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 func_80AF7E98(EnPm* this, s32 arg1) {
|
||||
s32 phi_v1 = false;
|
||||
s32 ret = false;
|
||||
s32 EnPm_ChangeAnim(EnPm* this, s32 animIndex) {
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
switch (arg1) {
|
||||
case 0:
|
||||
case 1:
|
||||
if ((this->unk_384 != 0) && (this->unk_384 != 1)) {
|
||||
phi_v1 = true;
|
||||
switch (animIndex) {
|
||||
case ENPM_ANIM_0:
|
||||
case ENPM_ANIM_1:
|
||||
if ((this->animIndex != ENPM_ANIM_0) && (this->animIndex != ENPM_ANIM_1)) {
|
||||
changeAnim = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 4:
|
||||
if ((this->unk_384 != 3) && (this->unk_384 != 4)) {
|
||||
phi_v1 = true;
|
||||
case ENPM_ANIM_3:
|
||||
case ENPM_ANIM_4:
|
||||
if ((this->animIndex != ENPM_ANIM_3) && (this->animIndex != ENPM_ANIM_4)) {
|
||||
changeAnim = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (arg1 != this->unk_384) {
|
||||
phi_v1 = true;
|
||||
if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (phi_v1) {
|
||||
this->unk_384 = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1);
|
||||
this->unk_35C = this->skelAnime.playSpeed;
|
||||
if (changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80AF7F68(EnPm* this, PlayState* play) {
|
||||
@@ -725,7 +743,7 @@ s32 func_80AF8478(Actor* thisx, PlayState* play) {
|
||||
|
||||
switch (this->unk_378) {
|
||||
case 0:
|
||||
func_80AF7E98(this, 2);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_2);
|
||||
this->unk_356 &= ~0x20;
|
||||
this->unk_356 |= 0x200;
|
||||
this->unk_378++;
|
||||
@@ -733,7 +751,7 @@ s32 func_80AF8478(Actor* thisx, PlayState* play) {
|
||||
|
||||
case 1:
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80AF7E98(this, 4);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_4);
|
||||
this->unk_356 &= ~0x200;
|
||||
this->unk_356 |= 0x20;
|
||||
this->unk_378++;
|
||||
@@ -839,7 +857,7 @@ s32 func_80AF87C4(EnPm* this, PlayState* play) {
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 9) &&
|
||||
(play->curSpawn == 1)) {
|
||||
if (!this->unk_380) {
|
||||
func_80AF7E98(this, 0);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
this->scheduleResult = 255;
|
||||
this->unk_380 = true;
|
||||
this->actor.speed = 4.0f;
|
||||
@@ -974,13 +992,16 @@ void func_80AF8C68(EnPm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80AF8D84(EnPm* this, PlayState* play) {
|
||||
switch (this->unk_384) {
|
||||
case 10:
|
||||
func_80AF7E98(this, 9);
|
||||
switch (this->animIndex) {
|
||||
case ENPM_ANIM_10:
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_9);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
func_80AF7E98(this, 0);
|
||||
case ENPM_ANIM_7:
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -994,11 +1015,11 @@ s32 func_80AF8DD4(EnPm* this, PlayState* play) {
|
||||
if (player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_400)) {
|
||||
this->unk_356 |= 0x400;
|
||||
if (this->unk_358 != textId) {
|
||||
if ((this->unk_384 == 0) || (this->unk_384 == 1)) {
|
||||
func_80AF7E98(this, 7);
|
||||
if ((this->animIndex == ENPM_ANIM_0) || (this->animIndex == ENPM_ANIM_1)) {
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_7);
|
||||
}
|
||||
if ((textId == 0x277C) || (textId == 0x277D)) {
|
||||
func_80AF7E98(this, 10);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_10);
|
||||
}
|
||||
}
|
||||
this->unk_358 = textId;
|
||||
@@ -1087,7 +1108,7 @@ s32 func_80AF9008(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
}
|
||||
this->unk_356 |= 0x9000;
|
||||
this->unk_356 |= 0x200;
|
||||
func_80AF7E98(this, 0);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
this->actor.gravity = 0.0f;
|
||||
ret = true;
|
||||
}
|
||||
@@ -1151,17 +1172,17 @@ s32 func_80AF91E8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_356 |= 0x200;
|
||||
FALLTHROUGH;
|
||||
case 82:
|
||||
func_80AF7E98(this, 0);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
break;
|
||||
|
||||
case 91:
|
||||
this->unk_356 |= 0x9000;
|
||||
func_80AF7E98(this, 12);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_12);
|
||||
break;
|
||||
|
||||
default:
|
||||
SubS_SetOfferMode(&this->unk_356, SUBS_OFFER_MODE_ONSCREEN, SUBS_OFFER_MODE_MASK);
|
||||
func_80AF7E98(this, 0);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_90_08)) {
|
||||
this->unk_356 |= 0x800;
|
||||
}
|
||||
@@ -1203,7 +1224,7 @@ s32 func_80AF94AC(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Flags_UnsetSwitch(play, 1);
|
||||
this->unk_394 = PLAYER_IA_NONE;
|
||||
this->unk_368 = 60.0f;
|
||||
func_80AF7E98(this, 9);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_9);
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
@@ -1258,7 +1279,7 @@ s32 func_80AF95E8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Flags_SetSwitch(play, 0);
|
||||
this->unk_36C = 20;
|
||||
SubS_SetOfferMode(&this->unk_356, SUBS_OFFER_MODE_ONSCREEN, SUBS_OFFER_MODE_MASK);
|
||||
func_80AF7E98(this, 3);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@@ -1268,13 +1289,13 @@ s32 func_80AF95E8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
case 7:
|
||||
case 19:
|
||||
this->unk_356 |= 0x9000;
|
||||
func_80AF7E98(this, 11);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_11);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
this->unk_356 |= 0x9000;
|
||||
this->unk_356 |= 0x800;
|
||||
func_80AF7E98(this, 5);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_5);
|
||||
break;
|
||||
|
||||
case 23:
|
||||
@@ -1289,7 +1310,7 @@ s32 func_80AF95E8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
}
|
||||
SubS_SetOfferMode(&this->unk_356, SUBS_OFFER_MODE_ONSCREEN, SUBS_OFFER_MODE_MASK);
|
||||
this->unk_356 |= 0x9000;
|
||||
func_80AF7E98(this, 3);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_3);
|
||||
break;
|
||||
}
|
||||
ret = true;
|
||||
@@ -1322,10 +1343,10 @@ s32 func_80AF992C(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_368 = 80.0f;
|
||||
if (scheduleOutput->result == 14) {
|
||||
this->unk_356 &= ~0x200;
|
||||
func_80AF7E98(this, 13);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_13);
|
||||
} else {
|
||||
this->unk_356 &= ~0x200;
|
||||
func_80AF7E98(this, 8);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_8);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1339,9 +1360,9 @@ s32 func_80AF9A0C(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_356 |= 0x9000;
|
||||
if (this->scheduleResult != 0) {
|
||||
this->unk_356 |= 0x800;
|
||||
func_80AF7E98(this, 5);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_5);
|
||||
} else {
|
||||
func_80AF7E98(this, 3);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_3);
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
@@ -1357,9 +1378,9 @@ s32 func_80AF9AB0(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_356 |= 0x9000;
|
||||
if (this->scheduleResult != 0) {
|
||||
this->unk_356 |= 0x800;
|
||||
func_80AF7E98(this, 5);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_5);
|
||||
} else {
|
||||
func_80AF7E98(this, 3);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_3);
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
@@ -1375,9 +1396,9 @@ s32 func_80AF9B54(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->unk_356 |= 0x20;
|
||||
if (this->scheduleResult != 0) {
|
||||
this->unk_356 |= 0x800;
|
||||
func_80AF7E98(this, 5);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_5);
|
||||
} else {
|
||||
func_80AF7E98(this, 3);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_3);
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
@@ -1623,12 +1644,12 @@ s32 func_80AFA170(EnPm* this, PlayState* play) {
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
if ((this->unk_384 == 5) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80AF7E98(this, 6);
|
||||
if ((this->animIndex == ENPM_ANIM_5) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_6);
|
||||
this->unk_36C = 40;
|
||||
} else if ((this->unk_384 == 6) && (DECR(this->unk_36C) == 0)) {
|
||||
} else if ((this->animIndex == ENPM_ANIM_6) && (DECR(this->unk_36C) == 0)) {
|
||||
this->unk_356 &= ~0x800;
|
||||
func_80AF7E98(this, 4);
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_4);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1638,11 +1659,11 @@ s32 func_80AFA170(EnPm* this, PlayState* play) {
|
||||
case 6:
|
||||
case 7:
|
||||
case 19:
|
||||
if ((this->unk_384 == 11) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
func_80AF7E98(this, 4);
|
||||
if ((this->animIndex == ENPM_ANIM_11) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_4);
|
||||
}
|
||||
|
||||
if ((this->unk_384 == 11) && Animation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
if ((this->animIndex == ENPM_ANIM_11) && Animation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_POSTMACHINE_HIT_OPEN);
|
||||
}
|
||||
|
||||
@@ -1875,9 +1896,10 @@ void EnPm_Init(Actor* thisx, PlayState* play) {
|
||||
EnPm* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 14.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_mm_Skel_0096E8, NULL, this->jointTable, this->morphTable, 16);
|
||||
this->unk_384 = -1;
|
||||
func_80AF7E98(this, 0);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_mm_Skel_0096E8, NULL, this->jointTable, this->morphTable,
|
||||
OBJECT_MM_LIMB_MAX);
|
||||
this->animIndex = ENPM_ANIM_NONE;
|
||||
EnPm_ChangeAnim(this, ENPM_ANIM_0);
|
||||
Collider_InitAndSetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
|
||||
Collider_InitAndSetSphere(play, &this->colliderSphere, &this->actor, &sSphereInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
@@ -1901,14 +1923,14 @@ void EnPm_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (!func_80AF86F0(this, play) && func_80AF87C4(this, play)) {
|
||||
func_80AFA724(this, play);
|
||||
func_80AF7E6C(this);
|
||||
EnPm_UpdateSkelAnime(this);
|
||||
func_80AF8AC8(this);
|
||||
} else {
|
||||
this->actionFunc(this, play);
|
||||
func_80AF7BAC(this);
|
||||
if (this->scheduleResult != 0) {
|
||||
func_80AF8DD4(this, play);
|
||||
func_80AF7E6C(this);
|
||||
EnPm_UpdateSkelAnime(this);
|
||||
func_80AF8AC8(this);
|
||||
SubS_Offer(&this->actor, play, this->unk_368, 30.0f, this->unk_394, this->unk_356 & SUBS_OFFER_MODE_MASK);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
@@ -1922,7 +1944,7 @@ s32 EnPm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
||||
Gfx** gfx) {
|
||||
EnPm* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == OBJECT_MM_LIMB_0F) {
|
||||
func_80AF8C68(this, play);
|
||||
}
|
||||
return false;
|
||||
@@ -1934,7 +1956,7 @@ void EnPm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
Vec3f sp2C;
|
||||
|
||||
switch (limbIndex) {
|
||||
case 15:
|
||||
case OBJECT_MM_LIMB_0F:
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
|
||||
Matrix_MultVec3f(&gZeroVec3f, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
@@ -1944,13 +1966,13 @@ void EnPm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
case OBJECT_MM_LIMB_0B:
|
||||
if (this->unk_356 & 0x800) {
|
||||
func_80AF8890(this, gfx, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case OBJECT_MM_LIMB_08:
|
||||
if ((this->scheduleResult == 9) || (this->scheduleResult == 20) || (this->scheduleResult == 21) ||
|
||||
(this->scheduleResult == 22)) {
|
||||
Matrix_MultVec3f(&gZeroVec3f, &sp2C);
|
||||
@@ -1961,6 +1983,9 @@ void EnPm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
}
|
||||
func_80AF8890(this, gfx, 2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1981,7 +2006,7 @@ void EnPm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx, Gfx**
|
||||
stepRot = false;
|
||||
}
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == OBJECT_MM_LIMB_0F) {
|
||||
SubS_UpdateLimb(this->unk_370 + 0x4000, this->unk_372 + this->actor.shape.rot.y + 0x4000, &this->unk_284,
|
||||
&this->unk_290, stepRot, overrideRot);
|
||||
Matrix_Pop();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_PM_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_mm/object_mm.h"
|
||||
|
||||
struct EnPm;
|
||||
|
||||
@@ -33,11 +34,11 @@ typedef struct EnPm {
|
||||
/* 0x278 */ Vec3f unk_278;
|
||||
/* 0x284 */ Vec3f unk_284;
|
||||
/* 0x290 */ Vec3s unk_290;
|
||||
/* 0x296 */ Vec3s jointTable[16];
|
||||
/* 0x2F6 */ Vec3s morphTable[16];
|
||||
/* 0x296 */ Vec3s jointTable[OBJECT_MM_LIMB_MAX];
|
||||
/* 0x2F6 */ Vec3s morphTable[OBJECT_MM_LIMB_MAX];
|
||||
/* 0x356 */ u16 unk_356;
|
||||
/* 0x358 */ u16 unk_358;
|
||||
/* 0x35C */ f32 unk_35C;
|
||||
/* 0x35C */ f32 animPlaySpeed;
|
||||
/* 0x360 */ f32 unk_360;
|
||||
/* 0x364 */ f32 unk_364;
|
||||
/* 0x368 */ f32 unk_368;
|
||||
@@ -50,7 +51,7 @@ typedef struct EnPm {
|
||||
/* 0x378 */ s16 unk_378;
|
||||
/* 0x37C */ MsgScriptCallback msgScriptCallback;
|
||||
/* 0x380 */ s32 unk_380;
|
||||
/* 0x384 */ s32 unk_384;
|
||||
/* 0x384 */ s32 animIndex;
|
||||
/* 0x388 */ s32 prevTalkState;
|
||||
/* 0x38C */ s32 unk_38C;
|
||||
/* 0x390 */ UNK_TYPE1 unk_390[0x4];
|
||||
|
||||
@@ -202,13 +202,13 @@ void EnPr_ChangeAnim(EnPr* this, s32 animIndex) {
|
||||
|
||||
this->animIndex = animIndex;
|
||||
playSpeed = 1.0f;
|
||||
this->unk_2BC = Animation_GetLastFrame(sAnimations[animIndex]);
|
||||
this->animEndFrame = Animation_GetLastFrame(sAnimations[animIndex]);
|
||||
|
||||
if (this->animIndex == ENPR_ANIM_2) {
|
||||
playSpeed = 2.0f;
|
||||
}
|
||||
|
||||
Animation_Change(&this->skelAnime, sAnimations[this->animIndex], playSpeed, 0.0f, this->unk_2BC,
|
||||
Animation_Change(&this->skelAnime, sAnimations[this->animIndex], playSpeed, 0.0f, this->animEndFrame,
|
||||
sAnimationModes[this->animIndex], -2.0f);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ void func_80A32E60(EnPr* this) {
|
||||
void func_80A32EA4(EnPr* this, PlayState* play) {
|
||||
f32 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
if (this->unk_2BC <= curFrame) {
|
||||
if (curFrame >= this->animEndFrame) {
|
||||
if (this->actor.colChkInfo.health <= 0) {
|
||||
this->unk_206 = 7;
|
||||
this->unk_20A = 50;
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct EnPr {
|
||||
/* 0x23C */ Vec3f bodyPartsPos[ENPR_BODYPART_MAX];
|
||||
/* 0x2B4 */ f32 unk_2B4;
|
||||
/* 0x2B8 */ f32 unk_2B8;
|
||||
/* 0x2BC */ f32 unk_2BC;
|
||||
/* 0x2BC */ f32 animEndFrame;
|
||||
/* 0x2C0 */ f32 unk_2C0;
|
||||
/* 0x2C4 */ f32 unk_2C4;
|
||||
/* 0x2C8 */ f32 unk_2C8;
|
||||
|
||||
@@ -52,13 +52,14 @@ s32 EnSob1_TakeItemOffShelf(EnSob1* this);
|
||||
s32 EnSob1_ReturnItemToShelf(EnSob1* this);
|
||||
s16 EnSob1_GetDistSqAndOrient(Path* path, s32 pointIndex, Vec3f* pos, f32* distSq);
|
||||
|
||||
typedef enum {
|
||||
typedef enum BombShopkeeperAnimation {
|
||||
/* 0 */ BOMB_SHOPKEEPER_ANIM_WALK,
|
||||
/* 1 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START,
|
||||
/* 2 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP
|
||||
/* 2 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP,
|
||||
/* 3 */ BOMB_SHOPKEEPER_ANIM_MAX
|
||||
} BombShopkeeperAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfoBombShopkeeper[] = {
|
||||
static AnimationInfoS sAnimationInfo[BOMB_SHOPKEEPER_ANIM_MAX] = {
|
||||
{ &gBombShopkeeperWalkAnim, 2.0f, 0, -1, ANIMMODE_LOOP, 20 },
|
||||
{ &gBombShopkeeperSitAtCounterStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBombShopkeeperSitAtCounterLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
@@ -753,8 +754,7 @@ void EnSob1_EndWalk(EnSob1* this, PlayState* play) {
|
||||
if (distSq < 12.0f) {
|
||||
this->actor.speed = 0.0f;
|
||||
if (endFrame == curFrame) {
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfoBombShopkeeper,
|
||||
BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START);
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfo, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START);
|
||||
EnSob1_SetupAction(this, EnSob1_SetupIdle);
|
||||
}
|
||||
}
|
||||
@@ -766,7 +766,7 @@ void EnSob1_SetupIdle(EnSob1* this, PlayState* play) {
|
||||
s16 endFrame = Animation_GetLastFrame(&gBombShopkeeperSitAtCounterStartAnim);
|
||||
|
||||
if (endFrame == curFrame) {
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfoBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP);
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfo, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP);
|
||||
EnSob1_SetupAction(this, EnSob1_Idle);
|
||||
}
|
||||
EnSob1_Walking(this, play);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "z_en_tab.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/object_tab/object_tab.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
||||
@@ -246,28 +245,6 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
AnimationInfoS D_80BE1AD0[] = {
|
||||
{ &gBartenIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBartenIdleBarCounterAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
Vec3f D_80BE1AF0 = { -28.0f, -8.0f, -195.0f };
|
||||
|
||||
Vec3s D_80BE1AFC = { 0, 0, 0 };
|
||||
|
||||
Vec3f D_80BE1B04 = { 161.0f, 0.0f, -10.0f };
|
||||
|
||||
Vec3s D_80BE1B10 = { 0, 0xC000, 0 };
|
||||
|
||||
Vec3f D_80BE1B18 = { 800.0f, 0.0f, 0.0f };
|
||||
|
||||
static TexturePtr sEyeTextures[] = {
|
||||
gBartenEyeOpenTex,
|
||||
gBartenEyeHalfOpenTex,
|
||||
gBartenEyeClosedTex,
|
||||
gBartenEyeHalfOpenTex,
|
||||
};
|
||||
|
||||
Actor* EnTab_FindActor(EnTab* this, PlayState* play, u8 actorCategory, s16 actorId) {
|
||||
Actor* actorIter = NULL;
|
||||
|
||||
@@ -292,25 +269,37 @@ Actor* EnTab_FindActor(EnTab* this, PlayState* play, u8 actorCategory, s16 actor
|
||||
return actorIter;
|
||||
}
|
||||
|
||||
void func_80BE0590(EnTab* this) {
|
||||
this->skelAnime.playSpeed = this->unk_300;
|
||||
void EnTab_UpdateSkelAnime(EnTab* this) {
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 func_80BE05BC(EnTab* this, s32 arg1) {
|
||||
s32 phi_v0 = false;
|
||||
s32 ret = false;
|
||||
typedef enum EnTabAnimation {
|
||||
/* -1 */ ENTAB_ANIM_NONE = -1,
|
||||
/* 0 */ ENTAB_ANIM_0,
|
||||
/* 1 */ ENTAB_ANIM_1,
|
||||
/* 2 */ ENTAB_ANIM_MAX
|
||||
} EnTabAnimation;
|
||||
|
||||
if (arg1 != this->unk_32C) {
|
||||
phi_v0 = true;
|
||||
static AnimationInfoS sAnimationInfo[ENTAB_ANIM_MAX] = {
|
||||
{ &gBartenIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENTAB_ANIM_0
|
||||
{ &gBartenIdleBarCounterAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENTAB_ANIM_1
|
||||
};
|
||||
|
||||
s32 EnTab_ChangeAnim(EnTab* this, s32 animIndex) {
|
||||
s32 changeAnim = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if (this->animIndex != animIndex) {
|
||||
changeAnim = true;
|
||||
}
|
||||
|
||||
if (phi_v0) {
|
||||
this->unk_32C = arg1;
|
||||
ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80BE1AD0, arg1);
|
||||
this->unk_300 = this->skelAnime.playSpeed;
|
||||
if (changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
return ret;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80BE0620(EnTab* this, PlayState* play) {
|
||||
@@ -515,6 +504,8 @@ MsgScript* EnTab_GetMsgScript(EnTab* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80BE0F04(EnTab* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80BE1AF0 = { -28.0f, -8.0f, -195.0f };
|
||||
static Vec3s D_80BE1AFC = { 0, 0, 0 };
|
||||
s32 ret = false;
|
||||
EnGm* sp28 = (EnGm*)EnTab_FindActor(this, play, ACTORCAT_NPC, ACTOR_EN_GM);
|
||||
|
||||
@@ -527,13 +518,15 @@ s32 func_80BE0F04(EnTab* this, PlayState* play, ScheduleOutput* scheduleOutput)
|
||||
this->unk_2FC |= (0x40 | 0x20);
|
||||
this->unk_30C = 30;
|
||||
this->unk_1E4 = sp28;
|
||||
func_80BE05BC(this, 0);
|
||||
EnTab_ChangeAnim(this, ENTAB_ANIM_0);
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BE0FC4(EnTab* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80BE1B04 = { 161.0f, 0.0f, -10.0f };
|
||||
static Vec3s D_80BE1B10 = { 0, 0xC000, 0 };
|
||||
s32 pad;
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80BE1B04);
|
||||
@@ -543,7 +536,7 @@ s32 func_80BE0FC4(EnTab* this, PlayState* play, ScheduleOutput* scheduleOutput)
|
||||
SubS_SetOfferMode(&this->unk_2FC, SUBS_OFFER_MODE_ONSCREEN, SUBS_OFFER_MODE_MASK);
|
||||
this->unk_2FC |= (0x40 | 0x20);
|
||||
this->unk_30C = 0x50;
|
||||
func_80BE05BC(this, 1);
|
||||
EnTab_ChangeAnim(this, ENTAB_ANIM_1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -661,8 +654,8 @@ void EnTab_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gBartenSkel, NULL, this->jointTable, this->morphTable, BARTEN_LIMB_MAX);
|
||||
this->unk_32C = -1;
|
||||
func_80BE05BC(this, 0);
|
||||
this->animIndex = ENTAB_ANIM_NONE;
|
||||
EnTab_ChangeAnim(this, ENTAB_ANIM_0);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
@@ -693,7 +686,7 @@ void EnTab_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->scheduleResult != 0) {
|
||||
func_80BE0590(this);
|
||||
EnTab_UpdateSkelAnime(this);
|
||||
func_80BE0664(this);
|
||||
func_80BE09A8(this, play);
|
||||
|
||||
@@ -710,20 +703,21 @@ void EnTab_Update(Actor* thisx, PlayState* play) {
|
||||
s32 EnTab_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnTab* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == BARTEN_LIMB_HEAD) {
|
||||
func_80BE0A98(this, play);
|
||||
}
|
||||
|
||||
if ((this->unk_32C == 1) && (limbIndex == 18)) {
|
||||
if ((this->animIndex == ENTAB_ANIM_1) && (limbIndex == BARTEN_LIMB_LEFT_BROOM)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnTab_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80BE1B18 = { 800.0f, 0.0f, 0.0f };
|
||||
EnTab* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == BARTEN_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80BE1B18, &this->actor.focus.pos);
|
||||
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
|
||||
}
|
||||
@@ -746,7 +740,7 @@ void EnTab_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
rotStep = false;
|
||||
}
|
||||
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == BARTEN_LIMB_HEAD) {
|
||||
SubS_UpdateLimb(BINANG_ADD(this->unk_312 + this->unk_316, 0x4000),
|
||||
BINANG_ADD(this->unk_314 + this->unk_318 + this->actor.shape.rot.y, 0x4000), this->unk_1E8,
|
||||
this->unk_200, rotStep, overrideStep);
|
||||
@@ -761,6 +755,12 @@ void EnTab_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
}
|
||||
|
||||
void EnTab_Draw(Actor* thisx, PlayState* play) {
|
||||
static TexturePtr sEyeTextures[] = {
|
||||
gBartenEyeOpenTex,
|
||||
gBartenEyeHalfOpenTex,
|
||||
gBartenEyeClosedTex,
|
||||
gBartenEyeHalfOpenTex,
|
||||
};
|
||||
EnTab* this = THIS;
|
||||
|
||||
if (this->scheduleResult != 0) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Gm/z_en_gm.h"
|
||||
#include "assets/objects/object_tab/object_tab.h"
|
||||
|
||||
struct EnTab;
|
||||
|
||||
@@ -19,10 +20,10 @@ typedef struct EnTab {
|
||||
/* 0x1E4 */ EnGm* unk_1E4;
|
||||
/* 0x1E8 */ Vec3f unk_1E8[2];
|
||||
/* 0x200 */ Vec3s unk_200[2];
|
||||
/* 0x20C */ Vec3s jointTable[20];
|
||||
/* 0x284 */ Vec3s morphTable[20];
|
||||
/* 0x20C */ Vec3s jointTable[BARTEN_LIMB_MAX];
|
||||
/* 0x284 */ Vec3s morphTable[BARTEN_LIMB_MAX];
|
||||
/* 0x2FC */ u16 unk_2FC;
|
||||
/* 0x300 */ f32 unk_300;
|
||||
/* 0x300 */ f32 animPlaySpeed;
|
||||
/* 0x304 */ f32 unk_304;
|
||||
/* 0x308 */ f32 unk_308;
|
||||
/* 0x30C */ s16 unk_30C;
|
||||
@@ -38,7 +39,7 @@ typedef struct EnTab {
|
||||
/* 0x322 */ s16 unk_322;
|
||||
/* 0x324 */ s16 unk_324;
|
||||
/* 0x328 */ MsgScriptCallback msgScriptCallback;
|
||||
/* 0x32C */ s32 unk_32C;
|
||||
/* 0x32C */ s32 animIndex;
|
||||
/* 0x330 */ UNK_TYPE1 unk330[4];
|
||||
/* 0x334 */ s32 prevTalkState;
|
||||
/* 0x338 */ s32 unk_338;
|
||||
|
||||
@@ -429,7 +429,7 @@ void EnTest4_HandleEvents(EnTest4* this, PlayState* play) {
|
||||
// `prevTimeUntilTransition` will be slightly negative (behind transition time)
|
||||
// Only when the signs are different will this condition pass
|
||||
if ((curTimeUntilTransition * prevTimeUntilTransition) <= 0) {
|
||||
// day-night transition is occuring
|
||||
// day-night transition is occurring
|
||||
gSaveContext.unk_3CA7 = 1;
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON) {
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_PICTO_BOX_ON;
|
||||
|
||||
@@ -494,20 +494,20 @@ s32 func_80A86770(EnTru* this) {
|
||||
}
|
||||
|
||||
void EnTru_UpdateSkelAnime(EnTru* this) {
|
||||
this->skelAnime.playSpeed = this->playSpeed;
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
s32 EnTru_ChangeAnim(EnTru* this, s32 animIndex) {
|
||||
s32 didChange = false;
|
||||
s32 didAnimChange = false;
|
||||
|
||||
if (animIndex != this->animIndex) {
|
||||
if (this->animIndex != animIndex) {
|
||||
this->animIndex = animIndex;
|
||||
didChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->playSpeed = this->skelAnime.playSpeed;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
}
|
||||
|
||||
return didChange;
|
||||
return didAnimChange;
|
||||
}
|
||||
|
||||
void func_80A8697C(EnTru* this, PlayState* play) {
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct EnTru {
|
||||
/* 0x34E */ u16 unk_34E;
|
||||
/* 0x350 */ UNK_TYPE1 unk350[0x4];
|
||||
/* 0x354 */ MsgScript* msgScript;
|
||||
/* 0x358 */ f32 playSpeed;
|
||||
/* 0x358 */ f32 animPlaySpeed;
|
||||
/* 0x35C */ f32 unk_35C;
|
||||
/* 0x360 */ s16 unk_360;
|
||||
/* 0x362 */ s16 unk_362;
|
||||
|
||||
@@ -20,26 +20,6 @@ void func_80B76A64(EnTruMt* this, PlayState* play);
|
||||
void func_80B76BB8(EnTruMt* this, PlayState* play);
|
||||
void func_80B76C38(EnTruMt* this, PlayState* play);
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ KOUME_MT_ANIM_INJURED_LYING_DOWN,
|
||||
/* 0x01 */ KOUME_MT_ANIM_INJURED_LYING_DOWN_MORPH,
|
||||
/* 0x02 */ KOUME_MT_ANIM_TRY_GET_UP,
|
||||
/* 0x03 */ KOUME_MT_ANIM_INJURED_RAISE_HEAD,
|
||||
/* 0x04 */ KOUME_MT_ANIM_INJURED_TALK,
|
||||
/* 0x05 */ KOUME_MT_ANIM_INJURED_HEAD_UP,
|
||||
/* 0x06 */ KOUME_MT_ANIM_INJURED_HEAD_UP_MORPH,
|
||||
/* 0x07 */ KOUME_MT_ANIM_TAKE,
|
||||
/* 0x08 */ KOUME_MT_ANIM_SHAKE, // Unused
|
||||
/* 0x09 */ KOUME_MT_ANIM_DRINK,
|
||||
/* 0x0A */ KOUME_MT_ANIM_FINISHED_DRINKING,
|
||||
/* 0x0B */ KOUME_MT_ANIM_HEALED,
|
||||
/* 0x0C */ KOUME_MT_ANIM_HOVER1,
|
||||
/* 0x0D */ KOUME_MT_ANIM_TAKE_OFF,
|
||||
/* 0x0E */ KOUME_MT_ANIM_FLY,
|
||||
/* 0x0F */ KOUME_MT_ANIM_HOVER2,
|
||||
/* 0x10 */ KOUME_MT_ANIM_MAX
|
||||
} KoumeMtAnimation;
|
||||
|
||||
ActorProfile En_Tru_Mt_Profile = {
|
||||
/**/ ACTOR_EN_TRU_MT,
|
||||
/**/ ACTORCAT_NPC,
|
||||
@@ -107,29 +87,45 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(1, 0x0),
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gKoumeInjuredLyingDownAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gKoumeInjuredLyingDownAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gKoumeTryGetUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gKoumeInjuredRaiseHeadAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gKoumeInjuredTalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gKoumeInjuredHeadUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gKoumeInjuredHeadUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gKoumeTakeAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gKoumeShakeAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gKoumeDrinkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gKoumeFinishedDrinkingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gKoumeHealedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gKoumeHoverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gKoumeTakeOffAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gKoumeFlyAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gKoumeHoverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
typedef enum KoumeMtAnimation {
|
||||
/* 0x00 */ KOUME_MT_ANIM_INJURED_LYING_DOWN,
|
||||
/* 0x01 */ KOUME_MT_ANIM_INJURED_LYING_DOWN_MORPH,
|
||||
/* 0x02 */ KOUME_MT_ANIM_TRY_GET_UP,
|
||||
/* 0x03 */ KOUME_MT_ANIM_INJURED_RAISE_HEAD,
|
||||
/* 0x04 */ KOUME_MT_ANIM_INJURED_TALK,
|
||||
/* 0x05 */ KOUME_MT_ANIM_INJURED_HEAD_UP,
|
||||
/* 0x06 */ KOUME_MT_ANIM_INJURED_HEAD_UP_MORPH,
|
||||
/* 0x07 */ KOUME_MT_ANIM_TAKE,
|
||||
/* 0x08 */ KOUME_MT_ANIM_SHAKE,
|
||||
/* 0x09 */ KOUME_MT_ANIM_DRINK,
|
||||
/* 0x0A */ KOUME_MT_ANIM_FINISHED_DRINKING,
|
||||
/* 0x0B */ KOUME_MT_ANIM_HEALED,
|
||||
/* 0x0C */ KOUME_MT_ANIM_HOVER1,
|
||||
/* 0x0D */ KOUME_MT_ANIM_TAKE_OFF,
|
||||
/* 0x0E */ KOUME_MT_ANIM_FLY,
|
||||
/* 0x0F */ KOUME_MT_ANIM_HOVER2,
|
||||
/* 0x10 */ KOUME_MT_ANIM_MAX
|
||||
} KoumeMtAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[KOUME_MT_ANIM_MAX] = {
|
||||
{ &gKoumeInjuredLyingDownAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // KOUME_MT_ANIM_INJURED_LYING_DOWN
|
||||
{ &gKoumeInjuredLyingDownAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // KOUME_MT_ANIM_INJURED_LYING_DOWN_MORPH
|
||||
{ &gKoumeTryGetUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // KOUME_MT_ANIM_TRY_GET_UP
|
||||
{ &gKoumeInjuredRaiseHeadAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // KOUME_MT_ANIM_INJURED_RAISE_HEAD
|
||||
{ &gKoumeInjuredTalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // KOUME_MT_ANIM_INJURED_TALK
|
||||
{ &gKoumeInjuredHeadUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // KOUME_MT_ANIM_INJURED_HEAD_UP
|
||||
{ &gKoumeInjuredHeadUpAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // KOUME_MT_ANIM_INJURED_HEAD_UP_MORPH
|
||||
{ &gKoumeTakeAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // KOUME_MT_ANIM_TAKE
|
||||
{ &gKoumeShakeAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // KOUME_MT_ANIM_SHAKE
|
||||
{ &gKoumeDrinkAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // KOUME_MT_ANIM_DRINK
|
||||
{ &gKoumeFinishedDrinkingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // KOUME_MT_ANIM_FINISHED_DRINKING
|
||||
{ &gKoumeHealedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // KOUME_MT_ANIM_HEALED
|
||||
{ &gKoumeHoverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // KOUME_MT_ANIM_HOVER1
|
||||
{ &gKoumeTakeOffAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, // KOUME_MT_ANIM_TAKE_OFF
|
||||
{ &gKoumeFlyAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // KOUME_MT_ANIM_FLY
|
||||
{ &gKoumeHoverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // KOUME_MT_ANIM_HOVER2
|
||||
};
|
||||
|
||||
Vec3f D_80B7765C = { 3000.0f, -800.0f, 0.0f };
|
||||
|
||||
Vec3f D_80B77668 = { 0.0f, 0.0f, -3000.0f };
|
||||
|
||||
s32 EnTruMt_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) {
|
||||
s16 endFrame;
|
||||
s16 startFrame;
|
||||
@@ -490,6 +486,7 @@ void func_80B76ED4(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4) {
|
||||
}
|
||||
|
||||
s32 EnTruMt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80B7765C = { 3000.0f, -800.0f, 0.0f };
|
||||
EnTruMt* this = THIS;
|
||||
|
||||
if (limbIndex == KOUME_LIMB_HEAD) {
|
||||
@@ -503,6 +500,7 @@ s32 EnTruMt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
}
|
||||
|
||||
void EnTruMt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80B77668 = { 0.0f, 0.0f, -3000.0f };
|
||||
s32 pad;
|
||||
EnTruMt* this = THIS;
|
||||
MtxF* sp54;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "z_en_vm.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/object_vm/object_vm.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_400)
|
||||
|
||||
@@ -162,7 +161,8 @@ void EnVm_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &gBeamosSkel, &gBeamosAnim, this->jointTable, this->morphTable, 11);
|
||||
SkelAnime_Init(play, &this->skelAnime, &gBeamosSkel, &gBeamosAnim, this->jointTable, this->morphTable,
|
||||
BEAMOS_LIMB_MAX);
|
||||
Collider_InitAndSetTris(play, &this->colliderTris, &this->actor, &sTrisInit, this->colliderTrisElements);
|
||||
Collider_InitAndSetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
|
||||
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_VM_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_vm/object_vm.h"
|
||||
|
||||
struct EnVm;
|
||||
|
||||
@@ -16,8 +17,8 @@ typedef void (*EnVmActionFunc)(struct EnVm*, PlayState*);
|
||||
typedef struct EnVm {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[11];
|
||||
/* 0x1CA */ Vec3s morphTable[11];
|
||||
/* 0x188 */ Vec3s jointTable[BEAMOS_LIMB_MAX];
|
||||
/* 0x1CA */ Vec3s morphTable[BEAMOS_LIMB_MAX];
|
||||
/* 0x20C */ EnVmActionFunc actionFunc;
|
||||
/* 0x210 */ u8 unk_210;
|
||||
/* 0x212 */ s16 unk_212;
|
||||
|
||||
@@ -72,15 +72,6 @@ typedef enum {
|
||||
/* 3 */ EN_WIZ_FIGHT_STATE_SECOND_PHASE_GHOSTS_RUN_AROUND
|
||||
} EnWizFightState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ EN_WIZ_ANIM_IDLE,
|
||||
/* 1 */ EN_WIZ_ANIM_RUN,
|
||||
/* 2 */ EN_WIZ_ANIM_DANCE,
|
||||
/* 3 */ EN_WIZ_ANIM_WIND_UP,
|
||||
/* 4 */ EN_WIZ_ANIM_ATTACK,
|
||||
/* 5 */ EN_WIZ_ANIM_DAMAGE
|
||||
} EnWizAnimation;
|
||||
|
||||
ActorProfile En_Wiz_Profile = {
|
||||
/**/ ACTOR_EN_WIZ,
|
||||
/**/ ACTORCAT_ENEMY,
|
||||
@@ -381,7 +372,17 @@ void EnWiz_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
typedef enum EnWizAnimation {
|
||||
/* 0 */ EN_WIZ_ANIM_IDLE,
|
||||
/* 1 */ EN_WIZ_ANIM_RUN,
|
||||
/* 2 */ EN_WIZ_ANIM_DANCE,
|
||||
/* 3 */ EN_WIZ_ANIM_WIND_UP,
|
||||
/* 4 */ EN_WIZ_ANIM_ATTACK,
|
||||
/* 5 */ EN_WIZ_ANIM_DAMAGE,
|
||||
/* 6 */ EN_WIZ_ANIM_MAX
|
||||
} EnWizAnimation;
|
||||
|
||||
static AnimationHeader* sAnimations[EN_WIZ_ANIM_MAX] = {
|
||||
&gWizrobeIdleAnim, // EN_WIZ_ANIM_IDLE
|
||||
&gWizrobeRunAnim, // EN_WIZ_ANIM_RUN
|
||||
&gWizrobeDanceAnim, // EN_WIZ_ANIM_DANCE
|
||||
@@ -390,7 +391,7 @@ static AnimationHeader* sAnimations[] = {
|
||||
&gWizrobeDamageAnim, // EN_WIZ_ANIM_DAMAGE
|
||||
};
|
||||
|
||||
static u8 sAnimationModes[] = {
|
||||
static u8 sAnimationModes[EN_WIZ_ANIM_MAX] = {
|
||||
ANIMMODE_LOOP, // EN_WIZ_ANIM_IDLE
|
||||
ANIMMODE_LOOP, // EN_WIZ_ANIM_RUN
|
||||
ANIMMODE_LOOP, // EN_WIZ_ANIM_DANCE
|
||||
@@ -400,11 +401,11 @@ static u8 sAnimationModes[] = {
|
||||
};
|
||||
|
||||
void EnWiz_ChangeAnim(EnWiz* this, s32 animIndex, s32 updateGhostAnim) {
|
||||
this->endFrame = Animation_GetLastFrame(sAnimations[animIndex]);
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f, this->endFrame, sAnimationModes[animIndex],
|
||||
-2.0f);
|
||||
this->animEndFrame = Animation_GetLastFrame(sAnimations[animIndex]);
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f, this->animEndFrame,
|
||||
sAnimationModes[animIndex], -2.0f);
|
||||
if (updateGhostAnim) {
|
||||
Animation_Change(&this->ghostSkelAnime, sAnimations[animIndex], 1.0f, 0.0f, this->endFrame,
|
||||
Animation_Change(&this->ghostSkelAnime, sAnimations[animIndex], 1.0f, 0.0f, this->animEndFrame,
|
||||
sAnimationModes[animIndex], -2.0f);
|
||||
}
|
||||
}
|
||||
@@ -820,7 +821,7 @@ void EnWiz_Dance(EnWiz* this, PlayState* play) {
|
||||
|
||||
Math_SmoothStepToS(&this->angularVelocity, 0x1388, 0x64, 0x3E8, 0x3E8);
|
||||
Math_SmoothStepToS(&this->platformLightAlpha, this->targetPlatformLightAlpha, 20, 50, 10);
|
||||
if (this->endFrame <= curFrame) {
|
||||
if (curFrame >= this->animEndFrame) {
|
||||
if (this->animLoopCounter < 10) {
|
||||
this->animLoopCounter++;
|
||||
}
|
||||
@@ -935,7 +936,7 @@ void EnWiz_WindUp(EnWiz* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->endFrame <= curFrame) {
|
||||
if (curFrame >= this->animEndFrame) {
|
||||
this->animLoopCounter++;
|
||||
if (this->animLoopCounter >= 2) {
|
||||
EnWiz_SetupAttack(this);
|
||||
@@ -990,7 +991,7 @@ void EnWiz_Attack(EnWiz* this, PlayState* play) {
|
||||
this->shouldStartTimer = true;
|
||||
}
|
||||
|
||||
if (this->endFrame <= curFrame) {
|
||||
if (curFrame >= this->animEndFrame) {
|
||||
EnWiz_SetupDisappear(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ typedef struct EnWiz {
|
||||
/* 0x3CA */ u8 shouldStartTimer;
|
||||
/* 0x3CB */ u8 introCutsceneState;
|
||||
/* 0x3CC */ s32 musicStartTimer;
|
||||
/* 0x3D0 */ f32 endFrame;
|
||||
/* 0x3D0 */ f32 animEndFrame;
|
||||
/* 0x3D4 */ f32 scale;
|
||||
/* 0x3D8 */ Vec3f staffFlamePos;
|
||||
/* 0x3E4 */ Vec3f staffFlameScale;
|
||||
|
||||
@@ -88,14 +88,26 @@ static DamageTable sDamageTable = {
|
||||
/* Powder Keg */ DMG_ENTRY(0, 0),
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimationInfo[] = {
|
||||
{ &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gZoraSurfacingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gZoraHandsOnHipsTappingFootAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gZoraArmsOpenAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gZoraThrowRupeeAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gZoraWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
typedef enum EnZoAnimation {
|
||||
/* -1 */ ENZO_ANIM_NONE = -1,
|
||||
/* 0 */ ENZO_ANIM_IDLE,
|
||||
/* 1 */ ENZO_ANIM_MORPH,
|
||||
/* 2 */ ENZO_ANIM_SURFACING,
|
||||
/* 3 */ ENZO_ANIM_HANDS_ON_HIP_TAPPING_FOOT,
|
||||
/* 4 */ ENZO_ANIM_ARMS_OPEN,
|
||||
/* 5 */ ENZO_ANIM_THROW_RUPEE,
|
||||
/* 6 */ ENZO_ANIM_WALK,
|
||||
/* 7 */ ENZO_ANIM_MAX
|
||||
} EnZoAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationInfo[ENZO_ANIM_MAX] = {
|
||||
{ &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // ENZO_ANIM_IDLE
|
||||
{ &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_MORPH
|
||||
{ &gZoraSurfacingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_SURFACING
|
||||
{ &gZoraHandsOnHipsTappingFootAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_HANDS_ON_HIP_TAPPING_FOOT
|
||||
{ &gZoraArmsOpenAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_ARMS_OPEN
|
||||
{ &gZoraThrowRupeeAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_THROW_RUPEE
|
||||
{ &gZoraWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // ENZO_ANIM_WALK
|
||||
};
|
||||
|
||||
static s8 sLimbToBodyParts[ZORA_LIMB_MAX] = {
|
||||
@@ -158,17 +170,17 @@ static u8 sShadowSizes[ZORA_BODYPART_MAX] = {
|
||||
};
|
||||
|
||||
s32 EnZo_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) {
|
||||
s16 frameCount;
|
||||
s16 endFrame;
|
||||
s32 didChange = false;
|
||||
|
||||
if ((animIndex >= 0) && (animIndex < ARRAY_COUNT(sAnimationInfo))) {
|
||||
if ((animIndex > ENZO_ANIM_NONE) && (animIndex < ENZO_ANIM_MAX)) {
|
||||
didChange = true;
|
||||
frameCount = sAnimationInfo[animIndex].frameCount;
|
||||
if (frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(sAnimationInfo[animIndex].animation);
|
||||
endFrame = sAnimationInfo[animIndex].frameCount;
|
||||
if (endFrame < 0) {
|
||||
endFrame = Animation_GetLastFrame(sAnimationInfo[animIndex].animation);
|
||||
}
|
||||
Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed,
|
||||
sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode,
|
||||
sAnimationInfo[animIndex].startFrame, endFrame, sAnimationInfo[animIndex].mode,
|
||||
sAnimationInfo[animIndex].morphFrames);
|
||||
}
|
||||
return didChange;
|
||||
@@ -263,7 +275,7 @@ void EnZo_LookAtPlayer(EnZo* this, PlayState* play) {
|
||||
|
||||
void EnZo_Walk(EnZo* this, PlayState* play) {
|
||||
if (ENZO_GET_PATH_INDEX(&this->actor) != ENZO_PATH_INDEX_NONE) {
|
||||
EnZo_ChangeAnim(&this->skelAnime, 6);
|
||||
EnZo_ChangeAnim(&this->skelAnime, ENZO_ANIM_WALK);
|
||||
}
|
||||
|
||||
if (ENZO_GET_PATH_INDEX(&this->actor) != ENZO_PATH_INDEX_NONE) {
|
||||
@@ -287,7 +299,7 @@ void EnZo_FollowPath(EnZo* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->actor.depthInWater > 60.0f) {
|
||||
EnZo_ChangeAnim(&this->skelAnime, 1);
|
||||
EnZo_ChangeAnim(&this->skelAnime, ENZO_ANIM_MORPH);
|
||||
this->actionFunc = EnZo_TreadWater;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
@@ -314,7 +326,7 @@ void EnZo_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, ZORA_LIMB_MAX);
|
||||
EnZo_ChangeAnim(&this->skelAnime, 0);
|
||||
EnZo_ChangeAnim(&this->skelAnime, ENZO_ANIM_IDLE);
|
||||
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_zob.h"
|
||||
#include "assets/objects/object_zob/object_zob.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
@@ -16,7 +15,7 @@ void EnZob_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnZob_Update(Actor* thisx, PlayState* play);
|
||||
void EnZob_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80B9F7E4(EnZob* this, s16 arg1, u8 arg2);
|
||||
void EnZob_ChangeAnim(EnZob* this, s16 animIndex, u8 animMode);
|
||||
void func_80B9FD24(EnZob* this, PlayState* play);
|
||||
void func_80B9FDDC(EnZob* this, PlayState* play);
|
||||
void func_80B9FE1C(EnZob* this, PlayState* play);
|
||||
@@ -69,13 +68,30 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 30, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&object_zob_Anim_0027D0, &object_zob_Anim_002B38, &object_zob_Anim_0037A0,
|
||||
&object_zob_Anim_0043C4, &object_zob_Anim_005224, &object_zob_Anim_005E90,
|
||||
&object_zob_Anim_006998, &object_zob_Anim_011144, &object_zob_Anim_001FD4,
|
||||
};
|
||||
typedef enum EnZobAnimation {
|
||||
/* 0 */ ENZOB_ANIM_0,
|
||||
/* 1 */ ENZOB_ANIM_1,
|
||||
/* 2 */ ENZOB_ANIM_2,
|
||||
/* 3 */ ENZOB_ANIM_3,
|
||||
/* 4 */ ENZOB_ANIM_4,
|
||||
/* 5 */ ENZOB_ANIM_5,
|
||||
/* 6 */ ENZOB_ANIM_6,
|
||||
/* 7 */ ENZOB_ANIM_7,
|
||||
/* 8 */ ENZOB_ANIM_8,
|
||||
/* 9 */ ENZOB_ANIM_MAX
|
||||
} EnZobAnimation;
|
||||
|
||||
Vec3f D_80BA1120 = { 300.0f, 900.0f, 0.0f };
|
||||
static AnimationHeader* sAnimations[ENZOB_ANIM_MAX] = {
|
||||
&object_zob_Anim_0027D0, // ENZOB_ANIM_0
|
||||
&object_zob_Anim_002B38, // ENZOB_ANIM_1
|
||||
&object_zob_Anim_0037A0, // ENZOB_ANIM_2
|
||||
&object_zob_Anim_0043C4, // ENZOB_ANIM_3
|
||||
&object_zob_Anim_005224, // ENZOB_ANIM_4
|
||||
&object_zob_Anim_005E90, // ENZOB_ANIM_5
|
||||
&object_zob_Anim_006998, // ENZOB_ANIM_6
|
||||
&object_zob_Anim_011144, // ENZOB_ANIM_7
|
||||
&object_zob_Anim_001FD4, // ENZOB_ANIM_8
|
||||
};
|
||||
|
||||
void EnZob_Init(Actor* thisx, PlayState* play) {
|
||||
EnZob* this = THIS;
|
||||
@@ -86,17 +102,17 @@ void EnZob_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
Actor_SetScale(&this->actor, 0.0115f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_zob_Skel_010810, &object_zob_Anim_006998, this->jointTable,
|
||||
this->morphTable, 24);
|
||||
this->morphTable, OBJECT_ZOB_LIMB_MAX);
|
||||
Animation_PlayLoop(&this->skelAnime, &object_zob_Anim_006998);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->unk_2F4 = 0;
|
||||
this->csIdIndex = -1;
|
||||
this->cueId = 0;
|
||||
this->unk_302 = 9;
|
||||
this->animIndex = ENZOB_ANIM_MAX;
|
||||
this->unk_304 = 0;
|
||||
this->actor.terminalVelocity = -4.0f;
|
||||
this->actor.gravity = -4.0f;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
this->actionFunc = func_80BA0728;
|
||||
this->actor.textId = 0;
|
||||
|
||||
@@ -130,7 +146,7 @@ void EnZob_Init(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc = func_80BA0CF4;
|
||||
this->unk_2F4 |= 0x20;
|
||||
this->unk_312 = -1;
|
||||
func_80B9F7E4(this, 0, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_ONCE);
|
||||
this->unk_304 = 5;
|
||||
break;
|
||||
|
||||
@@ -149,10 +165,10 @@ void EnZob_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void func_80B9F7E4(EnZob* this, s16 arg1, u8 arg2) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, Animation_GetLastFrame(sAnimations[arg1]), arg2,
|
||||
-5.0f);
|
||||
this->unk_302 = arg1;
|
||||
void EnZob_ChangeAnim(EnZob* this, s16 animIndex, u8 animMode) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, -5.0f);
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
|
||||
void func_80B9F86C(EnZob* this) {
|
||||
@@ -160,45 +176,48 @@ void func_80B9F86C(EnZob* this) {
|
||||
switch (this->unk_304) {
|
||||
case 0:
|
||||
if (Rand_ZeroFloat(1.0f) > 0.7f) {
|
||||
if (this->unk_302 == 6) {
|
||||
func_80B9F7E4(this, 7, ANIMMODE_ONCE);
|
||||
if (this->animIndex == ENZOB_ANIM_6) {
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_7, ANIMMODE_ONCE);
|
||||
} else {
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
}
|
||||
} else {
|
||||
func_80B9F7E4(this, this->unk_302, 2);
|
||||
EnZob_ChangeAnim(this, this->animIndex, ANIMMODE_ONCE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
func_80B9F7E4(this, 3, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_3, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
func_80B9F7E4(this, 4, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_4, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
func_80B9F7E4(this, 5, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (this->unk_302 == 3) {
|
||||
func_80B9F7E4(this, 0, ANIMMODE_LOOP);
|
||||
if (this->animIndex == ENZOB_ANIM_3) {
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_LOOP);
|
||||
} else {
|
||||
func_80B9F7E4(this, 3, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_3, ANIMMODE_ONCE);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (Rand_ZeroFloat(1.0f) < 0.8f) {
|
||||
func_80B9F7E4(this, this->unk_302, ANIMMODE_ONCE);
|
||||
} else if (this->unk_302 == 0) {
|
||||
func_80B9F7E4(this, 1, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, this->animIndex, ANIMMODE_ONCE);
|
||||
} else if (this->animIndex == ENZOB_ANIM_0) {
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_1, ANIMMODE_ONCE);
|
||||
} else {
|
||||
func_80B9F7E4(this, 0, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_ONCE);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
@@ -217,36 +236,36 @@ void func_80B9FA3C(EnZob* this, PlayState* play) {
|
||||
textId = 0x11F8;
|
||||
}
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_LOOP);
|
||||
} else if (this->unk_2F4 & 0x10) {
|
||||
textId = 0x1210;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_31_08)) {
|
||||
textId = 0x1205;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 3, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_3, ANIMMODE_LOOP);
|
||||
} else if (this->unk_2F4 & 8) {
|
||||
textId = 0x1215;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
} else if (this->unk_2F4 & 2) {
|
||||
textId = 0x1203;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_30_08)) {
|
||||
textId = 0x11FA;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
} else if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_30_04)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_30_04);
|
||||
textId = 0x11FB;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
} else {
|
||||
textId = 0x1201;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 4, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_4, ANIMMODE_ONCE);
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, textId, &this->actor);
|
||||
@@ -273,7 +292,7 @@ void func_80B9FCA0(EnZob* this, PlayState* play) {
|
||||
this->unk_2F4 &= ~1;
|
||||
this->actionFunc = func_80BA0728;
|
||||
this->unk_304 = 0;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
func_800B8718(&this->actor, &play->state);
|
||||
}
|
||||
|
||||
@@ -292,11 +311,11 @@ void func_80B9FD24(EnZob* this, PlayState* play) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
case 1:
|
||||
func_80B9F7E4(this, 8, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_8, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
func_80B9F7E4(this, 7, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_7, ANIMMODE_LOOP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -323,7 +342,7 @@ void func_80B9FE5C(EnZob* this, PlayState* play) {
|
||||
play->msgCtx.msgLength = 0;
|
||||
this->actionFunc = func_80B9FE1C;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
func_80B9FC70(this, 0);
|
||||
}
|
||||
}
|
||||
@@ -342,14 +361,14 @@ void func_80B9FF80(EnZob* this, PlayState* play) {
|
||||
if (play->msgCtx.ocarinaMode == OCARINA_MODE_EVENT) {
|
||||
this->actionFunc = func_80B9FF20;
|
||||
this->unk_304 = 6;
|
||||
func_80B9F7E4(this, 1, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_1, ANIMMODE_LOOP);
|
||||
Message_DisplayOcarinaStaff(play, OCARINA_ACTION_DEMONSTRATE_EVAN_PART2_FIRST_HALF);
|
||||
func_80B9FC70(this, 1);
|
||||
} else if (Message_GetState(&play->msgCtx) == TEXT_STATE_11) {
|
||||
play->msgCtx.msgLength = 0;
|
||||
this->actionFunc = func_80B9FE1C;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
func_80B9FC70(this, 0);
|
||||
}
|
||||
}
|
||||
@@ -374,7 +393,7 @@ void func_80BA00BC(EnZob* this, PlayState* play) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Message_ContinueTextbox(play, 0x1209);
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
@@ -397,7 +416,7 @@ void func_80BA00BC(EnZob* this, PlayState* play) {
|
||||
case 0x120C:
|
||||
play->msgCtx.msgLength = 0;
|
||||
this->actionFunc = func_80B9FD24;
|
||||
func_80B9F7E4(this, 8, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_8, ANIMMODE_LOOP);
|
||||
func_80B9FC70(this, 3);
|
||||
break;
|
||||
|
||||
@@ -407,7 +426,7 @@ void func_80BA00BC(EnZob* this, PlayState* play) {
|
||||
case 0x1217:
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 4, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_4, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 0x1218:
|
||||
@@ -428,7 +447,7 @@ void func_80BA00BC(EnZob* this, PlayState* play) {
|
||||
case 0x1209:
|
||||
Message_DisplayOcarinaStaff(play, OCARINA_ACTION_DEMONSTRATE_EVAN_PART1_FIRST_HALF);
|
||||
this->unk_304 = 4;
|
||||
func_80B9F7E4(this, 0, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_LOOP);
|
||||
this->actionFunc = func_80BA005C;
|
||||
func_80B9FC70(this, 1);
|
||||
break;
|
||||
@@ -441,7 +460,7 @@ void func_80BA00BC(EnZob* this, PlayState* play) {
|
||||
void func_80BA0318(EnZob* this, PlayState* play) {
|
||||
Message_DisplayOcarinaStaff(play, OCARINA_ACTION_DEMONSTRATE_EVAN_PART1_FIRST_HALF);
|
||||
this->unk_304 = 4;
|
||||
func_80B9F7E4(this, 0, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_LOOP);
|
||||
this->actionFunc = func_80BA005C;
|
||||
func_80B9FC70(this, 1);
|
||||
}
|
||||
@@ -458,7 +477,7 @@ void func_80BA0374(EnZob* this, PlayState* play) {
|
||||
case 0:
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Message_ContinueTextbox(play, 0x1207);
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -481,7 +500,7 @@ void func_80BA0374(EnZob* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BA0728;
|
||||
this->unk_304 = 0;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
this->unk_2F4 &= ~1;
|
||||
break;
|
||||
|
||||
@@ -495,13 +514,13 @@ void func_80BA0374(EnZob* this, PlayState* play) {
|
||||
|
||||
case 0x11FD:
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 4, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_4, ANIMMODE_ONCE);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x11FE:
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 3, ANIMMODE_LOOP);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_3, ANIMMODE_LOOP);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
@@ -516,7 +535,7 @@ void func_80BA0374(EnZob* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BA0728;
|
||||
this->unk_304 = 0;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
this->unk_2F4 &= ~1;
|
||||
this->unk_2F4 |= 2;
|
||||
break;
|
||||
@@ -539,7 +558,7 @@ void func_80BA0610(EnZob* this, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
|
||||
Message_StartTextbox(play, 0x120D, &this->actor);
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
func_80B9FC70(this, 0);
|
||||
this->actionFunc = func_80BA00BC;
|
||||
} else {
|
||||
@@ -571,7 +590,7 @@ void func_80BA0728(EnZob* this, PlayState* play) {
|
||||
}
|
||||
this->actionFunc = func_80BA00BC;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
this->csIdIndex = 0;
|
||||
this->unk_2F4 |= 1;
|
||||
} else if (Actor_TalkOfferAccepted(&this->actor, &play->state)) {
|
||||
@@ -598,21 +617,21 @@ void func_80BA08E8(EnZob* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_01)) {
|
||||
textId = 0x1257;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 4, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_4, ANIMMODE_ONCE);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_78_40)) {
|
||||
textId = 0x1256;
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
} else {
|
||||
textId = 0x1255;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_78_40);
|
||||
this->unk_304 = 1;
|
||||
func_80B9F7E4(this, 2, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_2, ANIMMODE_ONCE);
|
||||
}
|
||||
} else {
|
||||
textId = 0x1254;
|
||||
this->unk_304 = 3;
|
||||
func_80B9F7E4(this, 5, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_5, ANIMMODE_ONCE);
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, textId, &this->actor);
|
||||
@@ -633,14 +652,14 @@ void func_80BA0A04(EnZob* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BA0AD8;
|
||||
this->unk_304 = 0;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
}
|
||||
break;
|
||||
|
||||
case TEXT_STATE_CLOSING:
|
||||
this->actionFunc = func_80BA0AD8;
|
||||
this->unk_304 = 0;
|
||||
func_80B9F7E4(this, 6, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_6, ANIMMODE_ONCE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -666,7 +685,7 @@ void func_80BA0BB4(EnZob* this, PlayState* play) {
|
||||
func_80B9F86C(this);
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_01)) {
|
||||
this->actionFunc = func_80BA09E0;
|
||||
func_80B9F7E4(this, 0, ANIMMODE_ONCE);
|
||||
EnZob_ChangeAnim(this, ENZOB_ANIM_0, ANIMMODE_ONCE);
|
||||
this->unk_304 = 5;
|
||||
}
|
||||
}
|
||||
@@ -739,7 +758,7 @@ void EnZob_Update(Actor* thisx, PlayState* play) {
|
||||
s32 EnZob_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnZob* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == OBJECT_ZOB_LIMB_09) {
|
||||
rot->x += this->headRot.y;
|
||||
rot->y += this->headRot.x;
|
||||
}
|
||||
@@ -747,9 +766,10 @@ s32 EnZob_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
}
|
||||
|
||||
void EnZob_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80BA1120 = { 300.0f, 900.0f, 0.0f };
|
||||
EnZob* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == OBJECT_ZOB_LIMB_09) {
|
||||
Matrix_MultVec3f(&D_80BA1120, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_ZOB_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_zob/object_zob.h"
|
||||
|
||||
struct EnZob;
|
||||
|
||||
@@ -17,13 +18,13 @@ typedef enum {
|
||||
typedef struct EnZob {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[24];
|
||||
/* 0x218 */ Vec3s morphTable[24];
|
||||
/* 0x188 */ Vec3s jointTable[OBJECT_ZOB_LIMB_MAX];
|
||||
/* 0x218 */ Vec3s morphTable[OBJECT_ZOB_LIMB_MAX];
|
||||
/* 0x2A8 */ ColliderCylinder collider;
|
||||
/* 0x2F4 */ u16 unk_2F4;
|
||||
/* 0x2F6 */ Vec3s headRot;
|
||||
/* 0x2FC */ Vec3s torsoRot;
|
||||
/* 0x302 */ s16 unk_302;
|
||||
/* 0x302 */ s16 animIndex;
|
||||
/* 0x304 */ u16 unk_304;
|
||||
/* 0x306 */ s16 csIdList[4];
|
||||
/* 0x30E */ s16 csIdIndex;
|
||||
|
||||
@@ -15,7 +15,7 @@ void EnZod_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnZod_Update(Actor* thisx, PlayState* play);
|
||||
void EnZod_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 mode);
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 animMode);
|
||||
void EnZod_PlayDrumsSequence(EnZod* this, PlayState* play);
|
||||
void func_80BAFB84(EnZod* this, PlayState* play);
|
||||
void func_80BAFDB4(EnZod* this, PlayState* play);
|
||||
@@ -24,15 +24,6 @@ void func_80BAFF14(EnZod* this, PlayState* play);
|
||||
#define TIJO_STATE_1 (1 << 0)
|
||||
#define TIJO_STATE_2 (1 << 1)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ENZOD_ANIM_PLAYING_VIVACE,
|
||||
/* 1 */ ENZOD_ANIM_READY_TO_PLAY,
|
||||
/* 2 */ ENZOD_ANIM_ARMS_FOLDED,
|
||||
/* 3 */ ENZOD_ANIM_PLAYING_LENTO,
|
||||
/* 4 */ ENZOD_ANIM_PLAYING_ANDANTINO,
|
||||
/* 5 */ ENZOD_ANIM_MAX
|
||||
} EnZodAnimation;
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ ENZOD_INSTRUMENT_CYMBAL_1 = 1,
|
||||
/* 2 */ ENZOD_INSTRUMENT_CYMBAL_2,
|
||||
@@ -77,12 +68,23 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 60, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&gTijoPlayingVivaceAnim, &gTijoReadyToPlayAnim, &gTijoArmsFoldedAnim,
|
||||
&gTijoPlayingLentoAnim, &gTijoPlayingAndantinoAnim,
|
||||
};
|
||||
typedef enum EnZodAnimation {
|
||||
/* -1 */ ENZOD_ANIM_NONE = -1,
|
||||
/* 0 */ ENZOD_ANIM_PLAYING_VIVACE,
|
||||
/* 1 */ ENZOD_ANIM_READY_TO_PLAY,
|
||||
/* 2 */ ENZOD_ANIM_ARMS_FOLDED,
|
||||
/* 3 */ ENZOD_ANIM_PLAYING_LENTO,
|
||||
/* 4 */ ENZOD_ANIM_PLAYING_ANDANTINO,
|
||||
/* 5 */ ENZOD_ANIM_MAX
|
||||
} EnZodAnimation;
|
||||
|
||||
static Vec3f D_80BB0580 = { 1300.0f, 1100.0f, 0.0f };
|
||||
static AnimationHeader* sAnimations[ENZOD_ANIM_MAX] = {
|
||||
&gTijoPlayingVivaceAnim, // ENZOD_ANIM_PLAYING_VIVACE
|
||||
&gTijoReadyToPlayAnim, // ENZOD_ANIM_READY_TO_PLAY
|
||||
&gTijoArmsFoldedAnim, // ENZOD_ANIM_ARMS_FOLDED
|
||||
&gTijoPlayingLentoAnim, // ENZOD_ANIM_PLAYING_LENTO
|
||||
&gTijoPlayingAndantinoAnim, // ENZOD_ANIM_PLAYING_ANDANTINO
|
||||
};
|
||||
|
||||
void EnZod_Init(Actor* thisx, PlayState* play) {
|
||||
s32 i;
|
||||
@@ -100,8 +102,8 @@ void EnZod_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.gravity = this->actor.terminalVelocity = -4.0f;
|
||||
this->cymbalRotVels[0] = this->cymbalRotVels[1] = this->cymbalRotVels[2] = 300;
|
||||
this->stateFlags = 0;
|
||||
this->nextAnimIndex = -1;
|
||||
this->curAnimIndex = -1;
|
||||
this->nextAnimIndex = ENZOD_ANIM_NONE;
|
||||
this->curAnimIndex = ENZOD_ANIM_NONE;
|
||||
this->actor.textId = 0;
|
||||
this->unk_298 = 0;
|
||||
|
||||
@@ -186,12 +188,12 @@ s32 EnZod_PlayerIsFacingTijo(EnZod* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 mode) {
|
||||
if ((nextAnimIndex < ENZOD_ANIM_PLAYING_VIVACE) || (nextAnimIndex >= ENZOD_ANIM_MAX)) {
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 animMode) {
|
||||
if ((nextAnimIndex <= ENZOD_ANIM_NONE) || (nextAnimIndex >= ENZOD_ANIM_MAX)) {
|
||||
nextAnimIndex = ENZOD_ANIM_PLAYING_LENTO;
|
||||
}
|
||||
Animation_Change(&this->skelAnime, sAnimations[nextAnimIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[nextAnimIndex]), mode, -5.0f);
|
||||
Animation_GetLastFrame(sAnimations[nextAnimIndex]), animMode, -5.0f);
|
||||
this->curAnimIndex = nextAnimIndex;
|
||||
this->nextAnimIndex = nextAnimIndex;
|
||||
}
|
||||
@@ -276,7 +278,7 @@ void EnZod_UpdateInstruments(EnZod* this) {
|
||||
|
||||
case 3:
|
||||
switch (this->curAnimIndex) {
|
||||
case 3:
|
||||
case ENZOD_ANIM_PLAYING_LENTO:
|
||||
switch ((s32)this->skelAnime.curFrame) {
|
||||
case 1:
|
||||
case 7:
|
||||
@@ -287,11 +289,14 @@ void EnZod_UpdateInstruments(EnZod* this) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case ENZOD_ANIM_PLAYING_ANDANTINO:
|
||||
if ((s32)this->skelAnime.curFrame == 1) {
|
||||
this->drumScaleVels[i] = 0.1f;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -571,6 +576,7 @@ s32 EnZod_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
}
|
||||
|
||||
void EnZod_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80BB0580 = { 1300.0f, 1100.0f, 0.0f };
|
||||
if (limbIndex == TIJO_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80BB0580, &thisx->focus.pos);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_zog.h"
|
||||
#include "assets/objects/object_zog/object_zog.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
@@ -69,39 +68,76 @@ static TexturePtr D_80B958AC[] = { object_zog_Tex_024750, object_zog_Tex_024F50,
|
||||
|
||||
static TexturePtr D_80B958B8[] = { object_zog_Tex_025F50, object_zog_Tex_026750 };
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&object_zog_Anim_00FC0C, &object_zog_Anim_0106B0, &object_zog_Anim_0166F4, &object_zog_Anim_017170,
|
||||
&object_zog_Anim_014B10, &object_zog_Anim_018600, &object_zog_Anim_01A06C, &object_zog_Anim_00CA94,
|
||||
&object_zog_Anim_00F110, &object_zog_Anim_01579C, &object_zog_Anim_015B80, &object_zog_Anim_00ECBC,
|
||||
&object_zog_Anim_008EB8, &object_zog_Anim_0099A4, &object_zog_Anim_00931C, &object_zog_Anim_009EC4,
|
||||
&object_zog_Anim_00B01C, &object_zog_Anim_00BF38, &object_zog_Anim_01A990, &object_zog_Anim_01AD58,
|
||||
&object_zog_Anim_01B72C, &object_zog_Anim_01BC88, &object_zog_Anim_001000, &object_zog_Anim_001970,
|
||||
&object_zog_Anim_002344, &object_zog_Anim_002894, &object_zog_Anim_0030E0, &object_zog_Anim_0037F8,
|
||||
&object_zog_Anim_0041D0, &object_zog_Anim_004BDC, &object_zog_Anim_0055B4,
|
||||
typedef enum EnZogAnimation {
|
||||
/* -1 */ ENZOG_ANIM_NONE = -1,
|
||||
/* 0 */ ENZOG_ANIM_0,
|
||||
/* 1 */ ENZOG_ANIM_1,
|
||||
/* 2 */ ENZOG_ANIM_2,
|
||||
/* 3 */ ENZOG_ANIM_3,
|
||||
/* 4 */ ENZOG_ANIM_4,
|
||||
/* 5 */ ENZOG_ANIM_5,
|
||||
/* 6 */ ENZOG_ANIM_6,
|
||||
/* 7 */ ENZOG_ANIM_7,
|
||||
/* 8 */ ENZOG_ANIM_8,
|
||||
/* 9 */ ENZOG_ANIM_9,
|
||||
/* 10 */ ENZOG_ANIM_10,
|
||||
/* 11 */ ENZOG_ANIM_11,
|
||||
/* 12 */ ENZOG_ANIM_12,
|
||||
/* 13 */ ENZOG_ANIM_13,
|
||||
/* 14 */ ENZOG_ANIM_14,
|
||||
/* 15 */ ENZOG_ANIM_15,
|
||||
/* 16 */ ENZOG_ANIM_16,
|
||||
/* 17 */ ENZOG_ANIM_17,
|
||||
/* 18 */ ENZOG_ANIM_18,
|
||||
/* 19 */ ENZOG_ANIM_19,
|
||||
/* 20 */ ENZOG_ANIM_20,
|
||||
/* 21 */ ENZOG_ANIM_21,
|
||||
/* 22 */ ENZOG_ANIM_22,
|
||||
/* 23 */ ENZOG_ANIM_23,
|
||||
/* 24 */ ENZOG_ANIM_24,
|
||||
/* 25 */ ENZOG_ANIM_25,
|
||||
/* 26 */ ENZOG_ANIM_26,
|
||||
/* 27 */ ENZOG_ANIM_27,
|
||||
/* 28 */ ENZOG_ANIM_28,
|
||||
/* 29 */ ENZOG_ANIM_29,
|
||||
/* 30 */ ENZOG_ANIM_30,
|
||||
/* 31 */ ENZOG_ANIM_MAX
|
||||
} EnZogAnimation;
|
||||
|
||||
static AnimationHeader* sAnimations[ENZOG_ANIM_MAX] = {
|
||||
&object_zog_Anim_00FC0C, // ENZOG_ANIM_0
|
||||
&object_zog_Anim_0106B0, // ENZOG_ANIM_1
|
||||
&object_zog_Anim_0166F4, // ENZOG_ANIM_2
|
||||
&object_zog_Anim_017170, // ENZOG_ANIM_3
|
||||
&object_zog_Anim_014B10, // ENZOG_ANIM_4
|
||||
&object_zog_Anim_018600, // ENZOG_ANIM_5
|
||||
&object_zog_Anim_01A06C, // ENZOG_ANIM_6
|
||||
&object_zog_Anim_00CA94, // ENZOG_ANIM_7
|
||||
&object_zog_Anim_00F110, // ENZOG_ANIM_8
|
||||
&object_zog_Anim_01579C, // ENZOG_ANIM_9
|
||||
&object_zog_Anim_015B80, // ENZOG_ANIM_10
|
||||
&object_zog_Anim_00ECBC, // ENZOG_ANIM_11
|
||||
&object_zog_Anim_008EB8, // ENZOG_ANIM_12
|
||||
&object_zog_Anim_0099A4, // ENZOG_ANIM_13
|
||||
&object_zog_Anim_00931C, // ENZOG_ANIM_14
|
||||
&object_zog_Anim_009EC4, // ENZOG_ANIM_15
|
||||
&object_zog_Anim_00B01C, // ENZOG_ANIM_16
|
||||
&object_zog_Anim_00BF38, // ENZOG_ANIM_17
|
||||
&object_zog_Anim_01A990, // ENZOG_ANIM_18
|
||||
&object_zog_Anim_01AD58, // ENZOG_ANIM_19
|
||||
&object_zog_Anim_01B72C, // ENZOG_ANIM_20
|
||||
&object_zog_Anim_01BC88, // ENZOG_ANIM_21
|
||||
&object_zog_Anim_001000, // ENZOG_ANIM_22
|
||||
&object_zog_Anim_001970, // ENZOG_ANIM_23
|
||||
&object_zog_Anim_002344, // ENZOG_ANIM_24
|
||||
&object_zog_Anim_002894, // ENZOG_ANIM_25
|
||||
&object_zog_Anim_0030E0, // ENZOG_ANIM_26
|
||||
&object_zog_Anim_0037F8, // ENZOG_ANIM_27
|
||||
&object_zog_Anim_0041D0, // ENZOG_ANIM_28
|
||||
&object_zog_Anim_004BDC, // ENZOG_ANIM_29
|
||||
&object_zog_Anim_0055B4, // ENZOG_ANIM_30
|
||||
};
|
||||
|
||||
static s16 D_80B9593C[] = { 0, 1, 2, 3 };
|
||||
|
||||
static s16 D_80B95944[] = { 4, 5 };
|
||||
|
||||
static s16 D_80B95948[] = { 5, 6, 7, 0 };
|
||||
|
||||
static s16 D_80B95950[] = { 7, 8, 9, 10, 7, 11, 12, 13, 14, 15, 12, 13, 14, 15, 12, 16, 17, 0 };
|
||||
|
||||
static s16* D_80B95974[] = { D_80B9593C, D_80B95944, D_80B95948, D_80B95950 };
|
||||
|
||||
static s16 D_80B95984[] = { 4, 2, 3, 17 };
|
||||
|
||||
static Vec3f D_80B9598C = { 0.0f, -0.05f, 0.0f };
|
||||
|
||||
static Vec3f D_80B95998 = { 0.0f, -0.025f, 0.0f };
|
||||
|
||||
static Color_RGBA8 D_80B959A4 = { 220, 220, 255, 255 };
|
||||
|
||||
static Color_RGBA8 D_80B959A8 = { 80, 80, 220, 255 };
|
||||
|
||||
static Vec3f D_80B959AC = { 0.0f, 0.0f, 15.0f };
|
||||
|
||||
void func_80B93310(Actor* thisx, Lights* mapper, PlayState* play) {
|
||||
Vec3f sp34;
|
||||
EnZog* this = THIS;
|
||||
@@ -175,7 +211,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc = func_80B95128;
|
||||
this->actor.textId = 0x1004;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_zog_Skel_029170, &object_zog_Anim_00FC0C, this->jointTable,
|
||||
this->morphTable, 23);
|
||||
this->morphTable, OBJECT_ZOG_LIMB_MAX);
|
||||
Animation_PlayOnce(&this->skelAnime, &object_zog_Anim_00FC0C);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
@@ -217,7 +253,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_2FC = 0;
|
||||
this->unk_302 = 0;
|
||||
this->unk_2EC++;
|
||||
this->unk_304 = 0;
|
||||
this->animIndex = ENZOG_ANIM_0;
|
||||
this->unk_2FE = this->unk_2FC;
|
||||
this->unk_300 = this->unk_302;
|
||||
csId = this->actor.csId;
|
||||
@@ -247,7 +283,7 @@ void EnZog_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 0;
|
||||
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[7]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_7]);
|
||||
this->actor.textId = 0x1009;
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_91_02)) {
|
||||
this->actor.textId = 0x103C;
|
||||
@@ -270,13 +306,23 @@ void EnZog_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void func_80B939C0(EnZog* this, s16 arg1, u8 arg2) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, Animation_GetLastFrame(sAnimations[arg1]), arg2,
|
||||
-5.0f);
|
||||
this->unk_304 = arg1;
|
||||
void EnZog_ChangeAnim(EnZog* this, s16 animIndex, u8 animMode) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, -5.0f);
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
|
||||
void func_80B93A48(EnZog* this, PlayState* play) {
|
||||
static s16 D_80B9593C[] = { ENZOG_ANIM_0, ENZOG_ANIM_1, ENZOG_ANIM_2, ENZOG_ANIM_3 };
|
||||
static s16 D_80B95944[] = { ENZOG_ANIM_4, ENZOG_ANIM_5 };
|
||||
static s16 D_80B95948[] = { ENZOG_ANIM_5, ENZOG_ANIM_6, ENZOG_ANIM_7 };
|
||||
static s16 D_80B95950[] = { ENZOG_ANIM_7, ENZOG_ANIM_8, ENZOG_ANIM_9, ENZOG_ANIM_10, ENZOG_ANIM_7,
|
||||
ENZOG_ANIM_11, ENZOG_ANIM_12, ENZOG_ANIM_13, ENZOG_ANIM_14, ENZOG_ANIM_15,
|
||||
ENZOG_ANIM_12, ENZOG_ANIM_13, ENZOG_ANIM_14, ENZOG_ANIM_15, ENZOG_ANIM_12,
|
||||
ENZOG_ANIM_16, ENZOG_ANIM_17 };
|
||||
static s16* D_80B95974[] = { D_80B9593C, D_80B95944, D_80B95948, D_80B95950 };
|
||||
static s16 D_80B95984[] = { ARRAY_COUNT(D_80B9593C), ARRAY_COUNT(D_80B95944), ARRAY_COUNT(D_80B95948),
|
||||
ARRAY_COUNT(D_80B95950) };
|
||||
s16* table;
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
@@ -298,8 +344,8 @@ void func_80B93A48(EnZog* this, PlayState* play) {
|
||||
|
||||
table = D_80B95974[this->unk_2FC];
|
||||
|
||||
this->unk_304 = table[this->unk_302];
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[this->unk_304]);
|
||||
this->animIndex = table[this->unk_302];
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[this->animIndex]);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
}
|
||||
@@ -367,6 +413,10 @@ void func_80B93D2C(EnZog* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B93DE8(Vec3f* arg0, PlayState* play, s32 arg2) {
|
||||
static Vec3f D_80B9598C = { 0.0f, -0.05f, 0.0f };
|
||||
static Vec3f D_80B95998 = { 0.0f, -0.025f, 0.0f };
|
||||
static Color_RGBA8 D_80B959A4 = { 220, 220, 255, 255 };
|
||||
static Color_RGBA8 D_80B959A8 = { 80, 80, 220, 255 };
|
||||
Vec3f sp2C;
|
||||
|
||||
sp2C.x = Rand_CenteredFloat(30.0f) + arg0->x;
|
||||
@@ -382,52 +432,56 @@ s32 func_80B93EA0(EnZog* this, PlayState* play) {
|
||||
switch (this->cueId) {
|
||||
case 2:
|
||||
case 3:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[12]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_12]);
|
||||
this->unk_31C = 0;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[14]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_14]);
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
switch (this->unk_304) {
|
||||
case 16:
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[17]);
|
||||
this->unk_304 = 17;
|
||||
switch (this->animIndex) {
|
||||
case ENZOG_ANIM_16:
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[ENZOG_ANIM_17]);
|
||||
this->animIndex = ENZOG_ANIM_17;
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 0;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
Animation_Change(&this->skelAnime, sAnimations[7], 0.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f);
|
||||
case ENZOG_ANIM_17:
|
||||
Animation_Change(&this->skelAnime, sAnimations[ENZOG_ANIM_7], 0.0f, 0.0f, 0.0f, ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[9]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_9]);
|
||||
this->unk_31C = 1;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[28]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_28]);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[30]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_30]);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[26]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_26]);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[23]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_23]);
|
||||
break;
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
@@ -477,37 +531,37 @@ s32 func_80B93EA0(EnZog* this, PlayState* play) {
|
||||
|
||||
switch (this->cueId) {
|
||||
case 1:
|
||||
func_80B939C0(this, 7, ANIMMODE_LOOP);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_7, ANIMMODE_LOOP);
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
func_80B939C0(this, 11, ANIMMODE_ONCE);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_11, ANIMMODE_ONCE);
|
||||
this->unk_31C = 1;
|
||||
this->unk_31E = 0;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
func_80B939C0(this, 15, ANIMMODE_ONCE);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_15, ANIMMODE_ONCE);
|
||||
this->unk_31C = 0;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
func_80B939C0(this, 13, ANIMMODE_ONCE);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_13, ANIMMODE_ONCE);
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
func_80B939C0(this, 16, ANIMMODE_ONCE);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_16, ANIMMODE_ONCE);
|
||||
this->unk_31C = 2;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
func_80B939C0(this, 8, ANIMMODE_ONCE);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_8, ANIMMODE_ONCE);
|
||||
this->unk_31C = 1;
|
||||
this->unk_31E = 0;
|
||||
break;
|
||||
@@ -520,38 +574,41 @@ s32 func_80B93EA0(EnZog* this, PlayState* play) {
|
||||
case 9:
|
||||
this->unk_322 = 0;
|
||||
this->unk_30A |= 8;
|
||||
func_80B939C0(this, 18, ANIMMODE_LOOP);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_18, ANIMMODE_LOOP);
|
||||
this->unk_31C = 0;
|
||||
this->unk_31E = 0;
|
||||
this->unk_30A &= ~2;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
func_80B939C0(this, 14, ANIMMODE_LOOP);
|
||||
EnZog_ChangeAnim(this, ENZOG_ANIM_14, ANIMMODE_LOOP);
|
||||
this->unk_31C = 0;
|
||||
this->unk_30A |= 2;
|
||||
this->unk_31E = 1;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[24]);
|
||||
Animation_PlayLoop(&this->skelAnime, sAnimations[ENZOG_ANIM_24]);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[27]);
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[ENZOG_ANIM_27]);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[29]);
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[ENZOG_ANIM_29]);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
this->unk_30A |= 2;
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[25]);
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[ENZOG_ANIM_25]);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[22]);
|
||||
Animation_PlayOnce(&this->skelAnime, sAnimations[ENZOG_ANIM_22]);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -622,7 +679,7 @@ void func_80B9461C(EnZog* this, PlayState* play) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_91_02);
|
||||
}
|
||||
|
||||
if ((this->unk_304 == 11) && ((s32)this->skelAnime.curFrame >= 55)) {
|
||||
if ((this->animIndex == ENZOG_ANIM_11) && ((s32)this->skelAnime.curFrame >= 55)) {
|
||||
this->unk_30A |= 2;
|
||||
}
|
||||
}
|
||||
@@ -752,12 +809,12 @@ void func_80B94A00(EnZog* this, PlayState* play) {
|
||||
|
||||
func_80B93A48(this, play);
|
||||
|
||||
if ((this->unk_304 == 4) &&
|
||||
if ((this->animIndex == ENZOG_ANIM_4) &&
|
||||
(Animation_OnFrame(&this->skelAnime, 136.0f) || Animation_OnFrame(&this->skelAnime, 155.0f))) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WATER_SHALLOW);
|
||||
}
|
||||
|
||||
if ((this->unk_304 == 5) &&
|
||||
if ((this->animIndex == ENZOG_ANIM_5) &&
|
||||
(Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 37.0f))) {
|
||||
if (this->actor.depthInWater > 0.0f) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WATER_SHALLOW);
|
||||
@@ -769,7 +826,7 @@ void func_80B94A00(EnZog* this, PlayState* play) {
|
||||
|
||||
void func_80B94C5C(EnZog* this, PlayState* play) {
|
||||
this->actor.speed = 0.0f;
|
||||
if (this->unk_304 != 0) {
|
||||
if (this->animIndex != ENZOG_ANIM_0) {
|
||||
if (this->actor.shape.yOffset > 0.0f) {
|
||||
this->actor.shape.yOffset -= 20.0f;
|
||||
}
|
||||
@@ -782,7 +839,7 @@ void func_80B94C5C(EnZog* this, PlayState* play) {
|
||||
this->unk_300 = 2;
|
||||
}
|
||||
|
||||
if (this->unk_304 == 5) {
|
||||
if (this->animIndex == ENZOG_ANIM_5) {
|
||||
this->actionFunc = func_80B94A00;
|
||||
}
|
||||
|
||||
@@ -825,6 +882,7 @@ void func_80B94D0C(EnZog* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B94E34(EnZog* this, PlayState* play) {
|
||||
static Vec3f D_80B959AC = { 0.0f, 0.0f, 15.0f };
|
||||
s32 pad;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
@@ -937,8 +995,8 @@ void EnZog_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (((this->unk_304 == 6) && Animation_OnFrame(&this->skelAnime, 43.0f)) ||
|
||||
((this->unk_304 == 17) && Animation_OnFrame(&this->skelAnime, 14.0f))) {
|
||||
if (((this->animIndex == ENZOG_ANIM_6) && Animation_OnFrame(&this->skelAnime, 43.0f)) ||
|
||||
((this->animIndex == ENZOG_ANIM_17) && Animation_OnFrame(&this->skelAnime, 14.0f))) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_LAND_SAND);
|
||||
}
|
||||
|
||||
@@ -976,16 +1034,16 @@ void EnZog_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r
|
||||
EnZog* this = THIS;
|
||||
|
||||
D_80B959B8.y = 1000.0f;
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == OBJECT_ZOG_LIMB_09) {
|
||||
Matrix_MultVec3f(&D_80B959B8, &this->actor.focus.pos);
|
||||
}
|
||||
D_80B959B8.y = 0.0f;
|
||||
|
||||
if (limbIndex == 1) {
|
||||
if (limbIndex == OBJECT_ZOG_LIMB_01) {
|
||||
Matrix_MultVec3f(&D_80B959B8, &this->unk_2F0);
|
||||
}
|
||||
|
||||
if ((this->unk_30A & 2) && (limbIndex == 17)) {
|
||||
if ((this->unk_30A & 2) && (limbIndex == OBJECT_ZOG_LIMB_11)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_zog_DL_0280A8);
|
||||
@@ -999,16 +1057,16 @@ void EnZog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
EnZog* this = THIS;
|
||||
|
||||
D_80B959C4.y = 1000.0f;
|
||||
if (limbIndex == 9) {
|
||||
if (limbIndex == OBJECT_ZOG_LIMB_09) {
|
||||
Matrix_MultVec3f(&D_80B959C4, &this->actor.focus.pos);
|
||||
}
|
||||
D_80B959C4.y = 0.0f;
|
||||
|
||||
if (limbIndex == 1) {
|
||||
if (limbIndex == OBJECT_ZOG_LIMB_01) {
|
||||
Matrix_MultVec3f(&D_80B959C4, &this->unk_2F0);
|
||||
}
|
||||
|
||||
if ((this->unk_30A & 2) && (limbIndex == 17)) {
|
||||
if ((this->unk_30A & 2) && (limbIndex == OBJECT_ZOG_LIMB_11)) {
|
||||
gSPDisplayList((*gfx)++, object_zog_DL_0280A8);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_ZOG_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_zog/object_zog.h"
|
||||
|
||||
struct EnZog;
|
||||
|
||||
@@ -17,8 +18,8 @@ typedef struct EnZog {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collider;
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ Vec3s jointTable[23];
|
||||
/* 0x25E */ Vec3s morphTable[23];
|
||||
/* 0x1D4 */ Vec3s jointTable[OBJECT_ZOG_LIMB_MAX];
|
||||
/* 0x25E */ Vec3s morphTable[OBJECT_ZOG_LIMB_MAX];
|
||||
/* 0x2E8 */ Path* path;
|
||||
/* 0x2EC */ s32 unk_2EC;
|
||||
/* 0x2F0 */ Vec3f unk_2F0;
|
||||
@@ -26,7 +27,7 @@ typedef struct EnZog {
|
||||
/* 0x2FE */ s16 unk_2FE;
|
||||
/* 0x300 */ s16 unk_300;
|
||||
/* 0x302 */ s16 unk_302;
|
||||
/* 0x304 */ s16 unk_304;
|
||||
/* 0x304 */ s16 animIndex;
|
||||
/* 0x306 */ s16 cueId;
|
||||
/* 0x308 */ s16 unk_308;
|
||||
/* 0x30A */ u16 unk_30A;
|
||||
|
||||
@@ -788,7 +788,7 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
switch (this->unk_1EC) {
|
||||
case 1:
|
||||
switch (limbIndex) {
|
||||
case 2:
|
||||
case ZORA_BABY_LIMB_TAIL1:
|
||||
temp_f20 = this->unk_1EE * 0.01f;
|
||||
Matrix_Push();
|
||||
Matrix_Scale(temp_f20, temp_f20, temp_f20, MTXMODE_APPLY);
|
||||
@@ -801,12 +801,12 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case ZORA_BABY_LIMB_TAIL_FIN:
|
||||
Matrix_Pop();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
case ZORA_BABY_LIMB_RIGHT_PECTORAL_FIN:
|
||||
case ZORA_BABY_LIMB_LEFT_PECTORAL_FIN:
|
||||
temp_f20 = this->unk_1EF * 0.01f;
|
||||
func_80B333DC(play, dList, temp_f20);
|
||||
break;
|
||||
@@ -815,7 +815,7 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
|
||||
case 2:
|
||||
switch (limbIndex) {
|
||||
case 2:
|
||||
case ZORA_BABY_LIMB_TAIL1:
|
||||
temp_f20 = (this->unk_1EE * 0.005f) + 0.5f;
|
||||
Matrix_Push();
|
||||
Matrix_Scale(1.0f, temp_f20, temp_f20, MTXMODE_APPLY);
|
||||
@@ -828,7 +828,7 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case ZORA_BABY_LIMB_TAIL_FIN:
|
||||
temp_f2 = 1.0f / ((this->unk_1EE * 0.005f) + 0.5f);
|
||||
temp_f20 = (this->unk_1EE * 0.0035f) + 0.65f;
|
||||
Matrix_Scale(1.0f, temp_f20 * temp_f2, temp_f2, MTXMODE_APPLY);
|
||||
@@ -843,8 +843,8 @@ void EnZoraegg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
Matrix_Pop();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
case ZORA_BABY_LIMB_RIGHT_PECTORAL_FIN:
|
||||
case ZORA_BABY_LIMB_LEFT_PECTORAL_FIN:
|
||||
temp_f20 = this->unk_1EE * 0.01f;
|
||||
func_80B333DC(play, dList, temp_f20);
|
||||
break;
|
||||
|
||||
@@ -34,7 +34,8 @@ void func_80BBC24C(EnZos* this, PlayState* play);
|
||||
void func_80BBC298(EnZos* this, PlayState* play);
|
||||
void func_80BBC37C(EnZos* this, PlayState* play);
|
||||
|
||||
typedef enum {
|
||||
typedef enum EnZosAnimation {
|
||||
/* -1 */ EN_ZOS_ANIM_NONE = -1,
|
||||
/* 0 */ EN_ZOS_ANIM_LEAN_ON_KEYBOARD,
|
||||
/* 1 */ EN_ZOS_ANIM_LEAN_ON_KEYBOARD_AND_SIGH,
|
||||
/* 2 */ EN_ZOS_ANIM_HANDS_ON_HIPS,
|
||||
@@ -135,7 +136,7 @@ void EnZos_Destroy(Actor* thisx, PlayState* play) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_52_10);
|
||||
}
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
static AnimationHeader* sAnimations[EN_ZOS_ANIM_MAX] = {
|
||||
&gEvanLeanOnKeyboardAnim, // EN_ZOS_ANIM_LEAN_ON_KEYBOARD
|
||||
&gEvanLeanOnKeyboardAndSighAnim, // EN_ZOS_ANIM_LEAN_ON_KEYBOARD_AND_SIGH
|
||||
&gEvanHandsOnHipsAnim, // EN_ZOS_ANIM_HANDS_ON_HIPS
|
||||
@@ -154,8 +155,7 @@ static AnimationHeader* sAnimations[] = {
|
||||
void EnZos_ChangeAnim(EnZos* this, s16 animIndex, u8 animMode) {
|
||||
f32 endFrame;
|
||||
|
||||
if ((animIndex != this->animIndex) && (animIndex >= EN_ZOS_ANIM_LEAN_ON_KEYBOARD) &&
|
||||
(animIndex < EN_ZOS_ANIM_MAX)) {
|
||||
if ((animIndex != this->animIndex) && (animIndex > EN_ZOS_ANIM_NONE) && (animIndex < EN_ZOS_ANIM_MAX)) {
|
||||
if (animIndex > EN_ZOS_ANIM_SLOW_PLAY) {
|
||||
endFrame = 29.0f;
|
||||
} else {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "z_en_zot.h"
|
||||
#include "z64snap.h"
|
||||
#include "attributes.h"
|
||||
#include "assets/objects/object_zo/object_zo.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10)
|
||||
|
||||
@@ -18,7 +17,7 @@ void EnZot_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnZot_Update(Actor* thisx, PlayState* play);
|
||||
void EnZot_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80B96BEC(EnZot* this, s16 arg1, u8 arg2);
|
||||
void EnZot_ChangeAnim(EnZot* this, s16 animIndex, u8 animMode);
|
||||
void func_80B97100(EnZot* this, PlayState* play);
|
||||
void func_80B97240(EnZot* this, PlayState* play);
|
||||
void func_80B97708(EnZot* this, PlayState* play);
|
||||
@@ -65,6 +64,34 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 30, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
typedef enum EnZotAnimation {
|
||||
/* -1 */ ENZOT_ANIM_NONE = -1,
|
||||
/* 0 */ ENZOT_ANIM_0,
|
||||
/* 1 */ ENZOT_ANIM_1,
|
||||
/* 2 */ ENZOT_ANIM_2,
|
||||
/* 3 */ ENZOT_ANIM_3,
|
||||
/* 4 */ ENZOT_ANIM_4,
|
||||
/* 5 */ ENZOT_ANIM_5,
|
||||
/* 6 */ ENZOT_ANIM_6,
|
||||
/* 7 */ ENZOT_ANIM_7,
|
||||
/* 8 */ ENZOT_ANIM_8,
|
||||
/* 9 */ ENZOT_ANIM_9,
|
||||
/* 10 */ ENZOT_ANIM_MAX,
|
||||
} EnZotAnimation;
|
||||
|
||||
static AnimationHeader* sAnimations[ENZOT_ANIM_MAX] = {
|
||||
&gZoraStandAnim, // ENZOT_ANIM_0
|
||||
&gZoraWalkAnim, // ENZOT_ANIM_1
|
||||
&gZoraSitAnim, // ENZOT_ANIM_2
|
||||
&gZoraRunAnim, // ENZOT_ANIM_3
|
||||
&gZoraFixSpeakerStartAnim, // ENZOT_ANIM_4
|
||||
&gZoraFixSpeakerLoopAnim, // ENZOT_ANIM_5
|
||||
&gZoraFixSpeakerEndAnim, // ENZOT_ANIM_6
|
||||
&gZoraBobHandAnim, // ENZOT_ANIM_7
|
||||
&gZoraListenAnim, // ENZOT_ANIM_8
|
||||
&gZoraListenAnim, // ENZOT_ANIM_9
|
||||
};
|
||||
|
||||
void func_80B965D0(EnZot* this, PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
@@ -88,9 +115,10 @@ void EnZot_Init(Actor* thisx, PlayState* play2) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = func_80B97100;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable, 20);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable,
|
||||
ZORA_LIMB_MAX);
|
||||
Animation_PlayLoop(&this->skelAnime, &gZoraStandAnim);
|
||||
this->unk_2F0 = 0;
|
||||
this->animIndex = ENZOT_ANIM_0;
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
this->unk_2F2 = 0;
|
||||
@@ -140,25 +168,25 @@ void EnZot_Init(Actor* thisx, PlayState* play2) {
|
||||
} else {
|
||||
this->path = NULL;
|
||||
}
|
||||
func_80B96BEC(this, 5, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_5, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
this->actionFunc = func_80B98998;
|
||||
func_80B96BEC(this, 2, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_2, ANIMMODE_LOOP);
|
||||
this->actor.colChkInfo.cylRadius = 0;
|
||||
this->actor.shape.yOffset = -1400.0f;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->actionFunc = func_80B98998;
|
||||
func_80B96BEC(this, 0, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
|
||||
this->actionFunc = func_80B98CA8;
|
||||
func_80B96BEC(this, 5, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_5, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
@@ -167,7 +195,7 @@ void EnZot_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
case 10:
|
||||
this->actionFunc = func_80B992C0;
|
||||
func_80B96BEC(this, 1, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_1, ANIMMODE_LOOP);
|
||||
if (ENZOT_GET_PATH_INDEX(&this->actor) != ENZOT_PATH_INDEX_NONE) {
|
||||
this->path = &play->setupPathList[ENZOT_GET_PATH_INDEX(&this->actor)];
|
||||
} else {
|
||||
@@ -183,7 +211,7 @@ void EnZot_Init(Actor* thisx, PlayState* play2) {
|
||||
case 16:
|
||||
case 17:
|
||||
this->actionFunc = func_80B98998;
|
||||
func_80B96BEC(this, 2, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_2, ANIMMODE_LOOP);
|
||||
this->actor.colChkInfo.cylRadius = 0;
|
||||
this->actor.shape.yOffset = -1400.0f;
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
@@ -199,15 +227,15 @@ void EnZot_Init(Actor* thisx, PlayState* play2) {
|
||||
break;
|
||||
|
||||
case 19:
|
||||
func_80B96BEC(this, 7, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_7, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
func_80B96BEC(this, 8, ANIMMODE_ONCE);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_8, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
func_80B96BEC(this, 9, ANIMMODE_ONCE);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_9, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 22:
|
||||
@@ -236,21 +264,17 @@ void EnZot_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B96BEC(EnZot* this, s16 arg1, u8 arg2) {
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&gZoraStandAnim, &gZoraWalkAnim, &gZoraSitAnim, &gZoraRunAnim,
|
||||
&gZoraFixSpeakerStartAnim, &gZoraFixSpeakerLoopAnim, &gZoraFixSpeakerEndAnim, &gZoraBobHandAnim,
|
||||
&gZoraListenAnim, &gZoraListenAnim,
|
||||
};
|
||||
void EnZot_ChangeAnim(EnZot* this, s16 animIndex, u8 animMode) {
|
||||
|
||||
if ((arg1 >= 0) && (arg1 < 10)) {
|
||||
if (arg1 >= 8) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], 0.0f, arg1 - 8, arg1 - 8, arg2, 0.0f);
|
||||
if ((animIndex > ENZOT_ANIM_NONE) && (animIndex < ENZOT_ANIM_MAX)) {
|
||||
if (animIndex >= ENZOT_ANIM_8) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 0.0f, animIndex - 8, animIndex - 8, animMode,
|
||||
0.0f);
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, Animation_GetLastFrame(sAnimations[arg1]),
|
||||
arg2, -5.0f);
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, -5.0f);
|
||||
}
|
||||
this->unk_2F0 = arg1;
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,7 +678,7 @@ void func_80B9787C(EnZot* this, PlayState* play) {
|
||||
void func_80B979DC(EnZot* this, PlayState* play) {
|
||||
if (func_80B96E5C(this)) {
|
||||
this->actionFunc = func_80B97B5C;
|
||||
func_80B96BEC(this, 0, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
this->actor.speed = 0.0f;
|
||||
} else {
|
||||
this->actor.speed = 1.5f;
|
||||
@@ -683,7 +707,7 @@ void func_80B97A44(EnZot* this, PlayState* play) {
|
||||
if (!(this->unk_2F2 & 2)) {
|
||||
this->unk_2F2 |= 2;
|
||||
this->actionFunc = func_80B979DC;
|
||||
func_80B96BEC(this, 1, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_1, ANIMMODE_LOOP);
|
||||
} else {
|
||||
this->actionFunc = func_80B97B5C;
|
||||
}
|
||||
@@ -741,7 +765,7 @@ void func_80B97D6C(EnZot* this, PlayState* play) {
|
||||
if (func_80B96E5C(this)) {
|
||||
this->actionFunc = func_80B97CC8;
|
||||
this->actor.speed = 0.0f;
|
||||
func_80B96BEC(this, 0, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
} else {
|
||||
this->actor.speed = 8.0f;
|
||||
}
|
||||
@@ -754,13 +778,13 @@ void func_80B97D6C(EnZot* this, PlayState* play) {
|
||||
void func_80B97E0C(EnZot* this, PlayState* play) {
|
||||
if (this->unk_2F2 & 0x40) {
|
||||
this->actionFunc = func_80B97D6C;
|
||||
func_80B96BEC(this, 3, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_3, ANIMMODE_LOOP);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B97E4C(EnZot* this, PlayState* play) {
|
||||
if (this->unk_2F2 & 0x40) {
|
||||
func_80B96BEC(this, 0, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
}
|
||||
|
||||
if (!(this->unk_2F2 & 4)) {
|
||||
@@ -775,7 +799,7 @@ void func_80B97E4C(EnZot* this, PlayState* play) {
|
||||
switch (play->msgCtx.currentTextId) {
|
||||
case 0x128C:
|
||||
this->unk_2F2 &= ~4;
|
||||
func_80B96BEC(this, 6, ANIMMODE_ONCE);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_6, ANIMMODE_ONCE);
|
||||
Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
@@ -789,7 +813,7 @@ void func_80B97E4C(EnZot* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80B97D6C;
|
||||
this->unk_2F2 |= 4;
|
||||
func_80B96BEC(this, 3, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_3, ANIMMODE_LOOP);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_38_08);
|
||||
break;
|
||||
|
||||
@@ -813,7 +837,7 @@ void func_80B97FD0(EnZot* this, PlayState* play) {
|
||||
if ((this->actor.xzDistToPlayer < 120.0f) && (GET_PLAYER_FORM == PLAYER_FORM_ZORA)) {
|
||||
this->unk_2F2 |= 4;
|
||||
this->actionFunc = func_80B97E0C;
|
||||
func_80B96BEC(this, 6, ANIMMODE_ONCE);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_6, ANIMMODE_ONCE);
|
||||
}
|
||||
} else if (Player_IsFacingActor(&this->actor, 0x3000, play) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
Actor_OfferTalk(&this->actor, play, 120.0f);
|
||||
@@ -828,8 +852,8 @@ void func_80B980FC(EnZot* this, PlayState* play) {
|
||||
this->actor.speed = 0.0f;
|
||||
} else {
|
||||
this->actor.speed = 8.0f;
|
||||
if (this->unk_2F0 != 3) {
|
||||
func_80B96BEC(this, 3, ANIMMODE_LOOP);
|
||||
if (this->animIndex != ENZOT_ANIM_3) {
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_3, ANIMMODE_LOOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1291,7 +1315,7 @@ void func_80B991E4(EnZot* this, PlayState* play) {
|
||||
} else {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80B992C0;
|
||||
func_80B96BEC(this, 1, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_1, ANIMMODE_LOOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1301,7 +1325,7 @@ void func_80B992C0(EnZot* this, PlayState* play) {
|
||||
this->actionFunc = func_80B991E4;
|
||||
func_80B99160(this, play);
|
||||
this->actor.speed = 0.0f;
|
||||
func_80B96BEC(this, 0, ANIMMODE_LOOP);
|
||||
EnZot_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
} else {
|
||||
if (Player_IsFacingActor(&this->actor, 0x3000, play) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
Actor_OfferTalk(&this->actor, play, 120.0f);
|
||||
@@ -1324,7 +1348,7 @@ void EnZot_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 15.0f, 30.0f, UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4);
|
||||
|
||||
this->unk_2F2 &= ~0x40;
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->unk_2F0 != 0)) {
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->animIndex != ENZOT_ANIM_0)) {
|
||||
this->unk_2F2 |= 0x40;
|
||||
}
|
||||
|
||||
@@ -1363,20 +1387,21 @@ s32 EnZot_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
EnZot* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
if (limbIndex == ZORA_LIMB_TORSO) {
|
||||
Matrix_RotateXS(this->torsoRot.y * -1, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->torsoRot.x * -1, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (((this->unk_2F0 == 8) || (this->unk_2F0 == 9)) &&
|
||||
((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13))) {
|
||||
if (((this->animIndex == ENZOT_ANIM_8) || (this->animIndex == ENZOT_ANIM_9)) &&
|
||||
((limbIndex == ZORA_LIMB_TORSO) || (limbIndex == ZORA_LIMB_LEFT_FOREARM) ||
|
||||
(limbIndex == ZORA_LIMB_RIGHT_FOREARM))) {
|
||||
rot->y += TRUNCF_BINANG(Math_SinS(play->state.frames * ((limbIndex * 50) + 0x814)) * 200.0f);
|
||||
rot->z += TRUNCF_BINANG(Math_CosS(play->state.frames * ((limbIndex * 50) + 0x940)) * 200.0f);
|
||||
}
|
||||
@@ -1387,7 +1412,7 @@ void EnZot_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
static Vec3f D_80B99934 = { 400.0f, 0.0f, 0.0f };
|
||||
EnZot* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80B99934, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_ZOT_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_zo/object_zo.h"
|
||||
|
||||
struct EnZot;
|
||||
|
||||
@@ -17,8 +18,8 @@ typedef struct EnZot {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ ColliderCylinder collider;
|
||||
/* 0x1D4 */ Vec3s jointTable[20];
|
||||
/* 0x24C */ Vec3s morphTable[20];
|
||||
/* 0x1D4 */ Vec3s jointTable[ZORA_LIMB_MAX];
|
||||
/* 0x24C */ Vec3s morphTable[ZORA_LIMB_MAX];
|
||||
/* 0x2C4 */ Vec3s headRot;
|
||||
/* 0x2CA */ Vec3s torsoRot;
|
||||
/* 0x2D0 */ Path* path;
|
||||
@@ -26,7 +27,7 @@ typedef struct EnZot {
|
||||
/* 0x2D8 */ Actor* unk_2D8[5];
|
||||
/* 0x2EC */ s16 unk_2EC;
|
||||
/* 0x2EE */ s16 unk_2EE;
|
||||
/* 0x2F0 */ s16 unk_2F0;
|
||||
/* 0x2F0 */ s16 animIndex;
|
||||
/* 0x2F2 */ u16 unk_2F2;
|
||||
/* 0x2F4 */ s16 unk_2F4;
|
||||
/* 0x2F8 */ EnZotActionFunc actionFunc;
|
||||
|
||||
@@ -16,7 +16,7 @@ void EnZov_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnZov_Update(Actor* thisx, PlayState* play);
|
||||
void EnZov_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80BD1570(EnZov* this, s16 index, u8 mode);
|
||||
void EnZov_ChangeAnimMorph(EnZov* this, s16 animIndex, u8 animMode);
|
||||
void func_80BD187C(EnZov* this, PlayState* play);
|
||||
void func_80BD19FC(EnZov* this, PlayState* play);
|
||||
void func_80BD1BF0(EnZov* this, PlayState* play);
|
||||
@@ -59,23 +59,40 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
{ 20, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&gLuluLookDownAnim, &gLuluPutHandsDownAnim, &gLuluLookForwardAndDownAnim, &gLuluLookAroundAnim,
|
||||
&gLuluAngleHeadAnim, &gLuluNodAnim, &gLuluPutHandsDownAnim, &gLuluLookAroundAnim,
|
||||
&gLuluSingStartAnim, &gLuluSingLoopAnim, &gLuluLookForwardAndLeftAnim, &gLuluLookLeftLoopAnim,
|
||||
&gLuluTurnAndWalkAnim, &gLuluWalkLoopAnim,
|
||||
};
|
||||
typedef enum LuluAnimation {
|
||||
/* -1 */ LULU_ANIM_NONE = -1,
|
||||
/* 0x0 */ LULU_ANIM_LOOK_DOWN,
|
||||
/* 0x1 */ LULU_ANIM_PUT_HANDS_DOWN,
|
||||
/* 0x2 */ LULU_ANIM_LOOK_FORWARD_AND_DOWN,
|
||||
/* 0x3 */ LULU_ANIM_LOOK_AROUND,
|
||||
/* 0x4 */ LULU_ANIM_ANGLE_HEAD,
|
||||
/* 0x5 */ LULU_ANIM_NOD,
|
||||
/* 0x6 */ LULU_ANIM_PUT_HANDS_DOWN_2,
|
||||
/* 0x7 */ LULU_ANIM_LOOK_AROUND_2,
|
||||
/* 0x8 */ LULU_ANIM_SING_START,
|
||||
/* 0x9 */ LULU_ANIM_SING_LOOP,
|
||||
/* 0xA */ LULU_ANIM_LOOK_FORWARDS_AND_LEFT,
|
||||
/* 0xB */ LULU_ANIM_LOOK_LEFT_LOOP,
|
||||
/* 0xC */ LULU_ANIM_TURN_AND_WALK,
|
||||
/* 0xD */ LULU_ANIM_WALK_LOOP,
|
||||
/* 0xE */ LULU_ANIM_MAX
|
||||
} LuluAnimation;
|
||||
|
||||
static Vec3f D_80BD2744 = { 400.0f, 600.0f, 0.0f };
|
||||
|
||||
static Vec3f D_80BD2750 = { 400.0f, 600.0f, 0.0f };
|
||||
|
||||
static TexturePtr sEyeTextures[] = { gLuluEyeOpenTex, gLuluEyeHalfTex, gLuluEyeClosedTex };
|
||||
|
||||
static TexturePtr sMouthTextures[] = { gLuluMouthClosedTex, gLuluMouthOpenTex };
|
||||
|
||||
static s8 D_80BD2770[] = {
|
||||
1, 2, 1, 0, 0, 1, 2, 1,
|
||||
static AnimationHeader* sAnimations[LULU_ANIM_MAX] = {
|
||||
&gLuluLookDownAnim, // LULU_ANIM_LOOK_DOWN
|
||||
&gLuluPutHandsDownAnim, // LULU_ANIM_PUT_HANDS_DOWN
|
||||
&gLuluLookForwardAndDownAnim, // LULU_ANIM_LOOK_FORWARD_AND_DOWN
|
||||
&gLuluLookAroundAnim, // LULU_ANIM_LOOK_AROUND
|
||||
&gLuluAngleHeadAnim, // LULU_ANIM_ANGLE_HEAD
|
||||
&gLuluNodAnim, // LULU_ANIM_NOD
|
||||
&gLuluPutHandsDownAnim, // LULU_ANIM_PUT_HANDS_DOWN_2
|
||||
&gLuluLookAroundAnim, // LULU_ANIM_LOOK_AROUND_2
|
||||
&gLuluSingStartAnim, // LULU_ANIM_SING_START
|
||||
&gLuluSingLoopAnim, // LULU_ANIM_SING_LOOP
|
||||
&gLuluLookForwardAndLeftAnim, // LULU_ANIM_LOOK_FORWARDS_AND_LEFT
|
||||
&gLuluLookLeftLoopAnim, // LULU_ANIM_LOOK_LEFT_LOOP
|
||||
&gLuluTurnAndWalkAnim, // LULU_ANIM_TURN_AND_WALK
|
||||
&gLuluWalkLoopAnim, // LULU_ANIM_WALK_LOOP
|
||||
};
|
||||
|
||||
void EnZov_Init(Actor* thisx, PlayState* play) {
|
||||
@@ -94,7 +111,7 @@ void EnZov_Init(Actor* thisx, PlayState* play) {
|
||||
this->cueId = -1;
|
||||
this->csIdList[0] = this->picto.actor.csId;
|
||||
this->csIdList[1] = CS_ID_GLOBAL_TALK;
|
||||
this->unk_322 = 0;
|
||||
this->animIndex = LULU_ANIM_LOOK_DOWN;
|
||||
this->actionFunc = func_80BD1C84;
|
||||
this->picto.validationFunc = EnZov_ValidatePictograph;
|
||||
|
||||
@@ -105,7 +122,7 @@ void EnZov_Init(Actor* thisx, PlayState* play) {
|
||||
switch (ENZOV_GET_F(&this->picto.actor)) {
|
||||
case ENZOV_F_1:
|
||||
this->actionFunc = func_80BD1F1C;
|
||||
func_80BD1570(this, 9, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_SING_LOOP, ANIMMODE_LOOP);
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
Actor_Kill(&this->picto.actor);
|
||||
return;
|
||||
@@ -141,36 +158,37 @@ void func_80BD13DC(EnZov* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BD1440(EnZov* this, s16 arg1) {
|
||||
void func_80BD1440(EnZov* this, s16 csIdIndex) {
|
||||
func_80BD13DC(this);
|
||||
this->csIdIndex = arg1;
|
||||
this->csIdIndex = csIdIndex;
|
||||
}
|
||||
|
||||
void func_80BD1470(EnZov* this, s16 index, u8 mode, f32 morphFrames) {
|
||||
f32 frame;
|
||||
void EnZov_ChangeAnim(EnZov* this, s16 animIndex, u8 animMode, f32 morphFrames) {
|
||||
f32 startFrame;
|
||||
|
||||
if (((index != this->unk_322) || (mode != ANIMMODE_LOOP)) && (index >= 0) && (index < ARRAY_COUNT(sAnimations))) {
|
||||
switch (index) {
|
||||
case 6:
|
||||
frame = 30.0f;
|
||||
if (((animIndex != this->animIndex) || (animMode != ANIMMODE_LOOP)) && (animIndex > LULU_ANIM_NONE) &&
|
||||
(animIndex < LULU_ANIM_MAX)) {
|
||||
switch (animIndex) {
|
||||
case LULU_ANIM_PUT_HANDS_DOWN_2:
|
||||
startFrame = 30.0f;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
frame = 57.0f;
|
||||
case LULU_ANIM_LOOK_AROUND_2:
|
||||
startFrame = 57.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
frame = 0.0f;
|
||||
startFrame = 0.0f;
|
||||
break;
|
||||
}
|
||||
Animation_Change(&this->skelAnime, sAnimations[index], 1.0f, frame, Animation_GetLastFrame(sAnimations[index]),
|
||||
mode, morphFrames);
|
||||
this->unk_322 = index;
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, startFrame,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, morphFrames);
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BD1570(EnZov* this, s16 index, u8 mode) {
|
||||
func_80BD1470(this, index, mode, 5.0f);
|
||||
void EnZov_ChangeAnimMorph(EnZov* this, s16 animIndex, u8 animMode) {
|
||||
EnZov_ChangeAnim(this, animIndex, animMode, 5.0f);
|
||||
}
|
||||
|
||||
s32 func_80BD15A4(EnZov* this, PlayState* play) {
|
||||
@@ -188,26 +206,26 @@ void func_80BD160C(EnZov* this, PlayState* play) {
|
||||
this->unk_320 &= ~2;
|
||||
if (GET_PLAYER_FORM != PLAYER_FORM_ZORA) {
|
||||
textId = 0x1024;
|
||||
if ((this->unk_322 == 0) || (this->unk_322 == 4)) {
|
||||
func_80BD1570(this, 4, ANIMMODE_ONCE);
|
||||
if ((this->animIndex == LULU_ANIM_LOOK_DOWN) || (this->animIndex == LULU_ANIM_ANGLE_HEAD)) {
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_ANGLE_HEAD, ANIMMODE_ONCE);
|
||||
} else {
|
||||
func_80BD1570(this, 6, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_PUT_HANDS_DOWN_2, ANIMMODE_ONCE);
|
||||
}
|
||||
} else if (this->unk_320 & 4) {
|
||||
textId = 0x1023;
|
||||
} else {
|
||||
textId = 0x1022;
|
||||
this->unk_320 |= 4;
|
||||
func_80BD1570(this, 3, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_AROUND, ANIMMODE_ONCE);
|
||||
}
|
||||
} else if (GET_PLAYER_FORM == PLAYER_FORM_ZORA) {
|
||||
func_80BD1570(this, 2, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_FORWARD_AND_DOWN, ANIMMODE_ONCE);
|
||||
this->actionFunc = func_80BD19FC;
|
||||
this->unk_324 = 10;
|
||||
func_80BD1440(this, 0);
|
||||
} else {
|
||||
textId = 0x1020;
|
||||
func_80BD1570(this, 5, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_NOD, ANIMMODE_ONCE);
|
||||
}
|
||||
|
||||
this->unk_320 |= 1;
|
||||
@@ -218,35 +236,35 @@ void func_80BD160C(EnZov* this, PlayState* play) {
|
||||
|
||||
void func_80BD1764(EnZov* this) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
switch (this->unk_322) {
|
||||
case 1:
|
||||
case 6:
|
||||
func_80BD1570(this, 6, ANIMMODE_ONCE);
|
||||
switch (this->animIndex) {
|
||||
case LULU_ANIM_PUT_HANDS_DOWN:
|
||||
case LULU_ANIM_PUT_HANDS_DOWN_2:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_PUT_HANDS_DOWN_2, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 7:
|
||||
func_80BD1570(this, 7, ANIMMODE_ONCE);
|
||||
case LULU_ANIM_LOOK_AROUND:
|
||||
case LULU_ANIM_LOOK_AROUND_2:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_AROUND_2, ANIMMODE_ONCE);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
case LULU_ANIM_ANGLE_HEAD:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
func_80BD1570(this, 9, ANIMMODE_LOOP);
|
||||
case LULU_ANIM_SING_START:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_SING_LOOP, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
func_80BD1570(this, 11, ANIMMODE_LOOP);
|
||||
case LULU_ANIM_LOOK_FORWARDS_AND_LEFT:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_LEFT_LOOP, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
func_80BD1570(this, 13, ANIMMODE_LOOP);
|
||||
case LULU_ANIM_TURN_AND_WALK:
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_WALK_LOOP, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
default:
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
this->unk_320 &= ~1;
|
||||
break;
|
||||
}
|
||||
@@ -267,16 +285,17 @@ void func_80BD187C(EnZov* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 0x1023:
|
||||
if ((this->unk_322 != 6) && (this->unk_322 != 1)) {
|
||||
func_80BD1570(this, 1, ANIMMODE_ONCE);
|
||||
if ((this->animIndex != LULU_ANIM_PUT_HANDS_DOWN_2) &&
|
||||
(this->animIndex != LULU_ANIM_PUT_HANDS_DOWN)) {
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_PUT_HANDS_DOWN, ANIMMODE_ONCE);
|
||||
}
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BD1C84;
|
||||
break;
|
||||
|
||||
case 0x1024:
|
||||
if (this->unk_322 != 6) {
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
if (this->animIndex != LULU_ANIM_PUT_HANDS_DOWN_2) {
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
}
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BD1C84;
|
||||
@@ -284,7 +303,7 @@ void func_80BD187C(EnZov* this, PlayState* play) {
|
||||
|
||||
default:
|
||||
this->unk_320 &= ~1;
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BD1C84;
|
||||
break;
|
||||
@@ -296,14 +315,14 @@ void func_80BD187C(EnZov* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actionFunc = func_80BD1C84;
|
||||
this->unk_320 &= ~1;
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BD19FC(EnZov* this, PlayState* play) {
|
||||
func_80BD1764(this);
|
||||
if (this->unk_322 == 0) {
|
||||
if (this->animIndex == LULU_ANIM_LOOK_DOWN) {
|
||||
if (!(this->unk_320 & 2)) {
|
||||
this->unk_320 |= 2;
|
||||
this->unk_2EE = 3;
|
||||
@@ -334,20 +353,20 @@ s32 func_80BD1AE0(EnZov* this, PlayState* play) {
|
||||
this->cueId = cueId;
|
||||
switch (this->cueId) {
|
||||
case 1:
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
func_80BD1570(this, 8, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_SING_START, ANIMMODE_ONCE);
|
||||
this->unk_320 |= 0x10;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
func_80BD1470(this, 10, ANIMMODE_ONCE, 0.0f);
|
||||
EnZov_ChangeAnim(this, LULU_ANIM_LOOK_FORWARDS_AND_LEFT, ANIMMODE_ONCE, 0.0f);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
func_80BD1570(this, 12, ANIMMODE_ONCE);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_TURN_AND_WALK, ANIMMODE_ONCE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -359,7 +378,7 @@ s32 func_80BD1AE0(EnZov* this, PlayState* play) {
|
||||
|
||||
void func_80BD1BF0(EnZov* this, PlayState* play) {
|
||||
if (!func_80BD1AE0(this, play)) {
|
||||
func_80BD1570(this, 0, ANIMMODE_LOOP);
|
||||
EnZov_ChangeAnimMorph(this, LULU_ANIM_LOOK_DOWN, ANIMMODE_LOOP);
|
||||
this->actionFunc = func_80BD1C84;
|
||||
}
|
||||
}
|
||||
@@ -486,7 +505,7 @@ void EnZov_Update(Actor* thisx, PlayState* play) {
|
||||
if ((this->unk_320 & 1) && func_80BD15A4(this, play)) {
|
||||
Actor_TrackPlayer(play, &this->picto.actor, &this->headRot, &this->torsoRot, this->picto.actor.focus.pos);
|
||||
} else {
|
||||
if ((this->unk_320 & 0x10) && (this->unk_322 == 0)) {
|
||||
if ((this->unk_320 & 0x10) && (this->animIndex == LULU_ANIM_LOOK_DOWN)) {
|
||||
Math_SmoothStepToS(&this->headRot.x, -0x1B58, 6, 0x1838, 0x64);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
@@ -522,7 +541,7 @@ s32 EnZov_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
|
||||
if (limbIndex == LULU_LIMB_HEAD) {
|
||||
rot->x += this->headRot.y;
|
||||
if ((this->unk_320 & 0x10) && (this->unk_322 == 0)) {
|
||||
if ((this->unk_320 & 0x10) && (this->animIndex == LULU_ANIM_LOOK_DOWN)) {
|
||||
rot->z += this->headRot.x;
|
||||
}
|
||||
}
|
||||
@@ -534,6 +553,8 @@ s32 EnZov_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
}
|
||||
|
||||
void EnZov_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
static Vec3f D_80BD2744 = { 400.0f, 600.0f, 0.0f };
|
||||
static Vec3f D_80BD2750 = { 400.0f, 600.0f, 0.0f };
|
||||
EnZov* this = THIS;
|
||||
|
||||
if (limbIndex == LULU_LIMB_HEAD) {
|
||||
@@ -552,6 +573,11 @@ void EnZov_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
}
|
||||
|
||||
void EnZov_Draw(Actor* thisx, PlayState* play) {
|
||||
static TexturePtr sEyeTextures[] = { gLuluEyeOpenTex, gLuluEyeHalfTex, gLuluEyeClosedTex };
|
||||
static TexturePtr sMouthTextures[] = { gLuluMouthClosedTex, gLuluMouthOpenTex };
|
||||
static s8 D_80BD2770[] = {
|
||||
1, 2, 1, 0, 0, 1, 2, 1,
|
||||
};
|
||||
EnZov* this = THIS;
|
||||
Gfx* gfx;
|
||||
s32 curFrame;
|
||||
@@ -567,20 +593,20 @@ void EnZov_Draw(Actor* thisx, PlayState* play) {
|
||||
curFrame = this->skelAnime.curFrame;
|
||||
phi_v1 = this->unk_2EC;
|
||||
|
||||
switch (this->unk_322) {
|
||||
case 0:
|
||||
switch (this->animIndex) {
|
||||
case LULU_ANIM_LOOK_DOWN:
|
||||
if ((this->unk_2EC == 0) && !(this->unk_320 & 0x10)) {
|
||||
phi_v1 = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
case LULU_ANIM_NOD:
|
||||
if (this->unk_2EC == 0) {
|
||||
phi_v1 = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case LULU_ANIM_LOOK_FORWARD_AND_DOWN:
|
||||
if (curFrame < 23) {
|
||||
phi_v1 = 0;
|
||||
} else if (curFrame >= 26) {
|
||||
@@ -592,8 +618,8 @@ void EnZov_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 7:
|
||||
case LULU_ANIM_LOOK_AROUND:
|
||||
case LULU_ANIM_LOOK_AROUND_2:
|
||||
if (curFrame <= 50) {
|
||||
if (curFrame < 43) {
|
||||
phi_v1 = 0;
|
||||
@@ -604,7 +630,7 @@ void EnZov_Draw(Actor* thisx, PlayState* play) {
|
||||
phi_a1 = 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case LULU_ANIM_ANGLE_HEAD:
|
||||
if ((curFrame < 14) || (curFrame >= 24)) {
|
||||
phi_v1 = 1;
|
||||
} else {
|
||||
@@ -613,11 +639,11 @@ void EnZov_Draw(Actor* thisx, PlayState* play) {
|
||||
phi_a1 = 1;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case LULU_ANIM_SING_START:
|
||||
phi_v1 = 0;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case LULU_ANIM_SING_LOOP:
|
||||
phi_v1 = 0;
|
||||
phi_a1 = 1;
|
||||
break;
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef struct EnZov {
|
||||
/* 0x308 */ Vec3f unk_308;
|
||||
/* 0x314 */ Vec3f unk_314;
|
||||
/* 0x320 */ u16 unk_320;
|
||||
/* 0x322 */ s16 unk_322;
|
||||
/* 0x322 */ s16 animIndex;
|
||||
/* 0x324 */ s16 unk_324;
|
||||
/* 0x326 */ s16 cueId;
|
||||
/* 0x328 */ s16 csIdList[2];
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_zow.h"
|
||||
#include "assets/objects/object_zo/object_zo.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10)
|
||||
|
||||
@@ -306,6 +305,20 @@ void func_80BDCDA8(EnZow* this, EnZowStruct* ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef enum EnZowAnimation {
|
||||
/* -1 */ ENZOT_ANIM_NONE = -1,
|
||||
/* 0 */ ENZOT_ANIM_0,
|
||||
/* 1 */ ENZOT_ANIM_1,
|
||||
/* 2 */ ENZOT_ANIM_2,
|
||||
/* 3 */ ENZOT_ANIM_MAX,
|
||||
} EnZowAnimation;
|
||||
|
||||
static AnimationHeader* sAnimations[ENZOT_ANIM_MAX] = {
|
||||
&gZoraTreadingWaterAnim, // ENZOT_ANIM_0
|
||||
&gZoraSurfacingAnim, // ENZOT_ANIM_1
|
||||
&gZoraSurfacingAnim, // ENZOT_ANIM_2
|
||||
};
|
||||
|
||||
void EnZow_Init(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnZow* this = THIS;
|
||||
@@ -313,9 +326,10 @@ void EnZow_Init(Actor* thisx, PlayState* play) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = func_80BDD79C;
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable, 20);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable,
|
||||
ZORA_LIMB_MAX);
|
||||
Animation_PlayOnce(&this->skelAnime, &gZoraSurfacingAnim);
|
||||
this->unk_2C8 = 1;
|
||||
this->animIndex = ENZOT_ANIM_1;
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->unk_2CA = 0;
|
||||
@@ -333,18 +347,16 @@ void EnZow_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
static AnimationHeader* sAnimations[] = { &gZoraTreadingWaterAnim, &gZoraSurfacingAnim, &gZoraSurfacingAnim };
|
||||
|
||||
void func_80BDD04C(EnZow* this, s16 arg1, u8 arg2) {
|
||||
if ((arg1 >= 0) && (arg1 < 3)) {
|
||||
if (arg1 < 2) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, Animation_GetLastFrame(sAnimations[arg1]),
|
||||
arg2, -5.0f);
|
||||
void EnZow_ChangeAnim(EnZow* this, s16 animIndex, u8 animMode) {
|
||||
if ((animIndex > ENZOT_ANIM_NONE) && (animIndex < ENZOT_ANIM_MAX)) {
|
||||
if (animIndex <= ENZOT_ANIM_1) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), animMode, -5.0f);
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, sAnimations[arg1], -1.0f, Animation_GetLastFrame(sAnimations[arg1]),
|
||||
0.0f, arg2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, sAnimations[animIndex], -1.0f,
|
||||
Animation_GetLastFrame(sAnimations[animIndex]), 0.0f, animMode, 0.0f);
|
||||
}
|
||||
this->unk_2C8 = arg1;
|
||||
this->animIndex = animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,9 +454,9 @@ void func_80BDD490(EnZow* this, PlayState* play) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
if (this->actor.xzDistToPlayer > 440.0f) {
|
||||
this->actionFunc = func_80BDD350;
|
||||
func_80BDD04C(this, 2, ANIMMODE_ONCE);
|
||||
EnZow_ChangeAnim(this, ENZOT_ANIM_2, ANIMMODE_ONCE);
|
||||
} else if (this->unk_2CA & 2) {
|
||||
func_80BDD04C(this, 0, ANIMMODE_LOOP);
|
||||
EnZow_ChangeAnim(this, ENZOT_ANIM_0, ANIMMODE_LOOP);
|
||||
}
|
||||
|
||||
if ((play->gameplayFrames & 7) == 0) {
|
||||
@@ -516,7 +528,7 @@ void func_80BDD6BC(EnZow* this, PlayState* play) {
|
||||
if (this->actor.depthInWater < 54.0f) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_OUT_OF_WATER);
|
||||
func_80BDCDA8(this, this->unk_2D0);
|
||||
func_80BDD04C(this, 1, ANIMMODE_ONCE);
|
||||
EnZow_ChangeAnim(this, ENZOT_ANIM_1, ANIMMODE_ONCE);
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actionFunc = func_80BDD634;
|
||||
@@ -603,7 +615,7 @@ Gfx* func_80BDDA7C(GraphicsContext* gfxCtx) {
|
||||
Vec3f D_80BDDD4C = { 400.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnZow_PostLimbDrawOpa(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80BDDD4C, &thisx->focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_ZOW_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_zo/object_zo.h"
|
||||
|
||||
struct EnZow;
|
||||
|
||||
@@ -27,11 +28,11 @@ typedef struct EnZow {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ ColliderCylinder collider;
|
||||
/* 0x1D4 */ Vec3s jointTable[20];
|
||||
/* 0x24C */ Vec3s morphTable[20];
|
||||
/* 0x1D4 */ Vec3s jointTable[ZORA_LIMB_MAX];
|
||||
/* 0x24C */ Vec3s morphTable[ZORA_LIMB_MAX];
|
||||
/* 0x2C4 */ s16 unk_2C4;
|
||||
/* 0x2C6 */ s16 unk_2C6;
|
||||
/* 0x2C8 */ s16 unk_2C8;
|
||||
/* 0x2C8 */ s16 animIndex;
|
||||
/* 0x2CA */ u16 unk_2CA;
|
||||
/* 0x2CC */ s16 unk_2CC;
|
||||
/* 0x2CE */ s16 unk_2CE;
|
||||
|
||||
@@ -181,7 +181,7 @@ void ObjArmos_Init(Actor* thisx, PlayState* play) {
|
||||
ObjArmos* this = THIS;
|
||||
s32 sp44 = OBJARMOS_GET_ROTZ_7(&this->dyna.actor);
|
||||
s32 sp40 = OBJARMOS_GET_ROTX_F(&this->dyna.actor);
|
||||
f32 sp3C = Animation_GetLastFrame(&gArmosPushedBackAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gArmosPushedBackAnim);
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
|
||||
@@ -194,7 +194,7 @@ void ObjArmos_Init(Actor* thisx, PlayState* play) {
|
||||
SkelAnime_Init(play, &this->skelAnime, &object_am_Skel_005948, &gArmosPushedBackAnim, this->jointTable,
|
||||
this->morphTable, OBJECT_AM_LIMB_MAX);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 0.0f, sp3C, sp3C, ANIMMODE_ONCE, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 0.0f, endFrame, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
|
||||
if (sp40 == 0) {
|
||||
func_809A57D8(this);
|
||||
|
||||
@@ -31,16 +31,15 @@ ActorProfile Obj_Jg_Gakki_Profile = {
|
||||
void ObjJgGakki_Init(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjJgGakki* this = THIS;
|
||||
f32 frameCount = Animation_GetLastFrame(&gGoronElderDrumTakeOutAnim);
|
||||
f32 endFrame = Animation_GetLastFrame(&gGoronElderDrumTakeOutAnim);
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &gGoronElderDrumSkel, NULL, NULL, NULL, 0);
|
||||
|
||||
if (((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneLayer == 7)) && (play->csCtx.scriptIndex == 0)) {
|
||||
Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, frameCount, frameCount, ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, endFrame, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
} else if ((play->sceneId == SCENE_17SETUGEN) || (play->sceneId == SCENE_10YUKIYAMANOMURA)) {
|
||||
Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGoronElderDrumTakeOutAnim, 1.0f, 0.0f, endFrame, ANIMMODE_ONCE, 0.0f);
|
||||
} else {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
@@ -1669,7 +1669,7 @@ void ObjUm_ChangeAnim(ObjUm* this, PlayState* play, ObjUmAnimation animIndex) {
|
||||
animIndex = OBJ_UM_ANIM_MINUS_1;
|
||||
}
|
||||
|
||||
changeAnim = (animIndex != this->animIndex);
|
||||
changeAnim = (this->animIndex != animIndex);
|
||||
if (SkelAnime_Update(&this->skelAnime) || changeAnim) {
|
||||
this->animIndex = animIndex;
|
||||
|
||||
|
||||
@@ -930,7 +930,7 @@ emit_c_header(FILE *out, soundfont *sf)
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the compression type as indicated in the AIFC to the correspoding SampleCodec enum value.
|
||||
* Convert the compression type as indicated in the AIFC to the corresponding SampleCodec enum value.
|
||||
* These must be kept in sync with the SampleCodec definition!
|
||||
*/
|
||||
static const char *
|
||||
|
||||
+11
-11
@@ -4934,7 +4934,7 @@
|
||||
0x8086472C:("EnGirlA_Bought",),
|
||||
0x80864744:("EnGirlA_Restock",),
|
||||
0x80864760:("EnGirlA_TrySetMaskItemDescription",),
|
||||
0x80864774:("EnGirlA_InitalUpdate",),
|
||||
0x80864774:("EnGirlA_InitialUpdate",),
|
||||
0x808648F8:("EnGirlA_Update2",),
|
||||
0x808649A4:("EnGirlA_Update",),
|
||||
0x808649C8:("EnGirlA_Draw",),
|
||||
@@ -12731,8 +12731,8 @@
|
||||
0x80AF7CB0:("EnPm_FindActor",),
|
||||
0x80AF7D60:("EnPm_FindScheduleDoor",),
|
||||
0x80AF7DC4:("func_80AF7DC4",),
|
||||
0x80AF7E6C:("func_80AF7E6C",),
|
||||
0x80AF7E98:("func_80AF7E98",),
|
||||
0x80AF7E6C:("EnPm_UpdateSkelAnime",),
|
||||
0x80AF7E98:("EnPm_ChangeAnim",),
|
||||
0x80AF7F68:("func_80AF7F68",),
|
||||
0x80AF8040:("func_80AF8040",),
|
||||
0x80AF80F4:("func_80AF80F4",),
|
||||
@@ -14846,7 +14846,7 @@
|
||||
0x80B93468:("func_80B93468",),
|
||||
0x80B93538:("EnZog_Init",),
|
||||
0x80B93994:("EnZog_Destroy",),
|
||||
0x80B939C0:("func_80B939C0",),
|
||||
0x80B939C0:("EnZog_ChangeAnim",),
|
||||
0x80B93A48:("func_80B93A48",),
|
||||
0x80B93B44:("func_80B93B44",),
|
||||
0x80B93BA8:("func_80B93BA8",),
|
||||
@@ -14888,7 +14888,7 @@
|
||||
0x80B965D0:("func_80B965D0",),
|
||||
0x80B966BC:("EnZot_Init",),
|
||||
0x80B96B90:("EnZot_Destroy",),
|
||||
0x80B96BEC:("func_80B96BEC",),
|
||||
0x80B96BEC:("EnZot_ChangeAnim",),
|
||||
0x80B96CE4:("func_80B96CE4",),
|
||||
0x80B96D4C:("func_80B96D4C",),
|
||||
0x80B96DF0:("func_80B96DF0",),
|
||||
@@ -15012,7 +15012,7 @@
|
||||
0x80B9EF70:("MirRay3_Draw",),
|
||||
0x80B9F570:("EnZob_Init",),
|
||||
0x80B9F7B8:("EnZob_Destroy",),
|
||||
0x80B9F7E4:("func_80B9F7E4",),
|
||||
0x80B9F7E4:("EnZob_ChangeAnim",),
|
||||
0x80B9F86C:("func_80B9F86C",),
|
||||
0x80B9FA3C:("func_80B9FA3C",),
|
||||
0x80B9FC0C:("func_80B9FC0C",),
|
||||
@@ -15713,8 +15713,8 @@
|
||||
0x80BD13B0:("EnZov_Destroy",),
|
||||
0x80BD13DC:("func_80BD13DC",),
|
||||
0x80BD1440:("func_80BD1440",),
|
||||
0x80BD1470:("func_80BD1470",),
|
||||
0x80BD1570:("func_80BD1570",),
|
||||
0x80BD1470:("EnZov_ChangeAnim",),
|
||||
0x80BD1570:("EnZov_ChangeAnimMorph",),
|
||||
0x80BD15A4:("func_80BD15A4",),
|
||||
0x80BD160C:("func_80BD160C",),
|
||||
0x80BD1764:("func_80BD1764",),
|
||||
@@ -15980,7 +15980,7 @@
|
||||
0x80BDCDA8:("func_80BDCDA8",),
|
||||
0x80BDCF28:("EnZow_Init",),
|
||||
0x80BDD020:("EnZow_Destroy",),
|
||||
0x80BDD04C:("func_80BDD04C",),
|
||||
0x80BDD04C:("EnZow_ChangeAnim",),
|
||||
0x80BDD154:("func_80BDD154",),
|
||||
0x80BDD1E0:("func_80BDD1E0",),
|
||||
0x80BDD350:("func_80BDD350",),
|
||||
@@ -16034,8 +16034,8 @@
|
||||
0x80BDFA34:("EnAl_TransformLimbDraw",),
|
||||
0x80BDFB30:("EnAl_Draw",),
|
||||
0x80BE04E0:("EnTab_FindActor",),
|
||||
0x80BE0590:("func_80BE0590",),
|
||||
0x80BE05BC:("func_80BE05BC",),
|
||||
0x80BE0590:("EnTab_UpdateSkelAnime",),
|
||||
0x80BE05BC:("EnTab_ChangeAnim",),
|
||||
0x80BE0620:("func_80BE0620",),
|
||||
0x80BE0664:("func_80BE0664",),
|
||||
0x80BE06DC:("func_80BE06DC",),
|
||||
|
||||
@@ -15697,7 +15697,7 @@
|
||||
0x80BE1A78:("En_Tab_Profile","UNK_TYPE1","",0x1),
|
||||
0x80BE1A98:("D_80BE1A98","UNK_TYPE1","",0x1),
|
||||
0x80BE1AC4:("D_80BE1AC4","UNK_TYPE1","",0x1),
|
||||
0x80BE1AD0:("D_80BE1AD0","UNK_TYPE1","",0x1),
|
||||
0x80BE1AD0:("sAnimationInfo","UNK_TYPE1","",0x1),
|
||||
0x80BE1AF0:("D_80BE1AF0","UNK_TYPE1","",0x1),
|
||||
0x80BE1AFC:("D_80BE1AFC","UNK_TYPE1","",0x1),
|
||||
0x80BE1B04:("D_80BE1B04","UNK_TYPE1","",0x1),
|
||||
|
||||
@@ -62,7 +62,7 @@ def ExtractFunc(fullPath):
|
||||
ExtractFile(fullPath, outPath, outSourcePath)
|
||||
|
||||
if not globalAbort.is_set():
|
||||
# Only update timestamp on succesful extractions
|
||||
# Only update timestamp on successful extractions
|
||||
if fullPath not in globalExtractedAssetsTracker:
|
||||
globalExtractedAssetsTracker[fullPath] = globalManager.dict()
|
||||
globalExtractedAssetsTracker[fullPath]["timestamp"] = currentTimeStamp
|
||||
@@ -163,7 +163,7 @@ def main():
|
||||
with multiprocessing.get_context("fork").Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, args.unaccounted, extractedAssetsTracker, manager, baseromSegmentsDir, outputDir)) as p:
|
||||
p.map(ExtractFunc, xmlFiles)
|
||||
except (multiprocessing.ProcessError, TypeError):
|
||||
print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr)
|
||||
print("Warning: Multiprocessing exception occurred.", file=os.sys.stderr)
|
||||
print("Disabling mutliprocessing.", file=os.sys.stderr)
|
||||
|
||||
initializeWorker(mainAbort, args.unaccounted, extractedAssetsTracker, manager, baseromSegmentsDir, outputDir)
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ simpleReplace = {
|
||||
}
|
||||
|
||||
# all occurrences of keys will be replaced by associated value,
|
||||
# if the occurence is the whole word
|
||||
# if the occurrence is the whole word
|
||||
# for example, if there is a space before and an open parenthesis after,
|
||||
# like for a function call: ` func_8002E4B4(`
|
||||
#
|
||||
@@ -1507,7 +1507,7 @@ def replace_single(file):
|
||||
custom_behavior_ignore_offset, custom_behavior_ignore_match = custom_behavior_ignore_data
|
||||
else:
|
||||
custom_behavior = False
|
||||
# replace `old` with `new` if the occurence of `old` is the whole word
|
||||
# replace `old` with `new` if the occurrence of `old` is the whole word
|
||||
oldStartIdx = srcdata.find(old)
|
||||
if oldStartIdx >= 0:
|
||||
old_start_as_word = is_word_char(old[0])
|
||||
|
||||
Reference in New Issue
Block a user