The first commit
This commit is contained in:
91
src/FP/ch/wozzasjig.c
Normal file
91
src/FP/ch/wozzasjig.c
Normal file
@@ -0,0 +1,91 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_8038FF00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038FF54(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_803925C0[];
|
||||
|
||||
extern ActorInfo D_80392628 = { MARKER_20C_WOZZAS_JIGGY, ACTOR_1F4_WOZZAS_JIGGY, ASSET_495_MODEL_WOZZAS_JIGGY,
|
||||
0x1, D_803925C0,
|
||||
func_8038FF54, func_80326224, func_8038FF00,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
extern struct31s D_8039264C;
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038FF00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(func_8038BFA0()) return this;
|
||||
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038FF54(Actor *this){
|
||||
Actor *other;
|
||||
f32 sp40[3];
|
||||
ParticleEmitter *sp3C;
|
||||
|
||||
if( func_8038BFA0() ) return;
|
||||
if( !actor_playerIsWithinDist(this, 4500) ) return;
|
||||
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOff(this);
|
||||
if(this->unk100){
|
||||
other = marker_getActor(this->unk100);
|
||||
if(this->state != 9){
|
||||
if(other->state == 9){
|
||||
func_80328B8C(this, 9, 0.01f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
else{
|
||||
animctrl_setIndex(this->animctrl, animctrl_getIndex(other->animctrl));
|
||||
func_8028774C(this->animctrl, animctrl_getAnimTimer(other->animctrl));
|
||||
animctrl_setDuration(this->animctrl, animctrl_getDuration(other->animctrl));
|
||||
animctrl_setSmoothTransition(this->animctrl, FALSE);
|
||||
func_802875AC(this->animctrl, "chwozzasjig.c", 0x87);
|
||||
this->position[0] = other->position[0];
|
||||
this->position[1] = other->position[1];
|
||||
this->position[2] = other->position[2];
|
||||
this->yaw = other->yaw;
|
||||
}
|
||||
}
|
||||
}//L8039008C
|
||||
|
||||
if(this->state == 9){
|
||||
if(0.99999 <= animctrl_getAnimTimer(this->animctrl)){
|
||||
func_8034A174(this->marker->unk44, 5, sp40);
|
||||
sp40[0] = (f32)(s32)sp40[0];
|
||||
sp40[1] = (f32)(s32)sp40[1];
|
||||
sp40[2] = (f32)(s32)sp40[2];
|
||||
func_802C8F70(this->yaw + 90.0f);
|
||||
jiggySpawn(JIGGY_32_FP_WOZZA, sp40);
|
||||
levelSpecificFlags_set(0x26, TRUE);
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else if(this->marker->unk14_21){//L8039016C
|
||||
sp3C = partEmitList_pushNew(1);
|
||||
func_8034A174(this->marker->unk44, 5, sp40);
|
||||
particleEmitter_setSprite(sp3C, ASSET_713_SPRITE_SPARKLE_YELLOW);
|
||||
particleEmitter_setStartingFrameRange(sp3C, 1, 6);
|
||||
particleEmitter_setPosition(sp3C, sp40);
|
||||
particleEmitter_setParticleSpawnPositionRange(sp3C,
|
||||
0.0f, 20.0f, 0.0f,
|
||||
0.0f, 20.0f, 0.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(sp3C,
|
||||
-180.0f, 0.0f, -180.0f,
|
||||
180.0f, 280.0f, 180.0f
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(sp3C,
|
||||
0.0f, -60.0f, 0.0f,
|
||||
0.0f, -90.0f, 0.0f
|
||||
);
|
||||
func_802EFB98(sp3C, &D_8039264C);
|
||||
particleEmitter_emitN(sp3C, 1);
|
||||
}
|
||||
}
|
||||
}
|
148
src/FP/code_0.c
Normal file
148
src/FP/code_0.c
Normal file
@@ -0,0 +1,148 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_803867BC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803919F0[] ={
|
||||
{ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ASSET_1A1_ANIM_SLED, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391A10 = {
|
||||
MARKER_3B_SCARF_SLED, ACTOR_181_SCARF_SLED, ASSET_352_MODEL_SLED,
|
||||
0, D_803919F0,
|
||||
NULL, func_803867BC, func_80325888,
|
||||
1000, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_803863F0(Actor *this, s32 next_state){
|
||||
func_80328A84(this, next_state);
|
||||
|
||||
if(next_state == 2){
|
||||
mapSpecificFlags_set(0xB, TRUE);
|
||||
timed_setCameraToNode(0.0f, 0x27);
|
||||
timed_playSfx(0.6f, SFX_52_BANJO_YAH_OH, 1.0f, 28000);
|
||||
timed_playSfx(1.25f, SFX_31_BANJO_OHHWAAOOO, 1.0f, 28000);
|
||||
|
||||
timed_setCameraToNode(1.5f, 0x26);
|
||||
timed_setCameraToNode(2.75f, 0x25);
|
||||
timed_playSfx(3.5f, SFX_63_BANJO_UWAAAAOOH, 1.0f, 28000);
|
||||
|
||||
timed_setCameraToNode(3.75f, 0x24);
|
||||
timed_playSfx(4.25f, SFX_A7_WOODEN_SWOSH, 1.2f, 18000);
|
||||
timed_playSfx(4.45f, SFX_C1_BUZZBOMB_ATTACK, 1.0f, 0x7fff);
|
||||
timed_setCameraToNode(4.75f, 0x23);
|
||||
}
|
||||
}
|
||||
|
||||
void func_803864F4(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor * this = marker_getActor(this_marker);
|
||||
|
||||
if(this->state != 1) return;
|
||||
if(player_getTransformation() != TRANSFORM_1_BANJO) return;
|
||||
|
||||
if(func_8028F68C(0x27, this->marker))
|
||||
func_803863F0(this, 2);
|
||||
}
|
||||
|
||||
void func_8038655C(Actor *this){
|
||||
int tmp_bool;
|
||||
int tmp;
|
||||
tmp_bool = (mlAbsF(this->position_y - this->velocity_y) < 100.0f);
|
||||
tmp = this->unk10_12;
|
||||
this->unk10_12 = FALSE;
|
||||
if(!tmp_bool){
|
||||
if(tmp != 0){
|
||||
func_8030E6A4(SFX_19_BANJO_LANDING_08, func_8030E200(this->unk44_31), 0x55f0);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(this->unk44_31 == 0){
|
||||
this->unk44_31 = func_8030ED2C(SFX_18_BIGBUTT_SLIDE, 2);
|
||||
func_8030E0FC(this->unk44_31, 0.9f, 1.5f, 1.2f);
|
||||
}
|
||||
this->unk10_12 = TRUE;
|
||||
func_8030E2C4(*((u8*)this + 0x44));
|
||||
}
|
||||
}
|
||||
|
||||
void func_80386630(Actor *this){
|
||||
f32 sp7C[3];
|
||||
f32 sp70[3];
|
||||
f32 sp64[3];
|
||||
f32 sp24[4][4];
|
||||
|
||||
func_80343DEC(this);
|
||||
mapSpecificFlags_set(9, 1);
|
||||
func_8038655C(this);
|
||||
if(this->unk138_20){
|
||||
|
||||
this->yaw = 0.0f;
|
||||
sp64[0] = this->pitch;
|
||||
sp64[1] = this->yaw;
|
||||
sp64[2] = this->roll;
|
||||
mlMtxIdent();
|
||||
mlMtxRotYaw(sp64[1]);
|
||||
mlMtxRotPitch(sp64[0]);
|
||||
func_802513B0(sp24);
|
||||
|
||||
sp70[0] = 0.0f;
|
||||
sp70[1] = 18.0f;
|
||||
sp70[2] = 0.0f;
|
||||
func_8025235C(sp70, sp70);
|
||||
|
||||
sp70[0] += this->position[0];
|
||||
sp70[1] += this->position[1];
|
||||
sp70[2] += this->position[2];
|
||||
func_8028FAB0(sp70);
|
||||
|
||||
sp64[0] = this->pitch;
|
||||
sp64[1] = this->yaw;
|
||||
sp64[2] = this->roll;
|
||||
func_8028FAEC(sp64);
|
||||
}//L80386724
|
||||
|
||||
if(1.0 == this->unk48){
|
||||
mapSpecificFlags_set(1, TRUE);
|
||||
FUNC_8030E624(SFX_103_FLOTSAM_DEATH, 1.0f, 30000);
|
||||
FUNC_8030E624(SFX_11_WOOD_BREAKING_1, 0.8f, 25000);
|
||||
FUNC_8030E624(SFX_D_EGGSHELL_BREAKING, 1.0f, 25000);
|
||||
|
||||
sp7C[0] = -1000.0f;
|
||||
sp7C[1] = 1727.0f;
|
||||
sp7C[2] = 6218.0f;
|
||||
func_8028F490(sp7C);
|
||||
marker_despawn(this->marker);
|
||||
}//L803867AC
|
||||
}
|
||||
|
||||
void func_803867BC(Actor *this){
|
||||
if(!this->initialized){
|
||||
this->initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, func_803864F4, NULL, NULL);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
this->unk10_12 = 0;
|
||||
ml_vec3f_clear(this->velocity);
|
||||
func_803863F0(this, 1);
|
||||
}
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this->velocity_x = this->position_x;
|
||||
this->velocity_y = func_80309724(this->position);
|
||||
this->velocity_z = this->position_z;
|
||||
if(this->state == 2){
|
||||
func_80386630(this);
|
||||
}
|
||||
}
|
201
src/FP/code_11F0.c
Normal file
201
src/FP/code_11F0.c
Normal file
@@ -0,0 +1,201 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80324CD8(f32);
|
||||
|
||||
Actor *func_803875E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038774C(Actor *this);
|
||||
void func_8038794C(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391B80[] = {
|
||||
{0x000, 0.0f},
|
||||
{0x14E, 2.0f},
|
||||
{0x14D, 7.0f},
|
||||
{0x14C, 2.0f},
|
||||
{0x14F, 0.5f},
|
||||
{0x14F, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391BB0 = {
|
||||
MARKER_124_BOGGY_1, ACTOR_160_BOGGY_1, ASSET_38A_MODEL_BOGGY_1,
|
||||
0x1, D_80391B80,
|
||||
func_8038774C, func_8038794C, func_803875E0,
|
||||
2500, 0, 1.4f, 0
|
||||
};
|
||||
|
||||
f32 D_80391BD4[3] = {1592.0f, 673.0f, 5895.0f};
|
||||
f32 D_80391BE0[3] = { 0.0f, 0.0f, 0.0f};
|
||||
f32 D_80391BEC[5] = {2.0f, 2.8f, 4.3f, 5.1f, 5.7f};
|
||||
|
||||
/* .code */
|
||||
Actor *func_803875E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
|
||||
if(!this->unk38_31 || this->state == 5)
|
||||
return this;
|
||||
|
||||
func_8033A45C(1, 0);
|
||||
func_8033A45C(3, 1);
|
||||
this = func_80325888(marker, gfx, mtx, vtx);
|
||||
if(marker->unk14_21){
|
||||
func_8034A174(func_80329934(), 5, this->velocity);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_803876A4(Actor *this){
|
||||
func_80328B8C(this, 2, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
FUNC_8030E8B4(SFX_8E_GRUNTLING_DAMAGE, 1.0f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
|
||||
void func_803876F8(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
func_80328B8C(this, 5, 0.0001f, 1);
|
||||
this->unk48 = 0.0f;
|
||||
func_80343DEC(this);
|
||||
}
|
||||
|
||||
void func_8038774C(Actor *this){}
|
||||
|
||||
void func_80387754(ActorMarker *this_marker, ActorMarker *other_marker){}
|
||||
|
||||
void func_80387760(ActorMarker *marker){
|
||||
Actor *other = func_80328230(ACTOR_C8_BOGGY_2, D_80391BD4, D_80391BE0);
|
||||
other->unk4C = 1.0f;
|
||||
func_80343DEC(other);
|
||||
}
|
||||
|
||||
void func_803877A8(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
|
||||
if(arg2 == 1){
|
||||
jiggySpawn(JIGGY_2A_FP_BOGGY_1, this->velocity);
|
||||
}
|
||||
else if(arg2 == 2){
|
||||
func_80328B8C(this, 4, 0.0001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
actor_collisionOff(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387828(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
|
||||
if(text_id == 0xc00){
|
||||
func_80311480(0xc2b, 0xf, NULL, this->marker, NULL, func_803877A8);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038787C(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
s32 s0;
|
||||
f32 sp24;
|
||||
s32 sp20;
|
||||
|
||||
s0 = func_802F9AA8(SFX_12B_BOILING_AND_BUBBLING);
|
||||
sp24 = randf2(0.9f, 1.1f);
|
||||
sp20 = (s32)randf2(16000.0f, 23000.0f);
|
||||
func_802F9DB8(s0, sp24, sp24, 0.0f);
|
||||
func_802F9EC4(s0, this->position, 500, 1200);
|
||||
func_802F9F80(s0, 0.05f, 0.2f, 0.3f);
|
||||
func_802FA060(s0, sp20, sp20, 0.0f);
|
||||
}
|
||||
|
||||
void func_8038794C(Actor *this){
|
||||
int i;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_80387754, NULL);
|
||||
this->unk38_31 = 1;
|
||||
ml_vec3f_copy(this->velocity, this->position);
|
||||
|
||||
if(func_803203FC(1))
|
||||
return;
|
||||
|
||||
if(!jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1) && jiggyscore_isSpawned(JIGGY_2A_FP_BOGGY_1)){
|
||||
func_803876F8(this);
|
||||
actor_collisionOff(this);
|
||||
}
|
||||
|
||||
if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){
|
||||
if(!jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3) && !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)){
|
||||
func_802C3C88(func_80387760, this->marker);
|
||||
}
|
||||
this->unk38_31 = 0;
|
||||
actor_collisionOff(this);
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
}
|
||||
}//L80387A68
|
||||
|
||||
if( !this->unk38_31 ) return;
|
||||
switch(this->state){
|
||||
case 1://L80387AB0
|
||||
if(mapSpecificFlags_get(0xb))
|
||||
this->unk138_24 = TRUE;
|
||||
|
||||
if(mapSpecificFlags_get(0x1)){
|
||||
func_8028F94C(1, this->position);
|
||||
timed_setCameraToNode(0.0f, 0x12);
|
||||
func_80324DBC(1.0f, 0xc00, 0xe, NULL, this->marker, func_80387828, func_803877A8);
|
||||
func_803876A4(this);
|
||||
break;
|
||||
}//L80387B38
|
||||
|
||||
if(!this->unk138_24 && func_80329530(this, 0x1f4)){
|
||||
if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){
|
||||
if(func_80311480(0xbff, 0x2a, this->position, NULL, NULL, NULL)){
|
||||
for(i = 0; i <5; i++ ){
|
||||
timedFunc_set_1(D_80391BEC[i], (TFQM1)func_8038787C, (s32)this->marker);
|
||||
}
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 2://L80387BEC
|
||||
func_8028FC8C(this->position);
|
||||
if(actor_animationIsAt(this, 0.1f)){
|
||||
FUNC_8030E8B4(SFX_F6_BLUBBER_TALKING_2, 1.0f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.24f)){//L80387C2C
|
||||
FUNC_8030E8B4(SFX_A0_COUGHING, 0.7f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.52f)){//L80387C60
|
||||
FUNC_8030E8B4(SFX_A0_COUGHING, 0.67f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.61f)){//L80387C94
|
||||
FUNC_8030E8B4(SFX_A0_COUGHING, 0.64f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.69f)){//L80387CC8
|
||||
FUNC_8030E8B4(SFX_A0_COUGHING, 0.61f, 32000, this->position, 1250, 2500);
|
||||
}//L80387CF4
|
||||
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 3, 0.0001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
case 4://L80387D2C
|
||||
func_80343DEC(this);
|
||||
func_8028FC8C(this->position);
|
||||
if(0.99 <= this->unk48){
|
||||
func_8028F918(0);
|
||||
func_80324CD8(0.0f);
|
||||
func_80324E88(0.0f);
|
||||
func_803876F8(this);
|
||||
}
|
||||
break;
|
||||
case 5://L80387D90
|
||||
if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){
|
||||
this->unk38_31 = 0;
|
||||
func_802C3C88(func_80387760, this->marker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
102
src/FP/code_19E0.c
Normal file
102
src/FP/code_19E0.c
Normal file
@@ -0,0 +1,102 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
typedef struct {
|
||||
u8 pad0[1];
|
||||
u8 unk1;
|
||||
} ActorLocal_FP_19E0;
|
||||
|
||||
void func_803289EC(Actor *, f32, s32);
|
||||
void func_8028E668(f32[3], f32, f32, f32);
|
||||
|
||||
Actor *func_80387DD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_803881AC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391C00[] = {
|
||||
{0x000, 0.0f},
|
||||
{0x152, 4.0f},
|
||||
{0x151, 1.2f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391C18 = {
|
||||
0x125, 0x161, 0x38b,
|
||||
0x1, D_80391C00,
|
||||
func_803881AC, func_80326224, func_80387DD0,
|
||||
0, 0, 0.35f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_80387DD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
|
||||
if(this->velocity[0] == 0.0f || 0.0f != this->velocity[1])
|
||||
return this;
|
||||
func_8033A45C(2, this->velocity[0] == 1.0f ? 1 : 0);
|
||||
func_8033A45C(3, this->velocity[0] == 3.0f ? 1 : 0);
|
||||
func_8033A45C(4, this->velocity[0] == 2.0f ? 1 : 0);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_19E0/func_80387EE4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_19E0/func_80388000.s")
|
||||
|
||||
void func_8038811C(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
if(this->state == 2)
|
||||
return;
|
||||
|
||||
func_80328B8C(this, 2, 0.0001, 1);
|
||||
func_8030E878(SFX_6A_FLAGPOLE_WOBBLE, randf2(0.9f, 1.1f), 32000, this->position, 1000.0f, 2000.0f);
|
||||
|
||||
}
|
||||
|
||||
void func_803881AC(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038811C, NULL);
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
this->unk124_6 = FALSE;
|
||||
func_803289EC(this, randf(), 1);
|
||||
if(this->unk38_31 == 0){
|
||||
func_8038B8B0(this->marker);
|
||||
this->velocity_x = 0.0f;
|
||||
}
|
||||
this->initialized = FALSE;
|
||||
this->velocity_z = 0.0f;
|
||||
}//L8038827C
|
||||
|
||||
if(0.0f == this->velocity_x || 0.0f != this->velocity_y) {
|
||||
this->marker->collidable = FALSE;
|
||||
if(0.0f == this->velocity_x)
|
||||
return;
|
||||
}else{
|
||||
if(!func_80329530(this, 2000) && !func_8038BFE8(this->position, 2000))
|
||||
return;
|
||||
this->marker->collidable = TRUE;
|
||||
this->unk124_6 = TRUE;
|
||||
|
||||
}//L80388314
|
||||
func_8028E668(this->position, 200.0f, -10.0f, 30.0f);
|
||||
|
||||
if(this->state == 2){
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if( 1.0f == this->velocity_x && func_80387EE4(this)){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
func_8038BA88(this->unkF4_8);
|
||||
}
|
||||
|
||||
if(func_80388000(this)){
|
||||
func_8038BC0C(this->unkF4_8);
|
||||
}
|
||||
}
|
84
src/FP/code_1FF0.c
Normal file
84
src/FP/code_1FF0.c
Normal file
@@ -0,0 +1,84 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_803289EC(Actor *, f32, s32);
|
||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||
|
||||
void func_80388584(Actor *this);
|
||||
Actor *func_803883E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391C40[] = {
|
||||
{0x000, 0.0f},
|
||||
{0x152, 4.0f},
|
||||
{0x151, 1.2f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391C58 = {
|
||||
0x126, 0x162, 0x38B,
|
||||
0x1, D_80391C40,
|
||||
func_80388584, func_80326224, func_803883E0,
|
||||
0, 0, 0.35f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_803883E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
|
||||
if(this->velocity[0] == 0.0f || 0.0f != this->velocity[1])
|
||||
return this;
|
||||
func_8033A45C(2, this->velocity[0] == 1.0f ? 1 : 0);
|
||||
func_8033A45C(3, this->velocity[0] == 3.0f ? 1 : 0);
|
||||
func_8033A45C(4, this->velocity[0] == 2.0f ? 1 : 0);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
|
||||
}
|
||||
|
||||
void func_803884F4(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
if(this->state != 2){
|
||||
func_80328B8C(this, 2, 0.0001f, 1);
|
||||
func_8030E878(SFX_6A_FLAGPOLE_WOBBLE, randf2(0.9f, 1.1f), 32000, this->position, 1000.0f, 2000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388584(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
marker_setCollisionScripts(this->marker, NULL, func_803884F4, NULL);
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
func_803289EC(this, randf(), 1);
|
||||
this->unk124_6 = 0;
|
||||
if(this->unk38_31 == 0){
|
||||
func_8038B930(this->marker);
|
||||
this->velocity[0] = 0.0f;
|
||||
}
|
||||
}//L8038863C
|
||||
|
||||
if((this->velocity[0] == 0.0f || this->velocity[1] != 0.0f)){//L8038866C
|
||||
this->marker->collidable = FALSE;
|
||||
if(this->velocity[0] != 0.0f){
|
||||
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{//L80388694
|
||||
if(!func_80329530(this, 2000)&& !func_8038BFE8(this->position, 2000))
|
||||
return;
|
||||
this->marker->collidable = TRUE;
|
||||
this->unk124_6 = TRUE;
|
||||
}
|
||||
func_8028E668(this->position, 200.0f, -10.0f, 30.0f);
|
||||
if(this->state == 2){
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
}
|
||||
}
|
||||
}
|
661
src/FP/code_2350.c
Normal file
661
src/FP/code_2350.c
Normal file
@@ -0,0 +1,661 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||
|
||||
extern f32 func_8038BE20(f32 arg0[3]);
|
||||
|
||||
typedef struct {
|
||||
ParticleEmitter *unk0;
|
||||
ParticleEmitter *unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
}ActorLocal_FP_2350;
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 actor_id;
|
||||
}Struct_FP_2350;
|
||||
|
||||
Actor *func_80388740(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2);
|
||||
void func_80388EE8(ParticleEmitter *pCtrl);
|
||||
void func_80388F4C(Actor *this);
|
||||
void func_803896FC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391C80[] = {
|
||||
{0x000, 0.0f},
|
||||
{0x150, 0.6f},
|
||||
{0x150, 0.6f},
|
||||
{0x150, 0.6f},
|
||||
{0x150, 0.6f},
|
||||
{0x179, 2.3f},
|
||||
{0x17A, 1.3f},
|
||||
{0x17B, 2.0f},
|
||||
{0x150, 1.0f},
|
||||
{0x1AA, 4.3f},
|
||||
{0x1AB, 4.3f},
|
||||
{0x150, 1.0f},
|
||||
{0x150, 0.6f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391CE8 = { 0x97, ACTOR_C8_BOGGY_2, ASSET_38A_MODEL_BOGGY_1,
|
||||
0x1, D_80391C80,
|
||||
func_80388F4C, func_803896FC, func_80388740,
|
||||
0, 0, 1.4f, 0
|
||||
};
|
||||
f32 D_80391D0C[3] = {1842.0f, 658.0f, 5758.0f};
|
||||
f32 D_80391D18[3] = {1463.0f, 635.0f, 5193.0f};
|
||||
s32 D_80391D24[3] = {0xc8, 0xc8, 0xe6};
|
||||
struct31s D_80391D30 = {
|
||||
{0.2f, 0.4f},
|
||||
{1.2f, 1.6f},
|
||||
{0.0f, 0.001f},
|
||||
{0.3f, 0.45f},
|
||||
0.0f, 0.01f
|
||||
};
|
||||
|
||||
struct42s D_80391D58 = {
|
||||
{{-10.0f, 10.0f, -10.0f}, {10.0f, 240.0f, 10.0f}},
|
||||
{{0.0f, 0.0f, 0.0f}, {0.0f, 20.0f, 0.0f}}
|
||||
};
|
||||
|
||||
f32 D_80391D88[3] = { 1592.0f, 673.0f, 5895.0f};
|
||||
f32 D_80391D94[3] = {0.0f, 0.0f, 0.0f};
|
||||
s32 D_80391DA0[3] = {0x5F5, 0x292, 0x1539};
|
||||
s32 D_80391DAC[3] = {-0x11F8, 0x637, -0x1816};
|
||||
Struct_FP_2350 D_80391DB8[7]={
|
||||
{0x361, 0x35D},
|
||||
{0x365, 0x35D},
|
||||
{0x362, 0x360},
|
||||
{0x366, 0x35D},
|
||||
{0x37B, 0x35D},
|
||||
{0x363, 0x35F},
|
||||
{0x364, 0x35E}
|
||||
};
|
||||
|
||||
f64 D_80392CB8;
|
||||
|
||||
s32 D_80392F20[3];
|
||||
|
||||
/* .code */
|
||||
Actor *func_80388740(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
ActorLocal_FP_2350 * local = (ActorLocal_FP_2350 *) &this->local;
|
||||
f32 sp2C[3];
|
||||
|
||||
func_8033A45C(1, 1);
|
||||
func_8033A45C(3, 1);
|
||||
this = func_80325888(marker, gfx, mtx, vtx);
|
||||
if(this->unk16C_4 && marker->unk14_21){
|
||||
if( this->state == 4
|
||||
|| this->state == 5
|
||||
|| this->state == 6
|
||||
|| this->state == 8
|
||||
){
|
||||
if(this->unk4C != 0.0f && (func_8023DB5C() & 1)){
|
||||
if(-2.0 < this->roll){
|
||||
func_8034A174(func_80329934(), 6, sp2C);
|
||||
particleEmitter_setPosition(local->unk0, sp2C);
|
||||
particleEmitter_emitN(local->unk0, 1);
|
||||
}
|
||||
|
||||
if(this->roll < 2.0){
|
||||
func_8034A174(func_80329934(), 7, sp2C);
|
||||
particleEmitter_setPosition(local->unk4, sp2C);
|
||||
particleEmitter_emitN(local->unk4, 1);
|
||||
}
|
||||
}
|
||||
}//L803888D4
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_803888E4(Actor *this){
|
||||
func_80328B8C(this, 0xC, 0.0001f, 1);
|
||||
if(!jiggyscore_isSpawned(JIGGY_30_FP_BOGGY_2)){
|
||||
if(mapSpecificFlags_get(5)){
|
||||
func_80324DBC(0.1f, 0xc06, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{//L80388964
|
||||
func_80324DBC(0.1f, 0xc03, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}
|
||||
else{//L803889A0
|
||||
func_8028F490(D_80391D0C);
|
||||
if(mapSpecificFlags_get(6)){
|
||||
func_80324DBC(0.1f, 0xc29, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{
|
||||
func_80324DBC(0.1f, 0xc28, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}//L80388A30
|
||||
mapSpecificFlags_set(5, TRUE);
|
||||
func_8038B9C8();
|
||||
}
|
||||
|
||||
void func_80388A50(Actor *this){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
|
||||
func_80328B8C(this, 2, 0.0001f, 1);
|
||||
timed_setCameraToNode(0.0f, 4);
|
||||
local->unk18 = 0;
|
||||
}
|
||||
|
||||
void func_80388A94(Actor *this){
|
||||
func_80388A50(this);
|
||||
if(mapSpecificFlags_get(6)){
|
||||
func_80311480(0xc0a, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{
|
||||
func_80311480(0xc09, 0xe, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388B18(Actor *this, u8 arg1){
|
||||
if(arg1 == TRUE){
|
||||
if(player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
func_80388A50(this);
|
||||
if(mapSpecificFlags_get(5)){
|
||||
func_80311480(0xc05, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else{
|
||||
func_80311480(0xc02, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
}
|
||||
else{//L80388BB8
|
||||
if(!func_803203FC(0xb3)){
|
||||
if(func_80311480(0xc01, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
func_803204E4(0xb3, TRUE);
|
||||
func_80388A50(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{//L80388C08
|
||||
if(player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
if(!func_803203FC(0xb4)){
|
||||
if(func_80311480(0xc08, 0xe, this->position, this->marker, func_80388D70, NULL)){
|
||||
func_803204E4(0xb4, TRUE);
|
||||
func_80388A50(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
func_80388A94(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388C88(Actor *this){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
|
||||
this->unk10_12 = 0;
|
||||
local->unk18 = 1;
|
||||
}
|
||||
|
||||
bool func_80388CA0(Actor *this){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
u32 sp20;
|
||||
|
||||
if(func_8028ECAC() != 0 && func_8028ECAC() != BSGROUP_8_TROT)
|
||||
return FALSE;
|
||||
|
||||
if( !func_80329530(this, 1100) ){
|
||||
local->unk18 = TRUE;
|
||||
}
|
||||
|
||||
sp20 = this->unk10_12;
|
||||
this->unk10_12 = func_80329530(this, 0x1C2);
|
||||
return (sp20 == 0 && this->unk10_12 && local->unk18);
|
||||
}
|
||||
|
||||
void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
|
||||
func_80324E88(0.0f);
|
||||
switch(text_id){
|
||||
case 0xc03:
|
||||
case 0xc06:
|
||||
case 0xc28:
|
||||
case 0xc29://L80388DC4
|
||||
func_8025A6EC(COMUSIC_3A_FP_BOGGY_RACE, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
func_802BE720();
|
||||
local->unk0 = partEmitList_pushNew(16);
|
||||
local->unk4 = partEmitList_pushNew(16);
|
||||
func_80388EE8(local->unk0);
|
||||
func_80388EE8(local->unk4);
|
||||
func_80328B8C(this, 4, 0.0001f, 1);
|
||||
local->unk14 = (local->unk19 == 2) ? 1.0f : 0.0f;
|
||||
this->marker->unk40_23 = TRUE;
|
||||
break;
|
||||
default://L80388E78
|
||||
switch(arg2){
|
||||
case 1:
|
||||
func_803888E4(this);
|
||||
mapSpecificFlags_set(6, TRUE);
|
||||
break;
|
||||
case 0:
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
break;
|
||||
default:
|
||||
func_80328B8C(this, 1, 0.0001f, 1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388EE8(ParticleEmitter *pCtrl){
|
||||
particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST);
|
||||
func_802EFFA8(pCtrl, D_80391D24);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_80391D58);
|
||||
func_802EFB98(pCtrl, &D_80391D30);
|
||||
func_802F0D54(pCtrl);
|
||||
}
|
||||
|
||||
void func_80388F4C(Actor *this){}
|
||||
|
||||
void func_80388F54(ActorMarker *marker){
|
||||
Actor *other = func_80328230(ACTOR_C8_BOGGY_2, D_80391D88, D_80391D94);
|
||||
func_80343DEC(other);
|
||||
}
|
||||
|
||||
void func_80388F90(Actor *this){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
|
||||
func_8030DB04(this->unk44_31, 32000, this->position, 1000.0f, 4000.0f);
|
||||
func_8030DBB4(this->unk44_31, local->unk8);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
||||
bool func_80388FE8(Actor *this, f32 arg1, f32 arg2){
|
||||
if(arg2 < 0.0f && 0.0f < arg1){
|
||||
func_8030E878(SFX_8D_BOGGY_OHWW, randf2(1.04f, 1.12f), 32000, this->position, 600.0f, 1200.0f);
|
||||
return TRUE;
|
||||
}
|
||||
else if( 0.0f < arg2 && arg1 < 0.0f){
|
||||
func_8030E878(SFX_F9_GRUNTLING_NOISE_1, randf2(1.04f, 1.12f), 32000, this->position, 600.0f, 1200.0f);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void func_803890DC(Actor *this, u8 arg1){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
|
||||
f32 yaw_to_target;
|
||||
f32 yaw;
|
||||
f32 f16;
|
||||
f32 prev_roll;
|
||||
f32 dyaw;
|
||||
|
||||
yaw_to_target = (this->unk1C[0] < 180.0f) ? this->unk1C[0] : this->unk1C[0] - 360.0f;
|
||||
yaw = (this->yaw < 180.0f) ? this->yaw : this->yaw - 360.0f;
|
||||
|
||||
prev_roll = this->roll;
|
||||
f16 = (arg1 == 2) ? 1100.0f : 780.0f;
|
||||
dyaw = yaw - yaw_to_target;
|
||||
dyaw = (180.0f < dyaw) ? 360.0f - dyaw
|
||||
: (dyaw < -180.0f) ? 360.0f + dyaw
|
||||
: dyaw;
|
||||
|
||||
this->roll += (2.0*dyaw)*(this->unk4C / f16);
|
||||
|
||||
this->roll = (26.0f < this->roll) ? 26.0f
|
||||
: (this->roll < -26.0f) ? -26.0f
|
||||
: this->roll;
|
||||
|
||||
this->roll += (this->roll < 0.0f) ? 1.8
|
||||
: (0.0f < this->roll) ? -1.8
|
||||
: 0.0;
|
||||
|
||||
if(local->unk10 == 0.0){
|
||||
if(this->state != 9 && this->state != 10 && this->state != 11){
|
||||
if( (23.0f < this->roll && prev_roll < 23.0f)
|
||||
|| (this->roll < -23.0f && -23.0f < prev_roll)
|
||||
){//L8038933C
|
||||
func_8030E878(SFX_8C_BOGGY_WAHEY, randf2(1.04f, 1.12f), 32000, this->position, 600.0f, 1500.0f);
|
||||
local->unk10 = 1.5f;
|
||||
}//L80389394
|
||||
}
|
||||
}//L80389398
|
||||
|
||||
if(this->roll <= 1.8 && -1.8 <= this->roll){
|
||||
this->roll = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void func_803893E4(Actor *this, f32 arg1, u8 arg2){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
f32 sp30;
|
||||
f32 sp2C;
|
||||
f32 sp28;
|
||||
if((u8)arg2 != 2){
|
||||
sp30 = 575.0f;
|
||||
sp2C = 780.0f;
|
||||
sp28 = 1.7f;
|
||||
}
|
||||
else{
|
||||
sp30 = 700.0f;
|
||||
sp2C = 1100.0f;
|
||||
sp28 = 2.3f;
|
||||
}
|
||||
|
||||
func_80343DEC(this);
|
||||
if(this->state == 7){
|
||||
this->unk4C += ((f32)D_80392F20[1] - this->position_y)*0.02;
|
||||
}
|
||||
else{
|
||||
this->unk4C += ((f32)D_80392F20[1] - this->position_y)*0.03 + sp28*func_8038BE20(this->position);
|
||||
}
|
||||
|
||||
if(this->unk4C < sp30){
|
||||
this->unk4C = sp30;
|
||||
}
|
||||
if(sp2C < this->unk4C){
|
||||
this->unk4C = sp2C;
|
||||
}
|
||||
|
||||
if((u8)arg2 == 2 && func_8028ECAC() != 6){
|
||||
this->unk4C = 1200.0f;
|
||||
}
|
||||
|
||||
local->unk8 = ((this->unk4C - sp30)/(sp2C - sp30))*(0.6000000000000001) + 0.7;
|
||||
func_803890DC(this, (u8)(arg2));
|
||||
}
|
||||
|
||||
void func_803895E0(void){
|
||||
int i;
|
||||
s16 *s0;
|
||||
f32 sp64[3];
|
||||
Actor *actor;
|
||||
f32 f20;
|
||||
f32 f22;
|
||||
f32 f8;
|
||||
|
||||
for (i = 0; i< 7; i++){
|
||||
s0 = (i < 3)
|
||||
? func_803049CC(D_80391DB8[i].unk0, D_80391DA0)
|
||||
: func_803049CC(D_80391DB8[i].unk0, D_80391DAC);
|
||||
|
||||
nodeprop_getPosition(s0, sp64);
|
||||
f20 = (f32)func_80304DA8(s0);
|
||||
f8 = (f32)func_80304DB8(s0);
|
||||
f22 = f8*0.01;
|
||||
actor = func_8032813C(D_80391DB8[i].actor_id, sp64, (s32)f20);
|
||||
actor->scale = f22;
|
||||
}
|
||||
}
|
||||
|
||||
void func_803896FC(Actor *this){
|
||||
ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local;
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
s32 sp3C[6];
|
||||
|
||||
sp58 = func_8038BE20(this->position);
|
||||
sp54 = time_getDelta();
|
||||
func_8024E55C(0, sp3C);
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->unk40_23 = FALSE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
this->marker->unk2C_1 = TRUE;
|
||||
this->unk44_31 = func_8030ED2C(SFX_18_BIGBUTT_SLIDE, 2);
|
||||
D_80392F20[0] = this->position_x;
|
||||
D_80392F20[1] = this->position_y;
|
||||
D_80392F20[2] = this->position_z;
|
||||
this->unk1C[0] = this->yaw;
|
||||
local->unk0 = NULL;
|
||||
local->unk4 = NULL;
|
||||
local->unk8 = 0.0f;
|
||||
local->unkC = 0.0f;
|
||||
local->unk10 = 0.0f;
|
||||
local->unk8 = 1.0f;
|
||||
func_8038B9B0(this->marker);
|
||||
this->unk38_31 = 0;
|
||||
func_80388C88(this);
|
||||
func_802C3BF8(func_803895E0);
|
||||
if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){
|
||||
local->unk19 = 2;
|
||||
this->unk4C = 900.0f;
|
||||
}
|
||||
else if(jiggyscore_isSpawned(JIGGY_30_FP_BOGGY_2)){
|
||||
local->unk19 = 1;
|
||||
this->unk38_31 = 2;
|
||||
this->unk4C = 600.0f;
|
||||
func_80328B8C(this, 11, 0.0001f, 1);
|
||||
}
|
||||
else{
|
||||
local->unk19 = 1;
|
||||
this->unk4C = 600.0f;
|
||||
mapSpecificFlags_set(4, TRUE);
|
||||
}
|
||||
}//L803898CC
|
||||
|
||||
func_8028E668(this->position, 200.0f, -200.0f, 140.0f);
|
||||
if(!func_8038A1A0(this->marker)){
|
||||
switch(this->unk38_31){
|
||||
case 1://L80389920
|
||||
func_80328B8C(this, 9, 0.0001f, 1);
|
||||
break;
|
||||
case 2://L80389938
|
||||
func_80328B8C(this, 10, 0.0001f, 1);
|
||||
break;
|
||||
}
|
||||
}//L80389950
|
||||
|
||||
if(0.0 <local->unk10 - sp54)
|
||||
local->unk10 =local->unk10 - sp54;
|
||||
else
|
||||
local->unk10 = 0.0f;
|
||||
|
||||
switch(this->state){
|
||||
case 1:// L803899B8
|
||||
if(func_80388CA0(this)){
|
||||
func_80388B18(this, local->unk19);
|
||||
}//L803899DC
|
||||
else if(!jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2) && func_8028ECAC() == BSGROUP_C_WALRUS_SLED){
|
||||
func_803888E4(this);
|
||||
}
|
||||
else if( func_80329530(this, 0x1C2)
|
||||
&& func_8028ECAC() == 0
|
||||
&& func_8028F20C()
|
||||
&& func_8028EFC8()
|
||||
&& sp3C[1] == 1
|
||||
&& !func_803114B0()
|
||||
){
|
||||
if( local->unk19 == 1
|
||||
&& player_getTransformation() != TRANSFORM_4_WALRUS
|
||||
&& func_803203FC(0xb3)
|
||||
){
|
||||
func_80311480(0xC01, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else if( local->unk19 == 2){
|
||||
if( player_getTransformation() == TRANSFORM_4_WALRUS
|
||||
&& func_803203FC(0xb4)
|
||||
){
|
||||
func_80311480(0xC08, 0xf, this->position, this->marker, func_80388D70, NULL);
|
||||
}
|
||||
else if( player_getTransformation() != TRANSFORM_4_WALRUS){
|
||||
func_80388A94(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:// L80389B50
|
||||
if(0.0 < local->unk14){
|
||||
local->unk14 -= sp54;
|
||||
}
|
||||
else{
|
||||
local->unk14 = 0.0f;
|
||||
if( randf() < 0.02 && sp58 < 0.0){
|
||||
if(randf() < 0.5)
|
||||
func_80328B8C(this, 5, 0.0001f, 1);
|
||||
else
|
||||
func_80328B8C(this, 6, 0.0001f, 1);
|
||||
}//L80389C18
|
||||
|
||||
func_803893E4(this, sp58, local->unk19);
|
||||
func_80388F90(this);
|
||||
if(0.0 ==local->unk10 && func_80388FE8(this, sp58,local->unkC)){
|
||||
local->unk10 = 1.5f;
|
||||
}
|
||||
}//L80389C78
|
||||
break;
|
||||
|
||||
case 5:// L80389C80
|
||||
case 6:// L80389C80
|
||||
if(actor_animationIsAt(this, 0.9999f) || sp58 >= 0.0){
|
||||
func_80328B8C(this, 4, 0.0001f, 1);
|
||||
}//L80389CC8
|
||||
|
||||
func_803893E4(this, sp58, local->unk19);
|
||||
func_80388F90(this);
|
||||
if(0.0 == local->unk10 && func_80388FE8(this, sp58, local->unkC)){
|
||||
local->unk10 = 1.5f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:// L80389D34
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 4, 0.0001f, 1);
|
||||
}//L80389D60
|
||||
func_803893E4(this, sp58, local->unk19);
|
||||
func_80388F90(this);
|
||||
break;
|
||||
|
||||
case 8:// L80389D84
|
||||
func_80343DEC(this);
|
||||
if(this->unk4C < 740.0f){
|
||||
this->unk4C += 10.0f;
|
||||
}
|
||||
else if(740.0f < this->unk4C) {
|
||||
this->unk4C -= 10.0f;
|
||||
}
|
||||
func_803890DC(this, local->unk19);
|
||||
func_80388F90(this);
|
||||
if(0.0 == local->unk10 && func_80388FE8(this, sp58, local->unkC)){
|
||||
local->unk10 = 1.5f;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 9:// L80389E48
|
||||
func_803893E4(this, sp58, local->unk19);
|
||||
if(this->unk48 < 0.99999999999){
|
||||
func_80388F90(this);
|
||||
}
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 11, 0.0001f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 10:// L80389EB4
|
||||
func_803893E4(this, sp58, local->unk19);
|
||||
if(this->unk48 < 0.99999999999){
|
||||
func_80388F90(this);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80328B8C(this, 11, 0.0001f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:// L80389F20
|
||||
func_803890DC(this, local->unk19);
|
||||
|
||||
if(!actor_playerIsWithinDist(this, 2000)
|
||||
&& !this->marker->unk14_21
|
||||
){
|
||||
switch(local->unk19){
|
||||
case 1: //L80389F78
|
||||
if(this->unk38_31 == 2){
|
||||
if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){
|
||||
func_802C3C88(func_80388F54, this->marker);
|
||||
func_8038B9BC();
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
else{
|
||||
func_8038B9BC();
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2: //L80389FDC
|
||||
if(this->unk38_31 == 2){
|
||||
if(jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){
|
||||
func_8038B9BC();
|
||||
marker_despawn(this->marker);
|
||||
mapSpecificFlags_set(0xC, TRUE);
|
||||
}
|
||||
}
|
||||
else{
|
||||
func_8038B9BC();
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}//L8038A034
|
||||
|
||||
D_80392F20[0] = (s32)this->position[0];
|
||||
D_80392F20[1] = (s32)this->position[1];
|
||||
D_80392F20[2] = (s32)this->position[2];
|
||||
this->unk1C[0] = this->yaw;
|
||||
local->unkC = sp58;
|
||||
}
|
||||
|
||||
void func_8038A09C(f32 arg0[3]){
|
||||
arg0[0] = (f32)D_80392F20[0];
|
||||
arg0[1] = (f32)D_80392F20[1];
|
||||
arg0[2] = (f32)D_80392F20[2];
|
||||
}
|
||||
|
||||
void func_8038A0E4(UNK_TYPE(s32) arg0, ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
if(actor){
|
||||
if(actor->state != 7){
|
||||
func_80328B8C(actor, 7, 0.0001f, 1);
|
||||
}
|
||||
else{
|
||||
func_80328B8C(actor, 4, 0.0001f, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void func_8038A150(UNK_TYPE(s32) arg0, ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
if(actor && actor->state != 8){
|
||||
func_80328B8C(actor, 8, 0.0001f, 1);
|
||||
};
|
||||
}
|
||||
|
||||
bool func_8038A1A0(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
switch (actor->state){
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
179
src/FP/code_3E00.c
Normal file
179
src/FP/code_3E00.c
Normal file
@@ -0,0 +1,179 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||
extern s32 func_8028F31C(f32[3], f32, s32, Actor **);
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
} Struct_FP_3E00;
|
||||
|
||||
void func_8038A384(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391DF0[] = {
|
||||
{0, 0.0f},
|
||||
{ASSET_17E_ANIM_POLAR_BEAR_CUB_SAD, 5.5f},
|
||||
{ASSET_17D_ANIM_POLAR_BEAR_CUB_HAPPY, 2.5f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391E08 = { MARKER_1FA_POLAR_BEAR_CUB_BLUE, ACTOR_1EA_POLAR_BEAR_CUB_BLUE, ASSET_44C_MODEL_POLAR_BEAR_CUB_BLUE,
|
||||
0x1, D_80391DF0,
|
||||
func_8038A384, func_80326224, func_80325888,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80391E2C = { MARKER_1FB_POLAR_BEAR_CUB_GREEN, ACTOR_1EB_POLAR_BEAR_CUB_GREEN, ASSET_44D_MODEL_POLAR_BEAR_CUB_GREEN,
|
||||
0x1, D_80391DF0,
|
||||
func_8038A384, func_80326224, func_80325888,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80391E50 = { MARKER_1FC_POLAR_BEAR_CUB_RED, ACTOR_1EC_POLAR_BEAR_CUB_RED, ASSET_44E_MODEL_POLAR_BEAR_CUB_RED,
|
||||
0x1, D_80391DF0,
|
||||
func_8038A384, func_80326224, func_80325888,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
f32 D_80391E74[3] = {-5.0f, 180.0f, 1.0f};
|
||||
Struct_FP_3E00 D_80391E80[] ={
|
||||
{0x11, 0x1FD, 0x1ED, 0x1EE},
|
||||
{0x12, 0x1FE, 0x1EF, 0x1F0},
|
||||
{0x13, 0x1FF, 0x1F1, 0x1F2}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038A1F0(Actor **this_ptr, s32 arg1, enum actor_e actor_id, s32 arg3){
|
||||
func_8028F31C((*this_ptr)->position, 600.0f, actor_id, this_ptr);
|
||||
|
||||
if(!func_80329530(*this_ptr, 400)) return;
|
||||
if(func_8028E88C() != arg1) return;
|
||||
if(!func_8028FC34()) return;
|
||||
|
||||
func_8028FA34(arg3, *this_ptr);
|
||||
}
|
||||
|
||||
void func_8038A274(Actor *this){
|
||||
if(actor_animationIsAt(this, 0.4f)){
|
||||
func_8030E878(SFX_B2_BOGGY_KID_HAPPY, this->unk1C[0], 32000, this->position, 100.0f, 600.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.75f)){
|
||||
func_8030E878(SFX_53_BANJO_HUIII, this->unk1C[1], 32000, this->position, 100.0f, 600.0f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_8038A318(ActorMarker *caller, enum asset_e text_id, s32 arg1){
|
||||
if(text_id == 0xc19){
|
||||
func_802BAFE4(0x25);
|
||||
jiggySpawn(JIGGY_2E_FP_PRESENTS, D_80391E74);
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 32000);
|
||||
func_8025A6EC(COMUSIC_5B_FP_IGLOO_HAPPY, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038A384(Actor *this){
|
||||
s32 sp3C;
|
||||
enum asset_e sp38;
|
||||
s32 sp34;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
switch(this->marker->unk14_20){
|
||||
case MARKER_1FA_POLAR_BEAR_CUB_BLUE://L8038A404
|
||||
this->unk1C[0] = 1.0f;
|
||||
this->unk1C[1] = 1.2f;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
break;
|
||||
|
||||
case MARKER_1FB_POLAR_BEAR_CUB_GREEN://L8038A438
|
||||
this->unk1C[0] = 1.1f;
|
||||
this->unk1C[1] = 1.3f;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.4f);
|
||||
break;
|
||||
|
||||
case MARKER_1FC_POLAR_BEAR_CUB_RED://L8038A470
|
||||
this->unk1C[0] = 1.2f;
|
||||
this->unk1C[1] = 1.4f;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.7f);
|
||||
break;
|
||||
}//L8038A4A0
|
||||
|
||||
if( jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)
|
||||
|| func_803203FC(0xC1)
|
||||
){
|
||||
func_80328B8C(this, 2, randf2(0.0f, 0.9f), 1);
|
||||
}
|
||||
}//L8038A4E4
|
||||
|
||||
sp34 = levelSpecificFlags_get(0x11) + levelSpecificFlags_get(0x12) + levelSpecificFlags_get(0x13);
|
||||
sp38 = (sp34 == 1) ? 0xC17
|
||||
: (sp34 == 2) ? 0xC18
|
||||
: 0xC19;
|
||||
|
||||
this->yaw_moving = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 2.0f);
|
||||
func_8028E668(this->position, 100.0f, -10.0f, 100.0f);
|
||||
|
||||
switch(this->state){
|
||||
case 1://L8038A5B0
|
||||
if(!levelSpecificFlags_get(0x19) && func_80329530(this, 0xfa)){
|
||||
if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){
|
||||
if(sp34 == 0
|
||||
&& !jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)
|
||||
&& !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)
|
||||
){
|
||||
if(func_80311480(0xc1a, 0x2a, NULL, NULL, NULL, NULL))
|
||||
levelSpecificFlags_set(0x19, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
}//L8038A648
|
||||
|
||||
switch(this->marker->unk14_20){
|
||||
case MARKER_1FA_POLAR_BEAR_CUB_BLUE:
|
||||
sp3C = 0;
|
||||
break;
|
||||
|
||||
case MARKER_1FB_POLAR_BEAR_CUB_GREEN:
|
||||
sp3C = 1;
|
||||
break;
|
||||
|
||||
case MARKER_1FC_POLAR_BEAR_CUB_RED:
|
||||
sp3C = 2;
|
||||
break;
|
||||
}
|
||||
if(levelSpecificFlags_get(D_80391E80[sp3C].unk0)){
|
||||
func_80328B8C(this, 2, 0.001f, 1);
|
||||
if(sp38 == 0xc19){
|
||||
func_80311480(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL);
|
||||
}
|
||||
else{
|
||||
func_80311480(sp38, 0x3, this->position, this->marker, func_8038A318, NULL);
|
||||
}
|
||||
}
|
||||
else{//L8038A73C
|
||||
func_8038A1F0(&this, D_80391E80[sp3C].unk4, D_80391E80[sp3C].unk8, D_80391E80[sp3C].unkC);
|
||||
if( actor_animationIsAt(this, 0.45f)
|
||||
&& !func_803114B0()
|
||||
){
|
||||
func_8030E878(SFX_B1_BOGGY_KID_CRYING, randf2(0.9f, 1.1f), 32000, this->position, 150.0f, 700.0f);
|
||||
}
|
||||
}//L8038A7DC
|
||||
break;
|
||||
case 2://L8038A7C0
|
||||
if(!func_803114B0()){
|
||||
func_8038A274(this);
|
||||
}
|
||||
break;
|
||||
}//L8038A7DC
|
||||
}
|
80
src/FP/code_4400.c
Normal file
80
src/FP/code_4400.c
Normal file
@@ -0,0 +1,80 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
extern struct {
|
||||
u8 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
f32 spawn_pos[3];
|
||||
u8 unk1C;
|
||||
} D_80392F30;
|
||||
|
||||
/* .code */
|
||||
void func_8038A7F0(void){
|
||||
if( map_get() != MAP_27_FP_FREEZEEZY_PEAK
|
||||
|| jiggyscore_isCollected(JIGGY_31_FP_SIR_SLUSH)
|
||||
|| jiggyscore_isSpawned(JIGGY_31_FP_SIR_SLUSH)
|
||||
){
|
||||
D_80392F30.unk0 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
D_80392F30.unk1C = 0;
|
||||
if(func_80304E24(0x128, D_80392F30.spawn_pos)){
|
||||
D_80392F30.unk1C = 1;
|
||||
}
|
||||
D_80392F30.unk0 = 1;
|
||||
D_80392F30.unk4 = 0;
|
||||
D_80392F30.unk8 = 0;
|
||||
}
|
||||
|
||||
void func_8038A888(void){}
|
||||
|
||||
void func_8038A890(void){
|
||||
switch(D_80392F30.unk0){
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1://L8038A8CC
|
||||
if(D_80392F30.unk4) break;
|
||||
if(!D_80392F30.unk8) break;
|
||||
|
||||
D_80392F30.unk0 = 2;
|
||||
D_80392F30.unkC = 0;
|
||||
break;
|
||||
|
||||
case 2://L8038A8F4
|
||||
if(D_80392F30.unkC >= 0x4b){
|
||||
|
||||
if(D_80392F30.unk1C){
|
||||
func_802BAFE4(0x12);
|
||||
jiggySpawn(JIGGY_31_FP_SIR_SLUSH, D_80392F30.spawn_pos);
|
||||
func_802C3F04(func_802C4140, ACTOR_4C_STEAM,
|
||||
reinterpret_cast(s32, D_80392F30.spawn_pos[0]),
|
||||
reinterpret_cast(s32, D_80392F30.spawn_pos[1]),
|
||||
reinterpret_cast(s32, D_80392F30.spawn_pos[2])
|
||||
);
|
||||
}
|
||||
D_80392F30.unk0 = 3;
|
||||
}
|
||||
else{
|
||||
D_80392F30.unkC++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3://L8038A96C
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038A978(void){
|
||||
D_80392F30.unk4--;
|
||||
}
|
||||
|
||||
void func_8038A990(void){
|
||||
D_80392F30.unk8++;
|
||||
D_80392F30.unk4++;
|
||||
}
|
79
src/FP/code_45D0.c
Normal file
79
src/FP/code_45D0.c
Normal file
@@ -0,0 +1,79 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
// u8 pad1[3];
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
f32 spawn_pos[3];
|
||||
u8 unk18;
|
||||
} Struct_FP_45D0_0;
|
||||
|
||||
extern Struct_FP_45D0_0 D_80392F50;
|
||||
|
||||
/* .code */
|
||||
void func_8038A9C0(void){
|
||||
if( map_get() != MAP_27_FP_FREEZEEZY_PEAK
|
||||
|| jiggyscore_isCollected(JIGGY_2D_FP_SNOWMAN_BUTTONS)
|
||||
|| jiggyscore_isSpawned(JIGGY_2D_FP_SNOWMAN_BUTTONS)
|
||||
){
|
||||
D_80392F50.unk0 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
D_80392F50.unk18 = 0;
|
||||
if(func_80304E24(0x15E, D_80392F50.spawn_pos)){
|
||||
D_80392F50.unk18 = 1;
|
||||
}
|
||||
D_80392F50.unk0 = 1;
|
||||
D_80392F50.unk4 = 3;
|
||||
}
|
||||
|
||||
void func_8038AA58(void){}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_45D0/func_8038AA60.s")
|
||||
#else
|
||||
void func_8038AA60(void){
|
||||
switch(D_80392F50.unk0){
|
||||
// case 0:
|
||||
// break;
|
||||
|
||||
case 1:
|
||||
if(D_80392F50.unk4 <= 0){
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||
D_80392F50.unk0 = 2;
|
||||
D_80392F50.unk8 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2://L8038A8F4
|
||||
if(D_80392F50.unk8 >= 0x1e){
|
||||
|
||||
if(D_80392F50.unk18){
|
||||
func_802BAFE4(0x11);
|
||||
jiggySpawn(JIGGY_2D_FP_SNOWMAN_BUTTONS, D_80392F50.spawn_pos);
|
||||
func_802C3F04(func_802C4140, ACTOR_4C_STEAM,
|
||||
reinterpret_cast(s32, D_80392F50.spawn_pos[0]),
|
||||
reinterpret_cast(s32, D_80392F50.spawn_pos[1]),
|
||||
reinterpret_cast(s32, D_80392F50.spawn_pos[2])
|
||||
);
|
||||
}
|
||||
D_80392F50.unk0 = 3;
|
||||
}
|
||||
else{
|
||||
D_80392F50.unk8++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3://L8038A96C
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_8038AB40(void){
|
||||
D_80392F50.unk4--;
|
||||
}
|
611
src/FP/code_4770.c
Normal file
611
src/FP/code_4770.c
Normal file
@@ -0,0 +1,611 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8028F710(s32, f32);
|
||||
|
||||
typedef struct {
|
||||
ActorMarker *marker;
|
||||
f32 position[3];
|
||||
f32 unk10;
|
||||
}Struct_FP_4770;
|
||||
|
||||
/* .data */
|
||||
extern f32 D_80391ED0[3];
|
||||
extern f32 D_80391EDC;
|
||||
extern f32 D_80391EE0[3];
|
||||
extern f32 D_80391EEC;
|
||||
extern f32 D_80391EF0[3];
|
||||
extern f32 D_80391EFC;
|
||||
extern f32 D_80391F00[3];
|
||||
extern f32 D_80391F0C;
|
||||
extern f32 D_80391F10[3];
|
||||
extern f32 D_80391F1C;
|
||||
extern f32 D_80391F20[3];
|
||||
extern f32 D_80391F2C[3];
|
||||
extern f32 D_80391F38[3];
|
||||
|
||||
/* .bss */
|
||||
extern ActorMarker *D_80393590[5];
|
||||
extern struct {
|
||||
u8 unk0;
|
||||
// u8 pad1[0x3];
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
ActorMarker *unk14;
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u8 unk1A;
|
||||
}D_803935A8;
|
||||
extern Struct_FP_4770 D_80392F70[0x27];
|
||||
extern Struct_FP_4770 D_80393280[0x27];
|
||||
|
||||
|
||||
/* .code */
|
||||
void func_8038AB60(s32 arg0){
|
||||
int i;
|
||||
|
||||
func_8028F8F8(0xe, arg0 ^ 1);
|
||||
|
||||
for (i = 0x14; i < 0x23; i++){
|
||||
func_8028F8F8(i, arg0);
|
||||
}
|
||||
|
||||
for (i = 0x32; i < 0x38; i++){
|
||||
func_8028F8F8(i, arg0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038ABDC(void){
|
||||
comusic_8025AB44(COMUSIC_3A_FP_BOGGY_RACE, 0, 4000);
|
||||
func_8025AABC(COMUSIC_3A_FP_BOGGY_RACE);
|
||||
func_8025A58C(-1, 4000);
|
||||
func_8024BD08(1);
|
||||
}
|
||||
|
||||
void func_8038AC20(s32 gate_indx, s32 arg1){
|
||||
Actor *a1;
|
||||
Actor *a2;
|
||||
|
||||
a1 = marker_getActor(D_80392F70[gate_indx].marker);
|
||||
a2 = marker_getActor(D_80393280[gate_indx].marker);
|
||||
|
||||
a1->velocity[0] = (f32)arg1;
|
||||
a2->velocity[0] = (f32)arg1;
|
||||
}
|
||||
|
||||
//spawn race flag pair
|
||||
void func_8038AC90(s32 indx, s32 arg1){
|
||||
ActorMarker *m1;
|
||||
ActorMarker *m2;
|
||||
Actor *a1;
|
||||
Actor *a2;
|
||||
|
||||
m1 = func_8032813C(0x161, D_80392F70[indx].position, 0)->marker;
|
||||
m2 = func_8032813C(0x162, D_80393280[indx].position, 0)->marker;
|
||||
a1 = marker_getActor(m1);
|
||||
a2 = marker_getActor(m2);
|
||||
|
||||
a1->unk38_31 = 1;
|
||||
a2->unk38_31 = 1;
|
||||
|
||||
a1->unkF4_8 = indx + 1;
|
||||
a2->unkF4_8 = indx + 1;
|
||||
|
||||
D_80392F70[indx].marker = a1->marker;
|
||||
D_80393280[indx].marker = a2->marker;
|
||||
|
||||
func_8038AC20(indx, arg1);
|
||||
|
||||
a1->unk1C[0] = a2->position_x;
|
||||
a1->unk1C[1] = a2->position_y;
|
||||
a1->unk1C[2] = a2->position_z;
|
||||
|
||||
if(indx + 1 == 0x27){
|
||||
a1->velocity[1] = 1.0f;
|
||||
a2->velocity[1] = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038ADE4(s32 indx, s32 arg1){
|
||||
func_802C3D3C(func_8038AC90, indx, arg1);
|
||||
}
|
||||
|
||||
void func_8038AE14(s32 indx){
|
||||
if(D_80392F70[indx].marker){
|
||||
func_80326310(marker_getActor(D_80392F70[indx].marker));
|
||||
D_80392F70[indx].marker = NULL;
|
||||
}
|
||||
|
||||
if(D_80393280[indx].marker){
|
||||
func_80326310(marker_getActor(D_80393280[indx].marker));
|
||||
D_80393280[indx].marker = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038AEA0(void){
|
||||
int i;
|
||||
for(i = 0; i < 0x27; i++){
|
||||
func_8038AE14(i);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038AEE0(s32 indx){
|
||||
Actor *sp1C;
|
||||
switch(indx){
|
||||
case 0:// L8038AF0C
|
||||
sp1C = func_8032813C(0x22d, D_80391ED0, D_80391EDC);
|
||||
break;
|
||||
|
||||
case 1:// L8038AF38
|
||||
sp1C = func_8032813C(0x22e, D_80391EE0, D_80391EEC);
|
||||
break;
|
||||
|
||||
case 2:// L8038AF64
|
||||
sp1C = func_8032813C(0x22d, D_80391EF0, D_80391EFC);
|
||||
break;
|
||||
|
||||
case 3:// L8038AF90
|
||||
sp1C = func_8032813C(0x22d, D_80391F00, D_80391F0C);
|
||||
break;
|
||||
|
||||
case 4:// L8038AFBC
|
||||
sp1C = func_8032813C(0x22d, D_80391F10, D_80391F1C);
|
||||
break;
|
||||
}
|
||||
D_80393590[indx] = sp1C->marker;
|
||||
}
|
||||
|
||||
void func_8038B00C(s32 indx){
|
||||
func_802C3C88(func_8038AEE0, indx);
|
||||
}
|
||||
|
||||
void func_8038B034(void){
|
||||
int i;
|
||||
for(i = 0; i < 5; i++){
|
||||
func_8038B00C(i);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B074(s32 indx){
|
||||
if(D_80393590[indx]){
|
||||
marker_despawn(D_80393590[indx]);
|
||||
D_80393590[indx] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B0B8(void){
|
||||
int i;
|
||||
for(i = 0; i < 5; i++){
|
||||
func_8038B074(i);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B0F8(void){
|
||||
Actor *trainers = func_8032813C(ACTOR_2C_TURBO_TALON_TRAINERS, D_80391F20, 100);
|
||||
trainers->unk10_1 = FALSE;
|
||||
}
|
||||
|
||||
void func_8038B130(enum jiggy_e jiggy_id){
|
||||
if(jiggy_id == JIGGY_2C_FP_BOGGY_3 && !jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){
|
||||
jiggySpawn(jiggy_id, D_80391F38);
|
||||
}
|
||||
else{
|
||||
jiggySpawn(jiggy_id, D_80391F2C);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B190(void){
|
||||
func_8028F66C(0x2B);
|
||||
mapSpecificFlags_set(4, FALSE);
|
||||
func_8028F918(0);
|
||||
}
|
||||
|
||||
void func_8038B1C4(void){
|
||||
D_803935A8.unk0 = 0;
|
||||
}
|
||||
|
||||
void func_8038B1D0(enum jiggy_e jiggy_id){
|
||||
timed_setCameraToNode(0.0f, 3);
|
||||
timedFunc_set_0(0.0f, func_8038AEA0);
|
||||
timedFunc_set_0(0.0f, func_8038B0B8);
|
||||
timedFunc_set_1(0.1f, (TFQM1) func_8038B130, jiggy_id);
|
||||
timedFunc_set_0(5.0f, func_8038B190);
|
||||
timedFunc_set_0(5.0f, func_8038B1C4);
|
||||
func_80324E88(5.0f);
|
||||
|
||||
}
|
||||
|
||||
void func_8038B268(void){
|
||||
func_80324E88(0.0f);
|
||||
timedFunc_set_0(0.0f, func_8038AEA0);
|
||||
timedFunc_set_0(0.0f, func_8038B0B8);
|
||||
func_8028FA14(map_get(), 0x11);
|
||||
func_8028F66C(0x2A);
|
||||
}
|
||||
|
||||
void func_8038B2C8(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *actor;
|
||||
if(D_803935A8.unk14){
|
||||
actor = marker_getActor(D_803935A8.unk14);
|
||||
}
|
||||
|
||||
switch(text_id){
|
||||
case 0xc04: //8038B318
|
||||
func_8038B268();
|
||||
break;
|
||||
|
||||
case 0xc07: //8038B328
|
||||
func_8038B1D0(JIGGY_30_FP_BOGGY_2);
|
||||
break;
|
||||
|
||||
case 0xc0b: //8038B338
|
||||
func_8038B268();
|
||||
break;
|
||||
|
||||
case 0xc0d: //8038B348
|
||||
func_8038B1D0(JIGGY_2C_FP_BOGGY_3);
|
||||
break;
|
||||
|
||||
case 0xc10: //8038B358
|
||||
func_8038ABDC();
|
||||
func_8028FA14(map_get(), 0x11);
|
||||
func_8028F66C(0x2A);
|
||||
timedFunc_set_0(0.0f, func_8038B1C4);
|
||||
break;
|
||||
}//L8038B38C
|
||||
}
|
||||
|
||||
void func_8038B39C(void){
|
||||
if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2) && func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS){
|
||||
func_8028F710(3, 2.0f);
|
||||
}
|
||||
func_8028F918(1);
|
||||
func_8025A6EC(COMUSIC_3B_MINIGAME_VICTORY, 28000);
|
||||
func_8038AB60(0);
|
||||
func_8038ABDC();
|
||||
timed_setCameraToNode(0.0f, 1);
|
||||
}
|
||||
|
||||
void func_8038B410(void){
|
||||
Actor *sp2C;
|
||||
|
||||
func_8028F918(2);
|
||||
if(D_803935A8.unk14)
|
||||
sp2C = marker_getActor(D_803935A8.unk14);
|
||||
|
||||
sp2C->unk38_31 = 1;
|
||||
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 28000);
|
||||
func_8038AB60(0);
|
||||
func_8038ABDC();
|
||||
if(!jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){
|
||||
timed_setCameraToNode(0.0f, 1);
|
||||
timed_playSfx(1.0f, SFX_8C_BOGGY_WAHEY, 1.0f, 32000);
|
||||
func_80324DBC(2.0f, 0xC04, 0x2b, sp2C->position, NULL, func_8038B2C8, NULL);
|
||||
}//L8038B4E0
|
||||
else{
|
||||
timed_setCameraToNode(0.0f, 1);
|
||||
timed_playSfx(1.0f, SFX_8C_BOGGY_WAHEY, 1.0f, 32000);
|
||||
func_80324DBC(2.0f, 0xC0b, 0x2b, sp2C->position, NULL, func_8038B2C8, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B544(void){
|
||||
Actor *sp2C;
|
||||
int i;
|
||||
f32 f2;
|
||||
f32 f0;
|
||||
|
||||
switch(D_803935A8.unk0){
|
||||
case 1: //L8038B57C
|
||||
if(D_803935A8.unk4 < 0x4e) break;
|
||||
|
||||
for(i = 0; i < 0x27; i++){
|
||||
if(i < 0x26){
|
||||
f0 = D_80392F70[i+1].position[2] - D_80392F70[i].position[2];
|
||||
f2 = D_80392F70[i+1].position[0] - D_80392F70[i].position[0];
|
||||
D_80392F70[i].unk10 = f0*f0 + f2*f2;
|
||||
}
|
||||
if(D_80392F70[0x26].unk10 < D_80392F70[i].unk10)
|
||||
D_80392F70[0x26].unk10 = D_80392F70[i].unk10;
|
||||
}
|
||||
func_8038AEA0();
|
||||
D_803935A8.unk0 = NULL;
|
||||
break;
|
||||
|
||||
case 2: //L8038B61C
|
||||
if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2) && func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS){
|
||||
func_8028F710(3, 20.0f);
|
||||
}
|
||||
|
||||
if(D_80392F70[0x26].marker == NULL) break;
|
||||
|
||||
if(3.0f == marker_getActor(D_80392F70[0x26].marker)->velocity[0]){
|
||||
func_8038B39C();
|
||||
D_803935A8.unk0 = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if(D_803935A8.unk10){
|
||||
func_8038B410();
|
||||
D_803935A8.unk0 = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //L8038B6C4
|
||||
if(D_803935A8.unk14){
|
||||
sp2C = marker_getActor(D_803935A8.unk14);
|
||||
}
|
||||
sp2C->unk38_31 = 2;
|
||||
timed_playSfx(1.0f, SFX_8D_BOGGY_OHWW, 1.0f, 32000);
|
||||
if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2) || jiggyscore_isSpawned(JIGGY_30_FP_BOGGY_2)){
|
||||
func_80324DBC(2.0f, 0xc0d, 0x2a, sp2C->position, NULL, func_8038B2C8, NULL);
|
||||
}
|
||||
else{
|
||||
func_80324DBC(2.0f, 0xc07, 0x22, sp2C->position, NULL, func_8038B2C8, NULL);
|
||||
}
|
||||
D_803935A8.unk0 = 4;
|
||||
break;
|
||||
}//L8038B794
|
||||
}
|
||||
|
||||
void func_8038B7A4(void){
|
||||
int i;
|
||||
|
||||
func_8038AB60(0);
|
||||
|
||||
if(map_get() != MAP_27_FP_FREEZEEZY_PEAK || jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){
|
||||
D_803935A8.unk0 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
D_803935A8.unk0 = 1;
|
||||
D_803935A8.unk14 = NULL;
|
||||
D_803935A8.unk4 = 0;
|
||||
D_803935A8.unk8 = -1;
|
||||
D_803935A8.unkC = -1;
|
||||
D_803935A8.unk10 = 0;
|
||||
D_803935A8.unk18 = 0;
|
||||
D_803935A8.unk19 = 0;
|
||||
D_803935A8.unk1A = 0;
|
||||
|
||||
for(i = 0; i < 0x27; i++){
|
||||
D_80392F70[i].marker = NULL;
|
||||
D_80393280[i].marker = NULL;
|
||||
D_80392F70[i].position[0] = D_80392F70[i].position[1] = D_80392F70[i].position[2] = 0.0f;
|
||||
D_80393280[i].position[0] = D_80393280[i].position[1] = D_80393280[i].position[2] = 0.0f;
|
||||
D_80392F70[i].unk10 = 0.0f;
|
||||
D_80393280[i].unk10 = 0.0f;
|
||||
}
|
||||
for(i = 0; i < 5; i++){
|
||||
D_80393590[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B8A8(){}
|
||||
|
||||
void func_8038B8B0(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
s32 tmp_a0;
|
||||
|
||||
tmp_a0 = actor->unkF4_8 - 1;
|
||||
if(tmp_a0 < 0x27){
|
||||
D_80392F70[tmp_a0].marker = actor->marker;
|
||||
D_80392F70[tmp_a0].position[0] = actor->position[0];
|
||||
D_80392F70[tmp_a0].position[1] = actor->position[1];
|
||||
D_80392F70[tmp_a0].position[2] = actor->position[2];
|
||||
D_803935A8.unk4++;
|
||||
}//L8038B920
|
||||
}
|
||||
|
||||
void func_8038B930(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
s32 tmp_a0;
|
||||
|
||||
tmp_a0 = actor->unkF4_8 - 1;
|
||||
if(tmp_a0 < 0x27){
|
||||
D_80393280[tmp_a0].marker = actor->marker;
|
||||
D_80393280[tmp_a0].position[0] = actor->position[0];
|
||||
D_80393280[tmp_a0].position[1] = actor->position[1];
|
||||
D_80393280[tmp_a0].position[2] = actor->position[2];
|
||||
D_803935A8.unk4++;
|
||||
}//L8038B9A0
|
||||
}
|
||||
|
||||
void func_8038B9B0(ActorMarker *marker){
|
||||
D_803935A8.unk14 = marker;
|
||||
}
|
||||
|
||||
void func_8038B9BC(void){
|
||||
D_803935A8.unk14 = NULL;
|
||||
}
|
||||
|
||||
void func_8038B9C8(void){
|
||||
int i;
|
||||
|
||||
func_8038ADE4(0, 1);
|
||||
for(i = 1; i < 4; i++){
|
||||
func_8038ADE4(i, 2);
|
||||
}
|
||||
func_8038ADE4(0x26, 2);
|
||||
func_8038B034();
|
||||
if(jiggyscore_isSpawned(JIGGY_30_FP_BOGGY_2) || jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){
|
||||
func_802C3BF8(func_8038B0F8);
|
||||
}
|
||||
|
||||
D_803935A8.unk8 = -1;
|
||||
D_803935A8.unkC = -1;
|
||||
D_803935A8.unk10 = 0;
|
||||
D_803935A8.unk18 = 0;
|
||||
D_803935A8.unk19 = 0;
|
||||
D_803935A8.unk1A = 0;
|
||||
func_8038AB60(1);
|
||||
D_803935A8.unk0 = 2;
|
||||
}
|
||||
|
||||
void func_8038BA88(s32 arg0){
|
||||
|
||||
D_803935A8.unk8 = --arg0;
|
||||
func_8038AC20(arg0, 3);
|
||||
if(arg0 + 1 < 39){
|
||||
func_8038AC20(arg0 + 1, 1);
|
||||
}
|
||||
|
||||
if(arg0 + 4 < 38){
|
||||
func_8038ADE4(arg0 + 4, 2);
|
||||
}
|
||||
|
||||
if(arg0 >= 2){
|
||||
func_8038AE14(arg0 - 2);
|
||||
}
|
||||
|
||||
if(arg0 + 4 < 11){
|
||||
func_8028F8F8(20, 1);
|
||||
func_8028F8F8(20, 1);
|
||||
func_8028F8F8(21, 1);
|
||||
func_8028F8F8(22, 1);
|
||||
func_8028F8F8(30, 0);
|
||||
}
|
||||
else{
|
||||
func_8028F8F8(20, 0);
|
||||
func_8028F8F8(21, 0);
|
||||
func_8028F8F8(22, 0);
|
||||
func_8028F8F8(30, 1);
|
||||
}
|
||||
|
||||
switch(D_803935A8.unkC - D_803935A8.unk8){
|
||||
case 3:
|
||||
func_8025AEA0(0x3a, 0x411aa);
|
||||
break;
|
||||
case 2:
|
||||
func_8025AEA0(0x3a, 0x493e0);
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
default:
|
||||
func_8025AEA0(0x3a, 0x51615);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038BC0C(s32 arg0){
|
||||
|
||||
if(D_803935A8.unkC - D_803935A8.unk8 < 4 || 0x23 < D_803935A8.unkC){
|
||||
if(D_803935A8.unk14)
|
||||
marker_getActor(D_803935A8.unk14);
|
||||
|
||||
if(func_8038A1A0(D_803935A8.unk14))
|
||||
return;
|
||||
|
||||
D_803935A8.unkC = arg0-1;
|
||||
if(D_803935A8.unkC >= 0x26){
|
||||
D_803935A8.unk10 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if(D_803935A8.unk0 == 3) return;
|
||||
if(D_803935A8.unk0 == 4) return;
|
||||
if(D_803935A8.unkC >= 0x25) return;
|
||||
|
||||
switch(D_803935A8.unkC - D_803935A8.unk8){
|
||||
case 4:
|
||||
if(D_803935A8.unk1A)
|
||||
break;
|
||||
D_803935A8.unk1A = TRUE;
|
||||
func_8038AB60(0);
|
||||
if(!func_8028F22C()){
|
||||
func_8028F918(2);
|
||||
func_80311480(0xc10, 0x20, NULL, NULL, func_8038B2C8, NULL);
|
||||
}//L8038BD40
|
||||
D_803935A8.unk0 = 4;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if(!D_803935A8.unk19 && !func_8028F22C()){
|
||||
D_803935A8.unk19 = 1;
|
||||
func_80311480(0xc0f, 0x20, NULL, NULL, NULL, NULL);
|
||||
}//L8038BD94
|
||||
func_8025AEA0(0x3a, 0x411aa);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if(!D_803935A8.unk18 && !func_8028F22C()){
|
||||
D_803935A8.unk18 = 1;
|
||||
func_80311480(0xc0e, 0x20, NULL, NULL, NULL, NULL);
|
||||
}//L8038BDF0
|
||||
func_8025AEA0(0x3a, 0x493e0);
|
||||
break;
|
||||
|
||||
default:
|
||||
func_8025AEA0(0x3a, 0x51615);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f32 func_8038BE20(f32 arg0[3]){
|
||||
f32 sp38[4];
|
||||
f32 f18;
|
||||
f32 sp30;
|
||||
f32 sp2C;
|
||||
f32 tmp_f12;
|
||||
|
||||
tmp_f12 = (f32)(D_803935A8.unkC - D_803935A8.unk8);
|
||||
if(D_803935A8.unk0 != 2 || D_803935A8.unkC < 0 || D_803935A8.unk8 < 0)
|
||||
return 0.0f;
|
||||
|
||||
if(tmp_f12 == 0.0f){
|
||||
player_getPosition(sp38);
|
||||
|
||||
f18 = D_80392F70[D_803935A8.unkC].unk10;
|
||||
if( 0.0 == f18 )
|
||||
return 0.5f;
|
||||
|
||||
sp30 = ((arg0[0] - D_80392F70[D_803935A8.unkC].position[0])*(D_80392F70[D_803935A8.unkC+1].position[0] - D_80392F70[D_803935A8.unkC].position[0]) + (arg0[2] - D_80392F70[D_803935A8.unkC].position[2])*(D_80392F70[D_803935A8.unkC+1].position[2] - D_80392F70[D_803935A8.unkC].position[2]))/f18;
|
||||
sp2C = ((sp38[0] - D_80392F70[D_803935A8.unkC].position[0])*(D_80392F70[D_803935A8.unkC+1].position[0] - D_80392F70[D_803935A8.unkC].position[0]) + (sp38[2] - D_80392F70[D_803935A8.unkC].position[2])*(D_80392F70[D_803935A8.unkC+1].position[2] - D_80392F70[D_803935A8.unkC].position[2]))/f18;
|
||||
return -(sp30 - sp2C);
|
||||
}//L8038BF58
|
||||
|
||||
tmp_f12 += (tmp_f12 < 0.0f) ? -0.5 : 0.5;
|
||||
return -tmp_f12;
|
||||
}
|
||||
|
||||
bool func_8038BFA0(void){
|
||||
if ( D_803935A8.unk0 == 2
|
||||
|| D_803935A8.unk0 == 3
|
||||
|| D_803935A8.unk0 == 4
|
||||
|| D_803935A8.unk1A
|
||||
){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool func_8038BFE8(f32 arg0[3], s32 arg1){
|
||||
Actor *actor;
|
||||
|
||||
if(D_803935A8.unk14){
|
||||
actor = marker_getActor(D_803935A8.unk14);
|
||||
}
|
||||
else{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( (actor->position[0] - arg0[0])*(actor->position[0] - arg0[0])
|
||||
+ (actor->position[1] - arg0[1])*(actor->position[1] - arg0[1])
|
||||
+ (actor->position[2] - arg0[2])*(actor->position[2] - arg0[2])
|
||||
< arg1*arg1
|
||||
){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 func_8038C098(void){
|
||||
return D_803935A8.unk10;
|
||||
}
|
93
src/FP/code_4D0.c
Normal file
93
src/FP/code_4D0.c
Normal file
@@ -0,0 +1,93 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_803868C0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80386AA4(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391A40 []= {
|
||||
{ ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ ASSET_1A1_ANIM_SLED, 1.0f},
|
||||
{ ASSET_1A1_ANIM_SLED, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391A60 = {
|
||||
MARKER_3C_RACE_SLED, ACTOR_182_RACE_SLED, ASSET_352_MODEL_SLED,
|
||||
0x0, D_80391A40,
|
||||
func_80386AA4, NULL, func_803868C0,
|
||||
1000, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_803868C0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(this->unk10_12 == FALSE){
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void func_80386920(Actor *this, s32 next_state){
|
||||
if(this->state != 1 || next_state != 1){
|
||||
func_80328A84(this, next_state);
|
||||
switch(next_state){
|
||||
case 1: //L8038697C
|
||||
this->unk10_12 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
break;
|
||||
case 2: //L803869A4
|
||||
this->unk10_12 = FALSE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
break;
|
||||
case 3: //L803869CC
|
||||
this->unk10_12 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_803869FC(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
f32 plyr_pos[3];
|
||||
|
||||
if(this->state == 2){
|
||||
player_getPosition(plyr_pos);
|
||||
if( this->position_y + 20.0f < plyr_pos[1]
|
||||
&& func_8028F20C()
|
||||
&& player_getTransformation() == TRANSFORM_4_WALRUS
|
||||
&& func_8028F68C(0x29, this->marker)
|
||||
){
|
||||
func_80386920(this, 3); //start_race
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80386AA4(Actor *this){
|
||||
s32 sp24;
|
||||
if(!this->initialized){
|
||||
this->initialized = TRUE;
|
||||
marker_setCollisionScripts(this->marker, func_803869FC, NULL, NULL);
|
||||
func_80386920(this, 1);
|
||||
}
|
||||
|
||||
sp24 = mapSpecificFlags_get(4);
|
||||
if(sp24 == 0){
|
||||
func_80386920(this, 1);
|
||||
}
|
||||
|
||||
switch (this->state){
|
||||
case 1://L80386B38
|
||||
if(sp24){
|
||||
func_80386920(this, 2);
|
||||
}
|
||||
break;
|
||||
case 3://L80386B50
|
||||
if(func_8028ECAC() != BSGROUP_C_WALRUS_SLED){
|
||||
func_80386920(this, 2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
392
src/FP/code_5CC0.c
Normal file
392
src/FP/code_5CC0.c
Normal file
@@ -0,0 +1,392 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern Actor *func_802EBAE0(UNK_TYPE(s32), f32 position[3], f32 rotation[3], f32 scale, UNK_TYPE(s32), UNK_TYPE(s32), UNK_TYPE(s32), f32, UNK_TYPE(s32));
|
||||
|
||||
Actor *func_8038C1F8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038C9A0(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_80391F50[];
|
||||
|
||||
extern ActorInfo D_80391F88 = { MARKER_200_TWINKLY_BLUE, ACTOR_332_TWINKLY_BLUE, ASSET_448_MODEL_TWINKLY_BLUE,
|
||||
0x1, D_80391F50,
|
||||
func_8038C9A0, func_80326224, func_8038C1F8,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80391FAC = { MARKER_201_TWINKLY_GREEN, ACTOR_333_TWINKLY_GREEN, ASSET_449_MODEL_TWINKLY_GREEN,
|
||||
0x1, D_80391F50,
|
||||
func_8038C9A0, func_80326224, func_8038C1F8,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80391FD0 = { MARKER_202_TWINKLY_ORANGE, ACTOR_334_TWINKLY_ORANGE, ASSET_44A_MODEL_TWINKLY_ORANGE,
|
||||
0x1, D_80391F50,
|
||||
func_8038C9A0, func_80326224, func_8038C1F8,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80391FF4 = { MARKER_203_TWINKLY_RED, ACTOR_335_TWINKLY_RED, ASSET_44B_MODEL_TWINKLY_RED,
|
||||
0x1, D_80391F50,
|
||||
func_8038C9A0, func_80326224, func_8038C1F8,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
extern s32 D_80392018[4];
|
||||
extern struct43s D_80392028;
|
||||
extern f32 D_80392070[3];
|
||||
extern f32 D_8039207C[3];
|
||||
extern f32 D_80392088[3];
|
||||
extern f32 D_80392094[3];
|
||||
extern s32 D_803920A0[4];
|
||||
extern s32 D_803920B0[4];
|
||||
|
||||
extern f64 D_80392D80;
|
||||
extern f64 D_80392D88;
|
||||
extern f64 D_80392D90;
|
||||
extern f32 D_80392D98;
|
||||
extern f32 D_80392D9C;
|
||||
extern f32 D_80392DA0;
|
||||
extern f32 D_80392DA4;
|
||||
extern f32 D_80392DA8;
|
||||
extern f32 D_80392DAC;
|
||||
extern f32 D_80392DB0;
|
||||
extern f64 D_80392DB8;
|
||||
extern f64 D_80392DC0;
|
||||
extern f64 D_80392DC8;
|
||||
|
||||
// C00999999999999A
|
||||
// C00999999999999A
|
||||
// 3FEFFFEB074A771D
|
||||
// 3F99999A
|
||||
// 3FA66666
|
||||
// 44DAC000
|
||||
// 455AC000
|
||||
// 3FB33333
|
||||
// 44DAC000
|
||||
// 455AC000
|
||||
// C00999999999999A
|
||||
// 3FEFFF2E48E8A71E
|
||||
// 3FEFFFFDE7210BE9
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE(s32) arg3){
|
||||
UNK_TYPE(s32) sp5C = func_8033A12C(func_80330B1C(marker));
|
||||
Actor *this = marker_getActor(marker);
|
||||
f32 sp4C[3];
|
||||
f32 sp40[3];
|
||||
f32 sp3C;
|
||||
|
||||
sp4C[0] = (f32)marker->propPtr->x;
|
||||
sp4C[1] = (f32)marker->propPtr->y;
|
||||
sp4C[2] = (f32)marker->propPtr->z;
|
||||
|
||||
sp40[0] = (f32)marker->pitch;
|
||||
sp40[1] = this->unk60;
|
||||
sp40[2] = (f32)marker->roll;
|
||||
sp3C = this->scale;
|
||||
if(func_802EA190(marker->unk20)){
|
||||
return func_802EBAE0(sp5C, sp4C, sp40, sp3C, NULL, marker->unk20, arg1, arg2, arg3);
|
||||
}
|
||||
else{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_8038C1F8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_8033A45C(2, this->unk38_31);
|
||||
func_8033A45C(1, func_8033A0F0(2) ^ 1);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038C260(f32 position[3], s32 count, enum asset_e model_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80392028);
|
||||
func_802EFE24(pCtrl,
|
||||
400.0f, 400.0f, 400.0f,
|
||||
800.0f, 800.0f, 800.0f
|
||||
);
|
||||
func_802EFB70(pCtrl, 0.1f, 0.2f);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.02f);
|
||||
func_802EFEC0(pCtrl, 1.5f, 1.5f);
|
||||
func_802EFA5C(pCtrl, 0.0f, 0.3f);
|
||||
func_802EF9F8(pCtrl, 0.6f);
|
||||
func_802EFA18(pCtrl, 0);
|
||||
func_802EFA20(pCtrl, 1.0f, 1.3f);
|
||||
func_802EF9EC(pCtrl, 0x7B, 8000);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038C398(f32 position[3], enum marker_e marker_id){
|
||||
enum asset_e sp1C;
|
||||
switch(marker_id){
|
||||
case MARKER_200_TWINKLY_BLUE:
|
||||
sp1C = ASSET_497_MODEL_TWINKLY_SHARD_BLUE;
|
||||
break;
|
||||
|
||||
case MARKER_201_TWINKLY_GREEN:
|
||||
sp1C = ASSET_499_MODEL_TWINKLY_SHARD_GREEN;
|
||||
break;
|
||||
|
||||
case MARKER_202_TWINKLY_ORANGE:
|
||||
sp1C = ASSET_49A_MODLE_TWINKLY_SHARD_ORANGE;
|
||||
break;
|
||||
|
||||
case MARKER_203_TWINKLY_RED:
|
||||
sp1C = ASSET_49B_MODLE_TWINKLY_SHARD_RED;
|
||||
break;
|
||||
}
|
||||
func_8038C260(position, 12, sp1C);
|
||||
func_8038C260(position, 4, ASSET_498_MODEL_TWINKLY_SHARD_YELLOW);
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
void func_8038C428(Actor *this, f32 arg1[3], f32 arg2);
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_5CC0/func_8038C428.s")
|
||||
#else
|
||||
void func_8038C428(Actor *this, f32 arg1[3], f32 arg2) {
|
||||
u8 sp7F;
|
||||
s32 sp78;
|
||||
f32 sp74;
|
||||
f32 sp70;
|
||||
f32 sp5C[3];
|
||||
f32 sp54;
|
||||
f32 sp50;
|
||||
f32 sp48;
|
||||
f32 temp_f0_2;
|
||||
f32 phi_f22;
|
||||
f32 phi_f24;
|
||||
f32 phi_f16;
|
||||
s32 phi_v0;
|
||||
s32 phi_v1;
|
||||
|
||||
sp74 = arg2;
|
||||
sp70 = this->position[1];
|
||||
phi_v1 = (arg2 == 0.0f) ? FALSE : TRUE;
|
||||
phi_f22 = arg1[0] - this->position[0];
|
||||
phi_f24 = arg1[2] - this->position[2];
|
||||
sp78 = 0;
|
||||
sp48 = phi_f22 / sp54;
|
||||
sp50 = phi_f24 / sp54;
|
||||
sp54 = gu_sqrtf((phi_f22 * phi_f22) + (phi_f24 * phi_f24));
|
||||
if (sp7F = phi_v1) {
|
||||
temp_f0_2 = randf2(130.0f, 150.0f);
|
||||
if (!(sp54 < temp_f0_2)) {
|
||||
sp54 = temp_f0_2;
|
||||
}
|
||||
phi_f22 = sp48 * sp54;
|
||||
phi_f24 = sp50 * sp54;
|
||||
}
|
||||
sp5C[0] = this->position[0] + phi_f22;
|
||||
sp5C[1] = this->position[1];
|
||||
sp5C[2] = this->position[2] + phi_f24;
|
||||
sp78 = 0;
|
||||
if (sp7F) {
|
||||
do {
|
||||
// sp70 += arg2 += D_80392D80;
|
||||
// sp70 += arg2 += D_80392D80;
|
||||
sp70 += arg2 += -3.2;
|
||||
sp78++;
|
||||
} while (func_80309724(sp5C) < sp70 || arg2 > 0.0f);
|
||||
} else {
|
||||
sp74 = (f32) ((f64) (((arg1[1] + 40.0f) - this->position[1]) / 28.0f) - (-3.2 * (f64) 28.0f * 0.5));
|
||||
sp78 = 0x1C;
|
||||
}
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
this->unk1C[0] = D_80392D90 / sp78;
|
||||
this->velocity[1] = sp74;
|
||||
this->velocity[0] = phi_f22 / sp78;
|
||||
this->velocity[2] = phi_f24 / sp78;
|
||||
if (sp7F) {
|
||||
func_8030E878(SFX_3F2_UNKNOWN, randf2(D_80392D98, D_80392D9C), 32000, this->position, D_80392DA0, D_80392DA4);
|
||||
}
|
||||
else{
|
||||
func_8030E878(SFX_53_BANJO_HUIII, randf2(D_80392DA8, 1.5f), 32000, this->position, D_80392DAC, D_80392DB0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool func_8038C718(Actor *this, f32 arg1){
|
||||
f32 tmp;
|
||||
|
||||
this->position[0] += this->velocity[0];
|
||||
this->position_y += (this->velocity_y += D_80392DB8);
|
||||
this->position_z += this->velocity_z;
|
||||
tmp = D_80392DC0 < animctrl_getAnimTimer(this->animctrl) + this->unk1C[0] ? D_80392DC8 : animctrl_getAnimTimer(this->animctrl) + this->unk1C[0];
|
||||
animctrl_setAnimTimer(this->animctrl, tmp);
|
||||
|
||||
if(arg1 == 0.0f)
|
||||
arg1 = func_80309724(this->position);
|
||||
|
||||
if(this->position_y <= arg1){
|
||||
this->position_y = arg1;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool func_8038C844(f32 arg0[3], f32 arg1[3]){
|
||||
if( (arg0[0] - arg1[0] < 26.0f && -26.0f < arg0[0] - arg1[0])
|
||||
&& (arg0[1] - arg1[1] < 26.0f && -26.0f < arg0[1] - arg1[1])
|
||||
&& (arg0[2] - arg1[2] < 26.0f && -26.0f < arg0[2] - arg1[2])
|
||||
){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void func_8038C8F0(ActorMarker *marker){
|
||||
Actor *this;
|
||||
Actor *muncher;
|
||||
Actor *other;
|
||||
s32 pad;
|
||||
|
||||
this = marker_getActor(reinterpret_cast(ActorMarker *, marker));
|
||||
other = marker_getActor(this->unk100);
|
||||
muncher = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392070, 170);
|
||||
muncher->unk100 = other->marker;
|
||||
muncher->unkF4_8 = 1;
|
||||
|
||||
if(pad);
|
||||
}
|
||||
|
||||
void func_8038C94C(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
if(!func_803203FC(0xC1)){
|
||||
func_80328A84(this, 6);
|
||||
func_802C3C88(func_8038C8F0, this->marker);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONAMTCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_5CC0/func_8038C9A0.s")
|
||||
#else
|
||||
void func_8038C9A0(Actor *this){
|
||||
Actor *other; //sp34
|
||||
void * sp30;
|
||||
|
||||
if(this->marker->unk14_20 == 0x200){
|
||||
sp30 = func_8034C2C4(this->marker, 0x190);
|
||||
}
|
||||
other = marker_getActor(this->unk100);
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->unk18 = &D_80392018;
|
||||
this->unk38_31 = 0;
|
||||
if(0.0f != other->velocity[0]){
|
||||
func_80328A84(this, 4);
|
||||
this->unk1C[1] = this->position_y + 50.0f;
|
||||
this->unk1C[2] = this->position_y;
|
||||
}
|
||||
else{
|
||||
this->velocity_x = 0.0f;
|
||||
this->velocity_y = 0.0f;
|
||||
this->velocity_z = 0.0f;
|
||||
this->unk1C[0] = 0.0f;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
func_8038C428(this, &D_8039207C, 0);
|
||||
return;
|
||||
}
|
||||
}//L8038CA9C
|
||||
|
||||
if(1.0f == other->unk1C[1]){
|
||||
func_8038C398(this->position, this->marker->unk14_20);
|
||||
FUNC_8030E8B4(SFX_7B_ICE_BREAKING_1, 1.0f, 32000, this->position, 0x6d6, 0xdac);\
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}//L8038CB04
|
||||
|
||||
switch(this->state){
|
||||
case 1:// 8038CB2C
|
||||
if(func_8038C718(this, 0))
|
||||
break;
|
||||
|
||||
func_80328B8C(this, 2, 0.001f, 1);
|
||||
func_8038C428(this, D_80392088, randf2(20.0f, 24.0f));
|
||||
this->unk60 = this->yaw;
|
||||
break;
|
||||
|
||||
case 2:// 8038CB8C
|
||||
this->yaw += 4.0f;
|
||||
if(actor_animationIsAt(this, 0.999)){
|
||||
func_8034DFB0(sp30, D_803920A0, D_803920B0, 0.14f);
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.8f)){
|
||||
func_8034DFB0(sp30, D_803920B0, D_803920A0, 0.14f);
|
||||
}
|
||||
|
||||
if(0.8 < animctrl_getAnimTimer(this->animctrl) || animctrl_getAnimTimer(this->animctrl) < 0.2){
|
||||
this->unk38_31 = TRUE;
|
||||
}
|
||||
else{
|
||||
this->unk38_31 = FALSE;
|
||||
}
|
||||
|
||||
if(func_8038C718(this, 0.0f))
|
||||
return;
|
||||
|
||||
if(func_8038C844(this->position, D_80392088)){
|
||||
func_80328B8C(this, 3, 0.001f, 1);
|
||||
func_8038C428(this, D_80392094, 0.0f);
|
||||
}
|
||||
else{
|
||||
func_8038C428(this, D_80392088, randf2(20.0f, 24.0f));
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:// 8038CCFC
|
||||
if(func_8038C718(this, 0.0f))
|
||||
break;
|
||||
|
||||
if(other->unk38_31 != 0){
|
||||
other->unk38_31--;
|
||||
}
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
marker_despawn(this->marker);
|
||||
break;
|
||||
|
||||
case 4:// 8038CD58
|
||||
this->position_y += 3.0f;
|
||||
if(this->unk1C[1] <= this->position_y){
|
||||
this->position_y = this->unk1C[1];
|
||||
if(!func_8031FF1C(0x82)){
|
||||
func_80311480(0xc12, 0x2a, this->position, this->marker, func_8038C94C, NULL);
|
||||
func_80320004(0x82, TRUE);
|
||||
}
|
||||
else{
|
||||
func_80311480(0xc25, 0x2b, this->position, this->marker, func_8038C94C, NULL);
|
||||
}
|
||||
func_80328A84(this, 5);
|
||||
this->pitch -= 3.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:// 8038CE14
|
||||
this->yaw_moving = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 8.0f);
|
||||
if(func_8038C718(this, this->unk1C[1]))
|
||||
break;
|
||||
|
||||
this->velocity[1] = randf2(14.0f, 20.0f);
|
||||
break;
|
||||
|
||||
case 6:// 8038CE64
|
||||
this->position_y -= 5.0f;
|
||||
if(this->position_y < this->unk1C[2] - 50.0f){
|
||||
this->velocity_x = 0.0f;
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}//L8038CEB0
|
||||
}
|
||||
#endif
|
445
src/FP/code_6AE0.c
Normal file
445
src/FP/code_6AE0.c
Normal file
@@ -0,0 +1,445 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80324CD8(f32);
|
||||
extern Actor *func_8032813C(enum actor_e, f32[3], s32);
|
||||
|
||||
Actor *func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038D6C8(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803920C0[] ={
|
||||
{0x000, 0.0f},
|
||||
{0x16D, 10000000.0f},
|
||||
{0x237, 2.0f},
|
||||
{0x16D, 0.8f},
|
||||
{0x16D, 0.8f}
|
||||
};
|
||||
|
||||
ActorInfo D_803920E8 = { 0x204, 0x336, 0x442,
|
||||
0x1, D_803920C0,
|
||||
func_8038D6C8, func_80326224, func_8038CED0,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
struct31s D_8039210C = {
|
||||
{ 0.4f, 0.8f },
|
||||
{-1.0f, -1.0f },
|
||||
{ 0.0f, 0.02f},
|
||||
{ 1.8f, 2.2f },
|
||||
0.0f,
|
||||
0.7f
|
||||
};
|
||||
|
||||
struct43s D_80392134 = {
|
||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 400.0f, 200.0f}},
|
||||
{{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}},
|
||||
{{-100.0f, 0.0f, -100.0f}, {100.0f, 100.0f, 100.0f}}
|
||||
};
|
||||
|
||||
struct31s D_8039217C = {
|
||||
{0.8f, 1.2f },
|
||||
{1.4f, 2.0f },
|
||||
{0.0f, 0.01f},
|
||||
{1.2f, 1.8f },
|
||||
0.0f,
|
||||
0.01f
|
||||
};
|
||||
|
||||
s32 D_803921A4[3] = { 0xDC, 0xDC, 0xE6};
|
||||
|
||||
struct43s D_803921B0 = {
|
||||
{{-200.0f, 0.0f, -200.0f}, {200.0f, 200.0f, 200.0f}},
|
||||
{{ 0.0f, -10.0f, 0.0f}, { 0.0f, -10.0f, 0.0f}},
|
||||
{{-50.0f, 0.0f, -50.0f}, {50.0f, 200.0f, 50.0f}}
|
||||
};
|
||||
|
||||
struct31s D_803921F8 = {
|
||||
{ 0.2f, 0.3f },
|
||||
{-1.0f, -1.0f },
|
||||
{ 0.0f, 0.02f},
|
||||
{ 2.0f, 2.5f },
|
||||
0.0f, 0.3f
|
||||
};
|
||||
|
||||
struct43s D_80392220 = {
|
||||
{{-300.0f, 400.0f, -300.0f}, {300.0f, 800.0f, 300.0f}},
|
||||
{{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}},
|
||||
{{-80.0f, 80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
};
|
||||
|
||||
struct31s D_80392268 ={
|
||||
{ 0.4f, 0.6f },
|
||||
{-1.0f, -1.0f },
|
||||
{ 0.0f, 0.02f},
|
||||
{ 2.0f, 2.5f },
|
||||
0.0f,
|
||||
0.3f
|
||||
};
|
||||
|
||||
struct43s D_80392290 = {
|
||||
{{-300.0f, 400.0f, -300.0f}, {300.0f, 800.0f, 300.0f}},
|
||||
{{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}},
|
||||
{{-80.0f, 80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
};
|
||||
|
||||
struct31s D_803922D8 = {
|
||||
{0.5f, 0.7f },
|
||||
{1.4f, 1.7f },
|
||||
{0.0f, 0.01f},
|
||||
{0.6f, 0.9f },
|
||||
0.0f, 0.01f
|
||||
};
|
||||
|
||||
s32 D_80392300[3] = { 0xDC, 0xDC, 0xE6};
|
||||
|
||||
struct43s D_8039230C = {
|
||||
{{-100.0f, 0.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
{{0.0f, -10.0f, 0.0f}, {0.0f, -10.0f, 0.0f}},
|
||||
{{-80.0f, 0.0f, -80.0f}, {50.0f, 200.0f, 80.0f}}
|
||||
};
|
||||
|
||||
f32 D_80392354[3] = {-4165.0f, 73.0f, 4483.0f};
|
||||
|
||||
f32 D_80392360[3] = {-4292.0f, 73.0f, 5054.0f};
|
||||
|
||||
enum actor_e D_8039236C[4] = {
|
||||
ACTOR_332_TWINKLY_BLUE,
|
||||
ACTOR_333_TWINKLY_GREEN,
|
||||
ACTOR_334_TWINKLY_ORANGE,
|
||||
ACTOR_335_TWINKLY_RED,
|
||||
|
||||
};
|
||||
|
||||
f32 D_8039237C[3] = {-3940.0f, 69.0f, 3570.0f};
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if( func_8038BFA0() || func_8031FF1C(BKPROG_13) ){
|
||||
if(0.0f == this->velocity[1])
|
||||
return this;
|
||||
}
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80392134);
|
||||
func_802EFE24(pCtrl,
|
||||
100.0f, 100.0f, 100.0f,
|
||||
200.0f, 200.0f, 200.0f
|
||||
);
|
||||
func_802EFB98(pCtrl, &D_8039210C);
|
||||
func_802EF9F8(pCtrl, 0.6f);
|
||||
func_802EFA18(pCtrl, 3);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D01C(f32 position[3], s32 count, enum asset_e sprite_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
func_802EFFA8(pCtrl, D_803921A4);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_803921B0);
|
||||
func_802EFB98(pCtrl, &D_8039217C);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D0A8(f32 position[3], s32 count, enum asset_e model_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80392220);
|
||||
func_802EFE24(pCtrl,
|
||||
200.0f, 200.0f, 200.0f,
|
||||
300.0f, 300.0f, 300.0f
|
||||
);
|
||||
func_802EFB98(pCtrl, &D_803921F8);
|
||||
func_802EF9F8(pCtrl, 0.2f);
|
||||
func_802EFA18(pCtrl, 2);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D170(f32 position[3], s32 count, enum asset_e sprite_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80392290);
|
||||
func_802EFB98(pCtrl, &D_80392268);
|
||||
func_802EF9F8(pCtrl, 0.2f);
|
||||
func_802EFA18(pCtrl, 2);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D208(f32 position[3], s32 count, enum asset_e sprite_id){
|
||||
ParticleEmitter *pCtrl;
|
||||
|
||||
pCtrl = partEmitList_pushNew(count);
|
||||
func_802EFFA8(pCtrl, D_80392300);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8039230C);
|
||||
func_802EFB98(pCtrl, &D_803922D8);
|
||||
particleEmitter_emitN(pCtrl, count);
|
||||
}
|
||||
|
||||
void func_8038D294(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_8038CF54(this->position, 12, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
|
||||
func_8038D01C(this->position, 12, ASSET_700_SPRITE_DUST);
|
||||
this->velocity[1] = 0.0f;
|
||||
FUNC_8030E8B4(SFX_30_MAGIC_POOF, 1.0f, 32000, this->position, 1000, 3500);
|
||||
func_80311480(0xc13, 0, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void func_8038D324(Actor *this){
|
||||
int i;
|
||||
|
||||
func_8038D0A8(this->position, 24, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
|
||||
for(i = 0; i < 24; i++){
|
||||
func_8038D170(this->position, 1, ASSET_710_SPRITE_SPARKLE_PURPLE + randi2(0, 10));
|
||||
}
|
||||
func_8038D208(this->position, 8, ASSET_700_SPRITE_DUST);
|
||||
FUNC_8030E624(SFX_30_MAGIC_POOF, 1.0f, 32000);
|
||||
}
|
||||
|
||||
void func_8038D3B0(Actor *arg0){
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
}
|
||||
|
||||
void func_8038D3D8(void){
|
||||
comusic_8025AB44(COMUSIC_68_TWINKLY_MINIGAME, 0, 4000);
|
||||
func_8025AABC(COMUSIC_68_TWINKLY_MINIGAME);
|
||||
func_8025A58C(-1, 4000);
|
||||
func_8024BD08(1);
|
||||
}
|
||||
|
||||
void func_8038D41C(ActorMarker *marker){
|
||||
s32 pad[2];
|
||||
ActorMarker *_marker = reinterpret_cast(ActorMarker *, marker);
|
||||
Actor *actor;
|
||||
|
||||
actor = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392354, 170);
|
||||
actor->unk100 = _marker;
|
||||
actor = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392360, 170);
|
||||
actor->unk100 = _marker;
|
||||
if(pad[0]);
|
||||
}
|
||||
|
||||
void func_8038D474(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(reinterpret_cast(ActorMarker*, marker));
|
||||
Actor *child;
|
||||
s32 pad;
|
||||
|
||||
if((s32)actor->unk1C[0] >= 3){
|
||||
actor->unk1C[0] = -1.0f;
|
||||
}
|
||||
actor->unk1C[0] += 1.0;
|
||||
child = spawn_child_actor(D_8039236C[(s32)actor->unk1C[0]], &actor);
|
||||
child->unk100 = actor->marker;
|
||||
}
|
||||
|
||||
void func_8038D51C(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
func_80320004(BKPROG_13, TRUE);
|
||||
FUNC_8030E624(SFX_416, 0.8f, 32000);
|
||||
func_8028F8F8(7, 0);
|
||||
this->unk1C[1] = 1.0f;
|
||||
func_80324E88(1.7f);
|
||||
func_80324E38(1.7f, 0);
|
||||
timedFunc_set_1(2.3f, (TFQM1)func_8038D294, (s32)this->marker);
|
||||
this->velocity[1] = 1.0f;
|
||||
}
|
||||
|
||||
void func_8038D5C8(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
|
||||
if(this->state == 1 || this->state == 2){
|
||||
actor_collisionOff(this);
|
||||
timed_setCameraToNode(0.0f, 0xa);
|
||||
func_80324CD8(0.1f);
|
||||
func_8028F784(1);
|
||||
func_8028F490(D_8039237C);
|
||||
func_8028F8F8(7, 1);
|
||||
this->unk1C[1] = 0.0f;
|
||||
func_8025A6EC(COMUSIC_68_TWINKLY_MINIGAME, 25000);
|
||||
func_8025A58C(0, 4000);
|
||||
func_8024BD08(0);
|
||||
this->unk1C[2] = 428571.0f;
|
||||
func_8025AEA0(0x68, (s32)this->unk1C[2]);
|
||||
func_80328B8C(this, 3, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->velocity[0] = 1.0f;
|
||||
}//L8038D6B8
|
||||
}
|
||||
|
||||
void func_8038D6C8(Actor *this){
|
||||
f32 sp24;
|
||||
bool sp20;
|
||||
|
||||
sp24 = time_getDelta();
|
||||
mapSpecificFlags_set(0xd, (this->state != 1 && this->state != 2) ? TRUE : FALSE);
|
||||
|
||||
if(func_8038BFA0() || func_8031FF1C(BKPROG_13)){
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOff(this);
|
||||
func_8028F8F8(7, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOn(this);
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
func_803300D8(this->marker, func_8038D3B0);
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038D5C8, NULL);
|
||||
this->unk38_31 = 0;
|
||||
this->unk1C[1] = 0.0f;
|
||||
this->velocity[0] = 0.0f;
|
||||
this->velocity[1] = 0.0f;
|
||||
this->unk1C[0] = -1.0f;
|
||||
func_8028F8F8(7, FALSE);
|
||||
if(func_803203FC(0xC1) && func_8031B4F4() == -1){
|
||||
func_80328B8C(this, 3, 0.001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->velocity[0] = 1.0f;
|
||||
}
|
||||
}//L8038D844
|
||||
|
||||
if(func_803203FC(0xc1)){
|
||||
this->velocity[0] = 1.0f;
|
||||
}
|
||||
|
||||
switch (this->state)
|
||||
{
|
||||
case 1: //L8038D89C
|
||||
if(!func_80329530(this, 800))
|
||||
break;
|
||||
|
||||
if(!(func_8023DB5C() & 1))
|
||||
func_80328B8C(this, 2, 0.001f, 1);
|
||||
else
|
||||
func_80328B8C(this, 2, 0.999f, 0);
|
||||
|
||||
actor_playAnimationOnce(this);
|
||||
this->velocity[2] = randf2(1.4f, 2.0f);
|
||||
|
||||
break;
|
||||
|
||||
case 2: //L8038D91C
|
||||
sp20 = animctrl_isPlayedForwards(this->animctrl);
|
||||
animctrl_setDuration(this->animctrl, this->velocity[2]);
|
||||
if( ( sp20 == TRUE && actor_animationIsAt(this, 0.999f) )
|
||||
|| ( sp20 == FALSE && actor_animationIsAt(this, 0.001f) )
|
||||
){
|
||||
func_80328B8C(this, 1, 0.001f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if( actor_animationIsAt(this, 0.02f)
|
||||
|| actor_animationIsAt(this, 0.15f)
|
||||
|| actor_animationIsAt(this, 0.28f)
|
||||
|| actor_animationIsAt(this, 0.63f)
|
||||
|| actor_animationIsAt(this, 0.81f)
|
||||
){
|
||||
FUNC_8030E8B4(SFX_98_DEAF_THUD, 1.0f, 32000, this->position, 400, 2000);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //L8038DA24
|
||||
if(actor_animationIsAt(this, 0.3f))
|
||||
func_8038D324(this);
|
||||
|
||||
if(actor_animationIsAt(this, 0.999f))
|
||||
func_802C3C88((GenMethod_1)func_8038D474, (s32)this->marker);
|
||||
|
||||
if(this->velocity[0] != 0.0f)
|
||||
break;
|
||||
|
||||
func_80324E88(0.0f);
|
||||
func_8028F784(0);
|
||||
func_80328B8C(this, 4, 0.999f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
item_set(ITEM_0_HOURGLASS_TIMER, 80*60 - 1);
|
||||
item_set(ITEM_6_HOURGLASS, TRUE);
|
||||
this->unk38_31 = 0xA;
|
||||
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
|
||||
func_802C3C88((GenMethod_1)func_8038D41C, (s32)this->marker);
|
||||
this->unk60 = 0.0f;
|
||||
func_80347A14(0);
|
||||
func_802FAD64(ITEM_14_HEALTH);
|
||||
break;
|
||||
|
||||
case 4: //L8038DB18
|
||||
this->unk1C[2] += (sp24*-195238.0f)/80.0f;
|
||||
if(this->unk1C[2] < 233333.0f)
|
||||
this->unk1C[2] = 233333.0f;
|
||||
|
||||
func_8025AEA0(COMUSIC_68_TWINKLY_MINIGAME, (s32)this->unk1C[2]);
|
||||
if(item_getCount(ITEM_24_TWINKLY_SCORE) == 0){
|
||||
func_80328B8C(this, 1, 0.001f, 1);
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||
func_8038D3D8();
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_1(1.3f, (TFQM1)func_8038D51C, (s32)this->marker);
|
||||
timed_setCameraToNode(0.9f, 0xC);
|
||||
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
|
||||
func_80347A14(1);
|
||||
break;
|
||||
}
|
||||
|
||||
if(item_empty(ITEM_6_HOURGLASS)){
|
||||
func_80328B8C(this, 1, 0.001f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk38_31 = 0;
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 28000);
|
||||
func_8028F8F8(7, FALSE);
|
||||
this->unk1C[1] = 1.0f;
|
||||
func_8038D3D8();
|
||||
func_80347A14(1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(0.96 < animctrl_getAnimTimer(this->animctrl)){
|
||||
if(this->unk60 <= 0.0){
|
||||
func_802C3C88((GenMethod_1)func_8038D474, (s32)this->marker);
|
||||
this->unk60 = 2.9f;
|
||||
}
|
||||
else{
|
||||
this->unk60 -= sp24;
|
||||
}
|
||||
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool func_8038DD14(void){
|
||||
return mapSpecificFlags_get(0xD);
|
||||
}
|
||||
|
||||
bool func_8038DD34(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(func_80329530(this, 800))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
102
src/FP/code_790.c
Normal file
102
src/FP/code_790.c
Normal file
@@ -0,0 +1,102 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_80386B80(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80386CF8(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80391A90[] ={
|
||||
{0, 0.0},
|
||||
{ASSET_143_ANIM_SNOWMAN_BUTTON, 800000.0f},
|
||||
{ASSET_143_ANIM_SNOWMAN_BUTTON, 0.5f},
|
||||
{ASSET_143_ANIM_SNOWMAN_BUTTON, 800000.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_80391AB0 = {
|
||||
MARKER_B9_FP_SNOWMAN_BUTTON, ACTOR_116_FP_SNOWMAN_BUTTON, ASSET_421_MODEL_FP_SNOWMAN_BUTTON,
|
||||
0x1, D_80391A90,
|
||||
func_80386CF8, func_80326224, func_80386B80,
|
||||
0, 0x800, 0.0f, 0
|
||||
};
|
||||
|
||||
struct31s D_80391AD4 = {
|
||||
{0.4f, 0.6f},
|
||||
{1.8f, 3.6f},
|
||||
{0.0f, 0.01f},
|
||||
{0.5f, 1.4f},
|
||||
0.0f, 0.01f,
|
||||
};
|
||||
|
||||
struct43s D_80391AFC = {
|
||||
{{-300.0f, 350.0f, -300.0f}, {300.0f, 800.0f, 300.0f}},
|
||||
{{0.0f, -800.0f, 0.0f}, {0.0f, -800.0f, 0.0f}},
|
||||
{{-50.0f, -50.0f, -50.0f}, {50.0f, 50.0f, 50.0f}}
|
||||
};
|
||||
|
||||
s32 D_80391B44[3] = {225, 225, 245};
|
||||
|
||||
/* .code */
|
||||
Actor *func_80386B80(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_8033A45C(1, this->state == 3);
|
||||
func_8033A45C(2, func_8033A0F0(1) ^ 1);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
|
||||
}
|
||||
|
||||
void func_80386BEC(Actor *this){
|
||||
f32 plyr_pos[3];
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(12);
|
||||
|
||||
player_getPosition(plyr_pos);
|
||||
func_80328B8C(this, 2, 0.01f, 1);
|
||||
actor_collisionOff(this);
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
FUNC_8030E624(SFX_90_SWITCH_PRESS, 1.0f, 32000);
|
||||
func_8038AB40();
|
||||
func_802EFFA8(pCtrl, D_80391B44);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST);
|
||||
particleEmitter_setPosition(pCtrl, plyr_pos);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80391AFC);
|
||||
func_802EFB98(pCtrl, &D_80391AD4);
|
||||
particleEmitter_emitN(pCtrl, 12);
|
||||
}
|
||||
|
||||
void func_80386CB8(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
|
||||
if(this->state == 1)
|
||||
func_80386BEC(this);
|
||||
|
||||
}
|
||||
|
||||
void func_80386CF8(Actor *this){
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, func_80386CB8);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOn(this);
|
||||
|
||||
if(!this->initialized){
|
||||
this->initialized = TRUE;
|
||||
this->pitch += (f32)(this->unkF4_8 - 1);
|
||||
}
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(this->state == 3){
|
||||
func_8038AB40();
|
||||
}
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if(actor_animationIsAt(this, 0.99f)){
|
||||
func_80328B8C(this, 3, 0.99f, 0);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
}
|
236
src/FP/code_7980.c
Normal file
236
src/FP/code_7980.c
Normal file
@@ -0,0 +1,236 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern ActorProp *func_80320EB0(ActorMarker *, f32, s32);
|
||||
|
||||
Actor *func_8038DD70(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038E094(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_80392390[] ={
|
||||
{0, 0.0f},
|
||||
{ASSET_1AF_ANIM_TWINKLY_MUNCHER_APPEAR, 10000000.0f},
|
||||
{ASSET_1B0_ANIM_TWINKLY_MUNCHER_DIE, 1.0f},
|
||||
{ASSET_1B1_ANIM_TWINKLY_MUNCHER_IDLE, 1.0f},
|
||||
{ASSET_1B2_ANIM_TWINKLY_MUNCHER_ATTACK, 1.0f},
|
||||
{ASSET_1AF_ANIM_TWINKLY_MUNCHER_APPEAR, 0.667f},
|
||||
{ASSET_1B1_ANIM_TWINKLY_MUNCHER_IDLE, 1.0f},
|
||||
{ASSET_1AF_ANIM_TWINKLY_MUNCHER_APPEAR, 0.667f}
|
||||
};
|
||||
|
||||
extern ActorInfo D_803923D0 = { MARKER_205_TWINKLY_MUNCHER, ACTOR_337_TWINKLY_MUNCHER, ASSET_496_MODEL_TWINKLY_MUNCHER,
|
||||
0x1, D_80392390,
|
||||
func_8038E094, func_80326224, func_8038DD70,
|
||||
2500, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038DD70(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(this->state == 1)
|
||||
return this;
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038DDC8(Actor *this){
|
||||
actor_collisionOn(this);
|
||||
func_80328B8C(this, 2, 0.03f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_8038DE08(Actor *this){
|
||||
func_80328B8C(this, 3, 0.03f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void func_8038DE40(Actor *this){
|
||||
func_80328B8C(this, 4, 0.03f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_8038DE78(Actor *this){
|
||||
actor_collisionOff(this);
|
||||
func_80328B8C(this, 5, 0.03f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_8038DEB8(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
if(this->state != 1 && this->state != 5){
|
||||
func_8038DE78(this);
|
||||
FUNC_8030E8B4(SFX_87_TANKTUP_OOOHW, 1.6f, 32000, this->position, 1250, 2500);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 1.0f, 26000, this->position, 1250, 2500);
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_8038DF34(Actor *this){
|
||||
ActorProp *prop;
|
||||
Actor *other;
|
||||
s32 marker_id;
|
||||
f32 sp18[3];
|
||||
|
||||
func_8034A174(this->marker->unk44, 5, sp18);
|
||||
this->marker->unk38[0] = sp18[0] - this->position[0];
|
||||
this->marker->unk38[1] = sp18[1] - this->position[1];
|
||||
this->marker->unk38[2] = sp18[2] - this->position[2];
|
||||
prop = func_80320EB0(this->marker, 75.0f, 1);
|
||||
|
||||
if(prop && prop->unk8_0){
|
||||
other = marker_getActor(prop->marker);
|
||||
marker_id = other->marker->unk14_20;
|
||||
if( marker_id == MARKER_200_TWINKLY_BLUE
|
||||
|| marker_id == MARKER_201_TWINKLY_GREEN
|
||||
|| marker_id == MARKER_202_TWINKLY_ORANGE
|
||||
|| marker_id == MARKER_203_TWINKLY_RED
|
||||
){
|
||||
return other;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void func_8038E040(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
func_80324E88(0.5f);
|
||||
func_80328B8C(this, 7, 0.03f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
|
||||
void func_8038E094(Actor *this){
|
||||
s32 sp3C;
|
||||
Actor *sp38;
|
||||
f32 sp34 = time_getDelta();
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038DEB8, NULL);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.99999f);
|
||||
this->unk60 = 0.0f;
|
||||
if(this->unkF4_8 == 1){
|
||||
func_8038DDC8(this);
|
||||
}
|
||||
if(this->unkF4_8 == 2){
|
||||
if(func_803203FC(UNKFLAGS1_C1) && func_8031B4F4() == -2){
|
||||
func_8038DDC8(this);
|
||||
}
|
||||
else{
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}//L8038E180
|
||||
if(this->unk100){
|
||||
sp38 = marker_getActor(this->unk100);
|
||||
if(sp38->unk1C[1] == 1.0f){
|
||||
if(this->unkF4_8 == 1 && !func_8031FF1C(BKPROG_13)){
|
||||
if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){
|
||||
timed_setCameraToNode(0.5f, 0xd);
|
||||
func_80311480(ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
|
||||
this->velocity[0] = 1.0f;
|
||||
func_80328B8C(this, 6, 0.03f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
}
|
||||
else{//L8038E274
|
||||
if(this->state == 1){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else if( this->state != 1 && this->state != 5){
|
||||
func_8038DE78(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//L8038E2B4
|
||||
|
||||
switch(this->state){
|
||||
case 1: //L8038E2DC
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
animctrl_setAnimTimer(this->animctrl, 0.99f);
|
||||
if(this->unk60 < 5.0){
|
||||
this->unk60 += sp34;
|
||||
}
|
||||
else{
|
||||
if(10.0 <= this->unk60 || randf() < this->unk60/10.0){
|
||||
if(!func_8038DF34(this)){
|
||||
this->unk60 = 0.0f;
|
||||
func_8038DDC8(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this->unk60 += sp34;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: //L8038E3C0
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
sp38 = func_8038DF34(this);
|
||||
if(sp38){
|
||||
func_8038DE40(this);
|
||||
this->unk38_31 = sp38->marker->unk14_20;
|
||||
break;
|
||||
}
|
||||
|
||||
if(actor_animationIsAt(this, 0.15f))
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1250, 2500);
|
||||
|
||||
if(actor_animationIsAt(this, 0.35f))
|
||||
FUNC_8030E8B4(SFX_C4_TWINKLY_MUNCHER_GRR, 1.2f, 32000, this->position, 1250, 2500);
|
||||
|
||||
if(actor_animationIsAt(this, 0.97f))
|
||||
func_8038DE08(this);
|
||||
break;
|
||||
|
||||
case 3: //L8038E498
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
sp38 = func_8038DF34(this);
|
||||
if(sp38){
|
||||
func_8038DE40(this);
|
||||
this->unk38_31 = sp38->marker->unk14_20;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: //L8038E4F0
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
sp38 = func_8038DF34(this);
|
||||
if(sp38 && sp38->marker->unk14_20 == this->unk38_31){
|
||||
if(actor_animationIsAt(this, 0.23)){
|
||||
func_8038C398(sp38->position, sp38->marker->unk14_20);
|
||||
FUNC_8030E8B4(SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250, 2500);
|
||||
FUNC_8030E8B4(SFX_27_JINJO_HI, 1.6f, 32000, this->position, 1250, 2500);
|
||||
func_80324D54(0.35f, SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250.0f, 2500.0f);
|
||||
marker_despawn(sp38->marker);
|
||||
if( !mapSpecificFlags_get(0xa) && func_80311480(0xc16, 0, NULL, NULL, NULL, NULL)){
|
||||
mapSpecificFlags_set(0xa, TRUE);
|
||||
}
|
||||
}
|
||||
}//L8038E620
|
||||
if(actor_animationIsAt(this, 0.97f)){
|
||||
func_8038DE08(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5: //L8038E644
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
if(actor_animationIsAt(this, 0.97f)){
|
||||
func_80328B8C(this, 1, 0.97f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk60 = 0.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: //L8038E698
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
this->yaw_moving = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 12.0f);
|
||||
break;
|
||||
|
||||
case 7: //L8038E6D4
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
if(actor_animationIsAt(this, 0.97f)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
115
src/FP/code_8330.c
Normal file
115
src/FP/code_8330.c
Normal file
@@ -0,0 +1,115 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_8038E720(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038E940(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_80392400[];
|
||||
|
||||
extern ActorInfo D_80392420 = { 0x206, 0x338, 0x486,
|
||||
0x1, D_80392400,
|
||||
func_8038E940, func_80326224, func_8038E720,
|
||||
4500, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
struct31s *D_80392444;
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038E720(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
func_8033A45C(1, 0);
|
||||
func_8033A45C(2, 1);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
|
||||
void func_8038E774(Actor *this){
|
||||
func_80328B8C(this, 2, 0.05f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->marker->collidable = TRUE;
|
||||
this->unk38_31 = 0;
|
||||
}
|
||||
|
||||
void func_8038E7CC(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
|
||||
if(this->state == 2){
|
||||
this->unk38_31++;
|
||||
if(this->unk38_31 < 4){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038E840(f32 position[3], s32 cnt, enum asset_e sprite_id){
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(cnt);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(pCtrl,
|
||||
-100.0f, -80.0f, -70.0f,
|
||||
100.0f, 100.0f, 70.0f
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl,
|
||||
0.0f, -200.0f, 0.0f,
|
||||
0.0f, -200.0f, 0.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl,
|
||||
-200.0f, -100.0f, -200.0f,
|
||||
200.0f, 300.0f, 200.0f
|
||||
);
|
||||
func_802EFB98(pCtrl, &D_80392444);
|
||||
particleEmitter_emitN(pCtrl, cnt);
|
||||
}
|
||||
|
||||
void func_8038E940(Actor *this){
|
||||
if(jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(0x29)){
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
this->marker->collidable = FALSE;
|
||||
func_80328B8C(this, 3, 0.95f, 0);
|
||||
return;
|
||||
}//L8038E9B8
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
this->marker->collidable = FALSE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038E7CC, NULL);
|
||||
func_80328B8C(this, 1, 0.05f, 1);
|
||||
this->unk38_31 = 0;
|
||||
this->unk60 = 0.0f;
|
||||
}//L8038EA3C
|
||||
|
||||
this->unk58_0 = (this->state == 1) ? FALSE : TRUE;
|
||||
|
||||
switch(this->state){
|
||||
case 1: //L8038EA98
|
||||
if(func_8031FF1C(BKPROG_13) && !mapSpecificFlags_get(2))
|
||||
func_8038E774(this);
|
||||
break;
|
||||
case 2: //L8038EAC8
|
||||
if(actor_animationIsAt(this, 0.2f))
|
||||
func_8038E840(this->position, 0x20, ASSET_717_SPRITE_SPARKLE_YELLOW_2);
|
||||
|
||||
if(this->unk38_31 < 3)
|
||||
break;
|
||||
|
||||
func_80328B8C(this, 3, 0.05f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
FUNC_8030E624(SFX_416, 0.8f, 32000);
|
||||
this->marker->collidable = FALSE;
|
||||
this->unk60 = 0.0f;
|
||||
break;
|
||||
case 3: //L8038EB44
|
||||
if(this->unk60 == 0.0f && actor_animationIsAt(this, 0.95f)){
|
||||
this->unk60 = 1.0f;
|
||||
mapSpecificFlags_set(2, TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
if(this->unk60 != 0.0f && !mapSpecificFlags_get(2)){
|
||||
func_8038E774(this);
|
||||
}
|
||||
break;
|
||||
}//L8038EBC0
|
||||
}
|
148
src/FP/code_87E0.c
Normal file
148
src/FP/code_87E0.c
Normal file
@@ -0,0 +1,148 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
f32 unkC[3];
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u8 unk1A;
|
||||
u8 unk1B;
|
||||
} ActorLocal_FP_87E0;
|
||||
|
||||
Actor *func_8038EBD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038ECD8(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80392470 = { 0x207, 0x339, 0x426,
|
||||
0x1, NULL,
|
||||
func_8038ECD8, func_80326224, func_8038EBD0,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
f32 D_803935D0[3];
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038EBD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
func_8033A45C( 2, mapSpecificFlags_get(0));
|
||||
func_8033A45C( 1, mapSpecificFlags_get(0) ^ 1);
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_8038EC34(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
ActorLocal_FP_87E0 *local = (ActorLocal_FP_87E0 *)&this->local;
|
||||
local->unk1B = TRUE;
|
||||
}
|
||||
|
||||
void func_8038EC5C(Actor *this){
|
||||
if(0.0f == this->unk60){
|
||||
this->unk38_31++;
|
||||
this->unk60 = 0.33f;
|
||||
if(this->unk38_31 < 4){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038ECD8(Actor *this){
|
||||
ActorLocal_FP_87E0 *local = (ActorLocal_FP_87E0 *)&this->local;
|
||||
f32 sp68[3];
|
||||
s32 sp64;
|
||||
f32 sp58[3];
|
||||
f32 sp4C[3];
|
||||
f32 sp40[3];
|
||||
s32 sp3C;
|
||||
f32 sp30[3];
|
||||
|
||||
if(jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE)){
|
||||
this->marker->collidable = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038EC34, NULL);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
player_getPosition(D_803935D0);
|
||||
local->unk1B = 0;
|
||||
this->unk38_31 = 0;
|
||||
local->unk1A = 0;
|
||||
}
|
||||
|
||||
local->unk19 = 0;
|
||||
if(!local->unk1A && this->marker->unk14_21){
|
||||
func_8034A174(this->marker->unk44, 5, sp58);
|
||||
func_8034A174(this->marker->unk44, 6, sp4C);
|
||||
local->unk0[0] = sp58[0] - sp4C[0];
|
||||
local->unk0[1] = sp58[1] - sp4C[1];
|
||||
local->unk0[2] = sp58[2] - sp4C[2];
|
||||
player_getPosition(sp40);
|
||||
sp40[0] -= sp4C[0];
|
||||
sp40[1] -= sp4C[1];
|
||||
sp40[2] -= sp4C[2];
|
||||
local->unk18 = (0.0f <= sp40[0]*local->unk0[0] + sp40[1]*local->unk0[1] + sp40[2]*local->unk0[2]) ? 0 : 1;
|
||||
local->unkC[0] = sp4C[0];
|
||||
local->unkC[1] = sp4C[1];
|
||||
local->unkC[2] = sp4C[2];
|
||||
local->unk1A = TRUE;
|
||||
}//L8038EE98
|
||||
|
||||
if(0.0f != this->unk60){
|
||||
if(time_getDelta() < this->unk60){
|
||||
this->unk60 -= time_getDelta();
|
||||
}else{
|
||||
this->unk60 = 0.0f;
|
||||
}
|
||||
}//L8038EEF0
|
||||
switch(this->state){
|
||||
case 1: //L8038EF10
|
||||
this->marker->collidable = FALSE;
|
||||
if(!mapSpecificFlags_get(2)) break;
|
||||
if(mapSpecificFlags_get(3)) break;
|
||||
|
||||
func_80328A84(this, 2);
|
||||
this->unk38_31 = 0;
|
||||
break;
|
||||
|
||||
case 2://L8038EF5C
|
||||
if(!local->unk1A) return;
|
||||
if(item_empty(ITEM_6_HOURGLASS)){
|
||||
func_80328A84(this, 1);
|
||||
}
|
||||
else{
|
||||
this->marker->collidable = TRUE;
|
||||
player_getPosition(sp68);
|
||||
sp68[0] -= local->unkC[0];
|
||||
sp68[1] -= local->unkC[1];
|
||||
sp68[2] -= local->unkC[2];
|
||||
sp64 = (0.0f <= sp68[0]*local->unk0[0] + sp68[1]*local->unk0[1] + sp68[2]*local->unk0[2]) ? 0 : 1;
|
||||
if(sp64 == (local->unk18 ^ 1)){
|
||||
local->unk19 = TRUE;
|
||||
if(local->unk1B){
|
||||
func_8038EC5C(this);
|
||||
}
|
||||
else{
|
||||
player_getPosition(sp68);
|
||||
sp3C = func_80320B98(D_803935D0, sp68, sp30, 0);
|
||||
if(sp3C){
|
||||
if(*(s32 *)(sp3C + 8) << 9 < 0)
|
||||
func_8038EC5C(this);
|
||||
}
|
||||
}
|
||||
}//L8038F090
|
||||
|
||||
if(!(this->unk38_31 < 3)){
|
||||
func_80328A84(this, 1);
|
||||
mapSpecificFlags_set(3, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}//L8038F0BC
|
||||
local->unk18 = sp64;
|
||||
local->unk1B = 0;
|
||||
player_getPosition(D_803935D0);
|
||||
}
|
57
src/FP/code_8D00.c
Normal file
57
src/FP/code_8D00.c
Normal file
@@ -0,0 +1,57 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
Actor *func_8038F0F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038F144(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803924A0[] = {
|
||||
{0, 0.0f},
|
||||
{ASSET_18A_XMAS_GIFT, 1.5f}
|
||||
};
|
||||
|
||||
ActorInfo D_803924B0 = { MARKER_208_BLUE_PRESENT, ACTOR_33A_BLUE_PRESENT, ASSET_47F_MODEL_XMAS_GIFT_BLUE,
|
||||
0x1, D_803924A0,
|
||||
func_8038F144, func_80326224, func_8038F0F0,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803924D4 = { MARKER_209_GREEN_PRESENT, ACTOR_33B_GREEN_PRESENT, ASSET_480_MODEL_XMAS_GIFT_GREEN,
|
||||
0x1, D_803924A0,
|
||||
func_8038F144, func_80326224, func_8038F0F0,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803924F8 = { MARKER_20A_RED_PRESENT, ACTOR_33C_RED_PRESENT, ASSET_481_MODEL_XMAS_GIFT_RED,
|
||||
0x1, D_803924A0,
|
||||
func_8038F144, func_80326224, func_8038F0F0,
|
||||
2500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038F0F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(this->unk38_31)
|
||||
return this;
|
||||
else
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
|
||||
}
|
||||
|
||||
void func_8038F144(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(!jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)){
|
||||
this->unk38_31 = TRUE;
|
||||
this->marker->collidable = FALSE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
}
|
||||
else{
|
||||
this->unk38_31 = FALSE;
|
||||
this->marker->collidable = FALSE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
animctrl_setAnimTimer(this->animctrl, randf());
|
||||
}
|
||||
}
|
||||
if (this) if (this);
|
||||
}
|
341
src/FP/code_8E20.c
Normal file
341
src/FP/code_8E20.c
Normal file
@@ -0,0 +1,341 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
f32 unkC[3];
|
||||
f32 unk18[3];
|
||||
f32 unk24[3];
|
||||
u8 unk30;
|
||||
} ActorLocal_Wozza;
|
||||
|
||||
Actor *func_8038F210(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8038F7AC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_80392520[];
|
||||
|
||||
extern ActorInfo D_80392588 = { MARKER_20B_WOZZA, ACTOR_1F3_WOZZA, ASSET_494_MODEL_WOZZA,
|
||||
0x1, D_80392520,
|
||||
func_8038F7AC, func_80326224, func_8038F210,
|
||||
0, 0, 1.6f, 0
|
||||
};
|
||||
|
||||
extern f32 D_803925AC[3];
|
||||
|
||||
/* .code */
|
||||
Actor *func_8038F210(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(func_8038BFA0() || this->unk38_31)
|
||||
return this;
|
||||
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
|
||||
}
|
||||
|
||||
void func_8038F274(void){
|
||||
UNK_TYPE(s32) v0 = func_8034C528(0x191);
|
||||
if(v0){
|
||||
func_8034DE60(v0, 0.0f, -500.0f, 0.2f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038F2B8(Actor *this){
|
||||
func_80328B8C(this, 3, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void func_8038F2F0(Actor *this){
|
||||
func_80328B8C(this, 11, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
func_8038F274();
|
||||
}
|
||||
|
||||
void func_8038F330(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this = marker_getActor(caller);
|
||||
switch(text_id){
|
||||
case 0xC1B:
|
||||
func_80324E88(0.0f);
|
||||
break;
|
||||
|
||||
case 0xC1C:
|
||||
func_80324E88(0.0f);
|
||||
func_8038F2F0(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038F3A0(void){
|
||||
mapSpecificFlags_set(8, 1);
|
||||
}
|
||||
|
||||
void func_8038F3C4(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
if(arg2 == 1){
|
||||
func_8038F3A0();
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038F3F4(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_8038F2B8(actor);
|
||||
}
|
||||
|
||||
void func_8038F41C(Actor *this){
|
||||
func_80328B8C(this, 1, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void func_8038F454(Actor *this){
|
||||
if(!mapSpecificFlags_get(7) && func_8028ECAC() != BSGROUP_A_FLYING && func_80329530(this, 1000) ){
|
||||
mapSpecificFlags_set(7, TRUE);
|
||||
func_80328A84(this, 2);
|
||||
actor_loopAnimation(this);
|
||||
timed_setCameraToNode(0.0f, 0x2e);
|
||||
func_80324DBC(0.0f, 0xc1b, 0x2a, this->position, this->marker, func_8038F330, NULL);
|
||||
timedFunc_set_1(2.5f, (TFQM1)func_8038F3F4, (s32)this->marker);
|
||||
}
|
||||
else{
|
||||
func_8038F2B8(this);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038F528(Actor *this){
|
||||
func_80328B8C(this, 4, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void func_8038F560(Actor *this){
|
||||
func_80328B8C(this, 7, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
void func_8038F598(Actor *this, f32 arg1){
|
||||
this->yaw_moving = func_80329784(this);
|
||||
func_80328FB0(this, arg1);
|
||||
}
|
||||
|
||||
bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){
|
||||
f32 sp24;
|
||||
|
||||
sp24 = animctrl_getAnimTimer(this->animctrl);
|
||||
this->yaw_moving = (f32) func_803297C8(this, arg1);
|
||||
func_80328FB0(this, arg3);
|
||||
if(actor_animationIsAt(this, 0.9f)){
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000);
|
||||
}
|
||||
this->unk28 = (1.0f- sp24)*arg2;
|
||||
func_80329054(this, 2);
|
||||
if(ml_vec3f_distance(this->position, arg1) <= arg4)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
bool func_8038F6C4(Actor *this, f32 arg1[3], f32 arg2){
|
||||
s32 dTheta;
|
||||
|
||||
func_80328C64(this, func_803297C8(this, arg1));
|
||||
func_80328FB0(this, arg2);
|
||||
dTheta = this->yaw - this->yaw_moving;
|
||||
if(-arg2 <= dTheta && dTheta <= arg2){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void func_8038F758(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(reinterpret_cast(ActorMarker *, marker));
|
||||
Actor *jiggy = spawn_child_actor(ACTOR_1F4_WOZZAS_JIGGY, &this);
|
||||
s32 pad;
|
||||
|
||||
jiggy->yaw = this->yaw;
|
||||
this->unk100 = jiggy->marker;
|
||||
jiggy->unk100 = this->marker;
|
||||
|
||||
}
|
||||
|
||||
void func_8038F7AC(Actor *this){
|
||||
ActorLocal_Wozza * local = (ActorLocal_Wozza *)&this->local;
|
||||
|
||||
if(func_803203FC(0xC4)){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOff(this);
|
||||
this->unk58_0 = FALSE;
|
||||
func_8038F274();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
if(jiggyscore_isCollected(JIGGY_32_FP_WOZZA)){
|
||||
func_8038F274();
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
|
||||
if(levelSpecificFlags_get(0x26)){
|
||||
this->unk38_31 = TRUE;
|
||||
func_8038F274();
|
||||
}
|
||||
else{//L8038F8A0
|
||||
func_80304E24(0x359, local->unk24);
|
||||
func_80304E24(0x35A, local->unk0);
|
||||
func_80304E24(0x35B, local->unkC);
|
||||
func_80304E24(0x35C, local->unk18);
|
||||
this->position[0] = local->unkC[0];\
|
||||
this->position[1] = local->unkC[1];\
|
||||
this->position[2] = local->unkC[2];
|
||||
func_802C3C88(func_8038F758, this->marker);
|
||||
local->unk30 = FALSE;
|
||||
}
|
||||
}//L8038F910
|
||||
|
||||
if(func_8038BFA0() || this->unk38_31 || !actor_playerIsWithinDist(this, 3000)){
|
||||
actor_collisionOff(this);
|
||||
return;
|
||||
}
|
||||
|
||||
actor_collisionOn(this);
|
||||
switch(this->state){
|
||||
case 1: //L8038F984
|
||||
if(func_8028ECAC() == BSGROUP_A_FLYING){
|
||||
func_8038F454(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if(func_80329530(this, 1300) && player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
func_80328B8C(this, 8, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if(func_80329530(this, 1000) && !func_803203FC(0x1f)){
|
||||
func_8038F454(this);
|
||||
break;
|
||||
}
|
||||
|
||||
func_8038F598(this, 1.0f);
|
||||
if( actor_animationIsAt(this, 0.38f) || actor_animationIsAt(this, 0.7f)){
|
||||
if(randf() < 0.4)
|
||||
animctrl_setDirection(this->animctrl, animctrl_isPlayedForwards(this->animctrl) ^ 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //L8038FA9C
|
||||
if(func_8038F5D4(this, local->unk24, 30.0f, 12.0f, 0x3C))
|
||||
func_8038F528(this);
|
||||
break;
|
||||
|
||||
case 4: //L8038FAD0
|
||||
if(!func_80329530(this, 2000) && func_8028ECAC() != BSGROUP_A_FLYING){
|
||||
func_8038F560(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if(func_8038F5D4(this, local->unk0, 30.0f, 12.0f, 0x3C)){
|
||||
func_80328B8C(this, 5, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5: //L8038FB50
|
||||
func_8038F6C4(this, local->unk18, 1.0f);
|
||||
if(0.97 < animctrl_getAnimTimer(this->animctrl)){
|
||||
func_80328B8C(this, 6, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: //L8038FBA8
|
||||
func_8038F6C4(this, local->unk18, 1.0f);
|
||||
if( func_80329530(this, 1700) ) break;
|
||||
if( func_8028ECAC() == BSGROUP_A_FLYING ) break;
|
||||
|
||||
func_8038F560(this);
|
||||
|
||||
if(!local->unk30){
|
||||
if(func_80311480(0xc1d, 0x20, NULL, NULL, NULL, NULL)){
|
||||
local->unk30 = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: //L8038FC30
|
||||
if(!func_8038F6C4(this, local->unkC, 4.5f))
|
||||
break;
|
||||
|
||||
if(func_80329530(this, 1000) || func_8028ECAC() == BSGROUP_A_FLYING){
|
||||
func_8038F528(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if(func_8038F5D4(this, local->unkC, 30.0f, 12.0f, 0x3C)){
|
||||
func_8038F41C(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 8: //L8038FCB0
|
||||
if(player_getTransformation() != TRANSFORM_4_WALRUS){
|
||||
func_8038F41C(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if(func_80329530(this, 500) && !this->unk138_24){
|
||||
if(func_80311480(0xc1c, 0xAA, this->position, this->marker, func_8038F330, func_8038F3C4)){
|
||||
timed_setCameraToNode(0.0f, 0x2E);
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
break;
|
||||
}//L8038FD40
|
||||
|
||||
if(mapSpecificFlags_get(8)){
|
||||
if(func_8038F6C4(this, D_803925AC, 9.0f)){
|
||||
func_80328B8C(this, 9, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
func_8038F598(this, 2.0f);
|
||||
|
||||
if(!func_803114B0()){
|
||||
if( actor_animationIsAt(this, 0.02f)
|
||||
|| actor_animationIsAt(this, 0.14f)
|
||||
|| actor_animationIsAt(this, 0.28f)
|
||||
|| actor_animationIsAt(this, 0.42f)
|
||||
){
|
||||
FUNC_8030E8B4(SFX_88_WOZZA_NOISE, 1.0f, 32000, this->position, 500, 2000);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 9: //L8038FE14
|
||||
func_8038F6C4(this, D_803925AC, 9.0f);
|
||||
if(0.97 < animctrl_getAnimTimer(this->animctrl)){
|
||||
func_80328B8C(this, 10, 0.02f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: //L8038FE70
|
||||
func_8038F598(this, 9.0f);
|
||||
break;
|
||||
|
||||
case 11: //L8038FE84
|
||||
if(func_8038F5D4(this, local->unk24, 30.0f, 12.0f, 0x3C)){
|
||||
func_80328A84(this, 12);
|
||||
}
|
||||
break;
|
||||
|
||||
case 12: //L8038FEB8
|
||||
if(func_8038F5D4(this, local->unk18, 30.0f, 12.0f, 0x3C)){
|
||||
this->unk38_31 = TRUE;
|
||||
}
|
||||
break;
|
||||
}//L8038FEEC
|
||||
}
|
89
src/FP/code_9EA0.c
Normal file
89
src/FP/code_9EA0.c
Normal file
@@ -0,0 +1,89 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_80390290(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80390388(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_80392680[];
|
||||
|
||||
extern ActorInfo D_80392690 = { 0x20D, 0x33D, 0x38A,
|
||||
0x1, D_80392680,
|
||||
func_80390388, func_80326224, func_80390290,
|
||||
2500, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_80390290(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
s32 sp18;
|
||||
|
||||
sp18 = 2;
|
||||
|
||||
if(this->unk38_31) return this;
|
||||
|
||||
if(func_803114C4() == 0xC1F || func_803114C4() == 0xC1E){
|
||||
sp18 = 1;
|
||||
}
|
||||
func_8033A45C(1, 0);
|
||||
func_8033A45C(3, sp18);
|
||||
func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
|
||||
int func_80390334(void){
|
||||
if( levelSpecificFlags_get(0x11) && levelSpecificFlags_get(0x12) && levelSpecificFlags_get(0x13)){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void func_80390388(Actor *this){
|
||||
actor_collisionOff(this);
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(jiggyscore_isSpawned(JIGGY_2E_FP_PRESENTS) || jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)){
|
||||
levelSpecificFlags_set(0x11, TRUE);
|
||||
levelSpecificFlags_set(0x12, TRUE);
|
||||
levelSpecificFlags_set(0x13, TRUE);
|
||||
}
|
||||
if(jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3) || jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)){
|
||||
this->unk38_31 = FALSE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
}
|
||||
else{
|
||||
this->unk38_31 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
return;
|
||||
}
|
||||
}//L80390468
|
||||
|
||||
if( this->unk38_31 ) return;
|
||||
if( this->state != 1 ) return;
|
||||
|
||||
if( jiggyscore_isSpawned(JIGGY_2E_FP_PRESENTS)
|
||||
|| jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)
|
||||
|| func_80390334()
|
||||
){
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
|
||||
if( func_80329530(this, 0xFA)
|
||||
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
|
||||
){
|
||||
if(0.0f == this->unk1C[0] && func_80390334()){
|
||||
if(func_80311480(0xc1f, 0xb, this->position, NULL, NULL, NULL)){
|
||||
this->unk138_24 = TRUE;
|
||||
this->unk1C[0] = 1.0f;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if( !this->unk138_24 ){
|
||||
if(func_80311480(0xc1e, 0x2b, this->position, NULL, NULL, NULL)){
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
21
src/FP/code_A1C0.c
Normal file
21
src/FP/code_A1C0.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_803905B0(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803926C0 = { 0x20E, 0x33E, 0x49C,
|
||||
0x1, NULL,
|
||||
func_803905B0, func_80326224, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_803905B0(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
}
|
||||
this->marker->propPtr->unk8_3 = func_8038DD14(this) ? TRUE : FALSE;
|
||||
}
|
86
src/FP/code_A240.c
Normal file
86
src/FP/code_A240.c
Normal file
@@ -0,0 +1,86 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8028E668(f32[3], f32, f32, f32);
|
||||
|
||||
void func_80390630(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorAnimationInfo D_803926F0[]= {
|
||||
{0, 0.0f},
|
||||
{ASSET_221_ANIM_WOZZA_IN_CAVE, 5.0f}
|
||||
};
|
||||
|
||||
extern ActorInfo D_80392700 = { MARKER_20F_WOZZA_IN_CAVE, ACTOR_33F_WOZZA_IN_CAVE, ASSET_494_MODEL_WOZZA,
|
||||
0x1, D_803926F0,
|
||||
func_80390630, func_80326224, func_80325888,
|
||||
2500, 0, 1.6f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_80390630(Actor *this){
|
||||
if(func_803203FC(0xC4)){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOff(this);
|
||||
this->unk58_0 = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOn(this);
|
||||
this->unk38_31 = jiggyscore_isCollected(JIGGY_32_FP_WOZZA) || levelSpecificFlags_get(0x26) ? 0 : 1;
|
||||
}//L80390714
|
||||
|
||||
if(this->unk38_31){
|
||||
this->unk58_0 = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
this->unk58_0 = TRUE;
|
||||
func_8028E668(this->position, 200.0f, -40.0f, 160.0f);
|
||||
|
||||
if(this->state == 1){
|
||||
this->yaw_moving = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 1.0f);
|
||||
|
||||
if(!func_803114B0()){
|
||||
if( actor_animationIsAt(this, 0.09f)
|
||||
|| actor_animationIsAt(this, 0.19f)
|
||||
){
|
||||
FUNC_8030E8B4(SFX_88_WOZZA_NOISE, 1.0f, 22000, this->position, 500, 2000);
|
||||
}
|
||||
|
||||
if( actor_animationIsAt(this, 0.68f)
|
||||
|| actor_animationIsAt(this, 0.78f)
|
||||
|| actor_animationIsAt(this, 0.85f)
|
||||
|| actor_animationIsAt(this, 0.92f)
|
||||
|
||||
){
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
if(func_80329530(this, 350)){
|
||||
if(player_getTransformation() == TRANSFORM_4_WALRUS){
|
||||
if(!levelSpecificFlags_get(0x31)){
|
||||
if(func_80311480(0xc27, 0x23, NULL, NULL, NULL, NULL)){
|
||||
levelSpecificFlags_set(0x31, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(!levelSpecificFlags_get(0x32)){
|
||||
if(func_80311480(0xc26, 0x23, NULL, NULL, NULL, NULL)){
|
||||
levelSpecificFlags_set(0x32, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
210
src/FP/code_A40.c
Normal file
210
src/FP/code_A40.c
Normal file
@@ -0,0 +1,210 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_80386E30(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void chXmasTree_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80391B50 = {
|
||||
MARKER_BA_XMAS_TREE, ACTOR_15F_XMAS_TREE, ASSET_488_MODEL_XMAS_TREE,
|
||||
0x1, NULL,
|
||||
chXmasTree_update, func_80326224, func_80386E30,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 chXmasTree_switch_spawn_position[3] = {-0x1220, 0x6A, 0x1945};
|
||||
|
||||
/* .code */
|
||||
Actor *func_80386E30(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_8033A45C(5, this->unk38_31);
|
||||
func_8033A45C(6, func_8031FF1C(0x13) && !func_8033A0F0(5));
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_80386EAC(Actor *this){
|
||||
u8 tmp_a0;
|
||||
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
tmp_a0 = this->unk44_31;
|
||||
if(tmp_a0){
|
||||
func_8030DA44(tmp_a0);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80386EF4(Actor *this, int arg1){
|
||||
this->unk38_31 = arg1;
|
||||
mapSpecificFlags_set(0, this->unk38_31);
|
||||
|
||||
}
|
||||
|
||||
void func_80386F3C(void){
|
||||
levelSpecificFlags_set(0x29, TRUE);
|
||||
func_803228D8();
|
||||
func_803204E4(0xe, 1);
|
||||
func_802E4078(MAP_53_FP_CHRISTMAS_TREE, 1, 0);
|
||||
}
|
||||
|
||||
void func_80386F84(Actor * this){
|
||||
func_80328A84(this, 2);
|
||||
func_80386EF4(this, 0);
|
||||
}
|
||||
|
||||
void func_80386FB4(void){
|
||||
func_8032811C(ACTOR_338_XMAS_TREE_SWITCH, chXmasTree_switch_spawn_position, 350);
|
||||
}
|
||||
|
||||
void func_80386FE0(void *marker){
|
||||
Actor *this = marker_getActor(reinterpret_cast(ActorMarker *, marker));
|
||||
Actor *child = spawn_child_actor(0x339, &this);
|
||||
s32 pad;
|
||||
|
||||
child->position_x += 20.0f;
|
||||
child->position_z += 25.0f;
|
||||
}
|
||||
|
||||
void func_80387038(Actor *this){
|
||||
if(func_8030E3FC(this->unk44_31))
|
||||
func_8030E394(this->unk44_31);
|
||||
func_8030DBB4(this->unk44_31, randf2(0.9f, 1.1f));
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
||||
void func_8038709C(Actor *this){
|
||||
if(this->state == 5){
|
||||
if(!mapSpecificFlags_get(0))
|
||||
func_80387038(this);
|
||||
return;
|
||||
}
|
||||
|
||||
if(mapSpecificFlags_get(0) && !func_8030E3FC(this->unk44_31))
|
||||
func_80387038(this);
|
||||
}
|
||||
|
||||
void chXmasTree_update(Actor *this){
|
||||
f32 sp2C = time_getDelta();
|
||||
u8 tmp_a0;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
this->marker->collidable = FALSE;
|
||||
func_803300D8(this->marker, func_80386EAC);
|
||||
if(this->unk44_31 == 0){
|
||||
this->unk44_31 = func_8030D90C();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_415_UNKNOWN);
|
||||
func_8030DD14(this->unk44_31, 3);
|
||||
sfxsource_setSampleRate(this->unk44_31, 28000);
|
||||
}
|
||||
func_802C3BF8(func_80386FB4);
|
||||
func_802C3C88(func_80386FE0, this->marker);
|
||||
if(func_8031FF1C(0x13)){
|
||||
func_80386F84(this);
|
||||
mapSpecificFlags_set(2, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
this->unk124_9 = 1;
|
||||
if(jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(0x29)){
|
||||
func_80386EF4(this, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1: // L80387268
|
||||
func_80386EF4(this, 0);
|
||||
if(func_8031FF1C(0x13)){
|
||||
func_80386F84(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: // L80387294
|
||||
if(!mapSpecificFlags_get(2)) break;
|
||||
|
||||
func_80328A84(this, 3);
|
||||
this->unk60 = 2.0f;
|
||||
func_8025A6EC(COMUSIC_61_XMAS_TREE_LIGHTS_UP, 28000);
|
||||
func_802BAFE4(0x1A);
|
||||
func_80311480(0xC14, 0, NULL, NULL, NULL, NULL);
|
||||
break;
|
||||
|
||||
case 3: // L803872F0
|
||||
if(0.0 <= this->unk60){
|
||||
if( 1.8 < this->unk60){
|
||||
func_80386EF4(this, 0);
|
||||
}
|
||||
else if(this->unk60 < 0.2){//L80387340
|
||||
func_80386EF4(this, 1);
|
||||
}
|
||||
else{
|
||||
if(randf() < 0.2){
|
||||
func_80386EF4(this, this->unk38_31 ^ 1);
|
||||
func_8038709C(this);
|
||||
}
|
||||
}//L803873AC
|
||||
this->unk60 -= sp2C;
|
||||
}
|
||||
else{//L803873BC
|
||||
if(func_802BB270()){
|
||||
func_80328A84(this, 4);
|
||||
func_80386EF4(this, 1);
|
||||
item_set(ITEM_0_HOURGLASS_TIMER, 3600 - 1);
|
||||
item_set(ITEM_6_HOURGLASS, TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: // L80387400
|
||||
if(mapSpecificFlags_get(3)){
|
||||
func_80328A84(this, 6);
|
||||
func_80386EF4(this, 1);
|
||||
item_set(ITEM_6_HOURGLASS, FALSE);
|
||||
tmp_a0 = this->unk44_31;
|
||||
if(tmp_a0){
|
||||
func_8030DA44(tmp_a0);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_0(0.5f, func_80386F3C);
|
||||
}
|
||||
else{//L80387470
|
||||
if(item_empty(ITEM_6_HOURGLASS)){
|
||||
func_80328A84(this, 5);
|
||||
mapSpecificFlags_set(2, FALSE);
|
||||
this->unk60 = 0.1f;
|
||||
if(!func_8038BFA0()){
|
||||
if(!mapSpecificFlags_get(9) || mapSpecificFlags_get(1)){
|
||||
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 28000);
|
||||
func_802BAFE4(0x1a);
|
||||
this->unk60 = 2.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 5: // L803874EC
|
||||
if(0.0 <= this->unk60){
|
||||
if( 1.8 < this->unk60){
|
||||
func_80386EF4(this, 1);
|
||||
}
|
||||
else if(this->unk60 < 0.2){
|
||||
func_80386EF4(this, 0);
|
||||
}
|
||||
else{
|
||||
if(randf() < 0.2){
|
||||
func_80386EF4(this, this->unk38_31 ^ 1);
|
||||
func_8038709C(this);
|
||||
}
|
||||
}
|
||||
this->unk60 -= sp2C;
|
||||
}
|
||||
else{
|
||||
func_80386F84(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
93
src/FP/code_A500.c
Normal file
93
src/FP/code_A500.c
Normal file
@@ -0,0 +1,93 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80390BDC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorInfo D_80392730 = { 0x210, 0x340, 0x4D2,
|
||||
0x0, NULL,
|
||||
func_80390BDC, func_80326224, func_803908F0,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
extern struct31s D_80392754;
|
||||
extern struct43s D_8039277C;
|
||||
extern struct31s D_803927C4;
|
||||
extern struct43s D_803927EC;
|
||||
extern s32 D_80392834[3];
|
||||
|
||||
/* .code */
|
||||
Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this = marker_getActor(marker);
|
||||
if(this->unk38_31 != 0) return this;
|
||||
|
||||
return func_80325888(marker, gfx, mtx, vtx);
|
||||
}
|
||||
|
||||
void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(cnt);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8039277C);
|
||||
func_802EFE24(pCtrl,
|
||||
100.0f, 100.0f, 100.0f,
|
||||
250.0f, 250.0f, 250.0f
|
||||
);
|
||||
func_802EFB98(pCtrl, &D_80392754);
|
||||
func_802EF9F8(pCtrl, 0.6f);
|
||||
func_802EFA18(pCtrl, 0);
|
||||
func_802EFA20(pCtrl, 1.0f, 1.3f);
|
||||
func_802EF9EC(pCtrl, 0x7B, 8000);
|
||||
particleEmitter_emitN(pCtrl, cnt);
|
||||
}
|
||||
|
||||
void func_80390A30(f32 position[3], s32 cnt, enum asset_e sprite_id){
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(cnt);
|
||||
func_802EFFA8(pCtrl, D_80392834);
|
||||
particleEmitter_setSprite(pCtrl, sprite_id);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_803927EC);
|
||||
func_802EFB98(pCtrl, &D_803927C4);
|
||||
particleEmitter_emitN(pCtrl, cnt);
|
||||
}
|
||||
|
||||
void func_80390ABC(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_80390944(this->position, 0xA, 0x4D3);
|
||||
func_80390A30(this->position, 6, ASSET_700_SPRITE_DUST);
|
||||
func_8030E6D4(SFX_B6_GLASS_BREAKING_1);
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||
this->unk38_31 = 1;
|
||||
}
|
||||
|
||||
void func_80390B2C(ActorMarker *marker){
|
||||
Actor *this = marker_getActor(marker);
|
||||
func_803228D8();
|
||||
func_802E4078(MAP_27_FP_FREEZEEZY_PEAK, 0xd, 0);
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
|
||||
void func_80390B70(Actor *this){
|
||||
func_80324E38(0.0f, 3);
|
||||
timed_setCameraToNode(0.0f, 0);
|
||||
timedFunc_set_1(0.6f, (TFQM1)func_80390ABC, this->marker);
|
||||
timedFunc_set_1(2.5f, func_80390B2C, this->marker);
|
||||
}
|
||||
|
||||
void func_80390BDC(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{
|
||||
if(levelSpecificFlags_get(0x29)){
|
||||
func_80390B70(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
83
src/FP/code_A880.c
Normal file
83
src/FP/code_A880.c
Normal file
@@ -0,0 +1,83 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern s32 func_8024DB50(f32[3], f32);
|
||||
|
||||
void func_80390EB0(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorInfo D_80392840 = { 0x245, 0x353, 0x402,
|
||||
0x0, NULL,
|
||||
func_80390EB0, func_80326224, func_80325340,
|
||||
2000, 0, 0.0f, 0
|
||||
};
|
||||
struct40s D_80392864;
|
||||
s32 D_80392894[3];
|
||||
struct40s D_803928A0;
|
||||
s32 D_803928D0[3];
|
||||
|
||||
/* .code */
|
||||
void func_80390C70(f32 position[3]){
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(1);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_70D_SPRITE_SMOKE_1);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 1, 6);
|
||||
func_802EFFA8(pCtrl, D_80392894);
|
||||
func_802EF9E4(pCtrl, 0x41);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(pCtrl,
|
||||
-40.0f, 110.0f, -40.0f,
|
||||
40.0f, 110.0f, 40.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl,
|
||||
0.0f, 40.0f, 0.0f,
|
||||
0.0f, 90.0f, 0.0f
|
||||
);
|
||||
func_802EFC28(pCtrl, &D_80392864);
|
||||
}
|
||||
|
||||
void func_80390D58(f32 position[3]){
|
||||
ParticleEmitter *pCtrl = partEmitList_pushNew(1);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_713_SPRITE_SPARKLE_YELLOW);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 1, 6);
|
||||
func_802EFFA8(pCtrl, D_803928D0);
|
||||
func_802EF9E4(pCtrl, 0xFF);
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setParticleSpawnPositionRange(pCtrl,
|
||||
-40.0f, 50.0,-40.0f,
|
||||
40.0f, 70.0, 40.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl,
|
||||
-40.0f, 120.0,-40.0f,
|
||||
40.0f, 180.0, 40.0f
|
||||
);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl,
|
||||
0.0f, -60.0f, 0.0f,
|
||||
0.0f, -100.0f, 0.0f
|
||||
);
|
||||
func_802EFC28(pCtrl, &D_803928A0);
|
||||
}
|
||||
|
||||
void func_80390E78(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
FUNC_8030E8B4(SFX_96_HOTSAND_EEL_HISS, 1.0f, 32000, this->position, 1000, 2000);
|
||||
}
|
||||
|
||||
void func_80390EB0(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
actor_collisionOn(this);
|
||||
marker_setCollisionScripts(this->marker, func_80390E78, NULL, NULL);
|
||||
}
|
||||
|
||||
if(func_8024DB50(this->position, 150.0f) || func_80329530(this, 1200))
|
||||
{
|
||||
if( !(func_8023DB5C() & 3) && randf() < 0.2){
|
||||
func_80390C70(this->position);
|
||||
}
|
||||
|
||||
if( !(func_8023DB5C() & 3) && randf() < 0.7){
|
||||
func_80390D58(this->position);
|
||||
}
|
||||
}
|
||||
}
|
245
src/FP/code_ABD0.c
Normal file
245
src/FP/code_ABD0.c
Normal file
@@ -0,0 +1,245 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "prop.h"
|
||||
#include "SnS.h"
|
||||
|
||||
extern ActorInfo D_80367FE0;
|
||||
|
||||
extern ActorInfo D_80391A10;
|
||||
extern ActorInfo D_80391A60;
|
||||
extern ActorInfo D_80391AB0;
|
||||
extern ActorInfo D_80391B50;
|
||||
extern ActorInfo D_80391BB0;
|
||||
extern ActorInfo D_80391C18;
|
||||
extern ActorInfo D_80391C58;
|
||||
extern ActorInfo D_80391CE8;
|
||||
extern ActorInfo D_80391E08;
|
||||
extern ActorInfo D_80391E2C;
|
||||
extern ActorInfo D_80391E50;
|
||||
extern ActorInfo D_80391F88;
|
||||
extern ActorInfo D_80391FAC;
|
||||
extern ActorInfo D_80391FD0;
|
||||
extern ActorInfo D_80391FF4;
|
||||
extern ActorInfo D_803920E8;
|
||||
extern ActorInfo D_803923D0;
|
||||
extern ActorInfo D_80392420;
|
||||
extern ActorInfo D_80392470;
|
||||
extern ActorInfo D_803924B0;
|
||||
extern ActorInfo D_803924D4;
|
||||
extern ActorInfo D_803924F8;
|
||||
extern ActorInfo D_80392588;
|
||||
extern ActorInfo D_80392628;
|
||||
extern ActorInfo D_80392690;
|
||||
extern ActorInfo D_803926C0;
|
||||
extern ActorInfo D_80392700;
|
||||
extern ActorInfo D_80392730;
|
||||
extern ActorInfo D_80392840;
|
||||
|
||||
void func_80391040(Actor *this);
|
||||
void func_80391180(Actor *this);
|
||||
void func_80391254(Actor *this);
|
||||
void func_803912EC(Actor *this);
|
||||
void func_8039180C(Actor *this);
|
||||
void func_80391894(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803928E0 = { 0x247, 0x355, 0x4E5, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0};
|
||||
ActorInfo D_80392904 = { 0x248, 0x356, 0x4E6, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0};
|
||||
ActorInfo D_80392928 = { 0x249, 0x357, 0x4E7, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0};
|
||||
ActorInfo D_8039294C = { 0x24A, 0x358, 0x4E8, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0};
|
||||
ActorInfo D_80392970 = { 0x21F, 0x22B, 0x4C4, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392994 = { 0x220, 0x22C, 0x4C5, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_803929B8 = { 0x221, 0x22D, 0x4C6, 0x1, NULL, func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_803929DC = { 0x222, 0x22E, 0x4C6, 0x1, NULL, func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392A00 = { 0x223, 0x22F, 0x4C6, 0x1, NULL, func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392A24 = { 0x24B, 0x35D, 0x4E9, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392A48 = { 0x24C, 0x35E, 0x4EC, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392A6C = { 0x24D, 0x35F, 0x4EA, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392A90 = { 0x24E, 0x360, 0x4EB, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392AB4 = { 0x23D, 0x253, 0x512, 0x1, NULL, func_8039180C, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392AD8 = { 0x23E, 0x254, 0x513, 0x1, NULL, func_80391894, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392AFC = { 0x286, 0x3AE, 0x55B, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392B20 = { 0x21D, 0x229, 0x4C3, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80392B44 = { 0x289, 0x3B0, 0x56A, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0};
|
||||
|
||||
/* .code */
|
||||
int func_80390FC0(void){
|
||||
f32 sp1C[3];
|
||||
|
||||
player_getVelocity(sp1C);
|
||||
|
||||
if ( 0.0 == sp1C[0] && -1.0 == sp1C[1] && 0.0 == sp1C[2])
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void func_80391040(Actor *this){
|
||||
f32 sp34[3];
|
||||
s32 a1;
|
||||
s32 sp2C;
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
}
|
||||
|
||||
if( !this->marker->unk14_21 ) return;
|
||||
if( !func_80390FC0() ) return;
|
||||
if( func_8023DB5C() & 7 ) return;
|
||||
|
||||
if(randf() < 0.5){
|
||||
a1 = 8;
|
||||
switch(this->marker->unk14_20){
|
||||
case 0x247://L80391128
|
||||
sp2C = 0x710;
|
||||
break;
|
||||
|
||||
case 0x248://L80391130
|
||||
sp2C = 0x711;
|
||||
break;
|
||||
|
||||
case 0x249://L80391138
|
||||
sp2C = 0x712;
|
||||
break;
|
||||
|
||||
case 0x24A://L80391140
|
||||
sp2C = 0x711;
|
||||
a1 = 6;
|
||||
break;
|
||||
|
||||
default:
|
||||
sp2C = 0x711;
|
||||
break;
|
||||
}
|
||||
func_8034A174(this->marker->unk44, randi2(0,a1) + 5, sp34);
|
||||
func_802DC110(sp34, sp2C);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80391180(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
}
|
||||
this->unk58_0 = func_8038DD14() ? 0 : 1;
|
||||
|
||||
if(this->marker->unk14_20 == 0x21F){
|
||||
this->marker->unk40_22 = actor_playerIsWithinDist(this, 2000) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80391254(Actor *this){
|
||||
func_802D3D74(this);
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = TRUE;
|
||||
if(this->marker->unk14_20 == 0x221 || this->marker->unk14_20 == 0x223){
|
||||
this->pitch = 3.0f;
|
||||
}
|
||||
if(this->marker->unk14_20 == 0x222){
|
||||
this->pitch = 2.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_803912EC(Actor *this){
|
||||
func_802D3D74(this);
|
||||
if(mapSpecificFlags_get(0xC)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_80391324(void)
|
||||
{
|
||||
spawnableActorList_add(&D_80391AB0, actor_new, 0X600);
|
||||
spawnableActorList_add(&D_80391BB0, actor_new, 0X2A);
|
||||
spawnableActorList_add(&D_80391C18, actor_new, 0X180084);
|
||||
spawnableActorList_add(&D_80391C58, actor_new, 0X180084);
|
||||
spawnableActorList_add(&D_80391CE8, actor_new, 0X2002E);
|
||||
spawnableActorList_add(&D_80391E08, actor_new, 0X100);
|
||||
spawnableActorList_add(&D_80391E2C, actor_new, 0X100);
|
||||
spawnableActorList_add(&D_80391E50, actor_new, 0X100);
|
||||
spawnableActorList_add(&D_80391F88, actor_new, 0X2100C);
|
||||
spawnableActorList_add(&D_80391FAC, actor_new, 0X2100C);
|
||||
spawnableActorList_add(&D_80391FD0, actor_new, 0X2100C);
|
||||
spawnableActorList_add(&D_80391FF4, actor_new, 0X2100C);
|
||||
spawnableActorList_add(&D_803920E8, actor_new, 0X408);
|
||||
spawnableActorList_add(&D_803923D0, actor_new, 0X100006C);
|
||||
spawnableActorList_add(&D_80391B50, actor_new, 0X20400);
|
||||
spawnableActorList_add(&D_80392420, actor_new, 4);
|
||||
spawnableActorList_add(&D_80392470, actor_new, 0X444);
|
||||
spawnableActorList_add(&D_803924B0, actor_new, 8);
|
||||
spawnableActorList_add(&D_803924D4, actor_new, 8);
|
||||
spawnableActorList_add(&D_803924F8, actor_new, 8);
|
||||
spawnableActorList_add(&D_80391A10, actor_new, 0);
|
||||
spawnableActorList_add(&D_80391A60, actor_new, 0X20);
|
||||
spawnableActorList_add(&D_80392588, actor_new, 0X80108);
|
||||
spawnableActorList_add(&D_80392628, actor_new, 0X44);
|
||||
spawnableActorList_add(&D_80392690, actor_new, 0XA8);
|
||||
spawnableActorList_add(&D_803926C0, actor_new, 0X8000400);
|
||||
spawnableActorList_add(&D_80392700, actor_new, 0X108);
|
||||
spawnableActorList_add(&D_80392840, actor_new, 0);
|
||||
spawnableActorList_add(&D_80392730, actor_new, 0X20000);
|
||||
spawnableActorList_add(&D_80367FE0, actor_new, 0);
|
||||
spawnableActorList_add(&D_803928E0, actor_new, 0X40);
|
||||
spawnableActorList_add(&D_80392904, actor_new, 0X40);
|
||||
spawnableActorList_add(&D_80392928, actor_new, 0X40);
|
||||
spawnableActorList_add(&D_8039294C, actor_new, 0X40);
|
||||
spawnableActorList_add(&D_80392B20, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_80392B44, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_80392970, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_80392994, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_803929B8, actor_new, 0X404);
|
||||
spawnableActorList_add(&D_803929DC, actor_new, 0X404);
|
||||
spawnableActorList_add(&D_80392A00, actor_new, 0X404);
|
||||
spawnableActorList_add(&D_80392A24, actor_new, 0X20004);
|
||||
spawnableActorList_add(&D_80392A48, actor_new, 4);
|
||||
spawnableActorList_add(&D_80392A6C, actor_new, 0X20004);
|
||||
spawnableActorList_add(&D_80392A90, actor_new, 0X20004);
|
||||
spawnableActorList_add(&D_80392AB4, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_80392AD8, actor_new, 0X400);
|
||||
spawnableActorList_add(&D_80392AFC, actor_new, 0X400);
|
||||
}
|
||||
|
||||
|
||||
void func_80391744(Actor *this, Actor* other){
|
||||
f32 sp34[3] = {0.0f, 0.0f, 0.0f};
|
||||
f32 sp28[3];
|
||||
void *sp24;
|
||||
f32 tmp_f0;
|
||||
|
||||
sp24 = func_80304C38(0x22A, this);
|
||||
tmp_f0 = (f32)func_80304DA8(sp24);
|
||||
other->yaw = tmp_f0;
|
||||
this->yaw = tmp_f0;
|
||||
ml_vec3f_yaw_rotate_copy(sp28, sp34, tmp_f0);
|
||||
nodeprop_getPosition(sp24, sp34);
|
||||
this->position_x = sp34[0] - sp28[0];
|
||||
this->position_z = sp34[2] - sp28[2];
|
||||
|
||||
other->position_x = sp34[0] + sp28[0];
|
||||
other->position_z = sp34[2] + sp28[2];
|
||||
}
|
||||
|
||||
void func_8039180C(Actor *this){
|
||||
ActorMarker *sp24;
|
||||
|
||||
if(!this->initialized){
|
||||
sp24 = func_80326EEC(0x254);
|
||||
if(sns_get_item_state(SNS_ITEM_ICE_KEY, 1) == 1){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
else{
|
||||
func_802D3D74(this);
|
||||
func_80391744(this, sp24);
|
||||
this->initialized = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80391894(Actor *this){
|
||||
func_802D3D74(this);
|
||||
}
|
40
src/FP/code_B4D0.c
Normal file
40
src/FP/code_B4D0.c
Normal file
@@ -0,0 +1,40 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
struct {
|
||||
u8 unk0;
|
||||
f32 unk4[3];
|
||||
} D_803935E0;
|
||||
|
||||
/* .code */
|
||||
void func_803918C0(void){
|
||||
Actor *actor;
|
||||
if(map_get() == MAP_7F_FP_WOZZAS_CAVE){
|
||||
D_803935E0.unk0 = func_8030ED2C(SFX_128_FIRE_CRACKING, 2);
|
||||
func_8030DBB4(D_803935E0.unk0, 1.0f);
|
||||
actor = func_80326EEC(0x353);
|
||||
if(actor){
|
||||
D_803935E0.unk4[0] = actor->position_x;
|
||||
D_803935E0.unk4[1] = actor->position_y;
|
||||
D_803935E0.unk4[2] = actor->position_z;
|
||||
}
|
||||
else{
|
||||
D_803935E0.unk4[0] = D_803935E0.unk4[1] = D_803935E0.unk4[2] = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_8039195C(void){
|
||||
if(D_803935E0.unk0){
|
||||
func_8030DA44(D_803935E0.unk0);
|
||||
D_803935E0.unk0 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80391994(void){
|
||||
if(map_get() == MAP_7F_FP_WOZZAS_CAVE){
|
||||
func_8030DB04(D_803935E0.unk0, 22000, D_803935E0.unk4, 400.0f, 1200.0f);
|
||||
func_8030E2C4(D_803935E0.unk0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user