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

@@ -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

@@ -62,7 +62,7 @@ void chBeehive_update(Actor *this){
){
if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){
if( player_getTransformation() == TRANSFORM_1_BANJO
&& func_80311480(ASSET_D96_DIALOG_BEEHIVE_MEET, 0, NULL, NULL, NULL, 0)
&& gcdialog_showText(ASSET_D96_DIALOG_BEEHIVE_MEET, 0, NULL, NULL, NULL, 0)
){
fileProgressFlag_set(FILEPROG_D_BEEHIVE_TEXT, 1);
}

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);
@@ -121,7 +121,7 @@ void func_802C6240(Actor *this){
this->marker->dieFunc = func_802C61C0;
this->marker->collisionFunc = func_802C60AC;
this->marker->collision2Func = func_802C6150;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
this->unk16C_0 = 1;
this->initialized = TRUE;
return;
@@ -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 = sfxsource_createSfxsourceAndReturnIndex();
@@ -259,12 +260,12 @@ 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);
this->unk44_31 = 0;
func_8030E484(SFX_19_BANJO_LANDING_08);
sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08);
}
}//L802C6B1C
break;

View File

@@ -405,7 +405,7 @@ void chBottlesBonus_lose(u8 *arg0, enum asset_e text_id) {
*arg0 = 1;
timedFunc_set_0(2.0f, chBottlesBonusCursor_func_802DF99C);
func_80311714(0);
func_80311480(text_id, 0x86, actor->position, chBottlesBonusMarker, chBottlesBonus_func_802DE224, NULL);
gcdialog_showText(text_id, 0x86, actor->position, chBottlesBonusMarker, chBottlesBonus_func_802DE224, NULL);
func_80311714(1);
}
else{
@@ -424,7 +424,7 @@ void chBottlesBonus_completedPuzzle(void) {
actor = marker_getActor(chBottlesBonusMarker);
D_8037DCC0[chBottleBonusPuzzleIndex] = TRUE;
func_80311714(0);
func_80311480(D_803681A0[chBottleBonusPuzzleIndex + 1].text_id, 0x86, actor->position, chBottlesBonusMarker, chBottlesBonus_IncrementPuzzle, NULL);
gcdialog_showText(D_803681A0[chBottleBonusPuzzleIndex + 1].text_id, 0x86, actor->position, chBottlesBonusMarker, chBottlesBonus_IncrementPuzzle, NULL);
func_80311714(1);
}
@@ -521,7 +521,7 @@ void chBottlesBonus_update(Actor *this) {
func_8025A7DC(COMUSIC_98_BBONUS_PIECES_SHUFFLE);
if (D_8037DCC7 == 0) {
func_80311714(0);
func_80311480(0xE24, 0x87, this->position, chBottlesBonusMarker, chBottlesBonus_startTimer, NULL);
gcdialog_showText(ASSET_E24_TEXT_UNKNOWN, 0x87, this->position, chBottlesBonusMarker, chBottlesBonus_startTimer, NULL);
func_80311714(1);
D_8037DCC7 = 1;
}

View File

@@ -320,7 +320,7 @@ void chBottlesBonusCursor_update(Actor *this) {
held_piece = &D_8037E248[D_8037E5C0.unk0];
held_piece->state = 2;
chBottlesBonusCursor_func_802DF928(D_8037E5C0.unk0);
func_8030E484(SFX_112_TINKER_ATTENTION);
sfxsource_playHighPriority(SFX_112_TINKER_ATTENTION);
subaddie_set_state_with_direction(this, 2, 0.0f, 1);
}
}

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);
}
}
@@ -239,7 +239,7 @@ void chCrab_update(Actor *this) {
marker_setCollisionScripts(this->marker, __chCrab_touch, __chCrab_ow, __chCrab_die);
func_803300C0(this->marker, &__chCrab_802CB76C);
this->unk124_0 = this->unk138_31 = FALSE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
this->volatile_initialized = TRUE;
animctrl_setTransitionDuration(this->animctrl, 0.25f);
if (map_get() == MAP_A_TTC_SANDCASTLE) {
@@ -270,10 +270,10 @@ void chCrab_update(Actor *this) {
&& !func_8028ECAC()
) {
if ((this->state != 6) && (this->state != 5)) {
func_80311480(ASSET_D32_DIALOG_MUTANT_CRAB_MEET, 0xF, this->position, NULL, __chCrab_mutantTextCallback, NULL);
gcdialog_showText(ASSET_D32_DIALOG_MUTANT_CRAB_MEET, 0xF, this->position, NULL, __chCrab_mutantTextCallback, NULL);
mapSpecificFlags_set(0, TRUE);
levelSpecificFlags_set(0xE, TRUE);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}
if (map_get() == MAP_A_TTC_SANDCASTLE) {
@@ -283,17 +283,17 @@ void chCrab_update(Actor *this) {
&& !jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)
&& func_80329530(this, 1600)
) {
func_80311480(0xA12, 4, this->position, NULL, NULL, NULL);
gcdialog_showText(0xA12, 4, this->position, NULL, NULL, NULL);
mapSpecificFlags_set(0, TRUE);
} else if (mapSpecificFlags_get(1)) {
func_80311480(0xA13, 4, this->position, NULL, NULL, NULL);
gcdialog_showText(0xA13, 4, this->position, NULL, NULL, NULL);
mapSpecificFlags_set(1, FALSE);
}
}
if (levelSpecificFlags_get(0xE)) {
if ((this->state != 8) && (this->state != 9)) {
subaddie_set_state_with_direction(this, (this->is_first_encounter) ? 8 : 9, 0.0f, 1);
this->is_first_encounter = FALSE;
subaddie_set_state_with_direction(this, (this->has_met_before) ? 8 : 9, 0.0f, 1);
this->has_met_before = FALSE;
}
}
@@ -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

@@ -79,7 +79,7 @@ ActorInfo D_80365F00 = { 0xE6, 0x197, 0x532, 0x1, D_80365ED0, func_802C4C14, fun
/* .bss */
s32 D_8037DCB0;
s32 mm_hut_smash_count;
u32 D_8037DCB4;
struct FF_StorageStruct* D_8037DCB8;
s32 D_8037DCBC;
@@ -454,7 +454,7 @@ void func_802C4C14(Actor *this){
break;
case 2://L802C5364
timedFunc_set_2(0.15f, (GenFunction_2)sfxsource_play, SFX_32_BANJO_EGHEE, 28000);
sfxsource_play(SFX_3F6_UNKNOWN, 28000);
sfxsource_play(SFX_3F6_RUBBING, 28000);
func_8030E540(SFX_8F_SNOWBALL_FLYING);
break;
}//L802C5394
@@ -462,7 +462,7 @@ void func_802C4C14(Actor *this){
levelSpecificFlags_set(sp84 + 0x35, 1);
}
else{//L802C53B4
func_8030E484(SFX_3EA_UNKNOWN);
sfxsource_playHighPriority(SFX_3EA_UNKNOWN);
subaddie_set_state(this, 3);
}
}else{//L802C53D0

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

@@ -60,7 +60,7 @@ void chgloop_update(Actor *this){
if( !mapSpecificFlags_get(2)
&& func_80329530(this, 350)
&& func_80311480(ASSET_D34_TEXT_GLOOP_MEET, 0, NULL, NULL, NULL, NULL)
&& gcdialog_showText(ASSET_D34_TEXT_GLOOP_MEET, 0, NULL, NULL, NULL, NULL)
){
mapSpecificFlags_set(2, TRUE);
}

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

@@ -46,7 +46,7 @@ void __chJinjo_802CDBA8(ActorMarker *this, ActorMarker *other){
if(actorPtr->state < 5){
if(!fileProgressFlag_get(FILEPROG_E_JINJO_TEXT)){
func_80311480(__chJinjo_getMeetDialogId(actorPtr->marker->id), 4, 0, 0, 0, 0);
gcdialog_showText(__chJinjo_getMeetDialogId(actorPtr->marker->id), 4, 0, 0, 0, 0);
fileProgressFlag_set(FILEPROG_E_JINJO_TEXT, 1);
}
subaddie_set_state_with_direction(actorPtr, 6, 0.0f , -1);

View File

@@ -157,15 +157,15 @@ void chmole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
if( arg1 == moleTable[actor->unkF4_8-9].learn_text
&& item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)
){
func_80311480(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
gcdialog_showText(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
}//L802D9738
else if(arg1 == moleTable[actor->unkF4_8-9].learn_text || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
func_80311480(chmole_learnedAllGameAbilities()? 0xa87 : chmole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, chmole_healthRefill, NULL);
gcdialog_showText(chmole_learnedAllGameAbilities()? 0xa87 : chmole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, chmole_healthRefill, NULL);
}
else{//L802D97BC
if(actor->is_first_encounter){
if(actor->has_met_before){
func_80347A14(1);
actor->is_first_encounter = FALSE;
actor->has_met_before = FALSE;
}
timed_exitStaticCamera(0.0f);
if(actor->state == 5){
@@ -229,7 +229,7 @@ int chmole_learnAbility(Actor *this){
// New Ability: Learn Dialog & Misc Actions
else{
func_80347A14(0);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
sp2C = moleTable[this->unkF4_8-9].learn_text;
ability_unlock(moleTable[this->unkF4_8-9].ability);
switch(moleTable[this->unkF4_8-9].ability){
@@ -242,7 +242,7 @@ int chmole_learnAbility(Actor *this){
break;
}
}//L802D9A9C
func_80311480(sp2C, sp28, this->position, this->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
gcdialog_showText(sp2C, sp28, this->position, this->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
return TRUE;
}
@@ -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,15 +76,15 @@ 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 ) {
if( !this->has_met_before ) {
if(text_index < 4) {
if(func_80311480(0xA1B + text_index, 0, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(0xA1B + text_index, 0, NULL, NULL, NULL, NULL)){
text_index++;
mapSpecificFlags_setN(8, text_index, 3);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}
}
@@ -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);
}
@@ -156,8 +156,8 @@ static void __chsnacker_ow(ActorMarker *marker, ActorMarker *other){
Actor *this;
this = marker_getActor(marker);
if(level_get() == LEVEL_2_TREASURE_TROVE_COVE && !func_8028F22C()){
func_80311480(0xA29, 0, NULL, NULL, NULL, NULL);
if(level_get() == LEVEL_2_TREASURE_TROVE_COVE && !player_isDead()){
gcdialog_showText(0xA29, 0, NULL, NULL, NULL, NULL);
}//L802E10A4
if(this->state == 4){
@@ -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) {
@@ -144,7 +146,7 @@ void __chTermite_testCallback(ActorMarker *caller, enum asset_e text_id, s32 arg
Actor *this;
this = marker_getActor(caller);
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
levelSpecificFlags_set(0xd, FALSE);
}
@@ -157,7 +159,7 @@ void chTermite_update(Actor *this) {
if (!this->volatile_initialized) {
marker_setCollisionScripts(this->marker, NULL, __chTermite_ow, __chTermite_die);
this->unk124_0 = this->unk138_31 = FALSE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
this->unk16C_0 = TRUE;
this->volatile_initialized = TRUE;
}
@@ -168,10 +170,10 @@ void chTermite_update(Actor *this) {
&& func_8028ECAC() == 0
&& player_getTransformation() == TRANSFORM_1_BANJO
) {
func_80311480(ASSET_B43_DIALOG_TERMITE_MEET_AS_BEAR, 7, this->position, this->marker, __chTermite_testCallback, NULL);
gcdialog_showText(ASSET_B43_DIALOG_TERMITE_MEET_AS_BEAR, 7, this->position, this->marker, __chTermite_testCallback, NULL);
mapSpecificFlags_set(0, TRUE);
levelSpecificFlags_set(0xD, TRUE);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
if( func_80329530(this, 300)
@@ -180,11 +182,11 @@ void chTermite_update(Actor *this) {
&& player_getTransformation() == TRANSFORM_2_TERMITE
) {
if (!levelSpecificFlags_get(0xB)) {
if (func_80311480(ASSET_B41_DIALOG_TERMITE_COOL_SHORTS, 0, NULL, NULL, NULL, NULL)) {
if (gcdialog_showText(ASSET_B41_DIALOG_TERMITE_COOL_SHORTS, 0, NULL, NULL, NULL, NULL)) {
levelSpecificFlags_set(0xB, TRUE);
this->unk138_23 = TRUE;
}
} else if (!levelSpecificFlags_get(0xC) && !this->unk138_23 && (func_80311480(ASSET_B42_DIALOG_TERMITE_COOL_BACKPACK, 0, NULL, NULL, NULL, NULL))) {
} else if (!levelSpecificFlags_get(0xC) && !this->unk138_23 && (gcdialog_showText(ASSET_B42_DIALOG_TERMITE_COOL_BACKPACK, 0, NULL, NULL, NULL, NULL))) {
levelSpecificFlags_set(0xC, TRUE);
}
}
@@ -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

@@ -81,7 +81,7 @@ void chtrainers_update(Actor *this){
&& !volatileFlag_get(VOLATILE_FLAG_F_HAS_MEET_TURBO_SHOES)
&& player_getTransformation() == TRANSFORM_1_BANJO
){
if(func_80311480(0xda4, 0, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(0xda4, 0, NULL, NULL, NULL, NULL)){
volatileFlag_set(VOLATILE_FLAG_F_HAS_MEET_TURBO_SHOES, TRUE);
}
}//L802CA620

View File

@@ -69,7 +69,7 @@ void chwadingboots_update(Actor *this){
if(!func_80329530(this, 250)) break;
if(player_getTransformation() != TRANSFORM_1_BANJO) break;
if(func_80311480(ASSET_DA5_DIALOG_WADINGBOOTS_MEET, 0, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_DA5_DIALOG_WADINGBOOTS_MEET, 0, NULL, NULL, NULL, NULL)){
volatileFlag_set(VOLATILE_FLAG_10_HAS_MEET_WADING_BOOTS, TRUE);
}