Move ch Bottles to SmBottles
This commit is contained in:
@@ -2136,7 +2136,7 @@ segments:
|
||||
- [0x108B8B0, c, ch/attacktutorial]
|
||||
- [0x108C070, c, ch/vegetables]
|
||||
- [0x108D450, c, code_2900]
|
||||
- [0x108D4E0, c, code_2990]
|
||||
- [0x108D4E0, c, ch/smbottles]
|
||||
- [0x108EB10, c, code_3FC0]
|
||||
- [0x108EBC0, c, ch/jumptutorial]
|
||||
- [0x108F020, c, code_44D0]
|
||||
@@ -2147,14 +2147,14 @@ segments:
|
||||
- [0x108F350, .data, code_BF0]
|
||||
- [0x108F380, .data, ch/attacktutorial]
|
||||
- [0x108F3B0, .data, ch/vegetables]
|
||||
- [0x108F6C0, .data, code_2990]
|
||||
- [0x108F6C0, .data, ch/smbottles]
|
||||
- [0x108F750, .data, code_3FC0]
|
||||
- [0x108F810, .data, ch/jumptutorial]
|
||||
- [0x108F840, .data, code_44D0]
|
||||
- [0x108F870, .rodata, code_5B0]
|
||||
- [0x108F890, .rodata, ch/attacktutorial]
|
||||
- [0x108F930, .rodata, ch/vegetables]
|
||||
- [0x108F960, .rodata, code_2990]
|
||||
- [0x108F960, .rodata, ch/smbottles]
|
||||
- [0x108FA70, .rodata, code_44D0]
|
||||
- [0x108FA80, .bss, code_F0]
|
||||
- name: cutscenes
|
||||
|
@@ -11,27 +11,27 @@ void timed_exitStaticCamera(f32);
|
||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
|
||||
/* typedefs and declarations */
|
||||
enum chBottles_state_e {
|
||||
BOTTLES_STATE_1_UNKNOWN = 1,
|
||||
BOTTLES_STATE_2_UNKNOWN,
|
||||
BOTTLES_STATE_3_UNKNOWN,
|
||||
BOTTLES_STATE_4_UNKNOWN,
|
||||
BOTTLES_STATE_5_UNKNOWN
|
||||
enum chSmBottles_state_e {
|
||||
SM_BOTTLES_STATE_1_UNKNOWN = 1,
|
||||
SM_BOTTLES_STATE_2_UNKNOWN,
|
||||
SM_BOTTLES_STATE_3_UNKNOWN,
|
||||
SM_BOTTLES_STATE_4_UNKNOWN,
|
||||
SM_BOTTLES_STATE_5_UNKNOWN
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
s16 teach_text_id;
|
||||
s16 refresher_text;
|
||||
s16 refresher_text_id;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} ChSmMoleDescription;
|
||||
} ChSmBottlesDialog;
|
||||
|
||||
/* public functions */
|
||||
void chBottles_update(Actor *this);
|
||||
void __chBottles_talk(Actor *this);
|
||||
void chSmBottles_update(Actor *this);
|
||||
void __chSmBottles_talk(Actor *this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chBottlesAnimations[6] = {
|
||||
ActorAnimationInfo chSmBottlesAnimations[6] = {
|
||||
{NULL, 0.0f},
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f},
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 4.5f},
|
||||
@@ -41,12 +41,12 @@ ActorAnimationInfo chBottlesAnimations[6] = {
|
||||
};
|
||||
|
||||
ActorInfo chBottles = {
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES, 1, chBottlesAnimations,
|
||||
chBottles_update, actor_update_func_80326224, func_802D94B4,
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES, 1, chSmBottlesAnimations,
|
||||
chSmBottles_update, actor_update_func_80326224, func_802D94B4,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ChSmMoleDescription chBottlesDialogTable[8] = {
|
||||
ChSmBottlesDialog chSmBottlesDialogTable[8] = {
|
||||
{ASSET_DF3_TEXT_BOTTLES_INTRODUCTION, ASSET_E08_TEXT_BOTTLES_FIND_ANOTHER_MOLEHILL, 0x1, -1},
|
||||
{ASSET_DF4_TEXT_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_TEXT_BOTTLES_CAMERA_CONTROL_REFRESHER, 0x3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_TEXT_BOTTLES_DIVE_LEARN, ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER, 0x5, ABILITY_F_DIVE},
|
||||
@@ -57,14 +57,14 @@ ChSmMoleDescription chBottlesDialogTable[8] = {
|
||||
{ASSET_E10_TEXT_BOTTLES_BRIDGE_BROKEN, ASSET_E11_TEXT_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
};
|
||||
|
||||
s32 gDialogIndex = 0;
|
||||
s32 chSmBottlesDialogIndex = 0;
|
||||
|
||||
/* .code */
|
||||
|
||||
/**
|
||||
* @brief Checks if any Spiral Mountain abilities have been learned
|
||||
*/
|
||||
bool __chBottles_isAnySpiralMountainAbilityLearned(void) {
|
||||
bool __chSmBottles_isAnySpiralMountainAbilityLearned(void) {
|
||||
return ability_isUnlocked(ABILITY_F_DIVE) ||
|
||||
ability_isUnlocked(ABILITY_4_CLAW_SWIPE) ||
|
||||
ability_isUnlocked(ABILITY_C_ROLL) ||
|
||||
@@ -80,7 +80,7 @@ bool __chBottles_isAnySpiralMountainAbilityLearned(void) {
|
||||
* @brief Sets all Spiral Mountain abilities to used & disables the noise
|
||||
* played when the player uses an ability for the first time.
|
||||
*/
|
||||
void __chBottles_setHasUsedSpiralMountainAbilities(void) {
|
||||
void __chSmBottles_setHasUsedSpiralMountainAbilities(void) {
|
||||
ability_unlock(ABILITY_3_CAMERA_CONTROL);
|
||||
ability_setHasUsed(ABILITY_0_BARGE);
|
||||
ability_setHasUsed(ABILITY_1_BEAK_BOMB);
|
||||
@@ -96,7 +96,7 @@ void __chBottles_setHasUsedSpiralMountainAbilities(void) {
|
||||
/**
|
||||
* @brief Unlocks all of the Spiral Mountain moves.
|
||||
*/
|
||||
void __chBottles_skipIntroTutorial(void) {
|
||||
void __chSmBottles_skipIntroTutorial(void) {
|
||||
ability_unlock(ABILITY_F_DIVE);
|
||||
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
@@ -106,7 +106,7 @@ void __chBottles_skipIntroTutorial(void) {
|
||||
ability_unlock(ABILITY_7_FEATHERY_FLAP);
|
||||
ability_unlock(ABILITY_8_FLAP_FLIP);
|
||||
ability_unlock(ABILITY_5_CLIMB);
|
||||
__chBottles_setHasUsedSpiralMountainAbilities();
|
||||
__chSmBottles_setHasUsedSpiralMountainAbilities();
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
}
|
||||
|
||||
@@ -114,40 +114,40 @@ void __chBottles_skipIntroTutorial(void) {
|
||||
* @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 __chBottles_setStaticCameraToNode(Actor *this) {
|
||||
void __chSmBottles_setStaticCameraToNode(Actor *this) {
|
||||
if (this->unkF4_8 == 1 && !mapSpecificFlags_get(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES)) {
|
||||
timed_setStaticCameraToNode(0.0f, 0x12);
|
||||
}
|
||||
else { //L80388F68
|
||||
timed_setStaticCameraToNode(0.0f, chBottlesDialogTable[this->unkF4_8 - 1].camera_node);
|
||||
timed_setStaticCameraToNode(0.0f, chSmBottlesDialogTable[this->unkF4_8 - 1].camera_node);
|
||||
}
|
||||
}
|
||||
|
||||
void __chBottles_setState(Actor *this, s32 next_state) {
|
||||
void __chSmBottles_setState(Actor *this, s32 next_state) {
|
||||
Actor *other;
|
||||
ActorMarker *molehillMarker;
|
||||
|
||||
switch (this->state) {
|
||||
case BOTTLES_STATE_1_UNKNOWN://L80388FE8
|
||||
case SM_BOTTLES_STATE_1_UNKNOWN://L80388FE8
|
||||
this->unk138_23 = 1;
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_4_UNKNOWN://L80388FF8
|
||||
case SM_BOTTLES_STATE_4_UNKNOWN://L80388FF8
|
||||
this->unk138_23 = 0;
|
||||
|
||||
case BOTTLES_STATE_2_UNKNOWN://L80389004
|
||||
case SM_BOTTLES_STATE_2_UNKNOWN://L80389004
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_5_UNKNOWN://L80389018
|
||||
case SM_BOTTLES_STATE_5_UNKNOWN://L80389018
|
||||
this->unk138_23 = 0;
|
||||
func_8028F918(0);
|
||||
break;
|
||||
}//L8038902C
|
||||
|
||||
switch (next_state) {
|
||||
case BOTTLES_STATE_4_UNKNOWN:
|
||||
case SM_BOTTLES_STATE_4_UNKNOWN:
|
||||
other = subaddie_getLinkedActor(this);
|
||||
molehillMarker = this->unk100;
|
||||
|
||||
@@ -166,21 +166,21 @@ void __chBottles_setState(Actor *this, s32 next_state) {
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_1_UNKNOWN:
|
||||
case SM_BOTTLES_STATE_1_UNKNOWN:
|
||||
animctrl_setSmoothTransition(this->animctrl, 0);
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_5_UNKNOWN:
|
||||
__chBottles_setStaticCameraToNode(this);
|
||||
case SM_BOTTLES_STATE_5_UNKNOWN:
|
||||
__chSmBottles_setStaticCameraToNode(this);
|
||||
func_8028F94C(2, this->position);
|
||||
__chBottles_talk(this);
|
||||
__chSmBottles_talk(this);
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_3_UNKNOWN:
|
||||
case SM_BOTTLES_STATE_3_UNKNOWN:
|
||||
actor_loopAnimation(this);
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_2_UNKNOWN:
|
||||
case SM_BOTTLES_STATE_2_UNKNOWN:
|
||||
other = subaddie_getLinkedActor(this);
|
||||
molehillMarker = this->unk100;
|
||||
|
||||
@@ -197,7 +197,7 @@ void __chBottles_setState(Actor *this, s32 next_state) {
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x6590);
|
||||
|
||||
__chBottles_setStaticCameraToNode(this);
|
||||
__chSmBottles_setStaticCameraToNode(this);
|
||||
func_8028F94C(2, this->position);
|
||||
break;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void __chBottles_setState(Actor *this, s32 next_state) {
|
||||
* @brief Performs actions depending on what move is being learned
|
||||
*
|
||||
*/
|
||||
static void __chBottles_textActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
static void __chSmBottles_textActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
switch (arg2) {
|
||||
@@ -230,17 +230,17 @@ static void __chBottles_textActions(ActorMarker *marker, enum asset_e text_id, s
|
||||
break;
|
||||
|
||||
case 0xff:
|
||||
__chBottles_setStaticCameraToNode(actor);
|
||||
__chSmBottles_setStaticCameraToNode(actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void __chBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
void __chSmBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
gcdialog_showText(ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, __chBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, __chSmBottles_textCallback, NULL);
|
||||
}//L8038933C
|
||||
else {
|
||||
if (!(text_id == ASSET_DF3_TEXT_BOTTLES_INTRODUCTION || text_id == ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER || text_id == ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT)) {
|
||||
@@ -252,7 +252,7 @@ void __chBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 arg
|
||||
break;
|
||||
|
||||
case ASSET_DF3_TEXT_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chBottles_textCallback, __chBottles_textActions);
|
||||
gcdialog_showText(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
break;
|
||||
|
||||
case ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
@@ -271,28 +271,28 @@ void __chBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 arg
|
||||
|
||||
case ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
__chBottles_setState(actor, BOTTLES_STATE_4_UNKNOWN);
|
||||
__chSmBottles_setState(actor, SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (actor->state != BOTTLES_STATE_5_UNKNOWN) {
|
||||
if (actor->state != SM_BOTTLES_STATE_5_UNKNOWN) {
|
||||
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 0x4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
__chBottles_setState(actor, actor->state == BOTTLES_STATE_5_UNKNOWN ? BOTTLES_STATE_1_UNKNOWN : BOTTLES_STATE_4_UNKNOWN);
|
||||
__chSmBottles_setState(actor, actor->state == SM_BOTTLES_STATE_5_UNKNOWN ? SM_BOTTLES_STATE_1_UNKNOWN : SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __chBottles_getReteachDialog(Actor *this, s32 *text_id, s32 *text_flags) {
|
||||
void __chSmBottles_getRefresherDialog(Actor *this, s32 *text_id, s32 *text_flags) {
|
||||
// Selects the learn and refresh dialogs.
|
||||
// Gives the player the ability if not learned.
|
||||
if (ability_isUnlocked(chBottlesDialogTable[this->unkF4_8 - 1].ability)) {
|
||||
if (ability_isUnlocked(chSmBottlesDialogTable[this->unkF4_8 - 1].ability)) {
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
*text_id = gDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
gDialogIndex++;
|
||||
gDialogIndex = MIN(gDialogIndex, 5);
|
||||
*text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
|
||||
if (*text_id != ASSET_E0E_TEXT_BOTTLES_REFUSE_HELP_5) {
|
||||
*text_flags |= 1;
|
||||
@@ -300,7 +300,7 @@ void __chBottles_getReteachDialog(Actor *this, s32 *text_id, s32 *text_flags) {
|
||||
}
|
||||
else {//L8038956C
|
||||
*text_flags |= 1;
|
||||
*text_id = chBottlesDialogTable[this->unkF4_8 - 1].refresher_text;
|
||||
*text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].refresher_text_id;
|
||||
|
||||
if (*text_id == ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER && !ability_hasUsed(ABILITY_3_CAMERA_CONTROL)) {
|
||||
*text_id = ASSET_DFD_TEXT_BOTTLES_SWIM_LEARN;
|
||||
@@ -308,12 +308,12 @@ void __chBottles_getReteachDialog(Actor *this, s32 *text_id, s32 *text_flags) {
|
||||
}
|
||||
}
|
||||
else {//L803895C0
|
||||
*text_id = chBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
ability_unlock(chBottlesDialogTable[this->unkF4_8 - 1].ability);
|
||||
*text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
ability_unlock(chSmBottlesDialogTable[this->unkF4_8 - 1].ability);
|
||||
}
|
||||
}
|
||||
|
||||
void __chBottles_talk(Actor *this) {
|
||||
void __chSmBottles_talk(Actor *this) {
|
||||
s32 text_id;
|
||||
s32 text_flags;
|
||||
|
||||
@@ -326,16 +326,16 @@ void __chBottles_talk(Actor *this) {
|
||||
text_flags |= 1;
|
||||
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
text_id = gDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
gDialogIndex++;
|
||||
gDialogIndex = MIN(gDialogIndex, 5);
|
||||
text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
}
|
||||
else {//L803896C0
|
||||
text_id = chBottlesDialogTable[this->unkF4_8 - 1].refresher_text;
|
||||
text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].refresher_text_id;
|
||||
}
|
||||
}
|
||||
else {//L803896E8
|
||||
text_id = chBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES, TRUE);
|
||||
}
|
||||
break;
|
||||
@@ -351,7 +351,7 @@ void __chBottles_talk(Actor *this) {
|
||||
text_flags |= 1;
|
||||
}
|
||||
else {//L80389780
|
||||
__chBottles_setHasUsedSpiralMountainAbilities();
|
||||
__chSmBottles_setHasUsedSpiralMountainAbilities();
|
||||
text_id = fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) ? 0xe1e : 0xe13;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_F, TRUE);
|
||||
} //L803897B4
|
||||
@@ -360,11 +360,11 @@ void __chBottles_talk(Actor *this) {
|
||||
}
|
||||
else {//L803897C8
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_2)) {
|
||||
text_id = chBottlesDialogTable[this->unkF4_8 - 1].refresher_text;
|
||||
text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].refresher_text_id;
|
||||
text_flags |= 1;
|
||||
}
|
||||
else {
|
||||
text_id = chBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
text_id = chSmBottlesDialogTable[this->unkF4_8 - 1].teach_text_id;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_2, TRUE);
|
||||
}
|
||||
}
|
||||
@@ -375,7 +375,7 @@ void __chBottles_talk(Actor *this) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_4, TRUE);
|
||||
}
|
||||
else {//L803898E4
|
||||
__chBottles_getReteachDialog(this, &text_id, &text_flags);
|
||||
__chSmBottles_getRefresherDialog(this, &text_id, &text_flags);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -384,24 +384,24 @@ void __chBottles_talk(Actor *this) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_E, TRUE);
|
||||
}
|
||||
else {//L803898E4
|
||||
__chBottles_getReteachDialog(this, &text_id, &text_flags);
|
||||
__chSmBottles_getRefresherDialog(this, &text_id, &text_flags);
|
||||
}
|
||||
break;
|
||||
|
||||
default://L803898F8
|
||||
__chBottles_getReteachDialog(this, &text_id, &text_flags);
|
||||
__chSmBottles_getRefresherDialog(this, &text_id, &text_flags);
|
||||
break;
|
||||
}//L80389904
|
||||
|
||||
if (text_id) {
|
||||
gcdialog_showText(text_id, text_flags, this->position, this->marker, __chBottles_textCallback, __chBottles_textActions);
|
||||
gcdialog_showText(text_id, text_flags, this->position, this->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Spawns a molehill for the actor
|
||||
*/
|
||||
void __chBottles_spawnMolehill(ActorMarker *marker) {
|
||||
void __chSmBottles_spawnMolehill(ActorMarker *marker) {
|
||||
Actor *this;
|
||||
Actor *molehill;
|
||||
s32 pad;
|
||||
@@ -413,7 +413,7 @@ void __chBottles_spawnMolehill(ActorMarker *marker) {
|
||||
if (marker);
|
||||
}
|
||||
|
||||
void __chBottles_free(Actor *this) {
|
||||
void __chSmBottles_free(Actor *this) {
|
||||
u8 tmp = this->unk44_31;
|
||||
|
||||
if (tmp) {
|
||||
@@ -421,7 +421,7 @@ void __chBottles_free(Actor *this) {
|
||||
}
|
||||
}
|
||||
|
||||
void chBottles_update(Actor *this) {
|
||||
void chSmBottles_update(Actor *this) {
|
||||
s32 face_buttons[6];
|
||||
f32 plyr_pos[3];
|
||||
void *sp40;
|
||||
@@ -438,7 +438,7 @@ void chBottles_update(Actor *this) {
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
actor_collisionOff(this);
|
||||
this->initialized = TRUE;
|
||||
marker_setFreeMethod(this->marker, __chBottles_free);
|
||||
marker_setFreeMethod(this->marker, __chSmBottles_free);
|
||||
|
||||
if (this->unkF4_8 == 1 || this->unkF4_8 == 8) {//L80389A30
|
||||
sp40 = nodeprop_findByActorIdAndActorPosition(ACTOR_349_UNKNOWN, this);
|
||||
@@ -456,12 +456,12 @@ void chBottles_update(Actor *this) {
|
||||
|
||||
if (this->unkF4_8 == 1) {
|
||||
if (volatileFlag_get(VOLATILE_FLAG_1) || volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)) {
|
||||
__chBottles_setState(this, BOTTLES_STATE_3_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_3_UNKNOWN);
|
||||
}
|
||||
}
|
||||
}//L80389AC8
|
||||
|
||||
if (__chBottles_isAnySpiralMountainAbilityLearned()) {
|
||||
if (__chSmBottles_isAnySpiralMountainAbilityLearned()) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES, TRUE);
|
||||
|
||||
if (chmole_learnedAllSpiralMountainAbilities()) {
|
||||
@@ -474,7 +474,7 @@ void chBottles_update(Actor *this) {
|
||||
}//L80389B20
|
||||
|
||||
if (!this->volatile_initialized) {
|
||||
__spawnQueue_add_1((GenFunction_1) __chBottles_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
__spawnQueue_add_1((GenFunction_1) __chSmBottles_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
this->volatile_initialized = TRUE;
|
||||
}//L80389B4C
|
||||
|
||||
@@ -486,7 +486,7 @@ void chBottles_update(Actor *this) {
|
||||
player_getPosition(plyr_pos);
|
||||
|
||||
switch (this->state) {
|
||||
case BOTTLES_STATE_1_UNKNOWN://L80389BAC
|
||||
case SM_BOTTLES_STATE_1_UNKNOWN://L80389BAC
|
||||
this->yaw_ideal = (f32) func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
|
||||
@@ -502,7 +502,7 @@ void chBottles_update(Actor *this) {
|
||||
}
|
||||
|
||||
//L80389CA4
|
||||
__chBottles_setState(this, BOTTLES_STATE_2_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_2_UNKNOWN);
|
||||
}
|
||||
}
|
||||
else {//L80389CBC
|
||||
@@ -510,20 +510,20 @@ void chBottles_update(Actor *this) {
|
||||
break;
|
||||
}
|
||||
|
||||
sp34 = (chBottlesDialogTable[this->unkF4_8 - 1].ability + 1) && ability_isUnlocked(chBottlesDialogTable[this->unkF4_8 - 1].ability);
|
||||
sp34 = (chSmBottlesDialogTable[this->unkF4_8 - 1].ability + 1) && ability_isUnlocked(chSmBottlesDialogTable[this->unkF4_8 - 1].ability);
|
||||
|
||||
if (!sp34 && this->unkF4_8 != 1 || fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) == 0 || gDialogIndex < 6) {
|
||||
if (!sp34 && this->unkF4_8 != 1 || fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) == 0 || chSmBottlesDialogIndex < 6) {
|
||||
if (this->unkF4_8 != 8 || !fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY)) {
|
||||
if (func_8028EFC8() && face_buttons[FACE_BUTTON(BUTTON_B)] == 1) {
|
||||
if (sp34 || this->unkF4_8 == 1 || this->unkF4_8 == 8) {
|
||||
__chBottles_setState(this, BOTTLES_STATE_5_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_5_UNKNOWN);
|
||||
}
|
||||
else {
|
||||
if (func_80329530(this, 0x96) && !sp34) {
|
||||
func_8028F45C(9, this->position);
|
||||
}
|
||||
|
||||
__chBottles_setState(this, BOTTLES_STATE_2_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_2_UNKNOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -531,7 +531,7 @@ void chBottles_update(Actor *this) {
|
||||
}
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_2_UNKNOWN://L80389E2C
|
||||
case SM_BOTTLES_STATE_2_UNKNOWN://L80389E2C
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
|
||||
@@ -541,10 +541,10 @@ void chBottles_update(Actor *this) {
|
||||
|
||||
if (actor_animationIsAt(this, 0.9999f)) {
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES)) {
|
||||
__chBottles_talk(this);
|
||||
__chSmBottles_talk(this);
|
||||
}
|
||||
|
||||
__chBottles_setState(this, BOTTLES_STATE_3_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_3_UNKNOWN);
|
||||
}//L80389EE0
|
||||
else if (actor_animationIsAt(this, 0.14f)) {
|
||||
FUNC_8030E8B4(SFX_C6_SHAKING_MOUTH, 1.2f, 24000, this->position, 1250, 2500);
|
||||
@@ -557,12 +557,12 @@ void chBottles_update(Actor *this) {
|
||||
}
|
||||
else if (actor_animationIsAt(this, 0.35f)) {//L80389F78
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES)) {
|
||||
__chBottles_talk(this);
|
||||
__chSmBottles_talk(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_3_UNKNOWN://L80389FAC
|
||||
case SM_BOTTLES_STATE_3_UNKNOWN://L80389FAC
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
|
||||
@@ -590,7 +590,7 @@ void chBottles_update(Actor *this) {
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_5)) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, FALSE);
|
||||
__chBottles_setState(this, BOTTLES_STATE_4_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
}//L8038A1B8
|
||||
|
||||
button_pressed = -1;
|
||||
@@ -609,27 +609,27 @@ void chBottles_update(Actor *this) {
|
||||
|
||||
if (button_pressed != -1) {
|
||||
fileProgressFlag_set(FILEPROG_DB_SKIPPED_TUTORIAL, button_pressed ? 0 : 1);
|
||||
gcdialog_showText(button_pressed ? ASSET_E07_TEXT_BOTTLES_UNKNOWN : ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL, 0xe, this->position, this->marker, __chBottles_textCallback,__chBottles_textActions);
|
||||
gcdialog_showText(button_pressed ? ASSET_E07_TEXT_BOTTLES_UNKNOWN : ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL, 0xe, this->position, this->marker, __chSmBottles_textCallback,__chSmBottles_textActions);
|
||||
|
||||
if (!button_pressed) {
|
||||
__chBottles_skipIntroTutorial();
|
||||
__chSmBottles_skipIntroTutorial();
|
||||
}
|
||||
|
||||
this->unk38_0 = FALSE;
|
||||
}
|
||||
else if (!this->has_met_before && 5.0 < this->lifetime_value) {
|
||||
gcdialog_showText(ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT, 0x86, this->position, this->marker, __chBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT, 0x86, this->position, this->marker, __chSmBottles_textCallback, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BOTTLES_STATE_4_UNKNOWN: //L8038A31C
|
||||
case SM_BOTTLES_STATE_4_UNKNOWN: //L8038A31C
|
||||
if (0.35 < animctrl_getAnimTimer(this->animctrl) && animctrl_getAnimTimer(this->animctrl) < 0.9) {
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
else if (actor_animationIsAt(this, 0.9999f)) { //L8038A378
|
||||
__chBottles_setState(this, BOTTLES_STATE_1_UNKNOWN);
|
||||
__chSmBottles_setState(this, SM_BOTTLES_STATE_1_UNKNOWN);
|
||||
func_80386540();
|
||||
}
|
||||
break;
|
@@ -8,7 +8,7 @@ void chmole_additionalAbilityLearnActions(ActorMarker *marker, enum asset_e arg1
|
||||
|
||||
typedef struct{
|
||||
s16 teach_text_id;
|
||||
s16 refresher_text;
|
||||
s16 refresher_text_id;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} ChMoleDescription;
|
||||
@@ -224,7 +224,7 @@ int chmole_learnAbility(Actor *this){
|
||||
// Known Ability: Refresher Dialog
|
||||
if(ability_isUnlocked(moleTable[this->unkF4_8-9].ability)){
|
||||
sp28 = 0xf;
|
||||
sp2C = moleTable[this->unkF4_8-9].refresher_text;
|
||||
sp2C = moleTable[this->unkF4_8-9].refresher_text_id;
|
||||
}//L802D99EC
|
||||
// New Ability: Learn Dialog & Misc Actions
|
||||
else{
|
||||
|
Reference in New Issue
Block a user