label RBB files
This commit is contained in:
@@ -3,19 +3,17 @@
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void func_8038C0FC(Actor *this, s32 new_state);
|
||||
void __chAnchorCtrl_setState(Actor *this, s32 new_state);
|
||||
|
||||
void func_8038C204(Actor *this);
|
||||
void chAnchorCtrl_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo RBB_D_80390B10 = {
|
||||
0x199, 0x1CB, 0x0, 0x0, NULL,
|
||||
func_8038C204, NULL, func_80325340,
|
||||
chAnchorCtrl_update, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
f32 D_80390B34[3] = {-5100.0f, -2550.0f, 1470.0f};
|
||||
|
||||
/* .code */
|
||||
void func_8038C000(void){
|
||||
s32 sp1C = func_802F9AA8(SFX_7D_ANCHOR_LIFTING);
|
||||
@@ -29,34 +27,36 @@ void func_8038C058(void){
|
||||
func_8030E760(SFX_7F_HEAVYDOOR_SLAM, 1.0f, 0x55f0);
|
||||
}
|
||||
|
||||
void func_8038C0A8(ActorMarker *marker, s32 arg1, s32 arg2){
|
||||
void __chAnchorCtrl_spawnJiggy(ActorMarker *marker, s32 arg1, s32 arg2){
|
||||
static f32 D_80390B34[3] = {-5100.0f, -2550.0f, 1470.0f};
|
||||
|
||||
Actor *actor = marker_getActor(marker);
|
||||
jiggySpawn(JIGGY_53_RBB_SNORKEL, &D_80390B34);
|
||||
timed_setCameraToNode(0.5f, 0xb);
|
||||
func_8038C0FC(actor, 3);
|
||||
__chAnchorCtrl_setState(actor, 3);
|
||||
}
|
||||
|
||||
void func_8038C0FC(Actor *this, s32 new_state){
|
||||
void __chAnchorCtrl_setState(Actor *this, s32 new_state){
|
||||
if(new_state == 2){
|
||||
set_camera_to_node(0xC);
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_0(1.0f, func_8038C000);
|
||||
timedFunc_set_2(1.0f, (GenMethod_2)mapSpecificFlags_set, 8, TRUE);
|
||||
timed_playSfx(2.1f, SFX_3F6_UNKNOWN, 0.6f, 0x7fbc);
|
||||
timed_playSfx(2.1f, SFX_3F6_UNKNOWN, 0.6f, 32700);
|
||||
timedFunc_set_2(2.7f, (GenMethod_2)mapSpecificFlags_set, 4, TRUE);
|
||||
timedFunc_set_0(3.0f, func_8038C058);
|
||||
func_80324DBC(3.0f, 0xb9C, 7, NULL, this->marker, func_8038C0A8, NULL);
|
||||
func_80324DBC(3.0f, 0xb9C, 7, NULL, this->marker, __chAnchorCtrl_spawnJiggy, NULL);
|
||||
}//L8038C1D8
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void func_8038C204(Actor *this){
|
||||
void chAnchorCtrl_update(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
if(levelSpecificFlags_getSet(0x30, FALSE))
|
||||
func_8038C0FC(this, 2);
|
||||
__chAnchorCtrl_setState(this, 2);
|
||||
else
|
||||
func_8038C0FC(this, 1);
|
||||
__chAnchorCtrl_setState(this, 1);
|
||||
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||
marker_despawn(this->marker);
|
@@ -2,17 +2,17 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8038B7E8(Actor *this);
|
||||
void chAnchorSwitch_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390A80 = {
|
||||
0x2F, 0x1C7, 0x41B, 0x0, NULL,
|
||||
func_8038B7E8, NULL, func_80325888,
|
||||
chAnchorSwitch_update, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038B6E0(Actor *this, s32 arg1){
|
||||
void __chAnchorSwitch_setState(Actor *this, s32 arg1){
|
||||
if(arg1 == 2){
|
||||
if(this->state == 1){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
@@ -29,19 +29,19 @@ void func_8038B6E0(Actor *this, s32 arg1){
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038B7BC(ActorMarker *marker, s32 arg1){
|
||||
void __chAnchorSwitch_press(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_8038B6E0(actor, 2);
|
||||
__chAnchorSwitch_setState(actor, 2);
|
||||
}
|
||||
|
||||
void func_8038B7E8(Actor *this){
|
||||
void chAnchorSwitch_update(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038B7BC, NULL);
|
||||
marker_setCollisionScripts(this->marker, NULL, __chAnchorSwitch_press, NULL);
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||
func_8038B6E0(this, 2);
|
||||
__chAnchorSwitch_setState(this, 2);
|
||||
else
|
||||
func_8038B6E0(this, 1);
|
||||
__chAnchorSwitch_setState(this, 1);
|
||||
}
|
||||
}
|
31
src/RBB/ch/bossboomboxctrl.c
Normal file
31
src/RBB/ch/bossboomboxctrl.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void chBossBoomBoxCtrl_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo RBB_D_80390CF0 = {
|
||||
0x1C0, 0x2AD, 0x0, 0x0, NULL,
|
||||
chBossBoomBoxCtrl_update, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chBossBoomBoxCtrl_setState(Actor *this, s32 new_state){
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void chBossBoomBoxCtrl_update(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
|
||||
this->unk16C_4 = 1;
|
||||
if(jiggyscore_isSpawned(JIGGY_56_RBB_BOSS_BOOM_BOX) && !func_803203FC(2)){
|
||||
marker_despawn(this->marker);
|
||||
}else{
|
||||
__spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_281_BOSS_BOOM_BOX_LARGEST, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z));
|
||||
__chBossBoomBoxCtrl_setState(this, 1);
|
||||
}
|
||||
}//L8038DEF4
|
||||
}
|
@@ -2,12 +2,12 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void RBB_func_803899C0(Actor *this);
|
||||
void chEngineFanSwitch_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803906B0 = {
|
||||
0x194, 0x1BE, 0x412, 0x0, NULL,
|
||||
RBB_func_803899C0, NULL, func_80325888,
|
||||
chEngineFanSwitch_update, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ void RBB_func_803898A0(void){
|
||||
mapSpecificFlags_set(0, 1);
|
||||
}
|
||||
|
||||
void func_803898C4(Actor * this, s32 arg1){
|
||||
void chEngineFanSwitch_setState(Actor * this, s32 arg1){
|
||||
this->state = arg1;
|
||||
if(this->state == 2){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
@@ -29,25 +29,25 @@ void func_803898C4(Actor * this, s32 arg1){
|
||||
}
|
||||
}
|
||||
|
||||
void func_80389980(ActorMarker *marker, s32 arg1){
|
||||
void __chEngineFanSwitch_pressCallback(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1){
|
||||
func_803898C4(actor, 2);
|
||||
chEngineFanSwitch_setState(actor, 2);
|
||||
}
|
||||
}
|
||||
|
||||
void RBB_func_803899C0(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
void chEngineFanSwitch_update(Actor *this){
|
||||
if(!this->unk16C_4){ //initialize
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
mapSpecificFlags_set(0, 0);
|
||||
marker_setCollisionScripts(this->marker, NULL, func_80389980, NULL);
|
||||
marker_setCollisionScripts(this->marker, NULL, __chEngineFanSwitch_pressCallback, NULL);
|
||||
if(this->state == 0){
|
||||
this->position_x = -3209.95f;
|
||||
this->position_y = 1164.5f;
|
||||
this->position_z = -2649.95f;
|
||||
this->yaw = -90.0f;
|
||||
func_803898C4(this, 1);
|
||||
chEngineFanSwitch_setState(this, 1);
|
||||
}
|
||||
}
|
||||
}
|
@@ -10,28 +10,28 @@ typedef struct {
|
||||
f32 unkC;
|
||||
}ActorLocal_RBB_36A0;
|
||||
|
||||
void func_80389C78(Actor *this);
|
||||
void chPropellor_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803906E0 = {
|
||||
MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER,
|
||||
0x0, NULL,
|
||||
func_80389C78, NULL, func_80325888,
|
||||
chPropellor_update, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390704[4] = {0x258, 0x12C, 0x12C, 0};
|
||||
|
||||
/*.code */
|
||||
f32 func_80389A90(void){
|
||||
f32 __chPropellor_getSpeed(void){
|
||||
return (f32) D_80390704[2*levelSpecificFlags_get(0x27) + levelSpecificFlags_get(0x28)];
|
||||
}
|
||||
|
||||
void func_80389ADC(Actor *this, s32 arg1){
|
||||
void __chPropellor_setState(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||
if(arg1 == 1){
|
||||
local->unkC = func_80389A90();
|
||||
local->unk4 = func_80389A90();
|
||||
local->unkC = __chPropellor_getSpeed();
|
||||
local->unk4 = __chPropellor_getSpeed();
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
@@ -56,14 +56,14 @@ void func_80389B80(Actor *this, f32 arg1){
|
||||
}
|
||||
}
|
||||
|
||||
void func_80389C44(Actor *actor){
|
||||
void __chPropellor_free(Actor *actor){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&actor->local;
|
||||
if(func_802F9C0C(local->unk0))
|
||||
func_802F9D38(local->unk0);
|
||||
}
|
||||
|
||||
|
||||
void func_80389C78(Actor *this){
|
||||
void chPropellor_update(Actor *this){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||
f32 tmp;
|
||||
f32 sp34 = time_getDelta();
|
||||
@@ -73,7 +73,7 @@ void func_80389C78(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->pitch = randf2(0.0f, 300.0f);
|
||||
func_803300C0(this->marker, func_80389B44);
|
||||
marker_setFreeMethod(this->marker, func_80389C44);
|
||||
marker_setFreeMethod(this->marker, __chPropellor_free);
|
||||
func_80389B80(this, 1.0f);
|
||||
if(this->unk78_13 == 0x1C){
|
||||
local->unk8 = 0;
|
||||
@@ -89,7 +89,7 @@ void func_80389C78(Actor *this){
|
||||
}//L80389D7C
|
||||
local->unk4 = 0.0f;
|
||||
local->unkC = 0.0f;
|
||||
func_80389ADC(this, 1);
|
||||
__chPropellor_setState(this, 1);
|
||||
if(levelSpecificFlags_get(local->unk8 ? 4 : 3)){
|
||||
set_camera_to_node(9);
|
||||
func_80324E38(0.0f, 3);
|
||||
@@ -108,15 +108,15 @@ void func_80389C78(Actor *this){
|
||||
|| (180.0f < tmp && this->pitch <= 180.0f)
|
||||
){
|
||||
if(levelSpecificFlags_get(3) || levelSpecificFlags_get(4))
|
||||
func_8030E760(SFX_2_CLAW_SWIPE, 0.4f, 0x4e20);
|
||||
func_8030E760(SFX_2_CLAW_SWIPE, 0.4f, 20000);
|
||||
else
|
||||
func_8030E988(SFX_2_CLAW_SWIPE, 0.4f, 0x4e20, &this->position, 500.0f, 1000.0f);
|
||||
func_8030E988(SFX_2_CLAW_SWIPE, 0.4f, 20000, &this->position, 500.0f, 1000.0f);
|
||||
}//L80389F94
|
||||
if(this->pitch < 0.0f)
|
||||
this->pitch += 360.0f;
|
||||
|
||||
if(this->state == 1){
|
||||
local->unk4 = func_80389A90();
|
||||
local->unk4 = __chPropellor_getSpeed();
|
||||
if(local->unkC < local->unk4){
|
||||
local->unkC += 75*sp34;
|
||||
local->unkC = MIN(local->unk4, local->unkC);
|
@@ -18,8 +18,8 @@ typedef struct {
|
||||
void *unk4;
|
||||
}ActorLocal_RBB_3CB0;
|
||||
|
||||
void func_8038A324(Actor *this);
|
||||
Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||
void chPropellorSwitch_update(Actor *this);
|
||||
Actor *chPropellorSwitch_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_3CB0 D_80390720[2] = {
|
||||
@@ -29,12 +29,12 @@ Struct_RBB_3CB0 D_80390720[2] = {
|
||||
|
||||
ActorInfo D_80390738 = {
|
||||
0x186, 0x176, 0x404, 0x0, NULL,
|
||||
func_8038A324, NULL, func_8038A224,
|
||||
chPropellorSwitch_update, NULL, chPropellorSwitch_draw,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void RBB_func_8038A0A0(Actor *this, s32 arg1){
|
||||
void __chPropellorSwitch_setState(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local;
|
||||
|
||||
if(arg1 == 1)
|
||||
@@ -61,14 +61,14 @@ void RBB_func_8038A0A0(Actor *this, s32 arg1){
|
||||
void func_8038A1C8(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1){
|
||||
RBB_func_8038A0A0(actor, 2);
|
||||
__chPropellorSwitch_setState(actor, 2);
|
||||
}
|
||||
else if(actor->state == 2){
|
||||
func_8038FF40();
|
||||
rbb_propellorCtrl_start();
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor *chPropellorSwitch_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
||||
|
||||
@@ -86,17 +86,17 @@ Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
return actor;
|
||||
}
|
||||
|
||||
void func_8038A2F8(Actor *actor){
|
||||
void chPropellorSwitch_free(Actor *actor){
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
||||
if(local->unk4)
|
||||
assetcache_release(local->unk4);
|
||||
}
|
||||
|
||||
void func_8038A324(Actor *this){
|
||||
void chPropellorSwitch_update(Actor *this){
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local;
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->marker->unk30 = func_8038A2F8;
|
||||
this->marker->unk30 = chPropellorSwitch_free;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)];
|
||||
if(local->unk0->unk6 == 0)
|
||||
@@ -108,16 +108,16 @@ void func_8038A324(Actor *this){
|
||||
this->position_y = (f32)local->unk0->unk0[1];
|
||||
this->position_z = (f32)local->unk0->unk0[2];
|
||||
if(levelSpecificFlags_get(local->unk0->unkA))
|
||||
RBB_func_8038A0A0(this, 2);
|
||||
__chPropellorSwitch_setState(this, 2);
|
||||
else
|
||||
RBB_func_8038A0A0(this, 1);
|
||||
__chPropellorSwitch_setState(this, 1);
|
||||
}//L8038A47C
|
||||
if(this->state == 2){
|
||||
if( !levelSpecificFlags_get(local->unk0->unkA)
|
||||
&& !levelSpecificFlags_get(3)
|
||||
&& !levelSpecificFlags_get(4)
|
||||
){
|
||||
RBB_func_8038A0A0(this, 1);
|
||||
__chPropellorSwitch_setState(this, 1);
|
||||
}
|
||||
}
|
||||
}
|
@@ -10,46 +10,46 @@ typedef struct {
|
||||
u8 *unk4;
|
||||
}ActorLocal_RBB_5060;
|
||||
|
||||
void func_8038B654(Actor * this);
|
||||
void chWhistleCtrl_update(Actor * this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390A50 = {
|
||||
0x2D, 0x1C5, 0x0, 0x0, NULL,
|
||||
func_8038B654, NULL, func_80325340,
|
||||
chWhistleCtrl_update, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
f32 D_80390A74[3] = {-3820.0f, 850.0f, 0.0f}; //whistle jiggy spawn position
|
||||
|
||||
/* .code */
|
||||
void func_8038B450(Actor *actor, s32 arg1){
|
||||
void __chWhistleCtrl_setState(Actor *actor, s32 arg1){
|
||||
actor->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038B468(void){
|
||||
void __chWhistleCtrl_soundWhistle(void){
|
||||
func_802C8F70(225.0f);
|
||||
jiggySpawn(JIGGY_54_RBB_WHISTLE, D_80390A74);
|
||||
}
|
||||
|
||||
void func_8038B4A0(void){
|
||||
void __chWhistleCtrl_correct(void){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
}
|
||||
|
||||
void func_8038B4C4(ActorMarker *marker){
|
||||
void __chWhistleCtrl_wrong(ActorMarker *marker){
|
||||
func_8025A6EC(COMUSIC_2C_BUZZER, 28000);
|
||||
func_8028F530(0xD);
|
||||
}
|
||||
|
||||
void func_8038B4F4(void){
|
||||
void __chWhistleCtrl_complete(void){
|
||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||
func_80324E38(1.0f, 3);
|
||||
timed_setCameraToNode(2.0f, 10);
|
||||
timedFunc_set_0(2.2f, func_8038B468);
|
||||
timedFunc_set_0(2.2f, __chWhistleCtrl_soundWhistle);
|
||||
func_80324E88(5.0f);
|
||||
func_80324E38(5.0f, 0);
|
||||
}
|
||||
|
||||
s32 func_8038B56C(Actor *this, s32 whistle_id, Actor *other){
|
||||
s32 chWhistleCtrl_newEvent(Actor *this, s32 whistle_id, Actor *other){
|
||||
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||
|
||||
if(this->state != 1)
|
||||
@@ -57,22 +57,22 @@ s32 func_8038B56C(Actor *this, s32 whistle_id, Actor *other){
|
||||
|
||||
if(whistle_id + 0x30 == local->unk4[local->unk0]){ //correct
|
||||
if(local->unk4[++local->unk0] == 0){ //end of string
|
||||
timedFunc_set_0(0.6f, func_8038B4F4); //spawn jiggy
|
||||
func_8038B450(this, 2);
|
||||
timedFunc_set_0(0.6f, __chWhistleCtrl_complete); //spawn jiggy
|
||||
__chWhistleCtrl_setState(this, 2);
|
||||
return 3;
|
||||
}else{
|
||||
timedFunc_set_0(0.6f, func_8038B4A0);
|
||||
timedFunc_set_0(0.6f, __chWhistleCtrl_correct);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else{ //wrong
|
||||
timedFunc_set_1(1.0f, func_8038B4C4, other->marker);
|
||||
timedFunc_set_1(1.0f, __chWhistleCtrl_wrong, other->marker);
|
||||
local->unk0 = 0;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B654(Actor *this){
|
||||
void chWhistleCtrl_update(Actor *this){
|
||||
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
@@ -80,8 +80,8 @@ void func_8038B654(Actor *this){
|
||||
local->unk2 = 1;
|
||||
local->unk4 = "312111";
|
||||
if(jiggyscore_isSpawned(JIGGY_54_RBB_WHISTLE))
|
||||
func_8038B450(this, 2);
|
||||
__chWhistleCtrl_setState(this, 2);
|
||||
else
|
||||
func_8038B450(this, 1);
|
||||
__chWhistleCtrl_setState(this, 1);
|
||||
}
|
||||
}
|
@@ -65,7 +65,7 @@ Struct_RBB_47D0 *RBB_func_8038ABC0(Actor *arg0){
|
||||
|
||||
void func_8038AC18(Actor *this, s32 new_state){
|
||||
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&this->local;
|
||||
Actor *other;
|
||||
Actor *whistle_ctrl;
|
||||
local->unk8 = 0.0f;
|
||||
if(new_state == 2){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
@@ -74,9 +74,9 @@ void func_8038AC18(Actor *this, s32 new_state){
|
||||
mapSpecificFlags_set(local->unk4->unk10, TRUE);
|
||||
this->position_y -= 30.0f;
|
||||
local->unk8 = 1.0f;
|
||||
other = actorArray_findActorFromActorId(0x1c5);
|
||||
if(other){
|
||||
local->unk0 = func_8038B56C(other, this->modelCacheIndex - 0x1be, this);
|
||||
whistle_ctrl = actorArray_findActorFromActorId(0x1c5);
|
||||
if(whistle_ctrl){
|
||||
local->unk0 = chWhistleCtrl_newEvent(whistle_ctrl, this->modelCacheIndex - 0x1be, this);
|
||||
}
|
||||
}//L8038ACD0
|
||||
|
@@ -1,31 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void func_8038DE68(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo RBB_D_80390CF0 = {
|
||||
0x1C0, 0x2AD, 0x0, 0x0, NULL,
|
||||
func_8038DE68, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038DE50(Actor *this, s32 new_state){
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void func_8038DE68(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
|
||||
this->unk16C_4 = 1;
|
||||
if(jiggyscore_isSpawned(JIGGY_56_RBB_BOSS_BOOM_BOX) && !func_803203FC(2)){
|
||||
marker_despawn(this->marker);
|
||||
}else{
|
||||
__spawnQueue_add_4((GenMethod_4)func_802C4140, 0x281, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z));
|
||||
func_8038DE50(this, 1);
|
||||
}
|
||||
}//L8038DEF4
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
s32 pad_803912C0[2];
|
||||
u8 D_803912C8;
|
||||
|
||||
void func_8038FDE0(s32 arg0){
|
||||
static f32 D_803912CC;
|
||||
|
||||
D_803912CC = 0.0f;
|
||||
if(arg0 == 1)
|
||||
D_803912CC = 6.5f;
|
||||
|
||||
if(arg0 == 2){
|
||||
item_set(ITEM_3_PROPELLOR_TIMER, 0xf3b);
|
||||
item_set(ITEM_9_PROPELLOR, 1);
|
||||
}
|
||||
|
||||
if(arg0 == 3 || arg0 == 4){
|
||||
levelSpecificFlags_set(0x27, FALSE);
|
||||
levelSpecificFlags_set(0x28, FALSE);
|
||||
item_set(ITEM_9_PROPELLOR,0);
|
||||
if(arg0 == 3 && !jiggyscore_isCollected(0x57)){
|
||||
timedFunc_set_1(0.5f, (GenMethod_1)func_802FAD64, 3);
|
||||
func_80324DBC(1.0f, 0xb9d, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else{
|
||||
func_802FAD64(3);
|
||||
}
|
||||
}//L8038FED4
|
||||
D_803912C8 = arg0;
|
||||
}
|
||||
|
||||
void func_8038FEE8(void){
|
||||
if(D_803912C8 == 2)
|
||||
func_8038FDE0(4);
|
||||
}
|
||||
|
||||
void func_8038FF18(void){
|
||||
D_803912C8 = 0;
|
||||
func_8038FDE0(0);
|
||||
}
|
||||
|
||||
void func_8038FF40(void){
|
||||
if(D_803912C8 == 2)
|
||||
func_8038FDE0(2);
|
||||
}
|
||||
|
||||
void func_8038FF70(void){
|
||||
extern static f32 D_803912CC;
|
||||
|
||||
if( D_803912C8 == 0)
|
||||
if(levelSpecificFlags_get(0x27) && levelSpecificFlags_get(0x28))
|
||||
func_8038FDE0(1);
|
||||
|
||||
if(D_803912C8 == 1)
|
||||
if(ml_timer_update(&D_803912CC,time_getDelta()))
|
||||
func_8038FDE0(2);
|
||||
|
||||
if(D_803912C8 == 2)
|
||||
if(item_getCount(ITEM_3_PROPELLOR_TIMER) == 0)
|
||||
func_8038FDE0(3);
|
||||
|
||||
if(D_803912C8 == 3)
|
||||
func_8038FDE0(0);
|
||||
}
|
68
src/RBB/propellorctrl.c
Normal file
68
src/RBB/propellorctrl.c
Normal file
@@ -0,0 +1,68 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
s32 pad_803912C0[2];
|
||||
u8 __propellorCtrlState;
|
||||
|
||||
void __propellorCtrl_setState(s32 arg0){
|
||||
static f32 __propellorTimer;
|
||||
|
||||
__propellorTimer = 0.0f;
|
||||
if(arg0 == 1)
|
||||
__propellorTimer = 6.5f;
|
||||
|
||||
if(arg0 == 2){
|
||||
item_set(ITEM_3_PROPELLOR_TIMER, 3900 - 1);
|
||||
item_set(ITEM_9_PROPELLOR, 1);
|
||||
}
|
||||
|
||||
if(arg0 == 3 || arg0 == 4){
|
||||
levelSpecificFlags_set(0x27, FALSE);
|
||||
levelSpecificFlags_set(0x28, FALSE);
|
||||
item_set(ITEM_9_PROPELLOR,0);
|
||||
if(arg0 == 3 && !jiggyscore_isCollected(JIGGY_57_RBB_PROPELLOR)){
|
||||
timedFunc_set_1(0.5f, (GenMethod_1)func_802FAD64, 3);
|
||||
func_80324DBC(1.0f, 0xb9d, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else{
|
||||
func_802FAD64(3);
|
||||
}
|
||||
}//L8038FED4
|
||||
__propellorCtrlState = arg0;
|
||||
}
|
||||
|
||||
void rbb_propellorCtrl_stop(void){
|
||||
if(__propellorCtrlState == 2)
|
||||
__propellorCtrl_setState(4);
|
||||
}
|
||||
|
||||
void rbb_propellorCtrl_reset(void){
|
||||
__propellorCtrlState = 0;
|
||||
__propellorCtrl_setState(0);
|
||||
}
|
||||
|
||||
void rbb_propellorCtrl_start(void){
|
||||
if(__propellorCtrlState == 2)
|
||||
__propellorCtrl_setState(2);
|
||||
}
|
||||
|
||||
void rbb_propellorCtrl_update(void){
|
||||
extern f32 __propellorTimer;
|
||||
|
||||
if( __propellorCtrlState == 0)
|
||||
if(levelSpecificFlags_get(0x27) && levelSpecificFlags_get(0x28))
|
||||
__propellorCtrl_setState(1);
|
||||
|
||||
if(__propellorCtrlState == 1)
|
||||
if(ml_timer_update(&__propellorTimer,time_getDelta()))
|
||||
__propellorCtrl_setState(2);
|
||||
|
||||
if(__propellorCtrlState == 2)
|
||||
if(item_getCount(ITEM_3_PROPELLOR_TIMER) == 0)
|
||||
__propellorCtrl_setState(3);
|
||||
|
||||
if(__propellorCtrlState == 3)
|
||||
__propellorCtrl_setState(0);
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8038FEE8(void); //rbb
|
||||
extern void rbb_propellorCtrl_stop(void); //rbb
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
@@ -46,7 +46,7 @@ void func_803216D0(enum map_e map){
|
||||
}
|
||||
|
||||
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||
func_8038FF18();
|
||||
rbb_propellorCtrl_reset();
|
||||
}
|
||||
|
||||
switch(map){
|
||||
@@ -66,7 +66,7 @@ void func_803216D0(enum map_e map){
|
||||
void func_80321854(void){
|
||||
if(!func_802E4A8C()){
|
||||
if( D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||
func_8038FEE8();
|
||||
rbb_propellorCtrl_stop();
|
||||
}
|
||||
|
||||
if( D_80383300.level == LEVEL_1_MUMBOS_MOUNTAIN
|
||||
@@ -97,6 +97,6 @@ void func_80321918(int arg0){
|
||||
|
||||
void func_80321924(void){
|
||||
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||
func_8038FF70();
|
||||
rbb_propellorCtrl_update();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user