label RBB files
This commit is contained in:
@@ -1942,85 +1942,85 @@ segments:
|
|||||||
follows_vram: core2
|
follows_vram: core2
|
||||||
exclusive_ram_id: overlay
|
exclusive_ram_id: overlay
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0x10731B0, c, code_0]
|
- [0x10731B0, c, ch/eggtoll1]
|
||||||
- [0x10737F0, c, code_640]
|
- [0x10737F0, c, code_640]
|
||||||
- [0x1073E50, c, code_CA0]
|
- [0x1073E50, c, code_CA0]
|
||||||
- [0x1074720, c, code_1570]
|
- [0x1074720, c, code_1570]
|
||||||
- [0x1075170, c, code_1FC0]
|
- [0x1075170, c, ch/grimlet]
|
||||||
- [0x1075990, c, code_27E0]
|
- [0x1075990, c, ch/cog]
|
||||||
- [0x1075C20, c, code_2A70]
|
- [0x1075C20, c, ch/axle]
|
||||||
- [0x1076040, c, code_2E90]
|
- [0x1076040, c, ch/enginefan]
|
||||||
- [0x1076660, c, code_34B0]
|
- [0x1076660, c, ch/enginefanswitch]
|
||||||
- [0x1076850, c, code_36A0]
|
- [0x1076850, c, ch/propellor]
|
||||||
- [0x1076E60, c, code_3CB0]
|
- [0x1076E60, c, ch/propellorswitch]
|
||||||
- [0x10772A0, c, code_40F0]
|
- [0x10772A0, c, ch/engineparts]
|
||||||
- [0x1077980, c, code_47D0]
|
- [0x1077980, c, ch/whistleswitch]
|
||||||
- [0x1077E20, c, code_4C70]
|
- [0x1077E20, c, ch/whistle]
|
||||||
- [0x1078210, c, code_5060]
|
- [0x1078210, c, ch/whistlectrl]
|
||||||
- [0x10784A0, c, code_52F0]
|
- [0x10784A0, c, ch/anchorswitch]
|
||||||
- [0x1078640, c, code_5490]
|
- [0x1078640, c, ch/dolphin]
|
||||||
- [0x1078C60, c, code_5AB0]
|
- [0x1078C60, c, ch/anchor]
|
||||||
- [0x1078DC0, c, code_5C10]
|
- [0x1078DC0, c, ch/anchorctrl]
|
||||||
- [0x10790C0, c, code_5F10]
|
- [0x10790C0, c, ch/rarewareflag]
|
||||||
- [0x1079130, c, code_5F80]
|
- [0x1079130, c, ch/bossboombox]
|
||||||
- [0x107AC10, c, code_7A60]
|
- [0x107AC10, c, ch/bossboomboxctrl]
|
||||||
- [0x107ACD0, c, code_7B20]
|
- [0x107ACD0, c, ch/bellbuoy]
|
||||||
- [0x107B180, c, code_7FD0]
|
- [0x107B180, c, ch/rowboat]
|
||||||
- [0x107B6D0, c, code_8520]
|
- [0x107B6D0, c, ch/boombox]
|
||||||
- [0x107C820, c, code_9670]
|
- [0x107C820, c, code_9670]
|
||||||
- [0x107C9F0, c, code_9840]
|
- [0x107C9F0, c, code_9840]
|
||||||
- [0x107CBA0, c, code_99F0]
|
- [0x107CBA0, c, propellorctrl]
|
||||||
- [0x107CE10, .data, code_0]
|
- [0x107CE10, .data, ch/eggtoll1]
|
||||||
- [0x107CE90, .data, code_640]
|
- [0x107CE90, .data, code_640]
|
||||||
- [0x107CFC0, .data, code_CA0]
|
- [0x107CFC0, .data, code_CA0]
|
||||||
- [0x107D030, .data, code_1570]
|
- [0x107D030, .data, code_1570]
|
||||||
- [0x107D140, .data, code_1FC0]
|
- [0x107D140, .data, ch/grimlet]
|
||||||
- [0x107D170, .data, code_27E0]
|
- [0x107D170, .data, ch/cog]
|
||||||
- [0x107D1F0, .data, code_2A70]
|
- [0x107D1F0, .data, ch/axle]
|
||||||
- [0x107D2F0, .data, code_2E90]
|
- [0x107D2F0, .data, ch/enginefan]
|
||||||
- [0x107D470, .data, code_34B0]
|
- [0x107D470, .data, ch/enginefanswitch]
|
||||||
- [0x107D4A0, .data, code_36A0]
|
- [0x107D4A0, .data, ch/propellor]
|
||||||
- [0x107D4E0, .data, code_3CB0]
|
- [0x107D4E0, .data, ch/propellorswitch]
|
||||||
- [0x107D520, .data, code_40F0]
|
- [0x107D520, .data, ch/engineparts]
|
||||||
- [0x107D630, .data, code_47D0]
|
- [0x107D630, .data, ch/whistleswitch]
|
||||||
- [0x107D710, .data, code_4C70]
|
- [0x107D710, .data, ch/whistle]
|
||||||
- [0x107D810, .data, code_5060]
|
- [0x107D810, .data, ch/whistlectrl]
|
||||||
- [0x107D840, .data, code_52F0]
|
- [0x107D840, .data, ch/anchorswitch]
|
||||||
- [0x107D870, .data, code_5490]
|
- [0x107D870, .data, ch/dolphin]
|
||||||
- [0x107D8A0, .data, code_5AB0]
|
- [0x107D8A0, .data, ch/anchor]
|
||||||
- [0x107D8D0, .data, code_5C10]
|
- [0x107D8D0, .data, ch/anchorctrl]
|
||||||
- [0x107D900, .data, code_5F10]
|
- [0x107D900, .data, ch/rarewareflag]
|
||||||
- [0x107D930, .data, code_5F80]
|
- [0x107D930, .data, ch/bossboombox]
|
||||||
- [0x107DAB0, .data, code_7A60]
|
- [0x107DAB0, .data, ch/bossboomboxctrl]
|
||||||
- [0x107DAE0, .data, code_7B20]
|
- [0x107DAE0, .data, ch/bellbuoy]
|
||||||
- [0x107DB10, .data, code_7FD0]
|
- [0x107DB10, .data, ch/rowboat]
|
||||||
- [0x107DB40, .data, code_8520]
|
- [0x107DB40, .data, ch/boombox]
|
||||||
- [0x107DBC0, .data, code_9670]
|
- [0x107DBC0, .data, code_9670]
|
||||||
- [0x107DBF0, .data, code_9840]
|
- [0x107DBF0, .data, code_9840]
|
||||||
- [0x107DC40, .rodata, code_640]
|
- [0x107DC40, .rodata, code_640]
|
||||||
- [0x107DC50, .rodata, code_CA0]
|
- [0x107DC50, .rodata, code_CA0]
|
||||||
- [0x107DC70, .rodata, code_1570]
|
- [0x107DC70, .rodata, code_1570]
|
||||||
- [0x107DCD0, .rodata, code_1FC0]
|
- [0x107DCD0, .rodata, ch/grimlet]
|
||||||
- [0x107DD30, .rodata, code_2A70]
|
- [0x107DD30, .rodata, ch/axle]
|
||||||
- [0x107DD40, .rodata, code_34B0]
|
- [0x107DD40, .rodata, ch/enginefanswitch]
|
||||||
- [0x107DD50, .rodata, code_36A0]
|
- [0x107DD50, .rodata, ch/propellor]
|
||||||
- [0x107DD70, .rodata, code_3CB0]
|
- [0x107DD70, .rodata, ch/propellorswitch]
|
||||||
- [0x107DD80, .rodata, code_4C70]
|
- [0x107DD80, .rodata, ch/whistle]
|
||||||
- [0x107DD90, .rodata, code_5060]
|
- [0x107DD90, .rodata, ch/whistlectrl]
|
||||||
- [0x107DDB0, .rodata, code_5490]
|
- [0x107DDB0, .rodata, ch/dolphin]
|
||||||
- [0x107DE80, .rodata, code_5AB0]
|
- [0x107DE80, .rodata, ch/anchor]
|
||||||
- [0x107DE90, .rodata, code_5C10]
|
- [0x107DE90, .rodata, ch/anchorctrl]
|
||||||
- [0x107DEA0, .rodata, code_5F80]
|
- [0x107DEA0, .rodata, ch/bossboombox]
|
||||||
- [0x107DF30, .rodata, code_7B20]
|
- [0x107DF30, .rodata, ch/bellbuoy]
|
||||||
- [0x107DF60, .rodata, code_7FD0]
|
- [0x107DF60, .rodata, ch/rowboat]
|
||||||
- [0x107DFB0, .rodata, code_8520]
|
- [0x107DFB0, .rodata, ch/boombox]
|
||||||
- [0x107E020, .rodata, code_9670]
|
- [0x107E020, .rodata, code_9670]
|
||||||
- [0x107E030, .bss, bss_pad]
|
- [0x107E030, .bss, bss_pad]
|
||||||
- [0x107E030, .bss, code_5F80]
|
- [0x107E030, .bss, ch/bossboombox]
|
||||||
- [0x107E030, .bss, code_8520]
|
- [0x107E030, .bss, ch/boombox]
|
||||||
- [0x107E030, .bss, code_8520]
|
- [0x107E030, .bss, ch/boombox]
|
||||||
- [0x107E030, .bss, code_9670]
|
- [0x107E030, .bss, code_9670]
|
||||||
- [0x107E030, .bss, code_99F0]
|
- [0x107E030, .bss, propellorctrl]
|
||||||
- name: FP
|
- name: FP
|
||||||
dir: FP
|
dir: FP
|
||||||
type: code
|
type: code
|
||||||
|
@@ -3,19 +3,17 @@
|
|||||||
#include "variables.h"
|
#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 */
|
/* .data */
|
||||||
ActorInfo RBB_D_80390B10 = {
|
ActorInfo RBB_D_80390B10 = {
|
||||||
0x199, 0x1CB, 0x0, 0x0, NULL,
|
0x199, 0x1CB, 0x0, 0x0, NULL,
|
||||||
func_8038C204, NULL, func_80325340,
|
chAnchorCtrl_update, NULL, func_80325340,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
f32 D_80390B34[3] = {-5100.0f, -2550.0f, 1470.0f};
|
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void func_8038C000(void){
|
void func_8038C000(void){
|
||||||
s32 sp1C = func_802F9AA8(SFX_7D_ANCHOR_LIFTING);
|
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);
|
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);
|
Actor *actor = marker_getActor(marker);
|
||||||
jiggySpawn(JIGGY_53_RBB_SNORKEL, &D_80390B34);
|
jiggySpawn(JIGGY_53_RBB_SNORKEL, &D_80390B34);
|
||||||
timed_setCameraToNode(0.5f, 0xb);
|
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){
|
if(new_state == 2){
|
||||||
set_camera_to_node(0xC);
|
set_camera_to_node(0xC);
|
||||||
func_80324E38(0.0f, 3);
|
func_80324E38(0.0f, 3);
|
||||||
timedFunc_set_0(1.0f, func_8038C000);
|
timedFunc_set_0(1.0f, func_8038C000);
|
||||||
timedFunc_set_2(1.0f, (GenMethod_2)mapSpecificFlags_set, 8, TRUE);
|
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_2(2.7f, (GenMethod_2)mapSpecificFlags_set, 4, TRUE);
|
||||||
timedFunc_set_0(3.0f, func_8038C058);
|
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
|
}//L8038C1D8
|
||||||
this->state = new_state;
|
this->state = new_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038C204(Actor *this){
|
void chAnchorCtrl_update(Actor *this){
|
||||||
if(!this->unk16C_4){
|
if(!this->unk16C_4){
|
||||||
this->unk16C_4 = 1;
|
this->unk16C_4 = 1;
|
||||||
if(levelSpecificFlags_getSet(0x30, FALSE))
|
if(levelSpecificFlags_getSet(0x30, FALSE))
|
||||||
func_8038C0FC(this, 2);
|
__chAnchorCtrl_setState(this, 2);
|
||||||
else
|
else
|
||||||
func_8038C0FC(this, 1);
|
__chAnchorCtrl_setState(this, 1);
|
||||||
|
|
||||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||||
marker_despawn(this->marker);
|
marker_despawn(this->marker);
|
@@ -2,17 +2,17 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
void func_8038B7E8(Actor *this);
|
void chAnchorSwitch_update(Actor *this);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
ActorInfo D_80390A80 = {
|
ActorInfo D_80390A80 = {
|
||||||
0x2F, 0x1C7, 0x41B, 0x0, NULL,
|
0x2F, 0x1C7, 0x41B, 0x0, NULL,
|
||||||
func_8038B7E8, NULL, func_80325888,
|
chAnchorSwitch_update, NULL, func_80325888,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void func_8038B6E0(Actor *this, s32 arg1){
|
void __chAnchorSwitch_setState(Actor *this, s32 arg1){
|
||||||
if(arg1 == 2){
|
if(arg1 == 2){
|
||||||
if(this->state == 1){
|
if(this->state == 1){
|
||||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||||
@@ -29,19 +29,19 @@ void func_8038B6E0(Actor *this, s32 arg1){
|
|||||||
this->state = arg1;
|
this->state = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B7BC(ActorMarker *marker, s32 arg1){
|
void __chAnchorSwitch_press(ActorMarker *marker, s32 arg1){
|
||||||
Actor *actor = marker_getActor(marker);
|
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){
|
if(!this->unk16C_4){
|
||||||
this->unk16C_4 = 1;
|
this->unk16C_4 = 1;
|
||||||
this->marker->propPtr->unk8_3 = 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))
|
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||||
func_8038B6E0(this, 2);
|
__chAnchorSwitch_setState(this, 2);
|
||||||
else
|
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 "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
void RBB_func_803899C0(Actor *this);
|
void chEngineFanSwitch_update(Actor *this);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
ActorInfo D_803906B0 = {
|
ActorInfo D_803906B0 = {
|
||||||
0x194, 0x1BE, 0x412, 0x0, NULL,
|
0x194, 0x1BE, 0x412, 0x0, NULL,
|
||||||
RBB_func_803899C0, NULL, func_80325888,
|
chEngineFanSwitch_update, NULL, func_80325888,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ void RBB_func_803898A0(void){
|
|||||||
mapSpecificFlags_set(0, 1);
|
mapSpecificFlags_set(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_803898C4(Actor * this, s32 arg1){
|
void chEngineFanSwitch_setState(Actor * this, s32 arg1){
|
||||||
this->state = arg1;
|
this->state = arg1;
|
||||||
if(this->state == 2){
|
if(this->state == 2){
|
||||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
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);
|
Actor *actor = marker_getActor(marker);
|
||||||
if(actor->state == 1){
|
if(actor->state == 1){
|
||||||
func_803898C4(actor, 2);
|
chEngineFanSwitch_setState(actor, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBB_func_803899C0(Actor *this){
|
void chEngineFanSwitch_update(Actor *this){
|
||||||
if(!this->unk16C_4){
|
if(!this->unk16C_4){ //initialize
|
||||||
this->marker->propPtr->unk8_3 = 1;
|
this->marker->propPtr->unk8_3 = 1;
|
||||||
this->unk16C_4 = 1;
|
this->unk16C_4 = 1;
|
||||||
mapSpecificFlags_set(0, 0);
|
mapSpecificFlags_set(0, 0);
|
||||||
marker_setCollisionScripts(this->marker, NULL, func_80389980, NULL);
|
marker_setCollisionScripts(this->marker, NULL, __chEngineFanSwitch_pressCallback, NULL);
|
||||||
if(this->state == 0){
|
if(this->state == 0){
|
||||||
this->position_x = -3209.95f;
|
this->position_x = -3209.95f;
|
||||||
this->position_y = 1164.5f;
|
this->position_y = 1164.5f;
|
||||||
this->position_z = -2649.95f;
|
this->position_z = -2649.95f;
|
||||||
this->yaw = -90.0f;
|
this->yaw = -90.0f;
|
||||||
func_803898C4(this, 1);
|
chEngineFanSwitch_setState(this, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -10,28 +10,28 @@ typedef struct {
|
|||||||
f32 unkC;
|
f32 unkC;
|
||||||
}ActorLocal_RBB_36A0;
|
}ActorLocal_RBB_36A0;
|
||||||
|
|
||||||
void func_80389C78(Actor *this);
|
void chPropellor_update(Actor *this);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
ActorInfo D_803906E0 = {
|
ActorInfo D_803906E0 = {
|
||||||
MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER,
|
MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER,
|
||||||
0x0, NULL,
|
0x0, NULL,
|
||||||
func_80389C78, NULL, func_80325888,
|
chPropellor_update, NULL, func_80325888,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 D_80390704[4] = {0x258, 0x12C, 0x12C, 0};
|
s32 D_80390704[4] = {0x258, 0x12C, 0x12C, 0};
|
||||||
|
|
||||||
/*.code */
|
/*.code */
|
||||||
f32 func_80389A90(void){
|
f32 __chPropellor_getSpeed(void){
|
||||||
return (f32) D_80390704[2*levelSpecificFlags_get(0x27) + levelSpecificFlags_get(0x28)];
|
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;
|
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||||
if(arg1 == 1){
|
if(arg1 == 1){
|
||||||
local->unkC = func_80389A90();
|
local->unkC = __chPropellor_getSpeed();
|
||||||
local->unk4 = func_80389A90();
|
local->unk4 = __chPropellor_getSpeed();
|
||||||
}
|
}
|
||||||
this->state = arg1;
|
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;
|
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&actor->local;
|
||||||
if(func_802F9C0C(local->unk0))
|
if(func_802F9C0C(local->unk0))
|
||||||
func_802F9D38(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;
|
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||||
f32 tmp;
|
f32 tmp;
|
||||||
f32 sp34 = time_getDelta();
|
f32 sp34 = time_getDelta();
|
||||||
@@ -73,7 +73,7 @@ void func_80389C78(Actor *this){
|
|||||||
this->marker->propPtr->unk8_3 = 1;
|
this->marker->propPtr->unk8_3 = 1;
|
||||||
this->pitch = randf2(0.0f, 300.0f);
|
this->pitch = randf2(0.0f, 300.0f);
|
||||||
func_803300C0(this->marker, func_80389B44);
|
func_803300C0(this->marker, func_80389B44);
|
||||||
marker_setFreeMethod(this->marker, func_80389C44);
|
marker_setFreeMethod(this->marker, __chPropellor_free);
|
||||||
func_80389B80(this, 1.0f);
|
func_80389B80(this, 1.0f);
|
||||||
if(this->unk78_13 == 0x1C){
|
if(this->unk78_13 == 0x1C){
|
||||||
local->unk8 = 0;
|
local->unk8 = 0;
|
||||||
@@ -89,7 +89,7 @@ void func_80389C78(Actor *this){
|
|||||||
}//L80389D7C
|
}//L80389D7C
|
||||||
local->unk4 = 0.0f;
|
local->unk4 = 0.0f;
|
||||||
local->unkC = 0.0f;
|
local->unkC = 0.0f;
|
||||||
func_80389ADC(this, 1);
|
__chPropellor_setState(this, 1);
|
||||||
if(levelSpecificFlags_get(local->unk8 ? 4 : 3)){
|
if(levelSpecificFlags_get(local->unk8 ? 4 : 3)){
|
||||||
set_camera_to_node(9);
|
set_camera_to_node(9);
|
||||||
func_80324E38(0.0f, 3);
|
func_80324E38(0.0f, 3);
|
||||||
@@ -108,15 +108,15 @@ void func_80389C78(Actor *this){
|
|||||||
|| (180.0f < tmp && this->pitch <= 180.0f)
|
|| (180.0f < tmp && this->pitch <= 180.0f)
|
||||||
){
|
){
|
||||||
if(levelSpecificFlags_get(3) || levelSpecificFlags_get(4))
|
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
|
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
|
}//L80389F94
|
||||||
if(this->pitch < 0.0f)
|
if(this->pitch < 0.0f)
|
||||||
this->pitch += 360.0f;
|
this->pitch += 360.0f;
|
||||||
|
|
||||||
if(this->state == 1){
|
if(this->state == 1){
|
||||||
local->unk4 = func_80389A90();
|
local->unk4 = __chPropellor_getSpeed();
|
||||||
if(local->unkC < local->unk4){
|
if(local->unkC < local->unk4){
|
||||||
local->unkC += 75*sp34;
|
local->unkC += 75*sp34;
|
||||||
local->unkC = MIN(local->unk4, local->unkC);
|
local->unkC = MIN(local->unk4, local->unkC);
|
@@ -18,8 +18,8 @@ typedef struct {
|
|||||||
void *unk4;
|
void *unk4;
|
||||||
}ActorLocal_RBB_3CB0;
|
}ActorLocal_RBB_3CB0;
|
||||||
|
|
||||||
void func_8038A324(Actor *this);
|
void chPropellorSwitch_update(Actor *this);
|
||||||
Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
Actor *chPropellorSwitch_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
Struct_RBB_3CB0 D_80390720[2] = {
|
Struct_RBB_3CB0 D_80390720[2] = {
|
||||||
@@ -29,12 +29,12 @@ Struct_RBB_3CB0 D_80390720[2] = {
|
|||||||
|
|
||||||
ActorInfo D_80390738 = {
|
ActorInfo D_80390738 = {
|
||||||
0x186, 0x176, 0x404, 0x0, NULL,
|
0x186, 0x176, 0x404, 0x0, NULL,
|
||||||
func_8038A324, NULL, func_8038A224,
|
chPropellorSwitch_update, NULL, chPropellorSwitch_draw,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .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;
|
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local;
|
||||||
|
|
||||||
if(arg1 == 1)
|
if(arg1 == 1)
|
||||||
@@ -61,14 +61,14 @@ void RBB_func_8038A0A0(Actor *this, s32 arg1){
|
|||||||
void func_8038A1C8(ActorMarker *marker, s32 arg1){
|
void func_8038A1C8(ActorMarker *marker, s32 arg1){
|
||||||
Actor *actor = marker_getActor(marker);
|
Actor *actor = marker_getActor(marker);
|
||||||
if(actor->state == 1){
|
if(actor->state == 1){
|
||||||
RBB_func_8038A0A0(actor, 2);
|
__chPropellorSwitch_setState(actor, 2);
|
||||||
}
|
}
|
||||||
else if(actor->state == 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);
|
Actor *actor = marker_getActor(marker);
|
||||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
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;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038A2F8(Actor *actor){
|
void chPropellorSwitch_free(Actor *actor){
|
||||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
||||||
if(local->unk4)
|
if(local->unk4)
|
||||||
assetcache_release(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;
|
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local;
|
||||||
if(!this->unk16C_4){
|
if(!this->unk16C_4){
|
||||||
this->marker->propPtr->unk8_3 = 1;
|
this->marker->propPtr->unk8_3 = 1;
|
||||||
this->marker->unk30 = func_8038A2F8;
|
this->marker->unk30 = chPropellorSwitch_free;
|
||||||
this->unk16C_4 = 1;
|
this->unk16C_4 = 1;
|
||||||
local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)];
|
local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)];
|
||||||
if(local->unk0->unk6 == 0)
|
if(local->unk0->unk6 == 0)
|
||||||
@@ -108,16 +108,16 @@ void func_8038A324(Actor *this){
|
|||||||
this->position_y = (f32)local->unk0->unk0[1];
|
this->position_y = (f32)local->unk0->unk0[1];
|
||||||
this->position_z = (f32)local->unk0->unk0[2];
|
this->position_z = (f32)local->unk0->unk0[2];
|
||||||
if(levelSpecificFlags_get(local->unk0->unkA))
|
if(levelSpecificFlags_get(local->unk0->unkA))
|
||||||
RBB_func_8038A0A0(this, 2);
|
__chPropellorSwitch_setState(this, 2);
|
||||||
else
|
else
|
||||||
RBB_func_8038A0A0(this, 1);
|
__chPropellorSwitch_setState(this, 1);
|
||||||
}//L8038A47C
|
}//L8038A47C
|
||||||
if(this->state == 2){
|
if(this->state == 2){
|
||||||
if( !levelSpecificFlags_get(local->unk0->unkA)
|
if( !levelSpecificFlags_get(local->unk0->unkA)
|
||||||
&& !levelSpecificFlags_get(3)
|
&& !levelSpecificFlags_get(3)
|
||||||
&& !levelSpecificFlags_get(4)
|
&& !levelSpecificFlags_get(4)
|
||||||
){
|
){
|
||||||
RBB_func_8038A0A0(this, 1);
|
__chPropellorSwitch_setState(this, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -10,46 +10,46 @@ typedef struct {
|
|||||||
u8 *unk4;
|
u8 *unk4;
|
||||||
}ActorLocal_RBB_5060;
|
}ActorLocal_RBB_5060;
|
||||||
|
|
||||||
void func_8038B654(Actor * this);
|
void chWhistleCtrl_update(Actor * this);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
ActorInfo D_80390A50 = {
|
ActorInfo D_80390A50 = {
|
||||||
0x2D, 0x1C5, 0x0, 0x0, NULL,
|
0x2D, 0x1C5, 0x0, 0x0, NULL,
|
||||||
func_8038B654, NULL, func_80325340,
|
chWhistleCtrl_update, NULL, func_80325340,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
f32 D_80390A74[3] = {-3820.0f, 850.0f, 0.0f}; //whistle jiggy spawn position
|
f32 D_80390A74[3] = {-3820.0f, 850.0f, 0.0f}; //whistle jiggy spawn position
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void func_8038B450(Actor *actor, s32 arg1){
|
void __chWhistleCtrl_setState(Actor *actor, s32 arg1){
|
||||||
actor->state = arg1;
|
actor->state = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B468(void){
|
void __chWhistleCtrl_soundWhistle(void){
|
||||||
func_802C8F70(225.0f);
|
func_802C8F70(225.0f);
|
||||||
jiggySpawn(JIGGY_54_RBB_WHISTLE, D_80390A74);
|
jiggySpawn(JIGGY_54_RBB_WHISTLE, D_80390A74);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B4A0(void){
|
void __chWhistleCtrl_correct(void){
|
||||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B4C4(ActorMarker *marker){
|
void __chWhistleCtrl_wrong(ActorMarker *marker){
|
||||||
func_8025A6EC(COMUSIC_2C_BUZZER, 28000);
|
func_8025A6EC(COMUSIC_2C_BUZZER, 28000);
|
||||||
func_8028F530(0xD);
|
func_8028F530(0xD);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B4F4(void){
|
void __chWhistleCtrl_complete(void){
|
||||||
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||||
func_80324E38(1.0f, 3);
|
func_80324E38(1.0f, 3);
|
||||||
timed_setCameraToNode(2.0f, 10);
|
timed_setCameraToNode(2.0f, 10);
|
||||||
timedFunc_set_0(2.2f, func_8038B468);
|
timedFunc_set_0(2.2f, __chWhistleCtrl_soundWhistle);
|
||||||
func_80324E88(5.0f);
|
func_80324E88(5.0f);
|
||||||
func_80324E38(5.0f, 0);
|
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;
|
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||||
|
|
||||||
if(this->state != 1)
|
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(whistle_id + 0x30 == local->unk4[local->unk0]){ //correct
|
||||||
if(local->unk4[++local->unk0] == 0){ //end of string
|
if(local->unk4[++local->unk0] == 0){ //end of string
|
||||||
timedFunc_set_0(0.6f, func_8038B4F4); //spawn jiggy
|
timedFunc_set_0(0.6f, __chWhistleCtrl_complete); //spawn jiggy
|
||||||
func_8038B450(this, 2);
|
__chWhistleCtrl_setState(this, 2);
|
||||||
return 3;
|
return 3;
|
||||||
}else{
|
}else{
|
||||||
timedFunc_set_0(0.6f, func_8038B4A0);
|
timedFunc_set_0(0.6f, __chWhistleCtrl_correct);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{ //wrong
|
else{ //wrong
|
||||||
timedFunc_set_1(1.0f, func_8038B4C4, other->marker);
|
timedFunc_set_1(1.0f, __chWhistleCtrl_wrong, other->marker);
|
||||||
local->unk0 = 0;
|
local->unk0 = 0;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8038B654(Actor *this){
|
void chWhistleCtrl_update(Actor *this){
|
||||||
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||||
|
|
||||||
if(!this->unk16C_4){
|
if(!this->unk16C_4){
|
||||||
@@ -80,8 +80,8 @@ void func_8038B654(Actor *this){
|
|||||||
local->unk2 = 1;
|
local->unk2 = 1;
|
||||||
local->unk4 = "312111";
|
local->unk4 = "312111";
|
||||||
if(jiggyscore_isSpawned(JIGGY_54_RBB_WHISTLE))
|
if(jiggyscore_isSpawned(JIGGY_54_RBB_WHISTLE))
|
||||||
func_8038B450(this, 2);
|
__chWhistleCtrl_setState(this, 2);
|
||||||
else
|
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){
|
void func_8038AC18(Actor *this, s32 new_state){
|
||||||
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&this->local;
|
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&this->local;
|
||||||
Actor *other;
|
Actor *whistle_ctrl;
|
||||||
local->unk8 = 0.0f;
|
local->unk8 = 0.0f;
|
||||||
if(new_state == 2){
|
if(new_state == 2){
|
||||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||||
@@ -74,9 +74,9 @@ void func_8038AC18(Actor *this, s32 new_state){
|
|||||||
mapSpecificFlags_set(local->unk4->unk10, TRUE);
|
mapSpecificFlags_set(local->unk4->unk10, TRUE);
|
||||||
this->position_y -= 30.0f;
|
this->position_y -= 30.0f;
|
||||||
local->unk8 = 1.0f;
|
local->unk8 = 1.0f;
|
||||||
other = actorArray_findActorFromActorId(0x1c5);
|
whistle_ctrl = actorArray_findActorFromActorId(0x1c5);
|
||||||
if(other){
|
if(whistle_ctrl){
|
||||||
local->unk0 = func_8038B56C(other, this->modelCacheIndex - 0x1be, this);
|
local->unk0 = chWhistleCtrl_newEvent(whistle_ctrl, this->modelCacheIndex - 0x1be, this);
|
||||||
}
|
}
|
||||||
}//L8038ACD0
|
}//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 "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
extern void func_8038FEE8(void); //rbb
|
extern void rbb_propellorCtrl_stop(void); //rbb
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 unk0;
|
u8 unk0;
|
||||||
@@ -46,7 +46,7 @@ void func_803216D0(enum map_e map){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||||
func_8038FF18();
|
rbb_propellorCtrl_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(map){
|
switch(map){
|
||||||
@@ -66,7 +66,7 @@ void func_803216D0(enum map_e map){
|
|||||||
void func_80321854(void){
|
void func_80321854(void){
|
||||||
if(!func_802E4A8C()){
|
if(!func_802E4A8C()){
|
||||||
if( D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
if( D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||||
func_8038FEE8();
|
rbb_propellorCtrl_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( D_80383300.level == LEVEL_1_MUMBOS_MOUNTAIN
|
if( D_80383300.level == LEVEL_1_MUMBOS_MOUNTAIN
|
||||||
@@ -97,6 +97,6 @@ void func_80321918(int arg0){
|
|||||||
|
|
||||||
void func_80321924(void){
|
void func_80321924(void){
|
||||||
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
if(D_80383300.level == LEVEL_9_RUSTY_BUCKET_BAY){
|
||||||
func_8038FF70();
|
rbb_propellorCtrl_update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -139,6 +139,7 @@ D_8037901C = 0x8037901C;
|
|||||||
D_8037DCB0 = 0x8037DCB0;
|
D_8037DCB0 = 0x8037DCB0;
|
||||||
print_sCurrentPtr = 0x80380AE4;
|
print_sCurrentPtr = 0x80380AE4;
|
||||||
print_sInFontFormatMode = 0x80380B08;
|
print_sInFontFormatMode = 0x80380B08;
|
||||||
|
__propellorTimer = 0x803912CC;
|
||||||
|
|
||||||
D_A00001D8 = 0xA00001D8;
|
D_A00001D8 = 0xA00001D8;
|
||||||
D_A0000238 = 0xA0000238;
|
D_A0000238 = 0xA0000238;
|
||||||
|
Reference in New Issue
Block a user