Document cubeList

This commit is contained in:
Owlenuff
2024-10-02 20:48:19 +02:00
parent 7bbc6d3b69
commit 8b326a11cc
15 changed files with 67 additions and 60 deletions

View File

@@ -1964,8 +1964,11 @@ enum actor_e
ACTOR_151_LOCKUP_SLOW = 0x151,
ACTOR_152_LOCKUP_MEDIUM,
ACTOR_153_LOCKUP_FAST,
ACTOR_158_UNKNOWN = 0x158,
ACTOR_154_UNKNOWN,
ACTOR_155_UNKNOWN,
ACTOR_156_UNKNOWN,
ACTOR_157_UNKNOWN,
ACTOR_158_UNKNOWN,
ACTOR_15A_UNKNOWN = 0x15A,
@@ -2133,6 +2136,9 @@ enum actor_e
ACTOR_32B_UNKNOWN = 0x32B, //something with Tanktup
ACTOR_32F_UNKNOWN = 0x32F,
ACTOR_330_UNKNOWN,
ACTOR_332_TWINKLY_BLUE = 0x332,
ACTOR_333_TWINKLY_GREEN,
ACTOR_334_TWINKLY_ORANGE,
@@ -2222,7 +2228,8 @@ enum actor_e
ACTOR_3C7_FF_PRIZE_GRUNTY_DOLL = 0x3C7,
ACTOR_3C8_FF_PRIZE_TOOTY = 0x3C8,
ACTOR_3CA_ROCK_TRAPPING_GRUNTY = 0x3CA
ACTOR_3CA_ROCK_TRAPPING_GRUNTY = 0x3CA,
ACTOR_3CB_UNKNOWN
};
enum bundle_e {

View File

@@ -450,8 +450,8 @@ void func_80352CF4(f32 *, f32 *, f32, f32);
AnimCtrl *baanim_getAnimCtrlPtr(void);
void player_setYPosition(f32);
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e arg0, Actor *arg1);
NodeProp *func_80304CAC(s32 arg0, f32 position[3]);
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor_ptr);
NodeProp *nodeprop_findByActorIdAndPosition_f32(enum actor_e actor_id, f32 position[3]);
Actor *actorArray_findClosestActorFromActorId(f32 position[3], enum actor_e actor_id, s32 arg2, f32 *min_distance_ptr);
Actor *subaddie_getLinkedActor(Actor *);

View File

@@ -259,9 +259,9 @@ func_802F9F80 = 0x802fa160;
func_802F9FD0 = 0x802fa1b0;
func_802FA060 = 0x802fa240;
func_802FADD4 = 0x802fafb4;
cubeList_findNodePropByActorId = 0x80304b6c;
nodeprop_findByActorIdAndActorPosition = 0x80304dd8;
func_80304CAC = 0x80304e4c;
cubeList_findNodePropByActorIdAndPosition_s32 = 0x80304b6c;
nodeprop_findByActorIdAndActorPosition = 0x80304dd8;
nodeprop_findByActorIdAndPosition_f32 = 0x80304e4c;
nodeprop_getPosition_s32 = 0x80304eec;
nodeprop_getPosition = 0x80304f08;
_nodeProp_findPositionFromActorId = 0x80304f70;

View File

@@ -4,7 +4,7 @@
extern void func_8028E668(f32[3], f32, f32, f32);
extern Actor *func_80328230(enum actor_e id, f32 pos[3], f32 rot[3]);
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e, s32[3]);
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e, s32[3]);
extern f32 func_8038BE20(f32 arg0[3]);
typedef struct {
@@ -383,8 +383,8 @@ void func_803895E0(void){
for (i = 0; i< 7; i++){
s0 = (i < 3)
? cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DA0)
: cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DAC);
? cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DA0)
: cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DAC);
nodeprop_getPosition(s0, sp64);
f20 = (f32)func_80304DA8(s0);

View File

@@ -38,7 +38,7 @@ void func_8038D47C(Actor *this){
this->spawn_position_y = 2997.0f;
this->spawn_position_z = 5884.0f;
}//L8038D4FC
tmp_v0 = func_80304CAC(0x32f, this->spawn_position);
tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_32F_UNKNOWN, this->spawn_position);
if(!tmp_v0){
this->unk1C_x = -1394.0f;
this->unk1C_y = 2811.0f;
@@ -48,7 +48,7 @@ void func_8038D47C(Actor *this){
nodeprop_getPosition(tmp_v0, this->unk1C);
}
tmp_v0 = func_80304CAC(0x330, this->spawn_position);
tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_330_UNKNOWN, this->spawn_position);
if(!tmp_v0){
this->velocity_x = -1424.0f;
this->velocity_y = 2811.0f;

View File

@@ -24,7 +24,7 @@ extern Actor *baModel_80291AAC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **
extern void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, struct5Cs *collision_flags);
extern void func_802EE6CC(f32[3], s32, s32[4], s32, f32, f32, s32,s32,s32);
extern void func_80320ED8(ActorMarker *, f32, s32);
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3]);
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 position[3]);
typedef struct
{
@@ -157,7 +157,7 @@ void __baMarker_8028B9A8(s32 arg0){
NodeProp *tmp_v0;
s32 ideal_yaw[3];
tmp_v0 = cubeList_findNodePropByActorId(0x1F6, 0);
tmp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(0x1F6, NULL);
nodeprop_getPosition_s32(tmp_v0, &ideal_yaw);
func_802CA1CC(arg0);
actor_spawnWithYaw_s32(ACTOR_47_EMPTY_HONEYCOMB, &ideal_yaw, 0);

View File

@@ -333,7 +333,7 @@ void chSnacker_spawn(void) {
_player_getPosition(spawn_position);
if (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) != 0) {
nodeprop_getPosition(func_80304CAC(0x3CB, spawn_position), spawn_position);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_3CB_UNKNOWN, spawn_position), spawn_position);
}
else{
spawn_angle_rad = randf2(0.0f, 3.28f);

View File

@@ -9,7 +9,7 @@ extern Actor *func_80328230(enum actor_e, f32[3], f32[3]);
extern void func_802BEA4C(f32[3], f32[3], f32, f32[3]);
extern void func_802BEBE8(f32[3], f32[3], f32, f32[3]);
extern void func_802BEAAC(f32[3], f32[3], f32, f32[3], f32[3], f32[3], f32[3]);
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e, s32[3]);
extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e, s32[3]);
extern BKCollisionTri *func_80320B98(f32[3], f32[3], f32[3], s32);
f32 func_802BB938(f32[3], f32[3]);
f32 func_802BBD48(void);
@@ -60,7 +60,7 @@ bool func_802BB720(s32 arg0, f32 arg1[3], f32 arg2[3], s32 *arg3) {
if ((arg0 >= 0x5B) && (arg0 < 0x63)) {
arg0 -= 0x40;
}
temp_v0 = cubeList_findNodePropByActorId(D_803657E0[arg0], NULL);
temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(D_803657E0[arg0], NULL);
if (temp_v0 != NULL) {
nodeprop_getPosition(temp_v0, arg1);
*arg3 = func_80304DB8(temp_v0);

View File

@@ -105,7 +105,7 @@ bool chMumbo_withinHorzDistToPlayer(s32 x, s32 z, s32 dist) {
bool chMumbo_func_802D181C(s32 arg0) {
s32 search_start_cube[3] = D_80367504;
return BOOL(cubeList_findNodePropByActorId(arg0, search_start_cube));
return BOOL(cubeList_findNodePropByActorIdAndPosition_s32(arg0, search_start_cube));
}
void chMumbo_func_802D186C(Actor *this) {

View File

@@ -98,8 +98,8 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) {
case 1:
sp68 = 1;
ml_vec3f_copy(sp40, sp7C);
nodeprop_getPosition(func_80304CAC(0x156, sp40), sp58);
nodeprop_getPosition(func_80304CAC(0x157, sp40), sp4C);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_156_UNKNOWN, sp40), sp58);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_157_UNKNOWN, sp40), sp4C);
sp40[0] = ((sp4C[0] - sp58[0]) * D_8037BFB0[0]) + sp58[0];
sp40[2] = ((sp4C[2] - sp58[2]) * D_8037BFB0[1]) + sp58[2];
ml_vec3f_copy(sp7C, sp40);
@@ -107,8 +107,8 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) {
case 2:
sp64 = 1;
ml_vec3f_copy(sp1C, sp7C);
nodeprop_getPosition(func_80304CAC(0x154, sp1C), sp34);
nodeprop_getPosition(func_80304CAC(0x155, sp1C), sp28);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_154_UNKNOWN, sp1C), sp34);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_f32(ACTOR_155_UNKNOWN, sp1C), sp28);
sp1C[1] = ((sp28[1] - sp34[1]) * D_8037BFB0[0]) + sp34[1];
ml_vec3f_copy(sp7C, sp1C);
break;

View File

@@ -32,7 +32,7 @@ typedef struct {
Struct_core2_7AF80_2 *unk8;
} Struct_core2_7AF80_1;
NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 arg1[3]);
NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 arg1[3]);
s32 func_80304FC4(enum actor_e *actor_id_list, NodeProp **node_list, s32 arg2);
void cube_positionToIndices(s32 arg0[3], f32 arg1[3]);
NodeProp *func_803080C8(s32 arg0);
@@ -932,18 +932,18 @@ s32 func_803048E0(s32 arg0[3], s32 arg1[3], s32 arg2, s32 arg3, s32 arg4) {
return func_8032F170(arg1, arg2);
}
s32 func_80304984(s32 arg0, u32 *arg1) {
NodeProp *temp_v0;
s32 func_80304984(s32 actor_id, u32 *arg1) {
NodeProp *temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL);
temp_v0 = cubeList_findNodePropByActorId(arg0, 0);
if (temp_v0 != 0) {
*arg1 = temp_v0->unk6.radius;
return 1;
}
return 0;
}
NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3]) {
NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 position[3]) {
s32 cube_indices[3];
s32 i;
f32 position_f32[3];
@@ -995,42 +995,42 @@ NodeProp *cubeList_findNodePropByActorId(enum actor_e actor_id, s32 position[3])
return NULL;
}
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor){
s32 tmp_position[3];
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor_ptr) {
s32 pos_s32[3];
s32 *position;
if (actor != NULL) {
tmp_position[0] = actor->position_x;
tmp_position[1] = actor->position_y;
tmp_position[2] = actor->position_z;
if (actor_ptr != NULL) {
pos_s32[0] = actor_ptr->position_x;
pos_s32[1] = actor_ptr->position_y;
pos_s32[2] = actor_ptr->position_z;
}
if (actor == NULL) {
if (actor_ptr == NULL) {
position = NULL;
}
else {
position = tmp_position;
position = pos_s32;
}
return cubeList_findNodePropByActorId(actor_id, position);
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, position);
}
NodeProp *func_80304CAC(s32 arg0, f32 *arg1) {
s32 vec[3];
NodeProp *nodeprop_findByActorIdAndPosition_f32(enum actor_e actor_id, f32 *position) {
s32 pos_s32[3];
vec[0] = (s32)arg1[0];
vec[1] = (s32)arg1[1];
vec[2] = (s32)arg1[2];
return cubeList_findNodePropByActorId(arg0, vec);
pos_s32[0] = (s32) position[0];
pos_s32[1] = (s32) position[1];
pos_s32[2] = (s32) position[2];
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, pos_s32);
}
NodeProp *func_80304D04(s32 arg0, s16 *arg1) {
s32 arr[3];
NodeProp *nodeprop_findByActorIdAndPosition_s16(enum actor_e actor_id, s16 *position) {
s32 pos_s32[3];
arr[0] = (s32)arg1[0];
arr[1] = (s32)arg1[1];
arr[2] = (s32)arg1[2];
return cubeList_findNodePropByActorId(arg0, arr);
pos_s32[0] = (s32) position[0];
pos_s32[1] = (s32) position[1];
pos_s32[2] = (s32) position[2];
return cubeList_findNodePropByActorIdAndPosition_s32(actor_id, pos_s32);
}
s32 nodeprop_getRadius(NodeProp *arg0) {
@@ -1056,7 +1056,7 @@ s32 func_80304DB8(NodeProp *arg0) {
bool _nodeProp_findPositionFromActorId(enum actor_e actor_id, s32 *position) {
NodeProp *node_prop;
node_prop = cubeList_findNodePropByActorId(actor_id, NULL);
node_prop = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL);
if (node_prop != 0) {
position[0] = (s32) node_prop->x;
position[1] = (s32) node_prop->y;
@@ -1187,7 +1187,7 @@ bool func_80305290(bool (* arg0)(NodeProp *), bool (* arg1)(Prop *)){
bool func_80305344(s32 arg0, u32 *arg1) {
NodeProp *temp_v0;
temp_v0 = cubeList_findNodePropByActorId(arg0, NULL);
temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(arg0, NULL);
if (temp_v0 != NULL) {
*arg1 = temp_v0->unkC_31;
return 1;

View File

@@ -736,8 +736,8 @@ void func_8031E204(NodeProp *node, s32 arg1, s32 arg2){
f32 sp28[3];
f32 sp1C[3];
nodeprop_getPosition(func_80304D04(0x154, &node->x), sp34);
nodeprop_getPosition(func_80304D04(0x155, &node->x), sp28);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_154_UNKNOWN, &node->x), sp34);
nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_155_UNKNOWN, &node->x), sp28);
player_getPosition(sp1C);
if(sp28[1] < sp1C[1]){
sp1C[1] = sp28[1];

View File

@@ -130,7 +130,7 @@ void func_803223AC(void) {
func_80244A98(1);
for(i_ptr = D_8036DE00; i_ptr != &D_8036DE00[6]; i_ptr++){
i_ptr->unk4 = cubeList_findNodePropByActorId(i_ptr->unk0, 0);
i_ptr->unk4 = cubeList_findNodePropByActorIdAndPosition_s32(i_ptr->unk0, NULL);
if(i_ptr->unk4 != 0 && i_ptr->unk8 != NULL){
i_ptr->unk8(i_ptr);
}

View File

@@ -231,7 +231,7 @@ void func_802C16CC(s32 arg0) {
if(sp38 != D_8037DBE0.unk28 && D_8037DBE0.unk28 != -1){
player_getPosition(sp54);
ml_vec3f_to_vec3w(sp48, sp54);
sp30 = cubeList_findNodePropByActorId(sp38, sp48);
sp30 = cubeList_findNodePropByActorIdAndPosition_s32(sp38, sp48);
if(sp30 != NULL) {
nodeprop_getPosition(sp30, sp54);
switch (func_80304DB8(sp30)) { /* irregular */