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

@@ -89,7 +89,7 @@ void __chgrublinhood_die(ActorMarker* marker, s32 arg1) {
__chgrublinhood_emitHat(pCtrl, actor, ASSET_52D_MODEL_GRUBLIN_HOOD_HAT);
__spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32,actor->position_x), reinterpret_cast(s32,actor->position_y), reinterpret_cast(s32,actor->position_z));
actor_collisionOff(actor);
actor->is_first_encounter = TRUE;
actor->has_met_before = TRUE;
}
Actor *chgrublinhood_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
@@ -109,7 +109,7 @@ Actor *chgrublinhood_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C(11, (local->season < AUTUMN) ? 0 : (local->season == AUTUMN) ? 1 : 2);
func_8033A45C(12, (local->season == WINTER) ? 2 : 1);
func_8033A45C(13, (local->season == WINTER) ? 1 : 0);
func_8033A45C(14, (this->is_first_encounter)? FALSE : TRUE);
func_8033A45C(14, (this->has_met_before)? FALSE : TRUE);
return actor_draw(marker, gfx, mtx, vtx);
}

View File

@@ -37,7 +37,7 @@ void chVacationTextTrigger_update(Actor* this) {
// Start dialog if player is within trigger
if (__playerIsWithinTrigger(0, -107, 188) != 0) {
func_80311480(0xDA9, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xDA9, 4, NULL, NULL, NULL, NULL);
volatileFlag_set(VOLATILE_FLAG_13_HAS_TRIGGERED_MUMBO_VACATION_TEXT, 1);
}
}

View File

@@ -122,7 +122,7 @@ void CCW_func_80387A40(Actor *this) {
player_getPosition(sp44);
if (sp44[2] > -600.0f) {
if (!local->unk4->unk3 || !jiggyscore_isCollected(local->unk4->unk3) ) {
func_80311480(local->unk4->unk4, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(local->unk4->unk4, 4, NULL, NULL, NULL, NULL);
mapSpecificFlags_set(local->unk4->unk2, TRUE);
}
}

View File

@@ -45,9 +45,9 @@ void func_803865F4(Actor *this, s32 next_state) {
local->unkC = 0.0f;
if (next_state == 2) {
if (!volatileFlag_getAndSet(VOLATILE_FLAG_B5, 1)) {
func_80311480(0xCE2, 4, NULL, this->marker, func_803865C4, NULL);
gcdialog_showText(0xCE2, 4, NULL, this->marker, func_803865C4, NULL);
} else {
func_80311480(0xCE3, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCE3, 4, NULL, NULL, NULL, NULL);
func_803865F4(this, 3);
return;
}
@@ -65,7 +65,7 @@ void func_803865F4(Actor *this, s32 next_state) {
volatileFlag_set(VOLATILE_FLAG_3, 0);
volatileFlag_set(VOLATILE_FLAG_5_FF_MINIGAME_WON, 1);
} else {
func_80311480(0xCE4, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCE4, 4, NULL, NULL, NULL, NULL);
func_8025A58C(-1, 400);
comusic_8025AB44(COMUSIC_4B_CCW_ZUBBA_FIGHT, 0, 400);
func_8025AABC(COMUSIC_4B_CCW_ZUBBA_FIGHT);

View File

@@ -48,7 +48,7 @@ void CCW_func_8038868C(Actor *this, s32 next_state) {
}
if (next_state == 2) {
if (local->unk0->unk4 != 0) {
func_80311480(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
}
skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
@@ -73,7 +73,7 @@ void CCW_func_8038868C(Actor *this, s32 next_state) {
}
if (next_state == 5) {
if (local->unk0->unk6 != 0) {
func_80311480((s32) local->unk0->unk6, 4, NULL, NULL, NULL, NULL);
gcdialog_showText((s32) local->unk0->unk6, 4, NULL, NULL, NULL, NULL);
}
skeletalAnim_set(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.23f, 0.5f);
timed_setStaticCameraToNode(0.0f, 3);
@@ -137,7 +137,7 @@ void chGobiCCW_update(Actor *this) {
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE;
this->marker->actorFreeFunc = chGobiCCW_free;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
local->unk4 = skeletalAnim_new();
local->spit_model = assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT);
marker_setCollisionScripts(this->marker, 0, func_8038894C, 0);
@@ -159,13 +159,13 @@ void chGobiCCW_update(Actor *this) {
return;
}
if(this->state == 1){
if (!this->is_first_encounter) {
if (!this->has_met_before) {
player_getPosition(sp48);
if (ml_distance_vec3f(this->position, sp48) < 600.0f) {
if (local->unk0->unk2 != 0) {
func_80311480((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
gcdialog_showText((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
}
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}
}

View File

@@ -153,14 +153,14 @@ void func_803897B8(Actor *this, s32 next_state) {
skeletalAnim_set(this->unk148, local->unk0->unk14, 0.5f, 8.5f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
if (local->unk0->map_id == MAP_43_CCW_SPRING) {
func_80311480(0xCD6, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCD6, 4, NULL, NULL, NULL, NULL);
skeletalAnim_setCallback_0(this->unk148, 0.65f, &func_80389798);
}
if (local->unk0->map_id == MAP_44_CCW_SUMMER) {
func_80311480(0xCD9, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCD9, 4, NULL, NULL, NULL, NULL);
}
if (local->unk0->map_id == MAP_45_CCW_AUTUMN) {
func_80311480(0xCDB, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCDB, 4, NULL, NULL, NULL, NULL);
}
local->unk8 = local->unk0->unk18;
}
@@ -214,7 +214,7 @@ void CCW_func_80389BFC(Actor *this) {
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
this->position[0] = -4900.0f;
this->position[1] = 4619.0f;
this->position[2] = 0.0f;
@@ -253,12 +253,12 @@ void CCW_func_80389BFC(Actor *this) {
}
if (this->state == 1) {
player_getPosition(sp4C);
if( !this->is_first_encounter
if( !this->has_met_before
&& (local->unkC[2] >= 6500)
&& (sp4C[2] < 6500.0f)
&& (local->unk0->unk28 != 0)
){
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
func_80324E38(0.0f, 3);
timed_setStaticCameraToNode(0.0f, local->unk0->unk24);
func_80324DBC(0.0f, local->unk0->unk28, 6, NULL, this->marker, func_80389700, NULL);
@@ -271,10 +271,10 @@ void CCW_func_80389BFC(Actor *this) {
}
if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) {
func_8028F364(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this);
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (func_8028FC34() != 0)) {
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
func_8028FA54(D_8038FDE0);
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
func_80311480(0xCD8, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);
}
local->unk4++;
if (local->unk4 < local->unk0->unk25) {

View File

@@ -153,7 +153,7 @@ void chcaterpillar_update(Actor *this){
if(ml_distance_vec3f(this->position, sp74) < 50.0f){
func_8028F030(ACTOR_2A2_CATERPILLAR);
if(!volatileFlag_get(VOLATILE_FLAG_B2)){
func_80311480(0xcc7, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_CC7_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
volatileFlag_set(VOLATILE_FLAG_B2, TRUE);
}
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 0x1f4, 0x9c4);

View File

@@ -44,7 +44,7 @@ void func_8038A950(Actor *this, s32 next_state) {
skeletalAnim_set(this->unk148, 0x199, 0.0f, 6.5f);
}
if (next_state == 2) {
func_80311480(0xCDC, 0xA, this->position, this->marker, func_8038A920, NULL);
gcdialog_showText(0xCDC, 0xA, this->position, this->marker, func_8038A920, NULL);
}
if (next_state == 3) {
skeletalAnim_set(this->unk148, 0x19A, 0.0f, 7.0f);

View File

@@ -28,7 +28,7 @@ Struct_CCW_4960_0 D_8038F254[] = {
/* .code */
void func_8038AD50(Actor *this, s32 next_state) {
if (next_state == 2) {
func_80311480(0xCDD, 0, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCDD, 0, NULL, NULL, NULL, NULL);
if (this->state == 1) {
mapSpecificFlags_set(6, 0);
timed_setStaticCameraToNode(0.0f, 1);

View File

@@ -61,7 +61,7 @@ void func_8038B19C(Actor *this) {
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
func_8038B0F0(this, 1);
}
@@ -88,9 +88,9 @@ void func_8038B19C(Actor *this) {
func_8038B0F0(this, 1);
}
}
if (!this->is_first_encounter && func_803292E0(this)) {
this->is_first_encounter = TRUE;
func_80311480(0xCC8, 0, NULL, NULL, NULL, NULL);
if (!this->has_met_before && func_803292E0(this)) {
this->has_met_before = TRUE;
gcdialog_showText(0xCC8, 0, NULL, NULL, NULL, NULL);
}
func_8028E668(this->position, 300.0f, -50.0f, 120.0f);
}

View File

@@ -87,12 +87,12 @@ void func_8038B814(Actor *this, s32 next_state) {
void func_8038B87C(Actor *this) {
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
func_8038B814(this, 1);
}
if (!this->is_first_encounter && func_803292E0(this)) {
this->is_first_encounter = TRUE;
func_80311480(0xCC9, 0, NULL, NULL, NULL, NULL);
if (!this->has_met_before && func_803292E0(this)) {
this->has_met_before = TRUE;
gcdialog_showText(0xCC9, 0, NULL, NULL, NULL, NULL);
}
func_8028E668(this->position, 300.0f, -50.0f, 120.0f);
}

View File

@@ -49,7 +49,7 @@ void chnabnut_setState(Actor *this, s32 next_state) {
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_80324E38(0.0f, 3);
timed_setStaticCameraToNode(0.0f, 0xB);
func_80311480(0xCCC, 0x20, this->position, NULL, NULL, NULL);
gcdialog_showText(0xCCC, 0x20, this->position, NULL, NULL, NULL);
}
if (next_state == NABNUT_STATE_4_THANK_PLAYER) {
@@ -121,7 +121,7 @@ void chnabnut_update(Actor *this) {
D_8038F350[1] = this->position[1];
D_8038F350[2] = this->position[2];
if (this->state == 0) {
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
local->returned_acorn_count = NULL;
}
chnabnut_setState(this, 1);
@@ -133,23 +133,23 @@ void chnabnut_update(Actor *this) {
if (this->state == NABNUT_STATE_1_SAD) {
player_getPosition(sp30);
if (!this->is_first_encounter && (ml_distance_vec3f(this->position, sp30) < 400.0f)) {
this->is_first_encounter = TRUE;
func_80311480(0xCCA, 0xE, this->position, NULL, NULL, NULL);
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp30) < 400.0f)) {
this->has_met_before = TRUE;
gcdialog_showText(0xCCA, 0xE, this->position, NULL, NULL, NULL);
}
if (item_getCount(ITEM_23_ACORNS) > 0) {
func_80258A4C(this->position, this->yaw - 90.0f, sp30, &sp2C, &sp28, &sp24);
this->yaw += sp24 * 10.0f;
}
if (this->is_first_encounter && !func_803114B0()) {
if (this->has_met_before && !func_803114B0()) {
func_8028F364(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && func_8028FC34()) {
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
func_8028FA54(D_8038F350);
local->returned_acorn_count++;
if (local->returned_acorn_count == 6) {
chnabnut_setState(this, NABNUT_STATE_2_WAIT);
} else if (item_getCount(ITEM_23_ACORNS) == 1) {
func_80311480(0xCCB, 0x20, this->position, NULL, NULL, NULL);
gcdialog_showText(0xCCB, 0x20, this->position, NULL, NULL, NULL);
}
}
}

View File

@@ -93,7 +93,7 @@ void func_8038C41C(Actor *this) {
if (!this->volatile_initialized) {
this->marker->propPtr->unk8_3 = TRUE;
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
return;
}
@@ -114,9 +114,9 @@ void func_8038C41C(Actor *this) {
if ((this->marker->id == 0x1CB) && (this->state == 2)) {
player_getPosition(sp2C);
if (!this->is_first_encounter && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) {
this->is_first_encounter = TRUE;
func_80311480(0xCCD, 0, NULL, NULL, NULL, NULL);
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) {
this->has_met_before = TRUE;
gcdialog_showText(0xCCD, 0, NULL, NULL, NULL, NULL);
}
}
}

View File

@@ -91,7 +91,7 @@ void func_8038CC4C(Actor *this) {
if (!this->volatile_initialized) {
this->marker->propPtr->unk8_3 = TRUE;
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
local->unk0 = &D_8038F490[0];
while(local->unk0->map_id != 0 && map_get() != local->unk0->map_id){
local->unk0++;
@@ -113,12 +113,12 @@ void func_8038CC4C(Actor *this) {
this->yaw += 30.0f * sp44;
}
}
if (!this->is_first_encounter) {
if (!this->has_met_before) {
player_getPosition(sp38);
if (ml_distance_vec3f(this->position, sp38) < 900.0f) {
if (local->unk0->map_id != MAP_46_CCW_WINTER || func_8028F2FC()) {
func_80311480(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
this->is_first_encounter = TRUE;
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
this->has_met_before = TRUE;
}
}
}

View File

@@ -61,7 +61,7 @@ void func_8038CEB0(Actor *this, s32 next_state) {
this->marker->propPtr->unk8_3 = FALSE;
skeletalAnim_set(this->unk148, 0x1A7, 0.2f, 3.0f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_80311480(0xCD0, 0x24, NULL, NULL, NULL, NULL);
gcdialog_showText(0xCD0, 0x24, NULL, NULL, NULL, NULL);
}
if (next_state == 3) {
skeletalAnim_set(this->unk148, 0x1A8, 0.2f, 0.5f);
@@ -82,7 +82,7 @@ void func_8038CFB4(Actor *this) {
if (!this->volatile_initialized) {
this->marker->propPtr->unk8_3 = TRUE;
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
func_8038CEB0(this, 1);
if (jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY) != 0) {
levelSpecificFlags_set(0x25, 1);
@@ -114,11 +114,11 @@ void func_8038CFB4(Actor *this) {
}
if (this->state == 1) {
if (!this->is_first_encounter) {
if (!this->has_met_before) {
player_getPosition(sp60);
if (ml_distance_vec3f(this->position, sp60) < 900.0f) {
func_80311480(0xCCF, 4, NULL, NULL, NULL, NULL);
this->is_first_encounter = TRUE;
gcdialog_showText(0xCCF, 4, NULL, NULL, NULL, NULL);
this->has_met_before = TRUE;
}
}
if (levelSpecificFlags_get(0x25) != 0) {

View File

@@ -53,7 +53,7 @@ void func_8038D368(Actor *this) {
if (!this->volatile_initialized) {
this->marker->propPtr->unk8_3 = TRUE;
this->volatile_initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
local->unk0 = D_8038F600;
while (local->unk0->map != 0 && map_get() != local->unk0->map) {
local->unk0++;
@@ -66,17 +66,17 @@ void func_8038D368(Actor *this) {
return;
}
if(!this->is_first_encounter){
if(!this->has_met_before){
player_getPosition(plyr_pos);
if (ml_distance_vec3f(this->position, plyr_pos) < 600.0f) {
if (!jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY)) {
func_80311480(local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
} else {
if (local->unk0->unk4) {
func_80311480(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
}
}
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}