diff --git a/include/actor.h b/include/actor.h index 0e5892bb..703b026b 100644 --- a/include/actor.h +++ b/include/actor.h @@ -6,7 +6,7 @@ #define ACTOR_FLAG_UNKNOWN_1 (1 << 1) // 0x2 #define ACTOR_FLAG_UNKNOWN_2 (1 << 2) // 0x4 #define ACTOR_FLAG_UNKNOWN_3 (1 << 3) // 0x8 -#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10 +#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10 - only used by GV Jinxy Head 2 #define ACTOR_FLAG_UNKNOWN_5 (1 << 5) // 0x20 #define ACTOR_FLAG_UNKNOWN_6 (1 << 6) // 0x40 #define ACTOR_FLAG_UNKNOWN_7 (1 << 7) // 0x80 @@ -20,11 +20,11 @@ #define ACTOR_FLAG_UNKNOWN_15 (1 << 15) // 0x8000 #define ACTOR_FLAG_UNKNOWN_16 (1 << 16) // 0x10000 #define ACTOR_FLAG_UNKNOWN_17 (1 << 17) // 0x20000 -#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000 +#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000 - never used? #define ACTOR_FLAG_UNKNOWN_19 (1 << 19) // 0x80000 #define ACTOR_FLAG_UNKNOWN_20 (1 << 20) // 0x100000 #define ACTOR_FLAG_UNKNOWN_21 (1 << 21) // 0x200000 -#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000 +#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000 - used by overlay texts #define ACTOR_FLAG_UNKNOWN_23 (1 << 23) // 0x800000 #define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000 #define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000 diff --git a/include/functions.h b/include/functions.h index 983cf825..133b94f7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -559,5 +559,7 @@ extern ActorMarker *marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, in extern s32 asset_getFlag(enum asset_e arg0); extern void spawnableActorList_add(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2); extern void spawnableActorList_addIfMapVisited(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2, enum map_e arg3); +extern void marker_setActorUpdateFunc(ActorMarker *marker, ActorUpdateFunc method); +extern void marker_setActorUpdate2Func(ActorMarker *marker, ActorUpdateFunc method); #endif diff --git a/include/prop.h b/include/prop.h index b6cee62b..7b3f6b7f 100644 --- a/include/prop.h +++ b/include/prop.h @@ -73,20 +73,20 @@ typedef void (*ActorUpdateFunc)(struct actor_s *); typedef void (*ActorFreeFunc)(struct actor_s *); typedef struct actorMarker_s{ - ActorProp* propPtr; - struct cude_s* cubePtr; - MarkerDrawFunc drawFunc; - MarkerCollisionFunc unkC; //ow_func - MarkerCollisionFunc unk10; + ActorProp* propPtr; + struct cude_s* cubePtr; + MarkerDrawFunc drawFunc; + MarkerCollisionFunc collisionFunc; //ow_func + MarkerCollisionFunc collision2Func; u32 yaw:9; u32 unk14_22:1; u32 unk14_21:1; u32 id:10; // marker_id u32 unk14_10:11; //used in ch/jiggy Struct6Cs *unk18; - MarkerCollisionFunc unk1C; //die_func + MarkerCollisionFunc dieFunc; s32 unk20; - ActorUpdateFunc unk24; + ActorUpdateFunc actorUpdateFunc; s32 unk28; u32 actrArrayIdx:11; //unk2C u32 pitch:9; @@ -94,8 +94,8 @@ typedef struct actorMarker_s{ u32 unk2C_2:1; u32 unk2C_1:1; u32 collidable:1; - ActorFreeFunc unk30; //actor free method - s32 unk34; + ActorFreeFunc actorFreeFunc; + ActorUpdateFunc actorUpdate2Func; s16 unk38[3]; u16 pad3E_15:1; u16 modelId:13; @@ -179,9 +179,9 @@ typedef struct actor_s{ u32 modelCacheIndex:10; //modelCacheIndex s32 unk44_14:10; u32 despawn_flag:1; - u32 unk44_2:1; - u32 unk44_1:1; - u32 unk44_0:1; + u32 unk44_2:1; // is set, when actors created inside Cube? + u32 unk44_1:1; // only used by blubber? + u32 unk44_0:1; // unused f32 unk48; //used in chlmonkey (chimpy) f32 unk4C; /* 0x50 */ f32 yaw; //0x50 @@ -236,12 +236,12 @@ typedef struct actor_s{ ActorMarker *unk100; ActorMarker *unk104; Struct62s *unk108; - // void ( *unk108)(struct actorMarker_s *, s32); //saved from marker->unkC + // void ( *unk108)(struct actorMarker_s *, s32); //saved from marker->collisionFunc s32 unk10C; //saved marker->unk10 f32 roll;//110 f32 sound_timer; TUPLE(f32, spawn_position); //0x118 - u32 unk124_31:12; + u32 unk124_31:12; // only used by GV Jinxy Head 2 u32 alpha_124_19:8; u32 unk124_11:2; //blend_mode? u32 depth_mode:2; //render_mode (passed to modelRender_setDepthMode()) @@ -253,7 +253,7 @@ typedef struct actor_s{ f32 scale; /* 0x12C */ struct actor_info_s *actor_info; void (* unk130)(struct actor_s *); - vector(struct2s) **unk134; //vector //saved marker->unk1C + vector(struct2s) **unk134; //vector //saved marker->dieFunc u32 unk138_31:1; u32 unk138_30:1; u32 unk138_29:1; @@ -267,10 +267,10 @@ typedef struct actor_s{ u32 unk138_20:1; u32 unk138_19:10; //saved maker->id u32 unk138_9:1; - u32 unk138_8:1; + u32 unk138_8:1; // set to one by ACTOR_FLAG_UNKNOWN_18, which no actor seems to use u32 unk138_7:4; u32 unk138_3:4; - void (*unk13C)(struct actorMarker_s *);//saved marker->unk30 + ActorFreeFunc backupFreeFunc; // saved marker->actorFreeFunc f32 unk140; f32 unk144; SkeletalAnimation *unk148; diff --git a/src/BGS/ch/code_2270.c b/src/BGS/ch/code_2270.c index d778bbee..e978adb2 100644 --- a/src/BGS/ch/code_2270.c +++ b/src/BGS/ch/code_2270.c @@ -282,7 +282,7 @@ void func_80389080(Actor *this){ sp3C = time_getDelta(); if(!this->unk16C_4){ this->unk16C_4 = 1; - this->marker->unk30 = func_80388FC0; + this->marker->actorFreeFunc = func_80388FC0; marker_setCollisionScripts(this->marker, func_80388E44, NULL, NULL); unqPtr->unk0 = 0; diff --git a/src/BGS/ch/mrvile.c b/src/BGS/ch/mrvile.c index a1b4fd9c..bb1d3839 100644 --- a/src/BGS/ch/mrvile.c +++ b/src/BGS/ch/mrvile.c @@ -339,7 +339,7 @@ void chvile_update(Actor *this) { local = (ActorLocal_MrVile *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = chvile_free; + this->marker->actorFreeFunc = chvile_free; local->unk0 = 0; local->unk4 = assetcache_get(0x3F6); local->game_marker = NULL; diff --git a/src/BGS/code_3420.c b/src/BGS/code_3420.c index 7079b1ef..4fcdf6e1 100644 --- a/src/BGS/code_3420.c +++ b/src/BGS/code_3420.c @@ -626,7 +626,7 @@ void chvilegame_update(Actor *this) { local = (ActorLocal_BGS_3420 *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = &chvilegame_free; + this->marker->actorFreeFunc = &chvilegame_free; local->game_pieces = vector_new(sizeof(struct vilegame_piece), 0x20); local->grumblie_model_bin = assetcache_get(0x3F7); local->unkC = 0; diff --git a/src/CC/code_530.c b/src/CC/code_530.c index 9a6c701b..ac4b4d81 100644 --- a/src/CC/code_530.c +++ b/src/CC/code_530.c @@ -101,7 +101,7 @@ void func_80386B28(Actor *this){ local->unk14 = 0.0f; player_getPosition(&local->unk4); local->unk3 = 3; - marker->unk30 = func_80386AF8; + marker->actorFreeFunc = func_80386AF8; marker->propPtr->unk8_3 = 1; this->position_x = 5700.0f; this->position_y = -2620.0f; diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index 58c67841..bd1fa345 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -71,7 +71,7 @@ void CCW_func_80387A40(Actor *this) { sp68 = time_getDelta(); if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = CCW_func_80387A20; + this->marker->actorFreeFunc = CCW_func_80387A20; local->unk4 = &D_8038EC00[0]; while((local->unk4->unk0 != 0) && (map_get() != local->unk4->unk0)) { local->unk4++; diff --git a/src/CCW/code_2270.c b/src/CCW/code_2270.c index 62464cb6..44ec5ab0 100644 --- a/src/CCW/code_2270.c +++ b/src/CCW/code_2270.c @@ -136,7 +136,7 @@ void chGobiCCW_update(Actor *this) { if (!this->unk16C_4) { this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = TRUE; - this->marker->unk30 = chGobiCCW_free; + this->marker->actorFreeFunc = chGobiCCW_free; this->unk138_24 = FALSE; local->unk4 = skeletalAnim_new(); local->spit_model = assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); diff --git a/src/CCW/code_950.c b/src/CCW/code_950.c index 582aaaed..d63e8953 100644 --- a/src/CCW/code_950.c +++ b/src/CCW/code_950.c @@ -112,7 +112,7 @@ void chwasp_update(Actor *this) { local = (ActorLocal_CCW_950 *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = func_8038717C; + this->marker->actorFreeFunc = func_8038717C; local->unk0 = func_8030D90C(); local->unk4 = 0; local->unk14 = 1000.0f; diff --git a/src/GV/ch/gobi1.c b/src/GV/ch/gobi1.c index 9b6ee577..de7f400c 100644 --- a/src/GV/ch/gobi1.c +++ b/src/GV/ch/gobi1.c @@ -116,7 +116,7 @@ void chGobi1_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; marker_setCollisionScripts(this->marker, func_803873B0, NULL, NULL); - marker->unk30 = func_8038736C; + marker->actorFreeFunc = func_8038736C; marker->propPtr->unk8_3 = TRUE; marker->collidable = TRUE; GV_D_80391A40.unk0 = 0; diff --git a/src/GV/ch/gobi2.c b/src/GV/ch/gobi2.c index 916ac163..b818b789 100644 --- a/src/GV/ch/gobi2.c +++ b/src/GV/ch/gobi2.c @@ -173,7 +173,7 @@ void chGobi2_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; marker_setCollisionScripts(this->marker, __chGobi2_ow, NULL, NULL); - sp34->unk30 = __chGobi2_80387EFC; + sp34->actorFreeFunc = __chGobi2_80387EFC; local->unk4 = skeletalAnim_new(); local->unk8 = (BKModelBin*) assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); D_80391A50 = 0; diff --git a/src/GV/ch/gobirock.c b/src/GV/ch/gobirock.c index 2e19db59..bf8b4e5a 100644 --- a/src/GV/ch/gobirock.c +++ b/src/GV/ch/gobirock.c @@ -99,7 +99,7 @@ void chGobiRock_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; - sp34->unk30 = chGobiRock_free; + sp34->actorFreeFunc = chGobiRock_free; sp34->propPtr->unk8_3 = TRUE; marker_setCollisionScripts(this->marker, NULL, NULL, __chGobiRock_destroy); local->unkC = particleEmitter_new(20); diff --git a/src/GV/ch/mazectrl.c b/src/GV/ch/mazectrl.c index be8d00ce..b8a7f3b3 100644 --- a/src/GV/ch/mazectrl.c +++ b/src/GV/ch/mazectrl.c @@ -152,7 +152,7 @@ void chMazeCtrl_update(Actor *this){ sp34 = time_getDelta(); if(!this->unk16C_4){ this->unk16C_4 = TRUE; - this->marker->unk30 = __chMazeCtrl_8038F5E4; + this->marker->actorFreeFunc = __chMazeCtrl_8038F5E4; if(this->state == 2){ comusic_8025AB44(COMUSIC_26_GV_SANDYBUTT_DANGER, 30000, 30000); item_set(ITEM_6_HOURGLASS, TRUE); diff --git a/src/GV/code_6370.c b/src/GV/code_6370.c index d726653f..78996cca 100644 --- a/src/GV/code_6370.c +++ b/src/GV/code_6370.c @@ -160,7 +160,7 @@ void func_8038CC98(Actor *this){ if(!this->unk16C_4){ sp7C = fileProgressFlag_getN(FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, 2); this->unk16C_4 = TRUE; - this->marker->unk30 = func_8038C880; + this->marker->actorFreeFunc = func_8038C880; local->unk8 = &D_803911F0[this->modelCacheIndex - 0x285]; local->unk10 = 0; local->unk14 = 0; diff --git a/src/GV/code_7DB0.c b/src/GV/code_7DB0.c index 44ae1c6e..290a4369 100644 --- a/src/GV/code_7DB0.c +++ b/src/GV/code_7DB0.c @@ -13,6 +13,7 @@ ActorAnimationInfo D_80391340[] ={ {0xF0, 1.6f}, }; +// 0x121 - Big Jinxy Head, 0x3E6 - GV Jinxy Head 2 ActorInfo D_80391358 = { 0xAE, 0x121, 0x3E6, 0x1, D_80391340, func_8038E1A0, func_8038E1A8, actor_draw, diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index b16b8311..ef814183 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -490,7 +490,7 @@ void GV_func_8038F154(void) spawnableActorList_add(&D_8039123C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); spawnableActorList_add(&D_80391260, actor_new, ACTOR_FLAG_UNKNOWN_7); spawnableActorList_add(&D_80391318, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10); - spawnableActorList_add(&D_80391358, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_4 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80391358, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_4 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); // Big Jinxy Head ? spawnableActorList_add(&D_803912B8, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&GV_D_80391390, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&D_803913B4, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); diff --git a/src/RBB/ch/cog.c b/src/RBB/ch/cog.c index d164470c..374b74a8 100644 --- a/src/RBB/ch/cog.c +++ b/src/RBB/ch/cog.c @@ -48,7 +48,7 @@ void func_80388C20(Actor *this){ if(!this->unk16C_4){ actor_collisionOff(this); this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = func_80388BE8; + this->marker->actorFreeFunc = func_80388BE8; this->unk16C_4 = 1; if(this->modelCacheIndex == 0x17B){ local->sfxsource_index = func_8030D90C(); diff --git a/src/RBB/ch/propellorswitch.c b/src/RBB/ch/propellorswitch.c index a59d86a9..7960d8b7 100644 --- a/src/RBB/ch/propellorswitch.c +++ b/src/RBB/ch/propellorswitch.c @@ -96,7 +96,7 @@ void chPropellorSwitch_update(Actor *this){ ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local; if(!this->unk16C_4){ this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = chPropellorSwitch_free; + this->marker->actorFreeFunc = chPropellorSwitch_free; this->unk16C_4 = 1; local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)]; if(local->unk0->unk6 == 0) diff --git a/src/RBB/ch/whistleswitch.c b/src/RBB/ch/whistleswitch.c index 686cc61f..b3c2d8da 100644 --- a/src/RBB/ch/whistleswitch.c +++ b/src/RBB/ch/whistleswitch.c @@ -132,7 +132,7 @@ void func_8038AEB8(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = func_8038AD7C; + this->marker->actorFreeFunc = func_8038AD7C; marker_setCollisionScripts(this->marker, NULL, func_8038AD3C, NULL); local->unk4 = RBB_func_8038ABC0(this); mapSpecificFlags_set(local->unk4->unk10, FALSE); diff --git a/src/RBB/code_CA0.c b/src/RBB/code_CA0.c index 8cfe978f..c71a744e 100644 --- a/src/RBB/code_CA0.c +++ b/src/RBB/code_CA0.c @@ -200,7 +200,7 @@ void func_80387890(Actor *this){ void func_803878B0(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; - this->marker->unk30 = func_80387890; + this->marker->actorFreeFunc = func_80387890; marker_setCollisionScripts(this->marker, 0, func_80387850, 0); func_8032AA58(this, 1.1f); func_8038756C(this, 1); diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 99b54be6..fc84f5e2 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -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; diff --git a/src/core2/ch/flotsam.c b/src/core2/ch/flotsam.c index 00621e00..7f5f53e7 100644 --- a/src/core2/ch/flotsam.c +++ b/src/core2/ch/flotsam.c @@ -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; diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 095c1100..d4f71437 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -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); diff --git a/src/core2/ch/soundsource.c b/src/core2/ch/soundsource.c index cdfc21d7..6be92dee 100644 --- a/src/core2/ch/soundsource.c +++ b/src/core2/ch/soundsource.c @@ -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); diff --git a/src/core2/code_45310.c b/src/core2/code_45310.c index 0c30823e..ab517669 100644 --- a/src/core2/code_45310.c +++ b/src/core2/code_45310.c @@ -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; diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index b560f71e..82a3bcf4 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -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); } diff --git a/src/core2/code_59780.c b/src/core2/code_59780.c index 94a5e785..0bf2ce2d 100644 --- a/src/core2/code_59780.c +++ b/src/core2/code_59780.c @@ -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); diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index f7107a03..f0d75c08 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -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; diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index 1dc3bcb8..4185c82c 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -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){ diff --git a/src/core2/code_D0CA0.c b/src/core2/code_D0CA0.c index 128ed0c7..05a0aab4 100644 --- a/src/core2/code_D0CA0.c +++ b/src/core2/code_D0CA0.c @@ -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;