mirror of https://github.com/zeldaret/mm.git
En_Guruguru OK and partially documented (#203)
* En_Guruguru OK and partially documented * Renamed texture arrays * Made text ID array static * Made most of the suggested changes
This commit is contained in:
parent
afad253fa8
commit
1d350f1bad
|
@ -3908,8 +3908,8 @@ void func_8019FAD8(Vec3f* param_1, u16 param_2, f32 param_3);
|
|||
// void func_801A1904(void);
|
||||
// void func_801A1A10(void);
|
||||
// void func_801A1A8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
// void func_801A1D44(void);
|
||||
// void func_801A1DB8(void);
|
||||
void func_801A1D44(Vec3f* vec, UNK_TYPE arg1, f32 arg2);
|
||||
void func_801A1DB8(Vec3f* vec, UNK_TYPE arg1, f32 arg2);
|
||||
// void func_801A1E0C(void);
|
||||
void func_801A1F00(s32 arg0, s32 arg1);
|
||||
void func_801A1F88(void);
|
||||
|
@ -3923,7 +3923,7 @@ void func_801A246C(u8 param_1, u8 param_2);
|
|||
// void func_801A2778(void);
|
||||
// void func_801A27E8(void);
|
||||
// void func_801A281C(void);
|
||||
// void func_801A29D4(void);
|
||||
void func_801A29D4(UNK_TYPE arg0, f32 arg1, UNK_TYPE arg2);
|
||||
// void func_801A2BB8(void);
|
||||
// void func_801A2C20(void);
|
||||
// void func_801A2C44(void);
|
||||
|
@ -3946,7 +3946,7 @@ u8 func_801A39F8(void);
|
|||
// void func_801A3A7C(void);
|
||||
// void func_801A3AC0(void);
|
||||
// void func_801A3AEC(void);
|
||||
// void func_801A3B48(void);
|
||||
void func_801A3B48(UNK_TYPE arg0);
|
||||
// void func_801A3B90(void);
|
||||
void func_801A3CD8(s8 param_1);
|
||||
// void func_801A3CF4(void);
|
||||
|
|
|
@ -32,6 +32,7 @@ typedef enum {
|
|||
/* 0x16 */ ITEM_FAIRY,
|
||||
/* 0x38 */ ITEM_MASK_ALL_NIGHT = 0x38,
|
||||
/* 0x3B */ ITEM_MASK_GARO = 0x3B,
|
||||
/* 0x46 */ ITEM_MASK_BREMEN = 0x46,
|
||||
/* 0x4D */ ITEM_SWORD_KOKIRI = 0x4D,
|
||||
/* 0x4E */ ITEM_SWORD_RAZOR,
|
||||
/* 0x4F */ ITEM_SWORD_GILDED,
|
||||
|
@ -90,6 +91,7 @@ typedef enum {
|
|||
/* 0x5D */ GI_POTION_BLUE,
|
||||
/* 0x5E */ GI_FAIRY,
|
||||
/* 0x7E */ GI_MASK_ALL_NIGHT = 0x7E,
|
||||
/* 0x8C */ GI_MASK_BREMEN = 0x8C,
|
||||
/* 0x9B */ GI_SWORD_GREAT_FAIRY = 0x9B,
|
||||
/* 0x9C */ GI_SWORD_KOKIRI,
|
||||
/* 0x9D */ GI_SWORD_RAZOR,
|
||||
|
|
|
@ -7937,9 +7937,9 @@ SECTIONS
|
|||
ovl_En_Guruguru : AT(RomLocation)
|
||||
{
|
||||
build/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.o(.text)
|
||||
build/asm/overlays/ovl_En_Guruguru_data.o(.data)
|
||||
build/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.o(.data)
|
||||
build/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.o(.rodata)
|
||||
build/asm/overlays/ovl_En_Guruguru_rodata.o(.rodata)
|
||||
build/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru_overlay.o(.ovl)
|
||||
}
|
||||
SegmentEnd = .;
|
||||
SegmentSize = SegmentEnd - SegmentStart;
|
||||
|
|
|
@ -291,6 +291,15 @@ object_ginko_floorsmacking_anim = 0x060008C0;
|
|||
object_ginko_amazed_anim = 0x06004A7C;
|
||||
object_ginko_advertising_anim = 0x06000AC4;
|
||||
|
||||
/* z_en_guruguru */
|
||||
D_06006C90 = 0x06006C90;
|
||||
D_06000B04 = 0x06000B04;
|
||||
D_0600057C = 0x0600057C;
|
||||
D_06005F20 = 0x06005F20;
|
||||
D_06006320 = 0x06006320;
|
||||
D_06006720 = 0x06006720;
|
||||
D_06006920 = 0x06006920;
|
||||
|
||||
/* z_en_in */
|
||||
D_06014EA8 = 0x06014EA8;
|
||||
D_06015E38 = 0x06015E38;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_en_guruguru.c
|
||||
* Overlay: ovl_En_Guruguru
|
||||
* Description: Guru Guru
|
||||
*/
|
||||
|
||||
#include "z_en_guruguru.h"
|
||||
|
||||
#define FLAGS 0x00000019
|
||||
|
@ -9,7 +15,25 @@ void EnGuruguru_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnGuruguru_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnGuruguru_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void EnGuruguru_DoNothing(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
void func_80BC6E10(EnGuruguru* this);
|
||||
void func_80BC6F14(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
void func_80BC701C(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
void func_80BC7068(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
void func_80BC73F4(EnGuruguru* this);
|
||||
void func_80BC7440(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
void func_80BC7520(EnGuruguru* this, GlobalContext* globalCtx);
|
||||
|
||||
extern FlexSkeletonHeader D_06006C90;
|
||||
extern ColliderCylinderInit D_80BC79A0;
|
||||
extern AnimationHeader D_06000B04;
|
||||
extern AnimationHeader D_0600057C;
|
||||
|
||||
extern u64 D_06005F20[];
|
||||
extern u64 D_06006320[];
|
||||
extern u64 D_06006720[];
|
||||
extern u64 D_06006920[];
|
||||
|
||||
const ActorInit En_Guruguru_InitVars = {
|
||||
ACTOR_EN_GURUGURU,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -21,32 +45,356 @@ const ActorInit En_Guruguru_InitVars = {
|
|||
(ActorFunc)EnGuruguru_Update,
|
||||
(ActorFunc)EnGuruguru_Draw,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/EnGuruguru_Init.asm")
|
||||
static u16 textIDs[] = { 0x292A, 0x292B, 0x292C, 0x292D, 0x292E, 0x292F, 0x2930, 0x2931,
|
||||
0x2932, 0x2933, 0x2934, 0x2935, 0x2936, 0x294D, 0x294E };
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/EnGuruguru_Destroy.asm")
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_NONE,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_2,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_NONE,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 15, 20, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC6D64.asm")
|
||||
static AnimationHeader* D_80BC79CC[] = { &D_06000B04, &D_0600057C };
|
||||
static u8 D_80BC79D4[] = { 0 };
|
||||
static f32 D_80BC79D8[] = { 1.0f, 1.0f };
|
||||
static void* sEyeTextures[] = { D_06005F20, D_06006320 };
|
||||
static void* sMouthTextures[] = { D_06006720, D_06006920 };
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC6E00.asm")
|
||||
void EnGuruguru_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuruguru* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC6E10.asm")
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 19.0f);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06006C90, &D_06000B04, this->jointTable, this->morphTable,
|
||||
16);
|
||||
this->actor.targetMode = 0;
|
||||
if (this->actor.params != 2) {
|
||||
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
}
|
||||
if (!gSaveContext.isNight) {
|
||||
if (this->actor.params == 0) {
|
||||
func_80BC6E10(this);
|
||||
} else if (this->actor.params == 2) {
|
||||
this->actor.flags |= 0x8000000;
|
||||
this->actor.draw = NULL;
|
||||
this->actor.flags &= ~1;
|
||||
this->actionFunc = EnGuruguru_DoNothing;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
} else if (this->actor.params == 1) {
|
||||
func_80BC6E10(this);
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC6F14.asm")
|
||||
void EnGuruguru_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuruguru* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC701C.asm")
|
||||
if (this->actor.params != 2) {
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC7068.asm")
|
||||
void EnGuruguru_ChangeAnimation(EnGuruguru* this, s32 arg1) {
|
||||
this->frameCount = SkelAnime_GetFrameCount(&D_80BC79CC[arg1]->common);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, D_80BC79CC[arg1], D_80BC79D8[arg1], 0.0f, this->frameCount, D_80BC79D4[arg1],
|
||||
-4.0f);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC73F4.asm")
|
||||
void EnGuruguru_DoNothing(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC7440.asm")
|
||||
void func_80BC6E10(EnGuruguru* this) {
|
||||
EnGuruguru_ChangeAnimation(this, 0);
|
||||
this->textIdIndex = 0;
|
||||
this->unk270 = 0;
|
||||
if (this->actor.params == 0) {
|
||||
if (gSaveContext.weekEventReg[38] & 0x10) {
|
||||
this->textIdIndex = 1;
|
||||
}
|
||||
} else if (gSaveContext.weekEventReg[38] & 0x40) {
|
||||
this->textIdIndex = 2;
|
||||
} else {
|
||||
this->textIdIndex = 3;
|
||||
this->unk270 = 1;
|
||||
}
|
||||
this->headZRotTarget = 0;
|
||||
this->unk268 = 1;
|
||||
this->actor.textId = textIDs[this->textIdIndex];
|
||||
if ((this->textIdIndex == 0 || this->textIdIndex == 1) && (gSaveContext.weekEventReg[77] & 4)) {
|
||||
if (!(gSaveContext.weekEventReg[88] & 4)) {
|
||||
this->actor.textId = 0x295F;
|
||||
} else {
|
||||
this->actor.textId = 0x2960;
|
||||
}
|
||||
}
|
||||
this->unk272 = 0;
|
||||
this->actionFunc = func_80BC6F14;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC7520.asm")
|
||||
void func_80BC6F14(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
s16 yaw;
|
||||
s16 yawTemp;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/EnGuruguru_Update.asm")
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
if (this->unk270 != 0) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/func_80BC77EC.asm")
|
||||
this->textIdIndex = 3;
|
||||
if (player->transformation == PLAYER_FORM_DEKU) {
|
||||
this->textIdIndex = 13;
|
||||
if (gSaveContext.weekEventReg[79] & 4) {
|
||||
this->textIdIndex = 14;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Guruguru_0x80BC6BF0/EnGuruguru_Draw.asm")
|
||||
this->actor.textId = textIDs[this->textIdIndex];
|
||||
}
|
||||
|
||||
yawTemp = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
yaw = ABS_ALT(yawTemp);
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx)) {
|
||||
func_80BC701C(this, globalCtx);
|
||||
} else if (yaw <= 0x2890) {
|
||||
func_800B8614(&this->actor, globalCtx, 60.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BC701C(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((this->unk268 != 0) &&
|
||||
(player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU)) {
|
||||
this->headZRotTarget = 5000;
|
||||
}
|
||||
|
||||
this->unk266 = 1;
|
||||
this->unk272 = 1;
|
||||
this->actionFunc = func_80BC7068;
|
||||
}
|
||||
|
||||
void func_80BC7068(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
if (this->unk268 != 0) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
} else if (this->unusedTimer == 0) {
|
||||
this->unusedTimer = 6;
|
||||
if (func_80152498(&globalCtx->msgCtx) != 5) {
|
||||
if (this->unk266 == 0) {
|
||||
if (this->headZRotTarget != 0) {
|
||||
this->headZRotTarget = 0;
|
||||
} else {
|
||||
this->headZRotTarget = 5000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((player->transformation == PLAYER_FORM_HUMAN) || (player->transformation == PLAYER_FORM_DEKU)) {
|
||||
this->headZRotTarget = 5000;
|
||||
} else {
|
||||
this->headZRotTarget = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((func_80152498(&globalCtx->msgCtx) == 5) && (func_80147624(globalCtx))) {
|
||||
func_801477B4(globalCtx);
|
||||
this->headZRotTarget = 0;
|
||||
if ((this->textIdIndex == 13) || (this->textIdIndex == 14)) {
|
||||
func_80151BB4(globalCtx, 0x13);
|
||||
gSaveContext.weekEventReg[79] |= 4;
|
||||
func_80BC6E10(this);
|
||||
return;
|
||||
}
|
||||
if (this->actor.params == 0) {
|
||||
if (this->actor.textId == 0x295F) {
|
||||
gSaveContext.weekEventReg[88] |= 4;
|
||||
}
|
||||
if (this->actor.textId == 0x292A) {
|
||||
gSaveContext.weekEventReg[38] |= 0x10;
|
||||
}
|
||||
func_80151BB4(globalCtx, 0x13);
|
||||
func_80BC6E10(this);
|
||||
return;
|
||||
}
|
||||
if (this->textIdIndex == 11) {
|
||||
func_80BC73F4(this);
|
||||
return;
|
||||
}
|
||||
if (this->textIdIndex == 12) {
|
||||
gSaveContext.weekEventReg[38] |= 0x40;
|
||||
func_801A3B48(0);
|
||||
func_80151BB4(globalCtx, 0x36);
|
||||
func_80151BB4(globalCtx, 0x13);
|
||||
func_80BC6E10(this);
|
||||
return;
|
||||
}
|
||||
if (this->textIdIndex >= 3) {
|
||||
if ((this->textIdIndex == 0xA) && (INV_CONTENT(ITEM_MASK_BREMEN) == ITEM_MASK_BREMEN)) {
|
||||
this->textIdIndex = 0xC;
|
||||
this->unk268 = 0;
|
||||
} else {
|
||||
this->textIdIndex++;
|
||||
this->unk268++;
|
||||
this->unk268 &= 1;
|
||||
if (this->textIdIndex == 11) {
|
||||
this->unk268 = 0;
|
||||
}
|
||||
}
|
||||
this->texIndex = 0;
|
||||
if (this->textIdIndex == 7) {
|
||||
this->texIndex = 1;
|
||||
}
|
||||
if ((this->unk268 != 0) && (this->textIdIndex >= 7)) {
|
||||
this->skelAnime.animPlaybackSpeed = 2.0f;
|
||||
func_801A29D4(3, 1.18921f, 2);
|
||||
func_801A3B48(0);
|
||||
} else {
|
||||
if (this->skelAnime.animPlaybackSpeed == 2.0f) {
|
||||
func_801A29D4(3, 1.0f, 2);
|
||||
}
|
||||
if (this->unk268 == 0) {
|
||||
func_801A3B48(1);
|
||||
} else {
|
||||
func_801A3B48(0);
|
||||
}
|
||||
this->skelAnime.animPlaybackSpeed = 1.0f;
|
||||
}
|
||||
this->unk266 = 1;
|
||||
func_80151938(globalCtx, textIDs[this->textIdIndex]);
|
||||
return;
|
||||
}
|
||||
func_801A3B48(0);
|
||||
func_80151BB4(globalCtx, 0x13);
|
||||
func_80BC6E10(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BC73F4(EnGuruguru* this) {
|
||||
func_801A3B48(0);
|
||||
this->unk268 = 1;
|
||||
this->headZRotTarget = 0;
|
||||
this->unk272 = 2;
|
||||
this->actionFunc = func_80BC7440;
|
||||
}
|
||||
|
||||
void func_80BC7440(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actor.parent = NULL;
|
||||
this->textIdIndex++;
|
||||
this->actor.textId = textIDs[this->textIdIndex];
|
||||
func_801A3B48(1);
|
||||
func_800B8500(&this->actor, globalCtx, 400.0f, 400.0f, -1);
|
||||
this->unk268 = 0;
|
||||
gSaveContext.weekEventReg[38] |= 0x40;
|
||||
this->actionFunc = func_80BC7520;
|
||||
} else {
|
||||
func_800B8A1C(&this->actor, globalCtx, GI_MASK_BREMEN, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BC7520(EnGuruguru* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
if (func_800B84D0(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80BC7068;
|
||||
} else {
|
||||
func_800B8500(&this->actor, globalCtx, 400.0f, 400.0f, -1);
|
||||
}
|
||||
}
|
||||
|
||||
void EnGuruguru_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuruguru* this = THIS;
|
||||
s32 yaw;
|
||||
Player* player = PLAYER;
|
||||
s16 yawTemp;
|
||||
|
||||
if (!gSaveContext.isNight) {
|
||||
if (this->actor.params == 1) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
} else if (this->actor.params == 0 || this->actor.params == 2) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (this->actor.params == 2) {
|
||||
if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f) {
|
||||
func_801A1DB8(&this->actor.projectedPos, 0x2E, 540.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 200.0f) {
|
||||
func_801A1D44(&this->actor.projectedPos, 0x2E, 540.0f);
|
||||
}
|
||||
if (this->unusedTimer != 0) {
|
||||
this->unusedTimer--;
|
||||
}
|
||||
if (this->unk266 != 0) {
|
||||
this->unk266--;
|
||||
}
|
||||
|
||||
yawTemp = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
yaw = ABS_ALT(yawTemp);
|
||||
this->headXRotTarget = 0;
|
||||
if (yaw < 0x2AF8) {
|
||||
this->headXRotTarget = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
|
||||
if (this->headXRotTarget > 5000) {
|
||||
this->headXRotTarget = 5000;
|
||||
} else if (this->headXRotTarget < -5000) {
|
||||
this->headXRotTarget = -5000;
|
||||
}
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
Actor_SetHeight(&this->actor, 50.0f);
|
||||
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
|
||||
Math_SmoothStepToS(&this->headXRot, this->headXRotTarget, 1, 3000, 0);
|
||||
Math_SmoothStepToS(&this->headZRot, this->headZRotTarget, 1, 1000, 0);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
s32 EnGuruguru_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnGuruguru* this = THIS;
|
||||
|
||||
if (limbIndex == 14) {
|
||||
rot->x += this->headXRot;
|
||||
rot->z += this->headZRot;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnGuruguru_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGuruguru* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->texIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->texIndex]));
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
EnGuruguru_OverrideLimbDraw, NULL, &this->actor);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
|
|
@ -5,9 +5,29 @@
|
|||
|
||||
struct EnGuruguru;
|
||||
|
||||
typedef void (*EnGuruguruActionFunc)(struct EnGuruguru*, GlobalContext*);
|
||||
|
||||
typedef struct EnGuruguru {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x180];
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[16];
|
||||
/* 0x1E8 */ Vec3s morphTable[16];
|
||||
/* 0x248 */ EnGuruguruActionFunc actionFunc;
|
||||
/* 0x24C */ s16 headZRot;
|
||||
/* 0x24E */ s16 headXRot;
|
||||
/* 0x250 */ char unk250[0x2];
|
||||
/* 0x252 */ s16 headZRotTarget;
|
||||
/* 0x254 */ s16 headXRotTarget;
|
||||
/* 0x256 */ char unk256[0xE];
|
||||
/* 0x264 */ s16 unusedTimer; // set to 6 and decremented, but never has any effect
|
||||
/* 0x266 */ s16 unk266;
|
||||
/* 0x268 */ s16 unk268;
|
||||
/* 0x26C */ f32 frameCount;
|
||||
/* 0x270 */ u8 unk270;
|
||||
/* 0x272 */ s16 unk272; // set, but never used
|
||||
/* 0x274 */ s16 textIdIndex;
|
||||
/* 0x276 */ s16 texIndex;
|
||||
/* 0x278 */ ColliderCylinder collider;
|
||||
} EnGuruguru; // size = 0x2C4
|
||||
|
||||
extern const ActorInit En_Guruguru_InitVars;
|
||||
|
|
|
@ -15590,8 +15590,8 @@
|
|||
0x80BC61D0:("EnPoComposer_Draw",),
|
||||
0x80BC6BF0:("EnGuruguru_Init",),
|
||||
0x80BC6D28:("EnGuruguru_Destroy",),
|
||||
0x80BC6D64:("func_80BC6D64",),
|
||||
0x80BC6E00:("func_80BC6E00",),
|
||||
0x80BC6D64:("EnGuruguru_ChangeAnimation",),
|
||||
0x80BC6E00:("EnGuruguru_DoNothing",),
|
||||
0x80BC6E10:("func_80BC6E10",),
|
||||
0x80BC6F14:("func_80BC6F14",),
|
||||
0x80BC701C:("func_80BC701C",),
|
||||
|
@ -15600,7 +15600,7 @@
|
|||
0x80BC7440:("func_80BC7440",),
|
||||
0x80BC7520:("func_80BC7520",),
|
||||
0x80BC7590:("EnGuruguru_Update",),
|
||||
0x80BC77EC:("func_80BC77EC",),
|
||||
0x80BC77EC:("EnGuruguru_OverrideLimbDraw",),
|
||||
0x80BC7834:("EnGuruguru_Draw",),
|
||||
0x80BC7AD0:("OceffWipe5_Init",),
|
||||
0x80BC7B28:("OceffWipe5_Destroy",),
|
||||
|
|
Loading…
Reference in New Issue