All Changes

This commit is contained in:
Moses Troyer
2025-08-16 17:15:49 +00:00
committed by Banjo Kazooie
parent fd208f77ca
commit c2dd933d22
389 changed files with 7824 additions and 6965 deletions

View File

@@ -4,18 +4,19 @@
#include "prop.h"
#include "actor.h"
#include "core2/dustemitter.h"
extern void func_8028F918(s32);
extern void func_802D2FB0(Actor *, s32, s32, s32, f32, s32, s32, s32);
extern void func_802D3CE8(Actor *);
extern void func_802D3D54(Actor *);
extern void func_802D3D74(Actor *this);
extern void func_802D4830(Actor *, s32, f32);
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
extern void func_80324CFC(f32, enum comusic_e, s32);
extern int actor_animationIsAt(Actor *, f32);
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
extern void func_8033A45C(s32, s32);
extern void func_8034E0FC(void *, s32);
extern void setStruct6DsOpacity(void *, s32);
@@ -61,8 +62,8 @@ void func_8038A0A4(Actor *this);
extern ActorInfo D_80393560;
extern ActorInfo D_80393584;
extern ActorInfo D_803947B0;
extern ActorInfo D_803947D4;
extern ActorInfo JIGSAW_PICTURE_ACTOR;
extern ActorInfo JIGSAW_PICTURE_ACTOR_2;
extern ActorInfo chBrentilda;
extern ActorInfo D_80394A80;
extern ActorInfo D_80394AB0;
@@ -219,7 +220,7 @@ void chFloorCobweb_update(Actor *this)
{
func_802D3CE8(this);
if (fileProgressFlag_get(this->unkF4_8 == 1 ? FILEPROG_CB_LAIR_COBWEB_OVER_FLIGHTPAD_BROKEN : FILEPROG_CC_LAIR_COBWEB_OVER_GREEN_CAULDRON_BROKEN))
if (fileProgressFlag_get(this->actorTypeSpecificField == 1 ? FILEPROG_CB_LAIR_COBWEB_OVER_FLIGHTPAD_BROKEN : FILEPROG_CC_LAIR_COBWEB_OVER_GREEN_CAULDRON_BROKEN))
{
marker_despawn(this->marker);
return;
@@ -266,7 +267,7 @@ void lair_func_80386550(Actor *this)
{
func_802D3CE8(this);
if (fileProgressFlag_get(this->unkF4_8 == 1 ? FILEPROG_C8_LAIR_BRICKWALL_TO_WADINGBOOTS_BROKEN : FILEPROG_C9_LAIR_BRICKWALL_TO_SHOCKJUMP_PAD_BROKEN))
if (fileProgressFlag_get(this->actorTypeSpecificField == 1 ? FILEPROG_C8_LAIR_BRICKWALL_TO_WADINGBOOTS_BROKEN : FILEPROG_C9_LAIR_BRICKWALL_TO_SHOCKJUMP_PAD_BROKEN))
{
marker_despawn(this->marker);
return;
@@ -382,7 +383,7 @@ void func_803867A8(Actor *this) {
this->velocity[0] += 1.0f;
if((this->velocity[0] < 0.0f) || (this->velocity[0] > 19.0f)) {
this->velocity[0] = 0.0f;
func_8030E6A4(SFX_3F6_RUBBING, 0.5f, this->alpha_124_19*0x25 + 0x3840);
gcsfx_playWithPitch(SFX_3F6_RUBBING, 0.5f, this->alpha_124_19*0x25 + 0x3840);
}
}
}
@@ -390,7 +391,7 @@ void func_803867A8(Actor *this) {
this->velocity[0] += 1.0f;
if ((this->velocity[0] < 0.0f) || (this->velocity[0] > 19.0f)) {
this->velocity[0] = 0.0f;
FUNC_8030E8B4(SFX_3F6_RUBBING, 0.5f, 24000, this->position, 100, 2300);
sfx_playFadeShorthandDefault(SFX_3F6_RUBBING, 0.5f, 24000, this->position, 100, 2300);
}
}
@@ -399,7 +400,7 @@ void func_803867A8(Actor *this) {
this->position_y = this->unk1C[1];
sp5C[1] = sp5C[2] =0.0f;
sp5C[0] = this->unkF4_8*2;
sp5C[0] = this->actorTypeSpecificField*2;
ml_vec3f_yaw_rotate_copy(sp5C, sp5C, this->lifetime_value);
this->position[0] = this->unk1C[0] + sp5C[0];
this->position[2] = this->unk1C[2] + sp5C[2];
@@ -412,7 +413,7 @@ void func_803867A8(Actor *this) {
sp50[1] = this->unk1C[1];
sp5C[1] = sp5C[2] = 0.0f;
sp5C[0] = this->unkF4_8*2;
sp5C[0] = this->actorTypeSpecificField*2;
ml_vec3f_yaw_rotate_copy(sp5C, sp5C, phi_f0);
sp50[0] = this->unk1C[0] + sp5C[0];
sp50[2] = this->unk1C[2] + sp5C[2];
@@ -507,7 +508,7 @@ void func_80386D78(Actor *this) {
this->scale = 0.0001f;
this->lifetime_value = 26.0f;
this->position[1] = this->unk1C[1];
func_802BAFE4(0x80);
gcStaticCamera_activate(0x80);
timedFunc_set_0(3.0f, func_80386D40);
}
}
@@ -524,8 +525,8 @@ void func_803870DC(Actor *this) {
f32 sp64[3];
s32 temp_s7;
phi_v1 = fileProgressFlag_get(D_80393454[this->unkF4_8 - 1])
|| (D_80393468[this->unkF4_8 - 1] != 0 && volatileFlag_get(D_80393468[this->unkF4_8 - 1]));
phi_v1 = fileProgressFlag_get(D_80393454[this->actorTypeSpecificField - 1])
|| (D_80393468[this->actorTypeSpecificField - 1] != 0 && volatileFlag_get(D_80393468[this->actorTypeSpecificField - 1]));
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
@@ -592,7 +593,7 @@ Actor *lair_func_80387560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
u32 i;
for (i = 0; i != 10; i++)
func_8033A45C(i + 1, actor->unkF4_8 + 1 == i + 2);
func_8033A45C(i + 1, actor->actorTypeSpecificField + 1 == i + 2);
return actor_drawFullDepth(marker, gfx, mtx, vtx);
}
@@ -613,7 +614,7 @@ void func_803875F0(Actor * this)
if (mapSpecificFlags_get(0))
{
this->unk1C_y = this->position_y;
func_802BAFE4(0x2A);
gcStaticCamera_activate(0x2A);
fileProgressFlag_set(FILEPROG_1E_LAIR_GRATE_TO_BGS_PUZZLE_OPEN, TRUE);
this->volatile_initialized = TRUE;
this->unk38_31 = 0x0C;
@@ -662,11 +663,11 @@ void func_80387730(Actor *this) {
this->alpha_124_19 = 0xFF;
this->unk1C[1] = 0.0f;
this->unk1C[2] = 3.5f;
if (fileProgressFlag_get(this->unkF4_8 + FILEPROG_39_CCW_OPEN)) {
if (fileProgressFlag_get(this->actorTypeSpecificField + FILEPROG_39_CCW_OPEN)) {
marker_despawn(this->marker);
return;
}
if ((this->unkF4_8 >= 2U) && (this->unkF4_8 < 8U) && volatileFlag_get(D_80393494[this->unkF4_8 - 2])) {
if ((this->actorTypeSpecificField >= 2U) && (this->actorTypeSpecificField < 8U) && volatileFlag_get(D_80393494[this->actorTypeSpecificField - 2])) {
marker_despawn(this->marker);
return;
}
@@ -681,12 +682,12 @@ void func_80387730(Actor *this) {
this->unk1C[1] = 0.0f;
this->unk1C[2] = 3.5f;
}
if (!fileProgressFlag_get(this->unkF4_8 + FILEPROG_39_CCW_OPEN) && ability_isUnlocked(ABILITY_13_1ST_NOTEDOOR)) {
if (!fileProgressFlag_get(this->actorTypeSpecificField + FILEPROG_39_CCW_OPEN) && ability_isUnlocked(ABILITY_13_1ST_NOTEDOOR)) {
player_getPosition(spAC);
if ((ml_vec3f_distance(spAC, this->position) < 500.0f) && (func_803114C4() != 0xF64)) {
if ((ml_vec3f_distance(spAC, this->position) < 500.0f) && (gcdialog_getCurrentTextId() != 0xF64)) {
func_802FACA4(0xC);
}
if (itemscore_noteScores_getTotal() >= D_8039347C[this->unkF4_8 - 1]) {
if (itemscore_noteScores_getTotal() >= D_8039347C[this->actorTypeSpecificField - 1]) {
if (this->marker->unk14_21) {
func_8032BC60(this, 5, sp90);
func_8032BC60(this, 6, sp84);
@@ -711,7 +712,7 @@ void func_80387730(Actor *this) {
this->alpha_124_19 -= 7;
}
if (this->alpha_124_19 == 0) {
fileProgressFlag_set(this->unkF4_8 + FILEPROG_39_CCW_OPEN, TRUE);
fileProgressFlag_set(this->actorTypeSpecificField + FILEPROG_39_CCW_OPEN, TRUE);
marker_despawn(this->marker);
func_8028F918(0);
func_8028F66C(BS_INTR_35);
@@ -740,8 +741,8 @@ void func_80387730(Actor *this) {
}
}
}
} else if ((this->unkF4_8 >= 2) && (ml_vec3f_distance(spAC, this->position) < 290.0f)) {
volatileFlag_setAndTriggerDialog_0(VOLATILE_FLAG_B0_NOT_ENOUGH_NOTES);
} else if ((this->actorTypeSpecificField >= 2) && (ml_vec3f_distance(spAC, this->position) < 290.0f)) {
progressDialog_setAndTriggerDialog_0(VOLATILE_FLAG_B0_NOT_ENOUGH_NOTES);
}
}
}
@@ -753,7 +754,7 @@ Actor *func_80387DA8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
{
// TODO: Think of a better way of doing this, similar to the SM64 one
#define NUM_NOTE_DOORS (12)
#define noteDoorIdx unkF4_8
#define noteDoorIdx actorTypeSpecificField
#define opacityTimer unk1C[1]
Actor *actor;
@@ -769,13 +770,13 @@ Actor *func_80387DA8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
* Sets opacity of the "note" symbol
*/
if (var2)
func_8034E0FC(var2, actor->opacityTimer);
setStruct6DsOpacity(var2, actor->opacityTimer);
/**
* Sets opacity of note door numbers
*/
if (var1)
func_8034E0FC(var1, 0xFF - (s32)actor->opacityTimer);
setStruct6DsOpacity(var1, 0xFF - (s32)actor->opacityTimer);
/**
* Hides all note door graphics that don't match this note door's index
@@ -804,9 +805,9 @@ void func_80387E94(s32 arg0)
// Grab the same pointer again for good measure :^)
actor2 = marker_getActor(marker);
actorNew->unkF4_20 = actor2->unk78_13;
actorNew->unkF4_20 = actor2->secondaryId;
actor2->unk100 = actorNew->marker;
actor2->partnerActor = actorNew->marker;
actorNew->unk1C[0] = 0;
}
@@ -815,7 +816,7 @@ void func_80387F1C(void)
{
f32 tmp[3];
func_802BAFE4(0x7B);
gcStaticCamera_activate(0x7B);
if (nodeProp_findPositionFromActorId(400, tmp))
{
@@ -839,7 +840,7 @@ void func_80387F78(Actor *this, enum file_progress_e progress_flag)
&& fileProgressFlag_get(FILEPROG_9C_LAIR_CC_WITCH_SWITCH_LEFT_EYE_PRESSED)
&& fileProgressFlag_get(FILEPROG_9D_LAIR_CC_WITCH_SWITCH_RIGHT_EYE_PRESSED))
{
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
coMusicPlayer_playMusic(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
timedFunc_set_0(0.9f, func_80387F1C);
}
}
@@ -884,9 +885,9 @@ void func_803880BC(Actor *this)
actor_collisionOn(this);
}
if (this->unk100 != NULL && !fileProgressFlag_get(FILEPROG_9D_LAIR_CC_WITCH_SWITCH_RIGHT_EYE_PRESSED))
if (this->partnerActor != NULL && !fileProgressFlag_get(FILEPROG_9D_LAIR_CC_WITCH_SWITCH_RIGHT_EYE_PRESSED))
{
Actor *actor = marker_getActor(this->unk100);
Actor *actor = marker_getActor(this->partnerActor);
actor->position_y = this->unk1C[1];
actor_collisionOn(actor);
}
@@ -902,9 +903,9 @@ void func_803880BC(Actor *this)
fileProgressFlag_set(FILEPROG_9B_LAIR_CC_WITCH_SWITCH_EYES_ACTIVE, TRUE);
}
if (this->unk100 != NULL)
if (this->partnerActor != NULL)
{
Actor *actor = marker_getActor(this->unk100);
Actor *actor = marker_getActor(this->partnerActor);
actor->position_y = this->position_y;
}
}
@@ -955,7 +956,7 @@ void func_803882B0(Actor *this)
if (this->lifetime_value == 0 && this->pitch > 42.f)
{
this->lifetime_value = 1.f;
func_8025A6EC(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
coMusicPlayer_playMusic(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
}
if (this->pitch > 90.f)
@@ -969,7 +970,7 @@ void func_803882B0(Actor *this)
void func_80388404(enum file_progress_e progress_flag, enum sfx_e sfx, f32 a2, s32 a3)
{
if (fileProgressFlag_get(progress_flag) == FALSE)
func_8030E6A4(sfx, a2, a3);
gcsfx_playWithPitch(sfx, a2, a3);
fileProgressFlag_set(progress_flag, TRUE);
}
@@ -1015,61 +1016,61 @@ void func_80388524(Actor *this) {
if (!sp34) {
switch(this->modelCacheIndex){
case ACTOR_2E5_DOOR_OF_GRUNTY://L80388630
if (!fileProgressFlag_get(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN) && func_8038EAE0(0xA)) {
if (!fileProgressFlag_get(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN) && jigsawPicture_isJigsawPictureComplete(0xA)) {
fileProgressFlag_set(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN, TRUE);
}
break;
case ACTOR_20E_MM_ENTRANCE_DOOR: //L80388660
if (!fileProgressFlag_get(FILEPROG_31_MM_OPEN) && func_8038EAE0(1)) {
if (!fileProgressFlag_get(FILEPROG_31_MM_OPEN) && jigsawPicture_isJigsawPictureComplete(1)) {
fileProgressFlag_set(FILEPROG_31_MM_OPEN, TRUE);
}
break;
case ACTOR_226_GV_ENTRANCE: //L80388690
if (!fileProgressFlag_get(FILEPROG_36_GV_OPEN) && func_8038EAE0(6)) {
if (!fileProgressFlag_get(FILEPROG_36_GV_OPEN) && jigsawPicture_isJigsawPictureComplete(6)) {
fileProgressFlag_set(FILEPROG_36_GV_OPEN, TRUE);
}
break;
case ACTOR_212_CC_ENTRANCE_BARS: //L803886C0
if (!fileProgressFlag_get(FILEPROG_33_CC_OPEN) && func_8038EAE0(3)) {
if (!fileProgressFlag_get(FILEPROG_33_CC_OPEN) && jigsawPicture_isJigsawPictureComplete(3)) {
fileProgressFlag_set(FILEPROG_33_CC_OPEN, TRUE);
}
break;
case ACTOR_211_TCC_ENTRANCE_CHEST_LID: //L803886F0
if (!fileProgressFlag_get(FILEPROG_32_TTC_OPEN) && func_8038EAE0(2)) {
if (!fileProgressFlag_get(FILEPROG_32_TTC_OPEN) && jigsawPicture_isJigsawPictureComplete(2)) {
fileProgressFlag_set(FILEPROG_32_TTC_OPEN, TRUE);
}
break;
case ACTOR_210_BGS_ENTRANCE_DOOR: //L80388720
if (!fileProgressFlag_get(FILEPROG_34_BGS_OPEN) && func_8038EAE0(4)) {
if (!fileProgressFlag_get(FILEPROG_34_BGS_OPEN) && jigsawPicture_isJigsawPictureComplete(4)) {
fileProgressFlag_set(FILEPROG_34_BGS_OPEN, TRUE);
}
break;
case ACTOR_20F_RBB_ENTRANCE_DOOR: //L80388750
if (!fileProgressFlag_get(FILEPROG_38_RBB_OPEN) && func_8038EAE0(8)) {
if (!fileProgressFlag_get(FILEPROG_38_RBB_OPEN) && jigsawPicture_isJigsawPictureComplete(8)) {
fileProgressFlag_set(FILEPROG_38_RBB_OPEN, TRUE);
}
break;
case ACTOR_228_MMM_ENTRANCE_DOOR: //L80388780
if (!fileProgressFlag_get(FILEPROG_37_MMM_OPEN) && func_8038EAE0(7)) {
if (!fileProgressFlag_get(FILEPROG_37_MMM_OPEN) && jigsawPicture_isJigsawPictureComplete(7)) {
fileProgressFlag_set(FILEPROG_37_MMM_OPEN, TRUE);
}
break;
case ACTOR_234_CCW_ENTRANCE_DOOR: //L803887B0
if (!fileProgressFlag_get(FILEPROG_39_CCW_OPEN) && func_8038EAE0(9)) {
if (!fileProgressFlag_get(FILEPROG_39_CCW_OPEN) && jigsawPicture_isJigsawPictureComplete(9)) {
fileProgressFlag_set(FILEPROG_39_CCW_OPEN, TRUE);
}
break;
case ACTOR_235_FP_ENTANCE_DOOR: //L803887E0
if (!fileProgressFlag_get(FILEPROG_35_FP_OPEN) && func_8038EAE0(5)) {
if (!fileProgressFlag_get(FILEPROG_35_FP_OPEN) && jigsawPicture_isJigsawPictureComplete(5)) {
fileProgressFlag_set(FILEPROG_35_FP_OPEN, TRUE);
}
break;
@@ -1167,7 +1168,7 @@ void func_80388524(Actor *this) {
switch (this->state) {
case 0x19: //L80388B34
subaddie_set_state_with_direction(this, 0x1A, 0.0f, 1);
func_8025A6EC(JINGLE_END_OF_INTRO, -1);
coMusicPlayer_playMusic(JINGLE_END_OF_INTRO, -1);
break;
case 26: //L80388B54
@@ -1322,7 +1323,7 @@ void func_80388FC8(Actor *this)
{
if (this->modelCacheIndex == 0x215)
{
func_802BAFE4(0x2B);
gcStaticCamera_activate(0x2B);
if (1); // oof
}
@@ -1357,7 +1358,7 @@ void func_80388FC8(Actor *this)
if (this->modelCacheIndex == 0x215)
{
func_802D48B8(this);
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
gcsfx_play(SFX_7F_HEAVYDOOR_SLAM);
}
this->lifetime_value = 1.f;
@@ -1397,7 +1398,7 @@ void lair_func_80389204(Actor *this)
if (mapSpecificFlags_get(2))
{
func_802BAFE4(0x2C);
gcStaticCamera_activate(0x2C);
fileProgressFlag_set(FILEPROG_21_CC_LOBBY_PIPE_3_RAISED, TRUE);
this->volatile_initialized = TRUE;
@@ -1423,7 +1424,7 @@ void lair_func_80389204(Actor *this)
this->position_y = this->unk1C[1];
func_802D48B8(this);
func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
gcsfx_play(SFX_7F_HEAVYDOOR_SLAM);
this->lifetime_value = 1.f;
}
@@ -1629,7 +1630,7 @@ void func_80389934(Actor *this)
subaddie_set_state_forward(this, 0x17);
actor_playAnimationOnce(this);
FUNC_8030E624(SFX_3F6_RUBBING, 0.6f, 32000);
func_8025A6EC(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
coMusicPlayer_playMusic(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
}
break;
@@ -1792,7 +1793,7 @@ Actor *func_80389E10(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
sp90[2] = sp84[2] + ((sp78[2] - sp84[2]) * randf());
func_802EE6CC(sp90, sp6C, D_80393504, 1, 0.3f, 50.0f, 180, randi2(130, 200), 0);
dustEmitter_emit(sp90, sp6C, D_80393504, 1, 0.3f, 50.0f, 180, randi2(130, 200), DUST_EMITTER_TYPE_DUST);
};
}
return this;
@@ -1885,8 +1886,8 @@ void lair_func_8038A0C4(void)
spawnableActorList_add(&D_80393584, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15);
spawnableActorList_add(&D_803933E4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15);
spawnableActorList_add(&D_80393378, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15);
spawnableActorList_add(&D_803947B0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&D_803947D4, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&JIGSAW_PICTURE_ACTOR, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&JIGSAW_PICTURE_ACTOR_2, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&chBrentilda, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&D_80394A80, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&D_80394AB0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6);