Merge branch 'mr-origin-80'

This commit is contained in:
Banjo Kazooie
2024-09-26 19:10:37 -05:00
170 changed files with 1495 additions and 1305 deletions

View File

@@ -44,11 +44,11 @@ void func_8038BADC(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
if (text_id == ((ActorLocal_lair_5640 *)&this->local)->unk0 + 2) {
if (!fileProgressFlag_get(this->unkF4_8 - 1 + FILEPROG_E9_HEALED_BY_BRENTILDA_1)) {
if (item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)) {
func_80311480(0x10A2, 0xF, this->position, this->marker, func_8038BADC, lair_func_8038BA88);
gcdialog_showText(ASSET_10A2_TEXT_UNKNOWN, 0xF, this->position, this->marker, func_8038BADC, lair_func_8038BA88);
return;
}
}
func_80311480(0xD38, 0xC, this->position, this->marker, func_8038BADC, NULL);
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 0xC, this->position, this->marker, func_8038BADC, NULL);
return;
}
subaddie_set_state(this, 1);
@@ -143,10 +143,10 @@ void chBrentilda_update(Actor *this) {
if (phi_f2 < 500.0) {
if (sp74 < 0xFF) {
sp74 = (sp74 + 0xC < 0xFF) ? sp74 + 0xC : 0xFF;
if (!this->is_first_encounter) {
if (!this->has_met_before) {
comusic_playTrack(COMUSIC_81_ACTIVATING_BRENTILDA);
func_80324D2C(1.0f, COMUSIC_81_ACTIVATING_BRENTILDA);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
this->unk138_23 = FALSE;
}
}
@@ -159,7 +159,7 @@ void chBrentilda_update(Actor *this) {
comusic_playTrack(COMUSIC_8B_DEACTIVATE_BRENTILDA);
func_80324D2C(1.0f, COMUSIC_8B_DEACTIVATE_BRENTILDA);
this->unk138_23 = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
}
}
}
@@ -182,7 +182,7 @@ void chBrentilda_update(Actor *this) {
&& func_8028F20C()
&& !func_803114B0()) {
if (!fileProgressFlag_get(FILEPROG_96_MET_BRENTILDA)) {
func_80311480(ASSET_10A1_DIALOG_BRENTILDA_MEET, 0xA, this->position, this->marker, func_8038BADC, NULL);
gcdialog_showText(ASSET_10A1_DIALOG_BRENTILDA_MEET, 0xA, this->position, this->marker, func_8038BADC, NULL);
fileProgressFlag_set(FILEPROG_96_MET_BRENTILDA, TRUE);
subaddie_set_state(this, 2);
return;

View File

@@ -184,7 +184,7 @@ void func_8038AC7C(Actor *this) {
if (35.0 < this->lifetime_value) {
sp2C = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFB7 : 0xFAE;
sp28 = (fileProgressFlag_get(FILEPROG_CF_HAS_ENTERED_FINAL_FIGHT)) ? 0xFBC : 0xFB7;
if (func_80311480(sp2C + this->unk38_31, 0, NULL, NULL, NULL, NULL)) {
if (gcdialog_showText(sp2C + this->unk38_31, 0, NULL, NULL, NULL, NULL)) {
this->unk38_31++;
this->lifetime_value = 0.0f;
if (sp2C + this->unk38_31 >= sp28) {
@@ -256,7 +256,7 @@ void chWarpCauldron_update(Actor *this) {
}
if (!fileProgressFlag_get(FILEPROG_F5_COMPLETED_A_WARP_CAULDRON_SET) && fileProgressFlag_get(chWarpCauldron_getPairedFileProgressFlagIndex(this))) {
if (func_802D677C(-1) != map_get()) {
func_80311480(0xF7A, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_F7A_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
fileProgressFlag_set(FILEPROG_F5_COMPLETED_A_WARP_CAULDRON_SET, 1);
}
}
@@ -278,7 +278,7 @@ void chWarpCauldron_update(Actor *this) {
phi_a0 = (fileProgressFlag_get(chWarpCauldron_getPairedFileProgressFlagIndex(this)) != 0) ? SFX_107_CAULDRON_ACTIVATION_1 : SFX_108_CAULDRON_ACTIVATION_2;
sfxsource_play(phi_a0, 32000);
if (!fileProgressFlag_get(FILEPROG_F5_COMPLETED_A_WARP_CAULDRON_SET) && !fileProgressFlag_get(chWarpCauldron_getPairedFileProgressFlagIndex(this))) {
func_80311480(0xF79, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_F79_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
}
if (fileProgressFlag_get(chWarpCauldron_getPairedFileProgressFlagIndex(this))){
switch(this->unkF4_8){
@@ -323,7 +323,7 @@ void chWarpCauldron_update(Actor *this) {
for(sp3C = 0; D_803936E4[sp3C] < temp_f0; sp3C++)
;
this->unk38_0 = (sp3C & 1) ? TRUE : FALSE;
this->unk38_0 = BOOL(sp3C & 1);
if (actor_animationIsAt(this, 0.95f)) {
func_8038A704(this);
fileProgressFlag_set(chWarpCauldron_getFileProgressFlagIndex(this), 1);
@@ -385,7 +385,7 @@ void chWarpCauldron_update(Actor *this) {
case 6: //L8038B64C
if (func_8038A690(this) && !fileProgressFlag_get(FILEPROG_F3_MET_DINGPOT)) {
func_80311480(0xFAD, 0xA, this->position, NULL, __chWarpCauldron_dingpotDialogCallback, NULL);
gcdialog_showText(ASSET_FAD_TEXT_UNKNOWN, 0xA, this->position, NULL, __chWarpCauldron_dingpotDialogCallback, NULL);
}
this->unk38_0 = TRUE;
@@ -435,7 +435,7 @@ Actor *chWarpCauldron_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx)
this = marker_getActor(marker);
if(this->modelCacheIndex == ACTOR_23B_WARP_CAULDRON) {
func_8033A45C(3, this->unk38_0 ? TRUE : FALSE);
func_8033A45C(3, BOOL(this->unk38_0));
func_8033A45C(4, this->unk38_0 ? FALSE : TRUE);
}
this = actor_draw(marker, gfx, mtx, vtx);

View File

@@ -382,7 +382,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_UNKNOWN, 0.5f, this->alpha_124_19*0x25 + 0x3840);
func_8030E6A4(SFX_3F6_RUBBING, 0.5f, this->alpha_124_19*0x25 + 0x3840);
}
}
}
@@ -390,7 +390,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_UNKNOWN, 0.5f, 24000, this->position, 100, 2300);
FUNC_8030E8B4(SFX_3F6_RUBBING, 0.5f, 24000, this->position, 100, 2300);
}
}
@@ -873,7 +873,7 @@ void func_803880BC(Actor *this)
__spawnQueue_add_1((GenFunction_1)func_80387E94, reinterpret_cast(s32, this->marker));
if (volatileFlag_get(VOLATILE_FLAG_BC_WITCH_SWITCH_PRESSED_CC) && !fileProgressFlag_get(FILEPROG_9A_CC_WITCH_SWITCH_PRESSED))
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.75f, 30000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.75f, 30000);
}
if (fileProgressFlag_get(FILEPROG_9B_LAIR_CC_WITCH_SWITCH_EYES_ACTIVE))
@@ -1628,7 +1628,7 @@ void func_80389934(Actor *this)
{
subaddie_set_state_forward(this, 0x17);
actor_playAnimationOnce(this);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.6f, 32000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.6f, 32000);
func_8025A6EC(COMUSIC_3D_JIGGY_SPAWN, 0x7FFF);
}

View File

@@ -1234,7 +1234,7 @@ void lair_func_8038E0B0(void) {
func_802FACA4(0x16);
if (sp38 != FFTT_0_NIL) {
sp28 = sp38 - 1 + FILEPROG_55_FF_BK_SQUARE_INSTRUCTIONS;
if (!fileProgressFlag_get(sp28) && func_80311480(sp38 + 0x101E, 0, NULL, NULL, NULL, NULL)) {
if (!fileProgressFlag_get(sp28) && gcdialog_showText(sp38 + 0x101E, 0, NULL, NULL, NULL, NULL)) {
fileProgressFlag_set(sp28, TRUE);
}
if ((sp38 == FFTT_6_SKULL) && (item_getCount(ITEM_16_LIFE) == 1)) {

View File

@@ -197,7 +197,7 @@ void func_8038EFD8(Actor *this) {
f32 sp30[3];
f32 sp24[3];
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
player_getPosition(sp30);
sp24[0] = this->position[0];
sp24[1] = this->position[1];
@@ -262,7 +262,7 @@ void func_8038F250(Actor *this){
&& !func_8038EB58(this)
&& !fileProgressFlag_get(FILEPROG_DF_CAN_REMOVE_ALL_PUZZLE_PIECES)
) {
if (func_80311480(0xF7C, 2, NULL, NULL, NULL, NULL)) {
if (gcdialog_showText(0xF7C, 2, NULL, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_DF_CAN_REMOVE_ALL_PUZZLE_PIECES, TRUE);
}
} else if ((this->unkF4_8 >= 3)
@@ -270,7 +270,7 @@ void func_8038F250(Actor *this){
&& !func_8038EB58(this)
&& !fileProgressFlag_get(FILEPROG_E0_CAN_PLACE_ALL_PUZZLE_PIECES)
){
if(func_80311480(0xF7D, 2, NULL, NULL, NULL, NULL)) {
if(gcdialog_showText(0xF7D, 2, NULL, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_E0_CAN_PLACE_ALL_PUZZLE_PIECES, TRUE);
}
}
@@ -300,10 +300,10 @@ void func_8038F350(Actor *this, s32 next_state){
func_803115C4(0xF80);
func_803115C4(0xF7F);
if (item_getCount(ITEM_26_JIGGY_TOTAL) > 0) {
func_80311480(fileProgressFlag_get(FILEPROG_16_STOOD_ON_JIGSAW_PODIUM) ? 0xF5A : 0xF59, 6, sp50, this->marker, func_8038F078, NULL);
gcdialog_showText(fileProgressFlag_get(FILEPROG_16_STOOD_ON_JIGSAW_PODIUM) ? 0xF5A : 0xF59, 6, sp50, this->marker, func_8038F078, NULL);
fileProgressFlag_set(FILEPROG_17_HAS_HAD_ENOUGH_JIGSAW_PIECES, 1);
} else {
func_80311480(0xF58, 6, sp50, this->marker, func_8038F078, NULL);
gcdialog_showText(0xF58, 6, sp50, this->marker, func_8038F078, NULL);
}
fileProgressFlag_set(FILEPROG_16_STOOD_ON_JIGSAW_PODIUM, 1);
fileProgressFlag_set(FILEPROG_A7_NEAR_PUZZLE_PODIUM_TEXT, 1);
@@ -395,7 +395,7 @@ void lair_func_8038F894(Actor *this, s32 arg1) {
func_8038F350(this, 1);
return;
}
func_80311480(0xFBC, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xFBC, 4, NULL, NULL, NULL, NULL);
fileProgressFlag_set(FILEPROG_DE_USED_ALL_YOUR_PUZZLE_PIECES, 1);
}
@@ -421,7 +421,7 @@ void lair_func_8038F924(Actor *this) {
local->unk0 = 0;
local->unk4 = 0;
local->unk8 = (func_8038ECA8(this->marker)) ? 0xff : 1;
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
for(phi_v1 = 0; phi_v1 < sp64; phi_v1 ++){
local->unk4++;
local->unk0 |= (1 << func_8038F0EC(this));
@@ -473,20 +473,20 @@ void lair_func_8038F924(Actor *this) {
func_8038EDBC(this);
switch(this->state){
case 1://L8038FCD0
if (!this->is_first_encounter && (!func_8028F20C() || !func_8028FB48(0x08000000))) {
this->is_first_encounter = TRUE;
if (!this->has_met_before && (!func_8028F20C() || !func_8028FB48(0x08000000))) {
this->has_met_before = TRUE;
}
if (func_80329530(this, 300)) {
if ((this->unkF4_8 == 0xA) && !fileProgressFlag_get(FILEPROG_F6_SEEN_DOOR_OF_GRUNTY_PUZZLE_PODIUM)) {
phi_a0 = (item_getCount(ITEM_26_JIGGY_TOTAL) < D_803947F8[this->unkF4_8 - 1].cost) ? 0xFAB : 0xFC0;
if (func_80311480(phi_a0, 0, NULL, NULL, NULL, NULL)) {
if (gcdialog_showText(phi_a0, 0, NULL, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_F6_SEEN_DOOR_OF_GRUNTY_PUZZLE_PODIUM, TRUE);
}
} else if (this->unkF4_8 == 1) {
func_8035644C(FILEPROG_A7_NEAR_PUZZLE_PODIUM_TEXT);
}
}
if (func_8038ECA8(this->marker) && this->is_first_encounter && !func_8038EB58(this) && (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)) {
if (func_8038ECA8(this->marker) && this->has_met_before && !func_8038EB58(this) && (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)) {
func_8038F350(this, 2);
}
break;

View File

@@ -64,7 +64,7 @@ void func_80390174(ActorMarker *marker, s32 arg1) {
sp28 = this->marker->id - 0x16D;
func_8028F94C(2, this->position);
if (fileProgressFlag_get(sp28 + 0xAD)) {
func_80311480(sp28 + 0xF83, 0xE, this->position, this->marker, func_803900EC, lair_func_803900DC);
gcdialog_showText(sp28 + 0xF83, 0xE, this->position, this->marker, func_803900EC, lair_func_803900DC);
return;
}
func_80311174(func_80390084() + 0xFA5, 0xE, this->position, this->marker, func_803900EC, lair_func_803900DC, func_80390158);
@@ -91,11 +91,11 @@ void func_803902B8(Actor *this) {
sp54 = this->marker->id - 0x16D;
if (!this->initialized) {
marker_setFreeMethod(this->marker, func_80390298);
this->is_first_encounter = volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE);
this->has_met_before = volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE);
this->initialized = TRUE;
}
_player_getPosition(sp5C);
sp58 = func_80259384(this->position, sp5C, 1750.0f) && !this->is_first_encounter;
sp58 = func_80259384(this->position, sp5C, 1750.0f) && !this->has_met_before;
if (sp58 && !this->unk38_0) {
func_8032BB88(this, 0, 0x1F4);
func_8025A6EC(COMUSIC_79_CHEATO, 0);

View File

@@ -56,7 +56,7 @@ void func_80390890(ActorMarker *marker, ActorMarker *other_marker) {
func_8030E878(SFX_C2_GRUBLIN_EGH, local->unkC_27*0.1 + 0.8, 32000, this->position, 1250.0f, 2500.0f);
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]));
actor_collisionOff(this);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
void func_80390994(Actor *this) {

View File

@@ -164,8 +164,8 @@ void func_80391810(Actor *this, s32 next_state) {
local = (ActorLocal_lair_AD70 *)&this->local;
switch (next_state) {
case 1:
sp34 = (this->position[1] + this->unk28) - this->unk1C[1];
this->velocity[1] = gu_sqrtf(this->unk28 * 2000.0);
sp34 = (this->position[1] + this->actor_specific_1_f) - this->unk1C[1];
this->velocity[1] = gu_sqrtf(this->actor_specific_1_f * 2000.0);
local->unk0 = -this->velocity[1] / -1000.0f;
local->unk0 += gu_sqrtf((sp34 * -2.0) / -1000.0);
this->velocity[0] = this->unk1C[0] - this->position[0];
@@ -263,9 +263,9 @@ void func_80391B04(Actor *this) {
func_80391810(this, 2);
}
}
if ((local->unk8 < this->position[1]) && !this->is_first_encounter) {
if ((local->unk8 < this->position[1]) && !this->has_met_before) {
FUNC_8030E8B4(SFX_14E_SOFT_EXPLOSION, 1.0f, 20000, this->position, 1500, 3000);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
break;
case 3:
@@ -296,7 +296,7 @@ void func_80391EA8(ActorMarker *marker, ActorMarker *a1, f32 a2[3], f32 f1, f32
actor->unk1C[1] = a2[1];
actor->unk1C[2] = a2[2];
actor->unk28 = f1;
actor->actor_specific_1_f = f1;
actor->yaw_ideal = randf2( 240, 480);
actor->unk6C = randf2(-240, -480);

View File

@@ -55,11 +55,11 @@ void func_80392690(ActorMarker *marker, enum asset_e text_id, s32 arg2){
void func_80392700(Actor *this) {
if (mapSpecificFlags_get(4)) {
if (fileProgressFlag_get(FILEPROG_F4_ENTER_FF_CUTSCENE)) {
func_80311480(0x1031, 0xF, this->position, this->marker, func_80392664, func_80392610);
gcdialog_showText(0x1031, 0xF, this->position, this->marker, func_80392664, func_80392610);
} else {
func_802BC280();
ncStaticCamera_setToNode(0x1F);
func_80311480(0x102C, 0xE, this->position, this->marker, func_80392664, func_80392610);
gcdialog_showText(0x102C, 0xE, this->position, this->marker, func_80392664, func_80392610);
fileProgressFlag_set(FILEPROG_F4_ENTER_FF_CUTSCENE, TRUE);
}
mapSpecificFlags_set(4, 0);
@@ -70,7 +70,7 @@ void func_80392700(Actor *this) {
ncStaticCamera_setToNode(9);
mapSpecificFlags_set(9, 1);
func_8028F94C(2, this->position);
func_80311480(0x103F, 0x2A, this->position, this->marker, func_80392690, func_80392610);
gcdialog_showText(0x103F, 0x2A, this->position, this->marker, func_80392690, func_80392610);
mapSpecificFlags_set(6, 0);
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
actor_playAnimationOnce(this);
@@ -104,8 +104,8 @@ void func_80392918(Actor *this) {
return;
}
func_80326224(this);
if ((this->unk48 > 0.5) && !this->is_first_encounter) {
this->is_first_encounter = TRUE;
if ((this->unk48 > 0.5) && !this->has_met_before) {
this->has_met_before = TRUE;
ncStaticCamera_setToNode(0x1E);
}
if ((0.999 < this->unk48) && !this->unk38_0) {

View File

@@ -22,7 +22,7 @@ void func_80392AF4(ActorMarker *marker, enum asset_e text_id, s32 arg2){
void func_80392B1C(ActorMarker *marker) {
func_8028E6EC(0);
func_80311480(0x1040, 8, NULL, marker, func_80392AB0, func_80392AF4);
gcdialog_showText(0x1040, 8, NULL, marker, func_80392AB0, func_80392AF4);
}
void func_80392B6C(Actor *this) {