mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
en_mm and object_mm OK (#735)
* almost done * progress * OK * update mm2 * delete asm * whitespace * Update assets/xml/objects/object_mm.xml Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Mm/z_en_mm.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * name data Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
11e5be77d5
commit
7f3be6e37f
27 changed files with 648 additions and 1515 deletions
|
@ -1,18 +1,45 @@
|
|||
/*
|
||||
* File: z_en_mm.c
|
||||
* Overlay: ovl_En_Mm
|
||||
* Description: Running Man (child)
|
||||
*/
|
||||
|
||||
#include "z_en_mm.h"
|
||||
#include "objects/object_mm/object_mm.h"
|
||||
|
||||
#define FLAGS 0x00000019
|
||||
|
||||
#define THIS ((EnMm*)thisx)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ RM_ANIM_RUN,
|
||||
/* 1 */ RM_ANIM_SIT,
|
||||
/* 2 */ RM_ANIM_SIT_WAIT,
|
||||
/* 3 */ RM_ANIM_STAND,
|
||||
/* 4 */ RM_ANIM_SPRINT,
|
||||
/* 5 */ RM_ANIM_EXCITED, // plays when talking to him with bunny hood on
|
||||
/* 6 */ RM_ANIM_HAPPY // plays when you sell him the bunny hood
|
||||
} RunningManAnimIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ RM_MOUTH_CLOSED,
|
||||
/* 1 */ RM_MOUTH_OPEN
|
||||
} RunningManMouthTex;
|
||||
|
||||
void EnMm_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnMm_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnMm_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_06005E18;
|
||||
extern UNK_TYPE D_0602CA38;
|
||||
void func_80AAE598(EnMm* this, GlobalContext* globalCtx);
|
||||
void func_80AAE294(EnMm* this, GlobalContext* globalCtx);
|
||||
void func_80AAE50C(EnMm* this, GlobalContext* globalCtx);
|
||||
void func_80AAE224(EnMm* this, GlobalContext* globalCtx);
|
||||
s32 func_80AADA70(void);
|
||||
|
||||
s32 EnMm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx);
|
||||
void EnMm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*);
|
||||
|
||||
/*
|
||||
const ActorInit En_Mm_InitVars = {
|
||||
ACTOR_EN_MM,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -25,7 +52,7 @@ const ActorInit En_Mm_InitVars = {
|
|||
(ActorFunc)EnMm_Draw,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit D_80AAEAE0 = {
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
|
@ -44,39 +71,541 @@ static ColliderCylinderInit D_80AAEAE0 = {
|
|||
},
|
||||
{ 18, 63, 0, { 0, 0, 0 } },
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAD770.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/EnMm_Init.s")
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit[] = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/EnMm_Destroy.s")
|
||||
static DamageTable sDamageTable = {
|
||||
/* Deku nut */ DMG_ENTRY(0, 0x0),
|
||||
/* Deku stick */ DMG_ENTRY(0, 0x0),
|
||||
/* Slingshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Explosive */ DMG_ENTRY(0, 0x0),
|
||||
/* Boomerang */ DMG_ENTRY(0, 0x0),
|
||||
/* Normal arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer swing */ DMG_ENTRY(0, 0x0),
|
||||
/* Hookshot */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Master sword */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant's Knife */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Light arrow */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(0, 0x0),
|
||||
/* Fire magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Ice magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Light magic */ DMG_ENTRY(0, 0x0),
|
||||
/* Shield */ DMG_ENTRY(0, 0x0),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Master spin */ DMG_ENTRY(0, 0x0),
|
||||
/* Kokiri jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Giant jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Master jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
|
||||
/* Unblockable */ DMG_ENTRY(0, 0x0),
|
||||
/* Hammer jump */ DMG_ENTRY(0, 0x0),
|
||||
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADA70.s")
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeader* animation;
|
||||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ u8 mode;
|
||||
/* 0x0C */ f32 morphFrames;
|
||||
} EnMmAnimEntry; // size = 0x10
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADAA0.s")
|
||||
static EnMmAnimEntry sAnimationEntries[] = {
|
||||
{ &gRunningManRunAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManSitStandAnim, -1.0f, ANIMMODE_ONCE, -7.0f },
|
||||
{ &gRunningManSitWaitAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManSitStandAnim, 1.0f, ANIMMODE_ONCE, -7.0f },
|
||||
{ &gRunningManSprintAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManExcitedAnim, 1.0f, ANIMMODE_LOOP, -12.0f },
|
||||
{ &gRunningManHappyAnim, 1.0f, ANIMMODE_LOOP, -12.0f },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADC34.s")
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
} EnMmPathInfo;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADCD0.s")
|
||||
static EnMmPathInfo sPathInfo[] = {
|
||||
{ 0, 1, 0, 0 },
|
||||
{ 1, 1, 0, 1 },
|
||||
{ 1, 3, 2, 1 },
|
||||
{ -1, 0, 2, 0 },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADE50.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADE60.s")
|
||||
void EnMm_ChangeAnimation(EnMm* this, s32 newAnimIndex, s32* curAnimIndex) {
|
||||
f32 morphFrames;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AADEF0.s")
|
||||
if ((*curAnimIndex < 0) || (newAnimIndex == *curAnimIndex)) {
|
||||
morphFrames = 0.0f;
|
||||
} else {
|
||||
morphFrames = sAnimationEntries[newAnimIndex].morphFrames;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAE224.s")
|
||||
if (sAnimationEntries[newAnimIndex].playSpeed >= 0.0f) {
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[newAnimIndex].animation,
|
||||
sAnimationEntries[newAnimIndex].playSpeed, 0.0f,
|
||||
Animation_GetLastFrame(sAnimationEntries[newAnimIndex].animation),
|
||||
sAnimationEntries[newAnimIndex].mode, morphFrames);
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[newAnimIndex].animation,
|
||||
sAnimationEntries[newAnimIndex].playSpeed,
|
||||
Animation_GetLastFrame(sAnimationEntries[newAnimIndex].animation), 0.0f,
|
||||
sAnimationEntries[newAnimIndex].mode, morphFrames);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAE294.s")
|
||||
*curAnimIndex = newAnimIndex;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAE50C.s")
|
||||
void EnMm_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnMm* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAE598.s")
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/EnMm_Update.s")
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable, 16);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/EnMm_Draw.s")
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, sColChkInfoInit);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAE97C.s")
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[RM_ANIM_RUN].animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimationEntries[RM_ANIM_RUN].animation),
|
||||
sAnimationEntries[RM_ANIM_RUN].mode, sAnimationEntries[RM_ANIM_RUN].morphFrames);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mm/func_80AAEA10.s")
|
||||
this->path = this->actor.params & 0xFF;
|
||||
this->unk_1F0 = 2;
|
||||
this->unk_1E8 = 0;
|
||||
this->actor.targetMode = 2;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->speedXZ = 3.0f;
|
||||
this->unk_204 = this->actor.objBankIndex;
|
||||
|
||||
if (func_80AADA70() == 1) {
|
||||
this->mouthTexIndex = RM_MOUTH_OPEN;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_RUN, &this->curAnimIndex);
|
||||
this->actionFunc = func_80AAE598;
|
||||
} else {
|
||||
this->mouthTexIndex = RM_MOUTH_CLOSED;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SIT_WAIT, &this->curAnimIndex);
|
||||
this->actionFunc = func_80AAE294;
|
||||
}
|
||||
}
|
||||
|
||||
void EnMm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnMm* this = THIS;
|
||||
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
s32 func_80AADA70(void) {
|
||||
s32 isDay = false;
|
||||
|
||||
if ((gSaveContext.dayTime > 0x3555) && (gSaveContext.dayTime <= 0xD556)) {
|
||||
isDay = true;
|
||||
}
|
||||
|
||||
return isDay;
|
||||
}
|
||||
|
||||
s32 func_80AADAA0(EnMm* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
Player* player = PLAYER;
|
||||
s32 sp1C = 1;
|
||||
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
player->actor.textId = 0x202D;
|
||||
this->unk_254 &= ~1;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_HAPPY, &this->curAnimIndex);
|
||||
} else {
|
||||
player->actor.textId = 0x202C;
|
||||
gSaveContext.infTable[23] |= 0x1000;
|
||||
}
|
||||
sp1C = 2;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
Player_UnsetMask(globalCtx);
|
||||
Item_Give(globalCtx, ITEM_SOLD_OUT);
|
||||
gSaveContext.itemGetInf[3] |= 0x800;
|
||||
Rupees_ChangeBy(500);
|
||||
player->actor.textId = 0x202E;
|
||||
sp1C = 2;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
if ((player->actor.textId == 0x202E) || (player->actor.textId == 0x202C)) {
|
||||
this->unk_254 |= 1;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SIT_WAIT, &this->curAnimIndex);
|
||||
}
|
||||
sp1C = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return sp1C;
|
||||
}
|
||||
|
||||
s32 EnMm_GetTextId(EnMm* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
s32 textId;
|
||||
|
||||
textId = Text_GetFaceReaction(globalCtx, 0x1C);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
if (textId == 0) {
|
||||
textId = 0x204D;
|
||||
}
|
||||
} else if (player->currentMask == PLAYER_MASK_BUNNY) {
|
||||
textId = (gSaveContext.infTable[23] & 0x1000) ? 0x202B : 0x202A;
|
||||
} else if (textId == 0) {
|
||||
textId = 0x2029;
|
||||
}
|
||||
|
||||
return textId;
|
||||
}
|
||||
|
||||
void func_80AADCD0(EnMm* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
f32 yawDiff;
|
||||
s16 sp26;
|
||||
s16 sp24;
|
||||
|
||||
if (this->unk_1E0 == 2) {
|
||||
func_8010B720(globalCtx, player->actor.textId);
|
||||
this->unk_1E0 = 1;
|
||||
} else if (this->unk_1E0 == 1) {
|
||||
this->unk_1E0 = func_80AADAA0(this, globalCtx);
|
||||
} else {
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
this->unk_1E0 = 1;
|
||||
|
||||
if (this->curAnimIndex != 5) {
|
||||
if ((this->actor.textId == 0x202A) || (this->actor.textId == 0x202B)) {
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_EXCITED, &this->curAnimIndex);
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
|
||||
|
||||
if ((sp26 >= 0) && (sp26 <= 0x140) && (sp24 >= 0) && (sp24 <= 0xF0) && (yawDiff <= 17152.0f) &&
|
||||
(this->unk_1E0 != 3) && func_8002F2CC(&this->actor, globalCtx, 100.0f)) {
|
||||
this->actor.textId = EnMm_GetTextId(this, globalCtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 EnMm_GetPointCount(Path* pathList, s32 pathNum) {
|
||||
return (pathList + pathNum)->count;
|
||||
}
|
||||
|
||||
s32 func_80AADE60(Path* pathList, Vec3f* pos, s32 pathNum, s32 waypoint) {
|
||||
Vec3s* pointPos;
|
||||
pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL((pathList + pathNum)->points))[waypoint];
|
||||
|
||||
pos->x = pointPos->x;
|
||||
pos->y = pointPos->y;
|
||||
pos->z = pointPos->z;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 func_80AADEF0(EnMm* this, GlobalContext* globalCtx) {
|
||||
f32 xDiff;
|
||||
f32 zDiff;
|
||||
Vec3f waypointPos;
|
||||
s32 phi_a2;
|
||||
s32 phi_v1;
|
||||
|
||||
func_80AADE60(globalCtx->setupPathList, &waypointPos, this->path, this->waypoint);
|
||||
|
||||
xDiff = waypointPos.x - this->actor.world.pos.x;
|
||||
zDiff = waypointPos.z - this->actor.world.pos.z;
|
||||
|
||||
this->yawToWaypoint = (s32)(Math_FAtan2F(xDiff, zDiff) * 10430.378f);
|
||||
this->distToWaypoint = sqrtf(SQ(xDiff) + SQ(zDiff));
|
||||
|
||||
while ((this->distToWaypoint <= 10.44f) && (this->unk_1E8 != 0)) {
|
||||
this->waypoint += sPathInfo[this->unk_1E8].unk_00;
|
||||
|
||||
phi_a2 = sPathInfo[this->unk_1E8].unk_08;
|
||||
|
||||
switch (phi_a2) {
|
||||
case 0:
|
||||
phi_a2 = 0;
|
||||
break;
|
||||
case 1:
|
||||
phi_a2 = EnMm_GetPointCount(globalCtx->setupPathList, this->path) - 1;
|
||||
break;
|
||||
case 2:
|
||||
phi_a2 = this->unk_1F0;
|
||||
break;
|
||||
}
|
||||
|
||||
phi_v1 = sPathInfo[this->unk_1E8].unk_0C;
|
||||
|
||||
switch (phi_v1) {
|
||||
case 0:
|
||||
phi_v1 = 0;
|
||||
break;
|
||||
case 1:
|
||||
phi_v1 = EnMm_GetPointCount(globalCtx->setupPathList, this->path) - 1;
|
||||
break;
|
||||
case 2:
|
||||
phi_v1 = this->unk_1F0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((sPathInfo[this->unk_1E8].unk_00 >= 0 && (this->waypoint < phi_a2 || phi_v1 < this->waypoint)) ||
|
||||
(sPathInfo[this->unk_1E8].unk_00 < 0 && (phi_a2 < this->waypoint || this->waypoint < phi_v1))) {
|
||||
this->unk_1E8 = sPathInfo[this->unk_1E8].unk_04;
|
||||
this->waypoint = sPathInfo[this->unk_1E8].unk_08;
|
||||
}
|
||||
|
||||
func_80AADE60(globalCtx->setupPathList, &waypointPos, this->path, this->waypoint);
|
||||
|
||||
xDiff = waypointPos.x - this->actor.world.pos.x;
|
||||
zDiff = waypointPos.z - this->actor.world.pos.z;
|
||||
|
||||
this->yawToWaypoint = (s32)(Math_FAtan2F(xDiff, zDiff) * 10430.378f);
|
||||
this->distToWaypoint = sqrtf(SQ(xDiff) + SQ(zDiff));
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->yawToWaypoint, 1, 2500, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->speedXZ, 0.6f, this->distToWaypoint, 0.0f);
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80AAE224(EnMm* this, GlobalContext* globalCtx) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actionFunc = func_80AAE598;
|
||||
this->unk_1E8 = 0;
|
||||
this->mouthTexIndex = RM_MOUTH_CLOSED;
|
||||
this->unk_254 |= 1;
|
||||
this->unk_1E0 = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SIT_WAIT, &this->curAnimIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAE294(EnMm* this, GlobalContext* globalCtx) {
|
||||
f32 floorYNorm;
|
||||
Vec3f dustPos;
|
||||
|
||||
if (!Player_InCsMode(globalCtx)) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->curAnimIndex == 0) {
|
||||
if (((s32)this->skelAnime.curFrame == 1) || ((s32)this->skelAnime.curFrame == 6)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_PL_WALK_GROUND);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->curAnimIndex == 4) {
|
||||
if (((this->skelAnime.curFrame - this->skelAnime.playSpeed < 9.0f) && (this->skelAnime.curFrame >= 9.0f)) ||
|
||||
((this->skelAnime.curFrame - this->skelAnime.playSpeed < 19.0f) &&
|
||||
(this->skelAnime.curFrame >= 19.0f))) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
this->speedXZ = 10.0f;
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
} else {
|
||||
this->speedXZ = 3.0f;
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
}
|
||||
|
||||
func_80AADEF0(this, globalCtx);
|
||||
|
||||
if (func_80AADA70() == 0) {
|
||||
if (this->actor.floorPoly != NULL) {
|
||||
floorYNorm = this->actor.floorPoly->normal.y * 0.00003051851f;
|
||||
|
||||
if ((floorYNorm > 0.9848f) || (floorYNorm < -0.9848f)) {
|
||||
if (this->sitTimer > 30) {
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SIT, &this->curAnimIndex);
|
||||
this->actionFunc = func_80AAE224;
|
||||
} else {
|
||||
this->sitTimer++;
|
||||
}
|
||||
} else {
|
||||
this->sitTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
dustPos.x = this->actor.world.pos.x;
|
||||
dustPos.y = this->actor.world.pos.y;
|
||||
dustPos.z = this->actor.world.pos.z;
|
||||
|
||||
if (gSaveContext.gameMode != 3) {
|
||||
func_80033480(globalCtx, &dustPos, 50.0f, 2, 350, 20, 0);
|
||||
}
|
||||
|
||||
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
|
||||
func_8002F71C(globalCtx, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 4.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAE50C(EnMm* this, GlobalContext* globalCtx) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->sitTimer = 0;
|
||||
this->actionFunc = func_80AAE294;
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_SPRINT, &this->curAnimIndex);
|
||||
this->mouthTexIndex = RM_MOUTH_CLOSED;
|
||||
} else {
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_RUN, &this->curAnimIndex);
|
||||
this->mouthTexIndex = RM_MOUTH_OPEN;
|
||||
}
|
||||
|
||||
this->unk_1E8 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAE598(EnMm* this, GlobalContext* globalCtx) {
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_248, &this->unk_24E, this->actor.focus.pos);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_80AADA70() != 0) && (this->unk_1E0 == 0)) {
|
||||
this->unk_1E0 = 3;
|
||||
this->actionFunc = func_80AAE50C;
|
||||
this->unk_254 &= ~1;
|
||||
EnMm_ChangeAnimation(this, RM_ANIM_STAND, &this->curAnimIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void EnMm_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnMm* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_80AADCD0(this, globalCtx);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
extern Gfx D_0602CA38[]; // bunny hood dlist from object_link_child. replace with proper symbol later
|
||||
|
||||
void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static u64* mouthTextures[] = { gRunningManMouthClosedTex, gRunningManMouthOpenTex };
|
||||
s32 pad;
|
||||
EnMm* this = THIS;
|
||||
|
||||
if (0) {}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm.c", 1065);
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnMm_OverrideLimbDraw, EnMm_PostLimbDraw, this);
|
||||
|
||||
if (gSaveContext.itemGetInf[3] & 0x800) {
|
||||
s32 linkChildObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
|
||||
|
||||
if (linkChildObjBankIndex >= 0) {
|
||||
Mtx* mtx;
|
||||
Vec3s sp50;
|
||||
Mtx* mtx2;
|
||||
|
||||
mtx = Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx) * 2);
|
||||
|
||||
Matrix_Put(&this->unk_208);
|
||||
mtx2 = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_mm.c", 1111);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[linkChildObjBankIndex].segment);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B, mtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx2 - 7);
|
||||
|
||||
sp50.x = 994;
|
||||
sp50.y = 3518;
|
||||
sp50.z = -13450;
|
||||
|
||||
func_800D1694(97.0f, -1203.0f, -240.0f, &sp50);
|
||||
Matrix_ToMtx(mtx++, "../z_en_mm.c", 1124);
|
||||
|
||||
sp50.x = -994;
|
||||
sp50.y = -3518;
|
||||
sp50.z = -13450;
|
||||
|
||||
func_800D1694(97.0f, -1203.0f, 240.0f, &sp50);
|
||||
Matrix_ToMtx(mtx, "../z_en_mm.c", 1131);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0602CA38);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment);
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_mm.c", 1141);
|
||||
}
|
||||
|
||||
s32 EnMm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
EnMm* this = THIS;
|
||||
|
||||
if (this->unk_254 & 1) {
|
||||
switch (limbIndex) {
|
||||
case 8:
|
||||
rot->x += this->unk_24E.y;
|
||||
rot->y -= this->unk_24E.x;
|
||||
break;
|
||||
case 15:
|
||||
rot->x += this->unk_248.y;
|
||||
rot->z += (this->unk_248.x + 0xFA0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnMm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
static Vec3f headOffset = { 200.0f, 800.0f, 0.0f };
|
||||
EnMm* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_MultVec3f(&headOffset, &this->actor.focus.pos);
|
||||
Matrix_Translate(260.0f, 20.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateY(0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(2.5132742f, MTXMODE_APPLY);
|
||||
Matrix_Translate(-260.0f, 58.0f, 10.0f, MTXMODE_APPLY);
|
||||
Matrix_Get(&this->unk_208);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,31 @@
|
|||
|
||||
struct EnMm;
|
||||
|
||||
typedef void (*EnMmActionFunc)(struct EnMm*, GlobalContext*);
|
||||
|
||||
typedef struct EnMm {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x1D4];
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMmActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ s32 unk_1E0;
|
||||
/* 0x01E4 */ s32 mouthTexIndex;
|
||||
/* 0x01E8 */ s32 unk_1E8;
|
||||
/* 0x01EC */ s32 path;
|
||||
/* 0x01F0 */ s32 unk_1F0;
|
||||
/* 0x01F4 */ s32 waypoint;
|
||||
/* 0x01F8 */ f32 yawToWaypoint;
|
||||
/* 0x01FC */ f32 distToWaypoint;
|
||||
/* 0x0200 */ f32 speedXZ;
|
||||
/* 0x0204 */ s32 unk_204;
|
||||
/* 0x0208 */ MtxF unk_208;
|
||||
/* 0x0248 */ Vec3s unk_248;
|
||||
/* 0x024E */ Vec3s unk_24E;
|
||||
/* 0x0254 */ s32 unk_254;
|
||||
/* 0x0258 */ s32 curAnimIndex;
|
||||
/* 0x025C */ s32 sitTimer;
|
||||
/* 0x0260 */ Vec3s jointTable[16];
|
||||
/* 0x02C0 */ Vec3s morphTable[16];
|
||||
} EnMm; // size = 0x0320
|
||||
|
||||
extern const ActorInit En_Mm_InitVars;
|
||||
|
|
|
@ -1,10 +1,32 @@
|
|||
/*
|
||||
* File: z_en_mm.c
|
||||
* Overlay: ovl_En_Mm
|
||||
* Description: Running Man (adult)
|
||||
*/
|
||||
|
||||
#include "z_en_mm2.h"
|
||||
#include "vt.h"
|
||||
#include "objects/object_mm/object_mm.h"
|
||||
|
||||
#define FLAGS 0x00000019
|
||||
|
||||
#define THIS ((EnMm2*)thisx)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ RM2_ANIM_RUN,
|
||||
/* 1 */ RM2_ANIM_SIT,
|
||||
/* 2 */ RM2_ANIM_SIT_WAIT,
|
||||
/* 3 */ RM2_ANIM_STAND,
|
||||
/* 4 */ RM2_ANIM_SPRINT,
|
||||
/* 5 */ RM2_ANIM_EXCITED, // plays when talking to him with bunny hood on
|
||||
/* 6 */ RM2_ANIM_HAPPY // plays when you sell him the bunny hood
|
||||
} RunningManAnimIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ RM2_MOUTH_CLOSED,
|
||||
/* 1 */ RM2_MOUTH_OPEN
|
||||
} RunningManMouthTex;
|
||||
|
||||
void EnMm2_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnMm2_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -15,8 +37,6 @@ void func_80AAF668(EnMm2* this, GlobalContext* globalCtx);
|
|||
s32 EnMm2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx);
|
||||
void EnMm2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
|
||||
|
||||
extern FlexSkeletonHeader D_06005E18;
|
||||
|
||||
const ActorInit En_Mm2_InitVars = {
|
||||
ACTOR_EN_MM2,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -54,12 +74,13 @@ typedef struct {
|
|||
/* 0x04 */ f32 playSpeed;
|
||||
/* 0x08 */ u8 mode;
|
||||
/* 0x0C */ f32 morphFrames;
|
||||
} Mm2AnimationEntry; // size = 0x10
|
||||
} EnMm2AnimEntry; // size = 0x10
|
||||
|
||||
static Mm2AnimationEntry sAnimations[] = {
|
||||
{ 0x06000718, 1.0f, 0, -7.0f }, { 0x06006940, -1.0f, 2, -7.0f }, { 0x06006C50, 1.0f, 0, -7.0f },
|
||||
{ 0x06006940, 1.0f, 2, -7.0f }, { 0x06000468, 1.0f, 0, -7.0f }, { 0x060073A0, 1.0f, 0, -12.0f },
|
||||
{ 0x06008060, 1.0f, 0, -12.0f },
|
||||
static EnMm2AnimEntry sAnimationEntries[] = {
|
||||
{ &gRunningManRunAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManSitStandAnim, -1.0f, ANIMMODE_ONCE, -7.0f },
|
||||
{ &gRunningManSitWaitAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManSitStandAnim, 1.0f, ANIMMODE_ONCE, -7.0f },
|
||||
{ &gRunningManSprintAnim, 1.0f, ANIMMODE_LOOP, -7.0f }, { &gRunningManExcitedAnim, 1.0f, ANIMMODE_LOOP, -12.0f },
|
||||
{ &gRunningManHappyAnim, 1.0f, ANIMMODE_LOOP, -12.0f },
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
|
@ -72,17 +93,19 @@ void EnMm2_ChangeAnimation(EnMm2* this, s32 animationIndex, s32* previousAnimati
|
|||
if ((*previousAnimation < 0) || (animationIndex == *previousAnimation)) {
|
||||
phi_f0 = 0.0f;
|
||||
} else {
|
||||
phi_f0 = sAnimations[animationIndex].morphFrames;
|
||||
phi_f0 = sAnimationEntries[animationIndex].morphFrames;
|
||||
}
|
||||
|
||||
if (sAnimations[animationIndex].playSpeed >= 0.0f) {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animationIndex].animation, sAnimations[animationIndex].playSpeed,
|
||||
0.0f, (f32)Animation_GetLastFrame(sAnimations[animationIndex].animation),
|
||||
sAnimations[animationIndex].mode, phi_f0);
|
||||
if (sAnimationEntries[animationIndex].playSpeed >= 0.0f) {
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[animationIndex].animation,
|
||||
sAnimationEntries[animationIndex].playSpeed, 0.0f,
|
||||
(f32)Animation_GetLastFrame(sAnimationEntries[animationIndex].animation),
|
||||
sAnimationEntries[animationIndex].mode, phi_f0);
|
||||
} else {
|
||||
Animation_Change(&this->skelAnime, sAnimations[animationIndex].animation, sAnimations[animationIndex].playSpeed,
|
||||
(f32)Animation_GetLastFrame(sAnimations[animationIndex].animation), 0.0f,
|
||||
sAnimations[animationIndex].mode, phi_f0);
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[animationIndex].animation,
|
||||
sAnimationEntries[animationIndex].playSpeed,
|
||||
(f32)Animation_GetLastFrame(sAnimationEntries[animationIndex].animation), 0.0f,
|
||||
sAnimationEntries[animationIndex].mode, phi_f0);
|
||||
}
|
||||
*previousAnimation = animationIndex;
|
||||
}
|
||||
|
@ -115,14 +138,15 @@ void EnMm2_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06005E18, NULL, this->jointTable, this->morphTable, 16);
|
||||
Animation_Change(&this->skelAnime, sAnimations[2].animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[2].animation), sAnimations[2].mode, sAnimations[2].morphFrames);
|
||||
this->previousAnimation = 2;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable, 16);
|
||||
Animation_Change(&this->skelAnime, sAnimationEntries[RM2_ANIM_SIT_WAIT].animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimationEntries[RM2_ANIM_SIT_WAIT].animation),
|
||||
sAnimationEntries[RM2_ANIM_SIT_WAIT].mode, sAnimationEntries[RM2_ANIM_SIT_WAIT].morphFrames);
|
||||
this->previousAnimation = RM2_ANIM_SIT_WAIT;
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->unk_1E0 = 0;
|
||||
this->mouthTexIndex = RM2_MOUTH_CLOSED;
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1F4 |= 1;
|
||||
this->actor.gravity = -1.0f;
|
||||
|
@ -157,14 +181,14 @@ s32 func_80AAF224(EnMm2* this, GlobalContext* globalCtx, EnMm2ActionFunc actionF
|
|||
return 1;
|
||||
}
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((ABS(yawDiff) < 0x4301) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
if ((ABS(yawDiff) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80AAF2BC(EnMm2* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_1F6 >= 61) {
|
||||
if (this->unk_1F6 > 60) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
@ -176,7 +200,7 @@ void func_80AAF330(EnMm2* this, GlobalContext* globalCtx) {
|
|||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actionFunc = func_80AAF2BC;
|
||||
EnMm2_ChangeAnimation(this, 0, &this->previousAnimation);
|
||||
this->unk_1E0 = 1;
|
||||
this->mouthTexIndex = RM2_MOUTH_OPEN;
|
||||
if (!(this->unk_1F4 & 2)) {
|
||||
func_80106CCC(globalCtx);
|
||||
}
|
||||
|
@ -187,6 +211,7 @@ void func_80AAF330(EnMm2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AAF3C0(EnMm2* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
switch (this->actor.textId) {
|
||||
case 0x607D:
|
||||
case 0x607E:
|
||||
|
@ -218,6 +243,7 @@ void func_80AAF3C0(EnMm2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (func_8002F334(&this->actor, globalCtx)) {
|
||||
if (this->actor.textId == 0x607F) {
|
||||
func_80088AA0(0);
|
||||
|
@ -292,12 +318,12 @@ void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static UNK_PTR D_80AAFB60[] = { 0x06000E30, 0x06000C30 };
|
||||
static u64* mouthTextures[] = { gRunningManMouthClosedTex, gRunningManMouthOpenTex };
|
||||
EnMm2* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 634);
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AAFB60[this->unk_1E0]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnMm2_OverrideLimbDraw, EnMm2_PostLimbDraw, this);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 654);
|
||||
|
@ -316,14 +342,15 @@ s32 EnMm2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
rot->z += this->unk_1E8.x + 0xFA0;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnMm2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
static Vec3f D_80AAFB68 = { 200.0f, 800.0f, 0.0f };
|
||||
static Vec3f headOffset = { 200.0f, 800.0f, 0.0f };
|
||||
EnMm2* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_MultVec3f(&D_80AAFB68, &this->actor.focus.pos);
|
||||
Matrix_MultVec3f(&headOffset, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct EnMm2 {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMm2ActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ s32 unk_1E0;
|
||||
/* 0x01E0 */ s32 mouthTexIndex;
|
||||
/* 0x01E4 */ char unk_1E4[0x4];
|
||||
/* 0x01E8 */ Vec3s unk_1E8;
|
||||
/* 0x01EE */ Vec3s unk_1EE;
|
||||
|
|
|
@ -92,7 +92,7 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
{ 10, 44, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ZL4_ANIM_0,
|
||||
|
@ -131,7 +131,7 @@ typedef enum {
|
|||
/* 33 */ ZL4_ANIM_33
|
||||
} EnZl4Animation;
|
||||
|
||||
struct_80034EC0_Entry sAnimationEntries[] = {
|
||||
static struct_80034EC0_Entry sAnimationEntries[] = {
|
||||
/* 0 */ /* standing idle */ { &gChildZeldaAnim_000654, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
/* 1 */ /* moves to introduce herself */ { &gChildZeldaAnim_00E5C8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
|
||||
/* 2 */ /* introducing herself */ { &gChildZeldaAnim_00EBC4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue