rename function prefixes to better follow guidelines
This commit is contained in:
parent
0964b8e08a
commit
892f773f80
|
@ -19,5 +19,5 @@ lair_func_8038E0B0 = 0x8038E0B0;
|
|||
lair_func_8038E768 = 0x8038E768;
|
||||
fight_func_803863F0 = 0x803863F0;
|
||||
cutscene_func_8038C4E0 = 0x8038C4E0;
|
||||
mole_learnedAllSpiralMountainAbilities = 0x802DA498;
|
||||
chmole_learnedAllSpiralMountainAbilities = 0x802DA498;
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ void func_80387764(ActorMarker * marker){
|
|||
func_8028F94C(2, actor->unk1C);
|
||||
}
|
||||
//L80387848
|
||||
if(!mapSpecificFlags_get(3) && mole_learnedAllSpiralMountainAbilities() && temp_a2){
|
||||
if(!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities() && temp_a2){
|
||||
mapSpecificFlags_set(3, 1);
|
||||
sp34 = 0xE12;
|
||||
}//L80387898
|
||||
|
|
|
@ -16,11 +16,11 @@ typedef struct {
|
|||
s16 refresher_text;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} struct_smMole;
|
||||
} ChSmMoleDescription;
|
||||
|
||||
//public
|
||||
void smMole_Update(Actor * this);
|
||||
void SM_func_80389610(Actor * this);
|
||||
void chsmmole_Update(Actor * this);
|
||||
void chsmmole_80389610(Actor * this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo smMoleAnimations[6] = {
|
||||
|
@ -32,14 +32,14 @@ ActorAnimationInfo smMoleAnimations[6] = {
|
|||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038AF90 = {
|
||||
ActorInfo chSmMole = {
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||
1, smMoleAnimations,
|
||||
smMole_Update, func_80326224, func_802D94B4,
|
||||
chsmmole_Update, func_80326224, func_802D94B4,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
struct_smMole smMoleTable[8] = {
|
||||
ChSmMoleDescription smMoleTable[8] = {
|
||||
{ASSET_DF3_TEXT_BOTTLES_INTRODUCTION, ASSET_E08_TEXT_BOTTLES_FIND_ANOTHER_MOLEHILL, 1, -1},
|
||||
{ASSET_DF4_TEXT_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_TEXT_BOTTLES_CAMERA_CONTROL_REFRESHER, 3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_TEXT_BOTTLES_DIVE_LEARN, ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER, 5, ABILITY_F_DIVE},
|
||||
|
@ -54,9 +54,11 @@ s32 D_8038AFE4 = 0;
|
|||
|
||||
|
||||
/* .code */
|
||||
// func_80388D80
|
||||
int code_2990_learnedAnySpiralMountainAbilities(void){
|
||||
// Checks if any Spiral Mountain abilities have been learned
|
||||
|
||||
/**
|
||||
* @brief Checks if any Spiral Mountain abilities have been learned
|
||||
*/
|
||||
int chsmmole_learnedAnySpiralMountainAbilities(void){
|
||||
return ability_isUnlocked(ABILITY_F_DIVE)
|
||||
|| ability_isUnlocked(ABILITY_4_BEAR_PUNCH)
|
||||
|| ability_isUnlocked(ABILITY_C_ROLL)
|
||||
|
@ -68,10 +70,11 @@ int code_2990_learnedAnySpiralMountainAbilities(void){
|
|||
|| ability_isUnlocked(ABILITY_5_CLIMB);
|
||||
}
|
||||
|
||||
// func_80388E48
|
||||
void code_2990_setSpiralMountainAbilitiesAsUsed(void){
|
||||
// Sets all Spiral Mountain abilities to used & disables the noise
|
||||
// played when the player uses an ability for the first time.
|
||||
/**
|
||||
* @brief Sets all Spiral Mountain abilities to used & disables the noise
|
||||
* played when the player uses an ability for the first time.
|
||||
*/
|
||||
void chsmmole_setSpiralMountainAbilitiesAsUsed(void){
|
||||
ability_unlock(ABILITY_3_CAMERA_CONTROL);
|
||||
ability_setHasUsed(ABILITY_0_BARGE);
|
||||
ability_setHasUsed(ABILITY_1_BEAK_BOMB);
|
||||
|
@ -84,9 +87,10 @@ void code_2990_setSpiralMountainAbilitiesAsUsed(void){
|
|||
ability_setHasUsed(ABILITY_A_HOLD_A_JUMP_HIGHER);
|
||||
}
|
||||
|
||||
// func_80388EB0
|
||||
void code_2990_skipIntroTutorial(void){
|
||||
// Unlocks all of the Spiral Mountain moves.
|
||||
/**
|
||||
* @brief Unlocks all of the Spiral Mountain moves.
|
||||
*/
|
||||
void chsmmole_skipIntroTutorial(void){
|
||||
ability_unlock(ABILITY_F_DIVE);
|
||||
ability_unlock(ABILITY_4_BEAR_PUNCH);
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
|
@ -96,15 +100,15 @@ void code_2990_skipIntroTutorial(void){
|
|||
ability_unlock(ABILITY_7_FLAP);
|
||||
ability_unlock(ABILITY_8_FLIP);
|
||||
ability_unlock(ABILITY_5_CLIMB);
|
||||
code_2990_setSpiralMountainAbilitiesAsUsed();
|
||||
chsmmole_setSpiralMountainAbilitiesAsUsed();
|
||||
mapSpecificFlags_set(3,1);
|
||||
}
|
||||
/**
|
||||
* @brief If the player is talking to Intro Bottles for the first time, use the
|
||||
* camera that points to the lair. Otherwise, use the camera for the ability.
|
||||
*/
|
||||
void chsmmole_setSpiralMountainStaticCamera(Actor *this){
|
||||
|
||||
// func_80388F24
|
||||
void code_2990_setSpiralMountainStaticCamera(Actor *this){
|
||||
// If the player is talking to Intro Bottles for the first time,
|
||||
// use the camera that points to the lair.
|
||||
// Otherwise, use the camera for the ability.
|
||||
if(this->unkF4_8 == 1 && !mapSpecificFlags_get(1)){
|
||||
timed_setStaticCameraToNode(0.0f, 0x12);
|
||||
}
|
||||
|
@ -152,9 +156,9 @@ void func_80388FA0(Actor *this, s32 arg1){
|
|||
animctrl_setSmoothTransition(this->animctrl, 0);
|
||||
break;
|
||||
case 5:
|
||||
code_2990_setSpiralMountainStaticCamera(this);
|
||||
chsmmole_setSpiralMountainStaticCamera(this);
|
||||
func_8028F94C(2,this->position);
|
||||
SM_func_80389610(this);
|
||||
chsmmole_80389610(this);
|
||||
break;
|
||||
case 3:
|
||||
actor_loopAnimation(this);
|
||||
|
@ -171,16 +175,18 @@ void func_80388FA0(Actor *this, s32 arg1){
|
|||
func_8030DD14(this->unk44_31, 2);
|
||||
func_8030DBB4(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x6590);
|
||||
code_2990_setSpiralMountainStaticCamera(this);
|
||||
chsmmole_setSpiralMountainStaticCamera(this);
|
||||
func_8028F94C(2, this->position);
|
||||
break;
|
||||
}
|
||||
subaddie_set_state_with_direction(this, arg1, 0.0001f, 1);
|
||||
}
|
||||
|
||||
// func_80389214
|
||||
void smMole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
||||
// Performs actions depending on what move is being learned
|
||||
/**
|
||||
* @brief Performs actions depending on what move is being learned
|
||||
*
|
||||
*/
|
||||
static void __chsmmole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
||||
Actor *actor = marker_getActor(marker);
|
||||
switch(arg2){
|
||||
case 3:
|
||||
|
@ -196,7 +202,7 @@ void smMole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e text
|
|||
func_8025A70C(COMUSIC_2B_DING_B);
|
||||
break;
|
||||
case 0xff:
|
||||
code_2990_setSpiralMountainStaticCamera(actor);
|
||||
chsmmole_setSpiralMountainStaticCamera(actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +211,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
|||
Actor *actor;
|
||||
|
||||
actor = marker_getActor(marker);
|
||||
if(!mapSpecificFlags_get(3) && mole_learnedAllSpiralMountainAbilities()){
|
||||
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);
|
||||
}//L8038933C
|
||||
|
@ -219,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, smMole_additionalAbilityLearnActions);
|
||||
func_80311480(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 */
|
||||
|
@ -251,8 +257,7 @@ void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
|||
}
|
||||
}
|
||||
|
||||
// func_80389494
|
||||
void smMole_learnAbility(Actor * this, s32* arg1, s32 *arg2){
|
||||
void chsmmole_learnAbility(Actor * this, s32* arg1, s32 *arg2){
|
||||
// Selects the learn and refresh dialogs.
|
||||
// Gives the player the ability if not learned.
|
||||
if(ability_isUnlocked(smMoleTable[this->unkF4_8 -1].ability)){
|
||||
|
@ -276,7 +281,7 @@ void smMole_learnAbility(Actor * this, s32* arg1, s32 *arg2){
|
|||
}
|
||||
}
|
||||
|
||||
void SM_func_80389610(Actor * this){
|
||||
void chsmmole_80389610(Actor * this){
|
||||
s32 sp2C;
|
||||
s32 sp28;
|
||||
|
||||
|
@ -310,7 +315,7 @@ void SM_func_80389610(Actor * this){
|
|||
sp2C = ASSET_E0F_TEXT_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
sp28 |= 1;
|
||||
}else{//L80389780
|
||||
code_2990_setSpiralMountainAbilitiesAsUsed();
|
||||
chsmmole_setSpiralMountainAbilitiesAsUsed();
|
||||
sp2C = fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) ? 0xe1e : 0xe13;
|
||||
mapSpecificFlags_set(0xf, 1);
|
||||
}
|
||||
|
@ -338,7 +343,7 @@ void SM_func_80389610(Actor * this){
|
|||
mapSpecificFlags_set(4, 1);
|
||||
}
|
||||
else{//L803898E4
|
||||
smMole_learnAbility(this, &sp2C, &sp28);
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -350,21 +355,22 @@ void SM_func_80389610(Actor * this){
|
|||
mapSpecificFlags_set(0xE, 1);
|
||||
}
|
||||
else{//L803898E4
|
||||
smMole_learnAbility(this, &sp2C, &sp28);
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
}
|
||||
break;
|
||||
default://L803898F8
|
||||
smMole_learnAbility(this, &sp2C, &sp28);
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
break;
|
||||
}//L80389904
|
||||
if(sp2C){
|
||||
func_80311480(sp2C, sp28, this->position, this->marker, func_803892C8, smMole_additionalAbilityLearnActions);
|
||||
func_80311480(sp2C, sp28, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
|
||||
}
|
||||
}
|
||||
|
||||
// func_80389948
|
||||
void smMole_spawnMolehill(ActorMarker * marker){
|
||||
// Spawns a molehill for the actor
|
||||
/**
|
||||
* @brief Spawns a molehill for the actor
|
||||
*/
|
||||
void chsmmole_spawnMolehill(ActorMarker * marker){
|
||||
Actor *actor;
|
||||
Actor *other;
|
||||
s32 pad;
|
||||
|
@ -384,14 +390,13 @@ void func_80389984(Actor * this){
|
|||
func_8030DA44(tmp);
|
||||
}
|
||||
|
||||
// func_803899B0
|
||||
void smMole_Update(Actor * this){
|
||||
void chsmmole_Update(Actor * this){
|
||||
// Sets up the initial functions and state for the actor
|
||||
s32 sp50[6]; // face buttons
|
||||
f32 sp44[3]; // player position
|
||||
void *sp40;
|
||||
int sp34;
|
||||
int sp38;
|
||||
int user_input;
|
||||
|
||||
// Checks the actor's selector value is lower than 0x9
|
||||
// Anything higher is a non-Spiral Mountain ability, and should use a different actor id
|
||||
|
@ -420,10 +425,10 @@ void smMole_Update(Actor * this){
|
|||
}
|
||||
}
|
||||
}//L80389AC8
|
||||
if(code_2990_learnedAnySpiralMountainAbilities()){
|
||||
if(chsmmole_learnedAnySpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(1,1);
|
||||
|
||||
if(mole_learnedAllSpiralMountainAbilities()){
|
||||
if(chmole_learnedAllSpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(3, 1);
|
||||
mapSpecificFlags_set(2, 1);
|
||||
mapSpecificFlags_set(0xC, 1);
|
||||
|
@ -433,7 +438,7 @@ void smMole_Update(Actor * this){
|
|||
}//L80389B20
|
||||
|
||||
if(!this->unk16C_4){
|
||||
__spawnQueue_add_1((GenFunction_1)smMole_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
__spawnQueue_add_1((GenFunction_1)chsmmole_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
this->unk16C_4 = 1;
|
||||
}//L80389B4C
|
||||
|
||||
|
@ -502,7 +507,7 @@ void smMole_Update(Actor * this){
|
|||
}//L80389EA0
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
if(!mapSpecificFlags_get(1)){
|
||||
SM_func_80389610(this);
|
||||
chsmmole_80389610(this);
|
||||
}
|
||||
func_80388FA0(this, 3);
|
||||
}//L80389EE0
|
||||
|
@ -515,7 +520,7 @@ void smMole_Update(Actor * this){
|
|||
|
||||
}else if(actor_animationIsAt(this, 0.35f)){//L80389F78
|
||||
if(mapSpecificFlags_get(1)){
|
||||
SM_func_80389610(this);
|
||||
chsmmole_80389610(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -550,21 +555,21 @@ void smMole_Update(Actor * this){
|
|||
mapSpecificFlags_set(5,0);
|
||||
func_80388FA0(this, 4);
|
||||
}//L8038A1B8
|
||||
sp38 = -1;
|
||||
user_input = -1;
|
||||
if(this->unk38_0){
|
||||
this->unk60 += time_getDelta();
|
||||
if(func_803114C4() != 0xe1d){
|
||||
if(sp50[FACE_BUTTON(BUTTON_A)] == 1)
|
||||
sp38 = 1; //A button pressed
|
||||
user_input = 1; //A button pressed
|
||||
else if(sp50[FACE_BUTTON(BUTTON_B)] == 1)
|
||||
sp38 = 0; //B button pressed
|
||||
user_input = 0; //B button pressed
|
||||
}//L8038A218
|
||||
|
||||
if( sp38 != -1){ //button was pressed
|
||||
fileProgressFlag_set(FILEPROG_DB_SKIPPED_TUTORIAL, (sp38)?0:1);
|
||||
func_80311480((sp38)? 0xe07 : 0xe09, 0xe, this->position, this->marker, func_803892C8, smMole_additionalAbilityLearnActions);
|
||||
if(!sp38){
|
||||
code_2990_skipIntroTutorial(); //give all SM moves
|
||||
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);
|
||||
if(!user_input){
|
||||
chsmmole_skipIntroTutorial(); //give all SM moves
|
||||
}
|
||||
this->unk38_0 = 0;
|
||||
}else if(!this->unk138_24 && 5.0 < this->unk60){
|
||||
|
|
|
@ -112,7 +112,7 @@ void SM_func_8038A5D8(Actor *this){
|
|||
func_8038A460(this);
|
||||
func_8028F94C(2, this->unk1C);
|
||||
|
||||
if(!mapSpecificFlags_get(3) && mole_learnedAllSpiralMountainAbilities()){
|
||||
if(!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(3,1);
|
||||
temp_a0 = 0xe12;
|
||||
}else{
|
||||
|
|
|
@ -17,7 +17,7 @@ extern ActorInfo D_8038AD58; //ch cauliflower A
|
|||
extern ActorInfo D_8038AC9C; //chCarrot FreeRange?
|
||||
extern ActorInfo D_8038AD0C; //ch onion B
|
||||
extern ActorInfo D_8038AD7C; //ch cauliflower B
|
||||
extern ActorInfo D_8038AF90; //D_8038AF90 bottles
|
||||
extern ActorInfo chSmMole; //chSmMole bottles
|
||||
extern ActorInfo D_8038B0B0; //chJumpTutorial code_4070
|
||||
extern ActorInfo D_8038B0E0;
|
||||
extern ActorInfo D_8038B008; //chBanjosBed
|
||||
|
@ -148,7 +148,7 @@ void SM_func_80386810(void)
|
|||
spawnableActorList_add(&D_8038AC9C, actor_new, 0X2000121);
|
||||
spawnableActorList_add(&D_8038AD0C, actor_new, 0X2000121);
|
||||
spawnableActorList_add(&D_8038AD7C, actor_new, 0X2200121);
|
||||
spawnableActorList_add(&D_8038AF90, actor_new, 0X100);
|
||||
spawnableActorList_add(&chSmMole, actor_new, 0X100);
|
||||
spawnableActorList_add(&D_8038B0B0, actor_new, 0);
|
||||
spawnableActorList_add(&D_8038B0E0, actor_new, 0);
|
||||
spawnableActorList_add(&D_8038B008, actor_new, 0X6C8);
|
||||
|
|
|
@ -266,7 +266,7 @@ void func_8024AF48(void){
|
|||
func_8024A880(0x9000);
|
||||
}
|
||||
else{
|
||||
if(mole_learnedAllSpiralMountainAbilities())
|
||||
if(chmole_learnedAllSpiralMountainAbilities())
|
||||
func_8024A9EC(0);
|
||||
func_8024A880(0x6fff);
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ void func_802C4C14(Actor *this){
|
|||
sp44 = 0.0f;
|
||||
if(this->state == 4 && (sp84 == 0 || sp84 == 1))
|
||||
sp44 = 0.25f;
|
||||
if(mole_learnedAllSpiralMountainAbilities() && fileProgressFlag_get(FILEPROG_BD_ENTER_LAIR_CUTSCENE)){
|
||||
if(chmole_learnedAllSpiralMountainAbilities() && fileProgressFlag_get(FILEPROG_BD_ENTER_LAIR_CUTSCENE)){
|
||||
timedFunc_set_2(sp44, (GenFunction_2)warp_lairEnterLairFromSMLevel, 0, 0);
|
||||
}
|
||||
else{//L802C5188
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
void mole_update(Actor *this);
|
||||
void chmole_update(Actor *this);
|
||||
Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void mole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1, s32 arg2);
|
||||
void chmole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1, s32 arg2);
|
||||
|
||||
typedef struct{
|
||||
s16 learn_text;
|
||||
s16 refresher_text;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} struct_mole;
|
||||
} ChMoleDescription;
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo moleAnimations[]= {
|
||||
|
@ -23,15 +23,15 @@ ActorAnimationInfo moleAnimations[]= {
|
|||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f},
|
||||
};
|
||||
|
||||
ActorInfo D_80367DA0 = {
|
||||
ActorInfo gChMole = {
|
||||
0x1DF, ACTOR_37A_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||
1, moleAnimations,
|
||||
mole_update, func_80326224, func_802D94B4,
|
||||
chmole_update, func_80326224, func_802D94B4,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
// D_80367DC4
|
||||
struct_mole moleTable[] = {
|
||||
ChMoleDescription moleTable[] = {
|
||||
{ASSET_C23_DIALOG_BEAKBOMB_LEARN, ASSET_C24_DIALOG_BEAKBOMB_REFRESHER, 0x0F, ABILITY_1_BEAK_BOMB},
|
||||
{ASSET_B47_DIALOG_EGGS_LEARN, ASSET_B4B_DIALOG_EGGS_REFRESHER, 0x16, ABILITY_6_EGGS},
|
||||
{ASSET_B48_DIALOG_BEAKBUSTER_LEARN, ASSET_B4C_DIALOG_BEAKBUSTER_REFRESHER, 0x17, ABILITY_2_BEAK_BUSTER},
|
||||
|
@ -46,7 +46,7 @@ struct_mole moleTable[] = {
|
|||
|
||||
/* .code */
|
||||
// func_802D9220
|
||||
int mole_learnedAllLevelAbilities(enum level_e level){
|
||||
int chmole_learnedAllLevelAbilities(enum level_e level){
|
||||
// Checks if all of the level's abilities are learned.
|
||||
switch (level){
|
||||
case LEVEL_1_MUMBOS_MOUNTAIN:
|
||||
|
@ -70,11 +70,11 @@ int mole_learnedAllLevelAbilities(enum level_e level){
|
|||
}
|
||||
|
||||
// func_802D9304
|
||||
enum asset_e mole_learnedAllLevelAbilitiesDialog(void){
|
||||
enum asset_e chmole_learnedAllLevelAbilitiesDialog(void){
|
||||
// If the player has learned all game abilities, use "learned all abilities" dialog
|
||||
// If the player learned all level abilities, use "learned world abilities" dialog
|
||||
s32 level_id = level_get();
|
||||
int learned_all_moves = mole_learnedAllLevelAbilities(level_id);
|
||||
int learned_all_moves = chmole_learnedAllLevelAbilities(level_id);
|
||||
switch(level_id){
|
||||
case LEVEL_1_MUMBOS_MOUNTAIN:
|
||||
return learned_all_moves ? ASSET_B4E_TEXT_BOTTLES_ALL_MM_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
|
@ -95,7 +95,7 @@ enum asset_e mole_learnedAllLevelAbilitiesDialog(void){
|
|||
}
|
||||
|
||||
// func_802D93EC
|
||||
int mole_learnedAllGameAbilities(void){
|
||||
int chmole_learnedAllGameAbilities(void){
|
||||
// Checks if the player has learned all non-Spiral Mountain abilities.
|
||||
return ability_isUnlocked(ABILITY_6_EGGS)
|
||||
&& ability_isUnlocked(ABILITY_2_BEAK_BUSTER)
|
||||
|
@ -143,13 +143,13 @@ void func_802D9600(Actor * this){
|
|||
}
|
||||
|
||||
// func_802D9658
|
||||
void mole_setStaticCamera(Actor *this){
|
||||
void chmole_setStaticCamera(Actor *this){
|
||||
// Sets the camera to a static camera
|
||||
timed_setStaticCameraToNode(0.0f, moleTable[this->unkF4_8-9].camera_node);
|
||||
}
|
||||
|
||||
// func_802D9698
|
||||
void mole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
void chmole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
// Refills the player's health upon learning a new ability, if needed
|
||||
// Also releases the camera
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
@ -157,10 +157,10 @@ void mole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
|||
if( arg1 == moleTable[actor->unkF4_8-9].learn_text
|
||||
&& item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)
|
||||
){
|
||||
func_80311480(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, mole_healthRefill, mole_additionalAbilityLearnActions);
|
||||
func_80311480(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
}//L802D9738
|
||||
else if(arg1 == moleTable[actor->unkF4_8-9].learn_text || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
|
||||
func_80311480(mole_learnedAllGameAbilities()? 0xa87 : mole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, mole_healthRefill, NULL);
|
||||
func_80311480(chmole_learnedAllGameAbilities()? 0xa87 : chmole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, chmole_healthRefill, NULL);
|
||||
}
|
||||
else{//L802D97BC
|
||||
if(actor->unk138_24){
|
||||
|
@ -179,7 +179,7 @@ void mole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
|||
}
|
||||
|
||||
// func_802D9830
|
||||
void mole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
void chmole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
// Performs actions depending on what move is being learned
|
||||
Actor *actor = marker_getActor(marker);
|
||||
switch(arg2){
|
||||
|
@ -189,7 +189,7 @@ void mole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1,
|
|||
break;
|
||||
case 2:
|
||||
levelSpecificFlags_set(0x1A, 0);
|
||||
mole_setStaticCamera(actor);
|
||||
chmole_setStaticCamera(actor);
|
||||
break;
|
||||
case 3: // Turbo Talon Trainer
|
||||
timed_setStaticCameraToNode(0.0f, 0x29);
|
||||
|
@ -197,7 +197,7 @@ void mole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1,
|
|||
break;
|
||||
case 4:
|
||||
levelSpecificFlags_set(0x1A, 0);
|
||||
mole_setStaticCamera(actor);
|
||||
chmole_setStaticCamera(actor);
|
||||
break;
|
||||
case 5: // Egg Firing
|
||||
item_adjustByDiffWithHud(ITEM_D_EGGS, 50);
|
||||
|
@ -212,13 +212,13 @@ void mole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1,
|
|||
item_set(ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL));
|
||||
break;
|
||||
case 0xff:
|
||||
mole_setStaticCamera(actor);
|
||||
chmole_setStaticCamera(actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// func_802D997C
|
||||
int mole_learnAbility(Actor *this){
|
||||
int chmole_learnAbility(Actor *this){
|
||||
s32 sp2C;
|
||||
s32 sp28 = 0xe;
|
||||
// Known Ability: Refresher Dialog
|
||||
|
@ -242,7 +242,7 @@ int mole_learnAbility(Actor *this){
|
|||
break;
|
||||
}
|
||||
}//L802D9A9C
|
||||
func_80311480(sp2C, sp28, this->position, this->marker, mole_healthRefill, mole_additionalAbilityLearnActions);
|
||||
func_80311480(sp2C, sp28, this->position, this->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -260,28 +260,28 @@ void func_802D9ADC(Actor *this){
|
|||
func_8030DD14(this->unk44_31, 2);
|
||||
func_8030DBB4(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 26000);
|
||||
mole_setStaticCamera(this);
|
||||
chmole_setStaticCamera(this);
|
||||
func_8028F94C(2, this->position);
|
||||
}
|
||||
|
||||
// func_802D9BD8
|
||||
void mole_Refresher(Actor *this){
|
||||
void chmole_Refresher(Actor *this){
|
||||
// Plays the scene where Bottles gives the player a refresher on the ability.
|
||||
subaddie_set_state(this, 5);
|
||||
mole_setStaticCamera(this);
|
||||
chmole_setStaticCamera(this);
|
||||
func_8028F94C(2, this->position);
|
||||
mole_learnAbility(this);
|
||||
chmole_learnAbility(this);
|
||||
}
|
||||
|
||||
// func_802D9C1C
|
||||
void mole_setFacingDirection(Actor *this){
|
||||
void chmole_setFacingDirection(Actor *this){
|
||||
// Sets the actor to always be facing the player
|
||||
subaddie_set_state_with_direction(this, 3, 0.0001f, 1);
|
||||
actor_loopAnimation(this);
|
||||
}
|
||||
|
||||
// func_802D9C54
|
||||
void mole_spawnMolehill(ActorMarker *marker){
|
||||
void chmole_spawnMolehill(ActorMarker *marker){
|
||||
// Spawns a molehill for the actor
|
||||
Actor *actor = marker_getActor(marker);
|
||||
Actor *other = spawn_child_actor(ACTOR_12C_MOLEHILL, &actor);
|
||||
|
@ -299,11 +299,11 @@ void func_802D9C90(Actor *this){
|
|||
}
|
||||
|
||||
// func_802D9CBC
|
||||
void mole_startingDialog(Actor *this){
|
||||
void chmole_startingDialog(Actor *this){
|
||||
// If the player knows the ability, use refresher function
|
||||
// Otherwise, set player's position and spawn mole
|
||||
if(ability_isUnlocked(moleTable[this->unkF4_8 - 9].ability)){
|
||||
mole_Refresher(this);
|
||||
chmole_Refresher(this);
|
||||
}
|
||||
else{
|
||||
if(func_80329530(this, 150)){
|
||||
|
@ -317,7 +317,7 @@ void mole_startingDialog(Actor *this){
|
|||
}
|
||||
|
||||
// func_802D9D60
|
||||
void mole_update(Actor *this){
|
||||
void chmole_update(Actor *this){
|
||||
// Sets up the initial functions and state for the actor
|
||||
s32 sp50[6];
|
||||
f32 sp4C;
|
||||
|
@ -358,7 +358,7 @@ void mole_update(Actor *this){
|
|||
nodeprop_getPosition(node_prop, this->unk1C);
|
||||
}
|
||||
// Spawns molehill
|
||||
__spawnQueue_add_1((GenFunction_1)mole_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
__spawnQueue_add_1((GenFunction_1)chmole_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
this->marker->propPtr->unk8_3 = FALSE;
|
||||
this->marker->collidable = FALSE;
|
||||
this->initialized = TRUE;
|
||||
|
@ -388,7 +388,7 @@ void mole_update(Actor *this){
|
|||
){
|
||||
player_getPosition(sp34);
|
||||
if(ml_distance_vec3f(sp34, this->velocity) < this->unk28){
|
||||
mole_startingDialog(this);
|
||||
chmole_startingDialog(this);
|
||||
}
|
||||
}
|
||||
else{//L802DA054
|
||||
|
@ -397,7 +397,7 @@ void mole_update(Actor *this){
|
|||
&& func_8028EFC8()
|
||||
&& sp50[FACE_BUTTON(BUTTON_B)] == 1
|
||||
){
|
||||
mole_startingDialog(this);
|
||||
chmole_startingDialog(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ void mole_update(Actor *this){
|
|||
func_8030E2C4(this->unk44_31);
|
||||
}//L802DA128
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
mole_setFacingDirection(this);
|
||||
chmole_setFacingDirection(this);
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ void mole_update(Actor *this){
|
|||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1250, 2500);
|
||||
}
|
||||
else if(actor_animationIsAt(this, 0.35f)){//L802DA1EC
|
||||
mole_learnAbility(this);
|
||||
chmole_learnAbility(this);
|
||||
}
|
||||
break;
|
||||
case 3://L802DA210
|
||||
|
@ -474,7 +474,7 @@ void mole_update(Actor *this){
|
|||
}
|
||||
|
||||
// func_802DA498
|
||||
int mole_learnedAllSpiralMountainAbilities(void){
|
||||
int chmole_learnedAllSpiralMountainAbilities(void){
|
||||
// Checks if the player has learned all of the Spiral Mountain abilities.
|
||||
return ability_isUnlocked(ABILITY_F_DIVE)
|
||||
&& ability_isUnlocked(ABILITY_4_BEAR_PUNCH)
|
||||
|
|
|
@ -16,17 +16,17 @@ ActorInfo D_803731B0 = {
|
|||
int func_803616F0(Actor *this){
|
||||
switch(this->unkF4_8){
|
||||
case 1:// L80361728
|
||||
return fileProgressFlag_get(FILEPROG_31_MM_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_1_MUMBOS_MOUNTAIN);
|
||||
return fileProgressFlag_get(FILEPROG_31_MM_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_1_MUMBOS_MOUNTAIN);
|
||||
case 2:// L80361750
|
||||
return fileProgressFlag_get(FILEPROG_32_TTC_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_2_TREASURE_TROVE_COVE);
|
||||
return fileProgressFlag_get(FILEPROG_32_TTC_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_2_TREASURE_TROVE_COVE);
|
||||
case 3:// L80361778
|
||||
return fileProgressFlag_get(FILEPROG_33_CC_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_3_CLANKERS_CAVERN);
|
||||
return fileProgressFlag_get(FILEPROG_33_CC_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_3_CLANKERS_CAVERN);
|
||||
case 4:// L803617A0
|
||||
return fileProgressFlag_get(FILEPROG_34_BGS_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_4_BUBBLEGLOOP_SWAMP);
|
||||
return fileProgressFlag_get(FILEPROG_34_BGS_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_4_BUBBLEGLOOP_SWAMP);
|
||||
case 5:// L803617C8
|
||||
return fileProgressFlag_get(FILEPROG_35_FP_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_5_FREEZEEZY_PEAK);
|
||||
return fileProgressFlag_get(FILEPROG_35_FP_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_5_FREEZEEZY_PEAK);
|
||||
case 6:// L803617F0
|
||||
return fileProgressFlag_get(FILEPROG_36_GV_OPEN) && !mole_learnedAllLevelAbilities(LEVEL_7_GOBIS_VALLEY);
|
||||
return fileProgressFlag_get(FILEPROG_36_GV_OPEN) && !chmole_learnedAllLevelAbilities(LEVEL_7_GOBIS_VALLEY);
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void func_803634BC(void){
|
|||
|
||||
void func_80363500(Actor *this){
|
||||
if(!this->unk16C_4){
|
||||
if(!mole_learnedAllSpiralMountainAbilities()){
|
||||
if(!chmole_learnedAllSpiralMountainAbilities()){
|
||||
func_803634BC();
|
||||
}
|
||||
else{
|
||||
|
@ -40,7 +40,7 @@ void func_80363500(Actor *this){
|
|||
this->unk16C_4 = 1;
|
||||
}//L8036355C
|
||||
|
||||
if(mole_learnedAllSpiralMountainAbilities()){
|
||||
if(chmole_learnedAllSpiralMountainAbilities()){
|
||||
func_80363470();
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ extern ActorInfo D_80367CB4; //spent_goldfeather
|
|||
extern ActorInfo D_80367D00; //egg
|
||||
extern ActorInfo D_80367D24; //redfeather
|
||||
extern ActorInfo D_80367D48; //goldfeather
|
||||
extern ActorInfo D_80367DA0; //bottles
|
||||
extern ActorInfo gChMole; //bottles
|
||||
extern ActorInfo D_80367E20; //chmolehill
|
||||
extern ActorInfo D_80367E70;
|
||||
extern ActorInfo D_80367F30;
|
||||
|
@ -259,7 +259,7 @@ void spawnQueue_reset(void){
|
|||
spawnableActorList_add(&D_80367D48, actor_new, 0x0200000); //goldfeather
|
||||
spawnableActorList_add(&D_80367C90, actor_new, 0x0000004); //spent_redfeather
|
||||
spawnableActorList_add(&D_80367CB4, actor_new, 0x0000004); //spent_goldfeather
|
||||
spawnableActorList_add(&D_80367DA0, actor_new, 0x0000180); //bottles
|
||||
spawnableActorList_add(&gChMole, actor_new, 0x0000180); //bottles
|
||||
spawnableActorList_add(&D_80367E20, actor_new, 0x44); //chmolehill
|
||||
spawnableActorList_add(&D_80373DC0, actor_new, 0x80000);
|
||||
spawnableActorList_add(&D_80367E70, actor_new, 0x0);
|
||||
|
|
Loading…
Reference in New Issue