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

@@ -1364,7 +1364,7 @@ enum sfx_e
SFX_3F2_UNKNOWN, //gold_chest_ttc
SFX_3F5_UNKNOWN = 0x3F5, //RBB/code_5F80
SFX_3F6_UNKNOWN, //lair/code_0 func_803880BC
SFX_3F6_RUBBING, //lair/code_0 func_803880BC
SFX_3F7_UNKNOWN, //gv/histup
SFX_3F8_UNKNOWN, //gv/histup
SFX_3F9_UNKNOWN, //chmole
@@ -1723,10 +1723,9 @@ enum actor_e
ACTOR_47_EMPTY_HONEYCOMB,
ACTOR_49_EXTRA_LIFE = 0x49,
ACTOR_4A_WOOD_EXPLOSION = 0x4A,
ACTOR_4C_STEAM = 0x4C,
ACTOR_4A_WOOD_EXPLOSION,
ACTOR_4B_WOOD_EXPLOSION_2,
ACTOR_4C_STEAM,
ACTOR_4D_STEAM_2,
ACTOR_50_HONEYCOMB = 0x50,
@@ -2290,9 +2289,18 @@ enum bs_e
BS_A5_WONDERWING_UNKA5
};
enum map_flags_e
{
mapflag_mm_main_hit_with_orange = 8
enum mm_specific_flags {
MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED,
MM_SPECIFIC_FLAG_1_ORANGE_HAS_BEEN_COLLECTED,
MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED,
MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED,
MM_SPECIFIC_FLAG_4_SHAKE,
MM_SPECIFIC_FLAG_6_UNKNOWN = 0x6,
MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE = 0x8,
MM_SPECIFIC_FLAG_9_JUJU_HAS_HALF_TURNED,
MM_SPECIFIC_FLAG_A_UNKNOWN
};
enum item_e
@@ -3973,6 +3981,12 @@ enum asset_e
ASSET_8A0_SPRITE_WATER_DROP = 0x8a0,
ASSET_A0B_TEXT_UNKNOWN = 0xA0B,
ASSET_A0C_TEXT_UNKNOWN = 0xA0C,
ASSET_A0D_TEXT_UNKNOWN = 0xA0D,
ASSET_A14_TEXT_UNKNOWN = 0xA14,
ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED = 0xa17,
ASSET_A1F_DIALOG_SHOCKJUMP_LEARN = VER_SELECT(0xa1f, 0x91f, 0, 0),
@@ -3986,6 +4000,8 @@ enum asset_e
ASSET_A27_TEXT_BOTTLES_ALL_TTC_MOVES_LEARNED,
ASSET_A28_TEXT_LEAKY_DONE,
ASSET_A2A_TEXT_UNKNOWN = 0xA2A,
ASSET_A6F_TEXT_CHARMER_MEET = 0xA6F,
ASSET_A70_TEXT_CHARMER_HELPED,
ASSET_A71_TEXT_TRUNKER_MEET,
@@ -4036,20 +4052,46 @@ enum asset_e
ASSET_B4A_DIALOG_TALON_TROT_REFRESHER,
ASSET_B4B_DIALOG_EGGS_REFRESHER,
ASSET_B4C_DIALOG_BEAKBUSTER_REFRESHER,
ASSET_B4D_TEXT_UNKNOWN,
ASSET_B4E_TEXT_BOTTLES_ALL_MM_MOVES_LEARNED = 0xB4E,
ASSET_B51_TEXT_BOTTLES_HOW_TO_EXIT_LEVEL = 0xb51,
ASSET_B9F_TEXT_UNKNOWN = 0xb9f,
ASSET_BFF_TEXT_UNKNOWN = 0xbff,
ASSET_C01_TEXT_UNKNOWN = 0xc01,
ASSET_C02_TEXT_UNKNOWN,
ASSET_C05_TEXT_UNKNOWN = 0xc05,
ASSET_C08_TEXT_UNKNOWN = 0xc08,
ASSET_C09_TEXT_UNKNOWN,
ASSET_C0A_TEXT_UNKNOWN,
ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST = 0xc15,
ASSET_C17_TEXT_UNKNOWN = 0xC17,
ASSET_C18_TEXT_UNKNOWN,
ASSET_C19_TEXT_UNKNOWN,
ASSET_C1A_TEXT_UNKNOWN,
ASSET_C1E_TEXT_UNKNOWN = 0xc1e,
ASSET_C1F_TEXT_UNKNOWN,
ASSET_C20_DIALOG_PRESENT_COLLECTIBLE_MEET_BLUE = 0xC20,
ASSET_C21_DIALOG_PRESENT_COLLECTIBLE_MEET_GREEN = 0xC21,
ASSET_C22_DIALOG_PRESENT_COLLECTIBLE_MEET_RED = 0xC22,
ASSET_C21_DIALOG_PRESENT_COLLECTIBLE_MEET_GREEN,
ASSET_C22_DIALOG_PRESENT_COLLECTIBLE_MEET_RED,
ASSET_C23_DIALOG_BEAKBOMB_LEARN,
ASSET_C24_DIALOG_BEAKBOMB_REFRESHER,
ASSET_C26_TEXT_UNKNOWN = 0xc26,
ASSET_C27_TEXT_UNKNOWN,
ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED = 0xC2A,
ASSET_C2B_TEXT_UNKNOWN,
ASSET_C63_TEXT_MR_VILE_INTRO = 0xC63,
ASSET_C64_TEXT_MR_VILE_ROUND_1_START,
@@ -4066,11 +4108,18 @@ enum asset_e
ASSET_C6F_TEXT_MR_VILE_LOSE_ROUND_3_REMATCH,
ASSET_C70_TEXT_MR_VILE_WIN_ROUND_2_REMATCH,
ASSET_C71_TEXT_MR_VILE_WIN_ROUND_3_REMATCH,
ASSET_C72_TEXT_UNKNOWN,
ASSET_C74_TEXT_UNKNOWN = 0xc74,
ASSET_C76_TEXT_UNKNOWN = 0xc76,
text_flibbits_meet = 0xc81,
text_flibbits_defeat = 0xc82,
text_flibbits_return = 0xc83,
ASSET_C86_TEXT_UNKNOWN = 0xc86,
ASSET_C88_DIALOG_LONGLEG_LEARN = 0xC88,
ASSET_C89_DIALOG_LONGLEG_REFRESHER,
ASSET_C8A_TEXT_BOTTLES_ALL_BGS_MOVES_LEARNED,
@@ -4088,6 +4137,10 @@ enum asset_e
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3,
ASSET_C98_TEXT_MR_VILE_GIVES_PRIZE,
ASSET_CC7_TEXT_UNKNOWN = 0xcc7,
ASSET_D2B_TEXT_UNKNOWN = 0xd2b,
ASSET_D32_DIALOG_MUTANT_CRAB_MEET = 0xD32,
ASSET_D33_DIALOG_MUTANT_CRAB_DEFEAT,
ASSET_D34_TEXT_GLOOP_MEET,
@@ -4138,16 +4191,16 @@ enum asset_e
ASSET_DFA_TEXT_BOTTLES_JUMP_REFRESHER = 0xDFA,
ASSET_DFB_TEXT_BOTTLES_DIVE_LEARN,
ASSET_DFD_TEXT_BOTTLES_SWIM_LEARN = 0xDFD,
ASSET_DFC_TEXT_UNKNOWN,
ASSET_DFD_TEXT_BOTTLES_SWIM_LEARN,
ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER,
ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN,
ASSET_E00_TEXT_BOTTLES_ATTACK_REFRESHER = 0xE00,
ASSET_E01_TEXT_BOTTLES_CLIMB_LEARN,
ASSET_E03_TEXT_BOTTLES_CLIMB_REFRESHER = 0xE03,
ASSET_E02_TEXT_UNKNOWN,
ASSET_E03_TEXT_BOTTLES_CLIMB_REFRESHER,
ASSET_E04_TEXT_BOTTLES_BEAK_BARGE_LEARN,
ASSET_E05_TEXT_UNKNOWN,
ASSET_E06_TEXT_BOTTLES_BEAK_BARGE_REFRESHER = 0xE06,
ASSET_E08_TEXT_BOTTLES_FIND_ANOTHER_MOLEHILL = 0xE08,
@@ -4162,15 +4215,25 @@ enum asset_e
ASSET_E11_TEXT_BOTTLES_BRIDGE_STILL_BROKEN,
ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES,
ASSET_E14_TEXT_UNKNOWN = 0xE14,
ASSET_E15_TEXT_UNKNOWN,
ASSET_E16_TEXT_UNKNOWN,
ASSET_E17_TEXT_UNKNOWN,
ASSET_E18_TEXT_UNKNOWN,
ASSET_E19_TEXT_UNKNOWN,
ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT = 0xE1D,
ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER = VER_SELECT(0xE1F, 0xa61, 0, 0),
ASSET_E20_DIALOG_BOTTLES_BONUS_NOT_READY,
ASSET_E21_DIALOG_BOTTLES_BONUS_DISCOVERED,
ASSET_E24_TEXT_UNKNOWN = 0xE24,
ASSET_E35_DIALOG_BOTTLES_BONUS_REMINDER = VER_SELECT(0xE35, 0xa77, 0, 0),
ASSET_E37_TEXT_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN = 0xE37, // Talk to bottles after beating furnace fun
ASSET_E38_TEXT_UNKNOWN,
ASSET_E57_DIALOG_FIRST_JIGGY = VER_SELECT(0xF57, 0xabd, 0, 0),
@@ -4182,7 +4245,18 @@ enum asset_e
ASSET_F64_DIALOG_NOTEDOORS_LEARN = 0xf64,
ASSET_F65_DIALOG_NOTEDOORS_REFRESHER,
ASSET_F79_TEXT_UNKNOWN = 0xf79,
ASSET_F7A_TEXT_UNKNOWN,
ASSET_FAD_TEXT_UNKNOWN = 0xfad,
ASSET_FBE_TEXT_UNKNOWN = 0xfbe,
ASSET_FBF_TEXT_UNKNOWN,
ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1,
ASSET_10A2_TEXT_UNKNOWN,
ASSET_10E7_TEXT_UNKNOWN = 0x10E7,
ASSET_146B_MODEL_TTC_TREASURE_TROVE_COVE_OPA = 0x146B,
ASSET_146C_MODEL_TTC_TREASURE_TROVE_COVE_XLU,

View File

@@ -25,8 +25,6 @@
extern f32 fabsf(f32);
#pragma intrinsic (fabsf)
#define TUPLE_ASSIGN(out, a, b, c) {\
out[0] = a;\
out[1] = b;\
@@ -395,7 +393,7 @@ void func_8030E0FC(u8, f32, f32, f32);
f32 func_8030E200(u8);
void func_8030E2C4(u8);
void func_8030E394(u8 indx);
void func_8030E484(enum sfx_e uid);
void sfxsource_playHighPriority(enum sfx_e uid);
void func_8030E4E4(enum sfx_e uid);
void sfxsource_play(enum sfx_e uid, s32 sample_rate);
void func_8030E540(enum sfx_e uid);
@@ -434,7 +432,7 @@ void subaddie_set_state(Actor *, u32);
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
int subaddie_maybe_set_state(Actor *, s32, f32);
void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
int subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
bool subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
void func_80328CEC(Actor *, s32, s32, s32);
void func_80328FB0(Actor *, f32);
int func_80329030(Actor *, s32);
@@ -543,7 +541,7 @@ void __spawnQueue_add_1(GenFunction_1, s32);
void func_802FAD64(enum item_e);
void nodeprop_getPosition(NodeProp *, f32[3]);
bool func_80311480(s32 text_id, s32 arg1, f32 *pos, ActorMarker *marker, void(*callback)(ActorMarker *, enum asset_e, s32), void(*arg5)(ActorMarker *, enum asset_e, s32));
bool gcdialog_showText(s32 text_id, s32 arg1, f32 *pos, ActorMarker *marker, void(*callback)(ActorMarker *, enum asset_e, s32), void(*arg5)(ActorMarker *, enum asset_e, s32));
void ability_unlock(enum ability_e);
extern void func_802EE278(Actor *, s32, s32, s32, f32, f32);

View File

@@ -166,7 +166,7 @@ typedef struct actor_s{
AnimCtrl *animctrl;
ActorAnimationInfo *unk18;
TUPLE(f32, unk1C);
f32 unk28; //used in cheggs
f32 actor_specific_1_f; //used in cheggs
TUPLE(f32, velocity);
u32 unk38_31:10;
u32 unk38_21:9;
@@ -260,7 +260,7 @@ typedef struct actor_s{
u32 unk138_28:1;
u32 unk138_27:2;
u32 unk138_25:1;
u32 is_first_encounter:TRUE;
u32 has_met_before:1;
u32 unk138_23:1;
u32 unk138_22:1;
u32 unk138_21:1;

View File

@@ -47,7 +47,7 @@ func_8028F170 = 0x8028ef90;
ability_isUnlocked = 0x8028efb0;
player_is_present = 0x8028eff4;
func_8028F1E0 = 0x8028f000;
func_8028F22C = 0x8028f04c;
player_isDead = 0x8028f04c;
func_8028F25C = 0x8028f07c;
func_8028F428 = 0x8028f248;
func_8028F55C = 0x8028f37c;
@@ -205,7 +205,7 @@ sfxsource_setSfxId = 0x8030dc20;
sfxsource_setSampleRate = 0x8030dc5c;
sfxsource_playSfxAtVolume = 0x8030dd54;
func_8030E2C4 = 0x8030e464;
func_8030E484 = 0x8030e624;
sfxsource_playHighPriority = 0x8030e624;
func_8030E58C = 0x8030e72c;
func_8030E624 = 0x8030e7c4;
func_8030E6A4 = 0x8030e844;
@@ -214,7 +214,7 @@ func_8030ED70 = 0x8030ef10;
func_8030E394 = 0x8030e534;
func_803012F8 = 0x803014d8;
fxairscore_count_to_time = 0x80301f5c;
func_80311480 = 0x803116cc;
gcdialog_showText = 0x803116cc;
gcpausemenu_80314AC8 = 0x80314e1c;
func_8031B908 = 0x8031bce8;

View File

@@ -142,17 +142,19 @@ void chTiptup_setState(Actor *this, s32 arg1){
if(this->state == 2){
skeletalAnim_set(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f);
unqPtr->unkC = randf2(5.0f, 15.0f);
if(!this->is_first_encounter){
this->is_first_encounter = TRUE;
if(unqPtr->unkA == 0){
func_80311480(0xc72, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
}else{
func_80311480(0xc74, 0xf, this->position, this->marker, chTiptup_textEvent, 0);
if (!this->has_met_before) {
this->has_met_before = TRUE;
if (unqPtr->unkA == 0) {
gcdialog_showText(ASSET_C72_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388784, 0);
}
else {
gcdialog_showText(ASSET_C74_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388784, 0);
}
}
else{
func_80311480(D_80390854[unqPtr->unkA], 0xf, this->position, this->marker, chTiptup_textEvent, 0);
else {
gcdialog_showText(D_80390854[unqPtr->unkA], 0xf, this->position, this->marker, func_80388784, 0);
}
}
if(this->state == 3){
@@ -233,7 +235,7 @@ void chTiptup_choirHitReaction(ActorMarker *this, s32 arg1){
thisActor = marker_getActor(this);
unqPtr = (ActorLocal_Tiptup *)&thisActor->local;
if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){
if(!mapSpecificFlags_get(0) && func_80311480(0xc76, 0, 0, 0, 0, 0))
if(!mapSpecificFlags_get(0) && gcdialog_showText(ASSET_C76_TEXT_UNKNOWN, 0, 0, 0, 0, 0))
mapSpecificFlags_set(0,1);
}else{
tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0);
@@ -243,7 +245,7 @@ void chTiptup_choirHitReaction(ActorMarker *this, s32 arg1){
else{
func_8028F55C(1, thisActor->marker);
timedFunc_set_0(0.5f, chTiptup_sfxIncorrectHit);
if(!mapSpecificFlags_get(1) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && func_80311480(0xc75, 0, NULL, NULL, NULL, NULL))
if(!mapSpecificFlags_get(1) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && gcdialog_showText(0xc75, 0, NULL, NULL, NULL, NULL))
mapSpecificFlags_set(1,TRUE);
}
}
@@ -340,7 +342,7 @@ void chTiptup_update(Actor *this){
if(this->state == 6){
if(ml_distance_vec3f(this->position, player_position) < 300.0f && !unqPtr->unk8){
unqPtr->unk8 = 1;
func_80311480(0xc7d, 4, 0, 0, 0, 0);
gcdialog_showText(0xc7d, 4, 0, 0, 0, 0);
}
}
}

View File

@@ -143,7 +143,7 @@ void func_80387FD4(Actor *this){
func_8025A6EC(COMUSIC_2B_DING_B, 28000); //TODO ISSUE HERE
if (this->unkF4_8 == 1) {
func_8028F94C(2, this->position);
func_80311480(0xC86, 0xE, this->position, this->marker, func_80387E68, NULL);
gcdialog_showText(ASSET_C86_TEXT_UNKNOWN, 0xE, this->position, this->marker, func_80387E68, NULL);
subaddie_set_state_with_direction(this, 6, 0.79f, 1);
} else {
timed_playSfx(0.4f, SFX_C9_PAUSEMENU_ENTER, 1.0f, 32000); //0.4f

View File

@@ -56,10 +56,10 @@ void chFrogMinigame_setState(Actor * arg0, u32 next_state){
mapSpecificFlags_set(0x10, 1);
if(!fileProgressFlag_get(FILEPROG_1B_MET_YELLOW_FLIBBITS)){
fileProgressFlag_set(FILEPROG_1B_MET_YELLOW_FLIBBITS, 1);
func_80311480(text_flibbits_meet, 0xf, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
gcdialog_showText(text_flibbits_meet, 0xf, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
}else{
if(!arg0->bgs_6730.unk8){
func_80311480(text_flibbits_return, 0x4, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
gcdialog_showText(text_flibbits_return, 0x4, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
}
else{
__chFrogMinigame_textCallback(arg0->marker, text_flibbits_return, 0);
@@ -92,9 +92,10 @@ void chFrogMinigame_setState(Actor * arg0, u32 next_state){
}
}
if(next_state == 4){
func_80311480(text_flibbits_defeat, 0xf, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
if (next_state == 4) {
gcdialog_showText(text_flibbits_defeat, 0xf, arg0->position, arg0->marker, __chFrogMinigame_textCallback, 0);
}
if(next_state == 5){
func_80324E38(0.0f, 3);
timed_setStaticCameraToNode(0.0f, 0x27);

View File

@@ -111,7 +111,7 @@ void func_8038F6A4(Actor *this)
{
nodeprop_getPosition(temp_v0, local->unk18);
}
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
this->initialized = TRUE;
}
if (!this->volatile_initialized)
@@ -138,12 +138,12 @@ void func_8038F6A4(Actor *this)
case 1:
func_8038F610(this);
player_getPosition(sp48);
if (!this->is_first_encounter)
if (!this->has_met_before)
{
if ((((ml_distance_vec3f(local->unk18, sp48) < 250.0f) && (ml_distance_vec3f(local->unk18, sp48) > 80.0f)) && (!func_8028ECAC())) && (player_getTransformation() == TRANSFORM_1_BANJO))
{
func_80311480(0xC7E, 0, 0, 0, 0, 0);
this->is_first_encounter = TRUE;
gcdialog_showText(0xC7E, 0, 0, 0, 0, 0);
this->has_met_before = TRUE;
}
}
if (local->unk10)
@@ -163,7 +163,7 @@ void func_8038F6A4(Actor *this)
if ((!this->unk138_23) && (!local->unk14))
{
if (func_80311480(0xC80, 0, 0, 0, 0, 0))
if (gcdialog_showText(0xC80, 0, 0, 0, 0, 0))
{
this->unk138_23 = 1;
}
@@ -214,7 +214,7 @@ void func_8038F6A4(Actor *this)
func_8028F918(0);
if (jiggyscore_isCollected(JIGGY_26_BGS_TANKTUP) == 0)
{
func_80311480(0xC7F, 0xF, this->position, this->marker, func_8038F5E4, 0);
gcdialog_showText(0xC7F, 0xF, this->position, this->marker, func_8038F5E4, 0);
}
else
{

View File

@@ -41,13 +41,16 @@ bool func_8038B160(Actor *this){
local = (ActorLocal_Yumblie *)&this->local;
temp_v0 = func_8038A9E0(local->game_marker);
if ((temp_v0 == 1) || (temp_v0 == 4))
return FALSE;
if ((temp_v0 == 2) || (temp_v0 == 5))
return (0.7 <= randf ()) ? TRUE : FALSE;
return (randf () >= 0.5)? TRUE : FALSE;
if ((temp_v0 == 1) || (temp_v0 == 4)) {
return FALSE;
}
if ((temp_v0 == 2) || (temp_v0 == 5)) {
return BOOL(0.7 <= randf());
}
return BOOL(randf() >= 0.5);
}
void chyumblie_set_state(Actor* this, enum chyumblie_state_e next_state){

View File

@@ -226,7 +226,7 @@ void func_80389C58(ActorMarker *marker) {
this = marker_getActor(marker);
local = (ActorLocal_BGS_3420 *)&this->local;
BGS_func_80389850(this, 0);
func_80311480(D_80390984[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389BF8, NULL);
gcdialog_showText(D_80390984[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389BF8, NULL);
}
void BGS_func_80389CD8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
@@ -246,9 +246,9 @@ void func_80389D20(ActorMarker *marker) {
local = (ActorLocal_BGS_3420 *)&this->local;
BGS_func_80389850(this, 0);
if (local->unkC == local->unkD) {
func_80311480(D_803909A4[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
gcdialog_showText(D_803909A4[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
} else {
func_80311480(D_803909C0[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
gcdialog_showText(D_803909C0[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
}
func_80347A14(0);
}
@@ -270,7 +270,7 @@ void func_80389E40(ActorMarker *marker) {
local = (ActorLocal_BGS_3420 *)&this->local;
BGS_func_80389850(this, 1);
func_80311480(0xC6B, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389DF8, NULL);
gcdialog_showText(0xC6B, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389DF8, NULL);
}
void func_80389EAC(ActorMarker *marker, enum asset_e text_id, s32 arg2){
@@ -310,7 +310,7 @@ void func_80389F08(ActorMarker *marker) {
item_inc(ITEM_16_LIFE);
}
}
func_80311480(0xC98, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389EAC, NULL);
gcdialog_showText(0xC98, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389EAC, NULL);
}
@@ -332,22 +332,22 @@ void func_8038A068(Actor *this, s32 next_state) {
func_8038C3B0(local->vile_marker);
if (local->unkC == 3) {
if (local->unkD >= 4) {
func_80311480(0xC91, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
gcdialog_showText(0xC91, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
} else {
func_80311480((local->unkC == local->unkD) ? 0xC8D : 0xC90, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
gcdialog_showText((local->unkC == local->unkD) ? 0xC8D : 0xC90, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
}
} else {
func_80311480((local->unkC == local->unkD) ? 0xC63 : 0xC6C, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
gcdialog_showText((local->unkC == local->unkD) ? 0xC63 : 0xC6C, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
}
}
if (next_state == 3) {
func_80311480(D_803909DC[local->unkC], 4, chVile_getPostion(local->vile_marker), this->marker, func_80389B98, NULL);
gcdialog_showText(D_803909DC[local->unkC], 4, chVile_getPostion(local->vile_marker), this->marker, func_80389B98, NULL);
}
if (next_state == 4) {
if (local->unkC == local->unkD) {
func_80311480(BGS_D_803909F8[local->unkC], 0xE | ((BGS_D_803909F8[local->unkC] == 0xC8E) ? 1 : 0) | 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
gcdialog_showText(BGS_D_803909F8[local->unkC], 0xE | ((BGS_D_803909F8[local->unkC] == 0xC8E) ? 1 : 0) | 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
} else {
func_80311480(D_80390A18[local->unkC], 0xF , chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
gcdialog_showText(D_80390A18[local->unkC], 0xF , chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
}
func_80347A14(0);
}
@@ -693,7 +693,7 @@ void chvilegame_update(Actor *this) {
if (item_empty(ITEM_6_HOURGLASS)) {
if (volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)) {
volatileFlag_set(VOLATILE_FLAG_3, 0);
volatileFlag_set(VOLATILE_FLAG_5_FF_MINIGAME_WON, ( local->vile_score < local->player_score) ? TRUE : FALSE);
volatileFlag_set(VOLATILE_FLAG_5_FF_MINIGAME_WON, BOOL(local->vile_score < local->player_score));
func_8038A068(this, 1);
} else if (local->vile_score < local->player_score) {
if (local->unkC == 3) {

View File

@@ -362,7 +362,7 @@ void CC_func_80388F4C(void){
if(D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){
skeletalAnim_set(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f);
if(!D_80389FA0.unk48){
func_80311480(0xd2b, 0xE, D_80389FA0.unk28, NULL, NULL, NULL);
gcdialog_showText(ASSET_D2B_TEXT_UNKNOWN, 0xE, D_80389FA0.unk28, NULL, NULL, NULL);
D_80389FA0.unk48 = TRUE;
}
}//L8038918C

View File

@@ -43,7 +43,7 @@ void func_803897F0(Actor *this, s32 next_state){
if(next_state == 2){
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, -1);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.9f, 29000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.9f, 29000);
local->unk4 = 0.0f;
}

View File

@@ -127,9 +127,7 @@ void func_803870F8(Actor *this){
else if(this->state == 2 && 1.0f <= local->unk8){
flagCnt = levelSpecificFlags_get(LEVEL_FLAG_0_CC_TOKEN_TOOTH_OPEN) + levelSpecificFlags_get(LEVEL_FLAG_1_CC_JIGGY_TOOTH_OPEN);
if(!jiggyscore_isCollected(JIGGY_1B_CC_TOOTH)){
func_80311480((local->unk0 == 1)?
((flagCnt == 0)? 0xd30 : 0xd31) :
((flagCnt == 0)? 0xd2e : 0xd2f), 4, NULL, NULL, NULL, NULL);
gcdialog_showText((local->unk0 == 1)? ((flagCnt == 0)? 0xd30 : 0xd31) : ((flagCnt == 0)? 0xd2e : 0xd2f), 4, NULL, NULL, NULL, NULL);
}
CC_func_80386FE0(this, 3);
}//L80387474

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;
}
}

View File

@@ -3,7 +3,7 @@
#include "variables.h"
extern void func_8028E668(f32[3], f32, f32, f32);
extern s32 func_8028F31C(f32[3], f32, s32, Actor **);
extern s32 player_setCarryObjectPoseInHorizontalRadius(f32[3], f32, s32, Actor **);
typedef struct {
s32 unk0;
@@ -48,11 +48,19 @@ Struct_FP_3E00 D_80391E80[] ={
/* .code */
void func_8038A1F0(Actor **this_ptr, enum marker_e carried_obj_marker_id, enum actor_e actor_id, enum actor_e arg3){
func_8028F31C((*this_ptr)->position, 600.0f, actor_id, this_ptr);
player_setCarryObjectPoseInHorizontalRadius((*this_ptr)->position, 600.0f, actor_id, this_ptr);
if(!func_80329530(*this_ptr, 400)) return;
if(bacarry_get_markerId() != carried_obj_marker_id) return;
if(!func_8028FC34()) return;
if (!func_80329530(*this_ptr, 400)) {
return;
}
if (bacarry_get_markerId() != carried_obj_marker_id) {
return;
}
if (!player_throwCarriedObject()) {
return;
}
func_8028FA34(arg3, *this_ptr);
}
@@ -116,9 +124,9 @@ void func_8038A384(Actor *this){
}//L8038A4E4
sp34 = levelSpecificFlags_get(0x11) + levelSpecificFlags_get(0x12) + levelSpecificFlags_get(0x13);
sp38 = (sp34 == 1) ? 0xC17
: (sp34 == 2) ? 0xC18
: 0xC19;
sp38 = (sp34 == 1) ? ASSET_C17_TEXT_UNKNOWN
: (sp34 == 2) ? ASSET_C18_TEXT_UNKNOWN
: ASSET_C19_TEXT_UNKNOWN;
this->yaw_ideal = (f32)func_80329784(this);
func_80328FB0(this, 2.0f);
@@ -132,8 +140,9 @@ void func_8038A384(Actor *this){
&& !jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)
&& !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)
){
if(func_80311480(0xc1a, 0x2a, NULL, NULL, NULL, NULL))
if (gcdialog_showText(ASSET_C1A_TEXT_UNKNOWN, 0x2a, NULL, NULL, NULL, NULL)) {
levelSpecificFlags_set(0x19, TRUE);
}
}
}
@@ -154,11 +163,11 @@ void func_8038A384(Actor *this){
}
if(levelSpecificFlags_get(D_80391E80[sp3C].unk0)){
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
if(sp38 == 0xc19){
func_80311480(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL);
if (sp38 == ASSET_C19_TEXT_UNKNOWN) {
gcdialog_showText(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL);
}
else{
func_80311480(sp38, 0x3, this->position, this->marker, func_8038A318, NULL);
else {
gcdialog_showText(sp38, 0x3, this->position, this->marker, func_8038A318, NULL);
}
}
else{//L8038A73C

View File

@@ -85,8 +85,8 @@ void func_803877A8(ActorMarker *caller, enum asset_e text_id, s32 arg2){
void func_80387828(ActorMarker *caller, enum asset_e text_id, s32 arg2){
Actor *this = marker_getActor(caller);
if(text_id == 0xc00){
func_80311480(0xc2b, 0xf, NULL, this->marker, NULL, func_803877A8);
if (text_id == 0xc00) {
gcdialog_showText(ASSET_C2B_TEXT_UNKNOWN, 0xf, NULL, this->marker, NULL, func_803877A8);
}
}
@@ -137,7 +137,7 @@ void func_8038794C(Actor *this){
switch(this->state){
case 1://L80387AB0
if(mapSpecificFlags_get(0xb))
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
if(mapSpecificFlags_get(0x1)){
func_8028F94C(1, this->position);
@@ -147,13 +147,13 @@ void func_8038794C(Actor *this){
break;
}//L80387B38
if(!this->is_first_encounter && func_80329530(this, 0x1f4)){
if(!this->has_met_before && 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);
if (gcdialog_showText(ASSET_BFF_TEXT_UNKNOWN, 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->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}
}

View File

@@ -124,10 +124,10 @@ void func_80388A50(Actor *this){
void func_80388A94(Actor *this){
func_80388A50(this);
if(mapSpecificFlags_get(6)){
func_80311480(0xc0a, 0xe, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C0A_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
}
else{
func_80311480(0xc09, 0xe, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C09_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
}
}
@@ -136,15 +136,15 @@ void func_80388B18(Actor *this, u8 arg1){
if(player_getTransformation() == TRANSFORM_4_WALRUS){
func_80388A50(this);
if(mapSpecificFlags_get(5)){
func_80311480(0xc05, 0xf, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C05_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
}
else{
func_80311480(0xc02, 0xf, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C02_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
}
}
else{//L80388BB8
if(!volatileFlag_get(VOLATILE_FLAG_B3)){
if(func_80311480(0xc01, 0xe, this->position, this->marker, func_80388D70, NULL)){
if(gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
volatileFlag_set(VOLATILE_FLAG_B3, TRUE);
func_80388A50(this);
}
@@ -154,7 +154,7 @@ void func_80388B18(Actor *this, u8 arg1){
else{//L80388C08
if(player_getTransformation() == TRANSFORM_4_WALRUS){
if(!volatileFlag_get(VOLATILE_FLAG_B4)){
if(func_80311480(0xc08, 0xe, this->position, this->marker, func_80388D70, NULL)){
if(gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
volatileFlag_set(VOLATILE_FLAG_B4, TRUE);
func_80388A50(this);
}
@@ -478,13 +478,13 @@ void func_803896FC(Actor *this){
&& player_getTransformation() != TRANSFORM_4_WALRUS
&& volatileFlag_get(VOLATILE_FLAG_B3)
){
func_80311480(0xC01, 0xf, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
}
else if( local->unk19 == 2){
if( player_getTransformation() == TRANSFORM_4_WALRUS
&& volatileFlag_get(VOLATILE_FLAG_B4)
){
func_80311480(0xC08, 0xf, this->position, this->marker, func_80388D70, NULL);
gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
}
else if( player_getTransformation() != TRANSFORM_4_WALRUS){
func_80388A94(this);

View File

@@ -69,22 +69,22 @@ void func_80390388(Actor *this){
|| jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)
|| func_80390334()
){
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
if( func_80329530(this, 0xFA)
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
){
if(0.0f == this->unk1C[0] && func_80390334()){
if(func_80311480(0xc1f, 0xb, this->position, NULL, NULL, NULL)){
this->is_first_encounter = TRUE;
if(gcdialog_showText(ASSET_C1F_TEXT_UNKNOWN, 0xb, this->position, NULL, NULL, NULL)){
this->has_met_before = TRUE;
this->unk1C[0] = 1.0f;
}
}
else{
if( !this->is_first_encounter ){
if(func_80311480(0xc1e, 0x2b, this->position, NULL, NULL, NULL)){
this->is_first_encounter = TRUE;
if( !this->has_met_before ){
if(gcdialog_showText(ASSET_C1E_TEXT_UNKNOWN, 0x2b, this->position, NULL, NULL, NULL)){
this->has_met_before = TRUE;
}
}
}

View File

@@ -69,14 +69,14 @@ void func_80390630(Actor *this){
if(func_80329530(this, 350)){
if(player_getTransformation() == TRANSFORM_4_WALRUS){
if(!levelSpecificFlags_get(0x31)){
if(func_80311480(0xc27, 0x23, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_C27_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)){
levelSpecificFlags_set(0x31, TRUE);
}
}
}
else{
if(!levelSpecificFlags_get(0x32)){
if(func_80311480(0xc26, 0x23, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_C26_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)){
levelSpecificFlags_set(0x32, TRUE);
}
}

View File

@@ -336,11 +336,11 @@ void func_8038C9A0(Actor *this){
if(this->unk1C[1] <= this->position_y){
this->position_y = this->unk1C[1];
if(!fileProgressFlag_get(FILEPROG_82_MET_TWINKLIES)){
func_80311480(0xc12, 0x2a, this->position, this->marker, func_8038C94C, NULL);
gcdialog_showText(0xc12, 0x2a, this->position, this->marker, func_8038C94C, NULL);
fileProgressFlag_set(FILEPROG_82_MET_TWINKLIES, TRUE);
}
else{
func_80311480(0xc25, 0x2b, this->position, this->marker, func_8038C94C, NULL);
gcdialog_showText(0xc25, 0x2b, this->position, this->marker, func_8038C94C, NULL);
}
subaddie_set_state(this, 5);
this->pitch -= 3.0f;

View File

@@ -177,7 +177,7 @@ void func_8038D294(ActorMarker *marker){
func_8038D01C(this->position, 12, ASSET_700_SPRITE_DUST);
this->velocity[1] = 0.0f;
FUNC_8030E8B4(SFX_30_MAGIC_POOF, 1.0f, 32000, this->position, 1000, 3500);
func_80311480(0xc13, 0, NULL, NULL, NULL, NULL);
gcdialog_showText(0xc13, 0, NULL, NULL, NULL, NULL);
}
void func_8038D324(Actor *this){
@@ -279,7 +279,7 @@ void func_8038D6C8(Actor *this){
bool sp20;
sp24 = time_getDelta();
mapSpecificFlags_set(0xd, (this->state != 1 && this->state != 2) ? TRUE : FALSE);
mapSpecificFlags_set(0xd, BOOL(this->state != 1 && this->state != 2));
if(func_8038BFA0() || fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
this->marker->propPtr->unk8_3 = FALSE;

View File

@@ -127,7 +127,7 @@ void func_8038E094(Actor *this){
if(this->unkF4_8 == 1 && !fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){
timed_setStaticCameraToNode(0.5f, 0xd);
func_80311480(ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
gcdialog_showText(ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
this->velocity[0] = 1.0f;
subaddie_set_state_with_direction(this, 6, 0.03f, 1);
actor_loopAnimation(this);
@@ -201,7 +201,7 @@ void func_8038E094(Actor *this){
FUNC_8030E8B4(SFX_27_JINJO_HI, 1.6f, 32000, this->position, 1250, 2500);
func_80324D54(0.35f, SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250.0f, 2500.0f);
marker_despawn(sp38->marker);
if( !mapSpecificFlags_get(0xa) && func_80311480(0xc16, 0, NULL, NULL, NULL, NULL)){
if( !mapSpecificFlags_get(0xa) && gcdialog_showText(0xc16, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(0xa, TRUE);
}
}

View File

@@ -138,7 +138,7 @@ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){
if(actor_animationIsAt(this, 0.9f)){
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000);
}
this->unk28 = (1.0f- sp24)*arg2;
this->actor_specific_1_f = (1.0f- sp24)*arg2;
func_80329054(this, 2);
if(ml_distance_vec3f(this->position, arg1) <= arg4)
return TRUE;
@@ -273,7 +273,7 @@ void FP_func_8038F7AC(Actor *this){
func_8038F560(this);
if(!local->unk30){
if(func_80311480(0xc1d, 0x20, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(0xc1d, 0x20, NULL, NULL, NULL, NULL)){
local->unk30 = TRUE;
}
}
@@ -299,10 +299,10 @@ void FP_func_8038F7AC(Actor *this){
break;
}
if(func_80329530(this, 500) && !this->is_first_encounter){
if(func_80311480(0xc1c, 0xAA, this->position, this->marker, func_8038F330, func_8038F3C4)){
if(func_80329530(this, 500) && !this->has_met_before){
if(gcdialog_showText(0xc1c, 0xAA, this->position, this->marker, func_8038F330, func_8038F3C4)){
timed_setStaticCameraToNode(0.0f, 0x2E);
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
break;
}//L8038FD40

View File

@@ -127,7 +127,7 @@ void chXmasTree_update(Actor *this){
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);
gcdialog_showText(0xC14, 0, NULL, NULL, NULL, NULL);
break;
case 3: // L803872F0

View File

@@ -17,5 +17,5 @@ void func_803905B0(Actor *this){
this->volatile_initialized = TRUE;
actor_collisionOff(this);
}
this->marker->propPtr->unk8_3 = func_8038DD14(this) ? TRUE : FALSE;
this->marker->propPtr->unk8_3 = BOOL(func_8038DD14(this));
}

View File

@@ -525,25 +525,25 @@ void func_8038BC0C(s32 arg0){
break;
FP_D_803935A8.unk1A = TRUE;
FP_func_8038AB60(0);
if(!func_8028F22C()){
if(!player_isDead()){
func_8028F918(2);
func_80311480(0xc10, 0x20, NULL, NULL, func_8038B2C8, NULL);
gcdialog_showText(0xc10, 0x20, NULL, NULL, func_8038B2C8, NULL);
}//L8038BD40
FP_D_803935A8.unk0 = 4;
break;
case 3:
if(!FP_D_803935A8.unk19 && !func_8028F22C()){
if(!FP_D_803935A8.unk19 && !player_isDead()){
FP_D_803935A8.unk19 = 1;
func_80311480(0xc0f, 0x20, NULL, NULL, NULL, NULL);
gcdialog_showText(0xc0f, 0x20, NULL, NULL, NULL, NULL);
}//L8038BD94
func_8025AEA0(0x3a, 0x411aa);
break;
case 2:
if(!FP_D_803935A8.unk18 && !func_8028F22C()){
if(!FP_D_803935A8.unk18 && !player_isDead()){
FP_D_803935A8.unk18 = 1;
func_80311480(0xc0e, 0x20, NULL, NULL, NULL, NULL);
gcdialog_showText(0xc0e, 0x20, NULL, NULL, NULL, NULL);
}//L8038BDF0
func_8025AEA0(0x3a, 0x493e0);
break;

View File

@@ -149,7 +149,7 @@ void chAncientOne_update(Actor *this){
mapSpecificFlags_set(sp38, TRUE);
if(sp38== 0xB){
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
func_80311480(ASSET_A80_TEXT_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL);
gcdialog_showText(ASSET_A80_TEXT_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL);
}
else{
func_80386850(this->marker, 0xA80, -1);
@@ -158,7 +158,7 @@ void chAncientOne_update(Actor *this){
else {
if(sp38== 7){
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
func_80311480(ASSET_A7F_TEXT_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_A7F_TEXT_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL);
}
}

View File

@@ -176,13 +176,13 @@ void chGobi1_update(Actor *this){
}
if(this->state == 1 || this->state == 2){
if( !this->is_first_encounter
if( !this->has_met_before
&& func_80329530(this, 250)
&& !func_80329530(this, 80)
&& func_8028F2A0()
&& func_80311480(0xa73, 0, NULL, NULL, NULL, NULL)
&& gcdialog_showText(0xa73, 0, NULL, NULL, NULL, NULL)
){
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
}//L803877A4

View File

@@ -200,11 +200,11 @@ void chGobi2_update(Actor *this){
}//L80388114
if(this->state == 2){
if(!this->is_first_encounter){
if(!this->has_met_before){
if(func_80329530(this, 0xFA) && !func_80329530(this, 0x50)){
if(func_8028F2A0()){
if(func_80311480(ASSET_A75_TEXT_GOBI2_MEET, 0, this->position, NULL, NULL, NULL))
this->is_first_encounter = TRUE;
if(gcdialog_showText(ASSET_A75_TEXT_GOBI2_MEET, 0, this->position, NULL, NULL, NULL))
this->has_met_before = TRUE;
}
}
}

View File

@@ -72,7 +72,7 @@ void chGobi3_setState(Actor *this, s32 next_state){
if(next_state == 5){
skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f);
func_80311480(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
gcdialog_showText(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
}
if(next_state == 4){

View File

@@ -69,9 +69,9 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
item_set(ITEM_0_HOURGLASS_TIMER, 0xdd3);
item_set(ITEM_6_HOURGLASS, TRUE);
func_8038F520(1.0f);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.8f, 25000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.7f, 25000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.5f, 25000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.8f, 25000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.7f, 25000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.5f, 25000);
if(1500.0f < plyr_pos[0]){
func_80324E38(0.0f, 3);
timed_setStaticCameraToNode(0.0f, 8);
@@ -84,7 +84,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
timed_playSfx(1.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 32000);
}
if(!levelSpecificFlags_get(0x16)){
func_80311480(ASSET_A82_TEXT_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_A82_TEXT_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL);
levelSpecificFlags_set(0x16, TRUE);
}
}//L8038F794
@@ -104,10 +104,10 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
}//L8038F850
if(next_state == 4){
FUNC_8030E624(SFX_3F6_UNKNOWN, 1.0f, 30000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.8f, 29000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.7f, 28000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.5f, 31000);
FUNC_8030E624(SFX_3F6_RUBBING, 1.0f, 30000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.8f, 29000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.7f, 28000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.5f, 31000);
func_8030E6D4(SFX_52_BANJO_YAH_OH);
tmp_v0 = func_8034C528(400);
if(tmp_v0){
@@ -134,7 +134,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff);
if(!levelSpecificFlags_get(0x17)){
func_80311480(ASSET_A83_TEXT_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_A83_TEXT_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL);
levelSpecificFlags_set(0x17, TRUE);
}
}
@@ -176,7 +176,7 @@ void chMazeCtrl_update(Actor *this){
}
if( !levelSpecificFlags_get(0x15)
&& ml_timer_update(&local->unk8, sp34)
&& func_80311480(ASSET_A81_TEXT_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL)
&& gcdialog_showText(ASSET_A81_TEXT_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL)
){
levelSpecificFlags_set(0x15, TRUE);
}

View File

@@ -74,7 +74,7 @@ void chSarcophagus_update(Actor *this){
if(func_80329530(this, 500) && func_8038957C(this)){
subaddie_set_state_with_direction(this, 2, 0.01f, 1);
FUNC_8030E8B4(SFX_6B_LOCKUP_OPENING, 1.0f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_UNKNOWN, 1.0f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_RUBBING, 1.0f, 32000, this->position, 1250, 2500);
}
break;
@@ -96,7 +96,7 @@ void chSarcophagus_update(Actor *this){
if(!func_80329530(this, 700)){
subaddie_set_state_with_direction(this, 4, 0.5f, 1);
FUNC_8030E8B4(SFX_6B_LOCKUP_OPENING, 1.0f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_UNKNOWN, 1.0f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_RUBBING, 1.0f, 32000, this->position, 1250, 2500);
}
break;
case 4: //L803897E4
@@ -134,7 +134,7 @@ void chSarcophagus_updateSNS(Actor *this){
if(this->unk1C[0] == 0.0f){
subaddie_set_state_with_direction(this, 5, 0.01f, 1);
FUNC_8030E8B4(SFX_6B_LOCKUP_OPENING, 0.5f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_UNKNOWN, 0.5f, 32000, this->position, 1250, 2500);
FUNC_8030E8B4(SFX_3F6_RUBBING, 0.5f, 32000, this->position, 1250, 2500);
}
}
else{//L803899C0

View File

@@ -69,13 +69,13 @@ void chTrucker_update(Actor *this){
}
}//L803891D8
if( this->state == 1
&& !this->is_first_encounter
&& !this->has_met_before
&& func_80329530(this, 250)
&& !func_80329530(this, 80)
&& func_8028F2A0()
){
func_80311480(ASSET_A71_TEXT_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->is_first_encounter = TRUE;
gcdialog_showText(ASSET_A71_TEXT_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->has_met_before = TRUE;
}//L80389254
if(this->state == 1 && mapSpecificFlags_get(0xC)){

View File

@@ -29,8 +29,8 @@ void func_80389A20(ActorMarker *caller, enum asset_e text_id, s32 arg2){
}
void func_80389A60(Actor *this){
func_80311480(ASSET_A70_TEXT_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL);
this->is_first_encounter = TRUE;
gcdialog_showText(ASSET_A70_TEXT_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL);
this->has_met_before = TRUE;
subaddie_set_state(this, 5);
}
@@ -48,7 +48,7 @@ void func_80389ABC(Actor *this){
void func_80389B1C(Actor *this){
if(!this->volatile_initialized){
this->lifetime_value = (f32) func_8038E184();
this->is_first_encounter = jiggyscore_isCollected(JIGGY_43_GV_HISTUP) || mapSpecificFlags_get(0);
this->has_met_before = jiggyscore_isCollected(JIGGY_43_GV_HISTUP) || mapSpecificFlags_get(0);
this->unk138_23 = jiggyscore_isCollected(JIGGY_43_GV_HISTUP) || mapSpecificFlags_get(2);
this->volatile_initialized = TRUE;
}
@@ -62,9 +62,9 @@ void func_80389B1C(Actor *this){
animctrl_setTransitionDuration(this->animctrl, 0.15f);
if(this->state == 1 || this->state == 2){
if(! this->is_first_encounter && func_80329530(this, 250) && !func_80329530(this, 0x50)){
func_80311480(ASSET_A6F_TEXT_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->is_first_encounter = TRUE;
if(! this->has_met_before && func_80329530(this, 250) && !func_80329530(this, 0x50)){
gcdialog_showText(ASSET_A6F_TEXT_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->has_met_before = TRUE;
mapSpecificFlags_set(0, TRUE);
}
}

View File

@@ -106,12 +106,12 @@ void func_8038AF10(Actor *this){
animctrl_setSmoothTransition(this->animctrl, TRUE);
subaddie_set_state_with_direction(this, 3, 0.00001f, 1);
actor_loopAnimation(this);
this->unk28 = 16.0f;
this->actor_specific_1_f = 16.0f;
this->unk1C[0] = 1.0f;
}
int func_8038AF78(Actor *this, f32 arg1, f32 arg2){
this->unk28 = arg2;
this->actor_specific_1_f = arg2;
this->yaw_ideal = (f32)func_80329784(this);
func_80328FB0(this, arg1);
if(!func_80329030(this, 0) && func_80329480(this))
@@ -192,7 +192,7 @@ void func_8038B124(Actor *this){
subaddie_set_state_with_direction(this, 2, 0.00001f, 1);
actor_playAnimationOnce(this);
this->yaw = (f32)func_80329784(this);
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->unk1C[0] = 1.0f;
func_802BB3DC(0, 14.0f, 0.92f);
func_8038ABD8(this->position, 8);
@@ -200,7 +200,7 @@ void func_8038B124(Actor *this){
else{//L8038B3E0
this->yaw_ideal = func_80257204(this->position_x, this->position_z, this->velocity_x, this->velocity_z);
func_80328FB0(this, 18.0f);
this->unk28 = 18.0f;
this->actor_specific_1_f = 18.0f;
func_80329030(this, 0);
animctrl_setAnimTimer(this->animctrl, 0.0f);
@@ -233,7 +233,7 @@ void func_8038B124(Actor *this){
func_8038ABD8(this->position, 8);
}
else{
GV_D_80391A70[0] = 2*this->unk28;
GV_D_80391A70[0] = 2 * this->actor_specific_1_f;
GV_D_80391A70[1] = 0.0f;
GV_D_80391A70[2] = 0.0f;
ml_vec3f_yaw_rotate_copy(GV_D_80391A70, GV_D_80391A70, this->yaw - 90.0);

View File

@@ -63,7 +63,7 @@ void func_8038BA08(Actor *this){
if(func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS)
player_stateTimer_set(STATE_TIMER_3_TURBO_TALON, 0.0f);
func_80311480(ASSET_A79_TEXT_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL);
gcdialog_showText(ASSET_A79_TEXT_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL);
comusic_8025AB44(COMUSIC_57_TURBO_TRAINERS, 7000, 700);
}
@@ -244,9 +244,9 @@ void GV_func_8038BEA0(Actor *this){
}
}
else{
if(!this->is_first_encounter){
if(func_80311480(ASSET_A78_TEXT_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){
this->is_first_encounter = TRUE;
if(!this->has_met_before){
if(gcdialog_showText(ASSET_A78_TEXT_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){
this->has_met_before = TRUE;
}
}
}
@@ -276,7 +276,7 @@ void GV_func_8038BEA0(Actor *this){
}
if(!this->unk138_23){
if(func_80311480(ASSET_A7A_TEXT_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_A7A_TEXT_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){
this->unk138_23 = TRUE;
}
}

View File

@@ -44,9 +44,9 @@ ActorInfo D_8039123C = { 0xBB, 0x287, 0x3E6,
void func_8038C760(Actor *this, s32 arg1){
ActorLocal_GV_6370 *local = (ActorLocal_GV_6370 *)&this->local;
chBuriedPyramid_setRaisedAmount(local->unk14, arg1);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.7f, 28000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.9f, 29000);
FUNC_8030E624(SFX_3F6_UNKNOWN, 1.0f, 30000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.7f, 28000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.9f, 29000);
FUNC_8030E624(SFX_3F6_RUBBING, 1.0f, 30000);
timed_setStaticCameraToNode(0.0f, 8);
if(arg1 < 3){
timed_setStaticCameraToNode(3.5f, arg1 + 0x15);
@@ -95,7 +95,7 @@ void func_8038C8A0(Actor *this, s32 next_state){
local->unk18[2] = this->position_z;
if(this->state == 1){
rumbleManager_80250E94(0.0f, 0.6f, 1.0f, 0, 1.3f, 0.0f);
timed_playSfx(1.0f, SFX_3F6_UNKNOWN, 0.8f, 30000);
timed_playSfx(1.0f, SFX_3F6_RUBBING, 0.8f, 30000);
}
}//L8038CA6C
@@ -126,7 +126,7 @@ void func_8038C8A0(Actor *this, s32 next_state){
local->unk18[1] = this->position_y;
local->unk18[2] = this->position_z;
rumbleManager_80250D94(0.7f, 0.5f, 1.3f);
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.8f, 30000);
FUNC_8030E624(SFX_3F6_RUBBING, 0.8f, 30000);
}
if(next_state == 8){

View File

@@ -73,7 +73,7 @@ void func_8038D47C(Actor *this){
player_getPosition(sp3C);
if(func_8028ECAC() == 0){
if( ml_distance_vec3f(sp3C, this->unk1C) < 100.0f || ml_distance_vec3f(sp3C, this->velocity) < 100.0f){
if(func_80311480(ASSET_A7B_TEXT_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_A7B_TEXT_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(0x14, 1);
}
}
@@ -102,7 +102,7 @@ void func_8038D47C(Actor *this){
}
if( actor_animationIsAt(this, 0.99f) ){
if(--this->unk38_31 == 0){
func_80311480(ASSET_A7C_TEXT_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_A7C_TEXT_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL);
mapSpecificFlags_set(0x14, TRUE);
subaddie_set_state_forward(this, 1);
}

View File

@@ -53,7 +53,7 @@ Struct_GV_9DB0_1 * func_803901A0(s32 arg0){
}
void func_803901F0(void *arg0){
FUNC_8030E624(SFX_3F6_UNKNOWN, 1.0f, 30000);
FUNC_8030E624(SFX_3F6_RUBBING, 1.0f, 30000);
}
void func_80390218(void *arg0){

View File

@@ -29,9 +29,9 @@ void __waterCtrl_setState(s32 arg0){
func_80324E38(6.0f, 0);
tmp_v0 = func_8034C528(400);
if(tmp_v0){
func_8030E760(SFX_3F6_UNKNOWN, 0.7f, 28000);
func_8030E760(SFX_3F6_UNKNOWN, 0.9f, 29000);
func_8030E760(SFX_3F6_UNKNOWN, 1.0f, 30000);
func_8030E760(SFX_3F6_RUBBING, 0.7f, 28000);
func_8030E760(SFX_3F6_RUBBING, 0.9f, 29000);
func_8030E760(SFX_3F6_RUBBING, 1.0f, 30000);
func_8034DE60(tmp_v0, 0.0f, 400.0f, 2.5f, 1);
}
}

View File

@@ -14,53 +14,69 @@ void func_80244BB0(s32, s32, s32, f32);
void chchimpystump_update(Actor *this);
/* .data */
ActorInfo chchimpystump = { MARKER_95_CHIMPY_STUMP, ACTOR_C5_CHIMPY_STUMP, ASSET_3C8_MODEL_CHIMPY_STUMP,
enum chchimpystump_state_e {
CHIMPY_STUMP_STATE_1_LOWERED = 1,
CHIMPY_STUMP_STATE_2_RAISING,
CHIMPY_STUMP_STATE_3_RAISED
};
ActorInfo chchimpystump = {
MARKER_95_CHIMPY_STUMP, ACTOR_C5_CHIMPY_STUMP, ASSET_3C8_MODEL_CHIMPY_STUMP,
1, NULL,
chchimpystump_update, func_80326224, actor_drawFullDepth,
0, 0, 0.0f, 0
};
void _chchimpystump_80386CA0(Actor *this){
if(mapSpecificFlags_get(4)){
if(this->unk10_12 == 0){
/* .code */
void __chchimpystump_updateShaking(Actor *this) {
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_4_SHAKE)) {
if (this->unk10_12 == 0) {
this->unk10_12 = 1;
func_802BB3DC(1, 3.0f, 1.0f);
func_80244BB0(0, 0x6A, 0x7FF8, 0.2f);
}//L80386D0C
this->position_x = ((globalTimer_getTime() & 1) * 2) ^ (s32)this->position_x;
this->position_z = ((globalTimer_getTime() & 2) * 2) ^ (s32)this->position_z;
this->position_x = ((globalTimer_getTime() & 1) * 2) ^ (s32) this->position_x;
this->position_z = ((globalTimer_getTime() & 2) * 2) ^ (s32) this->position_z;
}
}
void chchimpystump_update(Actor *this){
if(!this->initialized){
void chchimpystump_update(Actor *this) {
if (!this->initialized) {
actor_collisionOff(this);
this->initialized = TRUE;
this->unk28 = this->position_y;
this->actor_specific_1_f = this->position_y;
this->position_y -= 134.0f;
this->marker->propPtr->unk8_3 = 1;
}
switch (this->state)
{
case 1:
if(mapSpecificFlags_get(0))
subaddie_set_state(this, 2);
_chchimpystump_80386CA0(this);
break;
case 2:
_chchimpystump_80386CA0(this);
this->position_y += 2.5;
if(this->unk28 <= this->position_y){
this->position_y = this->unk28;
subaddie_set_state(this, 3);
func_802BB41C(1);
func_80244C78(0);
}
if((globalTimer_getTime() & 3) == 2)
func_80353064(this->position, 40.0f);
break;
case 3:
break;
switch (this->state) {
case CHIMPY_STUMP_STATE_1_LOWERED:
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED)) {
subaddie_set_state(this, CHIMPY_STUMP_STATE_2_RAISING);
}
__chchimpystump_updateShaking(this);
break;
case CHIMPY_STUMP_STATE_2_RAISING:
__chchimpystump_updateShaking(this);
this->position_y += 2.5;
if (this->actor_specific_1_f <= this->position_y) {
this->position_y = this->actor_specific_1_f;
subaddie_set_state(this, CHIMPY_STUMP_STATE_3_RAISED);
func_802BB41C(1);
func_80244C78(0);
}
if ((globalTimer_getTime() & 3) == 2) {
func_80353064(this->position, 40.0f);
}
break;
case CHIMPY_STUMP_STATE_3_RAISED:
break;
}
}

View File

@@ -72,7 +72,7 @@ bool __chConga_isPlayerNearCongaTree(Actor * this){
unused_tmpz = plyr_pos[2] - 5029.0f;
if (52900.0f < (plyr_pos[0] - - 5011.0f)*(plyr_pos[0] - - 5011.0f) + (plyr_pos[2]- 5029.0f)*(plyr_pos[2] - 5029.0f)) {
if (52900.0f < (plyr_pos[0] - -5011.0f) * (plyr_pos[0] - -5011.0f) + (plyr_pos[2] - 5029.0f) * (plyr_pos[2] - 5029.0f)) {
return FALSE;
}
@@ -122,7 +122,7 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
if(((ActorLocal_Conga *)&actorPtr->local)->unkC == 1){
if(actorPtr->unk10_12 == 0){
((ActorLocal_Conga *)&actorPtr->local)->unkC = 0;
if(mapSpecificFlags_get(0xA))
if(mapSpecificFlags_get(MM_SPECIFIC_FLAG_A_UNKNOWN))
actorPtr->unk38_31++;
actorPtr->unk10_12 = MIN(actorPtr->unk38_31, 0xA);
@@ -140,7 +140,7 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
){
func_8038708C(actorPtr, 2);
if(actorPtr->unk38_31 == 1){
func_80311480(ASSET_B39_TEXT_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0);
gcdialog_showText(ASSET_B39_TEXT_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0);
}
}
}
@@ -181,7 +181,7 @@ void __chConga_sendOrangeProjectile(ActorMarker *congaMarker){
congaPtr->unk10_12 -= (congaPtr->unk10_12 && ( conga_state == 7));
MM_func_80387F44();
congaPtr->unk28 = 2.0f;
congaPtr->actor_specific_1_f = 2.0f;
orangePtr = func_8032811C(ACTOR_14_ORANGE_PROJECTILE, conga_localPtr->orangeSpawnPosition, congaPtr->yaw);
if(orangePtr != NULL){
@@ -220,13 +220,13 @@ void func_803876D0(Actor *this){
this->unk16C_0 = 1;
this->initialized = TRUE;
this->velocity_x = 0.0f;
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
node_prop = func_80304C38(0x150, this);
((ActorLocal_Conga *)&this->local)->unk1C = nodeprop_getRadius(node_prop);
nodeprop_getPosition_s32(node_prop, &((ActorLocal_Conga *)&this->local)->unk10);
}
if(0.0f == this->unk28){
this->unk28 = (actorArray_findActorFromMarkerId(MARKER_36_ORANGE_COLLECTIBLE) != NULL)? 2.0f: 1.0f;
if(0.0f == this->actor_specific_1_f){
this->actor_specific_1_f = (actorArray_findActorFromMarkerId(MARKER_36_ORANGE_COLLECTIBLE) != NULL)? 2.0f: 1.0f;
}
if(0.0f != this->velocity_x){
this->velocity_x -= 1.0f;
@@ -249,15 +249,15 @@ void func_803876D0(Actor *this){
sp3C = func_80329530(this, 1000);
if( func_8032A9E4(((ActorLocal_Conga *)&this->local)->unk10, ((ActorLocal_Conga *)&this->local)->unk18, ((ActorLocal_Conga *)&this->local)->unk1C)
&& !this->unk138_23
&& func_80311480(ASSET_B37_TEXT_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0)
&& gcdialog_showText(ASSET_B37_TEXT_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0)
){
this->unk138_23 = 1;
mapSpecificFlags_set(0xA, 1);
mapSpecificFlags_set(MM_SPECIFIC_FLAG_A_UNKNOWN, TRUE);
}//L803878F8
if( sp3C && !this->is_first_encounter){
if(func_80311480((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_TEXT_CONGA_MEET_AS_TERMITE : ASSET_B3C_TEXT_CONGA_MEET, 0, this->position, 0,0,0)){
this->is_first_encounter = TRUE;
if( sp3C && !this->has_met_before){
if(gcdialog_showText((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_TEXT_CONGA_MEET_AS_TERMITE : ASSET_B3C_TEXT_CONGA_MEET, 0, this->position, 0,0,0)){
this->has_met_before = TRUE;
}
} //L80387968
@@ -348,7 +348,7 @@ void func_803876D0(Actor *this){
actor_playAnimationOnce(this);
if(actor_animationIsAt(this, 0.99f)){
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
func_80311480(ASSET_B38_TEXT_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL);
gcdialog_showText(ASSET_B38_TEXT_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL);
}
break;

View File

@@ -5,85 +5,72 @@
#include "prop.h"
#ifndef HUT_STATE_INTACT
#define HUT_STATE_INTACT 0
#endif
#ifndef HUT_STATE_DAMAGED
#define HUT_STATE_DAMAGED 1
#endif
#ifndef HUT_STATE_DESTROYED
#define HUT_STATE_DESTROYED 2
#endif
/* extern function declarations */
void func_802C8F70(f32);
void func_802C4218(s32, s32, s32, s32);
/* public function declarations */
Actor *chhut_draw(ActorMarker *, Gfx **, Mtx**, Vtx **);
void chhut_update(Actor *);
Actor *chhut_draw(ActorMarker *, Gfx **, Mtx **, Vtx **);
void chhut_update(Actor *);
/* .bss */
extern s32 D_8037DCB0; //mm_hut_smash_count
extern s32 mm_hut_smash_count; //mm_hut_smash_count
/* .data */
enum chhut_state_e {
HUT_STATE_0_INTACT,
HUT_STATE_1_DAMAGED,
HUT_STATE_2_DESTROYED
};
ActorAnimationInfo chhutAnimations[3] = {
{0, 0.0f},
{ASSET_4E_ANIM_MUDHUT_SMASH, 0.25f},
{0, 0.0f},
{ASSET_4E_ANIM_MUDHUT_SMASH, 0.25f},
{ASSET_4E_ANIM_MUDHUT_SMASH, 1000000.0f}
};
/* .code */
Actor *chhut_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *actorPtr;
s32 is_not_destroyed;
s32 is_intact_or_destroyed;
Actor *chhut_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
Actor *actorPtr = marker_getActor(this);
s32 is_not_destroyed = actorPtr->state != HUT_STATE_2_DESTROYED;
s32 is_intact_or_destroyed = actorPtr->state == HUT_STATE_0_INTACT || actorPtr->state == HUT_STATE_2_DESTROYED;
actorPtr = marker_getActor(this);
is_not_destroyed = actorPtr->state != HUT_STATE_DESTROYED;
is_intact_or_destroyed = actorPtr->state == HUT_STATE_INTACT || actorPtr->state == HUT_STATE_DESTROYED;
this->propPtr->unk8_3 = is_intact_or_destroyed;
func_8033A45C(1, is_not_destroyed);
return actor_draw(this, gfx, mtx, vtx);
}
void func_803869EC(ActorMarker *this){
Actor * actorPtr;
f32 *pos;
actorPtr = marker_getActor(this);
actorPtr = spawn_actor_f32(0x4B, actorPtr->position, 0);
void __chhut_spawnExplosion(ActorMarker *this) {
Actor *actorPtr = marker_getActor(this);
actorPtr = spawn_actor_f32(ACTOR_4B_WOOD_EXPLOSION_2, actorPtr->position, 0);
spawn_actor_f32(ACTOR_4D_STEAM_2, actorPtr->position, 0);
if(this);
if (this);
}
void chhut_update(Actor *this){
static s32 D_803898D8[6] = { 0, 1, 2, 3, 6, 4};
void chhut_update(Actor *this) {
static s32 D_803898D8[6] = {0, 1, 2, 3, 6, 4};
f32 diff_pos[3];
f32 plyr_pos[3];
if(func_80334904() != 2)
if (func_80334904() != 2) {
return;
}
if(!this->initialized){
if (!this->initialized) {
this->marker->collidable = FALSE;
this->initialized = TRUE;
}
switch(this->state){
case HUT_STATE_INTACT:
switch (this->state) {
case HUT_STATE_0_INTACT:
player_getPosition(plyr_pos);
diff_pos[0] = plyr_pos[0] - this->position_x;
diff_pos[1] = plyr_pos[1] - this->position_y;
diff_pos[2] = plyr_pos[2] - this->position_z;
if(150.0f < diff_pos[1]
&& player_getActiveHitbox(this->marker) == HITBOX_1_BEAK_BUSTER
if (150.0f < diff_pos[1]
&& player_getActiveHitbox(this->marker) == HITBOX_1_BEAK_BUSTER
&& func_8028F20C()
&& gu_sqrtf(diff_pos[0]*diff_pos[0] + diff_pos[1]*diff_pos[1] + diff_pos[2]*diff_pos[2]) < 350.0f
){
@@ -91,38 +78,43 @@ void chhut_update(Actor *this){
diff_pos[1] = this->position_y;
diff_pos[2] = this->position_z;
diff_pos[1] += 125.0;
func_8030E484(SFX_5B_HEAVY_STUFF_FALLING);
subaddie_set_state(this, HUT_STATE_DAMAGED);
sfxsource_playHighPriority(SFX_5B_HEAVY_STUFF_FALLING);
subaddie_set_state(this, HUT_STATE_1_DAMAGED);
actor_playAnimationOnce(this);
__spawnQueue_add_1((GenFunction_1)func_803869EC, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1) __chhut_spawnExplosion, (s32) this->marker);
func_802C8F70(this->yaw);
if(D_8037DCB0 < 5){
__spawnQueue_add_4((GenFunction_4)func_802C4218, D_803898D8[D_8037DCB0], *(s32*)(&diff_pos[0]),*(s32*)(&diff_pos[1]),*(s32*)(&diff_pos[2]));
if (mm_hut_smash_count < 5) {
__spawnQueue_add_4((GenFunction_4) func_802C4218, D_803898D8[mm_hut_smash_count], *(s32 * )(&diff_pos[0]), *(s32 * )(&diff_pos[1]),*(s32 * )(&diff_pos[2]));
}
else{
else {
jiggy_spawn(JIGGY_5_MM_HUTS, diff_pos);
}
D_8037DCB0 = ( D_8037DCB0 + 1 ) % 6;
mm_hut_smash_count = (mm_hut_smash_count + 1) % 6;
}
break;
case HUT_STATE_DAMAGED:
if(animctrl_getAnimTimer(this->animctrl) > 0.99){
case HUT_STATE_1_DAMAGED:
if (animctrl_getAnimTimer(this->animctrl) > 0.99) {
animctrl_setTransitionDuration(this->animctrl, 0.0f);
subaddie_set_state(this, HUT_STATE_DESTROYED);
subaddie_set_state(this, HUT_STATE_2_DESTROYED);
this->position_y -= 160.0f;
}
break;
case HUT_STATE_DESTROYED:
case HUT_STATE_2_DESTROYED:
break;
}
}
void mm_resetHuts(void){
D_8037DCB0 = 0;
void mm_resetHuts(void) {
mm_hut_smash_count = 0;
}
ActorInfo chhutInfo = { MARKER_51_MM_HUT, ACTOR_9_MM_HUT, ASSET_7D7_MODEL_MM_HUT,
ActorInfo chhutInfo = {
MARKER_51_MM_HUT, ACTOR_9_MM_HUT, ASSET_7D7_MODEL_MM_HUT,
0, chhutAnimations,
chhut_update, func_80326224, chhut_draw,
0, 0x100, 0.0f, 0

View File

@@ -3,91 +3,106 @@
#include "variables.h"
/* extern functions */
int func_80353064(f32*, f32);
void func_802BB3DC(s32, f32, f32);
int func_80353064(f32 *, f32);
void func_802BB3DC(s32, f32, f32);
typedef struct{
s32 unk0;
s32 unk4;
TUPLE(f32, unk8);
f32 unk14;
s32 unk18;
}ActorLocal_Juju_2;
typedef struct {
s32 animation_state;
s32 animation_countdown;
TUPLE(f32, next_pos);
f32 scale;
s32 unk18;
} ActorLocal_Juju_2;
/* public functions */
void func_80389598(Actor *this);
Actor* func_80389014(ActorMarker *, Gfx **, Mtx**, Vtx** );
void chjuju_update(Actor *this);
Actor *chjuju_draw(ActorMarker *, Gfx **, Mtx **, Vtx **);
/* .bss */
u8 MM_pad_80389C80[0x10];
s32 MM_D_80389C90;
s32 mm_juju_count;
/* .data */
ActorInfo chjujuInfo = { MARKER_67_JUJU, ACTOR_59_JUJU, ASSET_2E6_MODEL_JUJU,
enum chjuju_animation_state_e {
JUJU_ANIMATION_STATE_1_YAWING = 1,
JUJU_ANIMATION_STATE_2_DESPAWNED,
JUJU_ANIMATION_STATE_3_WAITING_TO_FALL,
JUJU_ANIMATION_STATE_4_FALLING,
JUJU_ANIMATION_STATE_5_DISAPPEARING
};
ActorInfo chjujuInfo = {
MARKER_67_JUJU, ACTOR_59_JUJU, ASSET_2E6_MODEL_JUJU,
0, NULL,
func_80389598, func_80326224, func_80389014,
chjuju_update, func_80326224, chjuju_draw,
0, 0, 0.0f, 0
};
void func_80388FD0(Actor *this, f32 *arg1, f32 *arg2, s32 arg3){
/* .code */
void __chjuju_initialize(Actor *this, f32 *arg1, f32 *arg2, s32 animationState) {
ActorLocal_Juju_2 *local;
local = (ActorLocal_Juju_2 *)&this->local;
local->unk0 = arg3;
local->unk14 = 1.0f;
local = (ActorLocal_Juju_2 *) &this->local;
local->animation_state = animationState;
local->scale = 1.0f;
this->position_x = arg1[0];
this->position_y = arg1[1];
this->position_z = arg1[2];
local->unk8_x = arg2[0];
local->unk8_y = arg2[1];
local->unk8_z = arg2[2];
local->next_pos_x = arg2[0];
local->next_pos_y = arg2[1];
local->next_pos_z = arg2[2];
}
Actor* func_80389014(ActorMarker *this, Gfx **dl, Mtx **mPtr, Vtx **arg2){
Actor *chjuju_draw(ActorMarker *this, Gfx **dl, Mtx **mPtr, Vtx **arg2) {
f32 rotation[3];
Actor * actorPtr;
Actor *actorPtr;
ActorLocal_Juju_2 *jujuPtr;
actorPtr = marker_getActorAndRotation(this, rotation);
jujuPtr = (ActorLocal_Juju_2 *)&actorPtr->local;
if(jujuPtr->unk0 != 2){
jujuPtr = (ActorLocal_Juju_2 *) &actorPtr->local;
if (jujuPtr->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) {
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
modelRender_draw(dl, mPtr, actorPtr->position, rotation, jujuPtr->unk14, NULL, marker_loadModelBin(this));
modelRender_draw(dl, mPtr, actorPtr->position, rotation, jujuPtr->scale, NULL, marker_loadModelBin(this));
}
return actorPtr;
}
void func_803890A0(ActorMarker *marker, s32 arg1){
int s1;
Actor* actorPtr = marker_getActor(marker);
void __chjuju_initialize_all(ActorMarker *marker, s32 count) {
int should_spawn;
Actor *actorPtr = marker_getActor(marker);
f32 position[3];
s32 i;
Actor* jujuPtr;
Actor *jujuPtr;
position[0] = actorPtr->position_x;
position[1] = actorPtr->position_y;
position[2] = actorPtr->position_z;
for(i = 0; i < 4; i++){
for (i = 0; i < 4; i++) {
jujuPtr = spawn_actor_f32(ACTOR_59_JUJU, actorPtr->position, actorPtr->yaw);
jujuPtr->marker->collidable = FALSE;
actorPtr = marker_getActor(marker);
func_80388DE8(actorPtr, i, jujuPtr);
chjujuhitbox_setJuju(actorPtr, i, jujuPtr);
s1 = (i >= arg1);
func_80388FD0(jujuPtr, position, actorPtr->position, (s1)? 1 : 2);
should_spawn = (i >= count);
__chjuju_initialize(jujuPtr, position, actorPtr->position, should_spawn ? JUJU_ANIMATION_STATE_1_YAWING : JUJU_ANIMATION_STATE_2_DESPAWNED);
if(s1){
if (should_spawn) {
position[1] += 250.0f;
}
if(i == arg1){
((ActorLocal_Juju_2 *)&jujuPtr->local)->unk18 = 1;
if (i == count) {
((ActorLocal_Juju_2 *) &jujuPtr->local)->unk18 = TRUE;
}
}
}
void func_803891E8(s32 x, s32 y, s32 z, s32 yaw){
void __chjuju_spawnJiggy(s32 x, s32 y, s32 z, s32 yaw) {
f32 sp1C[3];
sp1C[0] = x;
sp1C[1] = y + 0x14;
@@ -95,13 +110,13 @@ void func_803891E8(s32 x, s32 y, s32 z, s32 yaw){
jiggy_spawn(JIGGY_4_MM_JUJU, sp1C);
}
void func_80389244(s32 x, s32 y, s32 z, s32 yaw){
__spawnQueue_add_4((GenFunction_4)func_803891E8, x, y, z, yaw);
void __chjuju_solvePuzzle(s32 x, s32 y, s32 z, s32 yaw) {
__spawnQueue_add_4((GenFunction_4) __chjuju_spawnJiggy, x, y, z, yaw);
func_802BB3DC(0, 10.0f, 0.8f);
gcpausemenu_80314AC8(1);
}
void func_803892A8(ActorMarker **ptr){
void func_803892A8(ActorMarker **ptr) {
s32 i;
s32 j;
s32 s2;
@@ -109,123 +124,141 @@ void func_803892A8(ActorMarker **ptr){
Actor *actorPtr;
ActorLocal_Juju_2 *jujuPtr;
for(i = 0; i < 4; i++){
for (i = 0; i < 4; i++) {
actorPtr = marker_getActor(ptr[i]);
jujuPtr = (ActorLocal_Juju_2 *)&actorPtr->local;
if(jujuPtr->unk0 != 2){
jujuPtr->unk0 = 5;
jujuPtr->unk4 = 0xC;
func_8030E484(0x3f6);
if(i == 3){
jujuPtr = (ActorLocal_Juju_2 *) &actorPtr->local;
if (jujuPtr->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) {
jujuPtr->animation_state = JUJU_ANIMATION_STATE_5_DISAPPEARING;
jujuPtr->animation_countdown = 12;
sfxsource_playHighPriority(0x3f6);
if (i == 3) {
gcpausemenu_80314AC8(0);
timedFunc_set_4(1.25f, func_80389244, jujuPtr->unk8_x, jujuPtr->unk8_y, jujuPtr->unk8_z, actorPtr->yaw);
timedFunc_set_4(1.25f, __chjuju_solvePuzzle, jujuPtr->next_pos_x, jujuPtr->next_pos_y, jujuPtr->next_pos_z, actorPtr->yaw);
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x6d60);
}
else{//L80389384
else {//L80389384
func_8025A6EC(COMUSIC_2B_DING_B, 0x7fff);
}
for(s2 = 3, j = i + 1; j < 4; s2+=5, j++){
actorPtr = marker_getActor(ptr[j]);
jujuPtr = (ActorLocal_Juju_2 *)&actorPtr->local;
if(j == i+1){
jujuPtr->unk18 = 1;
}
jujuPtr->unk4 = s2;
jujuPtr->unk0 = 3;
for (s2 = 3, j = i + 1; j < 4; s2 += 5, j++) {
actorPtr = marker_getActor(ptr[j]);
jujuPtr = (ActorLocal_Juju_2 *) &actorPtr->local;
if (j == i + 1) {
jujuPtr->unk18 = TRUE;
}
jujuPtr->animation_countdown = s2;
jujuPtr->animation_state = JUJU_ANIMATION_STATE_3_WAITING_TO_FALL;
}
return;
}
}
}
int func_8038941C(ActorMarker **ptr){
bool __chjuju_isEveryJujuDespawned(ActorMarker **ptr) {
s32 i;
ActorLocal_Juju_2 *jujuPtr;
for(i = 0; i < 4; i++){
jujuPtr = (ActorLocal_Juju_2 *)&marker_getActor(ptr[i])->local;
if(jujuPtr->unk0 != 2)
return 0;
for (i = 0; i < 4; i++) {
jujuPtr = (ActorLocal_Juju_2 *) &marker_getActor(ptr[i])->local;
if (jujuPtr->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) {
return FALSE;
}
}
return 1;
return TRUE;
}
int func_8038948C(ActorMarker **ptr){
bool __chjuju_isEveryJujuStable(ActorMarker **ptr) {
s32 i;
ActorLocal_Juju_2 *jujuPtr;
for(i = 0; i < 4; i++){
jujuPtr = (ActorLocal_Juju_2 *)&marker_getActor(ptr[i])->local;
if(jujuPtr->unk0 != 1 && jujuPtr->unk0 != 2)
return 0;
for (i = 0; i < 4; i++) {
jujuPtr = (ActorLocal_Juju_2 *) &marker_getActor(ptr[i])->local;
if (jujuPtr->animation_state != JUJU_ANIMATION_STATE_1_YAWING && jujuPtr->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) {
return FALSE;
}
}
return 1;
return TRUE;
}
void func_80389514(ActorMarker **ptr){
void __chjuju_updateCount(ActorMarker **ptr) {
s32 i;
MM_D_80389C90 = 0;
for(i = 0; i < 4; i++){
if(((ActorLocal_Juju_2 *)&marker_getActor(ptr[i])->local)->unk0 != 2){
MM_D_80389C90++;
};
mm_juju_count = 0;
for (i = 0; i < 4; i++) {
if (((ActorLocal_Juju_2 *) &marker_getActor(ptr[i])->local)->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) {
mm_juju_count++;
}
}
}
void func_80389598(Actor *this){
ActorLocal_Juju_2 *jujuPtr = (ActorLocal_Juju_2 *)&this->local;
s32 sp38 = 0;
f32 sp34;
f32 sp28[3];
this->marker->propPtr->unk8_3 = (jujuPtr->unk0 != 2) && (jujuPtr->unk0 != 5);
void chjuju_update(Actor *this) {
ActorLocal_Juju_2 *jujuPtr = (ActorLocal_Juju_2 *) &this->local;
s32 has_completed_full_turn = FALSE;
f32 previous_yaw;
f32 pos_offset[3];
switch(jujuPtr->unk0){
case 1: //L80389624
sp34 = this->yaw;
this->yaw += ((0xb - MM_D_80389C90*2)*time_getDelta()*60.0f)/2;
if(360.0f < this->yaw){
sp38 = 1;
this->marker->propPtr->unk8_3 = (jujuPtr->animation_state != JUJU_ANIMATION_STATE_2_DESPAWNED) && (jujuPtr->animation_state != JUJU_ANIMATION_STATE_5_DISAPPEARING);
switch (jujuPtr->animation_state) {
case JUJU_ANIMATION_STATE_1_YAWING: //L80389624
previous_yaw = this->yaw;
this->yaw += ((11 - mm_juju_count * 2) * time_getDelta() * 60.0f) / 2;
if (360.0f < this->yaw) {
has_completed_full_turn = TRUE;
this->yaw -= 360.0f;
}//L803896B4
if(jujuPtr->unk18){
if(sp38 || (sp34 < 180.0f && 180.0f <= this->yaw)){
mapSpecificFlags_set(9,1);
if (jujuPtr->unk18 && (has_completed_full_turn || (previous_yaw < 180.0f && 180.0f <= this->yaw))) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_9_JUJU_HAS_HALF_TURNED, TRUE);
}
break;
case JUJU_ANIMATION_STATE_3_WAITING_TO_FALL: //L80389700
if (--jujuPtr->animation_countdown == 0) {
jujuPtr->animation_state = JUJU_ANIMATION_STATE_4_FALLING;
jujuPtr->next_pos_y = this->position_y - 250.0f;
}
break;
case JUJU_ANIMATION_STATE_5_DISAPPEARING: //L80389738
jujuPtr->animation_countdown--;
jujuPtr->scale *= 0.85;
pos_offset[0] = 100.0f;
pos_offset[1] = 0.0f;
pos_offset[2] = 0.0f;
ml_vec3f_yaw_rotate_copy(pos_offset, pos_offset, this->yaw + 90.0);
this->position_x += pos_offset[0];
this->position_y += pos_offset[1];
this->position_z += pos_offset[2];
if (!jujuPtr->animation_countdown) {
jujuPtr->animation_state = JUJU_ANIMATION_STATE_2_DESPAWNED;
}
break;
case JUJU_ANIMATION_STATE_4_FALLING: //L803897F8
this->position_y -= 25.0;
if (jujuPtr->next_pos_y == this->position_y) {
jujuPtr->animation_state = JUJU_ANIMATION_STATE_1_YAWING;
sfxsource_playHighPriority(SFX_3_DULL_CANNON_SHOT);
func_802BB3DC(0, 10.0f, 0.8f);
if (jujuPtr->unk18) {
func_80353064(this->position, 24.0f);
}
}
break;
case 3: //L80389700
if(--jujuPtr->unk4 == 0){
jujuPtr->unk0 = 4;
jujuPtr->unk8_y = this->position_y - 250.0f;
}
break;
case 5: //L80389738
jujuPtr->unk4--;
jujuPtr->unk14 *= 0.85;
{sp28[0] = 100.0f;
sp28[1] = 0.0f;
sp28[2] = 0.0f;}
ml_vec3f_yaw_rotate_copy(sp28, sp28, this->yaw + 90.0);
this->position_x += sp28[0];
this->position_y += sp28[1];
this->position_z += sp28[2];
if(!jujuPtr->unk4){
jujuPtr->unk0 = 2;
}
break;
case 4: //L803897F8
this->position_y -= 25.0;
if(jujuPtr->unk8_y == this->position_y){
jujuPtr->unk0 = 1;
func_8030E484(SFX_3_DULL_CANNON_SHOT);
func_802BB3DC(0, 10.0f, 0.8f);
if(jujuPtr->unk18)
func_80353064(this->position, 24.0f);
}
break;
}//L8038987C
}

View File

@@ -4,161 +4,164 @@
#include "variables.h"
/* extern functions */
void func_80388DFC(ActorMarker *, s32);
s32 func_80329784(Actor *);
void __chjujuhitbox_initialize_all(ActorMarker *, s32);
s32 func_80329784(Actor *);
void func_80353580(ActorMarker *);
typedef struct juju_hitbox_s{
u8 pad0[0x4];
s32 unk4;
ActorMarker *unk8[4];
f32 unk18;
}ActorLocal_JujuHitbox;
typedef struct juju_hitbox_s {
u8 pad0[0x4];
s32 unk4;
ActorMarker *jujus[4];
f32 unk18;
} ActorLocal_JujuHitbox;
/* public functions */
void func_80388E20(Actor *this);
Actor* func_80388DC0(ActorMarker *, Gfx **, Mtx**, Vtx **);
void func_80388DE8(Actor* this, s32 slave_id, Actor *slavePtr);
void chjujuhitbox_update(Actor *this);
Actor *chjujuhitbox_draw(ActorMarker *, Gfx **, Mtx **, Vtx **);
void chjujuhitbox_setJuju(Actor *this, s32 slave_id, Actor *slavePtr);
/* .data */
ActorInfo chjujuhitboxInfo = { MARKER_67_JUJU, ACTOR_11_JUJU_CTRL, 0,
ActorInfo chjujuhitboxInfo = {
MARKER_67_JUJU, ACTOR_11_JUJU_CTRL, 0,
3, NULL,
func_80388E20, func_80326224, func_80388DC0,
chjujuhitbox_update, func_80326224, chjujuhitbox_draw,
0, 0, 0.0f, 0
};
int func_80388B30(Actor *this, float arg1){
/* code */
bool func_80388B30(Actor *this, float arg1) {
f32 yaw;
yaw = this->yaw - func_80329784(this);
if(180.0f <= yaw){
if (180.0f <= yaw) {
yaw -= 360.0f;
}
else if(yaw < -180.0f){
else if (yaw < -180.0f) {
yaw += 360.0f;
}
if (yaw < 0.0f){
if (yaw < 0.0f) {
yaw = -yaw;
}
if (yaw < arg1){
return 1;
if (yaw < arg1) {
return TRUE;
}
return 0;
return FALSE;
}
void func_80388BEC(NodeProp *node, ActorMarker *marker){
void func_80388BEC(NodeProp *node, ActorMarker *marker) {
f32 distance_to_closest_actor;
Actor *closest_actor;
Actor *temp_v0;
f32 position[3];
position[0] = (f32)node->x;
position[1] = (f32)node->y;
position[2] = (f32)node->z;
position[0] = (f32) node->x;
position[1] = (f32) node->y;
position[2] = (f32) node->z;
closest_actor = actorArray_findClosestActorFromActorId(position, 0x11, -1, &distance_to_closest_actor);
closest_actor = actorArray_findClosestActorFromActorId(position, ACTOR_11_JUJU_CTRL, -1, &distance_to_closest_actor);
if( closest_actor != NULL
&& !( distance_to_closest_actor > 500.0f )
&& (closest_actor->state ==3)
){
temp_v0 = marker_getActor(((ActorLocal_JujuHitbox *)&closest_actor->local)->unk8[((ActorLocal_JujuHitbox *)&closest_actor->local)->unk4]);
if (closest_actor != NULL
&& !(distance_to_closest_actor > 500.0f)
&& (closest_actor->state == 3)
) {
temp_v0 = marker_getActor(((ActorLocal_JujuHitbox *) &closest_actor->local)->jujus[((ActorLocal_JujuHitbox *) &closest_actor->local)->unk4]);
if(temp_v0 != NULL){
if(func_80388B30(temp_v0, 90.0f)){
if (temp_v0 != NULL) {
if (func_80388B30(temp_v0, 90.0f)) {
closest_actor->state = 1;
((ActorLocal_JujuHitbox *)&closest_actor->local)->unk4++;
func_803892A8(((ActorLocal_JujuHitbox *)&closest_actor->local)->unk8);
((ActorLocal_JujuHitbox *) &closest_actor->local)->unk4++;
func_803892A8(((ActorLocal_JujuHitbox *) &closest_actor->local)->jujus);
func_80353580(marker);
__spawnQueue_add_4((GenFunction_4)func_802C4140, 0x58, *(s32 *)&position[0], *(s32 *)&position[1], *(s32 *)&position[2]);
__spawnQueue_add_4((GenFunction_4) func_802C4140, 0x58, *(s32 * ) & position[0], *(s32 * ) & position[1], *(s32 * ) & position[2]);
}
}
}
}
void func_80388D14(Actor *this){
void __chjujuhitbox_playRubbingSfx(Actor *this) {
ActorLocal_JujuHitbox *jujuCtlPtr;
jujuCtlPtr = (ActorLocal_JujuHitbox *)&this->local;
func_8030E878(0x3F6, jujuCtlPtr->unk18, 20000, this->position, 300.0f, 2000.0f);
jujuCtlPtr = (ActorLocal_JujuHitbox *) &this->local;
func_8030E878(SFX_3F6_RUBBING, jujuCtlPtr->unk18, 20000, this->position, 300.0f, 2000.0f);
}
void func_80388D60(Actor *this){
void func_80388D60(Actor *this) {
ActorLocal_JujuHitbox *jujuCtlPtr;
jujuCtlPtr = (ActorLocal_JujuHitbox *)&this->local;
if(!func_8038941C(jujuCtlPtr->unk8)){
jujuCtlPtr = (ActorLocal_JujuHitbox *) &this->local;
if (!__chjuju_isEveryJujuDespawned(jujuCtlPtr->jujus)) {
jujuCtlPtr->unk18 *= 1.05;
}
this->state = 3;
}
Actor* func_80388DC0(ActorMarker *this, Gfx **dl, Mtx**mPtr, Vtx **arg3){
Actor *chjujuhitbox_draw(ActorMarker *this, Gfx **dl, Mtx **mPtr, Vtx **arg3) {
return marker_getActor(this);
}
void func_80388DE8(Actor *this, s32 child_id, Actor *childPtr){
void chjujuhitbox_setJuju(Actor *this, s32 child_id, Actor *childPtr) {
ActorLocal_JujuHitbox *jujuCtlPtr;
jujuCtlPtr = (ActorLocal_JujuHitbox *)&this->local;
jujuCtlPtr->unk8[child_id] = childPtr->marker;
jujuCtlPtr = (ActorLocal_JujuHitbox *) &this->local;
jujuCtlPtr->jujus[child_id] = childPtr->marker;
}
void func_80388DFC(ActorMarker *arg0, s32 arg1){
func_803890A0(arg0, arg1);
void __chjujuhitbox_initialize_all(ActorMarker *marker, s32 count) {
__chjuju_initialize_all(marker, count);
if(arg0 && arg1); //for args to save
if (marker && count); //for args to save
}
void func_80388E20(Actor *this){
void chjujuhitbox_update(Actor *this) {
ActorLocal_JujuHitbox *jujuCtlPtr;
s32 i;
jujuCtlPtr = (ActorLocal_JujuHitbox *)&this->local;
if(!this->initialized){
jujuCtlPtr = (ActorLocal_JujuHitbox *) &this->local;
if (!this->initialized) {
this->initialized = TRUE;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
jujuCtlPtr->unk18 = 0.5f;
}
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
__spawnQueue_add_2((GenFunction_2)func_80388DFC,this->marker, jujuCtlPtr->unk4);
func_80388D14(this);
}else{
if( func_80329530(this, 0xfa)
&& !func_80329530(this, 0x50)
&& !func_8028ECAC()
){
if( !this->is_first_encounter ){
if(func_80311480(ASSET_B44_TEXT_JUJU_MEET, 0, 0, 0, NULL, NULL)){
this->is_first_encounter = TRUE;
}
}
}
if(this->state == 1){
if(func_8038948C(jujuCtlPtr->unk8)){
func_80388D60(this);
}
if(func_8038941C(jujuCtlPtr->unk8)){
marker_despawn(this->marker);
for(i = 0; i < 4; i++){
marker_despawn(jujuCtlPtr->unk8[i]);
}
return;
}
}
else{
func_80389514(jujuCtlPtr->unk8);
}
if(mapSpecificFlags_get(0x9)){
func_80388D14(this);
mapSpecificFlags_set(0x9, 0);
if (!this->volatile_initialized) {
this->volatile_initialized = TRUE;
__spawnQueue_add_2((GenFunction_2) __chjujuhitbox_initialize_all, this->marker, jujuCtlPtr->unk4);
__chjujuhitbox_playRubbingSfx(this);
return;
}
if (func_80329530(this, 0xfa) && !func_80329530(this, 0x50) && !func_8028ECAC()) {
if (!this->has_met_before && gcdialog_showText(ASSET_B44_TEXT_JUJU_MEET, 0, 0, 0, NULL, NULL)) {
this->has_met_before = TRUE;
}
}
if (this->state == 1) {
if (__chjuju_isEveryJujuStable(jujuCtlPtr->jujus)) {
func_80388D60(this);
}
if (__chjuju_isEveryJujuDespawned(jujuCtlPtr->jujus)) {
marker_despawn(this->marker);
for (i = 0; i < 4; i++) {
marker_despawn(jujuCtlPtr->jujus[i]);
}
return;
}
}
else {
__chjuju_updateCount(jujuCtlPtr->jujus);
}
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_9_JUJU_HAS_HALF_TURNED)) {
__chjujuhitbox_playRubbingSfx(this);
mapSpecificFlags_set(MM_SPECIFIC_FLAG_9_JUJU_HAS_HALF_TURNED, FALSE);
}
}

View File

@@ -2,49 +2,61 @@
#include "functions.h"
#include "variables.h"
/* external function declarations */
void func_8028E668(f32 *, f32, f32, f32);
int actor_animationIsAt(Actor *, f32);
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
void timed_exitStaticCamera(f32);
void func_80324E38(f32,s32);
void func_80324E38(f32, s32);
void timed_setStaticCameraToNode(f32, s32);
s32 func_8028F31C(f32 *, f32, s32, Actor **);
s32 player_setCarryObjectPoseInHorizontalRadius(f32 *, f32, s32, Actor **);
void func_8028FA34(s32, Actor *);
void chLMonkey_update(Actor *);
/* public function declarations */
void chlmonkey_update(Actor *);
/* .data */
enum chlmonkey_state_e {
LMONKEY_STATE_1_IDLE = 1,
LMONKEY_STATE_2_JUMPING,
LMONKEY_STATE_3_WALKING,
LMONKEY_STATE_4_LEAVING
};
ActorAnimationInfo chlmonkeyAnimations[5] = {
{0, 0.0f},
{0, 0.0f},
{ASSET_5C_ANIM_CHIMPY_IDLE, 2.3f},
{ASSET_5B_ANIM_CHIMPY_JUMP, 0.67f},
{ASSET_5D_ANIM_CHIMPY_WALK, 0.5f},
{ASSET_5C_ANIM_CHIMPY_IDLE, 2.3f}
};
ActorInfo chlmonkeyInfo = { MARKER_A_CHIMPY, ACTOR_F_CHIMPY, ASSET_35D_MODEL_CHIMPY,
ActorInfo chlmonkeyInfo = {
MARKER_A_CHIMPY, ACTOR_F_CHIMPY, ASSET_35D_MODEL_CHIMPY,
1, chlmonkeyAnimations,
NULL, chLMonkey_update, actor_draw,
NULL, chlmonkey_update, actor_draw,
2500, 0, 0.8f, 0
};
/* .code */
void func_80388300(Actor **arg0){
func_8028F31C((*arg0)->position, 800.0f, ACTOR_29_ORANGE_COLLECTIBLE, arg0);
if( func_80329530(*arg0, 345)
&& bacarry_get_markerId() == MARKER_36_ORANGE_COLLECTIBLE
&& func_8028FC34()
){
func_8028FA34(0xc6, *arg0);
(*arg0)->is_first_encounter = TRUE;
void __chlmonkey_updateBringOrange(Actor **this_ptr) {
player_setCarryObjectPoseInHorizontalRadius((*this_ptr)->position, 800.0f, ACTOR_29_ORANGE_COLLECTIBLE, this_ptr);
if (func_80329530(*this_ptr, 345) &&
bacarry_get_markerId() == MARKER_36_ORANGE_COLLECTIBLE &&
player_throwCarriedObject()) {
func_8028FA34(0xc6, *this_ptr);
(*this_ptr)->has_met_before = TRUE;
timed_setStaticCameraToNode(1.2f, 0xF);
func_80324E38(1.2f, 3);
}
if(arg0);
if (this_ptr);
}
void __chLMonkey_playRandomNoise(Actor *this){
void __chlmonkey_playRandomNoise(Actor *this) {
f32 scaled_noise_volume;
f32 random_noise;
static sNoiseCooldown = 0;
@@ -53,83 +65,98 @@ void __chLMonkey_playRandomNoise(Actor *this){
random_noise = randf();
sNoiseCooldown--;
if(sNoiseCooldown < 0){
if(randf() < 0.2){
sNoiseCooldown = 6;
func_8030E6A4(((random_noise < 0.5) ? SFX_58_CHIMPY_NOISE_1 : SFX_59_CHIMPY_NOISE_2 ), randf()*0.25 + 0.85, scaled_noise_volume);
}
if (sNoiseCooldown < 0 && randf() < 0.2) {
sNoiseCooldown = 6;
func_8030E6A4(((random_noise < 0.5) ? SFX_58_CHIMPY_NOISE_1 : SFX_59_CHIMPY_NOISE_2), randf() * 0.25 + 0.85, scaled_noise_volume);
}
}
void __chLMonkey_spawnJiggy(s32 x, s32 y, s32 z){
f32 sp1C[3];
TUPLE_ASSIGN(sp1C, x, y, z);
jiggy_spawn(JIGGY_9_MM_CHIMPY, sp1C);
void __chlmonkey_spawnJiggy(s32 x, s32 y, s32 z) {
f32 pos[3];
TUPLE_ASSIGN(pos, x, y, z)
jiggy_spawn(JIGGY_9_MM_CHIMPY, pos);
}
void __chLMonkey_complete(ActorMarker *marker, enum asset_e arg1, s32 arg2){
Actor * actor = marker_getActor(marker);
mapSpecificFlags_set(4,1);
subaddie_set_state(actor, 3);
void __chlmonkey_complete(ActorMarker *marker, enum asset_e unused_1, s32 unused_2) {
Actor *actor = marker_getActor(marker);
mapSpecificFlags_set(MM_SPECIFIC_FLAG_4_SHAKE, TRUE);
subaddie_set_state(actor, LMONKEY_STATE_3_WALKING);
timed_setStaticCameraToNode(2.3f, 0x12);
timedFunc_set_3(2.9f,__chLMonkey_spawnJiggy, actor->position_x, actor->position_y + 150.0f, actor->position_z);
timedFunc_set_3(2.9f, __chlmonkey_spawnJiggy, actor->position_x, actor->position_y + 150.0f, actor->position_z);
timed_exitStaticCamera(4.3f);
func_80324E38(4.3f, 0);
}
void chLMonkey_update(Actor *this){
void chlmonkey_update(Actor *this) {
func_8028E668(this->position, 35.0f, 0.0f, 65.0f);
actor_collisionOff(this);
this->marker->propPtr->unk8_3 = 1;
if(map_get() != MAP_2_MM_MUMBOS_MOUNTAIN){
if (map_get() != MAP_2_MM_MUMBOS_MOUNTAIN) {
func_80343DEC(this);
}else{//L80388630
if(func_80329530(this, 700) && !func_803114B0()){
__chLMonkey_playRandomNoise(this);
}
else {//L80388630
if (func_80329530(this, 700) && !func_803114B0()) {
__chlmonkey_playRandomNoise(this);
}//L8038865C
switch(this->state){
case 1://L80388690
if(mapSpecificFlags_get(2)){
subaddie_set_state(this, 4);
if(!jiggyscore_isCollected(JIGGY_9_MM_CHIMPY)){
func_80311480(ASSET_B40_DIALOG_CHIMPY_COMPLETE, 0xE, this->position, this->marker, __chLMonkey_complete, NULL);
}else{//L803886E8
__chLMonkey_complete(this->marker, ASSET_B40_DIALOG_CHIMPY_COMPLETE, -1);
switch (this->state) {
case LMONKEY_STATE_1_IDLE://L80388690
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED)) {
subaddie_set_state(this, LMONKEY_STATE_4_LEAVING);
if (!jiggyscore_isCollected(JIGGY_9_MM_CHIMPY)) {
gcdialog_showText(ASSET_B40_DIALOG_CHIMPY_COMPLETE, 0xE, this->position, this->marker, __chlmonkey_complete, NULL);
}
else {//L803886E8
__chlmonkey_complete(this->marker, ASSET_B40_DIALOG_CHIMPY_COMPLETE, -1);
}//L80388898
}else{
func_80388300(&this);
if( func_80329530(this, 345)
&& !func_80329530(this, 150)
&& !item_getCount(ITEM_19_ORANGE)
&& !this->is_first_encounter
){
func_80311480(ASSET_B3F_DIALOG_CHIMPY_MEET, 0xe, this->position, NULL, NULL, NULL);
this->is_first_encounter = TRUE;
}
else {
__chlmonkey_updateBringOrange(&this);
if (func_80329530(this, 345) &&
!func_80329530(this, 150) &&
!item_getCount(ITEM_19_ORANGE) &&
!this->has_met_before) {
gcdialog_showText(ASSET_B3F_DIALOG_CHIMPY_MEET, 0xe, this->position, NULL, NULL, NULL);
this->has_met_before = TRUE;
}//L80388774
actor_loopAnimation(this);
subaddie_maybe_set_state_position_direction(this, 2, 0.0f, -1, 0.02f);
subaddie_maybe_set_state_position_direction(this, LMONKEY_STATE_2_JUMPING, 0.0f, -1, 0.02f);
}
break;
case 2: //L803887A4
func_80388300(&this);
case LMONKEY_STATE_2_JUMPING: //L803887A4
__chlmonkey_updateBringOrange(&this);
actor_playAnimationOnce(this);
if(actor_animationIsAt(this, 0.99f)){
subaddie_set_state_with_direction(this,1,0.0f,-1);
if (actor_animationIsAt(this, 0.99f)) {
subaddie_set_state_with_direction(this, LMONKEY_STATE_1_IDLE, 0.0f, -1);
}
break;
case 4: //L803887E4
case LMONKEY_STATE_4_LEAVING: //L803887E4
actor_loopAnimation(this);
break;
case 3: //L803887F4
case LMONKEY_STATE_3_WALKING: //L803887F4
func_80343DEC(this);
actor_loopAnimation(this);
if(0.19 <= this->unk48){
mapSpecificFlags_set(0, 1);
if (0.19 <= this->unk48) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED, TRUE);
}
if(0.24 <= this->unk48){
mapSpecificFlags_set(3, 1);
if (0.24 <= this->unk48) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED, TRUE);
}
if(0.99 <= this->unk48){
if (0.99 <= this->unk48) {
marker_despawn(this->marker);
}
break;

View File

@@ -3,103 +3,105 @@
#include "functions.h"
#include "variables.h"
#ifndef MIN
#define MIN(s,t) ((s < t)?(s):(t))
#endif
#ifndef ORANGE_FALLING_STATE
#define ORANGE_FALLING_STATE 1
#endif
#ifndef ORANGE_LANDED_STATE
#define ORANGE_LANDED_STATE 2
#endif
/* extern functions */
f32 mapModel_getFloorY(f32*);
f32 mapModel_getFloorY(f32 *);
/* public functions */
void MM_func_80387FF4(Actor *this);
Actor* func_80388188(ActorMarker *, Gfx **, Mtx**, Vtx**);
void chorange_update(Actor *this);
Actor *chorange_draw(ActorMarker *, Gfx **, Mtx **, Vtx **);
/* .data */
ActorInfo chorangeInfo = { MARKER_C_ORANGE_PROJECTILE, ACTOR_14_ORANGE_PROJECTILE, ASSET_2D2_MODEL_ORANGE,
enum chorange_state_e {
ORANGE_STATE_1_FALLING = 1,
ORANGE_STATE_2_LANDED
};
ActorInfo chorangeInfo = {
MARKER_C_ORANGE_PROJECTILE, ACTOR_14_ORANGE_PROJECTILE, ASSET_2D2_MODEL_ORANGE,
1, NULL,
MM_func_80387FF4, func_80326224, func_80388188,
chorange_update, func_80326224, chorange_draw,
0, 0, 0.6f, 0
};
f32 D_803899F4[3] = {0.0f,-8.0f, 0.0f};
f32 D_803899F4[3] = {0.0f, -8.0f, 0.0f};
f32 D_80389A00[3] = {0.0f, 0.0f, 0.0f};
void func_80387F90(ActorMarker *arg0, ActorMarker *other_marker){
if( !func_8028F22C(arg0)
&& !mapSpecificFlags_get(mapflag_mm_main_hit_with_orange)
&& func_80311480(ASSET_B3A_TEXT_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)
){
mapSpecificFlags_set(mapflag_mm_main_hit_with_orange, 1);
/* .code */
void __chorange_collisionCallback(ActorMarker *marker, ActorMarker *other_marker) {
if (!player_isDead() &&
!mapSpecificFlags_get(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE) &&
gcdialog_showText(ASSET_B3A_TEXT_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE, TRUE);
}
if(arg0);
if (marker);
}
void MM_func_80387FF4(Actor * this){
f32 ground_position_y;
void chorange_update(Actor *this) {
f32 floor_position_y;
f32 velocity_y;
if(!this->initialized){
if (!this->initialized) {
this->marker->unk2C_1 = 1;
marker_setCollisionScripts(this->marker, NULL, func_80387F90, NULL);
marker_setCollisionScripts(this->marker, NULL, __chorange_collisionCallback, NULL);
}
switch(this->state){
case ORANGE_FALLING_STATE:
switch (this->state) {
case ORANGE_STATE_1_FALLING:
this->position_x += this->velocity_x;
velocity_y = this->velocity_y - 5.0;
this->velocity_y = velocity_y;
this->position_y += velocity_y;
this->position_z += this->velocity_z;
ground_position_y = mapModel_getFloorY(this->position);
floor_position_y = mapModel_getFloorY(this->position);
if(this->position_y < ground_position_y){
this->position_y = ground_position_y;
this->unk1C_y = ground_position_y;
if (this->position_y < floor_position_y) {
this->position_y = floor_position_y;
this->unk1C_y = floor_position_y;
func_8030E6D4(SFX_2F_ORANGE_SPLAT);
this->unk28 = 1.0f;
this->actor_specific_1_f = 1.0f;
this->lifetime_value = 340.0f;
this->state = 2;
this->state = ORANGE_STATE_2_LANDED;
}
break;
case ORANGE_LANDED_STATE:
if(this->lifetime_value < 324.0){
case ORANGE_STATE_2_LANDED:
if (this->lifetime_value < 324.0) {
this->marker->collidable = FALSE;
}
this->lifetime_value -= 4.0;
if(this->lifetime_value < 4.0){
if (this->lifetime_value < 4.0) {
marker_despawn(this->marker);
}
break;
}
}
Actor *func_80388188(ActorMarker *this, Gfx **dl, Mtx **mptr, Vtx **vtx){
Actor* actorPtr = actor_drawFullDepth(this, dl, mptr, vtx);
Actor *chorange_draw(ActorMarker *this, Gfx **dl, Mtx **mptr, Vtx **vtx) {
Actor *actorPtr = actor_drawFullDepth(this, dl, mptr, vtx);
f32 sp60[3] = D_803899F4;
f32 rotation[3] = D_80389A00;
f32 position[3];
if(actorPtr->state == 2){
if (actorPtr->state == ORANGE_STATE_2_LANDED) {
position[0] = actorPtr->position_x;
position[1] = actorPtr->unk1C_y + 3.0f;
position[2] = actorPtr->position_z;
modelRender_setAlpha( (s32) MIN(255.0f, actorPtr->lifetime_value) );
modelRender_setAlpha((s32) MIN(255.0f, actorPtr->lifetime_value));
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
modelRender_draw(dl, mptr, position, rotation, actorPtr->unk28, sp60, func_8030A428(0x18));
modelRender_draw(dl, mptr, position, rotation, actorPtr->actor_specific_1_f, sp60, func_8030A428(0x18));
actorPtr->position_y -= 1.9;
if(actorPtr->unk28 < 2.428){
actorPtr->unk28 += 0.1;
if (actorPtr->actor_specific_1_f < 2.428) {
actorPtr->actor_specific_1_f += 0.1;
}
}
return actorPtr;
}

View File

@@ -7,27 +7,25 @@ void func_80326224(Actor *);
void func_80329904(ActorMarker *, s32, void *);
extern void func_802EFA20(ParticleEmitter *, f32, f32);
/* public functions */
void func_80386768(Actor *);
void chorangepad_update(Actor *);
/* .data */
ActorInfo chorangepadInfo = { MARKER_66_ORANGE_PAD, ACTOR_57_ORANGE_PAD, ASSET_2EB_MODEL_ORANGE_PAD,
ActorInfo chorangepadInfo = {
MARKER_66_ORANGE_PAD, ACTOR_57_ORANGE_PAD, ASSET_2EB_MODEL_ORANGE_PAD,
0, NULL,
func_80386768, func_80326224, actor_draw,
chorangepad_update, func_80326224, actor_draw,
0, 0, 0.0f, 0
};
/*.code */
void MM_func_803863F0(s32 x, s32 y, s32 z){
void __chorangepad_spawnJiggy(s32 x, s32 y, s32 z) {
f32 pos[3];
TUPLE_ASSIGN(pos, x, y, z);
jiggy_spawn(JIGGY_8_MM_ORANGE_PADS, pos);
}
void func_80386444(ActorMarker *marker){
void func_80386444(ActorMarker *marker) {
f32 distance_to_orange_pad;
Actor *closest_orange_pad;
f32 position[3];
@@ -39,25 +37,25 @@ void func_80386444(ActorMarker *marker){
position[2] = marker->propPtr->z;
closest_orange_pad = actorArray_findClosestActorFromActorId(position, ACTOR_57_ORANGE_PAD, 1, &distance_to_orange_pad);
if(closest_orange_pad && !(500.0f < distance_to_orange_pad)){
if (closest_orange_pad && !(500.0f < distance_to_orange_pad)) {
closest_orange_pad->state = 1;
if(actorArray_findClosestActorFromActorId(position, ACTOR_57_ORANGE_PAD, 1, &distance_to_orange_pad)){
if (actorArray_findClosestActorFromActorId(position, ACTOR_57_ORANGE_PAD, 1, &distance_to_orange_pad)) {
func_8025A6EC(COMUSIC_2B_DING_B, 22000);
}else{
}
else {
temp_a0 = (closest_orange_pad->unk78_13 == 0x106) ? 0x10
: (closest_orange_pad->unk78_13 == 0x76) ? 0xf
: 0xe;
func_802BAFE4(temp_a0);
position[1] += 50.0f;
timedFunc_set_3(0.6f, (GenFunction_3) MM_func_803863F0, (s32)position[0], (s32)position[1], (s32)position[2]);
timedFunc_set_3(0.6f, (GenFunction_3) __chorangepad_spawnJiggy, (s32) position[0], (s32) position[1], (s32) position[2]);
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
if(!jiggyscore_isCollected(JIGGY_8_MM_ORANGE_PADS)){
func_80311480(0xB3B, 4, NULL, NULL, NULL, NULL);
if (!jiggyscore_isCollected(JIGGY_8_MM_ORANGE_PADS)) {
gcdialog_showText(0xB3B, 4, NULL, NULL, NULL, NULL);
}
}// L803865D8
@@ -67,21 +65,9 @@ void func_80386444(ActorMarker *marker){
particleEmitter_setModel(p_ctrl, 0x89f);
particleEmitter_setStartingScaleRange(p_ctrl, 0.09f, 0.19f);
particleEmitter_setFinalScaleRange(p_ctrl, 0.0f, 0.0f);
particleEmitter_setParticleVelocityRange(p_ctrl,
-200.0f, 500.0f, -200.0f,
200.0f, 700.0f, 200.0f
);
particleEmitter_setParticleAccelerationRange(p_ctrl,
0.0f, -1200.0f, 0.0f,
0.0f, -1200.0f, 0.0f
);
particleEmitter_setAngularVelocityRange(p_ctrl,
-600.0f, -600.0f, -600.0f,
600.0f, 600.0f, 600.0f
);
particleEmitter_setParticleVelocityRange(p_ctrl, -200.0f, 500.0f, -200.0f, 200.0f, 700.0f, 200.0f);
particleEmitter_setParticleAccelerationRange(p_ctrl, 0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f);
particleEmitter_setAngularVelocityRange(p_ctrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f);
particleEmitter_setSpawnIntervalRange(p_ctrl, 0.0f, 0.01f);
particleEmitter_setParticleLifeTimeRange(p_ctrl, 4.0f, 4.0f);
func_802EF9F8(p_ctrl, 0.01f);
@@ -95,49 +81,50 @@ void func_80386744(s32 arg0, ActorMarker *arg1) {
func_80386444(arg1);
}
void func_80386768(Actor * this){
void chorangepad_update(Actor *this) {
Actor *closest_actor;
f32 unused;
f32 min_distance;
if(!this->initialized){
if (!this->initialized) {
this->marker->propPtr->unk8_3 = 1;
actor_collisionOff(this);
this->initialized = TRUE;
}//L803867B0
if(!this->volatile_initialized){
this->unk100 = actorArray_findClosestActorFromActorId(this->position, 8,-1, &min_distance)->marker;
if (!this->volatile_initialized) {
this->unk100 = actorArray_findClosestActorFromActorId(this->position, 8, -1, &min_distance)->marker;
this->volatile_initialized = TRUE;
}//L803867E0
if(this->unk100){
if (this->unk100) {
closest_actor = marker_getActor(this->unk100);
}
if( func_80329530(this, 0x28)
&& !func_8028ECAC()
&& !mapSpecificFlags_get(6)
&& closest_actor->state != 3
){
if(func_80311480(0xb3d, 0, NULL, NULL, NULL, NULL)) {
mapSpecificFlags_set(6,1);
if (func_80329530(this, 0x28) &&
!func_8028ECAC() &&
!mapSpecificFlags_get(MM_SPECIFIC_FLAG_6_UNKNOWN) &&
closest_actor->state != 3) {
if (gcdialog_showText(0xb3d, 0, NULL, NULL, NULL, NULL)) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_6_UNKNOWN, TRUE);
}
}
if(this->state == 1){
if(this->lifetime_value < 72.0f){
if (this->state == 1) {
if (this->lifetime_value < 72.0f) {
func_8033E73C(this->marker, 5, func_80329904);
func_8033E3F0(9, this->marker->unk14_21);
}
this->lifetime_value = MIN(255.0, this->lifetime_value + 7.0);
if(255.0 == this->lifetime_value){
if (255.0 == this->lifetime_value) {
marker_despawn(this->marker);
}
}else{
}
else {
}//L80386928
actor_setOpacity(this, 0xFF - (s32)this->lifetime_value);
actor_setOpacity(this, 0xFF - (s32) this->lifetime_value);
}//*/

View File

@@ -16,7 +16,7 @@ void func_80387EC0(void) {
u32 temp_a0;
temp_v0 = (u32* )chmumbo_func_802D1724;
if (getGameMode() != 7) {
if (getGameMode() != GAME_MODE_7_ATTRACT_DEMO) {
temp_a0 = (temp_v0[2] & 0x03FFFFFF)*4; //get offset
temp_a0 += (u32)&temp_v0[3] & 0xF0000000; //get region
((u32 *)temp_a0)[0] = 0x03E00008; //jr $ra

View File

@@ -36,7 +36,7 @@ void __chLoggo_textCallback(ActorMarker* caller, enum asset_e text_id, s32 arg3)
void __chLoggo_collide(ActorMarker* this_marker, ActorMarker *other_marker) {
Actor *this = marker_getActor(this_marker);
if ((player_getTransformation() == TRANSFORM_3_PUMPKIN) && !fileProgressFlag_get(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN)) {
if (func_80311480(ASSET_ADF_TEXT_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) {
if (gcdialog_showText(ASSET_ADF_TEXT_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) {
actor_collisionOff(this);
fileProgressFlag_set(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN, TRUE);
@@ -50,7 +50,7 @@ void __chLoggo_collide(ActorMarker* this_marker, ActorMarker *other_marker) {
}
if ((player_getTransformation() == TRANSFORM_1_BANJO) && !fileProgressFlag_get(FILEPROG_88_TRIED_LOGGO_AS_BEAR)){
if(func_80311480(ASSET_ADE_TEXT_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) {
if(gcdialog_showText(ASSET_ADE_TEXT_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_88_TRIED_LOGGO_AS_BEAR, TRUE);
}
}
@@ -71,7 +71,7 @@ void chLoggo_update(Actor *this){
actor_loopAnimation(this);
this->lifetime_value = 0.0f;
if(!fileProgressFlag_get(FILEPROG_8A_EXITED_LOGGO) && levelSpecificFlags_get(0x33)){
if(func_80311480(ASSET_AE0_TEXT_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)){
if(gcdialog_showText(ASSET_AE0_TEXT_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)){
fileProgressFlag_set(FILEPROG_8A_EXITED_LOGGO, TRUE);
}
}

View File

@@ -42,11 +42,11 @@ void __chnapper_setState(Actor *this, s32 next_state){
if(next_state == 3){
skeletalAnim_set(this->unk148, ASSET_A5_ANIM_NAPPER_WALK, 0.2f, 1.5f);
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_8030E484(SFX_41_MUMBO_ERGHHH);
sfxsource_playHighPriority(SFX_41_MUMBO_ERGHHH);
}
if(next_state == 4){
func_8030E484(SFX_C_TAKING_FLIGHT_LIFTOFF);
sfxsource_playHighPriority(SFX_C_TAKING_FLIGHT_LIFTOFF);
func_803895B0(0);
}
@@ -62,9 +62,9 @@ void __chnapper_setState(Actor *this, s32 next_state){
void func_80386ACC(ActorMarker *this_marker, ActorMarker *other_marker){
Actor *this = marker_getActor(this_marker);
if(!this->is_first_encounter){
if(func_80311480(0xad8, 0, NULL, NULL, NULL, NULL)){
this->is_first_encounter = TRUE;
if(!this->has_met_before){
if(gcdialog_showText(0xad8, 0, NULL, NULL, NULL, NULL)){
this->has_met_before = TRUE;
}
}
}
@@ -80,7 +80,7 @@ Actor *chnapper_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
}
else {
func_8033A45C(1, FALSE);
func_8033A45C(2, (local->unk10) ? TRUE : FALSE);
func_8033A45C(2, BOOL(local->unk10));
func_8033A45C(3, (local->unk10) ? FALSE : TRUE);
}

View File

@@ -287,7 +287,7 @@ void func_80388BDC(Actor *this) {
f64 phi_f0;
func_802D3D74(this);
mapSpecificFlags_set(1, ((this->yaw > 260.0f) && (this->yaw < 330.0f)) ? TRUE : FALSE);
mapSpecificFlags_set(1, BOOL((this->yaw > 260.0f) && (this->yaw < 330.0f)));
if (!this->volatile_initialized) {
if (this->yaw != 0.0f) {
this->lifetime_value = 0.5f;

View File

@@ -175,7 +175,7 @@ void func_803898EC() {
}
void func_80389910() {
func_80311480(0xAD5, 0xE, NULL, NULL, MMM_func_80389810, NULL);
gcdialog_showText(0xAD5, 0xE, NULL, NULL, MMM_func_80389810, NULL);
timedFunc_set_2(0.0f, func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
timed_setStaticCameraToNode(2.0f, 0);
timedFunc_set_0(2.1f, MMM_func_803898A0);
@@ -195,10 +195,10 @@ void organMinigame_setState(s32 next_state){
if(next_state == 2){
if(D_8038C4F0.pattern == 0){
D_8038C4F0.pattern = 1;
func_80311480(0xad3, 4, NULL, NULL, MMM_func_80389810, NULL);
gcdialog_showText(0xad3, 4, NULL, NULL, MMM_func_80389810, NULL);
}
else{//L80389A84
func_80311480(0xad6, 4, NULL, NULL, MMM_func_80389810, NULL);
gcdialog_showText(0xad6, 4, NULL, NULL, MMM_func_80389810, NULL);
}
}//L80389A9C
@@ -215,13 +215,13 @@ void organMinigame_setState(s32 next_state){
}//L80389AF4
if(next_state == 4){
func_80311480(0xadd, 4, NULL, NULL, MMM_func_80389810, NULL);
gcdialog_showText(0xadd, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.motzhand_marker);
}
if(next_state == 5){
D_8038C4F0.pattern++;
func_80311480(0xad4, 4, NULL, NULL, MMM_func_80389810, NULL);
gcdialog_showText(0xad4, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.motzhand_marker);
}

View File

@@ -16,7 +16,7 @@ typedef struct {
/* .code */
void MMM_func_8038ABC0(s32 arg0) {
if (getGameMode() != 7) {
if (getGameMode() != GAME_MODE_7_ATTRACT_DEMO) {
ability_setAllLearned(ability_getAllLearned() & ~arg0);
}
}
@@ -104,7 +104,7 @@ void func_8038AF0C(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
}
void func_8038AF3C(Struct_MMM_47D0_0 *arg0, s32 arg1) {
func_80311480(0xADB, 4, NULL, arg0->unk0, func_8038AF0C, NULL);
gcdialog_showText(0xADB, 4, NULL, arg0->unk0, func_8038AF0C, NULL);
arg0->unk4 = 1;
}
@@ -178,7 +178,7 @@ void func_8038AF90(Struct_MMM_47D0_0 *arg0, Struct68s *arg1, f32 arg2) {
player_getPosition(sp48);
func_8035179C(arg1, sp54);
if (!mapSpecificFlags_get(0) && (arg0->unk4 == 0) && (func_80258640(sp54, sp48) < 250.0f)){
if(func_80311480(0xADA, 0, NULL, NULL, NULL, NULL)) {
if(gcdialog_showText(0xADA, 0, NULL, NULL, NULL, NULL)) {
mapSpecificFlags_set(0, TRUE);
}
}

View File

@@ -42,7 +42,7 @@ void __chAnchorCtrl_setState(Actor *this, s32 new_state){
func_80324E38(0.0f, 3);
timedFunc_set_0(1.0f, func_8038C000);
timedFunc_set_2(1.0f, (GenFunction_2)mapSpecificFlags_set, 8, TRUE);
timed_playSfx(2.1f, SFX_3F6_UNKNOWN, 0.6f, 32700);
timed_playSfx(2.1f, SFX_3F6_RUBBING, 0.6f, 32700);
timedFunc_set_2(2.7f, (GenFunction_2)mapSpecificFlags_set, 4, TRUE);
timedFunc_set_0(3.0f, func_8038C058);
func_80324DBC(3.0f, 0xb9C, 7, NULL, this->marker, __chAnchorCtrl_spawnJiggy, NULL);

View File

@@ -367,7 +367,7 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){
}
else{//L8038D220
timedFunc_set_3(0.0f, (GenFunction_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z);
func_80311480(0xb9f, 4, 0, 0, 0, 0);
gcdialog_showText(ASSET_B9F_TEXT_UNKNOWN, 4, 0, 0, 0, 0);
}
}//L8038D278
}

View File

@@ -85,12 +85,12 @@ void func_8038B900(Actor *this){
}
if(this->state == 1){
if( !this->is_first_encounter
if( !this->has_met_before
&& func_80329530(this, 0x258)
&& !func_8028ECAC()
){
func_80311480(0xb9b, 4, 0, 0, 0, 0);
this->is_first_encounter = TRUE;
gcdialog_showText(0xb9b, 4, 0, 0, 0, 0);
this->has_met_before = TRUE;
}
}

View File

@@ -73,10 +73,10 @@ void chAttackTutorial_setState(Actor * this, s32 arg1){
case 5:
if(this->unk10_12 == 0){
ability_unlock(ABILITY_4_CLAW_SWIPE);
func_80311480(0xDFF, 0xE, this->unk1C, this->marker, func_80387288, func_80387258);
gcdialog_showText(ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, func_80387288, func_80387258);
}
else{
func_80311480((this->unk10_12 == 1) ? 0xe15 : 0xe17, 0xE, this->unk1C, this->marker, func_80387288, NULL);
gcdialog_showText((this->unk10_12 == 1) ? ASSET_E15_TEXT_UNKNOWN : ASSET_E17_TEXT_UNKNOWN, 0xE, this->unk1C, this->marker, func_80387288, NULL);
}
break;
case 2://L803873E0
@@ -185,35 +185,36 @@ void func_80387764(ActorMarker * marker){
sp2C = 0xE;
}
switch (actor->unk10_12)
{
case 0x1: //L803877D8
sp34 = temp_a2 ? 0xe15 : 0xe14; //dialog enums
break;
switch (actor->unk10_12) {
case 0x1: //L803877D8
sp34 = temp_a2 ? ASSET_E15_TEXT_UNKNOWN : ASSET_E14_TEXT_UNKNOWN; //dialog enums
break;
case 0x2: //L803877F4
sp34 = temp_a2 ? 0xe17 : 0xe16; //dialog enums
break;
case 0x2: //L803877F4
sp34 = temp_a2 ? ASSET_E17_TEXT_UNKNOWN : ASSET_E16_TEXT_UNKNOWN; //dialog enums
break;
case 3: //L80387810
sp34 = temp_a2 ? 0xe19 : 0xe18; //dialog enums
break;
default:
//sp34 = actor->unk38_31;
break;
case 3: //L80387810
sp34 = temp_a2 ? ASSET_E19_TEXT_UNKNOWN : ASSET_E18_TEXT_UNKNOWN; //dialog enums
break;
default:
//sp34 = actor->unk38_31;
break;
}//L8038782C
if(sp34 == 0xe19){
if (sp34 == ASSET_E19_TEXT_UNKNOWN) {
func_8028F94C(2, actor->unk1C);
}
//L80387848
if(!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities() && temp_a2){
if (!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities() && temp_a2) {
mapSpecificFlags_set(3, 1);
sp34 = 0xE12;
sp34 = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES;
}//L80387898
if(temp_a2){
if (temp_a2) {
timed_setStaticCameraToNode(0.0f, 6);
}//L803878B0
func_80311480(sp34, sp2C, actor->unk1C, actor->marker, func_80387690, NULL);
gcdialog_showText(sp34, sp2C, actor->unk1C, actor->marker, func_80387690, NULL);
actor->unk38_31++;
}

View File

@@ -7,7 +7,7 @@
//external
f32 mapModel_getFloorY(f32*);
void func_802C4218(s32, f32, f32, f32);
void func_803252D0(f32, s32);
void timed_mapSpecificFlags_setTrue(f32, s32);
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
//typedefs
@@ -205,7 +205,7 @@ void func_80387C28(Actor * this){
func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE);
__spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z));
}//L80387D64
func_803252D0(1.5f, 7);
timed_mapSpecificFlags_setTrue(1.5f, 7);
actor_collisionOff(this);
if(local->unkC != 3){
subaddie_set_state_with_direction(this, 3, 0.0f, 1);
@@ -223,7 +223,7 @@ void func_80387DCC(ActorMarker *marker, ActorMarker *other_marker){
Actor *func_80387DF4(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){
Actor *actor = marker_getActor(marker);
if(actor->is_first_encounter)
if(actor->has_met_before)
func_8033A470(3, 7);
else
func_8033A45C(3, 0);
@@ -320,7 +320,7 @@ void func_80388080(Actor *this){
this->velocity_x = temp_velX;
this->velocity_y = (local->unkC == 3) ? 90.0f : 70.0f;
this->velocity_z = temp_velZ;
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
this->unk138_23 = 0;
this->unk38_0 = 0;
this->initialized = TRUE;
@@ -371,7 +371,7 @@ void func_80388080(Actor *this){
}
}else{//L80388520
if(local->unkC == 1){
this->unk28 = 3.0f;
this->actor_specific_1_f = 3.0f;
if(mapSpecificFlags_get(0xC) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)){//L80388554
if(!func_80329030(this, 0) && func_80329480(this)){
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
@@ -391,7 +391,7 @@ void func_80388080(Actor *this){
}
}
else if(local->unkC == 2){//L80388634
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
if(!func_80329030(this, 0) && func_80329480(this)){
func_80328CEC(this, (s32)this->yaw, 0x78, 0xB4);
this->unk38_0 = 1;
@@ -426,9 +426,9 @@ void func_80388080(Actor *this){
if(ml_distance_vec3f(this->position, this->unk1C) < 20.0f){
func_80387E64(this);
}
this->unk28 = 5.0f;
this->actor_specific_1_f = 5.0f;
if(mapSpecificFlags_get(0xC) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))){ //L8038892C
if(!func_80387FA8(this, local, (s32)this->yaw, (s32)this->unk28)){
if(!func_80387FA8(this, local, (s32)this->yaw, (s32)this->actor_specific_1_f)){
if(func_80329480(this)){
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
this->unk38_0 = 1;
@@ -441,7 +441,7 @@ void func_80388080(Actor *this){
this->unk1C_x -= local->unk0_x;
this->unk1C_y -= local->unk0_y;
this->unk1C_z -= local->unk0_z;
TUPLE_ASSIGN(sp60, this->unk28, 0.0f, 0.0f);
TUPLE_ASSIGN(sp60, this->actor_specific_1_f, 0.0f, 0.0f);
ml_vec3f_yaw_rotate_copy(sp60, sp60, this->yaw - 90.0);
local->unk0_x = sp60[0] + local->unk0_x;
local->unk0_y = sp60[1] + local->unk0_y;
@@ -483,7 +483,7 @@ void func_80388080(Actor *this){
sp54[2] = this->position_z;
if(local->unkC == 1)
sp54[1] += 150.0f;
this->is_first_encounter = FALSE;
this->has_met_before = FALSE;
func_80387A80(partEmitMgr_newEmitter(3), sp54, 3, (local->unkC == 1)? 0x4f0: 0x4f1);
}//L80388CC4

View File

@@ -213,7 +213,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
actor = marker_getActor(marker);
if(!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities()){
mapSpecificFlags_set(3, 1);
func_80311480(ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, func_803892C8, NULL);
gcdialog_showText(ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, func_803892C8, NULL);
}//L8038933C
else{
if(!(text_id == ASSET_DF3_TEXT_BOTTLES_INTRODUCTION
@@ -225,7 +225,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
case ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED:
break;
case ASSET_DF3_TEXT_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
func_80311480(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
gcdialog_showText(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
break;
case ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
@@ -233,7 +233,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
break;
case ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
actor->is_first_encounter = FALSE;
actor->has_met_before = FALSE;
actor->lifetime_value = 0.0f;
break;
@@ -249,7 +249,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
default:
if(actor->state != 5)
func_80311480(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 4, NULL, NULL, NULL, NULL);
func_80388FA0(actor, actor->state == 5 ? 1:4);
break;
@@ -363,7 +363,7 @@ void chsmmole_80389610(Actor * this){
break;
}//L80389904
if(sp2C){
func_80311480(sp2C, sp28, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
gcdialog_showText(sp2C, sp28, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
}
}
@@ -414,10 +414,10 @@ void chsmmole_Update(Actor * this){
this->unk1C_x = this->position_x;
this->unk1C_y = this->position_y;
this->unk1C_z = this->position_z;
this->unk28 = 300.0f;
this->actor_specific_1_f = 300.0f;
} else{ //L80389A68
nodeprop_getPosition(sp40, this->unk1C);
this->unk28 = nodeprop_getRadius(sp40);
this->actor_specific_1_f = nodeprop_getRadius(sp40);
}//L80389A8C
if(this->unkF4_8 == 1){
if(volatileFlag_get(VOLATILE_FLAG_1) || volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)){
@@ -458,7 +458,7 @@ void chsmmole_Update(Actor * this){
|| (this->unkF4_8 == 8 && mapSpecificFlags_get(3) && !mapSpecificFlags_get(0xF))
){//L80389C50
if( ((ml_distance_vec3f(sp44, this->unk1C) < this->unk28) && func_8028F20C())
if( ((ml_distance_vec3f(sp44, this->unk1C) < this->actor_specific_1_f) && func_8028F20C())
|| mapSpecificFlags_get(0x10)
){//L80389C8C
if(func_80329530(this, 0x96))
@@ -567,14 +567,14 @@ void chsmmole_Update(Actor * this){
if( user_input != -1){ //button was pressed
fileProgressFlag_set(FILEPROG_DB_SKIPPED_TUTORIAL, (user_input)?0:1);
func_80311480((user_input)? 0xe07 : 0xe09, 0xe, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
gcdialog_showText((user_input)? 0xe07 : 0xe09, 0xe, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
if(!user_input){
chsmmole_skipIntroTutorial(); //give all SM moves
}
this->unk38_0 = 0;
}else if(!this->is_first_encounter && 5.0 < this->lifetime_value){
func_80311480(0xe1d, 0x86, this->position, this->marker, func_803892C8, NULL);
this->is_first_encounter = TRUE;
}else if(!this->has_met_before && 5.0 < this->lifetime_value){
gcdialog_showText(0xe1d, 0x86, this->position, this->marker, func_803892C8, NULL);
this->has_met_before = TRUE;
}
}
break;

View File

@@ -43,7 +43,7 @@ void func_8038A4DC(Actor *this, s32 arg1){
}else{//L8038A560
func_8038A460(this);
ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER);
func_80311480(0xdf6, 0xe, this->unk1C, this->marker, func_8038A488, NULL);
gcdialog_showText(0xdf6, 0xe, this->unk1C, this->marker, func_8038A488, NULL);
this->sm_4070.unk0 = 0xe1a;
mapSpecificFlags_set(8, 0);
}
@@ -95,7 +95,7 @@ void SM_func_8038A5D8(Actor *this){
if(mapSpecificFlags_get(8)){
func_8038A460(this);
ability_unlock(ABILITY_7_FEATHERY_FLAP);
func_80311480(0xdf7, 0xa, this->unk1C, this->marker, func_8038A488, NULL);
gcdialog_showText(0xdf7, 0xa, this->unk1C, this->marker, func_8038A488, NULL);
this->sm_4070.unk0 = 0xe1b;
mapSpecificFlags_set(8,0);
}//L8038A730
@@ -103,7 +103,7 @@ void SM_func_8038A5D8(Actor *this){
if(mapSpecificFlags_get(9)){
func_8038A460(this);
ability_unlock(ABILITY_8_FLAP_FLIP);
func_80311480(0xdf8, 0xa, this->unk1C, this->marker, func_8038A488, NULL);
gcdialog_showText(0xdf8, 0xa, this->unk1C, this->marker, func_8038A488, NULL);
this->sm_4070.unk0 = 0xe1c;
mapSpecificFlags_set(9,0);
}//L8038A794
@@ -119,7 +119,7 @@ void SM_func_8038A5D8(Actor *this){
temp_a0 = 0xdf9;
}
func_80311480(temp_a0, 0xe, this->unk1C, this->marker, func_8038A488, NULL);
gcdialog_showText(temp_a0, 0xe, this->unk1C, this->marker, func_8038A488, NULL);
mapSpecificFlags_set(0xa,0);
this->sm_4070.unk0 = 0;
}
@@ -133,7 +133,7 @@ void SM_func_8038A5D8(Actor *this){
&& func_8028F20C()
){
if(this->sm_4070.unk0)
func_80311480(temp_a0 = this->sm_4070.unk0, 0, NULL, NULL, NULL, NULL);
gcdialog_showText(temp_a0 = this->sm_4070.unk0, 0, NULL, NULL, NULL, NULL);
}
break;

View File

@@ -79,11 +79,11 @@ void func_803875D4(ActorMarker *marker){
subaddie_set_state(this, 4);
actor_loopAnimation(this);
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
if(!mapSpecificFlags_get(2)) {
text_id = jiggyscore_isCollected(JIGGY_14_TTC_BLUBBER) ? 0xa2a : 0xa0d;
func_80311480( text_id, 0xf, this->position, this->marker, func_80387520, func_80387574);
text_id = jiggyscore_isCollected(JIGGY_14_TTC_BLUBBER) ? ASSET_A2A_TEXT_UNKNOWN : ASSET_A0D_TEXT_UNKNOWN;
gcdialog_showText(text_id, 0xf, this->position, this->marker, func_80387520, func_80387574);
mapSpecificFlags_set(2, TRUE);
}
}
@@ -114,10 +114,10 @@ void func_80387774(Actor **this_ptr){
func_8028F364(local->throw_target_position, local->throw_target_radius, 100.0f, ACTOR_2A_GOLD_BULLION, this_ptr);
if( func_80329530(*this_ptr, 200)
&& bacarry_get_markerId() == MARKER_37_GOLD_BULLION
&& func_8028FC34()
&& player_throwCarriedObject()
){
func_8028FA34(!mapSpecificFlags_get(0)? 0x149 : 0x14a, *this_ptr);
(*this_ptr)->is_first_encounter = TRUE;
(*this_ptr)->has_met_before = TRUE;
}
}
@@ -146,22 +146,23 @@ void func_803878CC(Actor * this){
}//L80387970
if(func_80329530(this, 250) && !func_80329530(this, 80)
&& !this->is_first_encounter
&& !this->has_met_before
&& item_getCount(ITEM_18_GOLD_BULLIONS) == 0
){
func_80311480(0xa0b, 0xe, this->position, this->marker, func_80387520, NULL);
this->is_first_encounter = TRUE;
gcdialog_showText(ASSET_A0B_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80387520, NULL);
this->has_met_before = TRUE;
subaddie_set_state_forward(this, 3);
}
if( mapSpecificFlags_get(0)
&& !this->unk138_23
){
if(item_getCount(ITEM_18_GOLD_BULLIONS) == 0)
func_80311480(0xa0c, 4, NULL, NULL, NULL, NULL);
if (item_getCount(ITEM_18_GOLD_BULLIONS) == 0) {
gcdialog_showText(ASSET_A0C_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
}
this->unk138_23 = TRUE;
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}//L80387A54
@@ -187,7 +188,7 @@ void func_803878CC(Actor * this){
if( actor_animationIsAt(this, 0.99f)
&& subaddie_maybe_set_state_position_direction(this, 1, 0.0f, 1, 0.78f)
){
this->unk28 = 4.0f;
this->actor_specific_1_f = 4.0f;
break;
}
@@ -215,7 +216,7 @@ void func_803878CC(Actor * this){
local = (ActorLocal_Blubber*)&this->local;
if(actor_animationIsAt(this, 0.99f) && !local->unk24){
subaddie_set_state(this, 5);
this->unk28 = 8.0f;
this->actor_specific_1_f = 8.0f;
}
}

View File

@@ -83,10 +83,10 @@ bool __chClam_updateTarget(Actor *this, f32 arg1) {
return FALSE;
}
this->unk28 = phi_f2 / arg1;
this->actor_specific_1_f = phi_f2 / arg1;
this->yaw_ideal = func_80257204(this->position[0], this->position[2], target_position[0], target_position[2]);
if ((volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11) < this->unk28) {
this->unk28 = (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) != 0) ? 0.0f : 17.0f;
if ((volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11) < this->actor_specific_1_f) {
this->actor_specific_1_f = (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) != 0) ? 0.0f : 17.0f;
} else if (sp38 == 0) {
__chClam_func_803863F0(SFX_AE_YUMYUM_TALKING, randf2(0.9f, 1.0f), 22000, this->position, 500.0f, 2000.0f);
}
@@ -108,13 +108,13 @@ bool __chClam_rotateTowardTarget(Actor *this, s32 arg1) {
if (((f64) animctrl_getAnimTimer(this->animctrl) < 0.1) && ((f64) randf() < 0.5)) {
if (this->unk1C[0] != 0.0f) {
arg1 *= 2;
this->unk28 = (f32) randi2(0, 0.5*(volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11));
this->actor_specific_1_f = (f32) randi2(0, 0.5*(volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11));
this->yaw_ideal += (f32) randi2(-arg1, arg1);
} else if ((f64) randf() < 0.4) {
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->yaw_ideal += (f32) randi2(-arg1, arg1);
} else {
this->unk28 = (f32) randi2(0.33 * (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11), volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11);
this->actor_specific_1_f = (f32) randi2(0.33 * (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11), volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11);
this->yaw_ideal = this->yaw;
}
this->unk1C[0] = 0.0f;
@@ -124,13 +124,13 @@ bool __chClam_rotateTowardTarget(Actor *this, s32 arg1) {
return FALSE;
}
}
temp_f0_2 = this->unk28 * sp2C;
temp_f0_2 = this->actor_specific_1_f * sp2C;
this->velocity[1] = ((f32)(0.3*temp_f0_2) / sp2C) - (f32) ((s32) (sp2C * -5) / 2);
if (func_80329078(this, this->yaw_ideal, temp_f0_2)) {
return TRUE;
}
this->unk1C[0] = 1.0f;
this->unk28 = 0.0f;
this->actor_specific_1_f = 0.0f;
this->yaw_ideal = this->yaw;
return FALSE;
}
@@ -249,7 +249,7 @@ void __chClam_attackOther(ActorMarker *this_marker, ActorMarker *other_marker){
if(func_80297C6C() == 3) return;
if( !mapSpecificFlags_get(5) && func_80311480(0xA14, 0, NULL, NULL, NULL, NULL)){
if( !mapSpecificFlags_get(5) && gcdialog_showText(ASSET_A14_TEXT_UNKNOWN, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(5, TRUE);
}

View File

@@ -54,12 +54,12 @@ void chLeaky_update(Actor *this) {
}
}
if( this->state == 1
&& !this->is_first_encounter
&& !this->has_met_before
&& func_80329530(this, 250) && !func_80329530(this, 160)
&& !func_8028ECAC()
&& func_80311480(0xA1A, 0, NULL, NULL, NULL, NULL)
&& gcdialog_showText(0xA1A, 0, NULL, NULL, NULL, NULL)
){
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}
if (func_803114B0() == 0) {
if (actor_animationIsAt(this, 0.83f)) {
@@ -111,6 +111,6 @@ bool chLeaky_eggCollision(ActorMarker *marker){
levelSpecificFlags_set(2, TRUE);
levelSpecificFlags_set(5, TRUE);
func_80311480(ASSET_A28_TEXT_LEAKY_DONE, 0x2a, this->position, this->marker, __chLeaky_startCutscene, NULL);
gcdialog_showText(ASSET_A28_TEXT_LEAKY_DONE, 0x2a, this->position, this->marker, __chLeaky_startCutscene, NULL);
return TRUE;
}

View File

@@ -75,15 +75,15 @@ void func_80389600(Actor *this){
s32 tmp_v1;
int i;
if( !this->is_first_encounter
if( !this->has_met_before
&& this->unkF4_8 == 0xA
&& !jiggyscore_isCollected(JIGGY_13_TTC_LOCKUP)
&& func_80329530(this, 320)
&& !func_80329530(this, 160)
&& !func_8028ECAC()
&& func_80311480(0xA15, 0, NULL, NULL, NULL, NULL)
&& gcdialog_showText(0xA15, 0, NULL, NULL, NULL, NULL)
){
this->is_first_encounter = TRUE;
this->has_met_before = TRUE;
}//L803896AC
if(!this->volatile_initialized){

View File

@@ -112,11 +112,11 @@ bool func_80388088(Actor *this){
return FALSE;
}
return (-35.0f < sp2C && sp2C < 35.0f) ? TRUE : FALSE;
return BOOL(-35.0f < sp2C && sp2C < 35.0f);
}
bool func_8038812C(Actor *this){
return (func_80329530(this, 1300) && func_80388088(this)) ? TRUE : FALSE;
return BOOL(func_80329530(this, 1300) && func_80388088(this));
}
void func_80388178(ActorMarker *this_marker, ActorMarker *other_marker) {
@@ -147,7 +147,7 @@ void func_80388178(ActorMarker *this_marker, ActorMarker *other_marker) {
TTC_func_80387FF4(this);
this->lifetime_value = 80.0f;
func_80311480(0xA10, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xA10, 4, NULL, NULL, NULL, NULL);
return;
}
@@ -167,8 +167,8 @@ void func_80388344(ActorMarker * this_marker, ActorMarker *other_marker){
if(other_marker->id == 1){
this = marker_getActor(this_marker);
if( !mapSpecificFlags_get(7)
&& this->is_first_encounter
&& func_80311480(0xa0f, 0, NULL, NULL, NULL, NULL)
&& this->has_met_before
&& gcdialog_showText(0xa0f, 0, NULL, NULL, NULL, NULL)
){
mapSpecificFlags_set(7, TRUE);
}
@@ -178,8 +178,8 @@ void func_80388344(ActorMarker * this_marker, ActorMarker *other_marker){
void func_803883C8(ActorMarker * this_marker, ActorMarker *other_marker){
Actor *this = marker_getActor(this_marker);
if( !this->unk138_23
&& this->is_first_encounter
&& func_80311480(0xa11, 0, NULL, NULL, NULL, NULL)
&& this->has_met_before
&& gcdialog_showText(0xa11, 0, NULL, NULL, NULL, NULL)
){
this->unk138_23 = TRUE;
}
@@ -229,13 +229,13 @@ void func_80388434(Actor *this){
}//L8038860C
if(func_8038812C(this)){
temp_v0 = func_8028ECAC();
if( !this->is_first_encounter
if( !this->has_met_before
&& temp_v0 != 1
&& temp_v0 != 10
){
subaddie_set_state_with_direction(this, 5, 0.01f, 1);
if(func_80311480(0xa0e, 0xf, this->position, this->marker, TTC_func_80387FB0, NULL)){
this->is_first_encounter = TRUE;
if(gcdialog_showText(0xa0e, 0xf, this->position, this->marker, TTC_func_80387FB0, NULL)){
this->has_met_before = TRUE;
}
comusic_8025AB44(COMUSIC_12_TTC_NIPPER, 5000, 300);
ncStaticCamera_setToNode(11);

View File

@@ -116,10 +116,10 @@ void func_80389A9C(void) {
void func_80389B38(s32 arg0){
if(D_8037DCB4 == arg0 && TTC_func_803899C0()){
if(arg0 == 0 && !jiggyscore_isCollected(JIGGY_11_TTC_RED_X)){
func_80311480(0xA18, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xA18, 4, NULL, NULL, NULL, NULL);
}
else if(arg0 == 4){
func_80311480(0xA19, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(0xA19, 4, NULL, NULL, NULL, NULL);
}
D_8037DCB4++;
@@ -170,7 +170,7 @@ void func_80389CC4(s16 arg0[3], s32 arg1){
gcpausemenu_80314AC8(0);
timedFunc_set_2(0.1f, (GenFunction_2) func_8028F45C, 9, (s32)&D_8038D708);
timedFunc_set_1(0.1f, (GenFunction_1) gcpausemenu_80314AC8, 1);
func_80311480(ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL);
D_8037DCB4++;
}//L80389E70
}

View File

@@ -681,7 +681,7 @@ void __sandcastleCodes_eraseGameDialogCallback(ActorMarker *caller, enum asset_e
if (confirmed == 1) {
__sandcastleCodes_setNumberEntered(3);
func_8038B800(D_8038CAD4);
func_80311480(0xFBF, 0xC, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_FBF_TEXT_UNKNOWN, 0xC, NULL, NULL, NULL, NULL);
gameFile_clear(func_802C5A30());
gameFile_8033CFD4(func_802C5A30());
func_802C5A3C(-1);
@@ -710,11 +710,11 @@ void TTC_func_8038BBA0(s32 secretCodeIndex) {
__sandcastleCodes_setNumberEntered(2);
func_8038B800(secretCodeIndex);
func_8038B5B4();
func_80311480(0xFBE, 0xC, NULL, NULL, NULL, NULL);
gcdialog_showText(ASSET_FBE_TEXT_UNKNOWN, 0xC, NULL, NULL, NULL, NULL);
return;
case 2:
D_8038CAD4 = secretCodeIndex;
func_80311480(0xE38, 0xC, NULL, NULL, __sandcastleCodes_eraseGameDialogCallback, NULL);
gcdialog_showText(ASSET_E38_TEXT_UNKNOWN, 0xC, NULL, NULL, __sandcastleCodes_eraseGameDialogCallback, NULL);
return;
}
return;

View File

@@ -316,8 +316,8 @@ void pfsManager_init(void){
osStartThread(&sPfsManagerThread);
}
bool pfsManager_contErr(void){
return pfsManagerContStatus.errno ? TRUE : FALSE;
bool pfsManager_contErr(void) {
return BOOL(pfsManagerContStatus.errno);
}
void func_8024F150(void){

View File

@@ -184,7 +184,7 @@ void func_8024AF48(void){
if(volatileFlag_get(VOLATILE_FLAG_1)) return;
if(volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)) return;
if(func_802D686C()) return;
if(func_8028F22C()) return;
if(player_isDead()) return;
if(gctransition_8030BDC0()) return;
if(getGameMode() == GAME_MODE_A_SNS_PICTURE) return;

View File

@@ -251,7 +251,7 @@ u32 heap_get_occupied_size(void){
bool func_8025498C(s32 size){
s32 v0 = func_802549BC(size);
return v0 ? TRUE : FALSE;
return BOOL(v0);
}
EmptyHeapBlock *func_802549BC(s32 size){

View File

@@ -30,45 +30,49 @@ void ability_use(s32 arg0){
break;
case 0x3://L8029569C //
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
sp2C = 0xDFC;
sp2C = ASSET_DFC_TEXT_UNKNOWN;
}
break;
case 0x4://L802956B8 //
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
sp2C = 0xE02;
sp2C = ASSET_E02_TEXT_UNKNOWN;
}
break;
case 0x5://L802956D4 //barge
if(map_get() == MAP_1_SM_SPIRAL_MOUNTAIN){
sp2C = 0xE05;
sp2C = ASSET_E05_TEXT_UNKNOWN;
}
break;
case 0x6://L802956F0 //slide
sp28 = 0;
if(!ability_isUnlocked(ABILITY_10_TALON_TROT)){
if(map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){
sp2C = 0xB4D;
if (!ability_isUnlocked(ABILITY_10_TALON_TROT)) {
if (map_get() == MAP_2_MM_MUMBOS_MOUNTAIN) {
sp2C = ASSET_B4D_TEXT_UNKNOWN;
}
else
else {
return;
}
}
else{
else {
abilityprogress_usedAbilities |= (1 << arg0);
}
break;
case 0x8://L80295738 //fly
sp2C = 0xA26;
sp2C = ASSET_A26_DIALOG_NEED_RED_FEATHERS_TO_FLY;
break;
case 0x7://L80295740 //egg
case 0x9://L80295740 //shock
break;
}//L80295744
if(sp28)
if (sp28) {
comusic_playTrack(COMUSIC_2B_DING_B);
if(sp2C)
func_80311480(sp2C, 4, NULL, NULL, NULL, 0);
}
if (sp2C) {
gcdialog_showText(sp2C, 4, NULL, NULL, NULL, 0);
}
abilityprogress_usedAbilities |= (1 << arg0);
}
@@ -77,7 +81,7 @@ int ability_hasUsed(enum ability_e move){
}
void ability_setHasUsed(enum ability_e move){
abilityprogress_usedAbilities |= (1 << move);
abilityprogress_usedAbilities |= (1 << move);
}
int ability_hasLearned(enum ability_e move){
@@ -97,9 +101,9 @@ void ability_clearAll(void){
void ability_setLearned(s32 move, s32 val){
if(val){
abilityprogress_learnedAbilities |= (1 << move);
abilityprogress_learnedAbilities |= (1 << move);
}else{
abilityprogress_learnedAbilities &= ~(1 << move);
abilityprogress_learnedAbilities &= ~(1 << move);
}
}

View File

@@ -123,7 +123,7 @@ void __baMarker_8028B848(void){
if(player_getTransformation() == TRANSFORM_1_BANJO){
__baMarker_8028B7F4();
}
func_80311480(s0, 0x2A, NULL, NULL, NULL, 0);
gcdialog_showText(s0, 0x2A, NULL, NULL, NULL, 0);
}
}
@@ -321,7 +321,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
case 0x28: //L8028BF74
if( plyr_hitbox_type == HITBOX_6_WONDERWING){
func_8030E484(SFX_20_METAL_CLANK_1);
sfxsource_playHighPriority(SFX_20_METAL_CLANK_1);
}
else{
func_8030E6D4(SFX_65_METALLIC_SCRATCH);
@@ -717,7 +717,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
miscFlag_set(MISC_FLAG_2_ON_SPRING_PAD);
}else{
if(!volatileFlag_getAndSet(VOLATILE_FLAG_C_HAS_SEEN_SPRING_PAD, 1)){
func_80311480(ASSET_A24_DIALOG_JUMP_PAD_DISCOVERED, 4, 0, 0, 0, 0);
gcdialog_showText(ASSET_A24_DIALOG_JUMP_PAD_DISCOVERED, 4, 0, 0, 0, 0);
}
}
break;
@@ -729,7 +729,7 @@ void __baMarker_resolveCollision(Prop *other_prop){
miscFlag_set(MISC_FLAG_1_ON_FLIGHT_PAD);
}
else if(! volatileFlag_getAndSet(VOLATILE_FLAG_D_HAS_SEEN_FLIGHT_PAD, 1)){
func_80311480(ASSET_A25_DIALOG_FLY_DISC_DISCOVERED, 4, 0, 0, 0, 0);
gcdialog_showText(ASSET_A25_DIALOG_FLY_DISC_DISCOVERED, 4, 0, 0, 0, 0);
}
break;

View File

@@ -513,7 +513,7 @@ void func_802A4664(void){
func_80299E90();
next_state = bs_getNextState();
if(next_state == BS_20_LANDING || next_state == BS_24_FLY || next_state == BS_2D_SWIM_IDLE){
func_8030E484(SFX_3EA_UNKNOWN);
sfxsource_playHighPriority(SFX_3EA_UNKNOWN);
}
func_802A34C8();
func_8029E070(0);

View File

@@ -58,7 +58,7 @@ int bslongleg_inSet(s32 move_indx){
void func_802A531C(void){
func_80299650(stateTimer_getPrevious(STATE_TIMER_2_LONGLEG), stateTimer_get(STATE_TIMER_2_LONGLEG));
if(stateTimer_isAt(STATE_TIMER_2_LONGLEG, 0.01f))
func_8030E484(SFX_3EB_UNKNOWN);
sfxsource_playHighPriority(SFX_3EB_UNKNOWN);
}
void func_802A5374(void){

View File

@@ -145,7 +145,7 @@ void bsbshock_init(void){
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
baphysics_set_vertical_velocity(D_80364A70);
baphysics_set_gravity(D_80364A74);
func_8030E484(SFX_E_SHOCKSPRING_BOING);
sfxsource_playHighPriority(SFX_E_SHOCKSPRING_BOING);
func_8029E064(1);
func_8029E070(1);
ability_use(9);
@@ -162,7 +162,7 @@ void bsbshock_update(void){
func_802B6FA8();
baphysics_get_velocity(sp20);
if(animctrl_isAt(aCtrl, 0.7f))
func_8030E484(SFX_53_BANJO_HUIII);
sfxsource_playHighPriority(SFX_53_BANJO_HUIII);
if(button_released(BUTTON_A) && 0.0f < sp20[1])
baphysics_reset_gravity();

View File

@@ -384,7 +384,7 @@ void func_802A7F4C(void){
}
void func_802A7F6C(void) {
D_8037D394 = (bs_getPrevState() == BS_41_DIE) ? TRUE : FALSE;
D_8037D394 = BOOL(bs_getPrevState() == BS_41_DIE);
if (D_8037D394 || level_get() == LEVEL_9_RUSTY_BUCKET_BAY || map_get() == MAP_46_CCW_WINTER) {
D_8037D395 = 0;

View File

@@ -123,7 +123,7 @@ void func_802A8AD8(void){
if(func_8029DFE0()){
func_8029E0DC(0);
if(miscFlag_isFalse(MISC_FLAG_14_LOSE_BOGGY_RACE))
func_8030E484(0x3eb);
sfxsource_playHighPriority(0x3eb);
func_803219F4(1);
}
}else{
@@ -365,7 +365,7 @@ void bsbtrot_jump_init(void){
baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity());
baphysics_set_vertical_velocity(D_80364ABC);
baphysics_set_gravity(D_80364AC0);
func_8030E484(SFX_48_KAZOOIE_RUUH);
sfxsource_playHighPriority(SFX_48_KAZOOIE_RUUH);
D_8037D3A4 = 0;
}

View File

@@ -581,7 +581,7 @@ void bscroc_eat_bad_update(void){
}
if(animctrl_isAt(aCtrl, 0.6671f)){
func_8030E484(SFX_C6_SHAKING_MOUTH);
sfxsource_playHighPriority(SFX_C6_SHAKING_MOUTH);
}
if(animctrl_isStopped(aCtrl)){

View File

@@ -71,7 +71,7 @@ void bsjig_jiggy_update(void){
}
if(animctrl_isAt(aCtrl, 0.94f))
func_8030E484(0x3ea);
sfxsource_playHighPriority(0x3ea);
if(animctrl_isStopped(aCtrl)){
if(D_8037D4B1)
@@ -134,7 +134,7 @@ void bsjig_jiggy_end(void){
}
}//L802B0E88
if(sp2C != 0){
func_80311480(sp2C, sp28, 0, 0, 0, 0);
gcdialog_showText(sp2C, sp28, 0, 0, 0, 0);
}
}//L802B0EA4
func_80298A64();

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);
}
}

Some files were not shown because too many files have changed in this diff Show More