Renaming Actor.unk28

This commit is contained in:
Nabnut
2024-09-19 12:31:50 +02:00
parent 8af5e336a2
commit 17f1f826b5
32 changed files with 178 additions and 174 deletions

View File

@@ -52,7 +52,7 @@ Actor *chBadShad_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
if(other)
modelRender_setAlpha(other->alpha_124_19);
sp40 = ml_map_f(this->unk28, 0.0f , 800.0f, 0.53f, 0.18f)*this->unk1C[1];
sp40 = ml_map_f(this->actor_specific_1_f, 0.0f , 800.0f, 0.53f, 0.18f)*this->unk1C[1];
modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE);
modelRender_draw(gfx, mtx, this->position, sp44, sp40, NULL, marker_loadModelBin(marker));
return this;
@@ -120,7 +120,7 @@ void func_802D71A0(s32 this, s32 arg1){
sp3C->unk104 = marker;
sp3C->unk1C[0] = globalTimer_getTime();
sp3C->unk1C[1] = sp40;
sp3C->unk28 = sp28;
sp3C->actor_specific_1_f = sp28;
}
}
}
@@ -148,7 +148,7 @@ void func_802D729C(Actor *actor, f32 arg1){
return;
if(!((globalTimer_getTime() ^ actor->marker->actrArrayIdx) & 0x7)){
sp1C->unk28 = func_802D7038(actor);
sp1C->actor_specific_1_f = func_802D7038(actor);
sp1C->position_x = D_8037DE10[0];
sp1C->position_y = D_8037DE10[1] + 6.0f;
sp1C->position_z = D_8037DE10[2];

View File

@@ -40,7 +40,7 @@ ActorInfo D_803660B4 = {0x9, ACTOR_E_BULL_INTRO, ASSET_354_MODEL_BULL_INTRO,
/* .code */
void func_802C5E80(Actor *this){
this->unk28 = randf2(3.5f, 4.9f);
this->actor_specific_1_f = randf2(3.5f, 4.9f);
}
void func_802C5EB8(Actor *this){
@@ -83,7 +83,7 @@ void func_802C5FF8(Actor *this){
void func_802C60AC(ActorMarker *marker, ActorMarker *other_marker){
Actor *actor = marker_getActor(marker);
if( actor->state == 4
&& 5.0 <= actor->unk28
&& 5.0 <= actor->actor_specific_1_f
&& func_803294F0(actor, 80, func_80329784(actor))
){
animctrl_setPlaybackType(actor->animctrl, ANIMCTRL_ONCE);
@@ -171,7 +171,7 @@ void func_802C6240(Actor *this){
&& func_80329078(this, (s32)this->yaw_ideal, 150)
&& subaddie_maybe_set_state(this, 3, 0.13f)
){
this->unk28 = randf2(7.1f, 8.4f);
this->actor_specific_1_f = randf2(7.1f, 8.4f);
}
func_802C5EB8(this);
break;
@@ -212,7 +212,7 @@ void func_802C6240(Actor *this){
if(this->unk10_12 == 0 || (this->unk10_12 < 3 && func_80329530(this, 300))){
subaddie_set_state(this, 9);
this->unk28 = 13.0f;
this->actor_specific_1_f = 13.0f;
}
break;
@@ -220,9 +220,10 @@ void func_802C6240(Actor *this){
if(actor_animationIsAt(this, 0.35f))
func_8030E58C(SFX_2E_BIGBUTT_RUNNING, 1.0f);
this->unk28 += 0.15;
if(30.0f < this->unk28)
this->unk28 = 30.0f;
this->actor_specific_1_f += 0.15;
if (30.0f < this->actor_specific_1_f) {
this->actor_specific_1_f = 30.0f;
}
this->yaw_ideal = (f32)func_80329784(this);
func_80328FB0(this, 9.0f);
@@ -233,7 +234,7 @@ void func_802C6240(Actor *this){
if(func_80329078(this, (s32)this->yaw_ideal,200)){
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE);
subaddie_set_state(this, 4);
this->unk28 += 5.7;
this->actor_specific_1_f += 5.7;
tmp_a0 = this->unk44_31;
if(this->unk44_31 == 0){
this->unk44_31 = func_8030D90C();
@@ -259,7 +260,7 @@ void func_802C6240(Actor *this){
func_8030E2C4(this->unk44_31);
if(0.99 <= animctrl_getAnimTimer(this->animctrl)){
func_80329878(this, func_80329530(this, 250)? 0.8: 1.2);
if(0.0f == this->unk28){
if (0.0f == this->actor_specific_1_f) {
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP);
subaddie_set_state_with_direction(this, 1, 0.65f, 1);
func_8030DA44(this->unk44_31);

View File

@@ -38,7 +38,7 @@ void chCollectible_setState(Actor *arg0, s32 next_state){
default:
break;
case 1:
arg0->unk28 = 0.0f;
arg0->actor_specific_1_f = 0.0f;
//fall-through
case 3:
actor_collisionOff(arg0);
@@ -122,13 +122,13 @@ void chCollectible_collectGoldFeather(ActorProp *arg0){
Actor *chCollectible_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){
Actor *thisActor = marker_getActor(this);
if(thisActor->unk28 != 0.0f){
if (thisActor->actor_specific_1_f != 0.0f) {
if(thisActor->unk38_0){
func_80344C2C(1);
if(thisActor->unk28 == 255.0f){
if (thisActor->actor_specific_1_f == 255.0f) {
func_803262B8(thisActor);
} else{
actor_setOpacity(thisActor, thisActor->unk28);
actor_setOpacity(thisActor, thisActor->actor_specific_1_f);
}
}
return func_80325934(this, gdl, mptr, arg3);
@@ -148,7 +148,7 @@ void chCollectible_update(Actor *this) {
}
this->unk10_12 = -1;
this->unk38_0 = (map_get() == MAP_90_GL_BATTLEMENTS);
this->unk28 = this->unk38_0 ? 0.0f: 255.0f;
this->actor_specific_1_f = this->unk38_0 ? 0.0f : 255.0f;
this->initialized = TRUE;
}
if(!this->unk38_0)
@@ -167,13 +167,13 @@ void chCollectible_update(Actor *this) {
}
/* fallthrough */
case 3:
if (this->unk28 > 0) {
this->unk28 = MAX(this->unk28 - 8, 0);
if (this->actor_specific_1_f > 0) {
this->actor_specific_1_f = MAX(this->actor_specific_1_f - 8, 0);
}
break;
case 2:
if (this->unk28 < 255) {
this->unk28 = MIN(this->unk28 + 8, 255);
if (this->actor_specific_1_f < 255) {
this->actor_specific_1_f = MIN(this->actor_specific_1_f + 8, 255);
}
break;
}

View File

@@ -33,7 +33,7 @@ ActorAnimationInfo chCrabMutantAnimations[] = {
/* .code */
void __chCrab_802CB040(Actor *this) {
this->unk28 = randf2(1.5f, 2.3f);
this->actor_specific_1_f = randf2(1.5f, 2.3f);
}
void __chCrab_802CB078(Actor *this) {
@@ -49,7 +49,7 @@ void __chCrab_802CB078(Actor *this) {
if( func_80329530(this, 1500)
&& ( (this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET) || func_803292E0(this))
) {
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
subaddie_set_state(this, 3U);
}
}
@@ -327,7 +327,7 @@ void chCrab_update(Actor *this) {
func_80328FB0(this, 4.0f);
if (func_80329480(this)) {
subaddie_set_state(this, 4);
this->unk28 = 12.0f;
this->actor_specific_1_f = 12.0f;
}
break;
@@ -336,7 +336,7 @@ void chCrab_update(Actor *this) {
func_80328FB0(this, 4.0f);
if (func_80329480(this)) {
subaddie_set_state(this, 9);
this->unk28 = 12.0f;
this->actor_specific_1_f = 12.0f;
} else if (!levelSpecificFlags_get(0xE)) {
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
}

View File

@@ -169,14 +169,14 @@ void func_8035B674(Actor *this){
void func_8035B6CC(Actor *this){
subaddie_set_state_with_direction(this, 2, 0.01f, 1);
actor_playAnimationOnce(this);
this->unk28 = 1.0f;
this->actor_specific_1_f = 1.0f;
func_8030E878(0x3F4, randf2(1.0f, 1.2f), 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
}
void func_8035B75C(Actor *this){
subaddie_set_state_with_direction(this, 3, 0.01f, 1);
actor_loopAnimation(this);
this->unk28 = volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0.0 : 12.0;
this->actor_specific_1_f = volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0.0 : 12.0;
func_8030E878(0x3F4, randf2(1.0f, 1.2f), 32000, this->position, this->scale*400.0f, this->scale*1800.0f);
}
@@ -186,10 +186,8 @@ void func_8035B824(Actor *this){
subaddie_set_state_with_direction(this, 4, 0.01f, 1);
actor_loopAnimation(this);
func_80328CEC(this, (s32)this->yaw_ideal, 0xA, 0x1E);
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
local->unk4 = randf2(2.0f, 4.5f);
}
void func_8035B8A8(Actor *this){

View File

@@ -99,14 +99,14 @@ void func_8035EE48(Actor *this){
void func_8035EE80(Actor *this){
subaddie_set_state(this, 3);
actor_loopAnimation(this);
this->unk28 = 10.5f;
this->actor_specific_1_f = 10.5f;
func_8035EE48(this);
}
void func_8035EEC0(Actor *this){
subaddie_set_state(this, 4);
actor_loopAnimation(this);
this->unk28 = 9.0f;
this->actor_specific_1_f = 9.0f;
func_8035EE48(this);
}
@@ -192,7 +192,7 @@ void func_8035F138(Actor *this) {
marker_setCollisionScripts(this->marker, func_8035F0E8, func_8035F048, func_8035EF9C);
local->unk0 = 1;
this->unk1C[0] = this->position[0];
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->velocity[1] = 0.0f;
this->unk1C[2] = this->position[2];
this->velocity[0] = this->yaw;
@@ -237,8 +237,8 @@ void func_8035F138(Actor *this) {
break;
}
if (((this->unk28 + 0.28) <= 18.0) && ( 0.36 <= animctrl_getDuration(this->animctrl) - 0.0056000000000000008)) {
this->unk28 += 0.28;
if (((this->actor_specific_1_f + 0.28) <= 18.0) && ( 0.36 <= animctrl_getDuration(this->animctrl) - 0.0056000000000000008)) {
this->actor_specific_1_f += 0.28;
animctrl_setDuration(this->animctrl, animctrl_getDuration(this->animctrl) - 0.0056000000000000008);
}
break;
@@ -253,7 +253,7 @@ void func_8035F138(Actor *this) {
if (func_8035ED60(this)) {
subaddie_set_state_with_direction(this, 5, 0.99f, 0);
actor_playAnimationOnce(this);
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->unk1C[1] = 1.9f;
this->unk44_31 = func_8030ED2C(SFX_2C_PULLING_NOISE, 3);
break;
@@ -277,7 +277,7 @@ void func_8035F138(Actor *this) {
if (animctrl_getAnimTimer(this->animctrl) <= 0.02) {
subaddie_set_state_with_direction(this, 1, 0.02f, 1);
actor_playAnimationOnce(this);
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
func_8035EE48(this);
break;
}

View File

@@ -176,7 +176,7 @@ void func_8035A694(Actor *this){
f32 sp28[3];
sp3C = this->yaw;
sp38 = this->unk28*1.5 + 1.0;
sp38 = this->actor_specific_1_f * 1.5 + 1.0;
tmp_v0 = globalTimer_getTime();
this->yaw += sp38;
if(360.0f < this->yaw)
@@ -215,7 +215,7 @@ void __chicecube_ow(ActorMarker *marker, ActorMarker *other_marker){
Actor *actor = marker_getActor(marker);
FUNC_8030E8B4(SFX_1D_HITTING_AN_ENEMY_1, 0.9f, 22000, actor->position, 1500, 3000);
actor->velocity[1] = 0.8f;
actor->unk28 = 0.0f;
actor->actor_specific_1_f = 0.0f;
}
//__chicecube_die
@@ -241,7 +241,7 @@ void func_8035A9E0(Actor *this){
subaddie_set_state_with_direction(this, 3, animctrl_getAnimTimer(this->animctrl), 1);
actor_loopAnimation(this);
this->unk38_31 = 1;
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
}
void func_8035AA40(Actor *this){
@@ -322,11 +322,11 @@ void chicecube_update(Actor *this){
break;
case 3: // L8035AD88
animctrl_setAnimTimer(this->animctrl, 0.999f);
if(this->unk28 + 0.28 < 18.0){
this->unk28 = this->unk28 + 0.28;
if (this->actor_specific_1_f + 0.28 < 18.0) {
this->actor_specific_1_f = this->actor_specific_1_f + 0.28;
}
else{
this->unk28 = 18.0f;
else {
this->actor_specific_1_f = 18.0f;
}
func_8035A694(this);
if(!func_80359DF4(this, 1300)){
@@ -343,10 +343,14 @@ void chicecube_update(Actor *this){
break;
case 4: // L8035AE64
animctrl_setAnimTimer(this->animctrl, 0.999f);
if(this->unk28 - 0.28 > 8.0)
this->unk28 = this->unk28 - 0.28;
else
this->unk28 = 8.0f;
if (this->actor_specific_1_f - 0.28 > 8.0) {
this->actor_specific_1_f = this->actor_specific_1_f - 0.28;
}
else {
this->actor_specific_1_f = 8.0f;
}
func_8035A694(this);
if(func_80359DF4(this, 900)){
func_8035A9E0(this);

View File

@@ -368,11 +368,11 @@ void chmole_update(Actor *this){
this->velocity[0] = this->position[0];
this->velocity[1] = this->position[1];
this->velocity[2] = this->position[2];
this->unk28 = 500.0f;
this->actor_specific_1_f = 500.0f;
}
else{ //L802D9F08
nodeprop_getPosition(node_prop, this->velocity);
this->unk28 = 2*nodeprop_getRadius(node_prop);
this->actor_specific_1_f = 2 * nodeprop_getRadius(node_prop);
}
}
}//L802D9F34
@@ -387,7 +387,7 @@ void chmole_update(Actor *this){
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
){
player_getPosition(sp34);
if(ml_distance_vec3f(sp34, this->velocity) < this->unk28){
if (ml_distance_vec3f(sp34, this->velocity) < this->actor_specific_1_f) {
chmole_startingDialog(this);
}
}

View File

@@ -26,7 +26,7 @@ ActorAnimationInfo chShrapnelAnimations[] = {
/* .code */
void chShrapnel_func_802D0A00(Actor *this) {
this->unk28 = randf2(1.5f, 2.3f);
this->actor_specific_1_f = randf2(1.5f, 2.3f);
}
void chShrapnel_func_802D0A38(Actor *this){
@@ -35,7 +35,7 @@ void chShrapnel_func_802D0A38(Actor *this){
}
else{
if(func_80329530(this, 600) && func_803292E0(this)){
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
}
}
@@ -123,7 +123,7 @@ void chShrapnel_explode(ActorMarker *marker, ActorMarker *other_marker) {
void chShrapnel_func_802D0FC8(Actor *this) {
this->unk4C += time_getDelta();
if (MAX(0.25, (12.0 - this->unk28) / 12.0) < this->unk4C) {
if (MAX(0.25, (12.0 - this->actor_specific_1_f) / 12.0) < this->unk4C) {
*(s32 *)(&this->local) = NOT(*(s32 *)(&this->local));
this->unk4C = 0.0f;
if (*(s32 *)(&this->local)) {
@@ -170,15 +170,15 @@ void chshrapnel_update(Actor *this) {
subaddie_set_state(this, 3);
actor_loopAnimation(this);
FUNC_8030E8B4(SFX_C4_TWINKLY_MUNCHER_GRR, 0.6f, 32750, this->position, 1250, 2500);
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
}
}
break;
case 3:
this->yaw_ideal = (f32) func_80329784(this);
func_80328FB0(this, this->unk28 / 2);
this->unk28 = MIN( 50.0, (this->unk28 + tick));
func_80328FB0(this, this->actor_specific_1_f / 2);
this->actor_specific_1_f = MIN(50.0, (this->actor_specific_1_f + tick));
if ((250.0 <= ABS(player_position[1] - this->unk1C[1])) || !func_80329054(this, 0)) {
chShrapnel_func_802D0AB8(this);
}

View File

@@ -65,7 +65,7 @@ s32 D_8037E630;
/* .code */
void func_802E0CD0(Actor *this){
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
}
static void __chsnacker_start_dialog(Actor *this) {
@@ -76,7 +76,7 @@ static void __chsnacker_start_dialog(Actor *this) {
this->unk38_31--;
}
else{
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
if (level_get() == LEVEL_2_TREASURE_TROVE_COVE) {
text_index = mapSpecificFlags_getN(8, 3);
if( !this->is_first_encounter ) {
@@ -103,7 +103,7 @@ bool func_802E0DC0(f32 snacker_position[3]){
}
void func_802E0E88(Actor *this){
this->unk28 = 2.0f;
this->actor_specific_1_f = 2.0f;
subaddie_set_state_with_direction(this, 5, 0.0f, -1);
actor_playAnimationOnce(this);
}
@@ -235,7 +235,7 @@ void chsnacker_update(Actor *this) {
func_80328FF0(this, 3.0f);
if (func_80329480(this)) {
subaddie_set_state_with_direction(this, 4, 0.0f, 1);
this->unk28 = 9.0f;
this->actor_specific_1_f = 9.0f;
}
break;
@@ -243,9 +243,9 @@ void chsnacker_update(Actor *this) {
func_803297FC(this, &sp44, &sp40);
this->yaw_ideal = sp40;
this->unk6C = func_802E10F0(sp44);
func_80328FB0(this, this->unk28 / 2);
func_80328FF0(this, this->unk28 / 2);
this->unk28 = MIN(50.0, this->unk28 + dt);
func_80328FB0(this, this->actor_specific_1_f / 2);
func_80328FF0(this, this->actor_specific_1_f / 2);
this->actor_specific_1_f = MIN(50.0, this->actor_specific_1_f + dt);
func_8032CA80(this, (s_chSnacker_inRbb) ? 15 : 9);
break;

View File

@@ -25,12 +25,14 @@ void __chTermite_updateRandomSpeed(Actor *this) {
}
void __chTermite_updateAnimationSpeed(Actor *this) {
if ((this->velocity[0] - 0.1 <= this->unk28) && (this->unk28 <= this->velocity[0] + 0.1)) {
this->unk28 = this->velocity[0];
} else {
this->unk28 += (this->velocity[0] < this->unk28)? -0.2 : 0.2;
if ((this->velocity[0] - 0.1 <= this->actor_specific_1_f) && (this->actor_specific_1_f <= this->velocity[0] + 0.1)) {
this->actor_specific_1_f = this->velocity[0];
}
animctrl_setDuration(this->animctrl, ml_map_f(this->unk28, 5.0f, 12.0f, 0.54f, 0.36f));
else {
this->actor_specific_1_f += (this->velocity[0] < this->actor_specific_1_f) ? -0.2 : 0.2;
}
animctrl_setDuration(this->animctrl, ml_map_f(this->actor_specific_1_f, 5.0f, 12.0f, 0.54f, 0.36f));
}
void __chTermite_updateRandomRotationSpeed(Actor *this) {
@@ -193,7 +195,7 @@ void chTermite_update(Actor *this) {
if (subaddie_maybe_set_state_position_direction(this, 2, 0.0f, 1, 0.06f)) {
__chTermite_updateRandomRotationSpeed(this);
__chTermite_updateRandomSpeed(this);
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
return;
}
return;
@@ -216,7 +218,7 @@ void chTermite_update(Actor *this) {
if (func_8034A6FC(0.73f, 0.76f) && func_80329078(this, (s32) this->yaw, 750) ) {
this->yaw_ideal = this->yaw;
this->velocity[0] = 35.0f;
this->unk28 = 19.4444447f;
this->actor_specific_1_f = 19.4444447f;
this->unk38_31 = 0x3A;
}
if ((sp34 & 0x1F) == 3 && 0.58 < (f64) randf()) {

View File

@@ -153,7 +153,7 @@ void func_802CEF54(Actor *this, f32 arg1[3], f32 arg2){
phi_v1 = (this->state == 5) ? 200 : 50;
phi_v0 = (this->state == 5) ? 200 : 100;
func_802CEDE4(sp34, this->unk1C, arg2, &this->unk28, (f32) phi_v1, (f32) phi_v0);
func_802CEDE4(sp34, this->unk1C, arg2, &this->actor_specific_1_f, (f32) phi_v1, (f32) phi_v0);
this->unk1C[0] = this->unk1C[0] + arg1[0];
this->unk1C[1] = this->unk1C[1] + arg1[1];
this->unk1C[2] = this->unk1C[2] + arg1[2];
@@ -418,7 +418,7 @@ void chBeeSwarm_update(Actor *this) {
subaddie_set_state(this, 6);
}
}
chBeeSwarm_802CF1C8(this->unk1C, this->position, this->velocity, this->unk28, 100.0f, 0, &spA0);
chBeeSwarm_802CF1C8(this->unk1C, this->position, this->velocity, this->actor_specific_1_f, 100.0f, 0, &spA0);
}
if (map_get() == MAP_78_GL_RBB_AND_MMM_PUZZLE) {
if (this->unk38_31++ == 0x1E) {
@@ -470,7 +470,7 @@ void chBeeSwarm_update(Actor *this) {
this->unk1C[1] = spB4[1];
this->unk1C[2] = spB4[2];
this->unk1C[1] += 50.0f;
this->unk28 = 400.0f;
this->actor_specific_1_f = 400.0f;
if (ml_distance_vec3f(this->position, this->unk1C) < 100.0f) {
func_802CEF54(this, spB4, 50.0f);
subaddie_set_state(this, 4);
@@ -547,7 +547,7 @@ void chBeeSwarm_update(Actor *this) {
sfxsource_set_fade_distances(this->unk44_31, 500.0f, 1500.0f);
sfxsource_set_position(this->unk44_31, this->position);
func_8030E2C4(this->unk44_31);
sfxsource_setSampleRate(this->unk44_31, (s32)(((gu_sqrtf(this->velocity[0]*this->velocity[0] + this->velocity[1]*this->velocity[1] + this->velocity[2]*this->velocity[2])/ this->unk28) * 8000.0f) + 2000.0f));
sfxsource_setSampleRate(this->unk44_31, (s32)(((gu_sqrtf(this->velocity[0] * this->velocity[0] + this->velocity[1] * this->velocity[1] + this->velocity[2] * this->velocity[2]) / this->actor_specific_1_f) * 8000.0f) + 2000.0f));
}
}
}

View File

@@ -83,7 +83,7 @@ void func_802D8B20(enum actor_e actor_id){
temp_v0 = (randf() > 0.5) ? 0x1E : -0x1E;
feather = spawn_actor_f32(actor_id, plyr_pos, (s32) (temp2 + temp_v0));
func_8032AA58(feather, 0.45f);
feather->unk28 = 22.0f;
feather->actor_specific_1_f = 22.0f;
feather->unk1C[1] = 48.0f;
feather->lifetime_value = 1.2f;
}

View File

@@ -84,7 +84,7 @@ void func_802DAE10(Actor *this){
ActorLocal_core2_53C10 *local;
local = (ActorLocal_core2_53C10 *)&this->local;
this->unk28 = randf2(local->unk0, local->unk4);
this->actor_specific_1_f = randf2(local->unk0, local->unk4);
}
void func_802DAE40(Actor *this) {
@@ -132,7 +132,7 @@ bool func_802DAFBC(Actor *this) {
func_8032C9E0(sp38);
sp34 = func_80257248(sp38, this->position);
if (((globalTimer_getTime() - local->unk38) == 0x1E) && ((sp34 - this->yaw_ideal < 15.0f) && (sp34 - this->yaw_ideal > -15.0f))) {
func_802DAF2C(this->position, this->yaw, this->unk28);
func_802DAF2C(this->position, this->yaw, this->actor_specific_1_f);
} else {
func_80328CEC(this, (s32) sp34, 0, 0xF);
}
@@ -208,7 +208,7 @@ void func_802DB440(ActorMarker *marker, ActorMarker *other_marker) {
this = marker_getActor(marker);
if( this->state == 7
&& this->unk28 >= 3.0
&& this->actor_specific_1_f >= 3.0
&& func_803294F0(this, 0x50, func_80329784(this))
) {
FUNC_8030E8B4(SFX_1F_HITTING_AN_ENEMY_3, 1.0f, 20000, this->position, 1250, 2500);
@@ -294,7 +294,7 @@ void func_802DB5A0(Actor *this) {
&& func_80329078(this, (s32) this->yaw_ideal, 0x96)
) {
if (subaddie_maybe_set_state(this, 3, 0.13f) != 0) {
this->unk28 = randf2((f32)local->unk8, (f32)local->unk9);
this->actor_specific_1_f = randf2((f32)local->unk8, (f32)local->unk9);
}
}
func_802DB220(this);
@@ -341,7 +341,7 @@ void func_802DB5A0(Actor *this) {
|| (this->unk10_12 < local->unkC_31 && func_80329530(this, 0xFA))
) {
subaddie_set_state(this, 7);
this->unk28 = (f32)local->unkA;
this->actor_specific_1_f = (f32) local->unkA;
this->unk38_31 = 0;
}
if(!func_80329078(this, (s32) this->yaw, 0x14)) {

View File

@@ -83,8 +83,6 @@ void mapSavestate_save(enum map_e map)
D_8037E650[map] = actors_appendToSavestate(D_8037E650[map], ((u32 *) D_8037E650[map]) + (4 * ((iBit + 0x7F) >> 7)));
}
#define AS_BOOL(expr) ((expr)? TRUE : FALSE)
void mapSavestate_apply(enum map_e map_id) {
s32 iBit = 0;
u32* flag_ptr;

View File

@@ -790,7 +790,7 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
suLastBaddie->pitch = 0.0f;
suLastBaddie->roll = 0.0f;
suLastBaddie->unk6C = 0.0f;
suLastBaddie->unk28 = 0.0f;
suLastBaddie->actor_specific_1_f = 0.0f;
suLastBaddie->unk10_12 = 0;
suLastBaddie->unk38_0 = 0;
suLastBaddie->unk38_31 = 0;
@@ -1604,9 +1604,10 @@ void func_803297FC(Actor *arg0, f32 *o1, f32 *o2){
}
void func_80329878(Actor *arg0, f32 arg1){
arg0->unk28 -= arg1;
if(arg0->unk28 < 0.0f){
arg0->unk28 = 0.0f;
arg0->actor_specific_1_f -= arg1;
if (arg0->actor_specific_1_f < 0.0f) {
arg0->actor_specific_1_f = 0.0f;
}
}

View File

@@ -214,7 +214,7 @@ bool func_8032C2F0(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
f32 sp60[3];
f32 sp20[4][4];
sp6C[0] = arg0->unk28;
sp6C[0] = arg0->actor_specific_1_f;
sp6C[1] = 0.0f;
sp6C[2] = 0.0f;
guRotateRPYF(sp20[0], arg0->roll, 90.0f - arg0->yaw, arg0->pitch);
@@ -230,7 +230,7 @@ bool func_8032C2F0(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
bool func_8032C404(Actor *arg0, f32 arg1[3], s32 arg2, s32 arg3) {
f32 sp1C[3];
sp1C[0] = arg0->unk28;
sp1C[0] = arg0->actor_specific_1_f;
sp1C[1] = 0.0f;
sp1C[2] = 0.0f;
ml_vec3f_yaw_rotate_copy(sp1C, sp1C, arg0->yaw - 90.0);

View File

@@ -63,14 +63,14 @@ void func_8035D65C(Actor *this) {
return;
}
if (func_80329530(this, 500) && func_8028B470() && func_8035D608(this)) {
this->unk28 = 2.0f;
this->actor_specific_1_f = 2.0f;
subaddie_set_state_with_direction(this, 4, 0.0f, -1);
}
}
void func_8035D6FC(Actor *this) {
subaddie_set_state_with_direction(this, 3, 0.0f, -1);
this->unk28 = 2.0f;
this->actor_specific_1_f = 2.0f;
subaddie_set_ideal_yaw(this, (s32) (randf2(-45.0f, 45.0f) + (this->yaw + 180.0f)));
func_80328CA8(this, (s32) func_8035D590(randf2(-45.0f, 45.0f) + (360.0f - this->pitch)));
this->unk38_31 = 0x78;
@@ -78,7 +78,7 @@ void func_8035D6FC(Actor *this) {
void func_8035D7CC(Actor *this) {
subaddie_set_state_with_direction(this, 3, 0.0f, -1);
this->unk28 = 2.0f;
this->actor_specific_1_f = 2.0f;
subaddie_set_ideal_yaw(this, (s32) (randf2(-45.0f, 45.0f) + (this->yaw + 180.0f)));
func_80328CA8(this, (s32) func_8035D590(randf2(-45.0f, 45.0f) + (360.0f - this->pitch)));
}
@@ -128,10 +128,10 @@ void func_8035DA1C(Actor *this) {
if (!this->initialized) {
this->initialized = TRUE;
this->unk138_25 = TRUE;
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
LOCAL_D6600(this)->unk4 =(map_get() == MAP_71_GL_STATUE_ROOM) ? 8 : 0xf;
if (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
subaddie_set_state_with_direction(this, 1, 0.0f, 1);
}
func_8032CA80(this, LOCAL_D6600(this)->unk4);
@@ -152,7 +152,7 @@ void func_8035DA1C(Actor *this) {
func_80328FF0(this, 0.5f);
func_8032CA80(this, LOCAL_D6600(this)->unk4);
if (subaddie_maybe_set_state(this, 2, 0.05f) && !volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
}
func_8035D65C(this);
break;
@@ -174,7 +174,7 @@ void func_8035DA1C(Actor *this) {
func_80328CA8(this, 0);
}
if (subaddie_maybe_set_state_position_direction(this, 1, 0.0f, 1, 0.005f)) {
this->unk28 = 2.0f;
this->actor_specific_1_f = 2.0f;
}
func_8035D65C(this);
break;
@@ -185,7 +185,7 @@ void func_8035DA1C(Actor *this) {
func_8032CA80(this, LOCAL_D6600(this)->unk4);
if (func_80329480(this) && func_8032944C(this)) {
subaddie_set_state_with_direction(this, 2, 0.0f, -1);
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
}
break;
@@ -198,7 +198,7 @@ void func_8035DA1C(Actor *this) {
func_8032CA80(this, LOCAL_D6600(this)->unk4);
if (func_80329480(this) && func_8032944C(this)) {
subaddie_set_state_with_direction(this, 5, 0.0f, -1);
this->unk28 = 10.5f;
this->actor_specific_1_f = 10.5f;
}
break;

View File

@@ -43,7 +43,7 @@ void func_8035F99C(Actor *this){
if(!volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)){
subaddie_set_state_with_direction(this, 2, 0.01f, 1);
actor_playAnimationOnce(this);
this->unk28 = 5.0f;
this->actor_specific_1_f = 5.0f;
FUNC_8030E8B4(SFX_419_UNKNOWN, 1.0f, 28000, this->position, 0x4e2, 0x9c4);
}
}
@@ -51,7 +51,7 @@ void func_8035F99C(Actor *this){
void func_8035FA0C(Actor *this){
subaddie_set_state(this, 3);
actor_loopAnimation(this);
this->unk28 = 5.0f;
this->actor_specific_1_f = 5.0f;
}
void func_8035FA48(Actor *this){
@@ -75,7 +75,7 @@ void func_8035FAE0(Actor *this){
subaddie_set_state_with_direction(this, 7, 0.01f, 1);
actor_loopAnimation(this);
this->yaw += 180.0f;
this->unk28 = 20.0f;
this->actor_specific_1_f = 20.0f;
this->velocity_x = 300.0f;
}
@@ -181,7 +181,7 @@ bool func_8035FEDC(Actor *this){
}
if(func_80329480(this)){
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
return FALSE;
}
}
@@ -190,7 +190,7 @@ bool func_8035FEDC(Actor *this){
bool func_8035FF5C(Actor *this){
if(func_8032CA80(this, 5) && func_80329480(this)){
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
return FALSE;
}
return TRUE;
@@ -241,12 +241,12 @@ bool func_80360198(Actor *this) {
func_80328FB0(this, 5.0f);
func_80360044(this);
this->unk28 += (this->velocity[1] * 0.45) - (0.001 * this->unk28);
if (this->unk28 > 13.0) {
this->unk28 = 13.0f;
this->actor_specific_1_f += (this->velocity[1] * 0.45) - (0.001 * this->actor_specific_1_f);
if (this->actor_specific_1_f > 13.0) {
this->actor_specific_1_f = 13.0f;
}
if (this->unk28 < -13.0) {
this->unk28 = -13.0f;
if (this->actor_specific_1_f < -13.0) {
this->actor_specific_1_f = -13.0f;
}
this->velocity[0] += ((this->velocity[1] * 0.9) - 0.6);
@@ -302,7 +302,7 @@ f32 func_803603AC(Actor *this, s32 arg1, u8 arg2){
return 0.0f;
phi_f2 = -(this->unk28*(dy))/(D1 + D2);
phi_f2 = -(this->actor_specific_1_f*(dy))/(D1 + D2);
if (phi_f2 >= 4.0f) {
phi_f2 = 4.0f;
} else if (phi_f2 <= -4.0f) {
@@ -395,7 +395,7 @@ void func_80360828(Actor *this){
this->initialized = TRUE;
marker_setCollisionScripts(this->marker, NULL, func_803607FC, func_80360790);
this->unk38_0 = FALSE;
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->velocity_x = 0.0f;
this->unk1C_x = this->position_x;
this->unk1C_y = this->position_y;