code_9E370.c progress
This commit is contained in:
@@ -53,7 +53,7 @@ void func_8038E0C8(Actor *this) {
|
||||
|
||||
sp34 = time_getDelta();
|
||||
|
||||
if(!actor_playerIsWithinDist(this, 3000)) return;
|
||||
if(!subaddie_playerIsWithinSphere(this, 3000)) return;
|
||||
|
||||
if (!this->unk16C_4) {
|
||||
this->unk16C_4 = TRUE;
|
||||
|
@@ -30,7 +30,7 @@ void func_8038FF54(Actor *this){
|
||||
ParticleEmitter *sp3C;
|
||||
|
||||
if( func_8038BFA0() ) return;
|
||||
if( !actor_playerIsWithinDist(this, 4500) ) return;
|
||||
if( !subaddie_playerIsWithinSphere(this, 4500) ) return;
|
||||
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
actor_collisionOff(this);
|
||||
|
@@ -577,7 +577,7 @@ void func_803896FC(Actor *this){
|
||||
case 11:// L80389F20
|
||||
func_803890DC(this, local->unk19);
|
||||
|
||||
if(!actor_playerIsWithinDist(this, 2000)
|
||||
if(!subaddie_playerIsWithinSphere(this, 2000)
|
||||
&& !this->marker->unk14_21
|
||||
){
|
||||
switch(local->unk19){
|
||||
|
@@ -195,7 +195,7 @@ void func_8038F7AC(Actor *this){
|
||||
}
|
||||
}//L8038F910
|
||||
|
||||
if(func_8038BFA0() || this->unk38_31 || !actor_playerIsWithinDist(this, 3000)){
|
||||
if(func_8038BFA0() || this->unk38_31 || !subaddie_playerIsWithinSphere(this, 3000)){
|
||||
actor_collisionOff(this);
|
||||
return;
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ void func_80391180(Actor *this){
|
||||
this->unk58_0 = func_8038DD14() ? 0 : 1;
|
||||
|
||||
if(this->marker->unk14_20 == 0x21F){
|
||||
this->marker->unk40_22 = actor_playerIsWithinDist(this, 2000) ? 1 : 0;
|
||||
this->marker->unk40_22 = subaddie_playerIsWithinSphere(this, 2000) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -75,7 +75,7 @@ void func_8038A31C(Actor *this){
|
||||
}
|
||||
|
||||
if(this->unk100)
|
||||
sp24 = func_80329980(this);
|
||||
sp24 = subaddie_getLinkedActor(this);
|
||||
|
||||
this->unk1C[1] = this->unk48;
|
||||
;
|
||||
|
@@ -85,14 +85,14 @@ void func_8038A9C0(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
actor_collisionOff(this);
|
||||
func_802C3C88((GenMethod_1)func_8038A8CC, (s32)this->marker);
|
||||
sp24 = func_80329980(this);
|
||||
sp24 = subaddie_getLinkedActor(this);
|
||||
this->unk1C[1] = this->unk48;
|
||||
this->pitch = 0.0f;
|
||||
this->yaw = 90.0f;
|
||||
}
|
||||
|
||||
if(this->unk100)
|
||||
sp24 = func_80329980(this);
|
||||
sp24 = subaddie_getLinkedActor(this);
|
||||
|
||||
if(this->velocity_y != 0.0f){
|
||||
func_80343DEC(this);
|
||||
|
@@ -174,7 +174,7 @@ void func_8038B124(Actor *this){
|
||||
}
|
||||
}//L8038B25C
|
||||
|
||||
if(!actor_playerIsWithinDist(this, 4500)) return;
|
||||
if(!subaddie_playerIsWithinSphere(this, 4500)) return;
|
||||
|
||||
this->unk58_0 = TRUE;
|
||||
switch(this->state){
|
||||
|
@@ -185,7 +185,7 @@ void func_8038BEA0(Actor *this){
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
}//L8038BFF4
|
||||
|
||||
if(actor_playerIsWithinDist(this, 4000) || this->state == 5){
|
||||
if(subaddie_playerIsWithinSphere(this, 4000) || this->state == 5){
|
||||
this->unk58_0 = TRUE;
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
switch(this->state){
|
||||
@@ -304,7 +304,7 @@ void func_8038BEA0(Actor *this){
|
||||
}//L8038C528
|
||||
if(this->unk100 && this->unk100->unk5C == local->unk0){
|
||||
Actor *tmp_v0;
|
||||
tmp_v0 = func_80329980(this);
|
||||
tmp_v0 = subaddie_getLinkedActor(this);
|
||||
if(this->marker->unk14_21){
|
||||
func_8034A174(this->marker->unk44, 5, tmp_v0->position);
|
||||
}
|
||||
|
@@ -123,7 +123,7 @@ void func_80388FA0(Actor *this, s32 arg1){
|
||||
|
||||
switch(arg1){
|
||||
case 4:
|
||||
other = func_80329980(this);
|
||||
other = subaddie_getLinkedActor(this);
|
||||
myOther = this->unk100;
|
||||
if(myOther && other && myOther->unk14_20 == 0xB8)
|
||||
func_80328B8C(other, 3, 0.0001f, 1);
|
||||
@@ -147,7 +147,7 @@ void func_80388FA0(Actor *this, s32 arg1){
|
||||
actor_loopAnimation(this);
|
||||
break;
|
||||
case 2:
|
||||
other = func_80329980(this);
|
||||
other = subaddie_getLinkedActor(this);
|
||||
myOther = this->unk100;
|
||||
if(myOther && other && myOther->unk14_20 == 0xB8)
|
||||
func_80328B8C(other, 2, 0.0001f, 1);
|
||||
|
@@ -114,7 +114,7 @@ void func_80389600(Actor *this){
|
||||
break;
|
||||
|
||||
case 2: //L803897DC
|
||||
if(actor_playerIsWithinDist(this, 400) && func_8028FB48(0x8000000)){
|
||||
if(subaddie_playerIsWithinSphere(this, 400) && func_8028FB48(0x8000000)){
|
||||
func_8028F428(0xA, this->marker);
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ void func_802CE8D4(Actor *this){
|
||||
{
|
||||
case 1://L802CE9C4
|
||||
if( !func_8031FF1C(BKPROG_D_BEEHIVE_TEXT)
|
||||
&& func_803296B8(this, 250, 300)
|
||||
&& subaddie_playerIsWithinCylinder(this, 250, 300)
|
||||
){
|
||||
if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){
|
||||
if( player_getTransformation() == TRANSFORM_1_BANJO
|
||||
|
@@ -237,7 +237,7 @@ void func_802E20E8(Actor *this){
|
||||
|
||||
}
|
||||
}//L802E223C
|
||||
if(!actor_playerIsWithinDist(this, 4000))
|
||||
if(!subaddie_playerIsWithinSphere(this, 4000))
|
||||
return;
|
||||
|
||||
if(!local->unkB && this->marker->unk14_21){
|
||||
|
@@ -74,7 +74,7 @@ void chfirefx_update(Actor *this){
|
||||
this->unk1C[0] = 0.0f;
|
||||
}
|
||||
}//L80359934
|
||||
if(actor_playerIsWithinDist(this, 2000)){
|
||||
if(subaddie_playerIsWithinSphere(this, 2000)){
|
||||
if( func_8024DB50(this->position, 50.0f) && this->unk38_31 ){
|
||||
if(!(func_8023DB5C() & 3) && randf() < 0.1){
|
||||
__chfirefx_spawnSmoke(this->position, this->scale);
|
||||
|
@@ -262,7 +262,7 @@ void chicecube_update(Actor *this){
|
||||
this->unk58_0 = TRUE;
|
||||
}//L8035AAF4
|
||||
|
||||
if(!actor_playerIsWithinDist(this, 3000))
|
||||
if(!subaddie_playerIsWithinSphere(this, 3000))
|
||||
return;
|
||||
|
||||
func_802D729C(this, 3.4 * this->scale);
|
||||
|
@@ -114,7 +114,7 @@ Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
}
|
||||
|
||||
void func_802D9530(Actor *this){
|
||||
Actor *other = func_80329980(this);
|
||||
Actor *other = subaddie_getLinkedActor(this);
|
||||
if(this->unk100 && other){
|
||||
if(this->unk100->unk14_20 == 0xB8)
|
||||
func_80328B8C(other, 3, 0.0001f, 1);
|
||||
@@ -230,7 +230,7 @@ int func_802D997C(Actor *this){
|
||||
}
|
||||
|
||||
void func_802D9ADC(Actor *this){
|
||||
Actor *other = func_80329980(this);
|
||||
Actor *other = subaddie_getLinkedActor(this);
|
||||
if(this->unk100 && other && this->unk100->unk14_20 == 0xB8){
|
||||
func_80328B8C(other, 2, 0.0001f, 1);
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void func_802D9D60(Actor *this){
|
||||
other = func_80326D68(this->position, ACTOR_12C_MOLEHILL, -1, &sp4C);
|
||||
this->unk100 = (other) ? other->marker : NULL;
|
||||
if(this->unk100){
|
||||
other = func_80329980(this);
|
||||
other = subaddie_getLinkedActor(this);
|
||||
if(other && this->unk100->unk14_20 == 0xB8){
|
||||
func_80328A84(other, 1);
|
||||
}
|
||||
|
@@ -322,7 +322,7 @@ void func_802CCC5C(Actor *this) {
|
||||
local->unk0 = 0;
|
||||
func_802CC640(this, 1);
|
||||
}
|
||||
if (!actor_playerIsWithinDist(this, 4000)) {
|
||||
if (!subaddie_playerIsWithinSphere(this, 4000)) {
|
||||
if (local->unk0 != 0) {
|
||||
func_8030DA44(local->unk0);
|
||||
local->unk0 = 0;
|
||||
|
@@ -418,8 +418,8 @@ void func_802CF83C(Actor *this) {
|
||||
this->unk38_0 = func_803203FC(1) | func_803203FC(0x1F);
|
||||
}
|
||||
|
||||
if (actor_playerIsWithinDist(this, 0xFA0)) {
|
||||
if (!actor_playerIsWithinDist(this, 0x5DC) == 0) {
|
||||
if (subaddie_playerIsWithinSphere(this, 0xFA0)) {
|
||||
if (!subaddie_playerIsWithinSphere(this, 0x5DC) == 0) {
|
||||
if (this->unk44_31 != 0) {
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
@@ -483,7 +483,7 @@ block_40:
|
||||
switch(this->state){
|
||||
case 1:
|
||||
if( !func_8031FF1C(0x8F)
|
||||
&& func_803296B8(this, 0xFA, 0x12C)
|
||||
&& subaddie_playerIsWithinCylinder(this, 0xFA, 0x12C)
|
||||
&& ((func_8028ECAC() == 0) || (func_8028ECAC() == BSGROUP_8_TROT))
|
||||
&& (player_getTransformation() == TRANSFORM_1_BANJO)
|
||||
&& func_80311480(0xDA6, 0, NULL, NULL, NULL, NULL)
|
||||
|
@@ -29,7 +29,7 @@ void func_8032ACA8(Actor *arg0);
|
||||
void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2);
|
||||
void func_80328B8C(Actor * this, s32 arg1, f32 arg2, s32 arg3);
|
||||
void func_8032BB88(Actor *this, s32 arg1, s32 arg2);
|
||||
int actor_playerIsWithinDist(Actor *this, s32 dist);
|
||||
int subaddie_playerIsWithinSphere(Actor *this, s32 dist);
|
||||
extern void func_8033A4A0(enum asset_e mode_id, f32, f32);
|
||||
extern void func_80338338(s32, s32, s32);
|
||||
extern void func_803382FC(s32);
|
||||
@@ -1325,15 +1325,43 @@ int func_80329210(Actor * arg0, f32 (* arg1)[3]){
|
||||
|| func_80307258(arg1, arg0->unk10_25 - 1, arg0->unk10_18-1) != -1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_80329260.s")
|
||||
bool func_80329260(Actor *this, f32 p1[3]){
|
||||
s32 var_v0;
|
||||
var_v0 = func_80309D58(p1, this->unk10_18);
|
||||
if(this->unk10_18 == 0){
|
||||
this->unk10_18 = var_v0;
|
||||
}
|
||||
if(var_v0 == 0 && this->unk10_18 != 0){
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_803292E0.s")
|
||||
bool func_803292E0(Actor *this){
|
||||
f32 player_position[3];
|
||||
if(this->unk10_25 == 0){
|
||||
return 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_80329354.s")
|
||||
_player_getPosition(player_position);
|
||||
return func_80307258(player_position, this->unk10_25 - 1, this->unk10_18 - 1) != -1;
|
||||
}
|
||||
|
||||
bool func_80329354(Actor *this){
|
||||
f32 sp1C[3];
|
||||
|
||||
_player_getPosition(sp1C);
|
||||
return func_80329260(this, sp1C);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_80329384.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_8032944C.s")
|
||||
bool func_8032944C(Actor *this){
|
||||
s32 v1;
|
||||
|
||||
v1 = this->pitch - this->unk6C;
|
||||
return ((-3 <= v1) && (v1 <= 3));
|
||||
}
|
||||
|
||||
bool func_80329480(Actor *this){
|
||||
s32 v1;
|
||||
@@ -1359,14 +1387,14 @@ bool func_803294F0(Actor *this, s32 arg1, s32 arg2){
|
||||
bool func_80329530(Actor *this, s32 dist){
|
||||
if( func_8028F098()
|
||||
&& !func_803203FC(0xBF)
|
||||
&& actor_playerIsWithinDist(this, dist)
|
||||
&& subaddie_playerIsWithinSphere(this, dist)
|
||||
){
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool actor_playerIsWithinDist(Actor *this, s32 dist){
|
||||
bool subaddie_playerIsWithinSphere(Actor *this, s32 dist){
|
||||
f32 sp24[3];
|
||||
f32 sp18[3];
|
||||
|
||||
@@ -1383,11 +1411,30 @@ bool actor_playerIsWithinDist(Actor *this, s32 dist){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_80329628.s")
|
||||
bool subaddie_playerIsWithinAsymmetricCylinder(Actor *this, s32 radius, s32 d_upper, s32 d_lower){
|
||||
f32 sp1C[3];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_803296B8.s")
|
||||
player_getPosition(sp1C);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_803296D8.s")
|
||||
if(((this->position[1] + d_upper) < sp1C[1]) || (sp1C[1] < (this->position[1] - d_lower))){
|
||||
return FALSE;
|
||||
}
|
||||
return subaddie_playerIsWithinSphere(this, radius);
|
||||
|
||||
}
|
||||
|
||||
bool subaddie_playerIsWithinCylinder(Actor *this, s32 radius, s32 d_y){
|
||||
return subaddie_playerIsWithinAsymmetricCylinder(this, radius, d_y, d_y);
|
||||
}
|
||||
|
||||
bool func_803296D8(Actor *this, s32 dist){
|
||||
if(!this->unk124_7){
|
||||
return TRUE;
|
||||
}
|
||||
else{
|
||||
return func_80329530(this, dist);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_9E370/func_8032970C.s")
|
||||
|
||||
@@ -1453,8 +1500,7 @@ Actor *marker_getActor(ActorMarker *this){
|
||||
return &(D_8036E560->data[this->actrArrayIdx]);
|
||||
}
|
||||
|
||||
//actor_getChild
|
||||
Actor *func_80329980(Actor *this){
|
||||
Actor *subaddie_getLinkedActor(Actor *this){
|
||||
if(this->unk100 == NULL)
|
||||
return NULL;
|
||||
return marker_getActor(this->unk100);
|
||||
|
@@ -344,7 +344,7 @@ void func_80358684(Actor *this) {
|
||||
func_80357F0C(this, 1);
|
||||
}
|
||||
|
||||
if (!actor_playerIsWithinDist(this, 4000)) {
|
||||
if (!subaddie_playerIsWithinSphere(this, 4000)) {
|
||||
if (local->unk0 != 0) {
|
||||
func_8030DA44(local->unk0);
|
||||
local->unk0 = 0U;
|
||||
|
@@ -36,10 +36,10 @@ extern f32 D_803936E4[];
|
||||
/* .code */
|
||||
bool func_8038A690(Actor *this) {
|
||||
if (this->unkF4_8 != 3) {
|
||||
return func_803296B8(this, 0x190, 0x5A);
|
||||
return subaddie_playerIsWithinCylinder(this, 400, 90);
|
||||
}
|
||||
else{
|
||||
return func_80329628(this, 0x1F4, 0x104, 0x5A);
|
||||
return subaddie_playerIsWithinAsymmetricCylinder(this, 500, 260, 90);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -151,7 +151,7 @@ void func_803916BC(f32 position[3], s32 cnt){
|
||||
|
||||
void func_803917B0(Actor *actor)
|
||||
{
|
||||
Actor *unk = func_80329980(actor);
|
||||
Actor *unk = subaddie_getLinkedActor(actor);
|
||||
|
||||
unk->unk38_0 = TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user