core2/code_47BD0.c done
This commit is contained in:
parent
ecd10dbb0a
commit
250f550f67
|
@ -1,4 +1,4 @@
|
||||||
# banjo (91.5628%)
|
# banjo (91.7705%)
|
||||||
|
|
||||||
<img src="./progress/progress_total.svg">
|
<img src="./progress/progress_total.svg">
|
||||||
|
|
||||||
|
|
|
@ -2890,7 +2890,7 @@ enum asset_e
|
||||||
ASSET_49B_MODEL_TWINKLY_SHARD_RED,
|
ASSET_49B_MODEL_TWINKLY_SHARD_RED,
|
||||||
// 49c (Green & Red Area?)
|
// 49c (Green & Red Area?)
|
||||||
ASSET_49D_MODEL_SEAMAN_GRUBLIN = 0x49D,
|
ASSET_49D_MODEL_SEAMAN_GRUBLIN = 0x49D,
|
||||||
// 49e 2D Bee (Used In Swarms)
|
ASSET_49E_SPRITE_BEE_SWARM,
|
||||||
// 49f 2D Glowing Bee (Beta)
|
// 49f 2D Glowing Bee (Beta)
|
||||||
ASSET_4A0_SPRITE_EXPLOSION = 0x4A0,
|
ASSET_4A0_SPRITE_EXPLOSION = 0x4A0,
|
||||||
// 4a1 Brick Wall Near GV Entrance
|
// 4a1 Brick Wall Near GV Entrance
|
||||||
|
@ -3942,7 +3942,8 @@ enum marker_e{
|
||||||
|
|
||||||
MARKER_20F_WOZZA_IN_CAVE = 0x20F,
|
MARKER_20F_WOZZA_IN_CAVE = 0x20F,
|
||||||
|
|
||||||
MARKER_218_LIMBO = 0x218,
|
MARKER_217_BEE_SWARM = 0x217,
|
||||||
|
MARKER_218_LIMBO,
|
||||||
MARKER_219_MUMMUM,
|
MARKER_219_MUMMUM,
|
||||||
MARKER_21A_SEAMAN_GRUBLIN,
|
MARKER_21A_SEAMAN_GRUBLIN,
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</mask>
|
</mask>
|
||||||
<g mask="url(#anybadge_1)">
|
<g mask="url(#anybadge_1)">
|
||||||
<path fill="#555" d="M0 0h44v20H0z"/>
|
<path fill="#555" d="M0 0h44v20H0z"/>
|
||||||
<path fill="#2fe000" d="M44 0h67v20H44z"/>
|
<path fill="#2de000" d="M44 0h67v20H44z"/>
|
||||||
<path fill="url(#b)" d="M0 0h111v20H0z"/>
|
<path fill="url(#b)" d="M0 0h111v20H0z"/>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<text x="22.0" y="14">core2</text>
|
<text x="22.0" y="14">core2</text>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.5256%</text>
|
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.8876%</text>
|
||||||
<text x="77.5" y="14">89.5256%</text>
|
<text x="77.5" y="14">89.8876%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
@ -9,7 +9,7 @@
|
||||||
</mask>
|
</mask>
|
||||||
<g mask="url(#anybadge_1)">
|
<g mask="url(#anybadge_1)">
|
||||||
<path fill="#555" d="M0 0h150v20H0z"/>
|
<path fill="#555" d="M0 0h150v20H0z"/>
|
||||||
<path fill="#26e000" d="M150 0h67v20H150z"/>
|
<path fill="#25e000" d="M150 0h67v20H150z"/>
|
||||||
<path fill="url(#b)" d="M0 0h217v20H0z"/>
|
<path fill="url(#b)" d="M0 0h217v20H0z"/>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
|
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.5628%</text>
|
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.7705%</text>
|
||||||
<text x="183.5" y="14">91.5628%</text>
|
<text x="183.5" y="14">91.7705%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -2,6 +2,16 @@
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern void func_8030DBFC(u32, f32, f32, f32);
|
||||||
|
extern bool func_80309DBC(f32[3], f32[3], f32, f32 sp54[3], s32, s32);
|
||||||
|
extern void func_80320004(s32, bool);
|
||||||
|
extern void func_8030DEB4(u8, f32, f32);
|
||||||
|
extern void func_8030DF68(u8, f32[3]);
|
||||||
|
extern void func_8030E2C4(u8);
|
||||||
|
extern void sfxsource_setSampleRate(u8, s32);
|
||||||
|
extern void ml_vec3f_normalize(f32[3]);
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
f32 unk0[3];
|
f32 unk0[3];
|
||||||
f32 unkC[3];
|
f32 unkC[3];
|
||||||
|
@ -23,22 +33,18 @@ typedef struct{
|
||||||
s32 unk24;
|
s32 unk24;
|
||||||
}ActorLocal_core2_47BD0;
|
}ActorLocal_core2_47BD0;
|
||||||
|
|
||||||
void func_802CF83C(Actor *this);
|
/* .h */
|
||||||
Actor *func_802CEBFC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
void chBeeSwarm_update(Actor *this);
|
||||||
|
Actor *chBeeSwarm_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||||
|
|
||||||
extern f32 D_803765E4;
|
|
||||||
|
|
||||||
extern s32 D_8037DCBC;
|
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
extern ActorInfo D_80367310 = {0x217, ACTOR_34D_BEE_SWARM, 0x49E,
|
ActorInfo D_80367310 = {MARKER_217_BEE_SWARM, ACTOR_34D_BEE_SWARM, ASSET_49E_SPRITE_BEE_SWARM,
|
||||||
1, NULL,
|
1, NULL,
|
||||||
func_802CF83C, NULL, func_802CEBFC,
|
chBeeSwarm_update, NULL, chBeeSwarm_draw,
|
||||||
0, 0, 1.0f, 0
|
0, 0, 1.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .rodata */
|
|
||||||
extern f32 D_803765E0;
|
|
||||||
|
|
||||||
/* .bss */
|
/* .bss */
|
||||||
extern s32 D_8037DCBC;
|
extern s32 D_8037DCBC;
|
||||||
|
@ -55,7 +61,7 @@ void func_802CEB60(Actor *this){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CEBA8(Actor *this){
|
void chBeeSwarm_802CEBA8(Actor *this){
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
|
|
||||||
local = (ActorLocal_core2_47BD0 *)&this->local;
|
local = (ActorLocal_core2_47BD0 *)&this->local;
|
||||||
|
@ -70,7 +76,7 @@ void func_802CEBA8(Actor *this){
|
||||||
D_8037DCBC = 0;
|
D_8037DCBC = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Actor *func_802CEBFC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
Actor *chBeeSwarm_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||||
Actor *this;
|
Actor *this;
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
BKModelBin *phi_fp;
|
BKModelBin *phi_fp;
|
||||||
|
@ -107,16 +113,16 @@ Actor *func_802CEBFC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CEDE4(f32 arg0[3], f32 p_ctrl[3], f32 arg2, f32 *arg3, f32 arg4, f32 arg5){
|
void func_802CEDE4(f32 target_position[3], f32 p_ctrl[3], f32 distance, f32 *arg3, f32 arg4, f32 arg5){
|
||||||
s32 phi_s1;
|
s32 phi_s1;
|
||||||
|
|
||||||
phi_s1 = 0;
|
phi_s1 = 0;
|
||||||
do{
|
do{
|
||||||
p_ctrl[0] = randf2(-arg2, arg2);
|
p_ctrl[0] = randf2(-distance, distance);
|
||||||
p_ctrl[1] = randf2(-arg2, arg2);
|
p_ctrl[1] = randf2(-distance, distance);
|
||||||
p_ctrl[2] = randf2(-arg2, arg2);
|
p_ctrl[2] = randf2(-distance, distance);
|
||||||
phi_s1++;
|
phi_s1++;
|
||||||
}while(phi_s1 < 10 && ml_vec3f_distance(arg0, p_ctrl) < arg2);
|
}while(phi_s1 < 10 && ml_vec3f_distance(target_position, p_ctrl) < distance);
|
||||||
*arg3 = randf2(arg4, arg5);
|
*arg3 = randf2(arg4, arg5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +159,7 @@ void func_802CEF54(Actor *this, f32 arg1[3], f32 arg2){
|
||||||
this->unk1C[2] = this->unk1C[2] + arg1[2];
|
this->unk1C[2] = this->unk1C[2] + arg1[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF040(Actor *this) {
|
void chBeeSwarm_802CF040(Actor *this) {
|
||||||
Struct_core2_47BD0_0 *phi_s0;
|
Struct_core2_47BD0_0 *phi_s0;
|
||||||
s32 phi_s1;
|
s32 phi_s1;
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
|
@ -176,7 +182,7 @@ void func_802CF040(Actor *this) {
|
||||||
func_802CEF54(this, local->unkC, 100.0f);
|
func_802CEF54(this, local->unkC, 100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF174(f32 arg0[3], f32 arg1, f32 arg2) {
|
void chBeeSwarm_802CF174(f32 arg0[3], f32 arg1, f32 arg2) {
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
|
|
||||||
if (arg1 != 0.0f) {
|
if (arg1 != 0.0f) {
|
||||||
|
@ -187,7 +193,7 @@ void func_802CF174(f32 arg0[3], f32 arg1, f32 arg2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF1C8(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4, f32 *arg5, f32 arg6[3]) {
|
void chBeeSwarm_802CF1C8(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4, f32 *arg5, f32 arg6[3]) {
|
||||||
f32 sp4C;
|
f32 sp4C;
|
||||||
f32 temp_f12;
|
f32 temp_f12;
|
||||||
f32 sp3C[3];
|
f32 sp3C[3];
|
||||||
|
@ -199,9 +205,9 @@ void func_802CF1C8(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4, f3
|
||||||
arg6[2] = arg0[2] - arg1[2];
|
arg6[2] = arg0[2] - arg1[2];
|
||||||
temp_f12 = gu_sqrtf(arg6[0]*arg6[0] + arg6[1]*arg6[1] + arg6[2]*arg6[2]);
|
temp_f12 = gu_sqrtf(arg6[0]*arg6[0] + arg6[1]*arg6[1] + arg6[2]*arg6[2]);
|
||||||
if (temp_f12 < (2 * arg4)) {
|
if (temp_f12 < (2 * arg4)) {
|
||||||
func_802CF174(arg6, temp_f12, 8 * arg3);
|
chBeeSwarm_802CF174(arg6, temp_f12, 8 * arg3);
|
||||||
} else {
|
} else {
|
||||||
func_802CF174(arg6, temp_f12, 2 * arg3);
|
chBeeSwarm_802CF174(arg6, temp_f12, 2 * arg3);
|
||||||
}
|
}
|
||||||
arg1[0] += (arg2[0] * sp4C) + (arg6[0] * sp4C * sp4C);
|
arg1[0] += (arg2[0] * sp4C) + (arg6[0] * sp4C * sp4C);
|
||||||
arg1[1] += (arg2[1] * sp4C) + (arg6[1] * sp4C * sp4C);
|
arg1[1] += (arg2[1] * sp4C) + (arg6[1] * sp4C * sp4C);
|
||||||
|
@ -212,7 +218,7 @@ void func_802CF1C8(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4, f3
|
||||||
arg2[2] += arg6[2] * sp4C;
|
arg2[2] += arg6[2] * sp4C;
|
||||||
temp_f12 = gu_sqrtf(arg2[0]*arg2[0] + arg2[1]*arg2[1] + arg2[2]*arg2[2]);
|
temp_f12 = gu_sqrtf(arg2[0]*arg2[0] + arg2[1]*arg2[1] + arg2[2]*arg2[2]);
|
||||||
if (arg3 < temp_f12) {
|
if (arg3 < temp_f12) {
|
||||||
func_802CF174(arg2, temp_f12, arg3);
|
chBeeSwarm_802CF174(arg2, temp_f12, arg3);
|
||||||
}
|
}
|
||||||
if (arg5 != 0) {
|
if (arg5 != 0) {
|
||||||
sp3C[0] = sp3C[1] = sp3C[2] = 0.0f;
|
sp3C[0] = sp3C[1] = sp3C[2] = 0.0f;
|
||||||
|
@ -220,7 +226,7 @@ void func_802CF1C8(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4, f3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF434(Actor *this) {
|
void chBeeSwarm_802CF434(Actor *this) {
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
Struct_core2_47BD0_0 *phi_s0;
|
Struct_core2_47BD0_0 *phi_s0;
|
||||||
s32 phi_s2;
|
s32 phi_s2;
|
||||||
|
@ -230,7 +236,7 @@ void func_802CF434(Actor *this) {
|
||||||
|
|
||||||
local = (ActorLocal_core2_47BD0 *) &this->local;
|
local = (ActorLocal_core2_47BD0 *) &this->local;
|
||||||
for(phi_s2 = 0, phi_s0 = local->unk8; phi_s2 < local->unk0; phi_s2++){
|
for(phi_s2 = 0, phi_s0 = local->unk8; phi_s2 < local->unk0; phi_s2++){
|
||||||
func_802CF1C8(phi_s0->unk18, phi_s0->unk0, phi_s0->unkC, phi_s0->unk24[2], 150.0f, phi_s0->unk24, &sp58);
|
chBeeSwarm_802CF1C8(phi_s0->unk18, phi_s0->unk0, phi_s0->unkC, phi_s0->unk24[2], 150.0f, phi_s0->unk24, &sp58);
|
||||||
if (ml_vec3f_distance(phi_s0->unk0, phi_s0->unk18) < 50.0f) {
|
if (ml_vec3f_distance(phi_s0->unk0, phi_s0->unk18) < 50.0f) {
|
||||||
func_802CEEA4(this, phi_s0);
|
func_802CEEA4(this, phi_s0);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +244,7 @@ void func_802CF434(Actor *this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF518(Actor *this) {
|
void chBeeSwarm_802CF518(Actor *this) {
|
||||||
if( func_803292E0(this)
|
if( func_803292E0(this)
|
||||||
&& func_80329530(this, 900)
|
&& func_80329530(this, 900)
|
||||||
&& func_8028EE84() == BSWATERGROUP_0_NONE
|
&& func_8028EE84() == BSWATERGROUP_0_NONE
|
||||||
|
@ -248,7 +254,7 @@ void func_802CF518(Actor *this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF57C(Actor *this) {
|
void chBeeSwarm_802CF57C(Actor *this) {
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
|
|
||||||
local = (ActorLocal_core2_47BD0 *) &this->local;
|
local = (ActorLocal_core2_47BD0 *) &this->local;
|
||||||
|
@ -258,7 +264,7 @@ void func_802CF57C(Actor *this) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool func_802CF5E4(Actor *this){
|
bool chBeeSwarm_802CF5E4(Actor *this){
|
||||||
ActorLocal_core2_47BD0 *local;
|
ActorLocal_core2_47BD0 *local;
|
||||||
ActorMarker *other;
|
ActorMarker *other;
|
||||||
bool out = 1;
|
bool out = 1;
|
||||||
|
@ -269,7 +275,7 @@ bool func_802CF5E4(Actor *this){
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF610(Actor *this, ParticleEmitter *p_ctrl, f32 position[3]) {
|
void chBeeSwarm_802CF610(Actor *this, ParticleEmitter *p_ctrl, f32 position[3]) {
|
||||||
func_8030E6A4(SFX_66_BIRD_AUUGHH, randf2(1.75f, 1.85f), 15000);
|
func_8030E6A4(SFX_66_BIRD_AUUGHH, randf2(1.75f, 1.85f), 15000);
|
||||||
particleEmitter_setPosition(p_ctrl, position);
|
particleEmitter_setPosition(p_ctrl, position);
|
||||||
func_802EFA70(p_ctrl, 2);
|
func_802EFA70(p_ctrl, 2);
|
||||||
|
@ -288,30 +294,17 @@ void func_802CF610(Actor *this, ParticleEmitter *p_ctrl, f32 position[3]) {
|
||||||
particleEmitter_emitN(p_ctrl, 1);
|
particleEmitter_emitN(p_ctrl, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802CF7CC(Actor *this) {
|
void chBeeSwarm_802CF7CC(Actor *this) {
|
||||||
if (D_8037DCBC == 0) {
|
if (D_8037DCBC == 0) {
|
||||||
this->unk44_31 = func_8030D90C();
|
this->unk44_31 = func_8030D90C();
|
||||||
sfxsource_setSfxId(this->unk44_31, 0x3FA);
|
sfxsource_setSfxId(this->unk44_31, SFX_3FA_HONEYCOMB_TALKING);
|
||||||
func_8030DD14(this->unk44_31, 2);
|
func_8030DD14(this->unk44_31, 2);
|
||||||
func_8030DD90(this->unk44_31, 2);
|
func_8030DD90(this->unk44_31, 2);
|
||||||
D_8037DCBC = 1;
|
D_8037DCBC = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NONMATCHING
|
void chBeeSwarm_update(Actor *this) {
|
||||||
void func_802CF83C(Actor *this);
|
|
||||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_47BD0/func_802CF83C.s")
|
|
||||||
#else
|
|
||||||
extern void func_8030DBFC(u8, f32, f32, f32);
|
|
||||||
extern bool func_80309DBC(f32[3], f32[3], f32, f32 sp54[3], s32, s32);
|
|
||||||
extern void func_80320004(s32, bool);
|
|
||||||
extern void func_8030DEB4(u8, f32, f32);
|
|
||||||
extern void func_8030DF68(u8, f32[3]);
|
|
||||||
extern void func_8030E2C4(u8);
|
|
||||||
extern void sfxsource_setSampleRate(u8, s32);
|
|
||||||
extern void ml_vec3f_normalize(f32[3]);
|
|
||||||
extern void func_8028E9C4(s32, f32[3]);
|
|
||||||
void func_802CF83C(Actor *this) {
|
|
||||||
Actor *beehive;
|
Actor *beehive;
|
||||||
ActorLocal_core2_47BD0 *local = (ActorLocal_core2_47BD0 *)&this->local;
|
ActorLocal_core2_47BD0 *local = (ActorLocal_core2_47BD0 *)&this->local;
|
||||||
f32 spB4[3];
|
f32 spB4[3];
|
||||||
|
@ -325,8 +318,6 @@ void func_802CF83C(Actor *this) {
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
f32 sp68[3];
|
f32 sp68[3];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
spAC = time_getDelta();
|
spAC = time_getDelta();
|
||||||
sp78 = 0;
|
sp78 = 0;
|
||||||
if (!this->initialized) {
|
if (!this->initialized) {
|
||||||
|
@ -365,9 +356,9 @@ void func_802CF83C(Actor *this) {
|
||||||
}
|
}
|
||||||
if (!this->unk16C_4) {
|
if (!this->unk16C_4) {
|
||||||
this->unk16C_4 = TRUE;
|
this->unk16C_4 = TRUE;
|
||||||
func_803300D8(this->marker, func_802CEBA8);
|
func_803300D8(this->marker, chBeeSwarm_802CEBA8);
|
||||||
actor_collisionOff(this);
|
actor_collisionOff(this);
|
||||||
local->unk20 = assetcache_get(0x3BF);
|
local->unk20 = assetcache_get(ASSET_3BF_MODEL_PLAYER_SHADOW);
|
||||||
if (sp78 == 0) {
|
if (sp78 == 0) {
|
||||||
beehive = func_80326D68(this->position, ACTOR_12_BEEHIVE, -1, &spB0);
|
beehive = func_80326D68(this->position, ACTOR_12_BEEHIVE, -1, &spB0);
|
||||||
if (beehive != NULL) {
|
if (beehive != NULL) {
|
||||||
|
@ -386,179 +377,177 @@ void func_802CF83C(Actor *this) {
|
||||||
}
|
}
|
||||||
func_80328A84(this, (this->unk100 != NULL) ? 1 : 2);
|
func_80328A84(this, (this->unk100 != NULL) ? 1 : 2);
|
||||||
this->unk60 = 0.0f;
|
this->unk60 = 0.0f;
|
||||||
func_802CF040(this);
|
chBeeSwarm_802CF040(this);
|
||||||
this->unk38_0 = func_803203FC(1) | func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE);
|
this->unk38_0 = func_803203FC(1) | func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subaddie_playerIsWithinSphere(this, 0xFA0)) {
|
if (!subaddie_playerIsWithinSphere(this, 0xFA0))
|
||||||
if (!subaddie_playerIsWithinSphere(this, 0x5DC)) {
|
return;
|
||||||
u8 temp = this->unk44_31;
|
if (!subaddie_playerIsWithinSphere(this, 0x5DC)) {
|
||||||
if (temp!= 0) {
|
if ((u8)this->unk44_31 != 0) {
|
||||||
func_8030DA44(temp);
|
func_8030DA44(this->unk44_31);
|
||||||
this->unk44_31 = 0;
|
this->unk44_31 = 0;
|
||||||
D_8037DCBC = 0;
|
D_8037DCBC = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (map_get() == MAP_27_FP_FREEZEEZY_PEAK) {
|
||||||
|
if (func_8038BFA0()) {
|
||||||
|
this->unk58_0 = FALSE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this->unk58_0 = TRUE;
|
||||||
|
}
|
||||||
|
sp94[0] = this->position[0];
|
||||||
|
sp94[1] = this->position[1];
|
||||||
|
sp94[2] = this->position[2];
|
||||||
|
sp88[0] = this->position[0] + (this->velocity[0] * spAC);
|
||||||
|
sp88[1] = this->position[1] + (this->velocity[1] * spAC);
|
||||||
|
sp88[2] = this->position[2] + (this->velocity[2] * spAC);
|
||||||
|
if (this->state != 7) {
|
||||||
|
if (func_80309DBC(sp94, sp88, 75.0f, sp7C, 3, 0)) {
|
||||||
|
ml_vec3f_normalize(sp7C);
|
||||||
|
temp_f0 = (this->velocity[0]*sp7C[0] + this->velocity[1]*sp7C[1] + this->velocity[2]*sp7C[2]) * -1.5;
|
||||||
|
this->velocity[0] = this->velocity[0] + (sp7C[0] * temp_f0);
|
||||||
|
this->velocity[1] = this->velocity[1] + (sp7C[1] * temp_f0);
|
||||||
|
this->velocity[2] = this->velocity[2] + (sp7C[2] * temp_f0);
|
||||||
|
this->unk1C[0] = this->position[0] + sp7C[0] * 37.5;
|
||||||
|
this->unk1C[1] = this->position[1] + sp7C[1] * 37.5;
|
||||||
|
this->unk1C[2] = this->position[2] + sp7C[2] * 37.5;
|
||||||
|
if (this->state != 6) {
|
||||||
|
local->unk6 = this->state;
|
||||||
|
func_80328A84(this, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (map_get() == MAP_27_FP_FREEZEEZY_PEAK) {
|
chBeeSwarm_802CF1C8(this->unk1C, this->position, this->velocity, this->unk28, 100.0f, 0, &spA0);
|
||||||
if (func_8038BFA0()) {
|
}
|
||||||
this->unk58_0 = FALSE;
|
if (map_get() == MAP_78_GL_RBB_AND_MMM_PUZZLE) {
|
||||||
return;
|
if (this->unk38_31++ == 0x1E) {
|
||||||
|
this->unk38_31 = 0;
|
||||||
|
sp88[0] = this->position[0];
|
||||||
|
sp88[1] = this->position[1];
|
||||||
|
sp88[2] = this->position[2];
|
||||||
|
sp94[1] += 1000.0f;
|
||||||
|
sp88[1] -= 1000.0f;
|
||||||
|
if (func_80309B48(sp94, sp88, sp7C, 0xF800FF0F)) {
|
||||||
|
local->unk1C = sp88[1];
|
||||||
|
} else {
|
||||||
|
local->unk1C = -16000.0f;
|
||||||
}
|
}
|
||||||
this->unk58_0 = TRUE;
|
if ((this->position[1] - 100.0f) < local->unk1C) {
|
||||||
}
|
if (this->state != 7) {
|
||||||
sp94[0] = this->position[0];
|
local->unk7 = this->state;
|
||||||
sp94[1] = this->position[1];
|
local->unk4 = local->unk0;
|
||||||
sp94[2] = this->position[2];
|
func_80328A84(this, 7);
|
||||||
sp88[0] = this->position[0] + (this->velocity[0] * spAC);
|
|
||||||
sp88[1] = this->position[1] + (this->velocity[1] * spAC);
|
|
||||||
sp88[2] = this->position[2] + (this->velocity[2] * spAC);
|
|
||||||
if (this->state != 7) {
|
|
||||||
if (func_80309DBC(sp94, sp88, 75.0f, sp7C, 3, 0)) {
|
|
||||||
ml_vec3f_normalize(sp7C);
|
|
||||||
temp_f0 = (this->velocity[0]*sp7C[0] + this->velocity[1]*sp7C[1] + this->velocity[2]*sp7C[2]) * -1.5;
|
|
||||||
this->velocity[0] = this->velocity[0] + (sp7C[0] * temp_f0);
|
|
||||||
this->velocity[1] = this->velocity[1] + (sp7C[1] * temp_f0);
|
|
||||||
this->velocity[2] = this->velocity[2] + (sp7C[2] * temp_f0);
|
|
||||||
this->unk1C[0] = this->position[0] + sp7C[0] * 37.5;
|
|
||||||
this->unk1C[1] = this->position[1] + sp7C[1] * 37.5;
|
|
||||||
this->unk1C[2] = this->position[2] + sp7C[2] * 37.5;
|
|
||||||
if (this->state != 6) {
|
|
||||||
local->unk6 = this->state;
|
|
||||||
func_80328A84(this, 6);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func_802CF1C8(this->unk1C, this->position, this->velocity, this->unk28, 100.0f, 0, &spA0);
|
}
|
||||||
}
|
}
|
||||||
if (map_get() == MAP_78_GL_RBB_AND_MMM_PUZZLE) {
|
func_8028E9C4(5, spB4);
|
||||||
if (this->unk38_31++ == 0x1E) {
|
switch (this->state) {
|
||||||
this->unk38_31 = 0;
|
case 1:
|
||||||
sp88[0] = this->position[0];
|
if (!func_8031FF1C(0x8F) && subaddie_playerIsWithinCylinder(this, 250, 300)
|
||||||
sp88[1] = this->position[1];
|
&& ((func_8028ECAC() == 0) || (func_8028ECAC() == BSGROUP_8_TROT))
|
||||||
sp88[2] = this->position[2];
|
&& (player_getTransformation() == TRANSFORM_1_BANJO)
|
||||||
sp94[1] += 1000.0f;
|
&& (func_80311480(0xDA6, 0, NULL, NULL, NULL, NULL) != 0)
|
||||||
sp88[1] -= 1000.0f;
|
) {
|
||||||
if (func_80309B48(sp94, sp88, sp7C, 0xF800FF0F)) {
|
func_80320004(0x8F, TRUE);
|
||||||
local->unk1C = sp88[1];
|
}
|
||||||
} else {
|
if (chBeeSwarm_802CF5E4(this)) {
|
||||||
local->unk1C = -16000.0f;
|
func_80328A84(this, 2U);
|
||||||
}
|
}
|
||||||
if ((this->position[1] - 100.0f) < local->unk1C) {
|
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||||
if (this->state != 7) {
|
func_802CEF54(this, local->unkC, 100.0f);
|
||||||
local->unk7 = this->state;
|
}
|
||||||
local->unk4 = local->unk0;
|
break;
|
||||||
func_80328A84(this, 7);
|
case 2:
|
||||||
}
|
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||||
}
|
func_802CEF54(this, local->unkC, 100.0f);
|
||||||
}
|
}
|
||||||
}
|
chBeeSwarm_802CF518(this);
|
||||||
func_8028E9C4(5, spB4);
|
break;
|
||||||
switch (this->state) {
|
case 3:
|
||||||
case 1:
|
this->unk1C[0] = spB4[0];
|
||||||
if (!func_8031FF1C(0x8F) && subaddie_playerIsWithinCylinder(this, 0xFA, 0x12C)
|
this->unk1C[1] = spB4[1];
|
||||||
&& ((func_8028ECAC() == 0) || (func_8028ECAC() == 8))
|
this->unk1C[2] = spB4[2];
|
||||||
&& (player_getTransformation() == 1)
|
this->unk1C[1] += 50.0f;
|
||||||
&& (func_80311480(0xDA6, 0, NULL, NULL, NULL, NULL) != 0)
|
this->unk28 = 400.0f;
|
||||||
) {
|
if (ml_vec3f_distance(this->position, this->unk1C) < 100.0f) {
|
||||||
func_80320004(0x8F, TRUE);
|
func_802CEF54(this, spB4, 50.0f);
|
||||||
}
|
func_80328A84(this, 4);
|
||||||
if (func_802CF5E4(this)) {
|
}
|
||||||
func_80328A84(this, 2U);
|
chBeeSwarm_802CF57C(this);
|
||||||
}
|
break;
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
case 4:
|
||||||
func_802CEF54(this, local->unkC, 100.0f);
|
spB4[1] += 50.0f;
|
||||||
}
|
this->unk60 += spAC;
|
||||||
break;
|
if ((this->unk60 - 0.5 > 0.0) && (local->unk0 > 0) && (func_8028ECAC() != 3)) {
|
||||||
case 2:
|
func_8028F504(0xD);
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
this->unk60 -= 0.5;
|
||||||
func_802CEF54(this, local->unkC, 100.0f);
|
}
|
||||||
}
|
if ((this->unk60 > 0.2) && (func_8028ECAC() == 3)) {
|
||||||
func_802CF518(this);
|
if (local->unk0-- > 0) {
|
||||||
break;
|
sp68[0] = local->unk8[local->unk0].unk0[0] + this->position[0];
|
||||||
case 3:
|
sp68[1] = local->unk8[local->unk0].unk0[1] + this->position[1];
|
||||||
this->unk1C[0] = spB4[0];
|
sp68[2] = local->unk8[local->unk0].unk0[2] + this->position[2];
|
||||||
this->unk1C[1] = spB4[1];
|
chBeeSwarm_802CF610(this, partEmitList_pushNew(1), sp68);
|
||||||
this->unk1C[2] = spB4[2];
|
this->unk60 -= 0.2;
|
||||||
this->unk1C[1] += 50.0f;
|
}
|
||||||
this->unk28 = 400.0f;
|
}
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 100.0f) {
|
if (local->unk0 == 0) {
|
||||||
func_802CEF54(this, spB4, 50.0f);
|
marker_despawn(this->marker);
|
||||||
func_80328A84(this, 4);
|
}
|
||||||
}
|
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||||
func_802CF57C(this);
|
func_802CEF54(this, (s32 *) spB4, 50.0f);
|
||||||
break;
|
}
|
||||||
case 4:
|
if (ml_vec3f_distance(this->position, spB4) > 100.0f) {
|
||||||
spB4[1] += 50.0f;
|
func_80328A84(this, 3);
|
||||||
this->unk60 += spAC;
|
}
|
||||||
if ((this->unk60 - 0.5 > 0.0) && (local->unk0 > 0) && (func_8028ECAC() != 3)) {
|
chBeeSwarm_802CF57C(this);
|
||||||
func_8028F504(0xD);
|
break;
|
||||||
this->unk60 -= 0.5;
|
case 5:
|
||||||
}
|
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||||
if ((this->unk60 > 0.2) && (func_8028ECAC() == 3)) {
|
func_80328A84(this, 2);
|
||||||
if (local->unk0-- > 0) {
|
}
|
||||||
sp68[0] = local->unk8[local->unk0].unk0[0] + this->position[0];
|
chBeeSwarm_802CF518(this);
|
||||||
sp68[1] = local->unk8[local->unk0].unk0[1] + this->position[1];
|
break;
|
||||||
sp68[2] = local->unk8[local->unk0].unk0[2] + this->position[2];
|
case 6:
|
||||||
func_802CF610(this, partEmitList_pushNew(1), sp68);
|
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
||||||
this->unk60 -= 0.2;
|
func_80328A84(this, local->unk6);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
if (local->unk0 == 0) {
|
case 7:
|
||||||
marker_despawn(this->marker);
|
if (this->position[1] - 100.0f < local->unk1C) {
|
||||||
}
|
if (local->unk0 > 0) {
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
local->unk0--;
|
||||||
func_802CEF54(this, (s32 *) spB4, 50.0f);
|
}
|
||||||
}
|
}
|
||||||
if (ml_vec3f_distance(this->position, spB4) > 100.0f) {
|
if (local->unk1C < this->position[1] - 100.0f) {
|
||||||
func_80328A84(this, 3);
|
if (local->unk0 < local->unk4) {
|
||||||
}
|
local->unk0++;
|
||||||
func_802CF57C(this);
|
} else {
|
||||||
break;
|
func_80328A84(this, local->unk7);
|
||||||
case 5:
|
}
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
}
|
||||||
func_80328A84(this, 2);
|
break;
|
||||||
}
|
}
|
||||||
func_802CF518(this);
|
if (local->unk5) {
|
||||||
break;
|
chBeeSwarm_802CF434(this);
|
||||||
case 6:
|
}
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 50.0f) {
|
local->unk5 = 0;
|
||||||
func_80328A84(this, local->unk6);
|
if ((local->unk0 > 0) && func_80329530(this, 1500) && !this->unk38_0) {
|
||||||
}
|
if (this->unk44_31 == 0) {
|
||||||
break;
|
chBeeSwarm_802CF7CC(this);
|
||||||
case 7:
|
}
|
||||||
if (this->position[1] - 100.0f < local->unk1C) {
|
if (this->unk44_31 != 0) {
|
||||||
if (local->unk0 > 0) {
|
func_8030DBFC(this->unk44_31,
|
||||||
local->unk0--;
|
((this->state == 3) || (this->state == 4)) ? 1.0 : 0.8,
|
||||||
}
|
((this->state == 3) || (this->state == 4)) ? 1.1 : 0.9,
|
||||||
}
|
0.05f
|
||||||
if (local->unk1C < this->position[1] - 100.0f) {
|
);
|
||||||
if (local->unk0 < local->unk4) {
|
func_8030DEB4(this->unk44_31, 500.0f, 1500.0f);
|
||||||
local->unk0++;
|
func_8030DF68(this->unk44_31, this->position);
|
||||||
} else {
|
func_8030E2C4(this->unk44_31);
|
||||||
func_80328A84(this, local->unk7);
|
sfxsource_setSampleRate(this->unk44_31, (s32)(((gu_sqrtf(this->velocity[0]*this->velocity[0] + this->velocity[1]*this->velocity[1] + this->velocity[2]*this->velocity[2])/ this->unk28) * 8000.0f) + 2000.0f));
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (local->unk5) {
|
|
||||||
func_802CF434(this);
|
|
||||||
}
|
|
||||||
local->unk5 = 0;
|
|
||||||
if ((local->unk0 > 0) && func_80329530(this, 1500) && !this->unk38_0) {
|
|
||||||
if (this->unk44_31 == 0) {
|
|
||||||
func_802CF7CC(this);
|
|
||||||
}
|
|
||||||
if (this->unk44_31 != 0) {
|
|
||||||
func_8030DBFC(this->unk44_31,
|
|
||||||
((this->state == 3) || (this->state == 4)) ? 1.0 : 0.8,
|
|
||||||
((this->state == 3) || (this->state == 4)) ? 1.1 : 0.9,
|
|
||||||
0.05f
|
|
||||||
);
|
|
||||||
func_8030DEB4(this->unk44_31, 500.0f, 1500.0f);
|
|
||||||
func_8030DF68(this->unk44_31, this->position);
|
|
||||||
func_8030E2C4(this->unk44_31);
|
|
||||||
sfxsource_setSampleRate(this->unk44_31, (s32)(((gu_sqrtf(this->velocity[0]*this->velocity[0] + this->velocity[1]*this->velocity[1] + this->velocity[2]*this->velocity[2])/ this->unk28) * 8000.0f) + 2000.0f));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -2142,7 +2142,7 @@ void func_8032AF94(void) {
|
||||||
temp_s0->marker->unk50 = func_803406D4(temp_s0->marker->unk50);
|
temp_s0->marker->unk50 = func_803406D4(temp_s0->marker->unk50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp_s0->marker->unk14_20 == 0x217) {
|
if (temp_s0->marker->unk14_20 == MARKER_217_BEE_SWARM) {
|
||||||
func_802CEB60(temp_s0);
|
func_802CEB60(temp_s0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ segments:
|
||||||
- [0x468E0, c, ch/code_468E0] #DONE
|
- [0x468E0, c, ch/code_468E0] #DONE
|
||||||
- [0x46BC0, c, ch/jinjo]
|
- [0x46BC0, c, ch/jinjo]
|
||||||
- [0x47850, c, ch/beehive] #DONE
|
- [0x47850, c, ch/beehive] #DONE
|
||||||
- [0x47BD0, c, code_47BD0]
|
- [0x47BD0, c, code_47BD0] #DONE
|
||||||
- [0x49570, c, ch/soundsource] #DONE
|
- [0x49570, c, ch/soundsource] #DONE
|
||||||
- [0x49A70, c, code_49A70] #DONE
|
- [0x49A70, c, code_49A70] #DONE
|
||||||
- [0x4A420, c, ch/gloop] #DONE
|
- [0x4A420, c, ch/gloop] #DONE
|
||||||
|
@ -483,7 +483,7 @@ segments:
|
||||||
- [0xE01D0, .data, ch/code_468E0]
|
- [0xE01D0, .data, ch/code_468E0]
|
||||||
- [0xE0220, bin, data_E0220]
|
- [0xE0220, bin, data_E0220]
|
||||||
- [0xE0330, .data, ch/beehive]
|
- [0xE0330, .data, ch/beehive]
|
||||||
- [0xE0380, bin, data_E0380]
|
- [0xE0380, .data, code_47BD0]
|
||||||
- [0xE03B0, .data, ch/soundsource]
|
- [0xE03B0, .data, ch/soundsource]
|
||||||
- [0xE0430, .data, code_49A70]
|
- [0xE0430, .data, code_49A70]
|
||||||
- [0xE04A0, .data, ch/gloop]
|
- [0xE04A0, .data, ch/gloop]
|
||||||
|
|
Loading…
Reference in New Issue