Merge branch 'naming_actor_properties' into 'master'

Renaming functions

See merge request banjo.decomp/banjo-kazooie!68
This commit is contained in:
Banjo Kazooie
2024-09-13 23:37:12 +00:00
173 changed files with 752 additions and 753 deletions

View File

@@ -137,7 +137,7 @@ void func_8038794C(Actor *this){
switch(this->state){
case 1://L80387AB0
if(mapSpecificFlags_get(0xb))
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
if(mapSpecificFlags_get(0x1)){
func_8028F94C(1, this->position);
@@ -147,13 +147,13 @@ void func_8038794C(Actor *this){
break;
}//L80387B38
if(!this->unk138_24 && func_80329530(this, 0x1f4)){
if(!this->is_first_encounter && func_80329530(this, 0x1f4)){
if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){
if(func_80311480(0xbff, 0x2a, this->position, NULL, NULL, NULL)){
for(i = 0; i <5; i++ ){
timedFunc_set_1(D_80391BEC[i], (GenFunction_1)func_8038787C, (s32)this->marker);
}
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
}
}
}

View File

@@ -390,7 +390,7 @@ void func_803895E0(void){
f20 = (f32)func_80304DA8(s0);
f8 = (f32)func_80304DB8(s0);
f22 = f8*0.01;
actor = func_8032813C(D_80391DB8[i].actor_id, sp64, (s32)f20);
actor = spawn_actor_f32(D_80391DB8[i].actor_id, sp64, (s32)f20);
actor->scale = f22;
}
}

View File

@@ -69,7 +69,7 @@ void func_80390388(Actor *this){
|| jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)
|| func_80390334()
){
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
}
if( func_80329530(this, 0xFA)
@@ -77,14 +77,14 @@ void func_80390388(Actor *this){
){
if(0.0f == this->unk1C[0] && func_80390334()){
if(func_80311480(0xc1f, 0xb, this->position, NULL, NULL, NULL)){
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
this->unk1C[0] = 1.0f;
}
}
else{
if( !this->unk138_24 ){
if( !this->is_first_encounter ){
if(func_80311480(0xc1e, 0x2b, this->position, NULL, NULL, NULL)){
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
}
}
}

View File

@@ -141,7 +141,7 @@ void chScarfSled_update(Actor *this){
}
this->velocity_x = this->position_x;
this->velocity_y = func_80309724(this->position);
this->velocity_y = mapModel_getFloorY(this->position);
this->velocity_z = this->position_z;
if(this->state == 2){
__chScarfSled_func_80386630(this);

View File

@@ -71,7 +71,7 @@ Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE
sp4C[2] = (f32)marker->propPtr->z;
sp40[0] = (f32)marker->pitch;
sp40[1] = this->unk60;
sp40[1] = this->lifetime_value;
sp40[2] = (f32)marker->roll;
sp3C = this->scale;
if(animMtxList_len(marker->unk20)){
@@ -100,7 +100,7 @@ void func_8038C260(f32 position[3], s32 count, enum asset_e model_id){
400.0f, 400.0f, 400.0f,
800.0f, 800.0f, 800.0f
);
func_802EFB70(pCtrl, 0.1f, 0.2f);
particleEmitter_setStartingScaleRange(pCtrl, 0.1f, 0.2f);
particleEmitter_setSpawnIntervalRange(pCtrl, 0.0f, 0.02f);
particleEmitter_setParticleLifeTimeRange(pCtrl, 1.5f, 1.5f);
particleEmitter_setFade(pCtrl, 0.0f, 0.3f);
@@ -167,7 +167,7 @@ void func_8038C428(Actor *arg0, f32 arg1[3], f32 arg2)
sp5C[0] = arg0->position[0] + var_f22;
sp5C[1] = arg0->position[1];
sp5C[2] = arg0->position[2] + var_f24;
temp_f14 = func_80309724(sp5C);
temp_f14 = mapModel_getFloorY(sp5C);
if (sp7F) {
do {
sp78 += 1;
@@ -206,7 +206,7 @@ bool func_8038C718(Actor *this, f32 arg1){
animctrl_setAnimTimer(this->animctrl, tmp);
if(arg1 == 0.0f)
arg1 = func_80309724(this->position);
arg1 = mapModel_getFloorY(this->position);
if(this->position_y <= arg1){
this->position_y = arg1;
@@ -233,7 +233,7 @@ void func_8038C8F0(ActorMarker *marker){
this = marker_getActor(reinterpret_cast(ActorMarker *, marker));
other = marker_getActor(this->unk100);
muncher = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392070, 170);
muncher = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392070, 170);
muncher->unk100 = other->marker;
muncher->unkF4_8 = 1;
@@ -289,7 +289,7 @@ void func_8038C9A0(Actor *this){
if(!func_8038C718(this, 0)){
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
func_8038C428(this, D_80392088, randf2(20.0f, 24.0f));
this->unk60 = this->yaw;
this->lifetime_value = this->yaw;
}
break;

View File

@@ -3,7 +3,7 @@
#include "variables.h"
extern void func_80324CD8(f32);
extern Actor *func_8032813C(enum actor_e, f32[3], s32);
extern Actor *spawn_actor_f32(enum actor_e, f32[3], s32);
Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038D6C8(Actor *this);
@@ -209,9 +209,9 @@ void func_8038D41C(ActorMarker *marker){
ActorMarker *_marker = reinterpret_cast(ActorMarker *, marker);
Actor *actor;
actor = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392354, 170);
actor = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392354, 170);
actor->unk100 = _marker;
actor = func_8032813C(ACTOR_337_TWINKLY_MUNCHER, D_80392360, 170);
actor = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392360, 170);
actor->unk100 = _marker;
if(pad[0]);
}
@@ -369,7 +369,7 @@ void func_8038D6C8(Actor *this){
this->unk38_31 = 0xA;
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
__spawnQueue_add_1((GenFunction_1)func_8038D41C, (s32)this->marker);
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
func_80347A14(0);
func_802FAD64(ITEM_14_HEALTH);
break;
@@ -407,12 +407,12 @@ void func_8038D6C8(Actor *this){
if(0.96 < animctrl_getAnimTimer(this->animctrl)){
if(this->unk60 <= 0.0){
if(this->lifetime_value <= 0.0){
__spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker);
this->unk60 = 2.9f;
this->lifetime_value = 2.9f;
}
else{
this->unk60 -= sp24;
this->lifetime_value -= sp24;
}
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
}

View File

@@ -107,7 +107,7 @@ void func_8038E094(Actor *this){
marker_setCollisionScripts(this->marker, NULL, func_8038DEB8, NULL);
this->marker->propPtr->unk8_3 = TRUE;
animctrl_setAnimTimer(this->animctrl, 0.99999f);
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
if(this->unkF4_8 == 1){
func_8038DDC8(this);
}
@@ -148,18 +148,18 @@ void func_8038E094(Actor *this){
case 1: //L8038E2DC
this->marker->propPtr->unk8_3 = FALSE;
animctrl_setAnimTimer(this->animctrl, 0.99f);
if(this->unk60 < 5.0){
this->unk60 += sp34;
if(this->lifetime_value < 5.0){
this->lifetime_value += sp34;
}
else{
if(10.0 <= this->unk60 || randf() < this->unk60/10.0){
if(10.0 <= this->lifetime_value || randf() < this->lifetime_value/10.0){
if(!func_8038DF34(this)){
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
func_8038DDC8(this);
break;
}
}
this->unk60 += sp34;
this->lifetime_value += sp34;
}
break;
@@ -216,7 +216,7 @@ void func_8038E094(Actor *this){
if(actor_animationIsAt(this, 0.97f)){
subaddie_set_state_with_direction(this, 1, 0.97f, 0);
actor_playAnimationOnce(this);
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
}
break;

View File

@@ -299,10 +299,10 @@ void FP_func_8038F7AC(Actor *this){
break;
}
if(func_80329530(this, 500) && !this->unk138_24){
if(func_80329530(this, 500) && !this->is_first_encounter){
if(func_80311480(0xc1c, 0xAA, this->position, this->marker, func_8038F330, func_8038F3C4)){
timed_setStaticCameraToNode(0.0f, 0x2E);
this->unk138_24 = TRUE;
this->is_first_encounter = TRUE;
}
break;
}//L8038FD40

View File

@@ -124,18 +124,18 @@ void chXmasTree_update(Actor *this){
if(!mapSpecificFlags_get(2)) break;
subaddie_set_state(this, 3);
this->unk60 = 2.0f;
this->lifetime_value = 2.0f;
func_8025A6EC(COMUSIC_61_XMAS_TREE_LIGHTS_UP, 28000);
func_802BAFE4(0x1A);
func_80311480(0xC14, 0, NULL, NULL, NULL, NULL);
break;
case 3: // L803872F0
if(0.0 <= this->unk60){
if( 1.8 < this->unk60){
if(0.0 <= this->lifetime_value){
if( 1.8 < this->lifetime_value){
__chXmasTree_80386EF4(this, 0);
}
else if(this->unk60 < 0.2){//L80387340
else if(this->lifetime_value < 0.2){//L80387340
__chXmasTree_80386EF4(this, 1);
}
else{
@@ -144,7 +144,7 @@ void chXmasTree_update(Actor *this){
__chXmasTree_8038709C(this);
}
}//L803873AC
this->unk60 -= sp2C;
this->lifetime_value -= sp2C;
}
else{//L803873BC
if(func_802BB270()){
@@ -174,12 +174,12 @@ void chXmasTree_update(Actor *this){
if(item_empty(ITEM_6_HOURGLASS)){
subaddie_set_state(this, 5);
mapSpecificFlags_set(2, FALSE);
this->unk60 = 0.1f;
this->lifetime_value = 0.1f;
if(!func_8038BFA0()){
if(!mapSpecificFlags_get(9) || mapSpecificFlags_get(1)){
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 28000);
func_802BAFE4(0x1a);
this->unk60 = 2.0f;
this->lifetime_value = 2.0f;
}
}
}
@@ -187,11 +187,11 @@ void chXmasTree_update(Actor *this){
break;
case 5: // L803874EC
if(0.0 <= this->unk60){
if( 1.8 < this->unk60){
if(0.0 <= this->lifetime_value){
if( 1.8 < this->lifetime_value){
__chXmasTree_80386EF4(this, 1);
}
else if(this->unk60 < 0.2){
else if(this->lifetime_value < 0.2){
__chXmasTree_80386EF4(this, 0);
}
else{
@@ -200,7 +200,7 @@ void chXmasTree_update(Actor *this){
__chXmasTree_8038709C(this);
}
}
this->unk60 -= sp2C;
this->lifetime_value -= sp2C;
}
else{
__chXmasTree_80386F84(this);

View File

@@ -38,9 +38,9 @@ void func_8038EC34(ActorMarker *this_marker, ActorMarker *other_marker){
}
void func_8038EC5C(Actor *this){
if(0.0f == this->unk60){
if(0.0f == this->lifetime_value){
this->unk38_31++;
this->unk60 = 0.33f;
this->lifetime_value = 0.33f;
if(this->unk38_31 < 4){
func_8025A6EC(COMUSIC_2B_DING_B, 28000);
}
@@ -91,11 +91,11 @@ void func_8038ECD8(Actor *this){
local->unk1A = TRUE;
}//L8038EE98
if(0.0f != this->unk60){
if(time_getDelta() < this->unk60){
this->unk60 -= time_getDelta();
if(0.0f != this->lifetime_value){
if(time_getDelta() < this->lifetime_value){
this->lifetime_value -= time_getDelta();
}else{
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
}
}//L8038EEF0
switch(this->state){

View File

@@ -81,7 +81,7 @@ void func_8038E940(Actor *this){
marker_setCollisionScripts(this->marker, NULL, func_8038E7CC, NULL);
subaddie_set_state_with_direction(this, 1, 0.05f, 1);
this->unk38_31 = 0;
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
}//L8038EA3C
this->unk58_0 = (this->state == 1) ? FALSE : TRUE;
@@ -102,16 +102,16 @@ void func_8038E940(Actor *this){
actor_playAnimationOnce(this);
FUNC_8030E624(SFX_416, 0.8f, 32000);
this->marker->collidable = FALSE;
this->unk60 = 0.0f;
this->lifetime_value = 0.0f;
break;
case 3: //L8038EB44
if(this->unk60 == 0.0f && actor_animationIsAt(this, 0.95f)){
this->unk60 = 1.0f;
if(this->lifetime_value == 0.0f && actor_animationIsAt(this, 0.95f)){
this->lifetime_value = 1.0f;
mapSpecificFlags_set(2, TRUE);
break;
}
if(this->unk60 != 0.0f && !mapSpecificFlags_get(2)){
if(this->lifetime_value != 0.0f && !mapSpecificFlags_get(2)){
func_8038E774(this);
}
break;

View File

@@ -90,8 +90,8 @@ void func_8038AC90(s32 indx, s32 arg1){
Actor *a1;
Actor *a2;
m1 = func_8032813C(0x161, D_80392F70[indx].position, 0)->marker;
m2 = func_8032813C(0x162, D_80393280[indx].position, 0)->marker;
m1 = spawn_actor_f32(0x161, D_80392F70[indx].position, 0)->marker;
m2 = spawn_actor_f32(0x162, D_80393280[indx].position, 0)->marker;
a1 = marker_getActor(m1);
a2 = marker_getActor(m2);
@@ -143,23 +143,23 @@ void func_8038AEE0(s32 indx){
Actor *sp1C;
switch(indx){
case 0:// L8038AF0C
sp1C = func_8032813C(0x22d, D_80391ED0, D_80391EDC);
sp1C = spawn_actor_f32(0x22d, D_80391ED0, D_80391EDC);
break;
case 1:// L8038AF38
sp1C = func_8032813C(0x22e, D_80391EE0, D_80391EEC);
sp1C = spawn_actor_f32(0x22e, D_80391EE0, D_80391EEC);
break;
case 2:// L8038AF64
sp1C = func_8032813C(0x22d, D_80391EF0, FP_D_80391EFC);
sp1C = spawn_actor_f32(0x22d, D_80391EF0, FP_D_80391EFC);
break;
case 3:// L8038AF90
sp1C = func_8032813C(0x22d, D_80391F00, D_80391F0C);
sp1C = spawn_actor_f32(0x22d, D_80391F00, D_80391F0C);
break;
case 4:// L8038AFBC
sp1C = func_8032813C(0x22d, D_80391F10, D_80391F1C);
sp1C = spawn_actor_f32(0x22d, D_80391F10, D_80391F1C);
break;
}
D_80393590[indx] = sp1C->marker;
@@ -191,7 +191,7 @@ void FP_func_8038B0B8(void){
}
void func_8038B0F8(void){
Actor *trainers = func_8032813C(ACTOR_2C_TURBO_TALON_TRAINERS, D_80391F20, 100);
Actor *trainers = spawn_actor_f32(ACTOR_2C_TURBO_TALON_TRAINERS, D_80391F20, 100);
trainers->unk10_1 = FALSE;
}