documentations:

- added comments
- documented marker struct functions
This commit is contained in:
mariob92
2024-09-08 00:55:04 +02:00
parent f1dea250de
commit b5c7accc37
31 changed files with 90 additions and 83 deletions

View File

@@ -118,9 +118,9 @@ void func_802C6240(Actor *this){
if(!this->initialized){
this->marker->unk1C = func_802C61C0;
this->marker->unkC = func_802C60AC;
this->marker->unk10 = func_802C6150;
this->marker->dieFunc = func_802C61C0;
this->marker->collisionFunc = func_802C60AC;
this->marker->collision2Func = func_802C6150;
this->unk138_24 = 0;
this->unk16C_0 = 1;
this->initialized = TRUE;

View File

@@ -259,7 +259,7 @@ void func_8035C8F4(Actor *this){
sp34 = time_getDelta();
if(this->state == 0){
this->marker->unk14_21 = FALSE;
this->marker->unk30 = func_8035C8C8;
this->marker->actorFreeFunc = func_8035C8C8;
marker_setCollisionScripts(this->marker, func_8035C6C4, func_8035C6C4, func_8035C6F0);
local->unk4 = func_80309724(this->position);
local->pCtrl_8 = NULL;

View File

@@ -108,7 +108,7 @@ void chJinjo_update(Actor * this){
local->unk0 = 1;
local->unk4 = 0;
local->unk8 = (this->position_y < func_80309B24(this->position));
this->marker->unkC = __chJinjo_802CDBA8;
this->marker->collisionFunc = __chJinjo_802CDBA8;
marker_setFreeMethod(this->marker, __chJinjo_802CDD3C);
if(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE)){
marker_despawn(this->marker);

View File

@@ -80,7 +80,7 @@ void func_802D07C8(Actor *this){
f32 sp28;
if(!this->unk16C_4){
this->unk16C_4 = 1;
this->marker->unk30 = func_802D07A8;
this->marker->actorFreeFunc = func_802D07A8;
func_802D05A0(this, 1);
}
player_getPosition(sp2C);

View File

@@ -304,7 +304,7 @@ void func_802CCC5C(Actor *this) {
local = (ActorLocal_Core2_45310 * )&this->local;
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
this->marker->unk30 = func_802CCBC8;
this->marker->actorFreeFunc = func_802CCBC8;
local->unk38 = 0;
local->unk39 = 0;
local->unk3A = 0;

View File

@@ -195,7 +195,7 @@ void func_802D8030(Actor *this){
local = (s32*)&this->local;
*local = 1;
this->marker->unkC = __chLevelCollectible_collide;
this->marker->collisionFunc = __chLevelCollectible_collide;
subaddie_set_state(this, 2);
}

View File

@@ -121,7 +121,7 @@ void func_802E07E0(Actor *this) {
func_802C7318(this);
}
func_80361E10(this);
this->marker->unk30 = func_802E07C0;
this->marker->actorFreeFunc = func_802E07C0;
}
func_80326244(this);

View File

@@ -384,9 +384,9 @@ void func_80325FE8(Actor *this) {
func_8032BB88(this, -1, 8000);
this->unk138_7 = 0;
}
if (marker->unk30 != NULL) {
marker->unk30(this);
marker->unk30 = NULL;
if (marker->actorFreeFunc != NULL) {
marker->actorFreeFunc(this);
marker->actorFreeFunc = NULL;
}
if ((s32)marker->unk44 < 0) {
func_8033E7CC(marker);
@@ -544,13 +544,13 @@ void func_803268B4(void) {
}
if (!actor->despawn_flag) {
if (marker->unk2C_2) {
((void (*)(Actor *)) marker->unk34)(actor);
marker->actorUpdate2Func(actor);
if (anim_ctrl != NULL) {
actor->sound_timer = animctrl_getAnimTimer(anim_ctrl);
}
} else if (!temp_s1 || (temp_s1 && func_803296D8(actor, temp_s1))) {
if ( marker->unk24 != NULL) {
marker->unk24(actor);
if ( marker->actorUpdateFunc != NULL) {
marker->actorUpdateFunc(actor);
if (anim_ctrl != NULL) {
actor->sound_timer = animctrl_getAnimTimer(anim_ctrl);
}
@@ -848,8 +848,8 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
suLastBaddie->sound_timer = 0.0f;
func_8032FFD4(suLastBaddie->marker, suBaddieActorArray->cnt - 1);
marker_setModelId(suLastBaddie->marker, actorInfo->modelId);
func_803300C8(suLastBaddie->marker, actorInfo->update_func);
func_803300D0(suLastBaddie->marker, actorInfo->unk10);
marker_setActorUpdateFunc(suLastBaddie->marker, actorInfo->update_func);
marker_setActorUpdate2Func(suLastBaddie->marker, actorInfo->unk10);
ml_vec3f_clear(suLastBaddie->unk1C);
ml_vec3f_clear(suLastBaddie->velocity);
ml_vec3f_clear(suLastBaddie->spawn_position);
@@ -1650,12 +1650,12 @@ void func_803299B4(Actor *arg0) {
s32 position[3];
s32 rotation[3];
arg0->marker->unkC = arg0->unk108;
arg0->marker->unk10 = arg0->unk10C;
arg0->marker->unk1C = arg0->unk134;
arg0->marker->collisionFunc = arg0->unk108;
arg0->marker->collision2Func = arg0->unk10C;
arg0->marker->dieFunc = arg0->unk134;
arg0->marker->unk54 = arg0->unk160;
arg0->marker->unk58 = arg0->unk168;
arg0->marker->unk30 = arg0->unk13C;
arg0->marker->actorFreeFunc = arg0->backupFreeFunc;
arg0->marker->unk5C = arg0->unk16C_31;
arg0->marker->propPtr->unk8_3 = arg0->unkF4_28;
arg0->marker->propPtr->unk8_2 = arg0->unkF4_27;
@@ -1743,12 +1743,12 @@ void *actors_appendToSavestate(void * begin, u32 end){
s0->unk158[0] = NULL;
s0->unk158[1] = NULL;
s0->unk138_19 = s1->marker->id;
s0->unk108 = s1->marker->unkC;
s0->unk10C = s1->marker->unk10;
s0->unk134 = s1->marker->unk1C;
s0->unk108 = s1->marker->collisionFunc;
s0->unk10C = s1->marker->collision2Func;
s0->unk134 = s1->marker->dieFunc;
s0->unk160 = s1->marker->unk54;
s0->unk168 = s1->marker->unk58;
s0->unk13C = s1->marker->unk30;
s0->backupFreeFunc = s1->marker->actorFreeFunc;
s0->unk16C_31 = s1->marker->unk5C;
s0->unkF4_26 = s1->marker->unk2C_1;
s0->stored_marker_collidable = s1->marker->collidable;
@@ -1868,6 +1868,7 @@ void func_8032A09C(s32 arg0, ActorListSaveState *arg1) {
spawnQueue_unlock();
}
// only used for GV Jinxy Head 2
void func_8032A5F8(void) {
Actor *var_s0;
@@ -1881,6 +1882,7 @@ void func_8032A5F8(void) {
}
}
// only used by GV Jinxy Head 2
void func_8032A6A8(Actor *arg0) {
f32 var_f0;
f32 var_f2;
@@ -1903,6 +1905,7 @@ void func_8032A6A8(Actor *arg0) {
}
}
// only used by GV Jinxy Head 2
Actor *func_8032A7AC(Actor *arg0) {
Actor *var_a0;
@@ -1945,6 +1948,7 @@ void func_8032A88C(Actor *arg0) {
}
}
// only called by blubber
void func_8032A95C(Actor *arg0, s32 arg1, s32 arg2) {
func_80343F00(arg1, arg0->position);
arg0->unk44_14 = arg1;

View File

@@ -1159,16 +1159,16 @@ ActorMarker * marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, int mark
marker->unk40_22 = 0;
marker->unk40_19 = 0;
marker->unk40_21 = 0;
marker->unkC = NULL;
marker->unk10 = NULL;
marker->unk1C = NULL;
marker->collisionFunc = NULL;
marker->collision2Func = NULL;
marker->dieFunc = NULL;
marker->unk54 = NULL;
marker->unk58 = 0;
marker->unk18 = 0;
marker->unk24 = 0;
marker->unk30 = NULL;
marker->actorUpdateFunc = NULL;
marker->actorFreeFunc = NULL;
marker->unk28 = 0;
marker->unk34 = 0;
marker->actorUpdate2Func = NULL;
marker->unk38[0] = 0;
marker->unk38[1] = 0;
marker->unk38[2] = 0;
@@ -1222,16 +1222,16 @@ void func_8032FFEC(ActorMarker *this, s32 arg1){
void func_8032FFF4(ActorMarker *this, ActorMarker *other, s32 type){
switch(type){
case 0: //ow
if(this->unkC)
this->unkC(this, other);
if(this->collisionFunc)
this->collisionFunc(this, other);
break;
case 1:
if(this->unk10)
this->unk10(this, other);
if(this->collision2Func)
this->collision2Func(this, other);
break;
case 2: //die
if(this->unk1C)
this->unk1C(this, other);
if(this->dieFunc)
this->dieFunc(this, other);
break;
}
}
@@ -1244,9 +1244,9 @@ void func_80330078(ActorMarker *marker, ActorMarker *other_marker, s16 *arg2){
//marker_setCollisionMethods
void marker_setCollisionScripts(ActorMarker *this, MarkerCollisionFunc ow_func, MarkerCollisionFunc arg2, MarkerCollisionFunc die_func){
this->unkC = ow_func;
this->unk10 = arg2;
this->unk1C = die_func;
this->collisionFunc = ow_func;
this->collision2Func = arg2;
this->dieFunc = die_func;
}
void func_803300B8(ActorMarker *marker, MarkerCollisionFunc method){
@@ -1257,16 +1257,16 @@ void func_803300C0(ActorMarker *marker, bool (*method)(ActorMarker *, ActorMarke
marker->unk58 = method;
}
void func_803300C8(ActorMarker *marker, ActorUpdateFunc method){
marker->unk24 = method;
void marker_setActorUpdateFunc(ActorMarker *marker, ActorUpdateFunc method){
marker->actorUpdateFunc = method;
}
void func_803300D0(ActorMarker *marker, s32 arg1){
marker->unk34 = arg1;
void marker_setActorUpdate2Func(ActorMarker *marker, ActorUpdateFunc method){
marker->actorUpdate2Func = method;
}
void marker_setFreeMethod(ActorMarker *marker, ActorFreeFunc method){
marker->unk30 = method;
marker->actorFreeFunc = method;
}
void func_803300E0(ActorMarker *marker, Struct6Cs *arg1){

View File

@@ -292,7 +292,7 @@ void func_80358684(Actor *this) {
sp88 = time_getDelta();
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
this->marker->unk30 = func_80358490;
this->marker->actorFreeFunc = func_80358490;
local->unk38 = 0;
local->unk39 = 0;
local->unk28 = 0.0f;