mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
Gossip Stone, 1 nonmatching (#251)
* Gossip Stone, 1 nonmatching * Appease the Fig * spec * Fix last function ordering * Ethan Review 1 * a * Hidden PR notes QQ * a * Fixed now?? * a
This commit is contained in:
parent
06d1743d22
commit
83d08078c3
22 changed files with 590 additions and 1611 deletions
|
@ -9,7 +9,23 @@ void EnGs_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnGs_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
void func_80A4F734(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F77C(EnGs* this);
|
||||
|
||||
void func_80A4E910(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4EA08(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4EB3C(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4ED34(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F13C(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4E648(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4E470(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F700(EnGs* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_0404D4E0[];
|
||||
extern Gfx D_06000950[];
|
||||
extern Gfx D_060009D0[];
|
||||
extern Gfx D_06000A60[];
|
||||
|
||||
const ActorInit En_Gs_InitVars = {
|
||||
ACTOR_EN_GS,
|
||||
ACTORTYPE_PROP,
|
||||
|
@ -21,35 +37,558 @@ const ActorInit En_Gs_InitVars = {
|
|||
(ActorFunc)EnGs_Update,
|
||||
(ActorFunc)EnGs_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/EnGs_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/EnGs_Destroy.s")
|
||||
static ColliderCylinderInit D_80A4FDA0 = {
|
||||
{ COLTYPE_UNK12, 0x00, 0x0D, 0x39, 0x20, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{ 21, 48, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4E3EC.s")
|
||||
CollisionCheckInfoInit2 D_80A4FDCC = { 0x00, 0x0000, 0x0000, 0x0000, 0xFF };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4E470.s")
|
||||
DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0,
|
||||
0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4E648.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4E754.s")
|
||||
Color_RGBA8 D_80A4FDFC = { 0xFF, 0x32, 0x32, 0x00 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4E910.s")
|
||||
Color_RGBA8 D_80A4FE00 = { 0x32, 0x32, 0xFF, 0x00 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4EA08.s")
|
||||
Color_RGBA8 D_80A4FE04 = { 0xFF, 0xFF, 0xFF, 0x00 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4EB3C.s")
|
||||
Vec3f D_80A4FE08 = { 0.0f, -0.3f, 0.0f };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4ED34.s")
|
||||
Color_RGBA8 D_80A4FE14 = { 0xC8, 0xC8, 0xC8, 0x80 };
|
||||
|
||||
Color_RGBA8 D_80A4FE18 = { 0x64, 0x64, 0x64, 0x00 };
|
||||
|
||||
Vec3f D_80A4FE1C = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Vec3f D_80A4FE28 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Vec3s D_80A4FE34 = { 0x0000, 0x0000, 0x0000 };
|
||||
|
||||
Vec3f D_80A4FE3C = { 1.0f, 1.0f, 1.0f };
|
||||
|
||||
void EnGs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGs* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
Collider_InitCylinder(globalCtx, &this->unk_14C);
|
||||
Collider_SetCylinder(globalCtx, &this->unk_14C, thisx, &D_80A4FDA0);
|
||||
func_80061EFC(&thisx->colChkInfo, &D_80A4FDD8, &D_80A4FDCC);
|
||||
|
||||
thisx->unk_1F = 6;
|
||||
this->unk_1D8 = thisx->posRot.pos;
|
||||
this->actionFunc = func_80A4F734;
|
||||
this->unk_1B4[0].x = 1.0f;
|
||||
this->unk_1B4[0].y = 1.0f;
|
||||
this->unk_1B4[0].z = 1.0f;
|
||||
this->unk_1B4[1].x = 1.0f;
|
||||
this->unk_1B4[1].y = 1.0f;
|
||||
this->unk_1B4[1].z = 1.0f;
|
||||
}
|
||||
|
||||
void EnGs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
s32 func_80A4E3EC(EnGs* this, GlobalContext* globalCtx) {
|
||||
s32 ret = 2;
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
case 6:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x2054:
|
||||
this->actor.textId = (this->actor.params & 0xFF) + 0x400;
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void func_80A4E470(EnGs* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
bREG(15) = 0;
|
||||
if (this->actor.xzDistFromLink <= 100.0f) {
|
||||
bREG(15) = 1;
|
||||
if (this->unk_19D == 0) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
if (player->stateFlags2 & 0x1000000) {
|
||||
func_8010BD58(globalCtx, 1);
|
||||
this->unk_19D |= 1;
|
||||
}
|
||||
|
||||
} else if (this->unk_19D & 1) {
|
||||
if (globalCtx->msgCtx.unk_E3EE == 4) {
|
||||
if ((globalCtx->msgCtx.unk_E3F2 == 6) || (globalCtx->msgCtx.unk_E3F2 == 7) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == 8) || (globalCtx->msgCtx.unk_E3F2 == 9) ||
|
||||
(globalCtx->msgCtx.unk_E3F2 == 10)) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.posRot.pos.x,
|
||||
this->actor.posRot.pos.y + 40.0f, this->actor.posRot.pos.z, 0, 0, 0, 2);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
} else if (globalCtx->msgCtx.unk_E3F2 == 11) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.posRot.pos.x,
|
||||
this->actor.posRot.pos.y + 40.0f, this->actor.posRot.pos.z, 0, 0, 0, 7);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
}
|
||||
this->unk_19D = 0;
|
||||
Flags_SetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F);
|
||||
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
|
||||
player->stateFlags2 |= 0x800000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A4E648(EnGs* this, GlobalContext* globalCtx) {
|
||||
s16 sp26;
|
||||
s16 sp24;
|
||||
|
||||
if (this->unk_19C == 1) {
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
this->unk_19C = 2;
|
||||
} else if (this->unk_19C == 2) {
|
||||
this->unk_19C = func_80A4E3EC(this, globalCtx);
|
||||
} else if (func_8002F194(&this->actor, globalCtx)) {
|
||||
this->unk_19C = 2;
|
||||
} else {
|
||||
func_8002F374(globalCtx, &this->actor, &sp26, &sp24);
|
||||
if ((sp26 >= 0) && (sp26 < 0x141) && (sp24 >= 0) && (sp24 < 0xF1) && (this->unk_19C != 3)) {
|
||||
if (func_8002F2CC(&this->actor, globalCtx, 40.0f) == 1) {
|
||||
if (func_8008F080(globalCtx) == 8) {
|
||||
this->actor.textId = 0x2054;
|
||||
} else {
|
||||
this->actor.textId = 0x2053;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f32 func_80A4E754(EnGs* this, GlobalContext* globalCtx, f32* arg2, f32* arg3, u16* arg4, f32 arg5, f32 arg6, f32 arg7,
|
||||
s32 arg8, s32 arg9) {
|
||||
f32 sp2C = Math_SmoothScaleMaxMinF(arg2, *arg3, arg5, arg6, arg7);
|
||||
|
||||
if (arg9 == 0) {
|
||||
sp2C = Math_SmoothScaleMaxMinF(arg2, *arg3, arg5, arg6, arg7);
|
||||
this->unk_1B4[0].x = 1.0f + (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * 0.017453292f) * *arg2);
|
||||
this->unk_1B4[0].y = 1.0f - (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * 0.017453292f) * *arg2);
|
||||
*arg4 += 1;
|
||||
}
|
||||
return sp2C;
|
||||
}
|
||||
|
||||
void func_80A4E910(EnGs* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_19F == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK);
|
||||
this->unk_200 = 0;
|
||||
this->unk_19F = 1;
|
||||
this->unk_1E8 = 0.5f;
|
||||
this->unk_1EC = 0.0f;
|
||||
} else if ((this->unk_19F == 1) && (func_80A4E754(this, globalCtx, &this->unk_1E8, &this->unk_1EC, &this->unk_200,
|
||||
0.8f, 0.007f, 0.001f, 7, 0) == 0.0f)) {
|
||||
if (!Gameplay_InCsMode(globalCtx)) {
|
||||
func_8010B680(globalCtx, 0x71B1, NULL);
|
||||
}
|
||||
this->unk_19C = 0;
|
||||
this->actionFunc = func_80A4F734;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A4EA08(EnGs* this, GlobalContext* globalCtx) {
|
||||
s32 temp_t8;
|
||||
|
||||
if (this->unk_19F == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK);
|
||||
this->unk_1E8 = 0.3f;
|
||||
this->unk_1EC = 0.0f;
|
||||
this->unk_200 = 0;
|
||||
this->unk_19F = 1;
|
||||
} else if (this->unk_19F == 1) {
|
||||
this->unk_1A0[0].z = (((this->unk_200 % 8) * 0.125f) * 360.0f) * 182.04445f;
|
||||
this->unk_1A0[1].z = -this->unk_1A0[0].z;
|
||||
if (func_80A4E754(this, globalCtx, &this->unk_1E8, &this->unk_1EC, &this->unk_200, 0.8f, 0.005f, 0.001f, 7,
|
||||
0) == 0.0f) {
|
||||
this->unk_19C = 0;
|
||||
this->actionFunc = func_80A4F734;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A4EB3C(EnGs* this, GlobalContext* globalCtx) {
|
||||
f32 ret;
|
||||
|
||||
if (this->unk_19F == 0) {
|
||||
this->unk_1E8 = this->unk_1B4[0].y - 1.0f;
|
||||
this->unk_1EC = -0.8f;
|
||||
this->unk_19F++;
|
||||
} else if (this->unk_19F == 1) {
|
||||
ret = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 1.0f, 0.4f, 0.001f);
|
||||
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
|
||||
if (ret == 0.0f) {
|
||||
this->unk_200 = 0;
|
||||
this->unk_19F++;
|
||||
}
|
||||
} else if (this->unk_19F == 2) {
|
||||
this->unk_200++;
|
||||
if (this->unk_200 >= 100) {
|
||||
this->unk_19F++;
|
||||
this->unk_1E8 = this->unk_1B4[0].y - 1.0f;
|
||||
this->unk_1EC = 0.0f;
|
||||
}
|
||||
} else if (this->unk_19F == 3) {
|
||||
ret = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 1.0f, 0.5f, 0.001f);
|
||||
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
|
||||
if (ret == 0.0f) {
|
||||
this->unk_1E8 = 0.5f;
|
||||
this->unk_1EC = 0.0f;
|
||||
this->unk_200 = 0;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK);
|
||||
this->unk_19F++;
|
||||
}
|
||||
} else if (this->unk_19F == 4) {
|
||||
if (func_80A4E754(this, globalCtx, &this->unk_1E8, &this->unk_1EC, &this->unk_200, 1.0f, 0.03f, 0.001f, 5, 0) ==
|
||||
0.0f) {
|
||||
this->unk_19C = 0;
|
||||
this->actionFunc = func_80A4F734;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
|
||||
u8 i;
|
||||
Vec3f sp60;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp68;
|
||||
|
||||
if (this->unk_19F == 0) {
|
||||
this->unk_200 = 0x28;
|
||||
this->unk_19F++;
|
||||
}
|
||||
|
||||
if (this->unk_19F == 1) {
|
||||
if ((u32)this->unk_200-- <= 0) {
|
||||
this->unk_200 = 0x50;
|
||||
this->unk_19E |= 4;
|
||||
this->unk_19F++;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_19F == 2) {
|
||||
this->unk_200--;
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FE04);
|
||||
if ((this->unk_200 < 0x50) && ((this->unk_200 % 0x14) < 8)) {
|
||||
if (this->unk_200 < 0x14) {
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FDFC);
|
||||
if ((this->unk_200 % 0x14) == 7) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
} else {
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FE00);
|
||||
if ((this->unk_200 % 0x14) == 7) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->unk_200 <= 0) {
|
||||
this->unk_200 = 0;
|
||||
this->unk_19E &= ~4;
|
||||
this->unk_19F++;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_19F == 3) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
sp5C.x = Math_Rand_CenteredFloat(15.0f);
|
||||
sp5C.y = Math_Rand_ZeroFloat(-1.0f);
|
||||
sp5C.z = Math_Rand_CenteredFloat(15.0f);
|
||||
sp60.x = this->actor.posRot.pos.x + (sp5C.x + sp5C.x);
|
||||
sp60.y = this->actor.posRot.pos.y + 7.0f;
|
||||
sp60.z = this->actor.posRot.pos.z + (sp5C.z + sp5C.z);
|
||||
func_8002836C(globalCtx, &sp60, &sp5C, &D_80A4FE08, &D_80A4FE14, &D_80A4FE18,
|
||||
(s16)Math_Rand_ZeroFloat(50.0f) + 0xC8, 0x28, 0xF);
|
||||
}
|
||||
|
||||
func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);
|
||||
if ((this->unk_200++ < 0x28) ^ 1) {
|
||||
this->unk_19E |= 0x10;
|
||||
this->actor.flags |= 0x10;
|
||||
this->actor.uncullZoneForward = 12000.0f;
|
||||
|
||||
this->actor.gravity = 0.3f;
|
||||
this->unk_19F++;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->unk_19F == 4) {
|
||||
func_8002E4B4(globalCtx, &this->actor, 20.0f, 20.0f, 60.0f, 3);
|
||||
if (this->actor.bgCheckFlags & 0x18) {
|
||||
sp68.x = this->actor.posRot.pos.x;
|
||||
sp68.y = this->actor.posRot.pos.y;
|
||||
sp68.z = this->actor.posRot.pos.z;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
|
||||
func_80028E84(globalCtx, &sp68, &D_80A4FE1C, &D_80A4FE28, 0x64, 0x14);
|
||||
this->unk_200 = 10;
|
||||
this->unk_19E |= 8;
|
||||
this->actionFunc = func_80A4F700;
|
||||
} else {
|
||||
func_8002F974(&this->actor, NA_SE_EV_STONE_LAUNCH - SFX_FLAG);
|
||||
}
|
||||
|
||||
Actor_MoveForward(&this->actor);
|
||||
if (this->actor.yDistFromLink < -12000.0f) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc
|
||||
void func_80A4F13C(EnGs* this, GlobalContext* globalCtx) {
|
||||
f32 tmpf1;
|
||||
f32 tmpf2;
|
||||
f32 tmpf3;
|
||||
s32 tmp;
|
||||
s16 tmp2 = this->unk_1A0[0].y;
|
||||
|
||||
if (this->unk_19F == 0) {
|
||||
this->unk_1E8 = 0.0f;
|
||||
this->unk_1EC = 90.0f;
|
||||
this->unk_1F0 = 0.1f;
|
||||
this->unk_1F4 = 2.0f;
|
||||
this->unk_1F8 = 0;
|
||||
this->unk_19F = 1;
|
||||
}
|
||||
if (this->unk_19F == 1) {
|
||||
Math_SmoothScaleMaxMinF(&this->unk_1F0, this->unk_1F4, 1.0f, 0.1f, 0.001f);
|
||||
tmpf1 = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 1.0f, this->unk_1F0, 0.001f);
|
||||
this->unk_1A0[0].y += (s16)(this->unk_1E8 * 182.04445f);
|
||||
if (tmpf1 == 0.0f) {
|
||||
this->unk_200 = 0;
|
||||
this->unk_19F = 2;
|
||||
}
|
||||
}
|
||||
if (this->unk_19F == 2) {
|
||||
this->unk_1A0[0].y = this->unk_1A0[0].y + (s32)(this->unk_1E8 * 182.04445f);
|
||||
if ((this->unk_200++ < 0x29) ^ 1) {
|
||||
this->unk_1E8 = this->unk_1B4[0].y - 1.0f;
|
||||
this->unk_1EC = 1.5f;
|
||||
this->unk_1F0 = this->unk_1B4[1].y - 1.0f;
|
||||
this->unk_1F4 = -0.3f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONE_GROW_UP);
|
||||
this->unk_19F = 3;
|
||||
}
|
||||
}
|
||||
if (this->unk_19F == 3) {
|
||||
this->unk_1A0[0].y += 0x4000;
|
||||
tmpf1 = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 0.8f, 0.2f, 0.001f);
|
||||
Math_SmoothScaleMaxMinF(&this->unk_1F0, this->unk_1F4, 0.8f, 0.2f, 0.001f);
|
||||
this->unk_1B4[0].x = this->unk_1F0 + 1.0f;
|
||||
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
|
||||
if (tmpf1 == 0.0f) {
|
||||
this->unk_1E8 = 0.6981317f;
|
||||
this->unk_1EC = 0.34906584f;
|
||||
this->unk_19F = 4;
|
||||
}
|
||||
}
|
||||
if (this->unk_19F == 4) {
|
||||
tmpf1 = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 0.8f, 16384.0f, 3640.0f);
|
||||
this->unk_1A0[0].y += (s16)this->unk_1E8;
|
||||
if (tmpf1 == 0.0f) {
|
||||
|
||||
tmp = this->unk_1A0[0].y;
|
||||
if (tmp > 0) {
|
||||
tmp += 0xFFFF0000;
|
||||
}
|
||||
this->unk_1E8 = tmp;
|
||||
|
||||
this->unk_1EC = 0.0f;
|
||||
this->unk_19F = 5;
|
||||
}
|
||||
}
|
||||
if (this->unk_19F == 5) {
|
||||
tmp = this->unk_1A0[0].y;
|
||||
if (tmp > 0) {
|
||||
tmp += 0xFFFF0001;
|
||||
}
|
||||
this->unk_1E8 = tmp;
|
||||
tmpf1 = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 0.8f, 3640.0f, 0.001f);
|
||||
this->unk_1A0[0].y = this->unk_1E8;
|
||||
if (tmpf1 == 0.0f) {
|
||||
this->unk_1E8 = this->unk_1B4[0].y - 1.0f;
|
||||
this->unk_1EC = 0;
|
||||
this->unk_1A0[0].y = 0;
|
||||
this->unk_200 = 0;
|
||||
this->unk_1F0 = this->unk_1B4[0].x - 1.0f;
|
||||
this->unk_1F4 = 0;
|
||||
this->unk_1F8 = 0.5f;
|
||||
this->unk_1FC = 0;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK);
|
||||
this->unk_19F = 6;
|
||||
}
|
||||
}
|
||||
if (this->unk_19F == 6) {
|
||||
tmpf1 = Math_SmoothScaleMaxMinF(&this->unk_1E8, this->unk_1EC, 0.8f, 0.1f, 0.001f);
|
||||
tmpf2 = Math_SmoothScaleMaxMinF(&this->unk_1F0, this->unk_1F4, 0.8f, 0.1f, 0.001f);
|
||||
tmpf3 = Math_SmoothScaleMaxMinF(&this->unk_1F8, this->unk_1FC, 0.8f, 0.02f, 0.001f);
|
||||
this->unk_1B4[0].x = this->unk_1F0 + 1.0f;
|
||||
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
|
||||
this->unk_1B4[0].x += sinf((((this->unk_200 % 0xA) * 0.1f) * 360.0f) * 0.017453292f) * this->unk_1F8;
|
||||
this->unk_1B4[0].y =
|
||||
this->unk_1B4[0].y + (sinf((((this->unk_200 % 0xA) * 0.1f) * 360.0f) * 0.017453292f) * this->unk_1F8);
|
||||
this->unk_200++;
|
||||
if ((tmpf1 == 0.0f) && (tmpf2 == 0.0f) && (tmpf3 == 0.0f)) {
|
||||
this->unk_19C = 0;
|
||||
this->actionFunc = func_80A4F734;
|
||||
}
|
||||
}
|
||||
if ((u16)this->unk_1A0[0].y < (u16)tmp2) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_STONE_ROLLING);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4F13C.s")
|
||||
#endif
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4F700.s")
|
||||
void func_80A4F700(EnGs* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_200-- <= 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4F734.s")
|
||||
void func_80A4F734(EnGs* this, GlobalContext* globalCtx) {
|
||||
if (!Flags_GetSwitch(globalCtx, (this->actor.params >> 8) & 0x3F)) {
|
||||
func_80A4E470(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4F77C.s")
|
||||
void func_80A4F77C(EnGs* this) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/EnGs_Update.s")
|
||||
for (i = 0; i < 3; i++) {
|
||||
this->unk_1A0[i] = D_80A4FE34;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/EnGs_Draw.s")
|
||||
for (i = 0; i < 2; i++) {
|
||||
this->unk_1B4[i] = D_80A4FE3C;
|
||||
}
|
||||
|
||||
this->unk_19C = 3;
|
||||
}
|
||||
|
||||
void EnGs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnGs* this = THIS;
|
||||
|
||||
Actor_SetHeight(&this->actor, 23.0f);
|
||||
if (globalCtx) {};
|
||||
if (!(this->unk_19E & 0x10)) {
|
||||
if (globalCtx) {};
|
||||
if (this->unk_14C.base.acFlags & 2) {
|
||||
this->unk_19F = 0;
|
||||
this->unk_14C.base.acFlags &= ~2;
|
||||
|
||||
switch (this->actor.colChkInfo.damageEffect) {
|
||||
case 15:
|
||||
this->unk_19E |= 1;
|
||||
func_80A4F77C(this);
|
||||
this->actionFunc = func_80A4E910;
|
||||
break;
|
||||
case 14:
|
||||
this->unk_19E |= 1;
|
||||
func_80A4F77C(this);
|
||||
this->actionFunc = func_80A4EA08;
|
||||
break;
|
||||
case 13:
|
||||
this->unk_19E |= 1;
|
||||
func_80A4F77C(this);
|
||||
this->actionFunc = func_80A4EB3C;
|
||||
break;
|
||||
case 12:
|
||||
this->unk_19E |= 2;
|
||||
func_80A4F77C(this);
|
||||
this->actionFunc = func_80A4ED34;
|
||||
break;
|
||||
case 11:
|
||||
this->unk_19E |= 1;
|
||||
func_80A4F77C(this);
|
||||
this->actionFunc = func_80A4F13C;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Collider_CylinderUpdate(&this->actor, &this->unk_14C);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->unk_14C.base);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->unk_14C.base);
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
func_80A4E648(this, globalCtx);
|
||||
}
|
||||
|
||||
void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGs* this = THIS;
|
||||
s32 tmp;
|
||||
u32 frames;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
if (!(this->unk_19E & 8)) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1046);
|
||||
frames = globalCtx->gameplayFrames;
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
Matrix_Push();
|
||||
if (this->unk_19E & 1) {
|
||||
Matrix_RotateY(this->unk_1A0[0].y * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->unk_1A0[0].x * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->unk_1A0[0].z * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk_1B4[0].x, this->unk_1B4[0].y, this->unk_1B4[0].z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(this->unk_1A0[1].y * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(this->unk_1A0[1].x * 0.0000958738f, MTXMODE_APPLY);
|
||||
Matrix_RotateZ(this->unk_1A0[1].z * 0.0000958738f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000950);
|
||||
|
||||
if (this->unk_19E & 4) {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, this->unk_1E4.r, this->unk_1E4.g, this->unk_1E4.b,
|
||||
this->unk_1E4.a);
|
||||
} else {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255);
|
||||
}
|
||||
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_060009D0);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000A60);
|
||||
|
||||
Matrix_Pull();
|
||||
if (this->unk_19E & 2) {
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
func_800D1FD4(&globalCtx->mf_11DA0);
|
||||
Matrix_Scale(0.05f, -0.05f, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1087),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(
|
||||
gfxCtx->polyXlu.p++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80));
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 128, 128, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0404D4E0);
|
||||
}
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_gs.c", 1101);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,29 @@
|
|||
|
||||
struct EnGs;
|
||||
|
||||
typedef void (*EnGsActionFunc)(struct EnGs*, GlobalContext*);
|
||||
|
||||
typedef struct EnGs {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0xBC];
|
||||
/* 0x014C */ ColliderCylinder unk_14C;
|
||||
/* 0x0198 */ EnGsActionFunc actionFunc;
|
||||
/* 0x019C */ u8 unk_19C;
|
||||
/* 0x019D */ u8 unk_19D;
|
||||
/* 0x019E */ u8 unk_19E;
|
||||
/* 0x019F */ u8 unk_19F;
|
||||
/* 0x01A0 */ Vec3s unk_1A0[3];
|
||||
/* 0x01B4 */ Vec3f unk_1B4[2];
|
||||
/* 0x01CC */ char unk_1CC[0xC];
|
||||
/* 0x01D8 */ Vec3f unk_1D8;
|
||||
/* 0x01E4 */ Color_RGBA8 unk_1E4;
|
||||
/* 0x01E8 */ f32 unk_1E8;
|
||||
/* 0x01EC */ f32 unk_1EC;
|
||||
/* 0x01F0 */ f32 unk_1F0;
|
||||
/* 0x01F4 */ f32 unk_1F4;
|
||||
/* 0x01F8 */ f32 unk_1F8;
|
||||
/* 0x01FC */ f32 unk_1FC;
|
||||
/* 0x0200 */ u16 unk_200;
|
||||
/* 0x0202 */ char unk_202[0x6];
|
||||
} EnGs; // size = 0x0208
|
||||
|
||||
extern const ActorInit En_Gs_InitVars;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue