The first commit
This commit is contained in:
169
src/RBB/code_0.c
Normal file
169
src/RBB/code_0.c
Normal file
@@ -0,0 +1,169 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80324E88(f32);
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
}ActorLocal_RBB_0;
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
//u8 pad3[1];
|
||||
f32 unk4;
|
||||
s16 unk8;
|
||||
s16 unkA;
|
||||
s16 unkC;
|
||||
//u8 padE[2];
|
||||
}Struct_RBB_0_1;
|
||||
|
||||
|
||||
void func_803866F4(Actor *this, s32 arg1);
|
||||
void func_803868F0(Actor* this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390050 = {
|
||||
MARKER_182_RBB_EGG_TOLL, ACTOR_172_RBB_EGG_TOLL, ASSET_402_MODEL_RBB_EGG_TOLL,
|
||||
0x0, NULL,
|
||||
func_803868F0, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
Struct_RBB_0_1 D_80390074[4] = {
|
||||
{0x0, 0x2, 0x4, 3.0f, 550, 200, -300},
|
||||
{0x1, 0x4, 0x0, 4.0f, -600, 0, 0},
|
||||
{0x2, 0x6, 0x0, 4.0f, -700, 0, 0},
|
||||
{0x3, 0x8, 0x0, 4.0f, -1010, 0, 0}
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_803863F0(Actor *actor, s32 arg1){
|
||||
ActorLocal_RBB_0 * local = (ActorLocal_RBB_0 *) &actor->local;
|
||||
void *temp_a0;
|
||||
f32 sp3C[3];
|
||||
f32 sp30[3];
|
||||
|
||||
temp_a0 = func_8034C528(local->unk4 + 0x190);
|
||||
if(temp_a0){
|
||||
if(local->unk8 == 0){
|
||||
sp3C[2] = 0.0f;
|
||||
sp30[0] = 0.0f;
|
||||
sp30[1] = 0.0f;
|
||||
sp3C[0] = sp3C[1] = sp3C[2];
|
||||
sp30[2] = (f32) D_80390074[local->unk4].unk8;
|
||||
}
|
||||
else if(local->unk8 == 1){
|
||||
sp3C[0] = 0.0f;
|
||||
sp3C[1] = 0.0f;
|
||||
sp3C[2] = (f32) D_80390074[local->unk4].unk8;
|
||||
sp30[1] = 0.0f;
|
||||
sp30[0] = 0.0f;
|
||||
sp30[2] = (f32) D_80390074[local->unk4].unkA;
|
||||
}
|
||||
else{
|
||||
sp3C[0] = 0.0f;
|
||||
sp3C[1] = 0.0f;
|
||||
sp3C[2] = (f32) D_80390074[local->unk4].unkA;
|
||||
sp30[1] = 0.0f;
|
||||
sp30[0] = 0.0f;
|
||||
sp30[2] = (f32) D_80390074[local->unk4].unkC;
|
||||
|
||||
}
|
||||
if(arg1){
|
||||
func_8034DDF0(temp_a0, &sp3C, &sp30, D_80390074[local->unk4].unk4, 1);
|
||||
func_8034E174(temp_a0);
|
||||
}
|
||||
else{
|
||||
func_8034DDF0(temp_a0, &sp3C, &sp30, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_803865A4(ActorMarker *marker, s32 arg1){
|
||||
func_803866F4(marker_getActor(marker), arg1);
|
||||
}
|
||||
|
||||
void func_803865D0(ActorMarker *marker){
|
||||
Actor* actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_0 * local = (ActorLocal_RBB_0 *) &actor->local;
|
||||
func_803863F0(actor, 1);
|
||||
timed_setCameraToNode(0.0f, D_80390074[local->unk4].unk0);
|
||||
timedFunc_set_2(0.75*D_80390074[local->unk4].unk4, (TFQM2) func_803865A4, actor->marker, 4);
|
||||
func_80324E88(0.75*D_80390074[local->unk4].unk4);
|
||||
func_80324E38(0.75*D_80390074[local->unk4].unk4, 0);
|
||||
timed_playSfx(D_80390074[local->unk4].unk4, SFX_7F_HEAVYDOOR_SLAM, 0.8f, 0x7fd0);
|
||||
}
|
||||
|
||||
void func_803866F4(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_0 *local = (ActorLocal_RBB_0 *) &this->local;
|
||||
|
||||
|
||||
if(arg1 == 2){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
local = (ActorLocal_RBB_0 *) &this->local;
|
||||
local->unkC = 3;
|
||||
}
|
||||
if(arg1 == 3){
|
||||
local->unk8++;
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_2(0.5f, (TFQM2) func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
|
||||
timedFunc_set_1(1.0f, (TFQM1) func_803865D0, this->marker);
|
||||
}//L803867D4
|
||||
if(arg1 == 4){
|
||||
if(local->unk8 == 1 && D_80390074[local->unk4].unk2 > 0){
|
||||
func_803866F4(this, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038685C(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_0 *local = (ActorLocal_RBB_0 *) &actor->local;
|
||||
|
||||
if(actor->state == 1){
|
||||
local->unk0++;
|
||||
if( D_80390074[local->unk4].unk1 == local->unk0
|
||||
|| D_80390074[local->unk4].unk1 + D_80390074[local->unk4].unk2 == local->unk0
|
||||
){
|
||||
func_803866F4(actor, 3);
|
||||
}else{
|
||||
func_803866F4(actor, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_803868F0(Actor *this){
|
||||
ActorLocal_RBB_0 *local = (ActorLocal_RBB_0 *) &this->local;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
if(this->state == 0){
|
||||
local->unk0 = 0;
|
||||
local->unk4 = 0;
|
||||
local->unk8 = 0;
|
||||
local->unkC = 0;
|
||||
local->unk4 = (this->unk78_13 == 0x15)? 0: local->unk4;
|
||||
local->unk4 = (this->unk78_13 == 0x13)? 1: local->unk4;
|
||||
local->unk4 = (this->unk78_13 == 0x14)? 2: local->unk4;
|
||||
local->unk4 = (this->unk78_13 == 0xB)? 3: local->unk4;
|
||||
func_803866F4(this, 1);
|
||||
}
|
||||
func_803863F0(this, 0);
|
||||
}//L803869F4
|
||||
if(this->state == 2){
|
||||
if(--local->unkC <= 0){
|
||||
func_803866F4(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
236
src/RBB/code_1570.c
Normal file
236
src/RBB/code_1570.c
Normal file
@@ -0,0 +1,236 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/* typedefs and declarations */
|
||||
void func_803881E8(Actor *this, s32 arg1);
|
||||
void func_803882F4(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390270 = {
|
||||
0x184, 0x174, 0x402, 0x0, NULL,
|
||||
func_803882F4, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390294[4] = { 0xff, 0, 0, 0xff};
|
||||
s32 D_803902A4[4] = { 0x76, 0, 0, 0xff};
|
||||
s32 D_803902B4[4] = { 0x76, 0, 0, 0xff};
|
||||
s32 D_803902C4[4] = { 0xff, 0, 0, 0xff};
|
||||
|
||||
|
||||
f32 D_803902D4[3] = {4500.0f, 0.0f, 500.0f};
|
||||
f32 D_803902E0[3] = {4500.0f, 0.0f, 500.0f};
|
||||
f32 D_803902EC[3] = {4000.0f, -600.0f, 0.0f};
|
||||
f32 D_803902F8[3] = {4500.0f, 0.0f, 500.0f};
|
||||
struct31s D_80390304 = {
|
||||
{ 5.0f, 5.0f},
|
||||
{ 5.0f, 5.0f},
|
||||
{ 0.0f, 0.01f},
|
||||
{ 3.0f, 5.0f},
|
||||
0.0f,
|
||||
0.1f
|
||||
};
|
||||
|
||||
f32 D_8039032C[3] = {3700.0f, -300.0f, -300.0f};
|
||||
f32 D_80390338[3] = {4500.0f, 100.0f, 400.0f};
|
||||
struct41s D_80390344= {
|
||||
{{-700.0f, 200.0f, -700.0f}, {700.0f, 500.0f, 700.0f}},
|
||||
{{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}}
|
||||
};
|
||||
|
||||
/*.code */
|
||||
void func_80387960(f32 arg0){
|
||||
f32 sp34[3];
|
||||
void * temp_v0;
|
||||
f32 sp24[3];
|
||||
|
||||
sp34[0] = sp34[1] = sp34[2] =0.0f;
|
||||
sp24[0] = 0.0f;
|
||||
sp24[1] = 0.0f;
|
||||
sp24[2] = -40.0f;
|
||||
|
||||
if(temp_v0 = func_8034C528(0x19e)){
|
||||
func_8034DDF0(temp_v0, &sp34, &sp24, arg0, 1);
|
||||
}
|
||||
if(temp_v0 = func_8034C528(0x19f)){
|
||||
func_8034DDF0(temp_v0, &sp34, &sp24, arg0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_803879F0(void){
|
||||
s32 temp_v0 = func_8034C528(0x19b);
|
||||
f32 sp30[3];
|
||||
f32 sp24[3];
|
||||
if(temp_v0){
|
||||
TUPLE_ASSIGN(sp30, 0.0f, 0.0f, 0.0f);
|
||||
TUPLE_ASSIGN(sp24, 0.0f, -1000.0f, 0.0f);
|
||||
func_8034DC08(temp_v0, &sp30, &sp24, 1.5f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387A54(void){
|
||||
s32 temp_v0 = func_8034C528(0x19b);
|
||||
f32 sp30[3];
|
||||
f32 sp24[3];
|
||||
if(temp_v0){
|
||||
TUPLE_ASSIGN(sp30, 0.0f, -1000.0f, 0.0f);
|
||||
TUPLE_ASSIGN(sp24, 0.0f, -2000.0f, 0.0f);
|
||||
func_8034DDF0(temp_v0, &sp30, &sp24, 1.0f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387AC0(void){
|
||||
s32 temp_v0 = func_8034C528(0x19b);
|
||||
f32 sp30[3];
|
||||
f32 sp24[3];
|
||||
if(temp_v0){
|
||||
TUPLE_ASSIGN(sp30, 0.0f, 0.0f, 0.0f);
|
||||
TUPLE_ASSIGN(sp24, 0.0f, -2000.0f, 0.0f);
|
||||
func_8034DDF0(temp_v0, &sp30, &sp24, 0.0f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387B24(void){
|
||||
s32 temp_v0 = func_8034C528(0x1a0);
|
||||
f32 sp30[3];
|
||||
f32 sp24[3];
|
||||
if(temp_v0){
|
||||
TUPLE_ASSIGN(sp30, 0.0f, 0.0f, 0.0f);
|
||||
TUPLE_ASSIGN(sp24, 0.0f, -500.0f, 0.0f);
|
||||
func_8034DDF0(temp_v0, &sp30, &sp24, 0.1f, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387B8C(s32 arg0, s32 arg1){
|
||||
s32 v0 = func_8034C528(arg0);
|
||||
if(v0){
|
||||
func_8034DFB0(v0, &D_80390294, &D_803902A4, (f64)arg1/1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387BEC(s32 arg0, s32 arg1){
|
||||
s32 v0;
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
if(v0 = func_8034C528(arg0)){
|
||||
func_8034DFB0(v0, &D_803902B4, &D_803902C4, (f64)arg1/1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387C5C(void){
|
||||
ParticleEmitter *actor;
|
||||
|
||||
func_802BB3DC(0, 60.0f, 0.9f);
|
||||
actor = partEmitList_pushNew(1);
|
||||
particleEmitter_setSprite(actor, ASSET_4A0_SPRITE_EXPLOSION);
|
||||
func_802EFA5C(actor, 0.1f, 0.2f);
|
||||
func_802EFA70(actor, 8);
|
||||
particleEmitter_setStartingFrameRange(actor, 0, 0);
|
||||
particleEmitter_setParticleFramerateRange(actor, 4.0f, 4.0f);
|
||||
func_802EFB70(actor, 10.0f, 10.0f);
|
||||
func_802EFB84(actor, 15.0f, 20.0f);
|
||||
func_802EFEC0(actor, 4.0f, 4.0f);
|
||||
particleEmitter_setParticleVelocityRange(actor, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
func_802EF3F4(actor, &D_803902D4, &D_803902E0, 1);
|
||||
}
|
||||
|
||||
void func_80387D80(void){
|
||||
ParticleEmitter *actor = partEmitList_pushNew(3);
|
||||
particleEmitter_setSprite(actor, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setStartingFrameRange(actor, 0, 7);
|
||||
func_802EFB98(actor, &D_80390304);
|
||||
particleEmitter_setParticleVelocityRange(actor, 0.0f, 100.0f, 0.0f, 0.0f, 200.0f ,0.0f);
|
||||
func_802EF3F4(actor, &D_803902EC, &D_803902F8, 3);
|
||||
}
|
||||
|
||||
void func_80387E20(void){
|
||||
ParticleEmitter *actor = partEmitList_pushNew(0x19);
|
||||
func_802EF9F8(actor, 0.6f);
|
||||
func_802EFA18(actor, 3);
|
||||
particleEmitter_setModel(actor, 0x427);
|
||||
func_802EFB70(actor, 0.05f, 0.4f);
|
||||
func_802EFE24(actor, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setSpawnIntervalRange(actor, 0.0f, 0.01f);
|
||||
func_802EFEC0(actor, 10.0f, 10.0f);
|
||||
particleEmitter_setVelocityAndAccelerationRanges(actor, &D_80390344);
|
||||
func_802EF3F4(actor, &D_8039032C, &D_80390338, 0x19);
|
||||
}
|
||||
|
||||
void func_80387F18(ActorMarker *marker, s32 arg1){
|
||||
func_803881E8(marker_getActor(marker), arg1);
|
||||
}
|
||||
|
||||
void func_80387F44(void){
|
||||
func_80250E94(0.5f, 1.0f, 1.5f, 0.0f, 1.0f, 1.5f);
|
||||
}
|
||||
|
||||
void func_80387F88(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
timedFunc_set_0(0.0f, func_80387C5C);
|
||||
timed_playSfx(0.1f, SFX_1B_EXPLOSION_1, 1.0f, 22000);
|
||||
timed_playSfx(0.1f, SFX_1B_EXPLOSION_1, 1.0f, 22000);
|
||||
timedFunc_set_0(0.3f, func_80387E20);
|
||||
timedFunc_set_0(0.5f, func_80387A54);
|
||||
timedFunc_set_0(0.4f, func_80387B24);
|
||||
timed_playSfx(0.41f, SFX_1B_EXPLOSION_1, 0.8f, 22000);
|
||||
timed_playSfx(0.41f, SFX_1B_EXPLOSION_1, 0.8f, 22000);
|
||||
timedFunc_set_0(0.55f, func_80387D80);
|
||||
timed_playSfx(0.71f, SFX_1B_EXPLOSION_1, 0.6f, 22000);
|
||||
timed_playSfx(0.71f, SFX_1B_EXPLOSION_1, 0.6f, 22000);
|
||||
timedFunc_set_0(0.8f, func_80387D80);
|
||||
timed_playSfx(1.0f, SFX_1A_BIG_THINGS_FALL_OVER, 1.0f, 22000);
|
||||
timed_playSfx(2.0f, SFX_1A_BIG_THINGS_FALL_OVER, 0.8f, 22000);
|
||||
timed_playSfx(3.0f, SFX_1A_BIG_THINGS_FALL_OVER, 0.6f, 22000);
|
||||
func_80324E88(4.0f);
|
||||
func_80324E38(4.0f, 0);
|
||||
timedFunc_set_2(4.0f, (TFQM2) func_80387F18, (s32) actor->marker, 3);
|
||||
}
|
||||
|
||||
void func_80388154(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_803879F0();
|
||||
timedFunc_set_0(0.0f, (TFQM0) func_80387F44);
|
||||
timed_playSfx(0.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 0x7fc6);
|
||||
timedFunc_set_2(1.2f, (TFQM2) func_80387B8C, 0x19f, 0);
|
||||
timed_setCameraToNode(1.2f, 8);
|
||||
timedFunc_set_1(1.5f, (TFQM1) func_80387F88, (s32) actor->marker);
|
||||
}
|
||||
|
||||
void func_803881E8(Actor *this, s32 arg1){
|
||||
this->state = arg1;
|
||||
if(this->state == 2){
|
||||
func_80387960(0.05f);
|
||||
timedFunc_set_2(0.05f, (TFQM2)func_80387BEC, 0x19f, 0x1f4);
|
||||
timedFunc_set_2(0.1f, (TFQM2)func_8025A6EC, COMUSIC_2B_DING_B, 28000);
|
||||
func_80324E38(0.2f, 3);
|
||||
timed_setCameraToNode(1.1f, 7);
|
||||
timedFunc_set_1(1.6f, (TFQM1)func_80388154, (s32)this->marker);
|
||||
levelSpecificFlags_set(0x2D, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_803882B4(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1)
|
||||
func_803881E8(actor, 2);
|
||||
}
|
||||
|
||||
void func_803882F4(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
if(levelSpecificFlags_get(0x2d)){
|
||||
func_80387AC0();
|
||||
func_80387960(0.0f);
|
||||
func_80387B24();
|
||||
func_803881E8(this, 3);
|
||||
}else{
|
||||
marker_setCollisionScripts(this->marker, NULL, func_803882B4, NULL);
|
||||
func_8032AA58(this, 1.1f);
|
||||
func_803881E8(this, 1);
|
||||
}
|
||||
}
|
||||
}
|
183
src/RBB/code_1FC0.c
Normal file
183
src/RBB/code_1FC0.c
Normal file
@@ -0,0 +1,183 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
}ActorLocal_RBB_1FC0;
|
||||
|
||||
Actor *func_8038846C(ActorMarker * marker, Gfx **gdl, Mtx **mptr, Vtx **arg3);
|
||||
void func_80388620(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390380 = {
|
||||
0x2E, 0x1C6, 0x419, 0x0, NULL,
|
||||
func_80388620, NULL, func_8038846C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_803883B0(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_1FC0 *local = (ActorLocal_RBB_1FC0 *)&this->local;
|
||||
|
||||
local->unk5 = 0;
|
||||
if(arg1 == 2){
|
||||
FUNC_8030E624(SFX_66_BIRD_AUUGHH, 0.6f, 32675);
|
||||
func_80335924(this->unk148, 0x137, 0.0f, 0.8f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_80388430(ActorMarker * marker, ActorMarker *other_marker){
|
||||
Actor * actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_1FC0 *local = (ActorLocal_RBB_1FC0 *) &actor->local;
|
||||
func_8030E6D4(SFX_111_WHIPCRACK_DEATH);
|
||||
local->unk5 = 1;
|
||||
}
|
||||
|
||||
Actor *func_8038846C(ActorMarker * marker, Gfx **gdl, Mtx **mptr, Vtx **vtx){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_1FC0 *local = (ActorLocal_RBB_1FC0 *) &actor->local;
|
||||
s32 sp5C;
|
||||
f32 pad58;
|
||||
f32 sp4C[3];
|
||||
f32 sp40[3];
|
||||
f32 sp34[3];
|
||||
|
||||
if(actor->state == 0){
|
||||
return actor;
|
||||
}
|
||||
|
||||
if(local->unk4){
|
||||
sp5C = func_803356A0(actor->unk148);
|
||||
sp40[0] = 0.0f;
|
||||
sp40[1] = local->unk0;
|
||||
sp40[2] = 0.0f;
|
||||
func_80345C78(&sp4C, &sp40);
|
||||
func_8033A8F0(sp5C, 1, &sp4C);
|
||||
|
||||
sp34[0] = 0.0f;
|
||||
sp34[1] = 0.0f;
|
||||
sp34[2] = (local->unkC*0.5)/200.0;
|
||||
ml_vec3f_yaw_rotate_copy(sp34, sp34, local->unk0);
|
||||
func_8033A968(sp5C, 1, sp34);
|
||||
|
||||
sp34[0] = 0.0f;
|
||||
sp34[1] = 0.0f;
|
||||
sp34[2] = local->unkC/200.0f;
|
||||
func_8033A968(sp5C, 0x12, sp34);
|
||||
func_80335918(actor->unk148);
|
||||
}
|
||||
func_8033A45C(3, (0.0f < local->unk8)? 1 : 0);
|
||||
func_8033A45C(4, (0.0f < local->unk8)? 1 : 0);
|
||||
func_80325888(marker, gdl, mptr, vtx);
|
||||
local->unk4 = actor->marker->unk14_21;
|
||||
return actor;
|
||||
}
|
||||
|
||||
void func_80388620(Actor *this){
|
||||
f32 plyr_pos[3];
|
||||
f32 sp60;
|
||||
f32 sp5C;
|
||||
f32 sp58;
|
||||
ActorLocal_RBB_1FC0 *local = (ActorLocal_RBB_1FC0 *)&this->local;
|
||||
f32 sp50 = time_getDelta();
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
f32 tmp_f2;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
marker_setCollisionScripts(this->marker, func_80388430, NULL, NULL);
|
||||
local->unk4 = 0;
|
||||
local->unk0 = 0.0f;
|
||||
local->unk8 = 0.0f;
|
||||
local->unkC = 0.0f;
|
||||
local->unk10 = 0.0f;
|
||||
local->unk14 = 0.0f;
|
||||
func_803883B0(this, 1);
|
||||
}
|
||||
player_getPosition(plyr_pos);
|
||||
func_80258A4C(this->position, this->yaw + -90.0f, plyr_pos, &sp60, &sp5C, &sp58);
|
||||
if(sp60 < 600.0f)
|
||||
local->unk8 = 1.0f;
|
||||
else{
|
||||
local->unk8 -= sp50;
|
||||
local->unk8 = MAX(0.0f, local->unk8);
|
||||
}
|
||||
|
||||
if( 500.0f <= local->unk10
|
||||
&& sp60 < 500.0f
|
||||
&& (sp58 < -0.2 || 0.2 < sp58)
|
||||
){
|
||||
FUNC_8030E624(SFX_C4_TWINKLY_MUNCHER_GRR, 0.8f, 32675);
|
||||
}
|
||||
|
||||
local->unk10 = sp60;
|
||||
local->unk14 = local->unk14 + sp50;
|
||||
|
||||
if( sp60 < 600.0f
|
||||
&& -1.0f < sp58
|
||||
&& sp58 < 1.0f
|
||||
&& plyr_pos[1] < this->position_y + this->scale*200.0f
|
||||
){
|
||||
func_80258A4C(this->position, (this->yaw + -90.0f) + local->unk0, plyr_pos, &sp60, &sp5C, &sp58);
|
||||
local->unk0 += (sp58*200.0f)*sp50;
|
||||
if(1.0f < local->unk14 && (sp58 < -0.1 || 0.1 < sp58)){
|
||||
func_8030E6A4(SFX_D0_GRIMLET_SQUEAK, mlAbsF(sp58) * 0.1 + 0.9, 0x4e20);
|
||||
local->unk14 = 0.0f;
|
||||
}
|
||||
}
|
||||
else{//L80388964
|
||||
if(0.0f < local->unk0){
|
||||
local->unk0 -= 30.0f*sp50;
|
||||
local->unk0 = MAX(0.0f, local->unk0);
|
||||
}//L803889B4
|
||||
else{
|
||||
if(local->unk0 < 0.0f){
|
||||
local->unk0 += 30.0f*sp50;
|
||||
local->unk0 = MIN(0.0f, local->unk0);
|
||||
}
|
||||
}
|
||||
}//L803889F8
|
||||
|
||||
if(this->state == 1){
|
||||
if( sp60 < 400.0f
|
||||
&& -0.8 <= sp58
|
||||
&& sp58 <= 0.8
|
||||
&& (plyr_pos[1] - this->position_y) < 100.0f
|
||||
&& -100.0f < (plyr_pos[1] - this->position_y)
|
||||
){
|
||||
func_803883B0(this, 2);
|
||||
}
|
||||
}//L80388AB8
|
||||
|
||||
if(this->state == 2){
|
||||
func_8033568C(this->unk148, &sp4C, &sp48);
|
||||
if(0.6 <= sp48)
|
||||
tmp_f2 = 1.0 - 2*(sp48 - 0.6);
|
||||
else
|
||||
tmp_f2 = sp48*1.6666666666666667;
|
||||
//L80388B34
|
||||
local->unkC = tmp_f2*sp60;
|
||||
|
||||
if( sp4C < 0.55
|
||||
&& 0.55 <= sp48
|
||||
&& !local->unk5
|
||||
){
|
||||
FUNC_8030E8B4(SFX_20_METAL_CLANK_1, 1.0f, 32000, this->position, 500, 2500);
|
||||
}
|
||||
|
||||
if(func_80335794(this->unk148) > 0)
|
||||
func_803883B0(this, 1);
|
||||
}//L80388BB0
|
||||
}
|
84
src/RBB/code_27E0.c
Normal file
84
src/RBB/code_27E0.c
Normal file
@@ -0,0 +1,84 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
}ActorLocal_RBB_27E0;
|
||||
|
||||
void func_80388C20(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803903B0 = {
|
||||
0x18B, 0x17B, 0x409, 0x0, NULL,
|
||||
func_80388C20, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803903D4 = {
|
||||
0x18C, 0x17C, 0x40A, 0x0, NULL,
|
||||
func_80388C20, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803903F8 = {
|
||||
0x18D, 0x17D, 0x40B, 0x0, NULL,
|
||||
func_80388C20, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
f32 D_8039041C[3] = {40.0f, -30.0f, 20.0f}; //rotation rates (deg/sec);
|
||||
|
||||
/* .code */
|
||||
void func_80388BD0(Actor *this, s32 arg1){
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_80388BE8(Actor *actor){
|
||||
ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local;
|
||||
if(actor->modelCacheIndex == 0x17b){
|
||||
func_8030DA44(local->unk0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388C20(Actor *this){
|
||||
ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&this->local;
|
||||
f32 sp28 = time_getDelta();
|
||||
if(!this->unk16C_4){
|
||||
actor_collisionOff(this);
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->marker->unk30 = func_80388BE8;
|
||||
this->unk16C_4 = 1;
|
||||
if(this->modelCacheIndex == 0x17B){
|
||||
local->unk0 = func_8030D90C();
|
||||
func_8030DEB4(local->unk0, 1000.0f, 2000.0f);
|
||||
func_8030DF68(local->unk0, &this->position);
|
||||
func_8030DBB4(local->unk0, 0.5f);
|
||||
sfxsource_setSfxId(local->unk0, SFX_9F_GENERATOR_RUNNING);
|
||||
func_8030DD14(local->unk0, 3);
|
||||
sfxsource_setSampleRate(local->unk0, 0);
|
||||
func_8030E2C4(local->unk0);
|
||||
}//L80388CFC
|
||||
if(this->state == 0){
|
||||
if(this->modelCacheIndex == 0x17B){
|
||||
TUPLE_ASSIGN(this->position, 0.0f, -50.0f, 700.0f);
|
||||
}
|
||||
else if(this->modelCacheIndex == 0x17C){//L80388DA8
|
||||
TUPLE_ASSIGN(this->position, 0.0f, -50.0f, 500.0f);
|
||||
}
|
||||
else if(this->modelCacheIndex == 0x17D){
|
||||
TUPLE_ASSIGN(this->position, 0.0f, -50.0f, 300.0f);
|
||||
}
|
||||
func_80388BD0(this, 1);
|
||||
}
|
||||
}//L80388DA8
|
||||
if(this->state == 1){
|
||||
this->roll += D_8039041C[this->modelCacheIndex - 0x17B]*sp28;
|
||||
if(360.0f <= this->roll)
|
||||
this->roll -= 360.0f;
|
||||
if(this->modelCacheIndex == 0x17B){
|
||||
func_8030DB04(local->unk0, 0x61a8, &this->position, 1000.0f, 2000.0f);
|
||||
}
|
||||
}
|
||||
}
|
129
src/RBB/code_2A70.c
Normal file
129
src/RBB/code_2A70.c
Normal file
@@ -0,0 +1,129 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
f32 unk4[3];
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18[3];
|
||||
}ActorLocal_RBB_2A70_0;
|
||||
|
||||
typedef struct {
|
||||
ActorLocal_RBB_2A70_0 *unk0;
|
||||
f32 unk4[3];
|
||||
f32 unk10[3];
|
||||
f32 unk1C;
|
||||
u8 pad20[0x4];
|
||||
f32 unk24;
|
||||
}ActorLocal_RBB_2A70;
|
||||
|
||||
void func_803890BC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorLocal_RBB_2A70_0 D_80390430[] = {
|
||||
{0x178, {0.0f, -60.0f, 2450.0f}, 0.0f, 6.0f, { 0.0f, -100.0f, 1900.0f}},
|
||||
{0x179, {-1600.0f, 730.0f, -700.0f}, 270.0f, 6.0f, { -1600.0f, 810.0f, -1400.0f}},
|
||||
{0x17A, {1600.0f, 730.0f, -700.0f}, 270.0f, 5.0f, { 1600.0f, 810.0f, -1400.0f}},
|
||||
0
|
||||
};
|
||||
|
||||
ActorInfo D_803904C0 = {
|
||||
0x188, 0x178, 0x40C, 0x0, NULL,
|
||||
func_803890BC, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803904E4 = {
|
||||
0x189, 0x179, 0x40D, 0x0, NULL,
|
||||
func_803890BC, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390508 = {
|
||||
0x18A, 0x17A, 0x40E, 0x0, NULL,
|
||||
func_803890BC, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
ActorLocal_RBB_2A70_0 *func_80388E60(Actor *this){
|
||||
ActorLocal_RBB_2A70_0 * iPtr;
|
||||
for(iPtr = D_80390430; iPtr->unk0 != 0; iPtr++){
|
||||
if(iPtr->unk0 == this->modelCacheIndex)
|
||||
return iPtr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void func_80388EB8(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_2A70 *local = (ActorLocal_RBB_2A70 *)&this->local;
|
||||
s32 sp30;
|
||||
|
||||
if(this->state == 2)
|
||||
FUNC_8030E8B4(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000, this->position, 1000, 2300);
|
||||
|
||||
this->state = arg1;
|
||||
local->unk24 = 0.0f;
|
||||
|
||||
if(this->state == 1)
|
||||
local->unk24 = local->unk0->unk14;
|
||||
|
||||
if(this->state == 2){
|
||||
sp30 = func_802F9AA8(SFX_94_COGS_ROTATING);
|
||||
func_802F9DB8(sp30, 1.0f, 1.0f, 0.0f);
|
||||
func_802F9EC4(sp30, &local->unk0->unk18, 1700, 2500);
|
||||
func_802F9F80(sp30, 0.3f, 3.4f, 0.3f);
|
||||
func_802FA060(sp30, 25000, 25000, 0.0f);
|
||||
this->pitch += ( 360.0f <= this->pitch) ? -360 : 0;
|
||||
this->yaw += ( 360.0f <= this->yaw) ? -360 : 0;
|
||||
this->roll += ( 360.0f <= this->roll) ? -360 : 0;
|
||||
|
||||
local->unk4[0] = this->pitch;
|
||||
local->unk4[1] = this->yaw;
|
||||
local->unk4[2] = this->roll;
|
||||
|
||||
local->unk10[0] = this->pitch;
|
||||
local->unk10[1] = this->yaw;
|
||||
local->unk10[2] = this->roll + 360.0f;
|
||||
|
||||
local->unk1C = 0.0f;
|
||||
FUNC_8030E8B4(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000, this->position, 900, 1800);
|
||||
}//L803890A8
|
||||
}
|
||||
|
||||
void func_803890BC(Actor *this){
|
||||
ActorLocal_RBB_2A70 *local = (ActorLocal_RBB_2A70 *)&this->local;
|
||||
f32 sp38 = time_getDelta();
|
||||
f32 sp2C[3];
|
||||
if(!this->unk16C_4){
|
||||
actor_collisionOff(this);
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = func_80388E60(this);
|
||||
this->position[0] = local->unk0->unk4[0];
|
||||
this->position[1] = local->unk0->unk4[1];
|
||||
this->position[2] = local->unk0->unk4[2];
|
||||
this->roll = local->unk0->unk10;
|
||||
if(this->state == 0)
|
||||
func_80388EB8(this, 1);
|
||||
}//L80389164
|
||||
|
||||
if(func_8025773C(&local->unk24, sp38))
|
||||
func_80388EB8(this, (this->state == 1) ? 2 : 1);
|
||||
//L803891A8
|
||||
|
||||
if(this->state == 2){
|
||||
local->unk1C += 0.25 * sp38;
|
||||
if(1.0f < local->unk1C)
|
||||
local->unk1C = 1.0f;
|
||||
func_80255FE4(sp2C, local->unk4, local->unk10, local->unk1C);
|
||||
this->pitch = sp2C[0];
|
||||
this->yaw = sp2C[1];
|
||||
this->roll = sp2C[2];
|
||||
if(local->unk1C == 1.0f)
|
||||
func_80388EB8(this, 1);
|
||||
}//L80389264
|
||||
}
|
200
src/RBB/code_2E90.c
Normal file
200
src/RBB/code_2E90.c
Normal file
@@ -0,0 +1,200 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s16 uid;
|
||||
f32 unk4[3];
|
||||
f32 unk10[3];
|
||||
f32 unk1C[3];
|
||||
f32 unk28[3];
|
||||
f32 unk34[3];
|
||||
f32 unk40;
|
||||
}Struct_RBB_2E90_0;
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
Struct_RBB_2E90_0 *unkC;
|
||||
f32 unk10[3];
|
||||
f32 unk1C[3];
|
||||
f32 unk28;
|
||||
}ActorLocal_RBB_2E90;
|
||||
|
||||
void func_8038944C(Actor *this);
|
||||
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_2E90_0 D_80390530[] = {
|
||||
{
|
||||
0x1BB,
|
||||
{0.0f, 641.45f, -1400.0f},
|
||||
{0.0f, 0.0f, 90.0f},
|
||||
{0.0f, 0.0f, 360.0f},
|
||||
{0.0f, 0.0f, 270.0f},
|
||||
{0.0f, 0.0f, 90.0f},
|
||||
4.0f
|
||||
},
|
||||
{
|
||||
0x1BC,
|
||||
{-800.0f, 641.45f, -2400.0f},
|
||||
{ 95.0f, 0.0f, 0.0f},
|
||||
{380.0f, 0.0f, 0.0f},
|
||||
{285.0f, 0.0f, 0.0f},
|
||||
{ 90.0f, 0.0f, 0.0f},
|
||||
4.25f
|
||||
},
|
||||
{
|
||||
0x1BD,
|
||||
{800.0f, 641.45f, -2400.0f},
|
||||
{100.0f, 0.0f, 0.0f},
|
||||
{400.0f, 0.0f, 0.0f},
|
||||
{300.0f, 0.0f, 0.0f},
|
||||
{90.0f, 0.0f, 0.0f},
|
||||
4.5f
|
||||
},
|
||||
{0}
|
||||
};
|
||||
|
||||
ActorInfo D_80390640 = {
|
||||
0x191, 0x1BB, 0x40F, 0x0, NULL,
|
||||
func_8038944C, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390664 = {
|
||||
0x192, 0x1BC, 0x410, 0x0, NULL,
|
||||
func_8038944C, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390688 = {
|
||||
0x193, 0x1BD, 0x411, 0x0, NULL,
|
||||
func_8038944C, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Struct_RBB_2E90_0 * func_80389280(Actor *this){
|
||||
Struct_RBB_2E90_0 * iPtr;
|
||||
for(iPtr = D_80390530; iPtr->uid != 0; iPtr++){
|
||||
if(iPtr->uid == this->modelCacheIndex)
|
||||
return iPtr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void func_803892D8(Actor *this, s32 arg1){
|
||||
f32 pad;
|
||||
ActorLocal_RBB_2E90 *local = (ActorLocal_RBB_2E90 *)&this->local;
|
||||
this->state = arg1;
|
||||
|
||||
local->unk28 = 0.0f;
|
||||
if(this->state == 1){
|
||||
local->unk0[2] = 0.0f;
|
||||
local->unk0[1] = 0.0f;
|
||||
local->unk0[0] = 0.0f;
|
||||
ml_vec3f_copy(&local->unk10, &local->unkC->unk1C);
|
||||
ml_vec3f_copy(&local->unk1C, &local->unkC->unk1C);
|
||||
}//L8038935C
|
||||
|
||||
if(this->state == 2){
|
||||
ml_vec3f_copy(&local->unk0, &local->unkC->unk28);
|
||||
ml_vec3f_copy(&local->unk1C, &local->unkC->unk10);
|
||||
local->unk28 = local->unkC->unk40;
|
||||
}//L803893A8
|
||||
|
||||
if(this->state == 3){
|
||||
ml_vec3f_copy(&local->unk0, &local->unkC->unk28);
|
||||
ml_vec3f_copy(&local->unk1C, &local->unkC->unk1C);
|
||||
local->unk28 = local->unkC->unk40;
|
||||
}//L803893F4
|
||||
|
||||
if(this->state == 4){
|
||||
ml_vec3f_copy(&local->unk0, &local->unkC->unk34);
|
||||
ml_vec3f_copy(&local->unk10, &local->unkC->unk1C);
|
||||
local->unk1C[2] = 0.0f;
|
||||
local->unk1C[1] = 0.0f;
|
||||
local->unk1C[0] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038944C(Actor *this){
|
||||
ActorLocal_RBB_2E90 *local = (ActorLocal_RBB_2E90 *)&this->local;
|
||||
f32 tick;
|
||||
int i;
|
||||
f32 sp50[3];
|
||||
f32 sp44[3];
|
||||
|
||||
tick = time_getDelta();
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = TRUE;
|
||||
local->unkC = func_80389280(this);
|
||||
if(this->state == 0){
|
||||
ml_vec3f_copy(&this->position, &local->unkC->unk4);
|
||||
local->unk0[0] = local->unk0[1] = local->unk0[2] = 0.0f;
|
||||
local->unk10[0] = local->unk10[1] = local->unk10[2] = 0.0f;
|
||||
local->unk1C[0] = local->unk1C[1] = local->unk1C[2] = 0.0f;
|
||||
|
||||
local->unk28 = 0.0f;
|
||||
func_803892D8(this, 1);
|
||||
}
|
||||
}//L80389508
|
||||
|
||||
if(func_8025773C(&local->unk28, tick)){
|
||||
if(this->state == 2)
|
||||
func_803892D8(this, 3);
|
||||
else if(this->state == 3)
|
||||
func_803892D8(this, 2);
|
||||
}//L80389568
|
||||
|
||||
switch (this->state)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
sp50[0] = this->pitch;
|
||||
sp50[1] = this->yaw;
|
||||
sp50[2] = this->roll;
|
||||
this->pitch += local->unk10[0]*tick ;
|
||||
this->yaw += local->unk10[1]*tick ;
|
||||
this->roll += local->unk10[2]*tick ;
|
||||
|
||||
sp44[0] = this->pitch;
|
||||
sp44[1] = this->yaw;
|
||||
sp44[2] = this->roll;
|
||||
|
||||
for(i = 0; i < 3; i++){
|
||||
if( (sp50[i] < 90.0f && 90.0f <= sp44[i])
|
||||
|| (sp50[i] < 270.0f && 270.0f <= sp44[i])
|
||||
|| (sp50[i] < 180.0f && 180.0f <= sp44[i])
|
||||
|| (sp50[i] < 360.0f && 360.0f <= sp44[i])
|
||||
){
|
||||
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.4f, 23000, this->position, 50, 1000);
|
||||
}
|
||||
}
|
||||
this->pitch += (360.0f <= this->pitch)? -360 : 0;
|
||||
this->yaw += (360.0f <= this->yaw)? -360 : 0;
|
||||
this->roll += (360.0f <= this->roll)? -360 : 0;
|
||||
|
||||
for(i = 0; i < 3; i++){//L803897B8
|
||||
if( local->unk10[i] < local->unk1C[i] ){
|
||||
local->unk10[i] += local->unk0[i]*tick;
|
||||
local->unk10[i] = MIN(local->unk1C[i] , local->unk10[i]);
|
||||
}
|
||||
else if( local->unk1C[i] < local->unk10[i]){
|
||||
local->unk10[i] -= local->unk0[i]*tick;
|
||||
local->unk10[i] = MAX(local->unk1C[i] , local->unk10[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}//L80389860
|
||||
|
||||
if(this->state == 1 && mapSpecificFlags_get(0)){
|
||||
func_803892D8(this, 2);
|
||||
}
|
||||
if(tick);
|
||||
}
|
53
src/RBB/code_34B0.c
Normal file
53
src/RBB/code_34B0.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_803899C0(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803906B0 = {
|
||||
0x194, 0x1BE, 0x412, 0x0, NULL,
|
||||
func_803899C0, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_803898A0(void){
|
||||
mapSpecificFlags_set(0, 1);
|
||||
}
|
||||
|
||||
void func_803898C4(Actor * this, s32 arg1){
|
||||
this->state = arg1;
|
||||
if(this->state == 2){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
this->position_y -= 35.0f;
|
||||
func_80324E38(1.0f, 3);
|
||||
timed_setCameraToNode(1.0f, 0);
|
||||
timedFunc_set_0(1.0f, func_803898A0);
|
||||
func_80324E88(5.0f);
|
||||
func_80324E38(5.0f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80389980(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1){
|
||||
func_803898C4(actor, 2);
|
||||
}
|
||||
}
|
||||
|
||||
void func_803899C0(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
mapSpecificFlags_set(0, 0);
|
||||
marker_setCollisionScripts(this->marker, NULL, func_80389980, 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);
|
||||
}
|
||||
}
|
||||
}
|
128
src/RBB/code_36A0.c
Normal file
128
src/RBB/code_36A0.c
Normal file
@@ -0,0 +1,128 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
f32 unk4;
|
||||
s32 unk8;
|
||||
f32 unkC;
|
||||
}ActorLocal_RBB_36A0;
|
||||
|
||||
void func_80389C78(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_803906E0 = {
|
||||
0x185, 0x175, 0x403, 0x0, NULL,
|
||||
func_80389C78, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390704[4] = {0x258, 0x12C, 0x12C, 0};
|
||||
|
||||
/*.code */
|
||||
f32 func_80389A90(void){
|
||||
return (f32) D_80390704[2*levelSpecificFlags_get(0x27) + levelSpecificFlags_get(0x28)];
|
||||
}
|
||||
|
||||
void func_80389ADC(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||
if(arg1 == 1){
|
||||
local->unkC = func_80389A90();
|
||||
local->unk4 = func_80389A90();
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
int func_80389B44(ActorMarker* marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&actor->local;
|
||||
|
||||
return (0.0f < local->unk4);
|
||||
}
|
||||
|
||||
|
||||
void func_80389B80(Actor *this, f32 arg1){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||
local->unk0 = func_802F9AA8(0x400);
|
||||
func_802F9DB8(local->unk0, arg1, arg1, 0.0f);
|
||||
func_802F9F80(local->unk0, 0.0f, 8999999488.0f, 0.0f);
|
||||
func_802FA060(local->unk0, 0x4650, 0x4650, 0.0f);
|
||||
if(!levelSpecificFlags_get(3) && !levelSpecificFlags_get(4)){
|
||||
func_802F9EC4(local->unk0, &this->position, 0x1f4, 0x7d0);
|
||||
func_802FA0B0(local->unk0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80389C44(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){
|
||||
ActorLocal_RBB_36A0 * local = (ActorLocal_RBB_36A0 *)&this->local;
|
||||
f32 tmp;
|
||||
f32 sp34 = time_getDelta();
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->pitch = randf2(0.0f, 300.0f);
|
||||
func_803300C0(this->marker, func_80389B44);
|
||||
func_803300D8(this->marker, func_80389C44);
|
||||
func_80389B80(this, 1.0f);
|
||||
if(this->unk78_13 == 0x1C){
|
||||
local->unk8 = 0;
|
||||
this->position_x = 7625.5f;
|
||||
this->position_y = -1950.0f;
|
||||
this->position_z = 300.0f;
|
||||
}
|
||||
else{//L80389D4C
|
||||
local->unk8 = 1;
|
||||
this->position_x = 7625.5f;
|
||||
this->position_y = -1950.0f;
|
||||
this->position_z = -300.0f;
|
||||
}//L80389D7C
|
||||
local->unk4 = 0.0f;
|
||||
local->unkC = 0.0f;
|
||||
func_80389ADC(this, 1);
|
||||
if(levelSpecificFlags_get(local->unk8 ? 4 : 3)){
|
||||
set_camera_to_node(9);
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_2(0.1f, (TFQM2)levelSpecificFlags_set, local->unk8 ? 0x28 : 0x27, 1);
|
||||
func_80324E88(4.5f);
|
||||
func_80324E38(4.5f, 0);
|
||||
timedFunc_set_2(4.5f, (TFQM2)levelSpecificFlags_set, local->unk8 ? 0x4 : 0x3, 0);
|
||||
timedFunc_set_3(4.5f, (TFQM3)func_802E4078, MAP_34_RBB_ENGINE_ROOM, !local->unk8 ? 3 : 2, 0);
|
||||
func_803228D8();
|
||||
}
|
||||
}//L80389EA8
|
||||
|
||||
tmp = this->pitch;
|
||||
this->pitch -= local->unkC*sp34;
|
||||
if( (0.0f < tmp && this->pitch <= 0.0f)
|
||||
|| (180.0f < tmp && this->pitch <= 180.0f)
|
||||
){
|
||||
if(levelSpecificFlags_get(3) || levelSpecificFlags_get(4))
|
||||
func_8030E760(SFX_2_CLAW_SWIPE, 0.4f, 0x4e20);
|
||||
else
|
||||
func_8030E988(SFX_2_CLAW_SWIPE, 0.4f, 0x4e20, &this->position, 500.0f, 1000.0f);
|
||||
}//L80389F94
|
||||
if(this->pitch < 0.0f)
|
||||
this->pitch += 360.0f;
|
||||
|
||||
if(this->state == 1){
|
||||
local->unk4 = func_80389A90();
|
||||
if(local->unkC < local->unk4){
|
||||
local->unkC += 75*sp34;
|
||||
local->unkC = MIN(local->unk4, local->unkC);
|
||||
}//L8038A03C
|
||||
if(local->unk4 < local->unkC){
|
||||
local->unkC -= 75*sp34;
|
||||
local->unkC = MAX(local->unk4, local->unkC);
|
||||
}
|
||||
}//L8038A08C
|
||||
}
|
124
src/RBB/code_3CB0.c
Normal file
124
src/RBB/code_3CB0.c
Normal file
@@ -0,0 +1,124 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_8028F9DC(s32);
|
||||
extern void func_803253A0(Actor *);
|
||||
extern void func_8033A2D4(void(*)(Actor *), Actor *);
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s16 unk0[3];
|
||||
s16 unk6;
|
||||
s16 unk8;
|
||||
s16 unkA;
|
||||
}Struct_RBB_3CB0;
|
||||
|
||||
typedef struct {
|
||||
Struct_RBB_3CB0 *unk0;
|
||||
void *unk4;
|
||||
}ActorLocal_RBB_3CB0;
|
||||
|
||||
void func_8038A324(Actor *this);
|
||||
Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_3CB0 D_80390720[2] = {
|
||||
{{0x0640, 0x324, 0xF6A0}, 0, 3, 0x27},
|
||||
{{0xF9C0, 0x324, 0xF6A0}, 0x405, 4, 0x28}
|
||||
};
|
||||
|
||||
ActorInfo D_80390738 = {
|
||||
0x186, 0x176, 0x404, 0x0, NULL,
|
||||
func_8038A324, NULL, func_8038A224,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038A0A0(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local;
|
||||
|
||||
if(arg1 == 1)
|
||||
if(this->state == 2)
|
||||
this->position_y += 40.0f;
|
||||
|
||||
if(arg1 == 2){
|
||||
if(this->state == 1)
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
this->position_y -= 40.0f;
|
||||
if(this->state == 1){
|
||||
levelSpecificFlags_set(local->unk0->unk8, 1);
|
||||
func_803228D8();
|
||||
timedFunc_set_1(1.1f, (TFQM1)func_8028F9DC, 2);
|
||||
timedFunc_set_3(1.1f, (TFQM3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0);
|
||||
}else{
|
||||
levelSpecificFlags_set(local->unk0->unkA, 1);
|
||||
}
|
||||
}//L8038A1A0
|
||||
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038A1C8(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1){
|
||||
func_8038A0A0(actor, 2);
|
||||
}
|
||||
else if(actor->state == 2){
|
||||
func_8038FF40();
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_8038A224(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
||||
|
||||
if(actor->state == 0){
|
||||
return actor;
|
||||
}
|
||||
|
||||
func_8033A2D4(func_803253A0, actor);
|
||||
if(local->unk4){
|
||||
func_803391A4(gdl, mptr, &actor->position, NULL, 1.0f, NULL, local->unk4);
|
||||
}
|
||||
else{
|
||||
func_803391A4(gdl, mptr, &actor->position, NULL, 1.0f, NULL, func_80330B1C(marker));
|
||||
}
|
||||
return actor;
|
||||
}
|
||||
|
||||
void func_8038A2F8(Actor *actor){
|
||||
ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&actor->local;
|
||||
if(local->unk4)
|
||||
assetcache_release(local->unk4);
|
||||
}
|
||||
|
||||
void func_8038A324(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->unk16C_4 = 1;
|
||||
local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)];
|
||||
if(local->unk0->unk6 == 0)
|
||||
local->unk4 = NULL;
|
||||
else
|
||||
local->unk4 = assetcache_get(local->unk0->unk6);
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038A1C8, NULL);
|
||||
this->position_x = (f32)local->unk0->unk0[0];
|
||||
this->position_y = (f32)local->unk0->unk0[1];
|
||||
this->position_z = (f32)local->unk0->unk0[2];
|
||||
if(levelSpecificFlags_get(local->unk0->unkA))
|
||||
func_8038A0A0(this, 2);
|
||||
else
|
||||
func_8038A0A0(this, 1);
|
||||
}//L8038A47C
|
||||
if(this->state == 2){
|
||||
if( !levelSpecificFlags_get(local->unk0->unkA)
|
||||
&& !levelSpecificFlags_get(3)
|
||||
&& !levelSpecificFlags_get(4)
|
||||
){
|
||||
func_8038A0A0(this, 1);
|
||||
}
|
||||
}
|
||||
}
|
178
src/RBB/code_40F0.c
Normal file
178
src/RBB/code_40F0.c
Normal file
@@ -0,0 +1,178 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(d) ((d) >= 0) ? (d) : -(d)
|
||||
#endif
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
f32 unk0[3];
|
||||
f32 unkC[3];
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
}Struct_RBB_40F0;
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
f32 unk4[3];
|
||||
f32 unk10[3];
|
||||
f32 unk1C;
|
||||
}ActorLocal_RBB_40F0;
|
||||
|
||||
void func_8038A724(Actor *this);
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_40F0 D_80390760[4] = {
|
||||
{{ 1600.0f, 641.5f, -2700.0f}, {0.0f, 0.0f, 500.0f}, 0x27, 0},
|
||||
{{-1600.0f, 641.5f, -2700.0f}, {0.0f, 0.0f, 500.0f}, 0x28, 0},
|
||||
{{ 300.0f, 641.5f, -400.0f}, {-500.0f, 0.0f, 0.0f}, 0x27, 1},
|
||||
{{ -300.0f, 641.5f, -400.0f}, {-500.0f, 0.0f, 0.0f}, 0x28, 1},
|
||||
};
|
||||
|
||||
ActorInfo D_803907D0 = {
|
||||
0x187, 0x177, 0x406, 0x0, NULL,
|
||||
func_8038A724, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803907F4 = {
|
||||
0x18E, 0x17E, 0x406, 0x0, NULL,
|
||||
func_8038A724, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390818 = {
|
||||
0x18F, 0x17F, 0x407, 0x0, NULL,
|
||||
func_8038A724, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8039083C = {
|
||||
0x190, 0x180, 0x408, 0x0, NULL,
|
||||
func_8038A724, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
f32 D_80390860[3] = {1.0f, 0.5f, 0.5f};
|
||||
|
||||
/* .code */
|
||||
f32 func_8038A4E0(void){
|
||||
return D_80390860[2*levelSpecificFlags_get(0x27) + levelSpecificFlags_get(0x28)];
|
||||
}
|
||||
|
||||
void func_8038A524(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_40F0 *local = (ActorLocal_RBB_40F0 *)&this->local;
|
||||
|
||||
local->unk1C = 0.0f;
|
||||
|
||||
if(arg1 == 1){
|
||||
if(D_80390760[local->unk0].unk1A){
|
||||
func_8038A524(this, 2);
|
||||
return;
|
||||
}
|
||||
local->unk10[0] = D_80390760[local->unk0].unkC[0]*func_8038A4E0();
|
||||
local->unk10[1] = D_80390760[local->unk0].unkC[1]*func_8038A4E0();
|
||||
local->unk10[2] = D_80390760[local->unk0].unkC[2]*func_8038A4E0();
|
||||
}
|
||||
|
||||
|
||||
if(arg1 == 2){
|
||||
local->unk10[0] = D_80390760[local->unk0].unkC[0]*func_8038A4E0();
|
||||
local->unk10[1] = D_80390760[local->unk0].unkC[1]*func_8038A4E0();
|
||||
local->unk10[2] = D_80390760[local->unk0].unkC[2]*func_8038A4E0();
|
||||
}
|
||||
|
||||
if(arg1 == 3){
|
||||
local->unk10[2] = 0.0f;
|
||||
local->unk10[1] = 0.0f;
|
||||
local->unk10[0] = 0.0f;
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
f32 func_8038A6B8(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_40F0 *local = (ActorLocal_RBB_40F0 *)&actor->local;
|
||||
int i;
|
||||
f32 f12 = 0;
|
||||
|
||||
for(i = 0; i < 3; i++){
|
||||
f12 += ABS(local->unk4[i]);
|
||||
}
|
||||
return f12/500.0f;
|
||||
}
|
||||
|
||||
void func_8038A724(Actor *this){
|
||||
ActorLocal_RBB_40F0 *local = (ActorLocal_RBB_40F0 *)&this->local;
|
||||
int i;
|
||||
f32 sp1C = time_getDelta();
|
||||
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
actor_collisionOff(this);
|
||||
local->unk0 = 0;
|
||||
local->unk0 = (this->modelCacheIndex == 0x17E) ? 1: local->unk0;
|
||||
local->unk0 = (this->modelCacheIndex == 0x17F) ? 2: local->unk0;
|
||||
local->unk0 = (this->modelCacheIndex == 0x180) ? 3: local->unk0;
|
||||
|
||||
this->position_x = D_80390760[local->unk0].unk0[0];
|
||||
this->position_y = D_80390760[local->unk0].unk0[1];
|
||||
this->position_z = D_80390760[local->unk0].unk0[2];
|
||||
func_8038A524(this, 1);
|
||||
}//L8038A884
|
||||
|
||||
this->pitch += local->unk4[0]*sp1C;
|
||||
this->yaw += local->unk4[1]*sp1C;
|
||||
this->roll += local->unk4[2]*sp1C;
|
||||
|
||||
for(i = 0; i < 3; i++){//L8038A8D4
|
||||
if(local->unk10[i] < local->unk4[i]){
|
||||
local->unk4[i] -= 75.0f*sp1C;
|
||||
local->unk4[i] = MAX(local->unk10[i], local->unk4[i]);
|
||||
}//L8038A924
|
||||
else if(local->unk4[i] < local->unk10[i]){
|
||||
local->unk4[i] += 75.0f*sp1C;
|
||||
local->unk4[i] = MIN(local->unk10[i], local->unk4[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(this->state == 1){
|
||||
local->unk10[0] = D_80390760[local->unk0].unkC[0]*func_8038A4E0();
|
||||
local->unk10[1] = D_80390760[local->unk0].unkC[1]*func_8038A4E0();
|
||||
local->unk10[2] = D_80390760[local->unk0].unkC[2]*func_8038A4E0();
|
||||
}
|
||||
|
||||
if(this->state == 2){
|
||||
if(0.0f < local->unk1C){
|
||||
if(func_8025773C(&local->unk1C, sp1C)){
|
||||
func_8038A524(this, 3);
|
||||
}//L8038AA8C
|
||||
}else{
|
||||
if( local->unk4[0] == local->unk10[0]
|
||||
&& local->unk4[1] == local->unk10[1]
|
||||
&& local->unk4[2] == local->unk10[2]
|
||||
){
|
||||
local->unk1C = 1.0f;
|
||||
}
|
||||
}
|
||||
}//L8038AB04
|
||||
|
||||
if(this->state == 3){
|
||||
if(0.0f < local->unk1C){
|
||||
if(func_8025773C(&local->unk1C, sp1C)){
|
||||
func_8038A524(this, 2);
|
||||
}//L8038AA8C
|
||||
}else{
|
||||
if( local->unk4[0] == local->unk10[0]
|
||||
&& local->unk4[1] == local->unk10[1]
|
||||
&& local->unk4[2] == local->unk10[2]
|
||||
){
|
||||
local->unk1C = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
160
src/RBB/code_47D0.c
Normal file
160
src/RBB/code_47D0.c
Normal file
@@ -0,0 +1,160 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void vtxList_tint(s32, s32 (*)[3], f32, BKVertexList*);
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
f32 unk4[3];
|
||||
s16 unk10;
|
||||
u8 pad12[2];
|
||||
}Struct_RBB_47D0;
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 pad1[3];
|
||||
Struct_RBB_47D0 *unk4;
|
||||
f32 unk8;
|
||||
s32 unkC;
|
||||
}ActorLocal_RBB_47D0;
|
||||
|
||||
Actor *func_8038AD9C(ActorMarker *marker, Gfx** gdl, Mtx** mptr, s32 arg3);
|
||||
void func_8038AEB8(Actor *this);
|
||||
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_47D0 D_80390870[4] = {
|
||||
{0x1BF, {-3950.0f, 690.0f, -350.0f}, 1},
|
||||
{0x1C0, {-3950.0f, 690.0f, 0.0f}, 2},
|
||||
{0x1C1, {-3950.0f, 690.0f, 350.0f}, 3},
|
||||
0
|
||||
};
|
||||
|
||||
extern ActorInfo D_803908C0 = {
|
||||
0x195, 0x1BF, 0x413, 0x0, NULL,
|
||||
func_8038AEB8, NULL, func_8038AD9C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
extern ActorInfo D_803908E4 = {
|
||||
0x196, 0x1C0, 0x414, 0x0, NULL,
|
||||
func_8038AEB8, NULL, func_8038AD9C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
extern ActorInfo D_80390908 = {
|
||||
0x197, 0x1C1, 0x415, 0x0, NULL,
|
||||
func_8038AEB8, NULL, func_8038AD9C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_8039092C[3] = { 0, 0xFF, 0};
|
||||
s32 D_80390938[3] = { 0xFF, 0, 0};
|
||||
|
||||
/* .code */
|
||||
Struct_RBB_47D0 *func_8038ABC0(Actor *arg0){
|
||||
Struct_RBB_47D0 *iPtr = D_80390870;
|
||||
while(iPtr->unk0 != 0){
|
||||
if(iPtr->unk0 == arg0->modelCacheIndex)
|
||||
return iPtr;
|
||||
iPtr++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void func_8038AC18(Actor *this, s32 new_state){
|
||||
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&this->local;
|
||||
Actor *other;
|
||||
local->unk8 = 0.0f;
|
||||
if(new_state == 2){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
local->unkC = vtxList_clone(func_8033A148(func_80330B1C(this->marker)));
|
||||
|
||||
mapSpecificFlags_set(local->unk4->unk10, TRUE);
|
||||
this->position_y -= 30.0f;
|
||||
local->unk8 = 1.0f;
|
||||
other = func_80326EEC(0x1c5);
|
||||
if(other){
|
||||
local->unk0 = func_8038B56C(other, this->modelCacheIndex - 0x1be, this);
|
||||
}
|
||||
}//L8038ACD0
|
||||
|
||||
if(this->state == 2){
|
||||
this->position_x = local->unk4->unk4[0];
|
||||
this->position_y = local->unk4->unk4[1];
|
||||
this->position_z = local->unk4->unk4[2];
|
||||
vtxList_free(local->unkC);
|
||||
}
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void func_8038AD3C(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1)
|
||||
func_8038AC18(actor, 2);
|
||||
}
|
||||
|
||||
void func_8038AD7C(Actor *this){
|
||||
func_8038AC18(this, 0);
|
||||
}
|
||||
|
||||
Actor *func_8038AD9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor * actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&actor->local;
|
||||
s32 temp_v0;
|
||||
f32 pad0;
|
||||
s32 (*sp1C)[3];
|
||||
|
||||
|
||||
if(actor->state == 0)
|
||||
return actor;
|
||||
|
||||
if( actor->state == 2
|
||||
&& local->unk0 != 0
|
||||
){
|
||||
temp_v0 = func_80330B1C(marker);
|
||||
sp1C = (local->unk0 == 2) ? &D_80390938 : &D_8039092C;
|
||||
vtxList_tint(local->unkC, sp1C,
|
||||
(local->unk4->unk4[1] - actor->position_y)/30.0,
|
||||
func_8033A148(temp_v0)
|
||||
);
|
||||
func_8033A4C0(local->unkC);
|
||||
}
|
||||
return func_80325888(marker, gdl, mptr, arg3);
|
||||
}
|
||||
|
||||
void func_8038AEB8(Actor *this){
|
||||
ActorLocal_RBB_47D0 *local = (ActorLocal_RBB_47D0 *)&this->local;
|
||||
f32 sp20 = time_getDelta();
|
||||
s32 tmp;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->marker->unk30 = func_8038AD7C;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038AD3C, NULL);
|
||||
local->unk4 = func_8038ABC0(this);
|
||||
mapSpecificFlags_set(local->unk4->unk10, FALSE);
|
||||
this->position_x = local->unk4->unk4[0];
|
||||
this->position_y = local->unk4->unk4[1];
|
||||
this->position_z = local->unk4->unk4[2];
|
||||
this->yaw = -90.0f;
|
||||
func_8038AC18(this, 1);
|
||||
}//L8038AF88
|
||||
|
||||
if(func_8025773C(&local->unk8, sp20))
|
||||
func_8038AC18(this, 1);
|
||||
|
||||
if(this->state == 2){
|
||||
tmp = (s32)this->position_y;
|
||||
if(this->position_y < local->unk4->unk4[1])
|
||||
this->position_y += 60.0f*sp20;
|
||||
|
||||
if( tmp < local->unk4->unk4[1] - 15.0f
|
||||
&& local->unk4->unk4[1] - 15.0f <= this->position_y
|
||||
){
|
||||
mapSpecificFlags_set(local->unk4->unk10, FALSE);
|
||||
}
|
||||
}//L8038B044
|
||||
}
|
152
src/RBB/code_4C70.c
Normal file
152
src/RBB/code_4C70.c
Normal file
@@ -0,0 +1,152 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
f32 unk4[3];
|
||||
s16 unk10;
|
||||
s16 unk12;
|
||||
s16 unk14;
|
||||
//u8 pad16[2];
|
||||
}Struct_RBB_4C70;
|
||||
|
||||
typedef struct {
|
||||
Struct_RBB_4C70 *unk0;
|
||||
f32 unk4[3];
|
||||
}ActorLocal_RBB_4C70;
|
||||
|
||||
Actor *func_8038B230(ActorMarker *marker, Gfx** gdl, Mtx** mptr, s32 arg3);
|
||||
void func_8038B340(Actor *this);
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_4C70 D_80390950[] = {
|
||||
{ 0x1C2, {-3720.0f, 800.0f, -350.0f}, 0x1, 0x136, 0x3FF},
|
||||
{ 0x1C3, {-3720.0f, 800.0f, 0.0f}, 0x2, 0x135, 0x3FE},
|
||||
{ 0x1C4, {-3720.0f, 800.0f, 350.0f}, 0x3, 0x134, 0x3FD},
|
||||
0
|
||||
};
|
||||
|
||||
ActorInfo D_803909B0 = {
|
||||
0x2A, 0x1C2, 0x416, 0x0, NULL,
|
||||
func_8038B340, NULL, func_8038B230,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803909D4 = {
|
||||
0x2B, 0x1C3, 0x416, 0x0, NULL,
|
||||
func_8038B340, NULL, func_8038B230,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803909F8 = {
|
||||
0x2C, 0x1C4, 0x416, 0x0, NULL,
|
||||
func_8038B340, NULL, func_8038B230,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
struct31s D_80390A1C = {
|
||||
{ 1.0f, 2.0f},
|
||||
{ 3.0f, 5.0f},
|
||||
{ 0.05f, 0.1f},
|
||||
{ 1.5f, 2.5f},
|
||||
0.0f,
|
||||
0.5f
|
||||
};
|
||||
|
||||
/* .code */
|
||||
Struct_RBB_4C70 *func_8038B060(Actor *this){
|
||||
Struct_RBB_4C70 * iPtr;
|
||||
for(iPtr = D_80390950; iPtr->unk0 != 0; iPtr++){
|
||||
if(iPtr->unk0 == this->modelCacheIndex)
|
||||
return iPtr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void func_8038B0B8(Actor *this, s32 arg1){
|
||||
ActorLocal_RBB_4C70 *local = (ActorLocal_RBB_4C70 *)&this->local;
|
||||
ParticleEmitter *other;
|
||||
|
||||
this->state = arg1;
|
||||
|
||||
if(this->state == 2){
|
||||
func_80335924(this->unk148, local->unk0->unk12, 0.0f, 0.5f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
timed_playSfx(0.1f, local->unk0->unk14, 1.0f, 0x7d00);
|
||||
other = partEmitList_pushNew(0xa);
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
particleEmitter_setParticleAccelerationRange(other,
|
||||
0.0f, 100.0f, 0.0f,
|
||||
0.0f, 250.0f, 0.0f
|
||||
);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
particleEmitter_setParticleSpawnPositionRange(other,
|
||||
-5.0f, -5.0f, 0.0f,
|
||||
5.0f, 5.0f, 0.0f
|
||||
);
|
||||
particleEmitter_setPosition(other, &local->unk4);
|
||||
particleEmitter_setParticleVelocityRange(other,
|
||||
-400.0f, 0.0f, -30.0f,
|
||||
-800.0f, 0.0f, 30.0f
|
||||
);
|
||||
func_802EFB98(other, &D_80390A1C);
|
||||
particleEmitter_setSpawnInterval(other, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_8038B230(ActorMarker *marker, Gfx** gdl, Mtx** mptr, s32 arg3){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_4C70 *local = (ActorLocal_RBB_4C70 *)&actor->local;
|
||||
f32 sp3C[3];
|
||||
|
||||
if(actor->state == 0)
|
||||
return actor;
|
||||
|
||||
if(actor->state == 2){
|
||||
func_8033A238(func_803356A0(actor->unk148));
|
||||
}
|
||||
|
||||
sp3C[0] = actor->pitch;
|
||||
sp3C[1] = actor->yaw;
|
||||
sp3C[2] = actor->roll;
|
||||
func_8033A2D4(&func_803253A0, actor);
|
||||
func_8033A450(func_80329934());
|
||||
func_803391A4(gdl, mptr, &actor->position, &sp3C, actor->scale, NULL, func_80330B1C(marker));
|
||||
func_8034A174(func_80329934(), 5, &local->unk4);
|
||||
local->unk4[0] -= 60.0f;
|
||||
return actor;
|
||||
}
|
||||
|
||||
void func_8038B340(Actor * this){
|
||||
ActorLocal_RBB_4C70 *local = (ActorLocal_RBB_4C70 *)&this->local;
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = func_8038B060(this);
|
||||
|
||||
local->unk4[2] = 0.0f;
|
||||
local->unk4[1] = 0.0f;
|
||||
local->unk4[0] = 0.0f;
|
||||
|
||||
this->position_x = local->unk0->unk4[0];
|
||||
this->position_y = local->unk0->unk4[1];
|
||||
this->position_z = local->unk0->unk4[2];
|
||||
|
||||
this->yaw = -90.0f;
|
||||
this->scale = 0.25f;
|
||||
|
||||
func_8038B0B8(this, 1);
|
||||
}//L8038B3E4
|
||||
|
||||
if(this->state == 1){
|
||||
if(mapSpecificFlags_get(local->unk0->unk10))
|
||||
func_8038B0B8(this, 2);
|
||||
}
|
||||
|
||||
if(this->state == 2){
|
||||
if( func_80335794(this->unk148) > 0 )
|
||||
func_8038B0B8(this, 1);
|
||||
}
|
||||
}
|
87
src/RBB/code_5060.c
Normal file
87
src/RBB/code_5060.c
Normal file
@@ -0,0 +1,87 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern ActorInfo D_80390FD0;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
u8 *unk4;
|
||||
}ActorLocal_RBB_5060;
|
||||
|
||||
void func_8038B654(Actor * this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390A50 = {
|
||||
0x2D, 0x1C5, 0x0, 0x0, NULL,
|
||||
func_8038B654, 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){
|
||||
actor->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038B468(void){
|
||||
func_802C8F70(225.0f);
|
||||
jiggySpawn(JIGGY_54_RBB_WHISTLE, D_80390A74);
|
||||
}
|
||||
|
||||
void func_8038B4A0(void){
|
||||
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
|
||||
}
|
||||
|
||||
void func_8038B4C4(ActorMarker *marker){
|
||||
func_8025A6EC(COMUSIC_2C_BUZZER, 28000);
|
||||
func_8028F530(0xD);
|
||||
}
|
||||
|
||||
void func_8038B4F4(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);
|
||||
func_80324E88(5.0f);
|
||||
func_80324E38(5.0f, 0);
|
||||
}
|
||||
|
||||
s32 func_8038B56C(Actor *this, s32 whistle_id, Actor *other){
|
||||
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||
|
||||
if(this->state != 1)
|
||||
return 0;
|
||||
|
||||
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);
|
||||
return 3;
|
||||
}else{
|
||||
timedFunc_set_0(0.6f, func_8038B4A0);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else{ //wrong
|
||||
timedFunc_set_1(1.0f, func_8038B4C4, other->marker);
|
||||
local->unk0 = 0;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038B654(Actor *this){
|
||||
ActorLocal_RBB_5060 *local = (ActorLocal_RBB_5060 *)&this->local;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
local->unk2 = 1;
|
||||
local->unk4 = "312111";
|
||||
if(jiggyscore_isSpawned(JIGGY_54_RBB_WHISTLE))
|
||||
func_8038B450(this, 2);
|
||||
else
|
||||
func_8038B450(this, 1);
|
||||
}
|
||||
}
|
47
src/RBB/code_52F0.c
Normal file
47
src/RBB/code_52F0.c
Normal file
@@ -0,0 +1,47 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8038B7E8(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390A80 = {
|
||||
0x2F, 0x1C7, 0x41B, 0x0, NULL,
|
||||
func_8038B7E8, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038B6E0(Actor *this, s32 arg1){
|
||||
if(arg1 == 2){
|
||||
if(this->state == 1){
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
}
|
||||
actor_collisionOff(this);
|
||||
this->position_y -= 35.0f;
|
||||
if(this->state == 1){
|
||||
levelSpecificFlags_set(0x30, TRUE);
|
||||
func_803204E4(0xe, 1);
|
||||
timedFunc_set_0(1.0f, func_803228D8);
|
||||
timedFunc_set_3(1.0f, (TFQM3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0);
|
||||
}
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038B7BC(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_8038B6E0(actor, 2);
|
||||
}
|
||||
|
||||
void func_8038B7E8(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
marker_setCollisionScripts(this->marker, NULL, func_8038B7BC, NULL);
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||
func_8038B6E0(this, 2);
|
||||
else
|
||||
func_8038B6E0(this, 1);
|
||||
}
|
||||
}
|
116
src/RBB/code_5490.c
Normal file
116
src/RBB/code_5490.c
Normal file
@@ -0,0 +1,116 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80335A24(void *, s32, f32, f32);
|
||||
extern s32 func_802EDD8C(f32 (*)[3], f32, f32);
|
||||
|
||||
void func_8038B900(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390AB0 = {
|
||||
0x30, 0x1C8, 0x41C, 0x0, NULL,
|
||||
NULL, func_8038B900, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038B880(Actor *this, s32 new_state){
|
||||
if(new_state == 1)
|
||||
func_80335924(this->unk148, ASSET_13F_ANIM_SNORKEL_STUCK, 0.0f, 5.5f);
|
||||
|
||||
if(new_state == 2)
|
||||
func_80335A24(this->unk148, ASSET_13E_ANIM_SNORKEL_SWIM, 1.0f, 0.65f);
|
||||
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void func_8038B900(Actor *this){
|
||||
f32 sp5C;
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
f32 sp48[3];
|
||||
ParticleEmitter *other;
|
||||
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
if(this->marker->unk14_21){
|
||||
sp54 = func_80335684(this->unk148);
|
||||
if( ( func_8023DB5C() & (1 << 4) )
|
||||
&& ( func_8023DB5C() & (1 << 2) )
|
||||
&& ( randf() < 0.90 )
|
||||
){
|
||||
if( ( this->state == 3
|
||||
&& (0.255 <= sp54 && sp54 <= 0.856)
|
||||
)
|
||||
|| ( this->state == 1
|
||||
&& ( (0.053 <= sp54 && sp54 <= 0.35)
|
||||
|| (0.39 <= sp54 && sp54 <= 0.44999999999999996)
|
||||
|| (0.45999999999999996 <= sp54 && sp54 <= 0.52)
|
||||
|| (0.54 <= sp54 && sp54 <= 0.73)
|
||||
|| (0.76 <= sp54 && sp54 <= 0.8200000000000001)
|
||||
|| (0.84 <= sp54 && sp54 <= 0.9)
|
||||
|| (0.94 <= sp54 && sp54 <= 1.0)
|
||||
)
|
||||
)
|
||||
){//L8038BB24
|
||||
func_8034A174(this->marker->unk44, 5, &sp48);
|
||||
other = func_802EDD8C(&sp48, 0.0f, -1300.0f);
|
||||
func_802EFB70(other, 0.04f, 0.04f);
|
||||
func_802EFB84(other, 0.18f, 0.18f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other, -10.0f, 0.0f, -10.0f, 10.0f, 20.0f, 10.0f);
|
||||
particleEmitter_setParticleVelocityRange(other, 0.0f, 31.0f, 0.0f, 0.0f, 37.0f, 0.0f);
|
||||
particleEmitter_emitN(other, 1);
|
||||
}
|
||||
}
|
||||
}////L8038BBFC
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->position_x = -5100.0f;
|
||||
this->position_y = -2600.0f;
|
||||
this->position_z = 1460.0f;
|
||||
this->yaw = 0.0f;
|
||||
func_8038B880(this, 1);
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
else{//L8038BC74
|
||||
func_8033568C(this->unk148, &sp5C, &sp58);
|
||||
if( sp5C < 0.22 && 0.22 <= sp58 ){
|
||||
func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.8f, 0.9f), 0x3a98, &this->position, 1500.0f, 2000.0f);
|
||||
}
|
||||
|
||||
if( sp5C < 0.54 && 0.54 <= sp58 ){
|
||||
func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.9f, 1.0f), 0x4a38, &this->position, 1500.0f, 2000.0f);
|
||||
}
|
||||
|
||||
if(this->state == 1){
|
||||
if( !this->unk138_24
|
||||
&& func_80329530(this, 0x258)
|
||||
&& !func_8028ECAC()
|
||||
){
|
||||
func_80311480(0xb9b, 4, 0, 0, 0, 0);
|
||||
this->unk138_24 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(this->state == 1){
|
||||
if(mapSpecificFlags_get(4))
|
||||
func_8038B880(this, 2);
|
||||
}
|
||||
|
||||
if(this->state == 2){
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||
func_8038B880(this, 3);
|
||||
}
|
||||
|
||||
if(this->state == 3){
|
||||
func_80326224(this);
|
||||
if(0.99 < this->unk48){
|
||||
mapSpecificFlags_set(4, FALSE);
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
}//L8038BE90
|
||||
}
|
45
src/RBB/code_5AB0.c
Normal file
45
src/RBB/code_5AB0.c
Normal file
@@ -0,0 +1,45 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8038BF28(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390AE0 = {
|
||||
0x31, 0x1C9, 0x41D, 0x0, NULL,
|
||||
func_8038BF28, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void func_8038BEA0(Actor *this, s32 arg1){
|
||||
if(arg1 == 1)
|
||||
func_80335924(this->unk148, ASSET_141_ANIM_ANCHOR_LOWERED, 0.0f, 5.5f);
|
||||
|
||||
if(arg1 == 2){
|
||||
func_80335924(this->unk148, ASSET_142_ANIM_ANCHOR_RISING, 0.0f, 8.0f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038BF28(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->position_x = -5100.0f;
|
||||
this->position_y = -2600.0f;
|
||||
this->position_z = 1460.0f;
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->yaw = 0.0f;
|
||||
func_8038BEA0(this, 1);
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL)){
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(this->state == 1 && mapSpecificFlags_get(8)){
|
||||
func_8038BEA0(this, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
71
src/RBB/code_5C10.c
Normal file
71
src/RBB/code_5C10.c
Normal file
@@ -0,0 +1,71 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void func_8038C0FC(Actor *this, s32 new_state);
|
||||
|
||||
void func_8038C204(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390B10 = {
|
||||
0x199, 0x1CB, 0x0, 0x0, NULL,
|
||||
func_8038C204, 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);
|
||||
func_802FA060(sp1C, 0x6978, 0x6978, 0.0f);
|
||||
func_802F9F80(sp1C, 0.5f, 7.0f, 0.5f);
|
||||
}
|
||||
|
||||
void func_8038C058(void){
|
||||
func_8030E760(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 0x55f0);
|
||||
func_8030E760(SFX_7F_HEAVYDOOR_SLAM, 0.9f, 0x55f0);
|
||||
func_8030E760(SFX_7F_HEAVYDOOR_SLAM, 1.0f, 0x55f0);
|
||||
}
|
||||
|
||||
void func_8038C0A8(ActorMarker *marker, s32 arg1, s32 arg2){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
jiggySpawn(JIGGY_53_RBB_SNORKEL, &D_80390B34);
|
||||
timed_setCameraToNode(0.5f, 0xb);
|
||||
func_8038C0FC(actor, 3);
|
||||
}
|
||||
|
||||
void func_8038C0FC(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, (TFQM2)mapSpecificFlags_set, 8, TRUE);
|
||||
timed_playSfx(2.1f, SFX_3F6_UNKNOWN, 0.6f, 0x7fbc);
|
||||
timedFunc_set_2(2.7f, (TFQM2)mapSpecificFlags_set, 4, TRUE);
|
||||
timedFunc_set_0(3.0f, func_8038C058);
|
||||
func_80324DBC(3.0f, 0xb9C, 7, NULL, this->marker, func_8038C0A8, NULL);
|
||||
}//L8038C1D8
|
||||
this->state = new_state;
|
||||
}
|
||||
|
||||
void func_8038C204(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
if(levelSpecificFlags_getSet(0x30, FALSE))
|
||||
func_8038C0FC(this, 2);
|
||||
else
|
||||
func_8038C0FC(this, 1);
|
||||
|
||||
if(jiggyscore_isSpawned(JIGGY_53_RBB_SNORKEL))
|
||||
marker_despawn(this->marker);
|
||||
}//L8038C27C
|
||||
|
||||
if(this->state == 3 && !mapSpecificFlags_get(4)){
|
||||
func_80324E88(0.0f);
|
||||
func_80324E38(0.0f, 0);
|
||||
timedFunc_set_0(0.0f, func_803228D8);
|
||||
timedFunc_set_3(0.0f, (TFQM3)func_802E4078, MAP_8B_RBB_ANCHOR_ROOM, 2, 0);
|
||||
}//L8038C2E4
|
||||
}
|
19
src/RBB/code_5F10.c
Normal file
19
src/RBB/code_5F10.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8038C300(Actor *this);
|
||||
|
||||
ActorInfo D_80390B40 = {
|
||||
0x198, 0x1ca, 0x41e, 0x0, NULL,
|
||||
func_8038C300, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
void func_8038C300(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
func_80335924(this->unk148, 0x140, 0.0f, 1.0f);
|
||||
}
|
||||
}
|
613
src/RBB/code_5F80.c
Normal file
613
src/RBB/code_5F80.c
Normal file
@@ -0,0 +1,613 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_803253A0(Actor *);
|
||||
extern void func_80325794(ActorMarker *);
|
||||
extern void func_8030E394(u8);
|
||||
extern void func_80326310(Actor *);
|
||||
extern int func_803342AC(f32 (*)[3], f32(*)[3], f32);
|
||||
extern void particleEmitter_setModel(ParticleEmitter *, s32);
|
||||
|
||||
|
||||
typedef struct{
|
||||
s16 unk0;
|
||||
//u8 pad2[2];
|
||||
f32 unk4;
|
||||
f32 unk8;
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
u8 unkE;
|
||||
//u8 padF[1];
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
} Struct_RBB_5F80;
|
||||
|
||||
typedef struct{
|
||||
Struct_RBB_5F80 *unk0;
|
||||
u8 unk4;
|
||||
u8 pad5[3];
|
||||
f32 unk8[3];
|
||||
f32 unk14[3];
|
||||
s32 unk20;
|
||||
f32 unk24;
|
||||
f32 unk28;
|
||||
} ActorLocal_RBB_5F80;
|
||||
|
||||
void func_8038CC9C(Actor *this, s32 new_state);
|
||||
void func_8038D7E8(ActorMarker *marker, s32 arg1);
|
||||
Actor *func_8038D638(ActorMarker *marker, Gfx **gdl, Mtx ** mptr, s32 arg3);
|
||||
void func_8038D8BC(Actor *this);
|
||||
|
||||
/* .data */
|
||||
Struct_RBB_5F80 D_80390B70[4] = {
|
||||
{0x281, 1.1f, 1.0f, 0x14, 0x01, 0x5, 0.9f, 0.8f},
|
||||
{0x282, 0.75f, 1.0f, 0xF, 0x02, 0x4, 1.1f, 0.9f},
|
||||
{0x283, 0.5f, 2.0f, 0xA, 0x02, 0x3, 1.3f, 1.0f},
|
||||
{0x284, 0.25f, 2.0f, 0x5, 0x02, 0x2, 1.5f, 1.1f},
|
||||
};
|
||||
|
||||
ActorInfo D_80390BD0 = {
|
||||
0x1A1, 0x281, 0x428, 0x0, NULL,
|
||||
func_8038D8BC, NULL, func_8038D638,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390BF4 = {
|
||||
0x1A2, 0x282, 0x428, 0x0, NULL,
|
||||
func_8038D8BC, NULL, func_8038D638,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390C18 = {
|
||||
0x1A3, 0x283, 0x428, 0x0, NULL,
|
||||
func_8038D8BC, NULL, func_8038D638,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390C3C = {
|
||||
0x1A4, 0x284, 0x428, 0x0, NULL,
|
||||
func_8038D8BC, NULL, func_8038D638,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390C60[3] = {0xDE, 0xA7, 0x71};
|
||||
|
||||
struct41s D_80390C6C = {
|
||||
{ {-200.0f, 200.0f, -200.0f}, {200.0f, 500.0f, 200.0f} },
|
||||
{ {0.0f, -800.0f, 0.0f}, {0.0f, -800.0f, 0.0f} }
|
||||
};
|
||||
|
||||
s32 D_80390C9C[3] = {0xDE, 0xA7, 0x71};
|
||||
|
||||
struct43s D_80390CA8 = {
|
||||
{ {-200.0f, 0.0f, -200.0f}, {200.0f, -50.0f, 200.0f} },
|
||||
{ {0.0f, 200.0f, 0.0f}, {0.0f, 400.0f, 0.0f} },
|
||||
{ {-10.0f, -10.0f, -10.0f}, {10.0f, 10.0f, 10.0f} }
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
s32 pad_80391270[4];
|
||||
u8 D_80391280;
|
||||
s32 pad_80391284;
|
||||
f32 D_80391288[3];
|
||||
|
||||
/* .code */
|
||||
void func_8038C370(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_8038CC9C(actor, arg1);
|
||||
}
|
||||
|
||||
void func_8038C39C(Actor *this){
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
ParticleEmitter *other = partEmitList_pushNew(local->unk0->unkE);
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFA5C(other, 0.0f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
func_802EFA70(other, 4);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, local->unk0->unk4*1, local->unk0->unk4*3.0f);
|
||||
func_802EFB84(other, 3.0f*local->unk0->unk4, local->unk0->unk4*7.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other,
|
||||
local->unk0->unk4*-200.0f, local->unk0->unk4*100.0f, local->unk0->unk4*-200.0f,
|
||||
local->unk0->unk4*200.0f, local->unk0->unk4*100.0f, local->unk0->unk4*200.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(other,
|
||||
-50.0f, 100.0f, -50.0f,
|
||||
50.0f, 200.0f, 50.0f
|
||||
);
|
||||
func_802EFEC0(other, 0.5f, 1.0f);
|
||||
particleEmitter_emitN(other, local->unk0->unkE);
|
||||
}
|
||||
|
||||
void func_8038C538(Actor *this){
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
ParticleEmitter *other = partEmitList_pushNew(3*local->unk0->unkE);
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFA5C(other, 0.1f, 0.3f);
|
||||
func_802EFA70(other, 4);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, local->unk0->unk4*1, local->unk0->unk4*6.0f);
|
||||
func_802EFB84(other, 0.5*local->unk0->unk4, local->unk0->unk4*3.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other,
|
||||
local->unk0->unk4*-300.0f, local->unk0->unk4*100.0f, local->unk0->unk4*-300.0f,
|
||||
local->unk0->unk4*300.0f, local->unk0->unk4*300.0f, local->unk0->unk4*300.0f
|
||||
);
|
||||
particleEmitter_setParticleVelocityRange(other,
|
||||
-70.0f, 50.0f, -70.0f,
|
||||
70.0f, 100.0f, 70.0f
|
||||
);
|
||||
func_802EFFA8(other, &D_80390C60);
|
||||
func_802EFEC0(other, 3.0f, 4.0f);
|
||||
particleEmitter_emitN(other, 3*local->unk0->unkE);
|
||||
|
||||
}
|
||||
|
||||
void func_8038C70C(Actor *this){
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
ParticleEmitter *other = partEmitList_pushNew(0xa);
|
||||
|
||||
func_802EF9F8(other, 0.6f);
|
||||
func_802EFA18(other, 3);
|
||||
func_802EFA70(other, 4);
|
||||
particleEmitter_setModel(other, 0x427);
|
||||
particleEmitter_setParticleSpawnPositionRange(other,
|
||||
local->unk0->unk4 * -300.0f, local->unk0->unk4 * 100.0f, local->unk0->unk4 * -300.0f,
|
||||
local->unk0->unk4 * 300.0f, local->unk0->unk4 * 200.0f, local->unk0->unk4 * 300.0f
|
||||
);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, local->unk0->unk4*0.3, local->unk0->unk4*0.8);
|
||||
func_802EFE24(other,
|
||||
-600.0f, -600.0f, -600.0f,
|
||||
600.0f, 600.0f, 600.0f
|
||||
);
|
||||
particleEmitter_setSpawnIntervalRange(other, 0.0f, 0.01f);
|
||||
func_802EFEC0(other, 10.0f, 10.0f);
|
||||
particleEmitter_setVelocityAndAccelerationRanges(other, &D_80390C6C);
|
||||
particleEmitter_emitN(other, 10);
|
||||
|
||||
}
|
||||
|
||||
void func_8038C8A8(Actor * this){
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
ParticleEmitter *other = partEmitList_pushNew(5);
|
||||
f32 sp24[3];
|
||||
|
||||
|
||||
player_getPosition(&sp24);
|
||||
sp24[1] += 50.0f;
|
||||
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFA5C(other, 0.0, 0.5f);
|
||||
func_802EFA70(other, 4);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
particleEmitter_setPosition(other, &sp24);
|
||||
func_802EFB70(other, local->unk0->unk4*1, local->unk0->unk4*3.0f);
|
||||
func_802EFB84(other, local->unk0->unk4*3.0f, local->unk0->unk4*6.0f);
|
||||
particleEmitter_setPositionVelocityAndAccelerationRanges(other, &D_80390CA8);
|
||||
func_802EFEC0(other, 1.0f, 2.0f);
|
||||
func_802EFFA8(other, &D_80390C9C);
|
||||
particleEmitter_emitN(other, 5);
|
||||
}
|
||||
|
||||
void func_8038C9F0(s32 arg0, s32 arg1, s32 arg2){
|
||||
Actor *actor = func_80326EEC(0x46);
|
||||
if(actor)
|
||||
marker_despawn(actor->marker);
|
||||
|
||||
D_80391288[0] = (f32)arg0;
|
||||
D_80391288[1] = (f32)(arg1 + 0x28);
|
||||
D_80391288[2] = (f32)arg2;
|
||||
jiggySpawn(JIGGY_56_RBB_BOSS_BOOM_BOX, &D_80391288);
|
||||
}
|
||||
|
||||
void func_8038CA70(Actor *this, f32(*arg1)[3]){
|
||||
f32 tmp_f;
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
|
||||
tmp_f = local->unk0->unk4 * 300.0f;
|
||||
|
||||
if( (*arg1)[0] - tmp_f < -1400.0f)
|
||||
(*arg1)[0] = -1400.0f + tmp_f;
|
||||
|
||||
if(1400.0f < (*arg1)[0] + tmp_f)
|
||||
(*arg1)[0] = 1400.0f - tmp_f;
|
||||
|
||||
if( (*arg1)[2] - tmp_f < -1200.0f)
|
||||
(*arg1)[2] = -1200.0f + tmp_f;
|
||||
|
||||
if(1200.0f < (*arg1)[2] + tmp_f)
|
||||
(*arg1)[2] = 1200.0f - tmp_f;
|
||||
|
||||
}
|
||||
|
||||
void func_8038CB34(ActorMarker *marker, s32 arg1, s32 arg2){
|
||||
comusic_8025AB44(COMUSIC_62_RBB_BOOMBOX, -1, 0x12C);
|
||||
}
|
||||
|
||||
void func_8038CB68(ActorMarker *marker, s32 arg1, s32 arg2){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_80324E88(0.0f);
|
||||
func_80324E38(0.0f, 0);
|
||||
timedFunc_set_2(0.0f, (TFQM2)func_8038C370, actor->marker, 3);
|
||||
}
|
||||
|
||||
void func_8038CBC0(void){
|
||||
Actor * actor = func_80326EEC(0x46);
|
||||
if(actor)
|
||||
func_802C8090(actor);
|
||||
}
|
||||
|
||||
int func_8038CBF0(Actor *this){
|
||||
f32 sp2C[3];
|
||||
f32 sp20[3];
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
|
||||
sp2C[0] = local->unk8[0];
|
||||
sp2C[1] = local->unk8[1];
|
||||
sp2C[2] = local->unk8[2];
|
||||
|
||||
sp20[0] = local->unk14[0];
|
||||
sp20[1] = local->unk14[1];
|
||||
sp20[2] = local->unk14[2];
|
||||
|
||||
sp2C[1] += 300.0f * local->unk0->unk4;
|
||||
sp20[1] += 300.0f * local->unk0->unk4;
|
||||
return func_803342AC(&sp2C, &sp20, local->unk0->unk4 * 400.0f);
|
||||
|
||||
}
|
||||
|
||||
void func_8038CC9C(Actor *this, s32 new_state){
|
||||
f32 sp8C[3];
|
||||
f32 sp80[3];
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
int i;
|
||||
f32 pad;
|
||||
f32 sp68[3];
|
||||
f32 sp64;
|
||||
f32 sp60;
|
||||
f32 sp5C;
|
||||
f32 sp58;
|
||||
|
||||
|
||||
|
||||
player_getPosition(&sp8C);
|
||||
|
||||
sp8C[1] = 0.0f;
|
||||
|
||||
sp80[0] = sp8C[0] - this->position_x;
|
||||
sp80[1] = sp8C[1] - this->position_y;
|
||||
sp80[2] = sp8C[2] - this->position_z;
|
||||
if(this->state == 2){
|
||||
func_8038CBC0();
|
||||
}
|
||||
|
||||
if(this->state == 7){
|
||||
actor_collisionOn(this);
|
||||
}
|
||||
|
||||
local->unk8[0] = this->position_x;
|
||||
local->unk8[1] = this->position_y;
|
||||
local->unk8[2] = this->position_z;
|
||||
local->unk24 = local->unk28 = this->yaw;
|
||||
this->state = new_state;
|
||||
|
||||
if(local->unk20){
|
||||
func_803343F8(local->unk20);
|
||||
local->unk20 = NULL;
|
||||
}
|
||||
|
||||
if(this->state == 1){
|
||||
func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.0f);
|
||||
func_80335A8C(this->unk148, 4);
|
||||
}
|
||||
|
||||
if(this->state == 2){
|
||||
func_8025A58C(0, 0xfa0);
|
||||
func_8025A6EC(COMUSIC_62_RBB_BOOMBOX, -1);
|
||||
func_8025AABC(COMUSIC_62_RBB_BOOMBOX);
|
||||
func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
func_80324E38(0.0f, 3);
|
||||
timed_setCameraToNode(0.0f, 0);
|
||||
timed_playSfx(0.5f, SFX_3F5_UNKNOWN, 1.0f, 0x7fc6);
|
||||
timed_playSfx(1.25f, SFX_6C_LOCKUP_CLOSING, 1.05f, 0x7d00);
|
||||
timed_playSfx(1.35f, SFX_6C_LOCKUP_CLOSING, 1.0f, 0x7d00);
|
||||
timed_playSfx(1.8f, SFX_6C_LOCKUP_CLOSING, 1.0f, 0x7d00);
|
||||
if(func_803203FC(2)){
|
||||
item_set(ITEM_6_HOURGLASS, 1);
|
||||
item_set(ITEM_0_HOURGLASS_TIMER, 0x1067);
|
||||
func_80324E88(2.4f);
|
||||
func_80324E38(2.4f, 0);
|
||||
timedFunc_set_2(2.4f, (TFQM2)func_8038C370, (s32)this->marker, 3);
|
||||
}
|
||||
else{//L8038CEFC
|
||||
timedFunc_set_3(2.4f, (TFQM3)comusic_8025AB44, COMUSIC_62_RBB_BOOMBOX, 0x1f40, 0x12C);
|
||||
func_80324DBC(2.4f, 0xb9e, 4, NULL, this->marker, func_8038CB34, func_8038CB68);
|
||||
}
|
||||
}//L8038CF60
|
||||
|
||||
if(this->state == 3 || this->state == 4){
|
||||
func_8030E878(0x3f2, local->unk0->unk14, 0x6d60, &this->position, 500.0f, 1000.0f);
|
||||
func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, (1.0/(local->unk0->unk8)*randf2(1.0f, 1.1f)));
|
||||
func_80335A8C(this->unk148, 2);
|
||||
ml_vec3f_set_length(sp80, (this->state == 4)? -0x32*(2 + func_80326218()) : 300.0f/local->unk0->unk8);
|
||||
local->unk14[0] = sp80[0] + this->position_x;
|
||||
local->unk14[1] = sp80[1] + this->position_y;
|
||||
local->unk14[2] = sp80[2] + this->position_z;
|
||||
local->unk14[1] = 0.0f;
|
||||
func_8038CA70(this, &local->unk14);
|
||||
}//L8038D0B8
|
||||
|
||||
if(this->state == 5){
|
||||
actor_collisionOff(this);
|
||||
timed_playSfx(0.2f, SFX_D9_WOODEN_CRATE_BREAKING_1, 0.9f, 0x7530);
|
||||
func_80335924(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
ml_vec3f_set_length(sp80, -300.f);
|
||||
local->unk14[0] = sp80[0] + this->position_x;
|
||||
local->unk14[1] = sp80[1] + this->position_y;
|
||||
local->unk14[2] = sp80[2] + this->position_z;
|
||||
local->unk14[1] = 0.0f;
|
||||
func_8038CA70(this, &local->unk14);
|
||||
func_8038C70C(this);
|
||||
func_8038C538(this);
|
||||
}//L8038D17C
|
||||
|
||||
if(this->state == 6){
|
||||
func_80326310(this);
|
||||
if(local->unk0->unk0 == 0x284){
|
||||
if(++D_80391280 == 8){
|
||||
func_8025A58C(-1, 0x190);
|
||||
comusic_8025AB44(COMUSIC_62_RBB_BOOMBOX, 0, 0x190);
|
||||
func_8025AABC(COMUSIC_62_RBB_BOOMBOX);
|
||||
if(func_803203FC(2)){
|
||||
item_set(ITEM_6_HOURGLASS, 0);
|
||||
func_803204E4(3, 0);
|
||||
func_803204E4(5, 1);
|
||||
}
|
||||
else{//L8038D220
|
||||
timedFunc_set_3(0.0f, (TFQM3)func_8038C9F0, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z);
|
||||
func_80311480(0xb9f, 4, 0, 0, 0, 0);
|
||||
}
|
||||
}//L8038D278
|
||||
}
|
||||
else{//L8038D28C
|
||||
sp68[0] = this->position_x + 200.0f*local->unk0->unk4;
|
||||
sp68[1] = this->position_y + 80.0f*local->unk0->unk4;
|
||||
sp68[2] = this->position_z;
|
||||
func_802C3F04(func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2]));
|
||||
|
||||
sp68[0] = this->position_x - 200.0f*local->unk0->unk4;
|
||||
sp68[1] = this->position_y + 80.0f*local->unk0->unk4;
|
||||
sp68[2] = this->position_z;
|
||||
func_802C3F04(func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2]));
|
||||
}
|
||||
}//L8038D378
|
||||
|
||||
if(this->state == 7){
|
||||
actor_collisionOff(this);
|
||||
func_803262E4(this);
|
||||
func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.0f, 1.0f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
local->unk8[0] = this->position_x;
|
||||
local->unk8[1] = this->position_y;
|
||||
local->unk8[2] = this->position_z;
|
||||
|
||||
local->unk14[0] = this->position_x;
|
||||
local->unk14[1] = this->position_y;
|
||||
local->unk14[2] = this->position_z;
|
||||
local->unk20 = func_8038CBF0(this);
|
||||
}//L8038D3FC
|
||||
|
||||
if(this->state == 3 || this->state == 4 || this->state == 5){
|
||||
local->unk20 = func_8038CBF0(this);
|
||||
if( local->unk20 == 0){
|
||||
sp64 = local->unk0->unk4*300.0f;
|
||||
for(i = 0; i < 10; i++){
|
||||
local->unk14[0] = local->unk8[0] + randf2(-sp64, sp64);
|
||||
local->unk14[1] = local->unk14[1];
|
||||
local->unk14[2] = local->unk8[2] + randf2(-sp64, sp64);
|
||||
func_8038CA70(this, &local->unk14);
|
||||
local->unk20 = func_8038CBF0(this);
|
||||
if(local->unk20)
|
||||
break;
|
||||
}
|
||||
if(i == 0xa){
|
||||
local->unk14[0] = local->unk8[0];
|
||||
local->unk14[2] = local->unk8[2];
|
||||
local->unk14[1] = 0.0f;
|
||||
}
|
||||
}
|
||||
}//L8038D4DC
|
||||
|
||||
if(this->state == 3){
|
||||
func_80258A4C(&this->position, this->yaw - 90.0f, &sp8C, &sp60, &sp5C, &sp58);
|
||||
if(0.7 < sp58)
|
||||
local->unk28 += 90.0f;
|
||||
else if(sp58 < -0.7){
|
||||
local->unk28 -= 90.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038D590(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_8038CC9C(actor, 4);
|
||||
}
|
||||
|
||||
void func_8038D5BC(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &actor->local;
|
||||
|
||||
func_8030E6A4(0x3f5, local->unk0->unk10, 0x4e20);
|
||||
func_8038CC9C(actor, 4);
|
||||
func_8038C8A8(actor);
|
||||
}
|
||||
|
||||
void func_8038D608(ActorMarker *marker, ActorMarker *other){
|
||||
func_8038D7E8(marker, other->unk14_20 == 1);
|
||||
}
|
||||
|
||||
Actor *func_8038D638(ActorMarker *marker, Gfx **gdl, Mtx ** mptr, s32 arg3){
|
||||
f32 sp3C[3];
|
||||
Actor *actor = func_80325300(marker, &sp3C);
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &actor->local;
|
||||
func_8033A45C(1, local->unk0->unkD);
|
||||
if(local->unk0->unkD == 1){
|
||||
func_8033A45C(2, (actor->state == 4)? 2: 1);
|
||||
func_8033A45C(4, (actor->state == 4)? 2: 1);
|
||||
func_8033A45C(5, (actor->state == 4)? 2: 1);
|
||||
}//L8038D714
|
||||
else{
|
||||
func_8033A45C(3, (actor->state == 4)? 2: 1);
|
||||
func_8033A45C(6, (actor->state == 4)? 2: 1);
|
||||
func_8033A45C(7, (actor->state == 4)? 2: 1);
|
||||
}
|
||||
func_8033A2D4(func_803253A0, actor);
|
||||
func_8033A2E8(func_80325794, marker);
|
||||
func_803391A4(gdl, mptr, &actor->position, &sp3C, actor->scale, NULL, func_80330B1C(marker));
|
||||
|
||||
return actor;
|
||||
}
|
||||
|
||||
void func_8038D7E8(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &actor->local;
|
||||
|
||||
FUNC_8030E8B4(SFX_1E_HITTING_AN_ENEMY_2, 1.0f, 20000, actor->position, 1000, 2000);
|
||||
func_8030E6A4(SFX_D7_GRABBA_DEATH, local->unk0->unk10, 0x7530);
|
||||
local->unk4 += (arg1) ? 1 : 5;
|
||||
if(local->unk4 >= local->unk0->unkC)
|
||||
func_8038CC9C(actor, 5);
|
||||
else{
|
||||
func_8038CC9C(actor, 4);
|
||||
}
|
||||
|
||||
if(!arg1)
|
||||
func_8038C8A8(actor);
|
||||
|
||||
}
|
||||
|
||||
void func_8038D8B4(Actor *actor){}
|
||||
|
||||
void func_8038D8BC(Actor *this){
|
||||
f32 sp64[3];
|
||||
ActorLocal_RBB_5F80 *local = (ActorLocal_RBB_5F80 *) &this->local;
|
||||
f32 sp5C;
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
f32 tmp_f2;
|
||||
f32 pad;
|
||||
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = &D_80390B70[this->marker->unk14_20 - 0x1A1];
|
||||
local->unk4 = 0;
|
||||
local->unk20 = 0;
|
||||
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
this->scale = local->unk0->unk4;
|
||||
if(local->unk0 == D_80390B70){
|
||||
this->yaw = 270.0f;
|
||||
}
|
||||
marker_setCollisionScripts(this->marker, func_8038D590, func_8038D5BC, func_8038D608);
|
||||
func_803300D8(this->marker, func_8038D8B4);
|
||||
if(local->unk0->unk0 == 0x281){
|
||||
func_8038CC9C(this, 1);
|
||||
D_80391280 = 0;
|
||||
}
|
||||
else{
|
||||
func_8038CC9C(this, 7);
|
||||
}
|
||||
|
||||
if(jiggyscore_isSpawned(JIGGY_56_RBB_BOSS_BOOM_BOX) && !func_803203FC(2))
|
||||
marker_despawn(this->marker);
|
||||
|
||||
if(func_803203FC(2))
|
||||
func_8038CBC0();
|
||||
|
||||
if(func_803203FC(0x1F)){
|
||||
func_8038CBC0();
|
||||
func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
this->state = 2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
player_getPosition(&sp64);
|
||||
if(this->state == 1){
|
||||
if(func_803203FC(2)){
|
||||
if(func_803203FC(3)){
|
||||
func_8038CC9C(this, 2);
|
||||
}
|
||||
}
|
||||
else{//L8038DAA8
|
||||
if(ml_vec3f_distance(&this->position, &sp64) < 1200.0f){
|
||||
func_8038CC9C(this, 2);
|
||||
}
|
||||
}
|
||||
}//L8038DAD8
|
||||
|
||||
if(this->state == 2){
|
||||
if(func_8033567C(this->unk148) == ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR && func_80335794(this->unk148) > 0){
|
||||
func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2, 1.0f);
|
||||
func_80335A8C(this->unk148, 1);
|
||||
}
|
||||
}//L8038DB30
|
||||
|
||||
if( this->state == 2 || this->state == 3 || this->state == 4){
|
||||
if(func_8033567C(this->unk148) == ASSET_147_ANIM_BOOMBOX_MOVE){
|
||||
func_8033568C(this->unk148, &sp5C, &sp58);
|
||||
if(sp5C < 0.6 && 0.6 <= sp58){
|
||||
func_8030E878(SFX_6C_LOCKUP_CLOSING, randf2(-0.05f, 0.05f) + local->unk0->unk14, 0x4e20, &this->position, 500.0f, 1000.0f);
|
||||
}//L8038DC04
|
||||
if(sp5C < 0.1 && 0.1 <= sp58){
|
||||
func_8038C39C(this);
|
||||
}
|
||||
}
|
||||
}//L8038DC48
|
||||
|
||||
if(this->state == 3 || this->state == 4){
|
||||
if(func_803203FC(2)){
|
||||
if(item_empty(ITEM_0_HOURGLASS_TIMER)){
|
||||
func_803204E4(3, 0);
|
||||
func_803204E4(5, 0);
|
||||
func_8038CC9C(this, 8);
|
||||
}
|
||||
}
|
||||
func_8033568C(this->unk148, &sp54, &sp50);
|
||||
if(0.1 <= sp50 && sp50 <= 0.6){
|
||||
sp4C = (sp50 - 0.1)/0.5;
|
||||
func_80255FE4(&this->position, &local->unk8, &local->unk14, sp4C);
|
||||
this->yaw = local->unk24 + sp4C*(local->unk28 - local->unk24);
|
||||
}
|
||||
|
||||
if(func_80335794(this->unk148) > 0)
|
||||
func_8038CC9C(this, 3);
|
||||
|
||||
}//L8038DD64
|
||||
|
||||
if(this->state == 5){
|
||||
if(func_80335794(this->unk148) > 0){
|
||||
func_8038CC9C(this, 6);
|
||||
}else{
|
||||
tmp_f2 = func_80335684(this->unk148);
|
||||
if(tmp_f2 <= 0.3)
|
||||
tmp_f2 = tmp_f2/0.3;
|
||||
else
|
||||
tmp_f2 = 1.0f;
|
||||
func_80255FE4(&this->position, &local->unk8, &local->unk14, tmp_f2);
|
||||
}
|
||||
}//L8038DE10
|
||||
|
||||
if(this->state == 7){
|
||||
if(func_80335794(this->unk148) > 0)
|
||||
func_8038CC9C(this, 3);
|
||||
}
|
||||
}
|
224
src/RBB/code_640.c
Normal file
224
src/RBB/code_640.c
Normal file
@@ -0,0 +1,224 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include "prop.h"
|
||||
|
||||
extern ActorInfo D_80390D20;
|
||||
extern ActorInfo D_80390050;
|
||||
extern ActorInfo D_80390200;
|
||||
extern ActorInfo D_80390270;
|
||||
extern ActorInfo D_80390D50;
|
||||
extern ActorInfo D_803906E0;
|
||||
extern ActorInfo D_80390738;
|
||||
extern ActorInfo D_803907D0;
|
||||
extern ActorInfo D_803907F4;
|
||||
extern ActorInfo D_80390818;
|
||||
extern ActorInfo D_8039083C;
|
||||
extern ActorInfo D_803904C0;
|
||||
extern ActorInfo D_803904E4;
|
||||
extern ActorInfo D_80390508;
|
||||
extern ActorInfo D_803903B0;
|
||||
extern ActorInfo D_803903D4;
|
||||
extern ActorInfo D_803903F8;
|
||||
extern ActorInfo D_80390640;
|
||||
extern ActorInfo D_80390664;
|
||||
extern ActorInfo D_80390688;
|
||||
extern ActorInfo D_803906B0;
|
||||
extern ActorInfo D_803908C0;
|
||||
extern ActorInfo D_803908E4;
|
||||
extern ActorInfo D_80390908;
|
||||
extern ActorInfo D_803909B0;
|
||||
extern ActorInfo D_803909D4;
|
||||
extern ActorInfo D_803909F8;
|
||||
extern ActorInfo D_80390A50;
|
||||
extern ActorInfo D_80390380;
|
||||
extern ActorInfo D_80390A80; //anchorswitch
|
||||
extern ActorInfo D_80390AB0; //dolphin
|
||||
extern ActorInfo D_80390AE0; //anchor
|
||||
extern ActorInfo D_80390B10;
|
||||
extern ActorInfo D_80390B40; //rarewareflag
|
||||
extern ActorInfo D_80390BD0;
|
||||
extern ActorInfo D_80390BF4;
|
||||
extern ActorInfo D_80390C18;
|
||||
extern ActorInfo D_80390C3C;
|
||||
extern ActorInfo D_80390CF0;
|
||||
extern ActorInfo D_80390D88;
|
||||
extern ActorInfo D_80390DAC; //TNTpart_IDStruct;
|
||||
extern ActorInfo D_80390E00;
|
||||
extern ActorInfo D_80390E34;
|
||||
extern ActorInfo D_80390E58;
|
||||
extern ActorInfo D_803900E0;
|
||||
extern ActorInfo D_80390104; //captcabinwooddoor
|
||||
extern ActorInfo D_80390128;
|
||||
extern ActorInfo D_8039014C;
|
||||
extern ActorInfo D_803901B8;
|
||||
extern ActorInfo D_803901DC;
|
||||
extern ActorInfo D_80390170;//skylight
|
||||
extern ActorInfo D_80390194;//honeycombswitch
|
||||
|
||||
|
||||
|
||||
extern void func_802D3D54(Actor *);
|
||||
|
||||
void func_80386A7C(Actor *);
|
||||
void func_80386BF8(Actor *arg0);
|
||||
Actor *func_80386B9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo D_803900C0[4] = {
|
||||
{0, 0.0f},
|
||||
{0, 0.0f},
|
||||
{0xD4, 0.15f},
|
||||
{0xD5, 0.5f}
|
||||
};
|
||||
|
||||
ActorInfo D_803900E0 = {
|
||||
0x107, 0x21D, 0x493, 0x1, NULL,
|
||||
func_802D3D54, func_80326224, func_80325E78,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390104 = {
|
||||
0x108, 0x21C, 0x492, 0x1, NULL,
|
||||
func_802D3D54, func_80326224, func_80325E78,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390128 = {
|
||||
0x22D, 0x266, 0x4BA, 0x1, NULL,
|
||||
func_802D3D54, func_80326224, func_80325E78,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8039014C = {
|
||||
0x22E, 0x267, 0x4BB, 0x1, NULL,
|
||||
func_802D3D54, func_80326224, func_80325E78,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390170 = {
|
||||
0x235, 0x23F, 0x4E2, 0x1, NULL,
|
||||
func_802D3D54, func_80326224, func_80325E78,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390194 = {
|
||||
0x15F, 0x18F, 0x42F, 0x1, D_803900C0,
|
||||
func_80386BF8, func_80326224, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803901B8 = {
|
||||
0x22F, 0x263, 0x4DB, 0x1, NULL,
|
||||
func_80386A7C, func_80326224, func_80386B9C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_803901DC = {
|
||||
0x230, 0x264, 0x4DE, 0x1, NULL,
|
||||
func_80386A7C, func_80326224, func_80386B9C,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
|
||||
/* .code */
|
||||
s32 func_80386A30(f32 (*arg0)[3]){
|
||||
s32 r;
|
||||
|
||||
r = ((*arg0)[0] < 0.0f)? 0 : 1;
|
||||
|
||||
return (((*arg0)[2] < 0.0f)? 0 : 2) + r;
|
||||
}
|
||||
|
||||
void func_80386A7C(Actor *this){
|
||||
f32 sp2C[3];
|
||||
s32 sp28;
|
||||
s32 temp_v0;
|
||||
|
||||
func_802D3D74(this);
|
||||
this->unk124_9 = 1;
|
||||
func_8024C5CC(&sp2C);
|
||||
sp28 = func_80386A30(&this->position);
|
||||
temp_v0 = func_80386A30(&sp2C);
|
||||
this->unk38_0 = 0;
|
||||
if(sp2C[0] + 8000.0f < this->position_x || this->position_x < sp2C[0] - 8000.0f)
|
||||
return;
|
||||
|
||||
if( !( (sp28 ^ temp_v0) & 2
|
||||
&& (-5000.0f < sp2C[0] && sp2C[0] < 6000.0f)
|
||||
&& (sp2C[2] < -600.0f || 600.0f < sp2C[2])
|
||||
)
|
||||
&& ( sp28 ^ temp_v0) != 3
|
||||
){
|
||||
this->unk38_0 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Actor *func_80386B9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
return (actor->unk38_0) ? func_80325E78(marker, gdl, mptr, arg3): NULL;
|
||||
}
|
||||
|
||||
void func_80386BF8(Actor *arg0){
|
||||
if(!mapSpecificFlags_get(0) && honeycombscore_get(HONEYCOMB_F_RBB_BOAT_HOUSE))
|
||||
mapSpecificFlags_set(0, TRUE);
|
||||
func_802D4A9C(arg0, 0);
|
||||
}
|
||||
|
||||
void rbb_func_80386C48(void){
|
||||
spawnableActorList_add(&D_80390D20, actor_new, 0x4880);
|
||||
spawnableActorList_add(&D_80390050, actor_new, 0);
|
||||
spawnableActorList_add(&D_80390200, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390270, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390D50, actor_new, 0x8004480);
|
||||
spawnableActorList_add(&D_803906E0, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390738, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_803907D0, actor_new, 0x6488);
|
||||
spawnableActorList_add(&D_803907F4, actor_new, 0x6488);
|
||||
spawnableActorList_add(&D_80390818, actor_new, 0x6488);
|
||||
spawnableActorList_add(&D_8039083C, actor_new, 0x6488);
|
||||
spawnableActorList_add(&D_803904C0, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_803904E4, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_80390508, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_803903B0, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_803903D4, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_803903F8, actor_new, 0x6408);
|
||||
spawnableActorList_add(&D_80390640, actor_new, 0x400);
|
||||
spawnableActorList_add(&D_80390664, actor_new, 0x400);
|
||||
spawnableActorList_add(&D_80390688, actor_new, 0x400);
|
||||
spawnableActorList_add(&D_803906B0, actor_new, 0);
|
||||
spawnableActorList_add(&D_803908C0, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_803908E4, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390908, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_803909B0, actor_new, 0x880);
|
||||
spawnableActorList_add(&D_803909D4, actor_new, 0x880);
|
||||
spawnableActorList_add(&D_803909F8, actor_new, 0x880);
|
||||
spawnableActorList_add(&D_80390A50, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390380, actor_new, 0x9aa);
|
||||
spawnableActorList_add(&D_80390A80, actor_new, 0x80); //anchorswitch
|
||||
spawnableActorList_add(&D_80390AB0, actor_new, 0x8C8); //dolphin
|
||||
spawnableActorList_add(&D_80390AE0, actor_new, 0xC80); //anchor
|
||||
spawnableActorList_add(&D_80390B10, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390B40, actor_new, 0x880); //rarewareflag
|
||||
spawnableActorList_add(&D_80390BD0, actor_new, 0xc2c);
|
||||
spawnableActorList_add(&D_80390BF4, actor_new, 0xc2c);
|
||||
spawnableActorList_add(&D_80390C18, actor_new, 0xc2c);
|
||||
spawnableActorList_add(&D_80390C3C, actor_new, 0xc2c);
|
||||
spawnableActorList_add(&D_80390CF0, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390D88, actor_new, 0x2000889);
|
||||
spawnableActorList_add(&D_80390DAC, actor_new, 0x2000889);
|
||||
spawnableActorList_add(&D_80390E00, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390E34, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_80390E58, actor_new, 0x80);
|
||||
spawnableActorList_add(&D_803900E0, actor_new, 0);
|
||||
spawnableActorList_add(&D_80390104, actor_new, 0x8600); //captcabinwooddoor
|
||||
spawnableActorList_add(&D_80390128, actor_new, 0);
|
||||
spawnableActorList_add(&D_8039014C, actor_new, 0);
|
||||
spawnableActorList_add(&D_803901B8, actor_new, 0x8600);
|
||||
spawnableActorList_add(&D_803901DC, actor_new, 0x8600);
|
||||
spawnableActorList_add(&D_80390170, actor_new, 0x8600); //skylight
|
||||
spawnableActorList_add(&D_80390194, actor_new, 0x8); //honeycombswitch
|
||||
}
|
31
src/RBB/code_7A60.c
Normal file
31
src/RBB/code_7A60.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void func_8038DE68(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo 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{
|
||||
func_802C3F04(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
|
||||
}
|
122
src/RBB/code_7B20.c
Normal file
122
src/RBB/code_7B20.c
Normal file
@@ -0,0 +1,122 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
ActorMarker *unk4;
|
||||
f32 unk8[3];
|
||||
f32 unk14[3];
|
||||
s32 unk20;
|
||||
f32 unk24[3];
|
||||
}ActorLocal_7B20;
|
||||
|
||||
void func_8038DF6C(Actor* this);
|
||||
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390D20 = {
|
||||
0x1AA, 0x296, 0x43B, 0x0, NULL,
|
||||
func_8038DF6C, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
|
||||
/*.code */
|
||||
void func_8038DF10(Actor *this, int arg1){
|
||||
if(arg1 == 1){
|
||||
func_80335924(this->unk148, 0x16a, 0, 1.2f);
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038DF6C(Actor* this){
|
||||
f32 sp7C[3];
|
||||
f32 sp70[3];
|
||||
f32 sp6C;
|
||||
f32 sp68 = time_getDelta();
|
||||
f32 sp5C[3];
|
||||
f32 sp58;
|
||||
ActorLocal_7B20 *local = (ActorLocal_7B20 *)&this->local;
|
||||
Actor* other;
|
||||
int i;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = randf2(80.0f, 100.0f);
|
||||
local->unk4 = NULL;
|
||||
local->unk20 = 0;
|
||||
local->unk24[0] = 0.0f;
|
||||
local->unk24[1] = 1.0f;
|
||||
local->unk24[2] = 0.5f;
|
||||
local->unk8[0] = this->position_x;
|
||||
local->unk8[1] = this->position_y;
|
||||
local->unk8[2] = this->position_z;
|
||||
local->unk14[0] = this->pitch;
|
||||
local->unk14[1] = this->yaw;
|
||||
local->unk14[2] = this->roll;
|
||||
func_8038DF10(this, 1);
|
||||
}//L8038E050
|
||||
if(++local->unk20 == 2){
|
||||
for(i = 0x5e; i < 0x63; i++){
|
||||
|
||||
other = func_80326D68(this->position, i, -1, &sp58);
|
||||
if(sp58 < 300.0f){
|
||||
local->unk4 = other->marker;
|
||||
other->position_x = this->position_x;
|
||||
other->position_y = this->position_y;
|
||||
other->position_z = this->position_z;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(func_8025773C(&local->unk24[1], sp68)){
|
||||
local->unk24[1] = randf2(1.5f, 2.5f);
|
||||
FUNC_8030E8B4(SFX_40E_UNKNOWN, 1.5f, 20000, this->position, 500, 1500);
|
||||
}//L8038E118
|
||||
|
||||
if(func_8025773C(&local->unk24[2], sp68)){
|
||||
local->unk24[2] = randf2(3.5f, 5.5f);
|
||||
func_8030E878(SFX_69_WHIPCRACK_CREAKING, randf2(1.1f, 1.2f), 0x55f0, this->position, 500.0f, 1500.0f);
|
||||
}//L8038E184
|
||||
|
||||
local->unk24[0] += sp68;
|
||||
sp70[0] = 0.0f;
|
||||
sp70[1] = sinf((local->unk24[0]*local->unk0)/ 180.0 * 3.141592654) * 10.0f;
|
||||
sp70[2] = 0.0f;
|
||||
|
||||
sp7C[0] = cosf((local->unk24[0]*local->unk0)/ 180.0 * 3.141592654)*7.5;
|
||||
sp7C[1] = sinf((local->unk24[0]*local->unk0)/ 180.0 * 3.141592654)*3.0;
|
||||
sp7C[2] = 0.0f;
|
||||
|
||||
this->position_x = local->unk8[0] + sp70[0];
|
||||
this->position_y = local->unk8[1] + sp70[1];
|
||||
this->position_z = local->unk8[2] + sp70[2];
|
||||
|
||||
sp5C[0] = local->unk14[0] + sp7C[0];
|
||||
sp5C[1] = local->unk14[1] + sp7C[1];
|
||||
sp5C[2] = local->unk14[2] + sp7C[2];
|
||||
|
||||
this->pitch = sp5C[0];
|
||||
this->yaw = sp5C[1];
|
||||
this->roll = sp5C[2];
|
||||
|
||||
if(local->unk4){
|
||||
other = marker_getActor(local->unk4);
|
||||
if(!(other->state < 7)){
|
||||
local->unk4 = NULL;
|
||||
}else{
|
||||
other->pitch = sp5C[0];
|
||||
other->roll = sp5C[2];
|
||||
TUPLE_ASSIGN(sp5C, 0.0f, 48.0f, 0.0f);
|
||||
ml_vec3f_pitch_rotate_copy(sp5C, sp5C, this->pitch);
|
||||
ml_vec3f_yaw_rotate_copy(sp5C, sp5C, this->yaw);
|
||||
|
||||
other->position_x = sp5C[0] + this->position_x;
|
||||
other->position_y = sp5C[1] + this->position_y;
|
||||
other->position_z = sp5C[2] + this->position_z;
|
||||
}
|
||||
}//L8038E39C
|
||||
}
|
110
src/RBB/code_7FD0.c
Normal file
110
src/RBB/code_7FD0.c
Normal file
@@ -0,0 +1,110 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
f32 unk4[3];
|
||||
f32 unk10[3];
|
||||
f32 unk1C[3];
|
||||
f32 unk28;
|
||||
f32 unk2C;
|
||||
}ActorLocal_RBB_7FD0;
|
||||
|
||||
void func_8038E3D8(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390D50 = {
|
||||
0x1ab, 0x297, 0x43C, 0x0, NULL,
|
||||
func_8038E3D8, NULL, func_80325888,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
|
||||
/* .code */
|
||||
void func_8038E3C0(Actor *this, s32 arg1){
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038E3D8(Actor *this){
|
||||
f32 sp74[3];
|
||||
f32 sp68[3];
|
||||
ActorLocal_RBB_7FD0 *local = (ActorLocal_RBB_7FD0 *) &this->local;
|
||||
int i;
|
||||
f32 sp5C = time_getDelta();
|
||||
f32 sp50[3];
|
||||
f32 sp44[3];
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk0 = randf2(80.0f, 100.0f);
|
||||
local->unk28 = 0.0f;
|
||||
local->unk2C = 0.5f;
|
||||
this->position_y -= 10.0f;
|
||||
local->unk4[0] = 0.0f;
|
||||
local->unk4[1] = 0.0f;
|
||||
local->unk4[2] = 0.0f;
|
||||
local->unk10[0] = this->position_x;
|
||||
local->unk10[1] = this->position_y;
|
||||
local->unk10[2] = this->position_z;
|
||||
local->unk1C[0] = this->pitch;
|
||||
local->unk1C[1] = this->yaw;
|
||||
local->unk1C[2] = this->roll;
|
||||
func_8038E3C0(this, 1);
|
||||
}//L8038E4C8
|
||||
|
||||
if(func_8025773C(&local->unk2C, sp5C)){
|
||||
local->unk2C = randf2(3.5f, 5.5f);
|
||||
func_8030E878(SFX_69_WHIPCRACK_CREAKING, randf2(1.1f, 1.2f), 22000, &this->position, 500.0f, 1500.0f);
|
||||
}//L8038E544
|
||||
|
||||
if(func_8032DCAC() == (int)this->marker && func_8028F20C()){
|
||||
player_getPosition(&sp44);
|
||||
if(sp44[0] < this->position_x - 10.0f && local->unk4[2] < 3.0f)
|
||||
local->unk4[2] += 5.0f*sp5C;
|
||||
|
||||
if(this->position_x + 10.0f < sp44[0] && -3.0f < local->unk4[2])
|
||||
local->unk4[2] -= 5.0f*sp5C;
|
||||
|
||||
if(this->position_z + 10.0f < sp44[2] && local->unk4[0] < 5.0f)
|
||||
local->unk4[0] += 5.0f*sp5C;
|
||||
|
||||
if(sp44[2] < this->position_z - 10.0f && -5.0f < local->unk4[0])
|
||||
local->unk4[0] -= 5.0f*sp5C;
|
||||
}
|
||||
else{
|
||||
for(i= 0; i< 3; i++){
|
||||
if(0.0f < local->unk4[i]){
|
||||
local->unk4[i] -= 2.5*sp5C;
|
||||
if(local->unk4[i] < 0.0f)
|
||||
local->unk4[i] = 0.0f;
|
||||
} else if(local->unk4[i] < 0.0f) { //L8038E710
|
||||
local->unk4[i] += 2.5*sp5C;
|
||||
if(0.0f < local->unk4[i])
|
||||
local->unk4[i] = 0.0f;
|
||||
}//L8038E74C
|
||||
}
|
||||
}//L8038E754
|
||||
|
||||
local->unk28 += sp5C;
|
||||
sp68[0] = 0.0f;
|
||||
sp68[1] = 5.0f * sinf((((local->unk28*0.8)*local->unk0)/180.0)*3.141592654);
|
||||
sp68[2] = 0.0f;
|
||||
sp74[0] = 4.5 * cosf(((local->unk28*local->unk0)/180.0) * 3.141592654);
|
||||
sp74[1] = 1.5 * sinf((((local->unk28*0.9)*local->unk0)/180.0)*3.141592654);
|
||||
sp74[2] = 0.0f;
|
||||
|
||||
this->position_x = local->unk10[0] + sp68[0];
|
||||
this->position_y = local->unk10[1] + sp68[1];
|
||||
this->position_z = local->unk10[2] + sp68[2];
|
||||
|
||||
sp50[0] = local->unk1C[0] + sp74[0];
|
||||
sp50[1] = local->unk1C[1] + sp74[1];
|
||||
sp50[2] = local->unk1C[2] + sp74[2];
|
||||
|
||||
this->pitch = sp50[0] + local->unk4[0];
|
||||
this->yaw = sp50[1] + local->unk4[1];
|
||||
this->roll = sp50[2] + local->unk4[2];
|
||||
}
|
398
src/RBB/code_8520.c
Normal file
398
src/RBB/code_8520.c
Normal file
@@ -0,0 +1,398 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void func_80255FE4(f32 [3], f32 [3], f32 [3], f32);
|
||||
extern void func_802C8F70(f32);
|
||||
extern int func_80309EB0(f32(*)[3], f32, f32 (*)[3], s32);
|
||||
extern int func_803342AC(f32(*)[3], f32(*)[3],f32);
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
f32 *unk0;
|
||||
f32 unk4;
|
||||
f32 unk8[3];
|
||||
f32 unk14[3];
|
||||
f32 unk20[3];
|
||||
f32 unk2C;
|
||||
f32 unk30;
|
||||
s32 unk34;
|
||||
u8 unk38;
|
||||
u8 unk39;
|
||||
}ActorLocal_RBB_8520;
|
||||
|
||||
void func_8038F190(Actor *this, s32 arg1);
|
||||
Actor *func_8038F4B0(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3);
|
||||
void func_8038F618(Actor *this);
|
||||
|
||||
|
||||
/* .data */
|
||||
f32 D_80390D80[2] = {1.8f, 1.0f};
|
||||
|
||||
ActorInfo D_80390D88 = {
|
||||
0x1B7, 0x2A4, 0x48C, 0x0, NULL,
|
||||
func_8038F618, NULL, func_8038F4B0,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_80390DAC = {
|
||||
0x1B7, 0x30D, 0x48C, 0x0, NULL,
|
||||
func_8038F618, NULL, func_8038F4B0,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390DD0[3] = {0xDE, 0xA7, 0x71};
|
||||
s32 D_80390DDC[4] = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
s32 D_80390DEC[4] = {0,0,0,0};
|
||||
|
||||
/* .rodata */
|
||||
|
||||
|
||||
/* .bss */
|
||||
f32 D_803912A0[3];
|
||||
|
||||
/* .code */
|
||||
void func_8038E910(Actor *this){
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
local->unk30 = 3.0f;
|
||||
}
|
||||
|
||||
void func_8038E920(Actor *this){
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
local->unk30 = 0.0f;
|
||||
}
|
||||
|
||||
void func_8038E92C(Actor *this){
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
|
||||
if(this->state == 2 && local->unk34 == 0)
|
||||
return;
|
||||
if(func_8025773C( &local->unk30, time_getDelta()))
|
||||
func_8038F190(this, 3);
|
||||
}
|
||||
|
||||
void func_8038E998(Actor *this){
|
||||
ParticleEmitter *other = partEmitList_pushNew(2);
|
||||
f32 temp_f0;
|
||||
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFA5C(other, 0.0f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, 0.25f, 0.75f);
|
||||
func_802EFB84(other, 0.75f, 1.75f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other, -50.0f, 25.0f, -50.0f, 50.0f, 25.0f, 50.0f);
|
||||
particleEmitter_setParticleVelocityRange(other, -50.0f, 100.0f, -50.0f, 50.0f, 200.0f, 50.0f);
|
||||
func_802EFEC0(other, 0.5f, 1.0f);
|
||||
particleEmitter_emitN(other, 2);
|
||||
}
|
||||
|
||||
void func_8038EAB4(Actor *this){
|
||||
ParticleEmitter *other;
|
||||
func_802BB3DC(0, 60.0f, 0.9f);
|
||||
other = partEmitList_pushNew(1);
|
||||
particleEmitter_setSprite(other, ASSET_4A0_SPRITE_EXPLOSION);
|
||||
func_802EFA5C(other, 0.1f, 0.2f);
|
||||
func_802EFA70(other, 8);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 0);
|
||||
particleEmitter_setParticleFramerateRange(other, 4.0f, 4.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other, 0.0f, 200.0f, 0.0f, 0.0f, 200.0f, 0.0f);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, 3.0f, 3.0f);
|
||||
func_802EFB84(other, 8.0f, 8.0f);
|
||||
func_802EFEC0(other, 0.5f, 0.5f);
|
||||
particleEmitter_setParticleVelocityRange(other, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
particleEmitter_emitN(other, 1);
|
||||
}
|
||||
|
||||
void func_8038EC14(Actor *this){
|
||||
ParticleEmitter *other;
|
||||
other = partEmitList_pushNew(6);
|
||||
particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2);
|
||||
func_802EFA5C(other, 0.05f, 0.1f);
|
||||
particleEmitter_setStartingFrameRange(other, 0, 7);
|
||||
particleEmitter_setPosition(other, &this->position);
|
||||
func_802EFB70(other, 1.0f, 1.5f);
|
||||
func_802EFB84(other, 2.0f, 3.0f);
|
||||
particleEmitter_setParticleSpawnPositionRange(other, -75.0f, 25.0f, -75.0f, 75.0f, 75.0f, 75.0f);
|
||||
particleEmitter_setParticleVelocityRange(other, -70.0f, 50.0f, -70.0f, 70.0f, 100.0f, 70.0f);
|
||||
func_802EFFA8(other, &D_80390DD0);
|
||||
func_802EFEC0(other, 3.0f, 4.0f);
|
||||
particleEmitter_emitN(other, 6);
|
||||
}
|
||||
|
||||
void func_8038ED3C(Actor * actor, s32 arg1){
|
||||
ParticleEmitter *other = partEmitList_pushNew(0xa);
|
||||
particleEmitter_setParticleAccelerationRange(other, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f);
|
||||
func_802EF9F8(other, 0.6f);
|
||||
func_802EFA18(other, 3);
|
||||
particleEmitter_setModel(other, arg1);
|
||||
particleEmitter_setPosition(other, &actor->position);
|
||||
func_802EFB70(other, 0.05f, 0.4f);
|
||||
func_802EFE24(other, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
|
||||
particleEmitter_setSpawnIntervalRange(other, 0.0f, 0.01f);
|
||||
func_802EFEC0(other, 10.0f, 10.0f);
|
||||
particleEmitter_setParticleVelocityRange(other, -700.0f, 200.0f, -700.0f, 700.0f, 500.0f, 700.0f);
|
||||
particleEmitter_emitN(other, 0xa);
|
||||
}
|
||||
|
||||
int func_8038EE90(Actor *this){
|
||||
f32 sp2C[3];
|
||||
f32 sp20[3];
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
|
||||
sp2C[0] = local->unk14[0];
|
||||
sp2C[1] = local->unk14[1];
|
||||
sp2C[2] = local->unk14[2];
|
||||
|
||||
sp20[0] = local->unk20[0];
|
||||
sp20[1] = local->unk20[1];
|
||||
sp20[2] = local->unk20[2];
|
||||
|
||||
sp2C[1] += 75.0f;
|
||||
sp20[1] += 75.0f;
|
||||
return func_803342AC(&sp2C, &sp20, 100.0f);
|
||||
}
|
||||
|
||||
int func_8038EF08(Actor *this, f32 (*position)[3], f32 arg2){
|
||||
f32 sp54[3];
|
||||
int sp50;
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
f32 sp40[3];
|
||||
f32 sp3C;
|
||||
f32 sp30[3];
|
||||
|
||||
|
||||
sp54[0] = (*position)[0] - this->position_x;
|
||||
sp54[1] = (*position)[1] - this->position_y;
|
||||
sp54[2] = (*position)[2] - this->position_z;
|
||||
if(180.0 < gu_sqrtf(sp54[0]*sp54[0] + sp54[1]*sp54[1] + sp54[2]*sp54[2]))
|
||||
ml_vec3f_set_length(&sp54, 150.0f);
|
||||
|
||||
local->unk20[0] = sp54[0] + this->position_x;
|
||||
local->unk20[1] = sp54[1] + this->position_y;
|
||||
local->unk20[2] = sp54[2] + this->position_z;
|
||||
|
||||
local->unk20[1] = func_80309724(&local->unk20);
|
||||
|
||||
sp40[0] = local->unk20[0];
|
||||
sp40[1] = local->unk20[1] + this->scale*100.0f;
|
||||
sp40[2] = local->unk20[2];
|
||||
sp3C = this->scale*60.0f;
|
||||
if(func_80309EB0(&sp40, sp3C, &sp30, 0)){
|
||||
sp50 = 1;
|
||||
}else{
|
||||
sp50 = 0;
|
||||
}
|
||||
if( !func_80329210(this, &local->unk20)
|
||||
|| ((local->unk2C + 30.0f) < local->unk20[1])
|
||||
|| sp50
|
||||
){
|
||||
local->unk20[0] = this->position_x;
|
||||
local->unk20[1] = this->position_y;
|
||||
local->unk20[2] = this->position_z;
|
||||
if(local->unk39 < 3 && ++local->unk39 == 3){
|
||||
local->unk39 = 0;
|
||||
return 0;
|
||||
}
|
||||
}else{
|
||||
local->unk34 = func_8038EE90(this);
|
||||
if(local->unk34 == 0){
|
||||
local->unk20[0] = this->position_x;
|
||||
local->unk20[1] = this->position_y;
|
||||
local->unk20[2] = this->position_z;
|
||||
}
|
||||
}
|
||||
func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.1f, randf2(-0.1f, 0.1f) + (1.0/arg2)*0.4);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
local->unk14[0] = this->position_x;
|
||||
local->unk14[1] = this->position_y;
|
||||
local->unk14[2] = this->position_z;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void func_8038F190(Actor *this, s32 arg1){
|
||||
f32 sp44[3];
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
|
||||
player_getPosition(&sp44);
|
||||
|
||||
if(local->unk34){
|
||||
func_803343F8(local->unk34);
|
||||
local->unk34 = FALSE;
|
||||
}
|
||||
|
||||
if(arg1 == 1){
|
||||
func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, 1.0f);
|
||||
func_80335A8C(this->unk148, 4);
|
||||
}//L8038F204
|
||||
|
||||
if(arg1 == 2){
|
||||
int sp3C = 0;
|
||||
if(func_80329210(this, &sp44)){
|
||||
local->unk4 += 0.3;
|
||||
if(*local->unk0 < local->unk4)
|
||||
local->unk4 = *local->unk0;
|
||||
sp3C = func_8038EF08(this, &sp44, local->unk4);
|
||||
}//L8038F28C
|
||||
if(!sp3C){
|
||||
func_8038E920(this);
|
||||
local->unk4 -= 0.5;
|
||||
if(local->unk4 < 0.5)
|
||||
local->unk4 = 0.5f;
|
||||
func_8038EF08(this, &local->unk8, local->unk4);
|
||||
}
|
||||
}//L8038F2FC
|
||||
|
||||
if(arg1 == 3){
|
||||
func_8038FB6C();
|
||||
actor_collisionOff(this);
|
||||
func_80324D54(0.0f, SFX_1B_EXPLOSION_1, 1.0f, 0x7d00, &this->position, 1000.0f, 2000.0f);
|
||||
func_80335924(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f);
|
||||
func_80335A8C(this->unk148, 2);
|
||||
func_8038EAB4(this);
|
||||
func_8038EC14(this);
|
||||
func_8038ED3C(this, 0x53a);
|
||||
func_8038ED3C(this, 0x53b);
|
||||
func_8038ED3C(this, 0x53c);
|
||||
func_80326310(this);
|
||||
this->unk10_1 = 0;
|
||||
func_8038E920(this);
|
||||
|
||||
}//L8038F3C8
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
|
||||
void func_8038F3F0(ActorMarker *marker, s32 arg1){
|
||||
Actor* actor = marker_getActor(marker);
|
||||
if(actor->state < 3){
|
||||
func_8038F190(actor, 3);
|
||||
}
|
||||
}
|
||||
|
||||
void func_8038F430(ActorMarker *marker, s32 arg1){
|
||||
Actor* actor = marker_getActor(marker);
|
||||
f32 sp18[3];
|
||||
|
||||
if(actor->state < 3){
|
||||
player_getPosition(&sp18);
|
||||
if(ml_vec3f_distance(&actor->position, &sp18) < 300.0f)
|
||||
func_8028F55C(5, actor->marker);
|
||||
func_8038F190(actor, 3);
|
||||
}//L8038F4A4
|
||||
}
|
||||
|
||||
Actor * func_8038F4B0(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){
|
||||
Actor *actor;
|
||||
ActorLocal_RBB_8520 *local;
|
||||
s32 sp28[4];
|
||||
f32 temp_f2;
|
||||
//s32 temp_v0;
|
||||
|
||||
actor = marker_getActor(marker);
|
||||
local = (ActorLocal_RBB_8520 *)&actor->local;
|
||||
func_8033A45C(1,2);
|
||||
func_8033A45C(3,1);
|
||||
func_8033A45C(6,1);
|
||||
func_8033A45C(7,1);
|
||||
if(local->unk30 > 0.0f && local->unk30 <= 1.0){
|
||||
temp_f2 = 2*(3*local->unk30 - (s32)(3*local->unk30));
|
||||
if (temp_f2 > 1.0f)
|
||||
temp_f2 = 2 - temp_f2;
|
||||
|
||||
sp28[0] = (s32) (temp_f2*255);\
|
||||
sp28[1] = (s32) (temp_f2*255);\
|
||||
sp28[2] = (s32) (temp_f2*255);
|
||||
sp28[3] = 255;
|
||||
D_803912A0[0] = actor->pitch;
|
||||
D_803912A0[1] = actor->yaw;
|
||||
D_803912A0[2] = actor->roll;
|
||||
func_8033A334(sp28, &D_80390DDC);
|
||||
}//L8038F5F8
|
||||
return func_80325888(marker, gdl, mptr, arg3);
|
||||
}
|
||||
|
||||
void func_8038F618(Actor *this){
|
||||
f32 sp7C[3];
|
||||
int sp78;
|
||||
ActorLocal_RBB_8520 *local = (ActorLocal_RBB_8520 *)&this->local;
|
||||
f32 sp70 = time_getDelta();
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
f32 sp5C[3];
|
||||
f32 sp50[3];
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
f32 sp44;
|
||||
f32 pad0;
|
||||
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
this->unk16C_4 = 1;
|
||||
local->unk8[0] = this->position_x;
|
||||
local->unk8[1] = this->position_y;
|
||||
local->unk8[2] = this->position_z;
|
||||
local->unk38 = 0;
|
||||
local->unk39 = 0;
|
||||
local->unk0 = &D_80390D80[(this->modelCacheIndex == 0x30d)? 1 : 0];
|
||||
local->unk2C = func_80309724(&this->position);
|
||||
local->unk34 = 0;
|
||||
local->unk4 = 0.5f;
|
||||
local->unk30 = 0.0f;
|
||||
marker_setCollisionScripts(this->marker, func_8038F430, func_8038F3F0, func_8038F430);
|
||||
func_8038F190(this, 1);
|
||||
return;
|
||||
}//L8038F714
|
||||
|
||||
player_getPosition(sp7C);
|
||||
sp78 = func_80329210(this, sp7C);
|
||||
if(!local->unk38){
|
||||
local->unk38 = TRUE;
|
||||
func_8038FB54();
|
||||
}
|
||||
func_8038E92C(this);
|
||||
if(this->state == 1){
|
||||
if(sp78 && ml_vec3f_distance(&this->position, &sp7C) < 500.0f){
|
||||
func_8038F190(this, 2);
|
||||
}
|
||||
}//L8038F7A0
|
||||
|
||||
if(this->state == 2){
|
||||
sp5C[0] = this->position_x;
|
||||
sp5C[1] = this->position_y;
|
||||
sp5C[2] = this->position_z;
|
||||
|
||||
if(0.0f != local->unk30 && !sp78)
|
||||
func_8038E920(this);
|
||||
|
||||
if(0.0f == local->unk30 && sp78)
|
||||
func_8038E910(this);
|
||||
|
||||
func_8033568C(this->unk148, &sp6C, &sp68);
|
||||
|
||||
if(0.1 <= sp68 && sp68 <= 0.6)
|
||||
func_80255FE4(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 );
|
||||
if(sp6C < 0.6 && 0.6 <= sp68)
|
||||
func_8030E878(SFX_6C_LOCKUP_CLOSING, 1.1 + randf2(-0.05f, 0.05f), 20000, this->position, 500.0f, 1000.0f);
|
||||
|
||||
if(sp6C < 0.1 && 0.1 <= sp68)
|
||||
func_8038E998(this);
|
||||
|
||||
sp50[0] = local->unk20[0] - local->unk14[0];
|
||||
sp50[1] = local->unk20[1] - local->unk14[1];
|
||||
sp50[2] = local->unk20[2] - local->unk14[2];
|
||||
|
||||
func_80258A4C(&D_80390DEC,this->yaw - 90.0f, &sp50, &sp4C, &sp48, &sp44);
|
||||
|
||||
this->yaw += (sp44*400.0f)*sp70;
|
||||
if(func_80335794(this->unk148) > 0){
|
||||
if(ml_vec3f_distance(&this->position, &local->unk8) < 10.0f){
|
||||
func_8038F190(this, 1);
|
||||
}else{
|
||||
func_8038F190(this, 2);
|
||||
}
|
||||
}
|
||||
}//L8038FA50
|
||||
}
|
62
src/RBB/code_9670.c
Normal file
62
src/RBB/code_9670.c
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern
|
||||
|
||||
void func_8038FB84(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390E00 = {
|
||||
0x1B8, 0x2A5, 0x0, 0x0, NULL,
|
||||
func_8038FB84, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .bss */
|
||||
u8 D_803912B0;
|
||||
|
||||
/* .code */
|
||||
void func_8038FA60(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
func_802C8F70(actor->yaw);
|
||||
func_802C937C(6, &actor->position);
|
||||
}
|
||||
|
||||
void func_8038FA9C(Actor *this, s32 arg1){
|
||||
if(arg1 == 3){
|
||||
func_80324E38(0.0f, 3);
|
||||
timedFunc_set_2(1.0f, (TFQM2)func_8025A6EC, COMUSIC_2B_DING_B, 28000);
|
||||
timed_setCameraToNode(1.8f, 1);
|
||||
timedFunc_set_1(2.0f, (TFQM1) func_8038FA60, (s32)this->marker);
|
||||
func_80324E88(5.0f);
|
||||
func_80324E38(5.0f, 0);
|
||||
}
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038FB54(void){
|
||||
D_803912B0++;
|
||||
}
|
||||
|
||||
void func_8038FB6C(void){
|
||||
D_803912B0--;
|
||||
}
|
||||
|
||||
void func_8038FB84(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
D_803912B0 = 0;
|
||||
func_8038FA9C(this, 1);
|
||||
}
|
||||
|
||||
if(this->state == 1){
|
||||
if(D_803912B0 > 0)
|
||||
func_8038FA9C(this, 2);
|
||||
}
|
||||
|
||||
if(this->state == 2){
|
||||
if(D_803912B0 == 0)
|
||||
func_8038FA9C(this, 3);
|
||||
}
|
||||
}
|
60
src/RBB/code_9840.c
Normal file
60
src/RBB/code_9840.c
Normal file
@@ -0,0 +1,60 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void func_8038FC48(Actor *this);
|
||||
|
||||
/* typedefs and declarations */
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s16 *unk4;
|
||||
ActorMarker *unk8;
|
||||
}ActorLocal_RBB_9840;
|
||||
|
||||
/* .data */
|
||||
s16 D_80390E30[2] = {0x177, 0x17F};
|
||||
ActorInfo D_80390E34 = {
|
||||
0x1D2, 0x31B, 0x0, 0x0, NULL,
|
||||
func_8038FC48, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
ActorInfo D_80390E58 = {
|
||||
0x1D3, 0x31C, 0x0, 0x0, NULL,
|
||||
func_8038FC48, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/*.code */
|
||||
void func_8038FC30(Actor *this, s32 arg1){
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_8038FC48(Actor *this){
|
||||
ActorLocal_RBB_9840 *local = (ActorLocal_RBB_9840 *)&this->local;
|
||||
f32 sp20;
|
||||
f32 tmp_f2;
|
||||
s32 tmp_a1;
|
||||
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
actor_collisionOff(this);
|
||||
local->unk4 = D_80390E30 + (this->marker->unk14_20 - 0x1d2);
|
||||
local->unk8 = NULL;
|
||||
|
||||
local->unk0 = func_802F9AA8(0x400);
|
||||
func_802F9DB8(local->unk0, 1.0f, 1.0f, 0.0f);
|
||||
func_802F9EC4(local->unk0, &this->position, 0x1f4, 0x3e8);
|
||||
func_802F9F80(local->unk0, 0.0f, 8999999488.0f, 0.0f);
|
||||
func_802FA060(local->unk0, 22000, 22000, 0.0f);
|
||||
func_8038FC30(this, 1);
|
||||
}
|
||||
else{//L8038FD34
|
||||
if(local->unk8 == NULL)
|
||||
local->unk8 = func_80326EEC(*local->unk4)->marker;
|
||||
sp20 = func_8038A6B8(local->unk8);
|
||||
tmp_f2 = 1.5* sp20 + 0.5;
|
||||
func_802F9DB8(local->unk0, tmp_f2, tmp_f2, 0.0f);
|
||||
tmp_a1 = (s32) (sp20*32000.0f);
|
||||
func_802FA060(local->unk0, tmp_a1, tmp_a1, 0.0f);
|
||||
}
|
||||
}
|
68
src/RBB/code_99F0.c
Normal file
68
src/RBB/code_99F0.c
Normal file
@@ -0,0 +1,68 @@
|
||||
#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, (TFQM1)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(func_8025773C(&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);
|
||||
}
|
214
src/RBB/code_CA0.c
Normal file
214
src/RBB/code_CA0.c
Normal file
@@ -0,0 +1,214 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
/* typedefs and declarations */
|
||||
void func_803878B0(Actor *this);
|
||||
void func_8038756C(Actor *this, s32 arg1);
|
||||
|
||||
/* .data */
|
||||
ActorInfo D_80390200 = {
|
||||
0x183, 0x173, 0x402, 0x0, NULL,
|
||||
func_803878B0, NULL, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
s32 D_80390224[4] = { 0xff, 0, 0, 0xff};
|
||||
s32 D_80390234[4] = { 0x76, 0, 0, 0xff};
|
||||
s32 D_80390244[4] = { 0x76, 0, 0, 0xff};
|
||||
s32 D_80390254[4] = { 0xff, 0, 0, 0xff};
|
||||
|
||||
f32 D_80390264[3] = {-4900.0f, 0.0f, 0.0f};
|
||||
|
||||
/* .code */
|
||||
void func_80387090(ActorMarker *marker, s32 arg1){
|
||||
func_8038756C(marker_getActor(marker), arg1);
|
||||
}
|
||||
|
||||
void func_803870BC(s32 arg0, s32 arg1){
|
||||
s32 temp_v0;
|
||||
|
||||
if(temp_v0 = func_8034C528(arg0))
|
||||
func_8034DFB0(temp_v0, &D_80390224, &D_80390234, (f64)arg1/1000.0);
|
||||
}
|
||||
|
||||
void func_8038711C(s32 arg0, s32 arg1){
|
||||
s32 temp_v0;
|
||||
|
||||
func_8030E6D4(SFX_90_SWITCH_PRESS);
|
||||
if(temp_v0 = func_8034C528(arg0))
|
||||
func_8034DFB0(temp_v0, &D_80390244, &D_80390254, (f64)arg1/1000.0);
|
||||
}
|
||||
|
||||
void func_8038718C(ActorMarker *marker){
|
||||
void *sp44;
|
||||
f32 sp38[3];
|
||||
f32 sp2C[3];
|
||||
|
||||
if(sp44 = func_8034C528(0x19a)){
|
||||
sp38[0] = sp38[1] = sp38[2] = 0.0f;
|
||||
sp2C[0] = 0.0f;
|
||||
sp2C[2] = 0.0f;
|
||||
sp2C[1] = 450.0f;
|
||||
func_8034DDF0(sp44, &sp38, &sp2C, 4.0f, 1);
|
||||
func_8034E1A4(sp44, SFX_D8_CRANE, 1.0f, 1.0f);
|
||||
}
|
||||
timed_setCameraToNode(0.0f, 4);
|
||||
timed_setCameraToNode(2.5f, 5);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 0.5f, 19000);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 0.6f, 19000);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 0.7f, 19000);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 0.8f, 19000);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 0.9f, 19000);
|
||||
timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 19000);\
|
||||
func_80324E88(5.0f);
|
||||
func_80324E38(5.0f, 0);
|
||||
timedFunc_set_2(5.0f, (TFQM2) func_80387090, (s32) marker, 3);
|
||||
}
|
||||
|
||||
void func_80387308(ActorMarker *marker){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
void *sp40;
|
||||
f32 sp34[3];
|
||||
f32 sp28[3];
|
||||
|
||||
if(sp40 = func_8034C528(0x19a)){
|
||||
TUPLE_ASSIGN(sp34, 0.0f,200.0f,0.0f);
|
||||
TUPLE_ASSIGN(sp28, 0.0f, 0.0f, 0.0f);
|
||||
func_8034DDF0(sp40, &sp34, &sp28, 0.5f, 1);
|
||||
func_8034E1A4(sp40, SFX_D8_CRANE, 1.0f, 1.0f);
|
||||
}//L80387394
|
||||
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.5f, 19000);
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.6f, 19000);
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.7f, 19000);
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.8f, 19000);
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.9f, 19000);
|
||||
timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 19000);
|
||||
timedFunc_set_2(0.5f, (TFQM2) func_80387090, (s32) actor->marker, 1);
|
||||
|
||||
timedFunc_set_2(1.5f, (TFQM2) func_803870BC, 0x19d, 0x1f4);
|
||||
func_80324E88(1.5f);
|
||||
func_80324E38(1.5f, 0);
|
||||
|
||||
}
|
||||
|
||||
void func_80387488(ActorMarker *marker){
|
||||
f32 sp1C[3];
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
player_getPosition(&sp1C);
|
||||
if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){
|
||||
sp1C[1] = 0;
|
||||
if(ml_vec3f_distance(&sp1C, &D_80390264) < 500.0f){
|
||||
timedFunc_set_1(1.0f, (TFQM1) func_80387488, (s32)actor->marker);
|
||||
return;
|
||||
}
|
||||
}
|
||||
func_80324E38(0.0f, 3);
|
||||
timed_setCameraToNode(0.0f, 6);
|
||||
timedFunc_set_1(0.5f, (TFQM1) func_80387308, (s32) actor->marker);
|
||||
}
|
||||
|
||||
void func_8038756C(Actor *this, s32 arg1){
|
||||
f32 sp6C[3];
|
||||
f32 sp60[3];
|
||||
void * temp_v0;
|
||||
f32 sp50[3];
|
||||
f32 sp44[3];
|
||||
f32 sp40;
|
||||
void * sp3C;
|
||||
f32 sp30[3];
|
||||
f32 sp24[3];
|
||||
|
||||
if(arg1 == 1){
|
||||
if(this->state != 0){
|
||||
sp6C[0] = 0.0f;
|
||||
sp6C[1] = 0.0f;
|
||||
sp6C[2] = -40.0f;
|
||||
sp60[0] = sp60[1] = sp60[2] = 0.0f;
|
||||
|
||||
if(temp_v0 = func_8034C528(0x19C))
|
||||
func_8034DDF0(temp_v0, &sp6C, &sp60, 0.1f, 1);
|
||||
|
||||
if(temp_v0 = func_8034C528(0x19D))
|
||||
func_8034DDF0(temp_v0, &sp6C, &sp60, 0.1f, 1);
|
||||
}
|
||||
}//L80387610
|
||||
|
||||
if(arg1 == 2){
|
||||
sp50[0] = sp50[1] = sp50[2] = 0.0f;
|
||||
sp44[0] = 0.0f;
|
||||
sp44[1] = 0.0f;
|
||||
sp44[2] = -40.0f;
|
||||
|
||||
if(temp_v0 = func_8034C528(0x19C))
|
||||
func_8034DDF0(temp_v0, &sp50, &sp44, 0.1f, 1);
|
||||
|
||||
if(temp_v0 = func_8034C528(0x19D))
|
||||
func_8034DDF0(temp_v0, &sp50, &sp44, 0.1f, 1);
|
||||
|
||||
timedFunc_set_2(0.1f, func_8038711C, 0x19d, 0x1f4);
|
||||
timedFunc_set_2(0.1f, func_8025A6EC, COMUSIC_2B_DING_B, 28000);
|
||||
func_80324E38(0.2f, 3);
|
||||
timedFunc_set_1(1.1f, func_8038718C, this->marker);
|
||||
}//L80387704
|
||||
|
||||
if(arg1 == 3){
|
||||
item_set(ITEM_6_HOURGLASS, 1);
|
||||
item_set(ITEM_0_HOURGLASS_TIMER, 0x3bf);
|
||||
}
|
||||
|
||||
if(this->state == 3){
|
||||
item_set(ITEM_6_HOURGLASS, 0);
|
||||
}
|
||||
|
||||
if(arg1 == 4){
|
||||
sp3C = func_8034C528(0x19a);
|
||||
if(sp3C){
|
||||
sp30[0] = 0.0f;
|
||||
sp30[1] = 450.0f;
|
||||
sp30[2] = 0.0f;
|
||||
sp24[0] = 0.0f;
|
||||
sp24[1] = 200.0f;
|
||||
sp24[2] = 0.0f;
|
||||
|
||||
|
||||
func_8034DDF0(sp3C, &sp30, &sp24, 3.0f, 1);
|
||||
func_8034E1A4(sp3C, SFX_D8_CRANE, 1.0f, 1.0f);
|
||||
}//L803877D4
|
||||
timed_playSfx(3.0f, SFX_7F_HEAVYDOOR_SLAM, 0.5f, 25000);
|
||||
timed_playSfx(3.0f, SFX_7F_HEAVYDOOR_SLAM, 0.6f, 25000);
|
||||
timedFunc_set_1(4.0f, func_80387488, this->marker);
|
||||
}//L80387828
|
||||
|
||||
this->state = arg1;
|
||||
}
|
||||
|
||||
void func_80387850(ActorMarker *marker, s32 arg1){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
if(actor->state == 1){
|
||||
func_8038756C(actor, 2);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80387890(Actor *this){
|
||||
func_8038756C(this, 0);
|
||||
}
|
||||
|
||||
void func_803878B0(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
this->unk16C_4 = 1;
|
||||
this->marker->unk30 = func_80387890;
|
||||
marker_setCollisionScripts(this->marker, 0, func_80387850, 0);
|
||||
func_8032AA58(this, 1.1f);
|
||||
func_8038756C(this, 1);
|
||||
}
|
||||
|
||||
if(this->state == 3){
|
||||
if(item_empty(ITEM_0_HOURGLASS_TIMER)){
|
||||
func_8038756C(this, 4);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user