document various assets, bsStoredState.c, and stateTimers.c
This commit is contained in:
@@ -30,7 +30,7 @@ void func_802CE7E0(ActorMarker *marker, ActorMarker *other){
|
||||
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
|
||||
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2]));
|
||||
actor->marker->propPtr->unk8_3 = 0;
|
||||
func_803115C4(ASSET_D96_TEXT_BEEHIVE);
|
||||
func_803115C4(ASSET_D96_DIALOG_BEEHIVE_MEET);
|
||||
func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void func_802CE8D4(Actor *this){
|
||||
){
|
||||
if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){
|
||||
if( player_getTransformation() == TRANSFORM_1_BANJO
|
||||
&& func_80311480(ASSET_D96_TEXT_BEEHIVE, 0, NULL, NULL, NULL, 0)
|
||||
&& func_80311480(ASSET_D96_DIALOG_BEEHIVE_MEET, 0, NULL, NULL, NULL, 0)
|
||||
){
|
||||
func_80320004(BKPROG_D_BEEHIVE_TEXT, 1);
|
||||
}
|
||||
|
@@ -6,34 +6,34 @@
|
||||
extern void actor_setOpacity(Actor*,s32);
|
||||
extern void func_8035644C(u32);
|
||||
|
||||
bool chcollectable_collectItem(Actor*, u32, enum asset_e, enum comusic_e, enum item_e, f32);
|
||||
Actor *chCollectable_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void chCollectable_update(Actor *this);
|
||||
bool chCollectible_collectItem(Actor*, u32, enum asset_e, enum comusic_e, enum item_e, f32);
|
||||
Actor *chCollectible_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void chCollectible_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
extern ActorInfo D_80367D00 = {
|
||||
MARKER_60_BLUE_EGG_COLLECTABLE, ACTOR_52_BLUE_EGG, ASSET_36D_SPRITE_BLUE_EGG,
|
||||
MARKER_60_BLUE_EGG_COLLECTIBLE, ACTOR_52_BLUE_EGG, ASSET_36D_SPRITE_BLUE_EGG,
|
||||
0, NULL,
|
||||
chCollectable_update, func_80326224, chCollectable_draw,
|
||||
chCollectible_update, func_80326224, chCollectible_draw,
|
||||
0, 0, 0.7f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80367D24 = {
|
||||
MARKER_B5_RED_FEATHER_COLLECTABLE, ACTOR_129_RED_FEATHER, ASSET_580_SPRITE_RED_FEATHER,
|
||||
MARKER_B5_RED_FEATHER_COLLECTIBLE, ACTOR_129_RED_FEATHER, ASSET_580_SPRITE_RED_FEATHER,
|
||||
0, NULL,
|
||||
chCollectable_update, func_80326224, chCollectable_draw,
|
||||
chCollectible_update, func_80326224, chCollectible_draw,
|
||||
0, 0, 0.5f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80367D48 = {
|
||||
MARKER_1E5_GOLD_FEATHER_COLLECTABLE, ACTOR_370_GOLD_FEATHER, ASSET_6D1_SPRITE_GOLDFEATHTER,
|
||||
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE, ACTOR_370_GOLD_FEATHER, ASSET_6D1_SPRITE_GOLDFEATHTER,
|
||||
0, NULL,
|
||||
chCollectable_update, func_80326224, chCollectable_draw,
|
||||
chCollectible_update, func_80326224, chCollectible_draw,
|
||||
0, 0, 0.5f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void chcollectable_setState(Actor *arg0, s32 next_state){
|
||||
void chCollectible_setState(Actor *arg0, s32 next_state){
|
||||
switch(next_state){
|
||||
default:
|
||||
break;
|
||||
@@ -55,15 +55,15 @@ void func_802D8C98(Actor *this, s32 arg1) {
|
||||
|
||||
switch (this->marker->unk14_20)
|
||||
{
|
||||
case MARKER_60_BLUE_EGG_COLLECTABLE:
|
||||
case MARKER_60_BLUE_EGG_COLLECTIBLE:
|
||||
phi_v0 = TRUE;
|
||||
break;
|
||||
|
||||
case MARKER_B5_RED_FEATHER_COLLECTABLE:
|
||||
case MARKER_B5_RED_FEATHER_COLLECTIBLE:
|
||||
phi_v0 = (arg1 == 1) || (arg1 == 2) || (arg1 == 3);
|
||||
break;
|
||||
|
||||
case MARKER_1E5_GOLD_FEATHER_COLLECTABLE:
|
||||
case MARKER_1E5_GOLD_FEATHER_COLLECTIBLE:
|
||||
phi_v0 = TRUE;
|
||||
break;
|
||||
|
||||
@@ -73,10 +73,10 @@ void func_802D8C98(Actor *this, s32 arg1) {
|
||||
}
|
||||
|
||||
this->unk10_12 = arg1;
|
||||
chcollectable_setState(this, (phi_v0 ) ? 2 : 3);
|
||||
chCollectible_setState(this, (phi_v0 ) ? 2 : 3);
|
||||
}
|
||||
|
||||
bool chcollectable_collectItem(Actor* actor, u32 arg1, enum asset_e dialogId, enum comusic_e sfxId, enum item_e itemId, f32 arg5){
|
||||
bool chCollectible_collectItem(Actor* actor, u32 arg1, enum asset_e dialogId, enum comusic_e sfxId, enum item_e itemId, f32 arg5){
|
||||
func_8025A6EC(sfxId,32000);
|
||||
timedFunc_set_1(0.75f, (GenMethod_1)func_8035644C, arg1);
|
||||
if(!func_802FADD4(0x1b)){
|
||||
@@ -89,37 +89,37 @@ bool chcollectable_collectItem(Actor* actor, u32 arg1, enum asset_e dialogId, en
|
||||
return TRUE;
|
||||
|
||||
actor->unk60 = arg5;
|
||||
chcollectable_setState(actor, 1);
|
||||
chCollectible_setState(actor, 1);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 chcollectable_collectEgg(ActorProp *arg0){
|
||||
s32 chCollectible_collectEgg(ActorProp *arg0){
|
||||
Actor *actPtr = NULL;
|
||||
if(arg0 != NULL){
|
||||
fxSparkle_blueEgg(&arg0->x);
|
||||
if(arg0->unk8_0)
|
||||
actPtr = marker_getActor(arg0->marker);
|
||||
}
|
||||
chcollectable_collectItem(actPtr, 5, 0xD9E, COMUSIC_C_EGG_COLLECTED, 0xD, 2.0f);
|
||||
chCollectible_collectItem(actPtr, 5, 0xD9E, COMUSIC_C_EGG_COLLECTED, 0xD, 2.0f);
|
||||
}
|
||||
|
||||
void chcollectable_collectRedFeather(ActorProp *arg0){
|
||||
void chCollectible_collectRedFeather(ActorProp *arg0){
|
||||
Actor *actPtr = NULL;
|
||||
fxSparkle_redFeather(&arg0->x);
|
||||
if(arg0->unk8_0)
|
||||
actPtr = marker_getActor(arg0->marker);
|
||||
chcollectable_collectItem(actPtr, 6, 0xD9F, COMUSIC_B_RED_FEATHER_COLLECTED, 0xF, 4.0f);
|
||||
chCollectible_collectItem(actPtr, 6, 0xD9F, COMUSIC_B_RED_FEATHER_COLLECTED, 0xF, 4.0f);
|
||||
}
|
||||
|
||||
void chcollectable_collectGoldFeather(ActorProp *arg0){
|
||||
void chCollectible_collectGoldFeather(ActorProp *arg0){
|
||||
Actor *actPtr = NULL;
|
||||
fxSparkle_goldFeather(&arg0->x);
|
||||
if(arg0->unk8_0)
|
||||
actPtr = marker_getActor(arg0->marker);
|
||||
chcollectable_collectItem(actPtr, 7, 0xDA0, COMUSIC_14_GOLD_FEATHER_COLLECTED, ITEM_10_GOLD_FEATHER, 6.0f);
|
||||
chCollectible_collectItem(actPtr, 7, 0xDA0, COMUSIC_14_GOLD_FEATHER_COLLECTED, ITEM_10_GOLD_FEATHER, 6.0f);
|
||||
}
|
||||
|
||||
Actor *chCollectable_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
Actor *chCollectible_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
Actor *thisActor = marker_getActor(this);
|
||||
|
||||
if(thisActor->unk28 != 0.0f){
|
||||
@@ -136,7 +136,7 @@ Actor *chCollectable_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
return thisActor;
|
||||
}
|
||||
|
||||
void chCollectable_update(Actor *this) {
|
||||
void chCollectible_update(Actor *this) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f2;
|
||||
@@ -163,7 +163,7 @@ void chCollectable_update(Actor *this) {
|
||||
if (this->unk60 > 0.0) {
|
||||
this->unk60 -= time_getDelta();
|
||||
} else {
|
||||
chcollectable_setState(this, 2);
|
||||
chCollectible_setState(this, 2);
|
||||
}
|
||||
/* fallthrough */
|
||||
case 3:
|
404
src/core2/ch/crab.c
Normal file
404
src/core2/ch/crab.c
Normal file
@@ -0,0 +1,404 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern bool func_80259254(f32[3], f32, f32, f32);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chCrabAnimations[] ={
|
||||
{ 0, 0.0f},
|
||||
{ ASSET_1DA_ANIM_CRAB_IDLE, 0.8f},
|
||||
{ ASSET_2C_ANIM_CRAB_WALK, 2.0f},
|
||||
{ ASSET_2C_ANIM_CRAB_WALK, 1.4f},
|
||||
{ ASSET_2C_ANIM_CRAB_WALK, 0.7f},
|
||||
{ ASSET_96_ANIM_CRAB_UPSIDEDOWN, 0.5f},
|
||||
{ ASSET_97_ANIM_CRAB_FLIP_UPSIDEDOWN, 0.8f},
|
||||
{ ASSET_155_ANIM_CRAB_FLIP_UPRIGHT, 0.55f},
|
||||
{ ASSET_2C_ANIM_CRAB_WALK, 1.4f},
|
||||
{ ASSET_2C_ANIM_CRAB_WALK, 4.0f}
|
||||
};
|
||||
|
||||
ActorAnimationInfo chCrabMutantAnimations[] = {
|
||||
{0x000, 0.0f},
|
||||
{ASSET_1DB_ANIM_MUTANT_CRAB_IDLE, 0.8f},
|
||||
{ASSET_156_ANIM_MUTANT_CRAB_WALK, 2.0f},
|
||||
{ASSET_156_ANIM_MUTANT_CRAB_WALK, 1.4f},
|
||||
{ASSET_156_ANIM_MUTANT_CRAB_WALK, 0.7f},
|
||||
{ASSET_158_ANIM_MUTANT_CRAB_UPSIDEDOWN, 0.5f},
|
||||
{ASSET_157_ANIM_MUTANT_CRAB_FLIP_UPSIDEDOWN, 0.8f},
|
||||
{ASSET_159_ANIM_MUTANT_CRAB_UPRIGHT, 0.55f},
|
||||
{ASSET_156_ANIM_MUTANT_CRAB_WALK, 1.4f},
|
||||
{ASSET_156_ANIM_MUTANT_CRAB_WALK, 2.0f}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chCrab_802CB040(Actor *this) {
|
||||
this->unk28 = randf2(1.5f, 2.3f);
|
||||
}
|
||||
|
||||
void __chCrab_802CB078(Actor *this) {
|
||||
u32 temp_t9;
|
||||
|
||||
if ((this->modelCacheIndex != ACTOR_F2_BLACK_SNIPPET) || func_8038B550()) {
|
||||
temp_t9 = (u32) this->unk38_31 >> 0x16;
|
||||
if (this->unk38_31 != 0) {
|
||||
this->unk38_31--;
|
||||
return;
|
||||
}
|
||||
else{
|
||||
if( func_80329530(this, 1500)
|
||||
&& ( (this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET) || func_803292E0(this))
|
||||
) {
|
||||
this->unk28 = 0.0f;
|
||||
func_80328A84(this, 3U);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __chCrab_802CB140(Actor *this) {
|
||||
func_80328A84(this, 2U);
|
||||
__chCrab_802CB040(this);
|
||||
func_80328CEC(this, (s32) this->yaw_ideal, 135, 175);
|
||||
this->unk38_31 = 150;
|
||||
}
|
||||
|
||||
void __chCrab_touch(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
if ((this->state == 4) && func_803294F0(this, 80, func_80329784(this))) {
|
||||
FUNC_8030E8B4(SFX_1E_HITTING_AN_ENEMY_2, 1.0f, 28000, this->position, 950, 1900);
|
||||
__chCrab_802CB140(this);
|
||||
func_80328A84(this, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void __chCrab_ow(ActorMarker *marker, ActorMarker *other) {
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
this->unk60 = 3.0f;
|
||||
func_80328A84(this, 6);
|
||||
actor_playAnimationOnce(this);
|
||||
if (marker->unk14_20 == MARKER_13_SNIPPET) {
|
||||
FUNC_8030E8B4(SFX_6E_VILE_EGH, 2.0f, 26000, this->position, 950, 1900);
|
||||
marker->unk14_20 = MARKER_16B_SNIPPET_UPSIDEDOWN;
|
||||
}
|
||||
if (marker->unk14_20 == MARKER_DD_BLACK_SNIPPET) {
|
||||
FUNC_8030E8B4(SFX_6E_VILE_EGH, 2.0f, 26000, this->position, 950, 1900);
|
||||
marker->unk14_20 = MARKER_DE_BLACK_SNIPPET_UPSIDEDOWN;
|
||||
}
|
||||
}
|
||||
|
||||
void __chCrab_particleEmitterSetup(ParticleEmitter *p_ctrl, f32 position[3]) {
|
||||
particleEmitter_setPosition(p_ctrl, position);
|
||||
particleEmitter_setDrawMode(p_ctrl, 2);
|
||||
func_802EF9F8(p_ctrl, 0.7f);
|
||||
func_802EFA18(p_ctrl, 5);
|
||||
func_802EFA20(p_ctrl, 0.8f, 1.0f);
|
||||
particleEmitter_setSfx(p_ctrl, SFX_1F_HITTING_AN_ENEMY_3, 10000);
|
||||
particleEmitter_setSpawnIntervalRange(p_ctrl, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(p_ctrl, 3.5f, 3.5f);
|
||||
particleEmitter_setFade(p_ctrl, 0.0f, 0.65f);
|
||||
}
|
||||
|
||||
|
||||
void __chCrab_emitClawPiece(ParticleEmitter *p_ctrl, f32 position[3], enum asset_e model_id) {
|
||||
__chCrab_particleEmitterSetup(p_ctrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(p_ctrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(p_ctrl, model_id);
|
||||
func_802EFB70(p_ctrl, 0.5f, 0.8f);
|
||||
particleEmitter_setAngularVelocityRange(p_ctrl, -800.0f, -800.0f, -800.0f, 800.0f, 800.0f, 800.0f);
|
||||
particleEmitter_setParticleVelocityRange(p_ctrl, -200.0f, 850.0f, -200.0f, 400.0f, 1000.0f, 400.0f);
|
||||
particleEmitter_emitN(p_ctrl, 2);
|
||||
}
|
||||
|
||||
void __chCrab_emitLegPiece(ParticleEmitter *p_ctrl, f32 position[3], enum asset_e model_id) {
|
||||
__chCrab_particleEmitterSetup(p_ctrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(p_ctrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(p_ctrl, model_id);
|
||||
func_802EFB70(p_ctrl, 0.5f, 0.8f);
|
||||
particleEmitter_setAngularVelocityRange(p_ctrl, -800.0f, -800.0f, -800.0f, 800.0f, 800.0f, 800.0f);
|
||||
particleEmitter_setParticleVelocityRange(p_ctrl, -200.0f, 850.0f, -200.0f, 400.0f, 1000.0f, 400.0f);
|
||||
particleEmitter_emitN(p_ctrl, 6);
|
||||
}
|
||||
|
||||
void __chCrab_emitHeadPiece(ParticleEmitter *p_ctrl, f32 position[3], enum asset_e model_id) {
|
||||
__chCrab_particleEmitterSetup(p_ctrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(p_ctrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(p_ctrl, model_id);
|
||||
func_802EFB70(p_ctrl, 1.0f, 1.0f);
|
||||
particleEmitter_setAngularVelocityRange(p_ctrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setParticleVelocityRange(p_ctrl, -50.0f, 750.0f, -50.0f, 120.0f, 900.0f, 120.0f);
|
||||
particleEmitter_emitN(p_ctrl, 1);
|
||||
}
|
||||
|
||||
void __chCrab_spawn_mutant_crab_jiggy(void) {
|
||||
f32 sp1C[3];
|
||||
|
||||
sp1C[0] = 13814.0f;
|
||||
sp1C[1] = 3812.0f;
|
||||
sp1C[2] = 0.0f;
|
||||
jiggySpawn(JIGGY_16_CC_SNIPPETS, sp1C);
|
||||
}
|
||||
|
||||
void __chCrab_mutantTextCallback(ActorMarker *caller, enum asset_e text_id, s32 model_id){
|
||||
if (text_id == ASSET_D33_DIALOG_MUTANT_CRAB_DEFEAT) {
|
||||
func_80324E38(0.0f, 3);
|
||||
timed_setCameraToNode(0.0f, 4);
|
||||
timedFunc_set_0(0.1f, __chCrab_spawn_mutant_crab_jiggy);
|
||||
func_80324E88(3.0f);
|
||||
func_80324E38(3.0f, 0);
|
||||
return;
|
||||
}
|
||||
levelSpecificFlags_set(0xE, FALSE);
|
||||
}
|
||||
|
||||
bool __chCrab_802CB76C(ActorMarker *marker, ActorMarker *other) {
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
if ((this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET) && !func_8038B550()) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void __chCrab_die(ActorMarker *marker, ActorMarker *other){
|
||||
Actor *this;
|
||||
f32 jiggy_spawn_position[3];
|
||||
f32 sp44;
|
||||
bool is_mutant_snippet;
|
||||
bool is_black_snippet;
|
||||
s32 model_id;
|
||||
ParticleEmitter *p_ctrl;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
is_mutant_snippet = this->modelCacheIndex == ACTOR_F5_MUTIE_SNIPPET;
|
||||
is_black_snippet = this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET;
|
||||
FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 32750, this->position, 950, 1900);
|
||||
FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 28000, this->position, 950, 1900);
|
||||
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
|
||||
this->unk60 = 5.0f;
|
||||
marker->collidable = FALSE;
|
||||
this->unk138_27 = 1;
|
||||
marker_despawn(marker);
|
||||
if( map_get() == MAP_B_CC_CLANKERS_CAVERN
|
||||
&& func_80259254(this->position, 13778.0f, 0.0f, 3000.0f)
|
||||
) {
|
||||
this->depth_mode = MODEL_RENDER_DEPTH_COMPARE;
|
||||
if( !jiggyscore_isCollected(JIGGY_16_CC_SNIPPETS)
|
||||
&& ((actorArray_findClosestActorFromActorId(this->position, ACTOR_F5_MUTIE_SNIPPET, -1, &sp44) == NULL) || (3000.0f < sp44))) {
|
||||
jiggy_spawn_position[0] = 13814.0f;
|
||||
jiggy_spawn_position[1] = 3812.0f;
|
||||
jiggy_spawn_position[2] = 0.0f;
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
|
||||
func_80324DBC(2.25f, ASSET_D33_DIALOG_MUTANT_CRAB_DEFEAT, 0xF, jiggy_spawn_position, NULL, __chCrab_mutantTextCallback, NULL);
|
||||
}
|
||||
}
|
||||
p_ctrl = partEmitMgr_newEmitter(2);
|
||||
model_id = (is_mutant_snippet) ? ASSET_392_MODEL_MUTANT_CRAB_CLAW
|
||||
: (is_black_snippet) ? ASSET_569_MODEL_BLACK_CRAB_CLAW
|
||||
: ASSET_38C_MODEL_CRAB_CLAW;
|
||||
__chCrab_emitClawPiece(p_ctrl, this->position, model_id);
|
||||
|
||||
p_ctrl = partEmitMgr_newEmitter(6);
|
||||
model_id = (is_mutant_snippet) ? ASSET_391_MODEL_MUTANT_CRAB_LEG
|
||||
: (is_black_snippet) ? ASSET_568_MODEL_BLACK_CRAB_LEG
|
||||
: ASSET_38D_MODEL_CRAB_LEG;
|
||||
__chCrab_emitLegPiece(p_ctrl, this->position, model_id);
|
||||
|
||||
p_ctrl = partEmitMgr_newEmitter(1);
|
||||
model_id = (is_mutant_snippet) ? ASSET_390_MODEL_MUTANT_CRAB_HEAD
|
||||
: (is_black_snippet) ? ASSET_567_MODEL_BLACK_CRAB_HEAD
|
||||
: ASSET_38E_MODEL_CRAB_HEAD;
|
||||
__chCrab_emitHeadPiece(p_ctrl, this->position, model_id);
|
||||
}
|
||||
|
||||
void __chCrab_walkSfxUpdate(Actor *this) {
|
||||
if (actor_animationIsAt(this, 0.4f)) {
|
||||
FUNC_8030E8B4(SFX_3D_TICKER_WALKING, 0.85f, 15000, this->position, 950, 1900);
|
||||
}
|
||||
if (actor_animationIsAt(this, 0.9f)) {
|
||||
FUNC_8030E8B4(SFX_3D_TICKER_WALKING, 1.15f, 15000, this->position, 950, 1900);
|
||||
}
|
||||
}
|
||||
|
||||
void chCrab_update(Actor *this) {
|
||||
s32 sp34;
|
||||
f32 sp30;
|
||||
bool is_mutant_snippet;
|
||||
static s32 D_803670B0 = 0;
|
||||
static s32 D_803670B4 = 0;
|
||||
|
||||
sp34 = func_8023DB5C();
|
||||
sp30 = time_getDelta();
|
||||
is_mutant_snippet = this->modelCacheIndex == ACTOR_F5_MUTIE_SNIPPET;
|
||||
if (!this->unk16C_4) {
|
||||
marker_setCollisionScripts(this->marker, __chCrab_touch, __chCrab_ow, __chCrab_die);
|
||||
func_803300C0(this->marker, &__chCrab_802CB76C);
|
||||
this->unk124_0 = this->unk138_31 = FALSE;
|
||||
this->unk138_24 = FALSE;
|
||||
this->unk16C_4 = TRUE;
|
||||
animctrl_setTransitionDuration(this->animctrl, 0.25f);
|
||||
if (map_get() == MAP_A_TTC_SANDCASTLE) {
|
||||
if (!jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)) {
|
||||
mapSpecificFlags_set(1, 0);
|
||||
}
|
||||
if (func_803203FC(2)) {
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) != 0) {
|
||||
if (this->unkF4_8 != 1) {
|
||||
marker_despawn(this->marker);
|
||||
return;
|
||||
}
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
return;
|
||||
}
|
||||
if( (map_get() == MAP_B_CC_CLANKERS_CAVERN)
|
||||
&& !mapSpecificFlags_get(0)
|
||||
&& is_mutant_snippet
|
||||
&& !jiggyscore_isCollected(JIGGY_16_CC_SNIPPETS)
|
||||
&& func_80329530(this, 500) && !func_80329530(this, 200)
|
||||
&& !func_8028ECAC()
|
||||
) {
|
||||
if ((this->state != 6) && (this->state != 5)) {
|
||||
func_80311480(ASSET_D32_DIALOG_MUTANT_CRAB_MEET, 0xF, this->position, NULL, __chCrab_mutantTextCallback, NULL);
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
levelSpecificFlags_set(0xE, TRUE);
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
}
|
||||
if (map_get() == MAP_A_TTC_SANDCASTLE) {
|
||||
if( !mapSpecificFlags_get(0)
|
||||
&& levelSpecificFlags_get(2)
|
||||
&& !func_803203FC(2)
|
||||
&& !jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)
|
||||
&& func_80329530(this, 1600)
|
||||
) {
|
||||
func_80311480(0xA12, 4, this->position, NULL, NULL, NULL);
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
} else if (mapSpecificFlags_get(1)) {
|
||||
func_80311480(0xA13, 4, this->position, NULL, NULL, NULL);
|
||||
mapSpecificFlags_set(1, FALSE);
|
||||
}
|
||||
}
|
||||
if (levelSpecificFlags_get(0xE)) {
|
||||
if ((this->state != 8) && (this->state != 9)) {
|
||||
func_80328B8C(this, (this->unk138_24) ? 8 : 9, 0.0f, 1);
|
||||
this->unk138_24 = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
switch(this->state){
|
||||
case 1: //L802CBE30
|
||||
if (func_80328B38(this, 2, 0.03f)) {
|
||||
__chCrab_802CB040(this);
|
||||
}
|
||||
__chCrab_802CB078(this);
|
||||
break;
|
||||
|
||||
case 9: //L802CBE6C
|
||||
if (!levelSpecificFlags_get(0xE)) {
|
||||
func_80328B8C(this, 3, 0.0f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: //L802CBE9C
|
||||
func_80328FB0(this, 1.0f);
|
||||
if( func_8032CA80(this, (this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET)? 0xD: 0)
|
||||
&& func_80329480(this)
|
||||
) {
|
||||
func_80328CEC(this, (s32) this->yaw, 90, 150);
|
||||
}
|
||||
func_80328BD4(this, 1, 0.0f, 1, 0.0075f);
|
||||
__chCrab_802CB078(this);
|
||||
break;
|
||||
|
||||
case 3: //L802CBF44
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
func_80328A84(this, 4);
|
||||
this->unk28 = 12.0f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8: //L802CBF9C
|
||||
this->yaw_ideal = func_80329784(this) + 90.0;
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
func_80328A84(this, 9);
|
||||
this->unk28 = 12.0f;
|
||||
} else if (!levelSpecificFlags_get(0xE)) {
|
||||
func_80328B8C(this, 3, 0.0f, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: //L802CC024
|
||||
if ((func_8023DB5C() & 0xF) == 9) {
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
}
|
||||
func_80328FB0(this, 7.0f);
|
||||
if (func_8032CA80(this, (this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET)? 0xD : 0)) {
|
||||
__chCrab_802CB140(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5: //L802CC0AC
|
||||
this->unk60 = MAX(0.0, this->unk60 - sp30);
|
||||
if (this->unk60 == 0.0f) {
|
||||
func_80328A84(this, 7);
|
||||
actor_playAnimationOnce(this);
|
||||
if (this->marker->unk14_20 == 0x16B) {
|
||||
this->marker->unk14_20 = MARKER_13_SNIPPET;
|
||||
}
|
||||
if (this->marker->unk14_20 == 0xDE) {
|
||||
this->marker->unk14_20 = MARKER_DD_BLACK_SNIPPET;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: //L802CC18C
|
||||
if (animctrl_isStopped(this->animctrl)) {
|
||||
if (this->unk60 == 0.0f) {
|
||||
func_80326310(this);
|
||||
} else {
|
||||
func_80328A84(this, 5);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: //L802CC1E8
|
||||
if (animctrl_isStopped(this->animctrl)) {
|
||||
func_80328A84(this, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ((this->state == 2) || (this->state == 3) || (this->state == 4)) {
|
||||
if (sp34 != D_803670B0) {
|
||||
D_803670B0 = sp34;
|
||||
D_803670B4 = 1;
|
||||
__chCrab_walkSfxUpdate(this);
|
||||
}
|
||||
else if (D_803670B4 != 0) {
|
||||
D_803670B4--;
|
||||
__chCrab_walkSfxUpdate(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
|
||||
ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
|
||||
ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0};
|
328
src/core2/ch/gravestone.c
Normal file
328
src/core2/ch/gravestone.c
Normal file
@@ -0,0 +1,328 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
|
||||
Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8035F138(Actor *this);
|
||||
extern void func_80325794(ActorMarker *);
|
||||
extern f32 func_80257204(f32, f32, f32, f32);
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
}ActorLocal_core2_D7D10;
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80372F80[] = {
|
||||
{0, 0.0f},
|
||||
{ASSET_9A_ANIM_GRAVESTONE_IDLE, 8000000.0f},
|
||||
{ASSET_9A_ANIM_GRAVESTONE_IDLE, 1.3f},
|
||||
{ASSET_9B_ANIM_GRAVESTONE_WALK, 0.6f},
|
||||
{ASSET_9B_ANIM_GRAVESTONE_WALK, 0.75f},
|
||||
{ASSET_9A_ANIM_GRAVESTONE_IDLE, 1.5f},
|
||||
{ASSET_1ED_ANIM_GRAVESTONE_OW, 1.0f},
|
||||
{ASSET_1EE_ANIM_GRAVESTONE_DIE, 2.4f}
|
||||
};
|
||||
|
||||
ActorInfo D_80372FC0 = {
|
||||
MARKER_96_GRAVESTONE, ACTOR_C7_GRAVESTONE, ASSET_3C9_MODEL_GRAVESTONE,
|
||||
0x1, D_80372F80,
|
||||
func_8035F138, func_80326224, func_8035ECA0,
|
||||
3500, 0, 1.2f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80372FE4 = {
|
||||
MARKER_297_GIANT_GRAVESTONE, ACTOR_3C2_GIANT_GRAVESTONE, ASSET_3C9_MODEL_GRAVESTONE,
|
||||
0x1, D_80372F80,
|
||||
func_8035F138, func_80326224, func_8035ECA0,
|
||||
14000, 0, 3.2f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
static f32 D_80373008[3] = {0.0f, 0.0f, 0.0f};
|
||||
f32 rotation[3];
|
||||
Actor *this;
|
||||
ActorLocal_core2_D7D10 *local;
|
||||
|
||||
this = marker_getActorAndRotation(marker, rotation);
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
func_8033A45C(3, (s32) this->velocity[1]);
|
||||
func_8033A45C(4, local->unk0);
|
||||
modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this);
|
||||
modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker);
|
||||
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, D_80373008, func_803257B4(marker));
|
||||
return this;
|
||||
}
|
||||
|
||||
bool func_8035ED60(Actor *this) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f2;
|
||||
|
||||
temp_f0 = this->position[0] - this->unk1C[0];
|
||||
temp_f2 = this->position[2] - this->unk1C[2];
|
||||
if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 110.0f) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) {
|
||||
static s32 D_80373014[3] = {0xAA, 0xAA, 0xAA};
|
||||
static struct31s D_80373020 = {{0.4f, 0.8f}, {1.4f, 2.0f}, {0.0f, 0.01f}, {1.2f, 1.8f}, 0.0f, 0.01};
|
||||
static struct43s D_80373048 = {
|
||||
{{-200.0f, -200.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}}
|
||||
};
|
||||
ParticleEmitter *p_ctrl;
|
||||
|
||||
p_ctrl = partEmitMgr_newEmitter(count);
|
||||
particleEmitter_setRGB(p_ctrl, D_80373014);
|
||||
particleEmitter_setSprite(p_ctrl, sprite);
|
||||
particleEmitter_setPosition(p_ctrl, position);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(p_ctrl, &D_80373048);
|
||||
func_802EFB98(p_ctrl, &D_80373020);
|
||||
particleEmitter_setDrawMode(p_ctrl, PART_EMIT_NO_DEPTH);
|
||||
particleEmitter_emitN(p_ctrl, count);
|
||||
}
|
||||
|
||||
void func_8035EE48(Actor *this){
|
||||
u8 val = this->unk44_31;
|
||||
if(val != 0){
|
||||
func_8030DA44(val);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8035EE80(Actor *this){
|
||||
func_80328A84(this, 3);
|
||||
actor_loopAnimation(this);
|
||||
this->unk28 = 10.5f;
|
||||
func_8035EE48(this);
|
||||
}
|
||||
|
||||
void func_8035EEC0(Actor *this){
|
||||
func_80328A84(this, 4);
|
||||
actor_loopAnimation(this);
|
||||
this->unk28 = 9.0f;
|
||||
func_8035EE48(this);
|
||||
}
|
||||
|
||||
void func_8035EF00(Actor *this, f32 arg1){
|
||||
this->yaw_ideal = (f32)func_80329784(this);
|
||||
func_80328FB0(this, arg1);
|
||||
}
|
||||
|
||||
void func_8035EF3C(Actor *this) {
|
||||
if( actor_animationIsAt(this, 0.2f)
|
||||
|| actor_animationIsAt(this, 0.7f)
|
||||
) {
|
||||
FUNC_8030E8B4(SFX_123_BANJO_LANDING_10, 0.5f, 24000, this->position, 1750, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8035EF9C(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
Actor *this;
|
||||
ActorLocal_core2_D7D10 *local;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
this->velocity[2] = 0.0f;
|
||||
func_80328B8C(this, 7, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
local->unk0 = 2;
|
||||
actor_collisionOff(this);
|
||||
FUNC_8030E8B4(SFX_115_BUZZBOMB_DEATH, 0.6f, 32000, this->position, 1750, 3500);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 22000, this->position, 1750, 3500);
|
||||
func_8035EE48(this);
|
||||
}
|
||||
|
||||
void func_8035F048(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
Actor *this;
|
||||
ActorLocal_core2_D7D10 *local;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
|
||||
FUNC_8030E8B4(SFX_F9_GRUNTLING_NOISE_1, 1.2f, 22000, this->position, 1750, 3500);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 22000, this->position, 1750, 3500);
|
||||
this->velocity[2] = 0.0f;
|
||||
func_80328B8C(this, 6, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
local->unk0 = 2;
|
||||
func_8035EE48(this);
|
||||
}
|
||||
|
||||
void func_8035F0E8(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
Actor *this;
|
||||
ActorLocal_core2_D7D10 *local;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 22000, this->position, 1750, 3500);
|
||||
this->velocity[2] = 0.8f;
|
||||
func_8035EE80(this);
|
||||
}
|
||||
|
||||
void func_8035F138(Actor *this) {
|
||||
f32 sp2C;
|
||||
ActorLocal_core2_D7D10 *local;
|
||||
|
||||
|
||||
local = (ActorLocal_core2_D7D10 *)&this->local;
|
||||
sp2C = time_getDelta();
|
||||
if ((this->state == 1) && (animctrl_getAnimTimer(this->animctrl) < 0.04)) {
|
||||
this->velocity[1] = 2.0f;
|
||||
} else {
|
||||
this->velocity[1] = 1.0f;
|
||||
}
|
||||
if (this->velocity[2] <= 0.0) {
|
||||
this->velocity[2] = 0.0f;
|
||||
}
|
||||
else{
|
||||
this->velocity[2] -= sp2C;
|
||||
return;
|
||||
}
|
||||
switch(this->state){
|
||||
case 1: //L8035F20C
|
||||
if (!this->unk16C_4) {
|
||||
this->unk16C_4 = TRUE;
|
||||
marker_setCollisionScripts(this->marker, func_8035F0E8, func_8035F048, func_8035EF9C);
|
||||
local->unk0 = 1;
|
||||
this->unk1C[0] = this->position[0];
|
||||
this->unk28 = 0.0f;
|
||||
this->velocity[1] = 0.0f;
|
||||
this->unk1C[2] = this->position[2];
|
||||
this->velocity[0] = this->yaw;
|
||||
}
|
||||
animctrl_setAnimTimer(this->animctrl, 0.0f);
|
||||
if (func_80329530(this, (s32) (this->scale * 650.0f)) && func_803292E0(this)) {
|
||||
func_80328A84(this, 2U);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk1C[1] = 1.0f;
|
||||
this->unk44_31 = func_8030ED2C(SFX_2C_PULLING_NOISE, 3);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: //L8035F2F4
|
||||
if (this->unk1C[1] < 1.9) {
|
||||
this->unk1C[1] += 0.1;
|
||||
}
|
||||
func_8030DBB4(this->unk44_31, this->unk1C[1]);
|
||||
if (actor_animationIsAt(this, 0.66f)) {
|
||||
FUNC_8030E8B4(SFX_F9_GRUNTLING_NOISE_1, 0.8f, 32000, this->position, 1750, 3500);
|
||||
|
||||
}
|
||||
if (0.99 <= animctrl_getAnimTimer(this->animctrl)) {
|
||||
func_8035EE80(this);
|
||||
break;
|
||||
}
|
||||
func_8035EF00(this, 7.0f);
|
||||
break;
|
||||
|
||||
case 3: //L8035F3AC
|
||||
func_8035EF3C(this);
|
||||
if (!func_80329530(this, (s32) (this->scale * 1050.0f)) || !func_803292E0(this)) {
|
||||
func_8035EEC0(this);
|
||||
break;
|
||||
}
|
||||
|
||||
func_8035EF00(this, 6.0f);
|
||||
if ((func_80329030(this, 2) == 0) && (func_80329480(this) != 0)) {
|
||||
func_8035EEC0(this);
|
||||
this->unk38_31 = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if (((this->unk28 + 0.28) <= 18.0) && ( 0.36 <= animctrl_getDuration(this->animctrl) - 0.0056000000000000008)) {
|
||||
this->unk28 += 0.28;
|
||||
animctrl_setDuration(this->animctrl, animctrl_getDuration(this->animctrl) - 0.0056000000000000008);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: //L8035F4FC
|
||||
func_8035EF3C(this);
|
||||
if (((f64)this->unk38_31 <= 0.0) && func_80329530(this, (s32) (this->scale * 1050.0f)) && func_803292E0(this)) {
|
||||
func_8035EE80(this);
|
||||
break;
|
||||
}
|
||||
this->unk38_31 -= sp2C;
|
||||
if (func_8035ED60(this)) {
|
||||
func_80328B8C(this, 5, 0.99f, 0);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk28 = 0.0f;
|
||||
this->unk1C[1] = 1.9f;
|
||||
this->unk44_31 = func_8030ED2C(SFX_2C_PULLING_NOISE, 3);
|
||||
break;
|
||||
}
|
||||
|
||||
this->yaw_ideal = (f32)(s32)func_80257204(this->position[0], this->position[2], this->unk1C[0], this->unk1C[2]);
|
||||
func_80328FB0(this, 7.0f);
|
||||
func_80329030(this, 2);
|
||||
break;
|
||||
|
||||
case 5: //L8035F6F4
|
||||
if (actor_animationIsAt(this, 0.36f) != 0) {
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
if ((this->unk44_31 != 0) && func_8030E3FC(this->unk44_31)) {
|
||||
if (this->unk1C[1] > 1.0) {
|
||||
this->unk1C[1] -= 0.1;
|
||||
}
|
||||
func_8030DBB4(this->unk44_31, this->unk1C[1]);
|
||||
}
|
||||
if (animctrl_getAnimTimer(this->animctrl) <= 0.02) {
|
||||
func_80328B8C(this, 1, 0.02f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk28 = 0.0f;
|
||||
func_8035EE48(this);
|
||||
break;
|
||||
}
|
||||
this->yaw_ideal = this->velocity[0];
|
||||
func_80328FB0(this, 7.5f);
|
||||
func_80329030(this, 2);
|
||||
break;
|
||||
|
||||
case 6: //L8035F7F0
|
||||
if (actor_animationIsAt(this, 0.64f)) {
|
||||
local->unk0 = 1;
|
||||
}
|
||||
if (0.99 <= animctrl_getAnimTimer(this->animctrl)) {
|
||||
func_8035EEC0(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: //L8035F840
|
||||
if (actor_animationIsAt(this, 0.3f)) {
|
||||
FUNC_8030E8B4(SFX_1E_HITTING_AN_ENEMY_2, 0.6f, 32000, this->position, 1750, 3500);
|
||||
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 26000, this->position, 1750, 3500);
|
||||
}
|
||||
|
||||
if( actor_animationIsAt(this, 0.5f)
|
||||
|| actor_animationIsAt(this, 0.7f)
|
||||
) {
|
||||
FUNC_8030E8B4(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 16000, this->position, 1750, 3500);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.8f)) {
|
||||
FUNC_8030E8B4(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 14000, this->position, 1750, 3500);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.9f)) {
|
||||
FUNC_8030E8B4(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 12000, this->position, 1750, 3500);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.25f)) {
|
||||
func_8035EDB0(this->position, 12, ASSET_700_SPRITE_DUST);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.5f) != 0) {
|
||||
func_80326310(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
@@ -5,28 +5,28 @@
|
||||
extern f32 func_8028EBA4();
|
||||
AnimCtrl *player_getAnimCtrlPtr(void);
|
||||
|
||||
Actor *func_802C80C0(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void func_802C811C(Actor * this);
|
||||
Actor *__chJigsawDance_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void __chJigsawDance_update(Actor * this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803662D0[] = {
|
||||
ActorAnimationInfo chJigsawDanceAnimations[] = {
|
||||
{0x00, 0.0f},
|
||||
{0x00, 2.0f},
|
||||
{0x76, 1.5f},
|
||||
{0x76, 1.5f},
|
||||
{0x30, 5.0f},
|
||||
{ASSET_76_ANIM_JIGSAWDANCE_HOLD, 1.5f},
|
||||
{ASSET_76_ANIM_JIGSAWDANCE_HOLD, 1.5f},
|
||||
{ASSET_30_ANIM_JIGSAWDANCE_DANCE, 5.0f},
|
||||
{0x00, 2.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_80366300 = {0x68, 0x5A, 0x35E,
|
||||
1, D_803662D0,
|
||||
func_802C811C, func_80326224, func_802C80C0,
|
||||
ActorInfo chJigsawDance = {MARKER_68_JIGSAW_DANCE, ACTOR_5A_JIGSAW_DANCE, ASSET_35E_MODEL_JIGSAW_DANCE,
|
||||
1, chJigsawDanceAnimations,
|
||||
__chJigsawDance_update, func_80326224, __chJigsawDance_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
|
||||
/* .code */
|
||||
Actor *func_802C80C0(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
Actor *__chJigsawDance_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
Actor *thisActor = marker_getActor(this);
|
||||
|
||||
if(!thisActor->initialized){
|
||||
@@ -38,7 +38,7 @@ Actor *func_802C80C0(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802C811C(Actor * this){
|
||||
void __chJigsawDance_update(Actor * this){
|
||||
AnimCtrl *plyrMvmt;
|
||||
|
||||
this->marker->collidable = 0;
|
||||
@@ -77,7 +77,7 @@ void func_802C811C(Actor * this){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802C82C0(Actor * this, u32 arg1){
|
||||
void chJigsawDance_setState(Actor * this, u32 arg1){
|
||||
switch(arg1){
|
||||
case 3:
|
||||
if(this->state == 1){
|
||||
|
@@ -8,51 +8,46 @@ extern void func_80329904(ActorMarker*, s32, f32*);
|
||||
extern void func_80326310(Actor *);
|
||||
extern void func_8032BB88(Actor *, s32, s32);
|
||||
|
||||
void func_802CDD78(Actor *this);
|
||||
void chJinjo_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803671B0[] = {
|
||||
ActorAnimationInfo chJinjoAnimations[] = {
|
||||
{0, 0.0f},
|
||||
{0x2D, 1000000.0f},
|
||||
{0x2D, 1.5f},
|
||||
{0x2F, 1.5f},
|
||||
{0x31, 0.75f},
|
||||
{0x2D, 1000000.0f},
|
||||
{0x31, 0.4f},
|
||||
{0x130, 1.75f},
|
||||
{0x131, 2.13333f},
|
||||
{0x31, 0.75f}
|
||||
{ASSET_2D_ANIM_JINJO_IDLE, 1000000.0f},
|
||||
{ASSET_2D_ANIM_JINJO_IDLE, 1.5f},
|
||||
{ASSET_2F_ANIM_JINJO_HELP, 1.5f},
|
||||
{ASSET_31_ANIM_JINJO_JUMP, 0.75f},
|
||||
{ASSET_2D_ANIM_JINJO_IDLE, 1000000.0f},
|
||||
{ASSET_31_ANIM_JINJO_JUMP, 0.4f},
|
||||
{ASSET_130_ANIM_JINJO_FLY_START, 1.75f},
|
||||
{ASSET_131_ANIM_JINJO_FLY_END, 2.13333f},
|
||||
{ASSET_31_ANIM_JINJO_JUMP, 0.75f}
|
||||
};
|
||||
|
||||
ActorInfo D_80367200 = { 0x5A, 0x60, 0x3C0, 0x1, D_803671B0, func_802CDD78, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80367224 = { 0x5B, 0x62, 0x3C2, 0x1, D_803671B0, func_802CDD78, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80367248 = { 0x5E, 0x5E, 0x3BB, 0x1, D_803671B0, func_802CDD78, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_8036726C = { 0x5D, 0x61, 0x3C1, 0x1, D_803671B0, func_802CDD78, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo D_80367290 = { 0x5C, 0x5F, 0x3BC, 0x1, D_803671B0, func_802CDD78, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo chJinjoBlue = { MARKER_5A_JINJO_BLUE, ACTOR_60_JINJO_BLUE, ASSET_3C0_MODEL_JINJO_BLUE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo chJinjoGreen = { MARKER_5B_JINJO_GREEN, ACTOR_62_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo chJinjoYellow = { MARKER_5E_JINJO_YELLOW, ACTOR_5E_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo chJinjoPink = { MARKER_5D_JINJO_PINK, ACTOR_61_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
ActorInfo chJinjoOrange = { MARKER_5C_JINJO_ORANGE, ACTOR_5F_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0};
|
||||
|
||||
s32 func_802CDB50(s32 arg0){
|
||||
switch(arg0){
|
||||
case 0x5A:
|
||||
return 0xD98;
|
||||
case 0x5B:
|
||||
return 0xD99;
|
||||
case 0x5C:
|
||||
return 0xD9b;
|
||||
case 0x5d:
|
||||
return 0xD9a;
|
||||
case 0x5e:
|
||||
return 0xD97;
|
||||
enum asset_e __chJinjo_getMeetDialogId(enum marker_e marker_id){
|
||||
switch(marker_id){
|
||||
case MARKER_5A_JINJO_BLUE: return ASSET_D98_DIALOG_JINJO_MEET_BLUE;
|
||||
case MARKER_5B_JINJO_GREEN: return ASSET_D99_DIALOG_JINJO_MEET_GREEN;
|
||||
case MARKER_5C_JINJO_ORANGE: return ASSET_D9B_DIALOG_JINJO_MEET_ORANGE;
|
||||
case MARKER_5D_JINJO_PINK: return ASSET_D9A_DIALOG_JINJO_MEET_PINK;
|
||||
case MARKER_5E_JINJO_YELLOW: return ASSET_D97_DIALOG_JINJO_MEET_YELLOW;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_802CDBA8(ActorMarker *this, s32 arg1){
|
||||
void __chJinjo_802CDBA8(ActorMarker *this, ActorMarker *other){
|
||||
Actor *actorPtr = marker_getActor(this);
|
||||
ActorLocal_Jinjo *localPtr = &actorPtr->jinjo;
|
||||
|
||||
if(actorPtr->state < 5){
|
||||
if(!func_8031FF1C(BKPROG_E_JINJO_TEXT)){
|
||||
func_80311480(func_802CDB50(actorPtr->marker->unk14_20), 4, 0, 0, 0, 0);
|
||||
func_80311480(__chJinjo_getMeetDialogId(actorPtr->marker->unk14_20), 4, 0, 0, 0, 0);
|
||||
func_80320004(BKPROG_E_JINJO_TEXT, 1);
|
||||
}
|
||||
func_80328B8C(actorPtr, 6, 0.0f , -1);
|
||||
@@ -63,7 +58,7 @@ void func_802CDBA8(ActorMarker *this, s32 arg1){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802CDC9C(Actor *this, s16 arg1){
|
||||
void __chJinjo_802CDC9C(Actor *this, s16 arg1){
|
||||
f32 tmpf;
|
||||
|
||||
tmpf = this->yaw;
|
||||
@@ -77,7 +72,7 @@ void func_802CDC9C(Actor *this, s16 arg1){
|
||||
this->yaw = tmpf;
|
||||
}
|
||||
|
||||
void func_802CDD3C(Actor * this){
|
||||
void __chJinjo_802CDD3C(Actor * this){
|
||||
ActorLocal_Jinjo *localPtr = &this->jinjo;
|
||||
if(localPtr->unkC != 0){
|
||||
func_802F9D38(localPtr->unkC);
|
||||
@@ -85,7 +80,7 @@ void func_802CDD3C(Actor * this){
|
||||
}
|
||||
}
|
||||
|
||||
void func_802CDD78(Actor * this){
|
||||
void chJinjo_update(Actor * this){
|
||||
f32 sp7C[3];
|
||||
f32 sp70[3];
|
||||
f32 sp6C;
|
||||
@@ -114,8 +109,8 @@ void func_802CDD78(Actor * this){
|
||||
local->unk0 = 1;
|
||||
local->unk4 = 0;
|
||||
local->unk8 = (this->position_y < func_80309B24(this->position));
|
||||
this->marker->unkC = func_802CDBA8;
|
||||
marker_setFreeMethod(this->marker, func_802CDD3C);
|
||||
this->marker->unkC = __chJinjo_802CDBA8;
|
||||
marker_setFreeMethod(this->marker, __chJinjo_802CDD3C);
|
||||
if(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
@@ -168,7 +163,7 @@ void func_802CDD78(Actor * this){
|
||||
}//L802CE018
|
||||
break;
|
||||
case 6:/* 47094 802CE024 02002025 */
|
||||
func_802CDC9C(this, sp66);
|
||||
__chJinjo_802CDC9C(this, sp66);
|
||||
if(actor_animationIsAt(this, 0.0f) && --(local->unk0) == 0){
|
||||
func_80328B8C(this, 7, 0.0f, -1);
|
||||
actor_playAnimationOnce(this);
|
||||
@@ -221,7 +216,7 @@ void func_802CDD78(Actor * this){
|
||||
|
||||
if(sp50){
|
||||
if(animctrl_getAnimTimer(this->animctrl) < 0.2)
|
||||
func_802CDC9C(this, sp66);
|
||||
__chJinjo_802CDC9C(this, sp66);
|
||||
|
||||
if(actor_animationIsAt(this, 0.1f)){
|
||||
local->unkC = func_802F9AA8(SFX_18_BIGBUTT_SLIDE);
|
||||
@@ -286,8 +281,8 @@ void func_802CDD78(Actor * this){
|
||||
actor_playAnimationOnce(this);
|
||||
}//L802CE630
|
||||
if(!func_803114B0()){
|
||||
switch(D_803671B0[this->state].index){
|
||||
case 0x31:
|
||||
switch(chJinjoAnimations[this->state].index){
|
||||
case ASSET_31_ANIM_JINJO_JUMP:
|
||||
if(actor_animationIsAt(this, 0.6f)){
|
||||
if(local->unk8){
|
||||
func_8030E988(SFX_8_BANJO_LANDING_04, 1.8f, 18000, sp30, 120.0f, 1200.0f);
|
||||
@@ -296,7 +291,7 @@ void func_802CDD78(Actor * this){
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x2D: //L802CE6F4
|
||||
case ASSET_2D_ANIM_JINJO_IDLE: //L802CE6F4
|
||||
if(actor_animationIsAt(this, 0.2f)){
|
||||
if(local->unk8){
|
||||
func_8030E988(SFX_17_JINJO_WHISTLE, 1.0f, 22000, sp30, 120.0f, 1200.0f);
|
||||
@@ -305,7 +300,7 @@ void func_802CDD78(Actor * this){
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x2F: //L802CE760
|
||||
case ASSET_2F_ANIM_JINJO_HELP: //L802CE760
|
||||
if(actor_animationIsAt(this, 0.2f)){
|
||||
if(local->unk8){
|
||||
func_8030E988(SFX_27_JINJO_HI, 1.0f, 22000, sp30, 120.0f, 1200.0f);
|
||||
|
@@ -7,10 +7,10 @@ Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_802D9830(ActorMarker *marker, enum asset_e arg1, s32 arg2);
|
||||
|
||||
typedef struct{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s8 unk4;
|
||||
s8 unk5;
|
||||
s16 learn_text;
|
||||
s16 refresher_text;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} struct_core2_52290;
|
||||
|
||||
/* .data */
|
||||
@@ -31,16 +31,16 @@ ActorInfo D_80367DA0= {
|
||||
};
|
||||
|
||||
struct_core2_52290 D_80367DC4[] = {
|
||||
{0x0C23, 0x0C24, 0x0F, ABILITY_1_BEAK_BOMB},
|
||||
{0x0B47, 0x0B4B, 0x16, ABILITY_6_EGGS},
|
||||
{0x0B48, 0x0B4C, 0x17, ABILITY_2_BEAK_BUSTER},
|
||||
{0x0B49, 0x0B4A, 0x18, ABILITY_10_TALON_TROT},
|
||||
{0x0A1F, 0x0A23, 0x0C, ABILITY_D_SHOCK_JUMP},
|
||||
{0x0A20, 0x0A22, 0x0D, ABILITY_9_FLY},
|
||||
{0x0D35, 0x0D36, 0x01, ABILITY_12_WONDERWING},
|
||||
{0x0C88, 0x0C89, 0x10, ABILITY_E_WADING_BOOTS},
|
||||
{0x0A84, 0x0A85, 0x19, ABILITY_11_TURBO_TALON},
|
||||
{0x0F64, 0x0F65, 0x0E, ABILITY_13_1ST_NOTEDOOR}
|
||||
{ASSET_C23_DIALOG_BEAKBOMB_LEARN, ASSET_C24_DIALOG_BEAKBOMB_REFRESHER, 0x0F, ABILITY_1_BEAK_BOMB},
|
||||
{ASSET_B47_DIALOG_EGGS_LEARN, ASSET_B4B_DIALOG_EGGS_REFRESHER, 0x16, ABILITY_6_EGGS},
|
||||
{ASSET_B48_DIALOG_BEAKBUSTER_LEARN, ASSET_B4C_DIALOG_BEAKBUSTER_REFRESHER, 0x17, ABILITY_2_BEAK_BUSTER},
|
||||
{ASSET_B49_DIALOG_TALON_TROT_LEARN, ASSET_B4A_DIALOG_TALON_TROT_REFRESHER, 0x18, ABILITY_10_TALON_TROT},
|
||||
{ASSET_A1F_DIALOG_SHOCKJUMP_LEARN, ASSET_A23_DIALOG_SHOCKJUMP_REFRESHER, 0x0C, ABILITY_D_SHOCK_JUMP},
|
||||
{ASSET_A20_DIALOG_FLY_LEARN, ASSET_A22_DIALOG_FLY_REFRESHER, 0x0D, ABILITY_9_FLY},
|
||||
{ASSET_D35_DIALOG_WONDERWING_LEARN, ASSET_D36_DIALOG_WONDERWING_REFRESHER, 0x01, ABILITY_12_WONDERWING},
|
||||
{ASSET_C88_DIALOG_LONGLEG_LEARN, ASSET_C89_DIALOG_LONGLEG_REFRESHER, 0x10, ABILITY_E_WADING_BOOTS},
|
||||
{ASSET_A84_DIALOG_TURBOTRAINERS_LEARN, ASSET_A85_DIALOG_TURBOTRAINERS_REFRESHER, 0x19, ABILITY_11_TURBO_TALON},
|
||||
{ASSET_F64_DIALOG_NOTEDOORS_LEARN, ASSET_F65_DIALOG_NOTEDOORS_REFRESHER, 0x0E, ABILITY_13_1ST_NOTEDOOR}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
@@ -136,18 +136,18 @@ void func_802D9600(Actor * this){
|
||||
}
|
||||
|
||||
void func_802D9658(Actor *this){
|
||||
timed_setCameraToNode(0.0f, D_80367DC4[this->unkF4_8-9].unk4);
|
||||
timed_setCameraToNode(0.0f, D_80367DC4[this->unkF4_8-9].camera_node);
|
||||
}
|
||||
|
||||
void func_802D9698(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
if( arg1 == D_80367DC4[actor->unkF4_8-9].unk0
|
||||
if( arg1 == D_80367DC4[actor->unkF4_8-9].learn_text
|
||||
&& item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)
|
||||
){
|
||||
func_80311480(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, func_802D9698, func_802D9830);
|
||||
}//L802D9738
|
||||
else if(arg1 == D_80367DC4[actor->unkF4_8-9].unk0 || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
|
||||
else if(arg1 == D_80367DC4[actor->unkF4_8-9].learn_text || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
|
||||
func_80311480(func_802D93EC()? 0xa87 : func_802D9304(), 7, 0, actor->marker, func_802D9698, NULL);
|
||||
}
|
||||
else{//L802D97BC
|
||||
@@ -206,16 +206,16 @@ void func_802D9830(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
int func_802D997C(Actor *this){
|
||||
s32 sp2C;
|
||||
s32 sp28 = 0xe;
|
||||
if(ability_isUnlocked(D_80367DC4[this->unkF4_8-9].unk5)){
|
||||
if(ability_isUnlocked(D_80367DC4[this->unkF4_8-9].ability)){
|
||||
sp28 = 0xf;
|
||||
sp2C = D_80367DC4[this->unkF4_8-9].unk2;
|
||||
sp2C = D_80367DC4[this->unkF4_8-9].refresher_text;
|
||||
}//L802D99EC
|
||||
else{
|
||||
func_80347A14(0);
|
||||
this->unk138_24 = 1;
|
||||
sp2C = D_80367DC4[this->unkF4_8-9].unk0;
|
||||
ability_unlock(D_80367DC4[this->unkF4_8-9].unk5);
|
||||
switch(D_80367DC4[this->unkF4_8-9].unk5){
|
||||
sp2C = D_80367DC4[this->unkF4_8-9].learn_text;
|
||||
ability_unlock(D_80367DC4[this->unkF4_8-9].ability);
|
||||
switch(D_80367DC4[this->unkF4_8-9].ability){
|
||||
case ABILITY_9_FLY:
|
||||
case ABILITY_D_SHOCK_JUMP:
|
||||
func_8030E6A4(SFX_113_PAD_APPEARS, 0.9f, 32000);
|
||||
@@ -276,7 +276,7 @@ void func_802D9C90(Actor *this){
|
||||
}
|
||||
|
||||
void func_802D9CBC(Actor *this){
|
||||
if(ability_isUnlocked(D_80367DC4[this->unkF4_8 - 9].unk5)){
|
||||
if(ability_isUnlocked(D_80367DC4[this->unkF4_8 - 9].ability)){
|
||||
func_802D9BD8(this);
|
||||
}
|
||||
else{
|
||||
@@ -350,7 +350,7 @@ void func_802D9D60(Actor *this){
|
||||
func_80328FB0(this, 4.0f);
|
||||
if(func_8028F20C() && func_8028F0D4() && !func_8028EC04()){
|
||||
if( this->unkF4_8 == 0x12
|
||||
&& !ability_isUnlocked(D_80367DC4[this->unkF4_8-9].unk5)
|
||||
&& !ability_isUnlocked(D_80367DC4[this->unkF4_8-9].ability)
|
||||
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
|
||||
){
|
||||
player_getPosition(sp34);
|
||||
|
199
src/core2/ch/shrapnel.c
Normal file
199
src/core2/ch/shrapnel.c
Normal file
@@ -0,0 +1,199 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
#define ABS(s) (((s) >= 0) ? (s) : -(s))
|
||||
|
||||
extern f32 func_80309B24(f32[3]);
|
||||
|
||||
/* .h */
|
||||
void chshrapnel_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chShrapnelAnimations[] = {
|
||||
{0, 0.0f},
|
||||
{ASSET_1F4_ANIM_SHRAPNEL_IDLE, 1.0f},
|
||||
{ASSET_1F4_ANIM_SHRAPNEL_IDLE, 1.0f},
|
||||
{ASSET_92_ANIM_SHRAPNEL_MOVE, 0.75f},
|
||||
{ASSET_92_ANIM_SHRAPNEL_MOVE, 0.75f},
|
||||
{ASSET_1F4_ANIM_SHRAPNEL_IDLE, 1.0f},
|
||||
{ASSET_1F4_ANIM_SHRAPNEL_IDLE, 1.0f}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* .code */
|
||||
void chShrapnel_func_802D0A00(Actor *this) {
|
||||
this->unk28 = randf2(1.5f, 2.3f);
|
||||
}
|
||||
|
||||
void chShrapnel_func_802D0A38(Actor *this){
|
||||
if(this->unk38_31 != 0){
|
||||
this->unk38_31--;
|
||||
}
|
||||
else{
|
||||
if(func_80329530(this, 600) && func_803292E0(this)){
|
||||
this->unk28 = 0.0f;
|
||||
func_80328B8C(this, 2, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void chShrapnel_func_802D0AB8(Actor *this) {
|
||||
func_80328B8C(this, 1, 0.0f, 0);
|
||||
chShrapnel_func_802D0A00(this);
|
||||
func_80328CEC(this, (s32) this->yaw_ideal, 0x87, 0xAF);
|
||||
this->unk38_31 = 0x1E;
|
||||
}
|
||||
|
||||
void chShrapnel_spawnExplodeActor(s32 arg0){
|
||||
Actor *this = reinterpret_cast(Actor *, arg0);
|
||||
func_8032813C(0xF3, this->unk1C, 0);
|
||||
}
|
||||
|
||||
void chShrapnel_emitExplosion(Actor *this) {
|
||||
ParticleEmitter *temp_v0;
|
||||
|
||||
func_802BB3DC(0, 60.0f, 0.9f);
|
||||
temp_v0 = partEmitMgr_newEmitter(1U);
|
||||
particleEmitter_setSprite(temp_v0, ASSET_4A0_SPRITE_EXPLOSION);
|
||||
particleEmitter_setFade(temp_v0, 0.1f, 0.2f);
|
||||
particleEmitter_setDrawMode(temp_v0, PART_EMIT_NO_LOOP);
|
||||
particleEmitter_setStartingFrameRange(temp_v0, 0, 0);
|
||||
particleEmitter_setParticleFramerateRange(temp_v0, 4.0f, 4.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(temp_v0, 0.0f, 200.0f, 0.0f, 0.0f, 200.0f, 0.0f);
|
||||
particleEmitter_setPosition(temp_v0, this->position);
|
||||
func_802EFB70(temp_v0, 3.0f, 3.0f);
|
||||
func_802EFB84(temp_v0, 8.0f, 8.0f);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_v0, 0.5f, 0.5f);
|
||||
particleEmitter_setParticleVelocityRange(temp_v0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_emitN(temp_v0, 1);
|
||||
}
|
||||
|
||||
void chShrapnel_emitSmoke(Actor *this) {
|
||||
static s32 D_803673F8[3] = {0xDE, 0xA7, 0x71};
|
||||
ParticleEmitter *temp_v0;
|
||||
|
||||
temp_v0 = partEmitMgr_newEmitter(6U);
|
||||
particleEmitter_setSprite(temp_v0, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setFade(temp_v0, 0.05f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(temp_v0, 0, 7);
|
||||
particleEmitter_setPosition(temp_v0, this->position);
|
||||
func_802EFB70(temp_v0, 1.0f, 1.5f);
|
||||
func_802EFB84(temp_v0, 2.0f, 3.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(temp_v0, -75.0f, 25.0f, -75.0f, 75.0f, 75.0f, 75.0f);
|
||||
particleEmitter_setParticleVelocityRange(temp_v0, -70.0f, 50.0f, -70.0f, 70.0f, 100.0f, 70.0f);
|
||||
particleEmitter_setRGB(temp_v0, &D_803673F8);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_v0, 3.0f, 4.0f);
|
||||
particleEmitter_emitN(temp_v0, 6);
|
||||
}
|
||||
|
||||
void chShrapnel_emitBodyParts(Actor *this, enum model_e model_id, s32 n) {
|
||||
ParticleEmitter *temp_v0;
|
||||
|
||||
temp_v0 = partEmitMgr_newEmitter(n);
|
||||
particleEmitter_setParticleAccelerationRange(temp_v0, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f);
|
||||
func_802EF9F8(temp_v0, 0.6f);
|
||||
func_802EFA18(temp_v0, 1);
|
||||
particleEmitter_setModel(temp_v0, model_id);
|
||||
particleEmitter_setPosition(temp_v0, this->position);
|
||||
func_802EFB70(temp_v0, 0.05f, 2.0f);
|
||||
particleEmitter_setAngularVelocityRange(temp_v0, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setSpawnIntervalRange(temp_v0, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(temp_v0, 10.0f, 10.0f);
|
||||
particleEmitter_setParticleVelocityRange(temp_v0, -500.0f, 400.0f, -500.0f, 500.0f, 800.0f, 500.0f);
|
||||
particleEmitter_emitN(temp_v0, n);
|
||||
}
|
||||
|
||||
void chShrapnel_explode(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32736, this->position, 1250, 2500);
|
||||
__spawnQueue_add_1((GenMethod_1)chShrapnel_spawnExplodeActor, reinterpret_cast(s32, this));
|
||||
chShrapnel_emitExplosion(this);
|
||||
chShrapnel_emitSmoke(this);
|
||||
chShrapnel_emitBodyParts(this, ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE, 2);
|
||||
chShrapnel_emitBodyParts(this, ASSET_53B_MODEL_SHRAPNAL_PIECE_SPIKE, 8);
|
||||
chShrapnel_emitBodyParts(this, ASSET_53C_MODEL_SHRAPNAL_PIECE_PLATE, 8);
|
||||
marker_despawn(marker);
|
||||
}
|
||||
|
||||
void chShrapnel_func_802D0FC8(Actor *this) {
|
||||
this->unk4C += time_getDelta();
|
||||
if (MAX(0.25, (12.0 - this->unk28) / 12.0) < this->unk4C) {
|
||||
*(s32 *)(&this->local) = NOT(*(s32 *)(&this->local));
|
||||
this->unk4C = 0.0f;
|
||||
if (*(s32 *)(&this->local)) {
|
||||
FUNC_8030E8B4(SFX_2A_CLOCK_TIC_1, 0.5f, 12000, this->position, 1250, 2500);
|
||||
}
|
||||
else{
|
||||
FUNC_8030E8B4(SFX_51_CLOCK_TIC_2, 0.5f, 12000, this->position, 1250, 2500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void chshrapnel_update(Actor *this) {
|
||||
f32 tick;
|
||||
f32 player_position[3];
|
||||
|
||||
tick = time_getDelta();
|
||||
if (!this->initialized) {
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, chShrapnel_explode);
|
||||
this->unk138_25 = TRUE;
|
||||
this->initialized = TRUE;
|
||||
this->unk4C = 0.0f;
|
||||
}
|
||||
chShrapnel_func_802D0FC8(this);
|
||||
this->unk60 += tick;
|
||||
if (M_PI <= this->unk60) {
|
||||
this->unk60 -= M_PI;
|
||||
}
|
||||
this->unk1C[0] = this->position[0];
|
||||
this->unk1C[1] = this->position[1];
|
||||
this->unk1C[2] = this->position[2];
|
||||
this->unk1C[1] = func_80309B24(this->position) - 15.0f;
|
||||
this->position[1] = this->unk1C[1] - (sinf(this->unk60 * 4.0f) * 10.0f);
|
||||
_player_getPosition(player_position);
|
||||
switch (this->state) {
|
||||
case 1:
|
||||
chShrapnel_func_802D0A38(this);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if (func_80329480(this)) {
|
||||
if (250.0 > ABS(player_position[1] - this->unk1C[1])) {
|
||||
func_80328A84(this, 3);
|
||||
actor_loopAnimation(this);
|
||||
FUNC_8030E8B4(SFX_C4_TWINKLY_MUNCHER_GRR, 0.6f, 32750, this->position, 1250, 2500);
|
||||
this->unk28 = 4.0f;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, this->unk28 / 2);
|
||||
this->unk28 = MIN( 50.0, (this->unk28 + tick));
|
||||
if ((250.0 <= ABS(player_position[1] - this->unk1C[1])) || !func_80329054(this, 0)) {
|
||||
chShrapnel_func_802D0AB8(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (animctrl_isStopped(this->animctrl) != 0) {
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
ActorInfo chShrapnelDescription = {
|
||||
MARKER_65_SHRAPNEL, ACTOR_56_SHRAPNEL, ASSET_3EC_MODEL_SHRAPNEL,
|
||||
0x1, chShrapnelAnimations,
|
||||
chshrapnel_update, func_80326224, func_80325888,
|
||||
2500, 0x333, 0.0f, 0
|
||||
};
|
242
src/core2/ch/termite.c
Normal file
242
src/core2/ch/termite.c
Normal file
@@ -0,0 +1,242 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
bool func_8034A6FC(f32, f32);
|
||||
void chTermite_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chTermiteAnimations[] ={
|
||||
{0, 0.0f},
|
||||
{ASSET_5E_ANIM_BSANT_IDLE, 1.2f},
|
||||
{ASSET_5F_ANIM_BSANT_WALK, 0.7f},
|
||||
{ASSET_5E_ANIM_BSANT_IDLE, 1.2f},
|
||||
{ASSET_5F_ANIM_BSANT_WALK, 0.7f},
|
||||
{0, 0.0f},
|
||||
{ASSET_256_ANIM_TERMITE_OW, 0.7f},
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chTermite_updateRandomSpeed(Actor *this) {
|
||||
this->velocity[0] = randf2(5.0f, 12.0f);
|
||||
}
|
||||
|
||||
void __chTermite_updateAnimationSpeed(Actor *this) {
|
||||
if ((this->velocity[0] - 0.1 <= this->unk28) && (this->unk28 <= this->velocity[0] + 0.1)) {
|
||||
this->unk28 = this->velocity[0];
|
||||
} else {
|
||||
this->unk28 += (this->velocity[0] < this->unk28)? -0.2 : 0.2;
|
||||
}
|
||||
animctrl_setDuration(this->animctrl, ml_map_f(this->unk28, 5.0f, 12.0f, 0.54f, 0.36f));
|
||||
}
|
||||
|
||||
void __chTermite_updateRandomRotationSpeed(Actor *this) {
|
||||
this->velocity[1] = ((2*randf() * 3.1) - 3.1);
|
||||
this->velocity[1] += (this->velocity[1] >= 0.0f) ? 3.1 : -3.1;
|
||||
}
|
||||
|
||||
void __chTermite_updateYaw(Actor *this) {
|
||||
s32 temp_f10;
|
||||
s32 phi_v1;
|
||||
|
||||
temp_f10 = (s32) (this->velocity[1] + this->yaw);
|
||||
if (temp_f10 >= 360) {
|
||||
this->yaw = (f32) (temp_f10 - 360);
|
||||
return;
|
||||
}
|
||||
phi_v1 = (temp_f10 < 0) ? temp_f10 + 360 : temp_f10;
|
||||
this->yaw = (f32) phi_v1;
|
||||
}
|
||||
|
||||
void __chTermite_updateWalkSFX(Actor *this) {
|
||||
f32 sp24[3];
|
||||
f32 sp20;
|
||||
|
||||
func_8024C5CC(&sp24);
|
||||
sp20 = ml_map_f( (300.0f - sp24[0])*(300.0f - sp24[0]) + (this->position[1] - sp24[1])*(this->position[1] - sp24[1]) + (-858.0f - sp24[2])*(-858.0f - sp24[2])
|
||||
, 7617600.0f, 8236900.0f
|
||||
, 8000.0f, 1000.0f
|
||||
);
|
||||
if (actor_animationIsAt(this, 0.4f)) {
|
||||
func_8030E6A4(SFX_3D_TICKER_WALKING, 0.85f, (s32) sp20);
|
||||
}
|
||||
if (actor_animationIsAt(this, 0.9f)) {
|
||||
func_8030E6A4(SFX_3D_TICKER_WALKING, 1.15f, (s32) sp20);
|
||||
}
|
||||
}
|
||||
|
||||
void __chTermite_setupParticleEmitter(ParticleEmitter *pCtrl, f32 position[3]){
|
||||
particleEmitter_setPosition(pCtrl, position);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
func_802EF9F8(pCtrl, 0.7f);
|
||||
func_802EFA18(pCtrl, 5);
|
||||
func_802EFA20(pCtrl, 0.8f, 1.0f);
|
||||
particleEmitter_setSfx(pCtrl, SFX_1F_HITTING_AN_ENEMY_3, 10000);
|
||||
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.01f);
|
||||
particleEmitter_setParticleLifeTimeRange(pCtrl, 3.5f, 3.5f);
|
||||
particleEmitter_setFade(pCtrl, 0.0f, 0.65f);
|
||||
}
|
||||
|
||||
void __chTermite_emitLegs(ParticleEmitter *pCtrl, f32 position[3]){
|
||||
__chTermite_setupParticleEmitter(pCtrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(pCtrl, ASSET_393_MODEL_TERMITE_LEG);
|
||||
func_802EFB70(pCtrl, 0.5f, 0.8f);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -800.0f, -800.0f, -800.0f, 800.0f, 800.0f, 800.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -200.0f, 850.0f, -200.0f, 400.0f, 1000.0f, 400.0f);
|
||||
particleEmitter_emitN(pCtrl, 6);
|
||||
}
|
||||
|
||||
void __chTermite_emitHead(ParticleEmitter *pCtrl, f32 position[3]){
|
||||
__chTermite_setupParticleEmitter(pCtrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(pCtrl, ASSET_394_MODEL_TERMITE_HEAD);
|
||||
func_802EFB70(pCtrl, 1.0f, 1.0f);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -50.0f, 750.0f, -50.0f, 120.0f, 900.0f, 120.0f);
|
||||
particleEmitter_emitN(pCtrl, 1);
|
||||
}
|
||||
|
||||
void __chTermite_emitBody(ParticleEmitter *pCtrl, f32 position[3]){
|
||||
__chTermite_setupParticleEmitter(pCtrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -1800.0f, 0.0f, 0.0f, -1800.0f, 0.0f);
|
||||
particleEmitter_setModel(pCtrl, ASSET_395_MODEL_TERMITE_BODY);
|
||||
func_802EFB70(pCtrl, 1.0f, 1.0f);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -50.0f, 750.0f, -50.0f, 120.0f, 900.0f, 120.0f);
|
||||
particleEmitter_emitN(pCtrl, 1);
|
||||
}
|
||||
|
||||
void __chTermite_emitEyes(ParticleEmitter *pCtrl, f32 position[3]){
|
||||
__chTermite_setupParticleEmitter(pCtrl, position);
|
||||
particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -1400.0f, 0.0f, 0.0f, -1400.0f, 0.0f);
|
||||
particleEmitter_setModel(pCtrl, ASSET_396_MODEL_TERMITE_EYES);
|
||||
func_802EFB70(pCtrl, 1.0f, 1.0f);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setParticleVelocityRange(pCtrl, -80.0f, 400.0f, -80.0f, 160.0f, 860.0f, 160.0f);
|
||||
particleEmitter_emitN(pCtrl, 2);
|
||||
}
|
||||
|
||||
void __chTermite_ow(ActorMarker *marker, ActorMarker *other_marker){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
func_80328AC8(this, 6);
|
||||
}
|
||||
|
||||
void __chTermite_die(ActorMarker *marker, ActorMarker *other_marker){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
__chTermite_emitLegs(partEmitMgr_newEmitter(6), this->position);
|
||||
__chTermite_emitHead(partEmitMgr_newEmitter(1), this->position);
|
||||
__chTermite_emitBody(partEmitMgr_newEmitter(1), this->position);
|
||||
__chTermite_emitEyes(partEmitMgr_newEmitter(2), this->position);
|
||||
marker->collidable = FALSE;
|
||||
this->unk138_27 = 1;
|
||||
FUNC_8030E624(SFX_D1_SNORKEL_WAH, 1.4f, 32750);
|
||||
marker_despawn(marker);
|
||||
}
|
||||
void __chTermite_testCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(caller);
|
||||
this->unk138_24 = FALSE;
|
||||
levelSpecificFlags_set(0xd, FALSE);
|
||||
}
|
||||
|
||||
void chTermite_update(Actor *this) {
|
||||
s32 sp34;
|
||||
static s32 D_80372F48 = 0;
|
||||
static s32 D_80372F4C = 0;
|
||||
|
||||
sp34 = func_8023DB5C();
|
||||
if (!this->unk16C_4) {
|
||||
marker_setCollisionScripts(this->marker, NULL, __chTermite_ow, __chTermite_die);
|
||||
this->unk124_0 = this->unk138_31 = FALSE;
|
||||
this->unk138_24 = FALSE;
|
||||
this->unk16C_0 = TRUE;
|
||||
this->unk16C_4 = TRUE;
|
||||
}
|
||||
if( map_get() == MAP_C_MM_TICKERS_TOWER
|
||||
&& !mapSpecificFlags_get(0)
|
||||
&& func_80329530(this, 700)
|
||||
&& !func_80329530(this, 150)
|
||||
&& func_8028ECAC() == 0
|
||||
&& player_getTransformation() == TRANSFORM_1_BANJO
|
||||
) {
|
||||
func_80311480(ASSET_B43_DIALOG_TERMITE_MEET_AS_BEAR, 7, this->position, this->marker, __chTermite_testCallback, NULL);
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
levelSpecificFlags_set(0xD, TRUE);
|
||||
this->unk138_24 = TRUE;
|
||||
}
|
||||
|
||||
if( func_80329530(this, 300)
|
||||
&& !func_80329530(this, 150)
|
||||
&& func_8028ECAC() == 0
|
||||
&& player_getTransformation() == TRANSFORM_2_TERMITE
|
||||
) {
|
||||
if (!levelSpecificFlags_get(0xB)) {
|
||||
if (func_80311480(ASSET_B41_DIALOG_TERMITE_COOL_SHORTS, 0, NULL, NULL, NULL, NULL)) {
|
||||
levelSpecificFlags_set(0xB, TRUE);
|
||||
this->unk138_23 = TRUE;
|
||||
}
|
||||
} else if (!levelSpecificFlags_get(0xC) && !this->unk138_23 && (func_80311480(ASSET_B42_DIALOG_TERMITE_COOL_BACKPACK, 0, NULL, NULL, NULL, NULL))) {
|
||||
levelSpecificFlags_set(0xC, TRUE);
|
||||
}
|
||||
}
|
||||
switch (this->state) {
|
||||
case 1:
|
||||
if (func_80328BD4(this, 2, 0.0f, 1, 0.06f)) {
|
||||
__chTermite_updateRandomRotationSpeed(this);
|
||||
__chTermite_updateRandomSpeed(this);
|
||||
this->unk28 = 0.0f;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
case 2:
|
||||
if (sp34 != D_80372F48) {
|
||||
D_80372F48 = sp34;
|
||||
D_80372F4C = 1;
|
||||
__chTermite_updateWalkSFX(this);
|
||||
} else if (D_80372F4C != 0) {
|
||||
D_80372F4C--;
|
||||
__chTermite_updateWalkSFX(this);
|
||||
}
|
||||
if (this->unk38_31 != 0) {
|
||||
this->unk38_31--;
|
||||
} else {
|
||||
__chTermite_updateYaw(this);
|
||||
if ((sp34 & 0x1F) == 0xE && 0.45 < randf()) {
|
||||
__chTermite_updateRandomRotationSpeed(this);
|
||||
}
|
||||
if (func_8034A6FC(0.73f, 0.76f) && func_80329078(this, (s32) this->yaw, 750) ) {
|
||||
this->yaw_ideal = this->yaw;
|
||||
this->velocity[0] = 35.0f;
|
||||
this->unk28 = 19.4444447f;
|
||||
this->unk38_31 = 0x3A;
|
||||
}
|
||||
if ((sp34 & 0x1F) == 3 && 0.58 < (f64) randf()) {
|
||||
__chTermite_updateRandomSpeed(this);
|
||||
}
|
||||
}
|
||||
__chTermite_updateAnimationSpeed(this);
|
||||
func_80329030(this, 0);
|
||||
func_80328BD4(this, 1, 0.0f, 1, 0.047f);
|
||||
return;
|
||||
case 6:
|
||||
if (actor_animationIsAt(this, 0.95f) != 0) {
|
||||
func_80328AC8(this, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// this data struct is at the end of the file so the local static vars
|
||||
// in chTermite_update are in correct .data location
|
||||
ActorInfo chTermite = {
|
||||
MARKER_4_TERMITE, ACTOR_5_TERMITE, ASSET_350_MODEL_TERMITE,
|
||||
0x1, chTermiteAnimations,
|
||||
chTermite_update, func_80326224, func_80325888,
|
||||
2000, 0, 0.0f, 0
|
||||
};
|
@@ -2,20 +2,23 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/statetimer.h"
|
||||
extern f32 player_stateTimer_get(enum state_timer_e);
|
||||
|
||||
Actor *chtrainers_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void chtrainers_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80366EA0[] = {
|
||||
ActorAnimationInfo chTrainersAnimations[] = {
|
||||
{ASSET_D6_ANIM_TURBO_TALON_TRAINERS, 1.5f},
|
||||
{ASSET_D6_ANIM_TURBO_TALON_TRAINERS, 1.5f},
|
||||
{ASSET_D6_ANIM_TURBO_TALON_TRAINERS, 1.5f},
|
||||
{ASSET_D6_ANIM_TURBO_TALON_TRAINERS, 1.5f}
|
||||
};
|
||||
|
||||
ActorInfo D_80366EC0 = {
|
||||
ActorInfo chTrainers = {
|
||||
MARKER_38_TURBO_TALON_TRAINERS, ACTOR_2C_TURBO_TALON_TRAINERS, ASSET_367_MODEL_TURBO_TALON_TRAINERS,
|
||||
0x0, D_80366EA0,
|
||||
0x0, chTrainersAnimations,
|
||||
chtrainers_update, func_80326224, chtrainers_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
@@ -94,7 +97,7 @@ void chtrainers_update(Actor *this){
|
||||
break;
|
||||
|
||||
case 2://L802CA670
|
||||
if(func_8028E80C(3) == 0.0f){
|
||||
if(player_stateTimer_get(STATE_TIMER_3_TURBO_TALON) == 0.0f){
|
||||
this->velocity[2] = 1.0f;
|
||||
func_80328A84(this, 3);
|
||||
}
|
||||
|
@@ -2,15 +2,18 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "core2/statetimer.h"
|
||||
extern f32 player_stateTimer_get(enum state_timer_e);
|
||||
|
||||
Actor *chwadingboots_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void chwadingboots_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_80367A00[] = {
|
||||
{0x67, 0.7f},
|
||||
{0x67, 0.7f},
|
||||
{0x67, 0.7f},
|
||||
{0x67, 0.7f},
|
||||
{ASSET_67_ANIM_WADINGBOOTS_WALK, 0.7f},
|
||||
{ASSET_67_ANIM_WADINGBOOTS_WALK, 0.7f},
|
||||
{ASSET_67_ANIM_WADINGBOOTS_WALK, 0.7f},
|
||||
{ASSET_67_ANIM_WADINGBOOTS_WALK, 0.7f},
|
||||
};
|
||||
|
||||
ActorInfo D_80367A20 = {
|
||||
@@ -63,10 +66,10 @@ void chwadingboots_update(Actor *this){
|
||||
}
|
||||
|
||||
if(func_803203FC(0x10)) break;
|
||||
if(!func_80329530(this, 0xfa)) break;
|
||||
if(!func_80329530(this, 250)) break;
|
||||
if(player_getTransformation() != TRANSFORM_1_BANJO) break;
|
||||
|
||||
if(func_80311480(0xda5, 0, NULL, NULL, NULL, NULL)){
|
||||
if(func_80311480(ASSET_DA5_DIALOG_WADINGBOOTS_MEET, 0, NULL, NULL, NULL, NULL)){
|
||||
func_803204E4(0x10, TRUE);
|
||||
}
|
||||
|
||||
@@ -80,7 +83,7 @@ void chwadingboots_update(Actor *this){
|
||||
break;
|
||||
|
||||
case 2://L802D6D74
|
||||
if(func_8028E80C(2) == 0.0f){
|
||||
if(player_stateTimer_get(STATE_TIMER_2_LONGLEG) == 0.0f){
|
||||
this->velocity[1] = 1.5f;
|
||||
func_80328A84(this, 3);
|
||||
}
|
||||
|
Reference in New Issue
Block a user