renamed Actor.unk16C_4 to Actor.volatile_initialized

This commit is contained in:
mariob92
2024-09-10 11:20:14 +02:00
parent b77274c9ea
commit 062344a1fb
192 changed files with 430 additions and 430 deletions

View File

@@ -39,11 +39,11 @@ void chBeehive_die(ActorMarker *this, ActorMarker *other){
}
void chBeehive_update(Actor *this){
if(!this->unk16C_4){
if(!this->volatile_initialized){
marker_setCollisionScripts(this->marker, NULL, NULL, chBeehive_die);
this->marker->propPtr->unk8_3 = 1;
this->unk44_31 = func_8030D90C();
this->unk16C_4 = 1;
this->volatile_initialized = TRUE;
this->unk38_0 = volatileFlag_get(VOLATILE_FLAG_1)| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE);
}//L802CE960
if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){

View File

@@ -453,8 +453,8 @@ void chBottlesBonus_update(Actor *this) {
local = (ActorLocal_core2_560F0 *) &this->local;
sp50 = func_8033DDB8();
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
actor_collisionOff(this);
this->unk60 = 0.0f;
D_8037DEB4 = D_8037DEB0 = 0;

View File

@@ -29,8 +29,8 @@ void func_803567EC(Actor *this){
f32 sp44;
f32 sp40;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->roll = this->yaw;
this->yaw = 0.0f;
func_80356770(this, 1);

View File

@@ -134,8 +134,8 @@ void func_8035765C(Actor *this){
f32 sp40;
sp50 = time_getDelta();
if( !this->unk16C_4){
this->unk16C_4 = TRUE;
if( !this->volatile_initialized){
this->volatile_initialized = TRUE;
this->unk16C_0 = TRUE;
if(this->state != 6){
marker_setCollisionScripts(this->marker, NULL, func_80357564, func_8035758C);

View File

@@ -31,8 +31,8 @@ void func_802CD898(Actor *this){
}
void func_802CD8C0(Actor *this){
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->marker->unk2C_1 = 1;
this->marker->collidable = 0;
*(s32*)this->unkBC = 0; //TODO Make struct

View File

@@ -89,8 +89,8 @@ void func_80356CCC(Actor *this){
f32 sp40;
sp50 = time_getDelta();
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->unk16C_0 = 1;
marker_setCollisionScripts(this->marker, NULL, func_80356BF4, func_80356C24);
func_803569F0(this, (this->state < 5)? 1 : 6);

View File

@@ -235,12 +235,12 @@ void chCrab_update(Actor *this) {
sp34 = globalTimer_getTime();
sp30 = time_getDelta();
is_mutant_snippet = this->modelCacheIndex == ACTOR_F5_MUTIE_SNIPPET;
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
marker_setCollisionScripts(this->marker, __chCrab_touch, __chCrab_ow, __chCrab_die);
func_803300C0(this->marker, &__chCrab_802CB76C);
this->unk124_0 = this->unk138_31 = FALSE;
this->unk138_24 = FALSE;
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
animctrl_setTransitionDuration(this->animctrl, 0.25f);
if (map_get() == MAP_A_TTC_SANDCASTLE) {
if (!jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)) {

View File

@@ -69,8 +69,8 @@ int __chdrips_playerWithinDist(Actor *this, s32 arg1){
void chdrips_update(Actor *this){
ParticleEmitter *pCtrl;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
actor_collisionOff(this);
this->unk60 = this->yaw/360.0;
}

View File

@@ -59,8 +59,8 @@ void __chfirefx_hiss(ActorMarker *marker,ActorMarker *other_marker){
}
void chfirefx_update(Actor *this){
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = FALSE;
actor_collisionOn(this);
marker_setCollisionScripts(this->marker, __chfirefx_hiss, NULL, NULL);

View File

@@ -202,8 +202,8 @@ void func_8035B900(Actor *this){
ActorLocal_Core2_D4050 *local = (ActorLocal_Core2_D4050 *)&this->local;
s32 sp30 = globalTimer_getTime();
f32 sp2C = time_getDelta();
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setCollisionScripts(this->marker, NULL, func_8035B3B4, func_8035B1CC);
this->marker->propPtr->unk8_3 = FALSE;
actor_collisionOn(this);
@@ -300,8 +300,8 @@ int func_8035BC5C(Actor *this, s32 target, s32 delta){
}
void func_8035BD48(Actor *this){
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = FALSE;
actor_collisionOn(this);
marker_setCollisionScripts(this->marker, NULL, func_8035B3B4, func_8035B2C4);

View File

@@ -187,8 +187,8 @@ void func_8035F138(Actor *this) {
}
switch(this->state){
case 1: //L8035F20C
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
marker_setCollisionScripts(this->marker, func_8035F0E8, func_8035F048, func_8035EF9C);
local->unk0 = 1;
this->unk1C[0] = this->position[0];

View File

@@ -268,8 +268,8 @@ void chicecube_update(Actor *this){
return;
func_802D729C(this, 3.4 * this->scale);
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setCollisionScripts(this->marker, __chicecube_ow, NULL, __chicecube_die);
this->marker->propPtr->unk8_3 = FALSE;
actor_collisionOff(this);

View File

@@ -331,8 +331,8 @@ void chmole_update(Actor *this){
if(this->unkF4_8 < 8 || this->unkF4_8 >= 0x13)
return;
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setFreeMethod(this->marker, func_802D9C90);
if(this->initialized){
other = actorArray_findClosestActorFromActorId(this->position, ACTOR_12C_MOLEHILL, -1, &sp4C);

View File

@@ -41,7 +41,7 @@ ParticleScaleAndLifetimeRanges D_80367E44 = {
Actor *func_802DA560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *actor = marker_getActor(marker);
ActorLocal_MoleHill * local = (ActorLocal_MoleHill *) &actor->local;
if(actor->unk16C_4){
if(actor->volatile_initialized){
actor = actor_draw(marker, gfx, mtx, vtx);
func_8034A174(actor->marker->unk44, 5, actor->velocity);
func_8034A174(actor->marker->unk44, 6, actor->unk1C);
@@ -70,9 +70,9 @@ void func_802DA740(Actor *this){
this->marker->propPtr->unk8_3 = TRUE;
this->marker->collidable = FALSE;
if(!this->unk16C_4){
if(!this->volatile_initialized){
local->unk0 = 0;
this->unk16C_4 = 1;
this->volatile_initialized = TRUE;
}
switch(this->state){
case 1:

View File

@@ -210,8 +210,8 @@ void chSnowman_update(Actor *this){
dt = time_getDelta();
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = 0;
actor_collisionOn(this);
marker_setCollisionScripts(this->marker, NULL, NULL, __chSnowman_deathCallback);

View File

@@ -78,8 +78,8 @@ void func_802D07A8(Actor *this){
void func_802D07C8(Actor *this){
f32 sp2C[3];
f32 sp28;
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->marker->actorFreeFunc = func_802D07A8;
func_802D05A0(this, 1);
}

View File

@@ -151,12 +151,12 @@ void chTermite_update(Actor *this) {
static s32 D_80372F4C = 0;
sp34 = globalTimer_getTime();
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
marker_setCollisionScripts(this->marker, NULL, __chTermite_ow, __chTermite_die);
this->unk124_0 = this->unk138_31 = FALSE;
this->unk138_24 = FALSE;
this->unk16C_0 = TRUE;
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
}
if( map_get() == MAP_C_MM_TICKERS_TOWER
&& !mapSpecificFlags_get(0)

View File

@@ -97,8 +97,8 @@ void chwhipcrack_update(Actor *this){
f32 sp44;
f32 sp40;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->roll = this->yaw;
this->yaw = 0.0f;
marker_setCollisionScripts(this->marker, NULL, NULL, __chwhipcrack_die);

View File

@@ -113,8 +113,8 @@ void chHoneycomb_update(Actor *this){
}
}//L802C9F9C
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
if( this->marker->id == MARKER_55_HONEYCOMB
&& !this->unk44_2
){

View File

@@ -153,8 +153,8 @@ void func_802CA1E0(Actor *this){
f32 tmp_f4;
s32 phi_a2;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
tmp_v1 = (s32)this->yaw;
this->unk154 = D_80366E64[tmp_v1].unk0;
reinterpret_cast(s32, this->unkBC[4]) = D_80366E64[tmp_v1].unk4;

View File

@@ -91,8 +91,8 @@ void chFightFlightPad_emitSparklesAtPosition(f32 position[3]){
}
void chFightFlightPad_update(Actor *this){
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
chFightFlightPad_emitSparklesAtPosition(this->position);
FUNC_8030E8B4(SFX_113_PAD_APPEARS, 1.0f, 32000, this->position, 5000, 12000);
}

View File

@@ -302,8 +302,8 @@ void func_802CCC5C(Actor *this) {
spBC = 0;
spB8 = time_getDelta();
local = (ActorLocal_Core2_45310 * )&this->local;
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
this->marker->actorFreeFunc = func_802CCBC8;
local->unk38 = 0;
local->unk39 = 0;

View File

@@ -54,7 +54,7 @@ void func_802CEB60(Actor *this){
ActorLocal_core2_47BD0 *local;
local = (ActorLocal_core2_47BD0 *)&this->local;
if(this->unk16C_4){
if(this->volatile_initialized){
if(local->unk8 != NULL){
local->unk8 = (Struct_core2_47BD0_0 *)defrag(local->unk8);
}
@@ -354,8 +354,8 @@ void chBeeSwarm_update(Actor *this) {
local->unk18 = next_position[1];
}
}
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
marker_setFreeMethod(this->marker, chBeeSwarm_802CEBA8);
actor_collisionOff(this);
local->unk20 = assetcache_get(ASSET_3BF_MODEL_PLAYER_SHADOW);

View File

@@ -239,7 +239,7 @@ void chMumbo_update(Actor *this) {
}
}
if(!this->unk16C_4){
if(!this->volatile_initialized){
this->unk38_31 = 0;
if( player_getTransformation() == TRANSFORM_1_BANJO
&& !fileProgressFlag_get(__bkProgId_from_transformationId(D_8037DDF0))
@@ -250,7 +250,7 @@ void chMumbo_update(Actor *this) {
this->unk38_0 = (item_getCount(ITEM_1C_MUMBO_TOKEN) >= this->unk38_31);
this->unk10_12 = 0;
this->unk138_24 = 0;
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
}
func_80256E24(sp4C, 0.0f, this->yaw, 0.0f, 0.0f, 10.0f);

View File

@@ -12,13 +12,13 @@ ActorInfo D_8036759C = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_369_20_MUMBO_TOKEN_SI
ActorInfo D_803675C0 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN, ASSET_305_MODEL_25_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0};
void chMumboSign_update(Actor *this) {
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
if( fileProgressFlag_get(this->modelCacheIndex - ACTOR_368_5_MUMBO_TOKEN_SIGN + FILEPROG_90_PAID_TERMITE_COST)
|| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)
) {
marker_despawn(this->marker);
}
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
}
if (fileProgressFlag_get(this->modelCacheIndex - ACTOR_368_5_MUMBO_TOKEN_SIGN + FILEPROG_90_PAID_TERMITE_COST)) {
func_80326310(this);

View File

@@ -373,9 +373,9 @@ void func_802D3DA4(Actor *this) {
return;
}
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE;
this->unk38_31 = 0;
}

View File

@@ -314,8 +314,8 @@ void chLevelCollectible_update(Actor *this){
s32 marker_id;
if(this->despawn_flag) return;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
if( this->marker->id == MARKER_1FD_BLUE_PRESENT_COLLECTIBLE
|| this->marker->id == MARKER_1FE_GREEN_PRESENT_COLLECTIBLE
|| this->marker->id == MARKER_1FF_RED_PRESENT_COLLECTIBLE

View File

@@ -240,13 +240,13 @@ void func_802DB5A0(Actor *this) {
f32 phi_f14;
local = (ActorLocal_core2_53C10 *)&this->local;
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
marker_setCollisionScripts(this->marker, &func_802DB440, local->unk30, local->unk34);
this->marker->propPtr->unk8_3 = FALSE;
this->unk60 = 0.0f;
this->unk124_0 = this->unk138_31 = FALSE;
local->unk38 = 0;
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
if (volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)) {
subaddie_set_state(this, 2U);
return;

View File

@@ -89,11 +89,11 @@ void func_802DC018(Actor *this){
ActorLocal_Core2_53C10 *local = (ActorLocal_Core2_53C10 *) &this->local;
f32 tmp_f0;
if(!this->unk16C_4){
if(!this->volatile_initialized){
actor_collisionOff(this);
local->unk0 = partEmitMgr_newEmitter(16);
func_802DBE9C(this, local->unk0);
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
}
if(func_802DBF94(this, 600) && randf() < 0.2){
tmp_f0 = randf2(0.01f, 0.06f);

View File

@@ -52,8 +52,8 @@ void func_802DC208(Actor *this) {
f32 sp2C[3];
enum asset_e phi_a1;
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
actor_collisionOff(this);
this->marker->propPtr->unk8_3 = TRUE;
}

View File

@@ -115,8 +115,8 @@ void func_802E07E0(Actor *this) {
break;
}
if(!this->unk16C_4) {
this->unk16C_4 = TRUE;
if(!this->volatile_initialized) {
this->volatile_initialized = TRUE;
if (sp24) {
func_802C7318(this);
}

View File

@@ -150,8 +150,8 @@ void __chMinigame_free(Actor *this){
}
void chMinigame_update(Actor *this){
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->unk10_12 = __chminigame_getCurrentMapId();
actor_collisionOff(this);
if(!volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){

View File

@@ -834,7 +834,7 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
suLastBaddie->unk44_1 = 0;
suLastBaddie->unk44_0 = 0;
suLastBaddie->initialized = FALSE;
suLastBaddie->unk16C_4 = 0;
suLastBaddie->volatile_initialized = FALSE;
suLastBaddie->unk60 = 0.0f;
suLastBaddie->unk10_0 = 0;
suLastBaddie->unk104 = NULL;
@@ -1735,7 +1735,7 @@ void *actors_appendToSavestate(void * begin, u32 end){
s0->unk14C[0] =s0->unk14C[1] = NULL;
// s0->unk14C = NULL;
s0->unk148 = NULL;
s0->unk16C_4 = 0;
s0->volatile_initialized = FALSE;
s0->unk44_31 = 0;
s0->unk104 = NULL;
s0->unk100 = NULL;
@@ -2328,10 +2328,10 @@ void func_8032BB88(Actor *this, s32 arg1, s32 arg2){
}
bool func_8032BBE8(Actor *this){
if(this->unk16C_4){
if(this->volatile_initialized){
return TRUE;
}
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
return FALSE;
}

View File

@@ -290,8 +290,8 @@ void func_80358684(Actor *this) {
local = (ActorLocal_core2_D0CA0 *)&this->local;
next_state = 0;
sp88 = time_getDelta();
if (!this->unk16C_4) {
this->unk16C_4 = TRUE;
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
this->marker->actorFreeFunc = func_80358490;
local->unk38 = 0;
local->unk39 = 0;

View File

@@ -104,8 +104,8 @@ void func_803591E8(Actor *this, s32 next_state){
void func_8035933C(Actor *this){
ActorLocal_core2_D2180 * local = (ActorLocal_core2_D2180 *) &this->local;
if(!this->unk16C_4){
this->unk16C_4 = TRUE;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
local->unk0 = D_80372940 + (this->modelCacheIndex - 0x2AE);
func_803591E8(this, 1);
}

View File

@@ -107,7 +107,7 @@ static void _chskeleton_init(Actor *this) {
}
void chskeleton_update(Actor *this){
if(!this->unk16C_4){
if(!this->volatile_initialized){
_chskeleton_init(this);
}
func_802DB5A0(this);

View File

@@ -88,7 +88,7 @@ void func_8035CFC4(Actor *this) {
}
void func_8035D058(Actor *this) {
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
func_8035CFC4(this);
}
func_802DB5A0(this);

View File

@@ -111,7 +111,7 @@ void func_8035D2FC(Actor *this) {
}
void func_8035D3D8(Actor *this) {
if (!this->unk16C_4) {
if (!this->volatile_initialized) {
func_8035D2FC(this);
}
func_802DB5A0(this);

View File

@@ -82,9 +82,9 @@ void func_8036158C(Actor *this){
sp30 = time_getDelta();
if(!this->unk16C_4){
if(!this->volatile_initialized){
this->marker->propPtr->unk8_3 = TRUE;
this->unk16C_4 = TRUE;
this->volatile_initialized = TRUE;
local->unk0 = &D_80373130[this->modelCacheIndex - 0x289];
if(*local->unk0){
this->roll = this->yaw;

View File

@@ -41,9 +41,9 @@ void func_80361828(Actor *this){
void func_80361870(Actor *this){
s32 text_id;
s32 sp28;
if(!this->unk16C_4){
if(!this->volatile_initialized){
marker_setFreeMethod(this->marker, func_80361828);
this->unk16C_4 = 1;
this->volatile_initialized = TRUE;
}
if(!this->unk138_24 && func_80329530(this, 400) && !func_80329530(this, 50)){

View File

@@ -532,8 +532,8 @@ void func_80362E94(Actor *this){
}
break;
default: //L8036316C
if(!this->unk16C_4){
this->unk16C_4 = 1;
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
this->unk60 = this->scale*10.0;
}

View File

@@ -29,7 +29,7 @@ void func_803634BC(void){
}
void func_80363500(Actor *this){
if(!this->unk16C_4){
if(!this->volatile_initialized){
if(!chmole_learnedAllSpiralMountainAbilities()){
func_803634BC();
}
@@ -37,7 +37,7 @@ void func_80363500(Actor *this){
func_80363440();
marker_despawn(this->marker);
}
this->unk16C_4 = 1;
this->volatile_initialized = TRUE;
}//L8036355C
if(chmole_learnedAllSpiralMountainAbilities()){