document: SM characters
This commit is contained in:
@@ -155,7 +155,7 @@ int func_803872EC(void){
|
||||
|| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)
|
||||
|| text_id == ASSET_B3B_TEXT_CONGA_ORANGE_PAD_JIGGY
|
||||
|| text_id == ASSET_B45_TEXT_JIGGY_COLLECT_10
|
||||
|| text_id == ASSET_B51_TEXT_BOTTLES_HOW_TO_EXIT_LEVEL;
|
||||
|| text_id == ASSET_B51_DIALOG_BOTTLES_HOW_TO_EXIT_LEVEL;
|
||||
}
|
||||
|
||||
void func_80387370(ActorMarker *this, enum asset_e text_id, s32 arg2){
|
||||
|
@@ -2,249 +2,248 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* extern functions */
|
||||
void timed_exitStaticCamera(f32);
|
||||
void func_8028F918(s32);
|
||||
/* chAttackTutorial - controls bottle teaching moves in spiral */
|
||||
|
||||
/* public functions */
|
||||
void chAttackTutorial_talk(ActorMarker *);
|
||||
void chAttackTutorial_setState(Actor *this, s32 state);
|
||||
void chAttackTutorial_update(Actor *);
|
||||
extern void timed_exitStaticCamera(f32 time);
|
||||
extern void func_8028F918(s32);
|
||||
|
||||
/* .data */
|
||||
enum chAttackTutorial_state_e {
|
||||
ATTACK_TUTORIAL_STATE_1_UNKNOWN = 1,
|
||||
ATTACK_TUTORIAL_STATE_2_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_3_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_4_UNKNOWN,
|
||||
ATTACK_TUTORIAL_STATE_5_UNKNOWN
|
||||
enum ch_attack_tutorial_states {
|
||||
CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN = 0x1, // L80387610
|
||||
CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE, // L803873E0
|
||||
CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES, // L8038742C
|
||||
CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED, // L80387454
|
||||
CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG // L80387680
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC20 = {
|
||||
static void __chAttackTutorial_showDialogText(ActorMarker *);
|
||||
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state);
|
||||
static void __chAttackTutorial_update(Actor *);
|
||||
|
||||
/* .data */
|
||||
ActorInfo gChAttackTutorial = {
|
||||
MARKER_12B_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL, NULL,
|
||||
1, NULL,
|
||||
chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
__chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chAttackTutorial_enemy(ActorMarker *marker, enum actor_e enemy_id) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static void __chAttackTutorial_spawnEnemyActorForMarker(ActorMarker* marker, enum actor_e enemy_id) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
s32 pad;
|
||||
Actor *enemy = spawn_child_actor(enemy_id, &actor);
|
||||
Actor *other = spawn_child_actor(enemy_id, &actor);
|
||||
|
||||
actor->unk100 = enemy->marker;
|
||||
enemy->unk100 = actor->marker;
|
||||
|
||||
if (actor->unk10_12 == VEGETABLE_3_COLLY_WOBBLE && actor->unk38_31 == 1) {
|
||||
enemy->unk38_31 = 1;
|
||||
}
|
||||
else {//L803871D4
|
||||
enemy->unk38_31 = 0;
|
||||
actor->unk100 = other->marker;
|
||||
other->unk100 = actor->marker;
|
||||
if (actor->unk10_12 == 3 && actor->unk38_31 == 1) {
|
||||
other->unk38_31 = 1;
|
||||
} else {
|
||||
other->unk38_31 = 0;
|
||||
}
|
||||
|
||||
enemy->unk10_12 = VEGETABLE_1_TOPPER;
|
||||
other->unk10_12 = 1;
|
||||
if (marker);
|
||||
}
|
||||
|
||||
s32 __chAttackTutorial_spawnEnemy(Actor *this, enum vegetable_e vegetable_id) {
|
||||
volatile enum actor_e enemy_id;
|
||||
|
||||
enemy_id = vegetable_id == VEGETABLE_1_TOPPER ? ACTOR_166_TOPPER_A :
|
||||
vegetable_id == VEGETABLE_2_BAWL ? ACTOR_165_BAWL_A : ACTOR_164_COLLYWOBBLE_A;
|
||||
|
||||
__spawnQueue_add_2(__chAttackTutorial_enemy, this->marker, enemy_id);
|
||||
// spawn topper, bawl or collywobble based on already_killed_enemies (actor->unk10_12)
|
||||
static s32 __chAttackTutorial_spawnEnemyActor(Actor *this, s32 already_killed_enemies) {
|
||||
volatile enum actor_e sp1C;
|
||||
s32 tmp_v0;
|
||||
|
||||
if (already_killed_enemies == 1) {
|
||||
sp1C = ACTOR_166_TOPPER_THE_CARROT_A;
|
||||
} else {
|
||||
sp1C = tmp_v0 = (already_killed_enemies == 2)
|
||||
? ACTOR_165_BAWL_THE_ONION_A
|
||||
: ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A;
|
||||
}
|
||||
|
||||
__spawnQueue_add_2(__chAttackTutorial_spawnEnemyActorForMarker, this->marker, sp1C);
|
||||
|
||||
}
|
||||
|
||||
void __chAttackTutorial_learnedTextActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
chAttackTutorial_setState(marker_getActor(marker), ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
static void __chAttackTutorial_advanceMarkToState2(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
__chAttackTutorial_setState(marker_getActor(marker), CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
}
|
||||
|
||||
void __chAttackTutorial_learnedTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static void __chAttackTutorial_learnAbilityBasedOnDialog(ActorMarker *marker, enum asset_e dialog_id, s32 arg2) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
func_8028F918(0);
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_E15_TEXT_UNKNOWN://L803872C8
|
||||
switch(dialog_id) {
|
||||
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
|
||||
case ASSET_E17_TEXT_UNKNOWN://L803872E4
|
||||
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
}//L803872FC
|
||||
|
||||
}
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
void chAttackTutorial_setState(Actor *this, s32 state) {
|
||||
switch (state) {
|
||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN:
|
||||
if (this->unk10_12 == NULL) {
|
||||
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state) {
|
||||
switch (state)
|
||||
{
|
||||
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||
if (this->unk10_12 == 0) {
|
||||
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
||||
gcdialog_showText(ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, __chAttackTutorial_learnedTextActions);
|
||||
gcdialog_showText(ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, __chAttackTutorial_advanceMarkToState2);
|
||||
}
|
||||
else {
|
||||
gcdialog_showText(this->unk10_12 == VEGETABLE_1_TOPPER ? ASSET_E15_TEXT_UNKNOWN : ASSET_E17_TEXT_UNKNOWN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, NULL);
|
||||
else{
|
||||
gcdialog_showText(
|
||||
(this->unk10_12 == 1) ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
|
||||
0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, NULL
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L803873E0
|
||||
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||
this->unk38_31 = 0;
|
||||
__chAttackTutorial_spawnEnemy(this, ++this->unk10_12);
|
||||
__chAttackTutorial_spawnEnemyActor(this, ++this->unk10_12);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_3_UNKNOWN://L8038742C
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, TRUE);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
||||
case CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES:
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, 1);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||
marker_despawn(this->marker);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_4_UNKNOWN://L80387454
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
||||
|
||||
if (!honeycombscore_get(HONEYCOMB_17_SM_COLIWOBBLE)) {
|
||||
this->unk10_12 = VEGETABLE_3_COLLY_WOBBLE;
|
||||
case CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED:
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||
if (!honeycombscore_get(HONEYCOMB_17_SM_COLLIWOBBLE)) {
|
||||
this->unk10_12 = 3;
|
||||
this->unk38_31 = 1;
|
||||
__chAttackTutorial_spawnEnemy(this, this->unk10_12);
|
||||
__chAttackTutorial_spawnEnemyActor(this, this->unk10_12);
|
||||
}
|
||||
|
||||
break;
|
||||
}//L803874A8
|
||||
}
|
||||
|
||||
subaddie_set_state(this, state);
|
||||
}
|
||||
|
||||
int __chAttackTutorial_isEveryAbilitiesUnlocked(void) {
|
||||
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE) &&
|
||||
ability_isUnlocked(ABILITY_C_ROLL) &&
|
||||
ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
||||
static bool __chAttackTutorial_areLearnableAbilitiesUnlocked() {
|
||||
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
&& ability_isUnlocked(ABILITY_C_ROLL)
|
||||
&& ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
||||
}
|
||||
|
||||
void chAttackTutorial_update(Actor *this) {
|
||||
f32 distance_to_bottles;
|
||||
Actor *bottles_ptr;
|
||||
|
||||
if (!this->initialized) {
|
||||
bottles_ptr = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &distance_to_bottles);
|
||||
|
||||
if (bottles_ptr != NULL) {
|
||||
this->unk1C_x = bottles_ptr->position_x;
|
||||
this->unk1C_y = bottles_ptr->position_y;
|
||||
this->unk1C_z = bottles_ptr->position_z;
|
||||
}
|
||||
else {
|
||||
static void __chAttackTutorial_update(Actor *this) {
|
||||
f32 minimum_distance;
|
||||
Actor *bottles;
|
||||
|
||||
if (!this->initialized) {
|
||||
bottles = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &minimum_distance);
|
||||
if (bottles != NULL) {
|
||||
this->unk1C_x = bottles->position_x;
|
||||
this->unk1C_y = bottles->position_y;
|
||||
this->unk1C_z = bottles->position_z;
|
||||
} else {
|
||||
this->unk1C_x = this->position_x;
|
||||
this->unk1C_y = this->position_y;
|
||||
this->unk1C_z = this->position_z;
|
||||
}
|
||||
|
||||
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL) ? VEGETABLE_2_BAWL :
|
||||
ability_isUnlocked(ABILITY_4_CLAW_SWIPE) ? VEGETABLE_1_TOPPER : NULL;
|
||||
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL)
|
||||
? 2
|
||||
: ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
? 1
|
||||
: 0;
|
||||
|
||||
this->initialized = TRUE;
|
||||
}
|
||||
|
||||
switch (this->state) {
|
||||
case ATTACK_TUTORIAL_STATE_1_UNKNOWN://L80387610
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4)) {
|
||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_5_UNKNOWN);
|
||||
}
|
||||
|
||||
if (__chAttackTutorial_isEveryAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_4_UNKNOWN);
|
||||
}
|
||||
switch(this->state) {
|
||||
case CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4))
|
||||
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG);
|
||||
|
||||
if (__chAttackTutorial_areLearnableAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))
|
||||
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED);
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L80387658
|
||||
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) {
|
||||
chAttackTutorial_talk(this->marker);
|
||||
__chAttackTutorial_showDialogText(this->marker);
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE);
|
||||
}
|
||||
break;
|
||||
|
||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN://L80387680
|
||||
break;
|
||||
}////L80387680
|
||||
}
|
||||
|
||||
void __chAttackTutorial_attackTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN:
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case ASSET_E14_TEXT_UNKNOWN:
|
||||
case ASSET_E16_TEXT_UNKNOWN:
|
||||
case ASSET_E18_TEXT_UNKNOWN:
|
||||
__chAttackTutorial_spawnEnemy(actor, actor->unk10_12);
|
||||
break;
|
||||
|
||||
case ASSET_E15_TEXT_UNKNOWN:
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
break;
|
||||
|
||||
case ASSET_E17_TEXT_UNKNOWN:
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
||||
break;
|
||||
|
||||
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E19_TEXT_UNKNOWN:
|
||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_3_UNKNOWN);
|
||||
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void __chAttackTutorial_handleDialog(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
switch(text_id) {
|
||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN:
|
||||
func_8028F918(0);
|
||||
break;
|
||||
case ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // WOW...NICE ONE! TRY ANOTHER!
|
||||
case ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // BULLS-EYE! ONE MORE...
|
||||
case ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // MMMM...NOT BAD, FEATHER FACE!
|
||||
__chAttackTutorial_spawnEnemyActor(actor, actor->unk10_12);
|
||||
break;
|
||||
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
|
||||
break;
|
||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES:
|
||||
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES);
|
||||
break;
|
||||
}
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
void chAttackTutorial_talk(ActorMarker *marker) {
|
||||
s32 text_id;
|
||||
int try_count;
|
||||
s32 text_flags = 4;
|
||||
|
||||
Actor *actor = marker_getActor(marker);
|
||||
try_count = BOOL(actor->unk38_31);
|
||||
|
||||
if (try_count) {
|
||||
text_flags = 0xE;
|
||||
static void __chAttackTutorial_showDialogText(ActorMarker* marker) {
|
||||
s32 dialog_text;
|
||||
bool has_killed_enemy;
|
||||
s32 dialog_flag = 0x4;
|
||||
|
||||
Actor* actor = marker_getActor(marker);
|
||||
|
||||
has_killed_enemy = actor->unk38_31 ? TRUE : FALSE;
|
||||
if (has_killed_enemy) {
|
||||
dialog_flag = 0xE;
|
||||
}
|
||||
|
||||
switch (actor->unk10_12) {
|
||||
case VEGETABLE_1_TOPPER: //L803877D8
|
||||
text_id = try_count ? ASSET_E15_TEXT_UNKNOWN : ASSET_E14_TEXT_UNKNOWN;
|
||||
case 1:
|
||||
dialog_text = has_killed_enemy ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
case VEGETABLE_2_BAWL: //L803877F4
|
||||
text_id = try_count ? ASSET_E17_TEXT_UNKNOWN : ASSET_E16_TEXT_UNKNOWN;
|
||||
case 2:
|
||||
dialog_text = has_killed_enemy ? ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP : ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
case VEGETABLE_3_COLLY_WOBBLE: //L80387810
|
||||
text_id = try_count ? ASSET_E19_TEXT_UNKNOWN : ASSET_E18_TEXT_UNKNOWN;
|
||||
case 3:
|
||||
dialog_text = has_killed_enemy ? ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES : ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||
break;
|
||||
|
||||
default:
|
||||
//sp34 = actor->unk38_31;
|
||||
break;
|
||||
}//L8038782C
|
||||
}
|
||||
|
||||
if (text_id == ASSET_E19_TEXT_UNKNOWN) {
|
||||
if (dialog_text == ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES) {
|
||||
func_8028F94C(2, actor->unk1C);
|
||||
}//L80387848
|
||||
}
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && try_count) {
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && has_killed_enemy) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
text_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}//L80387898
|
||||
dialog_text = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}
|
||||
|
||||
if (try_count) {
|
||||
if (has_killed_enemy) {
|
||||
timed_setStaticCameraToNode(0.0f, 6);
|
||||
}//L803878B0
|
||||
}
|
||||
|
||||
gcdialog_showText(text_id, text_flags, actor->unk1C, actor->marker, __chAttackTutorial_attackTextCallback, NULL);
|
||||
gcdialog_showText(dialog_text, dialog_flag, actor->unk1C, actor->marker, __chAttackTutorial_handleDialog, NULL);
|
||||
actor->unk38_31++;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ enum chJumpTutorial_state_e {
|
||||
JUMP_TUTORIAL_STATE_3_DISAPPEARED
|
||||
};
|
||||
|
||||
ActorInfo D_8038B0B0 = {
|
||||
ActorInfo gChJumpTutorial = {
|
||||
MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL,
|
||||
1, NULL,
|
||||
chJumpTutorial_update, actor_update_func_80326224, func_80325340,
|
||||
@@ -32,7 +32,7 @@ void __chJumpTutorial_setStaticCameraToNode4(Actor *this) {
|
||||
void __chJumpTutorial_textCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2) {
|
||||
Actor *actor = marker_getActor(caller);
|
||||
|
||||
if (text_id == ASSET_DF9_TEXT_BOTTLES_UNKNOWN || text_id == ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES) {
|
||||
if (text_id == ASSET_DF9_DIALOG_BOTTLES_UNKNOWN || text_id == ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES) {
|
||||
chJumpTutorial_setState(actor, JUMP_TUTORIAL_STATE_3_DISAPPEARED);
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ void chJumpTutorial_setState(Actor *this, s32 state) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER);
|
||||
|
||||
gcdialog_showText(ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1A_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1A_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
|
||||
}
|
||||
break;
|
||||
@@ -112,8 +112,8 @@ void chJumpTutorial_update(Actor *this) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_7_FEATHERY_FLAP);
|
||||
|
||||
gcdialog_showText(ASSET_DF7_TEXT_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1B_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF7_DIALOG_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1B_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
|
||||
}//L8038A730
|
||||
|
||||
@@ -121,8 +121,8 @@ void chJumpTutorial_update(Actor *this) {
|
||||
__chJumpTutorial_setStaticCameraToNode4(this);
|
||||
ability_unlock(ABILITY_8_FLAP_FLIP);
|
||||
|
||||
gcdialog_showText(ASSET_DF8_TEXT_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1C_TEXT_BOTTLES_UNKNOWN;
|
||||
gcdialog_showText(ASSET_DF8_DIALOG_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
this->sm_4070.dialog_id = ASSET_E1C_DIALOG_BOTTLES_UNKNOWN;
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED, FALSE);
|
||||
}//L8038A794
|
||||
|
||||
@@ -132,10 +132,10 @@ void chJumpTutorial_update(Actor *this) {
|
||||
|
||||
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) {
|
||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||
dialog_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
dialog_id = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||
}
|
||||
else {
|
||||
dialog_id = ASSET_DF9_TEXT_BOTTLES_UNKNOWN;
|
||||
dialog_id = ASSET_DF9_DIALOG_BOTTLES_UNKNOWN;
|
||||
}
|
||||
|
||||
gcdialog_showText(dialog_id, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
|
||||
|
@@ -40,7 +40,7 @@ ActorAnimationInfo chSmBottlesAnimations[6] = {
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
||||
};
|
||||
|
||||
ActorInfo chBottles = {
|
||||
ActorInfo gChBottles = {
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||
1, chSmBottlesAnimations,
|
||||
chSmBottles_update, actor_update_func_80326224, func_802D94B4,
|
||||
@@ -48,14 +48,14 @@ ActorInfo chBottles = {
|
||||
};
|
||||
|
||||
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},
|
||||
{-1, ASSET_E00_TEXT_BOTTLES_ATTACK_REFRESHER, 0x6, ABILITY_B_RATATAT_RAP},
|
||||
{ASSET_E04_TEXT_BOTTLES_BEAK_BARGE_LEARN, ASSET_E06_TEXT_BOTTLES_BEAK_BARGE_REFRESHER, 0x8, ABILITY_0_BARGE},
|
||||
{-1, ASSET_DFA_TEXT_BOTTLES_JUMP_REFRESHER, 0x4, ABILITY_8_FLAP_FLIP},
|
||||
{ASSET_E01_TEXT_BOTTLES_CLIMB_LEARN, ASSET_E03_TEXT_BOTTLES_CLIMB_REFRESHER, 0x7, ABILITY_5_CLIMB},
|
||||
{ASSET_E10_TEXT_BOTTLES_BRIDGE_BROKEN, ASSET_E11_TEXT_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
{ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION, ASSET_E08_DIALOG_BOTTLES_FIND_ANOTHER_MOLEHILL, 0x1, -1},
|
||||
{ASSET_DF4_DIALOG_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_DIALOG_BOTTLES_CAMERA_CONTROL_REFRESHER, 0x3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_DIALOG_BOTTLES_DIVE_LEARN, ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER, 0x5, ABILITY_F_DIVE},
|
||||
{-1, ASSET_E00_DIALOG_BOTTLES_ATTACK_REFRESHER, 0x6, ABILITY_B_RATATAT_RAP},
|
||||
{ASSET_E04_DIALOG_BOTTLES_BEAK_BARGE_LEARN, ASSET_E06_DIALOG_BOTTLES_BEAK_BARGE_REFRESHER, 0x8, ABILITY_0_BARGE},
|
||||
{-1, ASSET_DFA_DIALOG_BOTTLES_JUMP_REFRESHER, 0x4, ABILITY_8_FLAP_FLIP},
|
||||
{ASSET_E01_DIALOG_BOTTLES_CLIMB_LEARN, ASSET_E03_DIALOG_BOTTLES_CLIMB_REFRESHER, 0x7, ABILITY_5_CLIMB},
|
||||
{ASSET_E10_DIALOG_BOTTLES_BRIDGE_BROKEN, ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
};
|
||||
|
||||
s32 chSmBottlesDialogIndex = 0;
|
||||
@@ -241,43 +241,43 @@ void __chSmBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 a
|
||||
|
||||
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, __chSmBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E12_DIALOG_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)) {
|
||||
if (!(text_id == ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION || text_id == ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER || text_id == ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT)) {
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
|
||||
switch (text_id) {
|
||||
case ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED:
|
||||
case ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED:
|
||||
break;
|
||||
|
||||
case ASSET_DF3_TEXT_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
case ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, __chSmBottles_textCallback, __chSmBottles_textActions);
|
||||
break;
|
||||
|
||||
case ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
case ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
actor->unk38_0 = TRUE;
|
||||
break;
|
||||
|
||||
case ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
|
||||
case ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
|
||||
actor->has_met_before = FALSE;
|
||||
actor->lifetime_value = 0.0f;
|
||||
break;
|
||||
|
||||
case ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
case ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
__chSmBottles_setState(actor, SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (actor->state != SM_BOTTLES_STATE_5_UNKNOWN) {
|
||||
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 0x4, NULL, NULL, NULL, NULL);
|
||||
gcdialog_showText(ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED, 0x4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
__chSmBottles_setState(actor, actor->state == SM_BOTTLES_STATE_5_UNKNOWN ? SM_BOTTLES_STATE_1_UNKNOWN : SM_BOTTLES_STATE_4_UNKNOWN);
|
||||
@@ -291,11 +291,11 @@ void __chSmBottles_getRefresherDialog(Actor *this, s32 *text_id, s32 *text_flags
|
||||
// Gives the player the ability if not learned.
|
||||
if (ability_isUnlocked(chSmBottlesDialogTable[this->unkF4_8 - 1].ability)) {
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
*text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
*text_id = chSmBottlesDialogIndex + ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
|
||||
if (*text_id != ASSET_E0E_TEXT_BOTTLES_REFUSE_HELP_5) {
|
||||
if (*text_id != ASSET_E0E_DIALOG_BOTTLES_REFUSE_HELP_5) {
|
||||
*text_flags |= 1;
|
||||
}
|
||||
}
|
||||
@@ -303,8 +303,8 @@ void __chSmBottles_getRefresherDialog(Actor *this, s32 *text_id, s32 *text_flags
|
||||
*text_flags |= 1;
|
||||
*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;
|
||||
if (*text_id == ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER && !ability_hasUsed(ABILITY_3_CAMERA_CONTROL)) {
|
||||
*text_id = ASSET_DFD_DIALOG_BOTTLES_SWIM_LEARN;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,7 +327,7 @@ void __chSmBottles_talk(Actor *this) {
|
||||
text_flags |= 1;
|
||||
|
||||
if (fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)) {
|
||||
text_id = chSmBottlesDialogIndex + ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1;
|
||||
text_id = chSmBottlesDialogIndex + ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1;
|
||||
chSmBottlesDialogIndex++;
|
||||
chSmBottlesDialogIndex = MIN(chSmBottlesDialogIndex, 5);
|
||||
}
|
||||
@@ -344,11 +344,11 @@ void __chSmBottles_talk(Actor *this) {
|
||||
case 8://L80389720
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED)) {
|
||||
if (fileProgressFlag_get(FILEPROG_A6_FURNACE_FUN_COMPLETE)) {
|
||||
text_id = ASSET_E37_TEXT_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN;
|
||||
text_id = ASSET_E37_DIALOG_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN;
|
||||
text_flags |= 1;
|
||||
}
|
||||
else if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_F)) { //L80389758
|
||||
text_id = ASSET_E0F_TEXT_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
text_id = ASSET_E0F_DIALOG_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
text_flags |= 1;
|
||||
}
|
||||
else {//L80389780
|
||||
@@ -610,7 +610,7 @@ void chSmBottles_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, __chSmBottles_textCallback,__chSmBottles_textActions);
|
||||
gcdialog_showText(button_pressed ? ASSET_E07_DIALOG_BOTTLES_UNKNOWN : ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL, 0xe, this->position, this->marker, __chSmBottles_textCallback,__chSmBottles_textActions);
|
||||
|
||||
if (!button_pressed) {
|
||||
__chSmBottles_skipIntroTutorial();
|
||||
@@ -619,7 +619,7 @@ void chSmBottles_update(Actor *this) {
|
||||
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, __chSmBottles_textCallback, NULL);
|
||||
gcdialog_showText(ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT, 0x86, this->position, this->marker, __chSmBottles_textCallback, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -2,262 +2,252 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* extern functions */
|
||||
f32 mapModel_getFloorY(f32 *);
|
||||
void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
||||
void timed_mapSpecificFlags_setTrue(f32, s32);
|
||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern f32 mapModel_getFloorY(f32*);
|
||||
extern void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
||||
extern void timed_mapSpecificFlags_setTrue(f32 time, enum sm_specific_flags flag);
|
||||
extern void subaddie_set_state_with_direction(Actor* , s32, f32, s32);
|
||||
|
||||
/* typedefs and declarations */
|
||||
enum chVegetables_state_e {
|
||||
VEGETABLES_STATE_1_UNKNOWN = 1,
|
||||
VEGETABLES_STATE_2_UNKNOWN,
|
||||
VEGETABLES_STATE_3_UNKNOWN,
|
||||
VEGETABLES_STATE_4_UNKNOWN
|
||||
enum ch_vegetable_type {
|
||||
CH_VEGETABLE_1_TOPPER = 0x1,
|
||||
CH_VEGETABLE_2_BAWL,
|
||||
CH_VEGETABLE_3_COLLIWOBBLE
|
||||
};
|
||||
|
||||
typedef struct ch_vegetable {
|
||||
TUPLE(f32, unk0);
|
||||
s32 vegetable_id;
|
||||
u32 pad10_31: 19;
|
||||
u32 unk10_12: 4;
|
||||
u32 pad10_8: 9;
|
||||
} ChVeg;
|
||||
enum ch_vegetables_states {
|
||||
CH_VEGETABLES_STATE_1_UNKNOWN = 0x1, //L803882B0
|
||||
CH_VEGETABLES_STATE_2_UNKNOWN, //L803884E4
|
||||
CH_VEGETABLES_STATE_3_UNKNOWN, //L80388BFC
|
||||
CH_VEGETABLES_STATE_4_UNKNOWN //L8038839C
|
||||
};
|
||||
|
||||
/* public functions */
|
||||
Actor *chVegetablesDraw(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
||||
void chVegetablesUpdate(Actor *);
|
||||
typedef struct ch_vegatable {
|
||||
TUPLE(f32, unk0);
|
||||
enum ch_vegetable_type vegetable_type;
|
||||
u32 unk10_12;
|
||||
u32 pad10_31;
|
||||
u32 pad10_8;
|
||||
} sChVegetable;
|
||||
|
||||
static Actor* __chVegetables_draw(ActorMarker*, Gfx**, Mtx**, Vtx **);
|
||||
static void __chVegetables_update(Actor*);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo chTopperAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChCarrotAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1000000.0f},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f},
|
||||
{ASSET_224_ANIM_TOPPER_UNKNOWN, 0.75f},
|
||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC78 = {
|
||||
MARKER_12A_TOPPER_A, ACTOR_166_TOPPER_A, ASSET_4ED_MODEL_TOPPER,
|
||||
1, chTopperAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesTopperA = {
|
||||
MARKER_12A_TOPPER_THE_CARROT_A, ACTOR_166_TOPPER_THE_CARROT_A, ASSET_4ED_MODEL_TOPPER,
|
||||
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
2000, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AC9C = {
|
||||
MARKER_1E6_TOPPER_B, ACTOR_TOPPER_B, ASSET_4ED_MODEL_TOPPER,
|
||||
1, chTopperAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesTopperB = {
|
||||
MARKER_1E6_TOPPER_THE_CARROT_B, ACTOR_TOPPER_THE_CARROT_B, ASSET_4ED_MODEL_TOPPER,
|
||||
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
2000, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorAnimationInfo chBawlAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChOnionAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1000000.0f},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f},
|
||||
{ASSET_227_ANIM_BAWL_UNKNOWN, 0.75f},
|
||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038ACE8 = {
|
||||
MARKER_129_BAWL_A, ACTOR_165_BAWL_A, ASSET_4EF_MODEL_BAWL,
|
||||
1, chBawlAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesBawlA = {
|
||||
MARKER_129_BAWL_THE_ONION_A, ACTOR_165_BAWL_THE_ONION_A, ASSET_4EF_MODEL_BAWL,
|
||||
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD0C = {
|
||||
MARKER_1E7_BAWL_B, ACTOR_BAWL_B, ASSET_4EF_MODEL_BAWL,
|
||||
1, chBawlAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesBawlB = {
|
||||
MARKER_1E7_BAWL_THE_ONION_B, ACTOR_BAWL_THE_ONION_B, ASSET_4EF_MODEL_BAWL,
|
||||
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 1.0f, 0
|
||||
};
|
||||
|
||||
ActorAnimationInfo chCollywobbleAnimations[5] = {
|
||||
{NULL, 0.0f},
|
||||
static ActorAnimationInfo sChCauliflowerAnimations[5] = {
|
||||
{NULL, NULL},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f}
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD58 = {
|
||||
MARKER_128_COLLYWOBBLE_A, ACTOR_164_COLLYWOBBLE_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, chCollywobbleAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesCollywobbleA = {
|
||||
MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 2.0f, 0
|
||||
};
|
||||
|
||||
ActorInfo D_8038AD7C = {
|
||||
MARKER_1E8_COLLYWOBBLE_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, chCollywobbleAnimations,
|
||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
||||
ActorInfo gChVegetablesCollywobbleB = {
|
||||
MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||
0, 0, 2.0f, 0
|
||||
};
|
||||
|
||||
s32 D_8038ADA0[3] = {0xFF, 0xFF, 0xFF};
|
||||
static s32 sChVegetablesParticleRGB[3] = {0xFF, 0xFF, 0xFF};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038ADAC = {
|
||||
{0.1f, 0.5f},
|
||||
{1.5f, 3.0f},
|
||||
{0.0f, 0.01f},
|
||||
{1.0f, 1.5f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038ADAC = {
|
||||
{0.1f, 0.5f},
|
||||
{1.5f, 3.0f},
|
||||
{0.0f, 0.01f},
|
||||
{1.0f, 1.5f},
|
||||
0.0f, 0.01f,
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityPosition D_8038ADD4 = {
|
||||
static ParticleSettingsVelocityPosition sD_8038ADD4 = {
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
{{-40.0f, -40.0f, -40.0f}, {40.0f, 40.0f, 40.0f}}
|
||||
{{-40.0f, -40.0f, -40.0f}, {40.0f, 40.0f, 40.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AE04 = {
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AE04 = {
|
||||
{0.5f, 0.75f},
|
||||
{0.4f, 0.6f},
|
||||
{0.4f, 0.6f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
{4.0f, 4.0f},
|
||||
0.0f, 0.2f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AE2C = {
|
||||
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AE2C = {
|
||||
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AE74 = {
|
||||
{1.0f, 1.0f},
|
||||
{1.0f, 1.0f},
|
||||
{0.0f, 0.01f},
|
||||
{2.0f, 2.0f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AE74 = {
|
||||
{1.0f, 1.0f},
|
||||
{1.0f, 1.0f},
|
||||
{0.0f, 0.01f},
|
||||
{2.0f, 2.0f},
|
||||
0.0f, 0.5f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AE9C = {
|
||||
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}}
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AE9C = {
|
||||
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.0f}},
|
||||
{{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}}
|
||||
};
|
||||
|
||||
ParticleScaleAndLifetimeRanges D_8038AEE4 = {
|
||||
{0.6f, 0.8f},
|
||||
{0.5f, 0.7f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
static ParticleScaleAndLifetimeRanges sD_8038AEE4 = {
|
||||
{0.6f, 0.8f},
|
||||
{0.5f, 0.7f},
|
||||
{0.0f, 0.01f},
|
||||
{4.0f, 4.0f},
|
||||
0.0f, 0.5f
|
||||
};
|
||||
|
||||
ParticleSettingsVelocityAccelerationPosition D_8038AF0C = {
|
||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
||||
{{ 0.0f, -900.0f, 0.0f}, { 0.0f, -900.0f, 0.0f}},
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
static ParticleSettingsVelocityAccelerationPosition sD_8038AF0C = {
|
||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
||||
{{0.0f, -900.0f, 0.0f}, {0.0f, -900.0f, 0.0f}},
|
||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||
};
|
||||
|
||||
/* .code */
|
||||
void __chVegetables_emitDust(ParticleEmitter *pCtrl, f32 *pos, s32 n) {
|
||||
s32 sp24[3] = D_8038ADA0;
|
||||
particleEmitter_setRGB(pCtrl, sp24);
|
||||
particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST);
|
||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038ADAC);
|
||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038ADD4);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setSpriteDustParticles(ParticleEmitter *emitter, f32 *position, s32 emit_count) {
|
||||
s32 sp24[3] = sChVegetablesParticleRGB;
|
||||
particleEmitter_setRGB(emitter, sp24);
|
||||
particleEmitter_setSprite(emitter, ASSET_700_SPRITE_DUST);
|
||||
particleEmitter_setStartingFrameRange(emitter, 0, 7);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038ADAC);
|
||||
particleEmitter_setPositionAndVelocityRanges(emitter, &sD_8038ADD4);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_803879B8(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 2);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE04);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE2C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForModel(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||
particleEmitter_func_802EFA18(emitter, 2);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE04);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE2C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_80387A80(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 3);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE74);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE9C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForModel2(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||
particleEmitter_func_802EFA18(emitter, 3);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE74);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE9C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void func_80387B48(ParticleEmitter *pCtrl, f32 pos[3], s32 n, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(pCtrl, 0.7f);
|
||||
particleEmitter_func_802EFA18(pCtrl, 4);
|
||||
particleEmitter_setModel(pCtrl, model_id);
|
||||
particleEmitter_setPosition(pCtrl, pos);
|
||||
particleEmitter_setDrawMode(pCtrl, 2);
|
||||
particleEmitter_setAngularVelocityRange(pCtrl, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
||||
particleEmitter_setSfx(pCtrl, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AEE4);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AF0C);
|
||||
particleEmitter_emitN(pCtrl, n);
|
||||
static void __chVegetables_setParticlesForHittingEnemyModel(ParticleEmitter *emitter, f32 position[3], s32 emit_count, enum asset_e model_id) {
|
||||
particleEmitter_func_802EF9F8(emitter, 0.7f);
|
||||
particleEmitter_func_802EFA18(emitter, 4);
|
||||
particleEmitter_setModel(emitter, model_id);
|
||||
particleEmitter_setPosition(emitter, position);
|
||||
particleEmitter_setDrawMode(emitter, 2);
|
||||
particleEmitter_setAngularVelocityRange(emitter, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
||||
particleEmitter_setSfx(emitter, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
||||
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AEE4);
|
||||
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AF0C);
|
||||
particleEmitter_emitN(emitter, emit_count);
|
||||
}
|
||||
|
||||
void __chVegetables_dieActor(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
f32 pos[3];
|
||||
static void __chVegetables_vegetableDeathParticles(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
f32 particles_position[3];
|
||||
|
||||
FUNC_8030E8B4(SFX_111_WHIPCRACK_DEATH, 1.0f, 32000, this->position, 1000, 2000);
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
||||
pos[0] = this->position_x;
|
||||
pos[1] = this->position_y;
|
||||
pos[2] = this->position_z;
|
||||
pos[1] += 50.0f;
|
||||
|
||||
func_80387B48(partEmitMgr_newEmitter(12), pos, 0xC, ASSET_4F4_MODEL_UNKNOWN);
|
||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F2_MODEL_UNKNOWN);
|
||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F3_MODEL_UNKNOWN);
|
||||
|
||||
pos[1] += 50.0f;
|
||||
__chVegetables_emitDust(partEmitMgr_newEmitter(8), pos, 8);
|
||||
}//L80387D18
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||
particles_position[0] = this->position_x;
|
||||
particles_position[1] = this->position_y;
|
||||
particles_position[2] = this->position_z;
|
||||
particles_position[1] += 50.0f;
|
||||
__chVegetables_setParticlesForHittingEnemyModel(partEmitMgr_newEmitter(0xC), particles_position, 0xC, ASSET_4F4_MODEL_COLLIWOBBLE_STEM_DEATH);
|
||||
__chVegetables_setParticlesForModel(partEmitMgr_newEmitter(4), particles_position, 0x4, ASSET_4F2_MODEL_COLLIWOBBLE_LARGE_DEATH);
|
||||
__chVegetables_setParticlesForModel(partEmitMgr_newEmitter(4), particles_position, 0x4, ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH);
|
||||
particles_position[1] += 50.0f;
|
||||
__chVegetables_setSpriteDustParticles(partEmitMgr_newEmitter(8), particles_position, 8);
|
||||
}
|
||||
|
||||
if (this->unk38_31) {
|
||||
this->position_y += 100.0f;
|
||||
func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE);
|
||||
func_802CA1CC(HONEYCOMB_17_SM_COLLIWOBBLE);
|
||||
__spawnQueue_add_4((GenFunction_4) spawnQueue_bundle_f32, BUNDLE_1F_SM_EMPTY_HONEYCOMB, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z));
|
||||
}//L80387D64
|
||||
}
|
||||
|
||||
timed_mapSpecificFlags_setTrue(1.5f, SM_SPECIFIC_FLAG_7);
|
||||
actor_collisionOff(this);
|
||||
|
||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE) {
|
||||
subaddie_set_state_with_direction(this, VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
||||
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||
subaddie_set_state_with_direction(this, CH_VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
marker_despawn(this->marker);
|
||||
}
|
||||
}
|
||||
|
||||
void __chVegetables_die(ActorMarker *marker, ActorMarker *other_marker) {
|
||||
__chVegetables_dieActor(marker_getActor(marker));
|
||||
static void __chVegetables_vegetableMarkerDeathParticles(ActorMarker* marker, ActorMarker* other_marker) {
|
||||
__chVegetables_vegetableDeathParticles(marker_getActor(marker));
|
||||
}
|
||||
|
||||
Actor *chVegetablesDraw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
||||
Actor *actor = marker_getActor(marker);
|
||||
static Actor* __chVegetables_draw(ActorMarker* marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
||||
Actor* actor = marker_getActor(marker);
|
||||
|
||||
if (actor->has_met_before) {
|
||||
if (actor->has_met_before)
|
||||
func_8033A470(3, 7);
|
||||
}
|
||||
else {
|
||||
else
|
||||
func_8033A45C(3, 0);
|
||||
}
|
||||
|
||||
return actor_draw(marker, gdl, mptr, arg3);
|
||||
}
|
||||
|
||||
void func_80387E64(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
static void __chVegetables_moveVegetable(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
|
||||
this->unk1C_x = randf2(-50.0f, 50.0f);
|
||||
this->unk1C_y = randf2(-50.0f, 50.0f);
|
||||
@@ -268,293 +258,257 @@ void func_80387E64(Actor *this) {
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}
|
||||
|
||||
void func_80387F00(Actor *this) {
|
||||
ChVeg *local = (ChVeg *) &this->local;
|
||||
|
||||
this->position_y += mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 120.0 : 180.0;
|
||||
|
||||
static void __chVegetables_elevateAndMoveVegetable(Actor* this) {
|
||||
sChVegetable* local = (sChVegetable*)&this->local;
|
||||
|
||||
this->position_y += (
|
||||
mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) ||
|
||||
volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)
|
||||
) ? 120.0 : 180.0;
|
||||
local->unk0_x = this->position_x;
|
||||
local->unk0_y = this->position_y;
|
||||
local->unk0_z = this->position_z;
|
||||
|
||||
this->velocity_x = 0.0f;
|
||||
this->velocity_y = 0.0f;
|
||||
this->velocity_z = 0.0f;
|
||||
|
||||
func_80387E64(this);
|
||||
__chVegetables_moveVegetable(this);
|
||||
}
|
||||
|
||||
int func_80387FA8(Actor *this, ChVeg *local, s32 yaw, s32 arg3) {
|
||||
// determine some kind of position logic
|
||||
static bool __chVegetables_func_80387FA8(Actor* this, sChVegetable* local, s32 yaw, s32 arg3) {
|
||||
f32 sp24[3];
|
||||
f32 sp18[3];
|
||||
|
||||
|
||||
sp18[0] = arg3;
|
||||
sp18[1] = 0.0f;
|
||||
sp18[2] = 0.0f;
|
||||
|
||||
ml_vec3f_yaw_rotate_copy(sp18, sp18, yaw - 90.0);
|
||||
|
||||
sp24[0] = sp18[0] + local->unk0_x;
|
||||
sp24[1] = sp18[1] + local->unk0_y;
|
||||
sp24[2] = sp18[2] + local->unk0_z;
|
||||
|
||||
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void chVegetablesUpdate(Actor *this) {
|
||||
static void __chVegetables_update(Actor* this) {
|
||||
f32 temp_velZ;
|
||||
f32 temp_velX;
|
||||
f32 temp_f0;
|
||||
f32 tick;
|
||||
f32 sp78;
|
||||
f32 sp6C[3];
|
||||
f32 sp60[3];
|
||||
f32 position[3];
|
||||
ChVeg *local = (ChVeg *) &this->local; //sp38
|
||||
f32 unused;
|
||||
f32 sp54[3];
|
||||
sChVegetable* local = (sChVegetable*)&this->local; //sp38
|
||||
f32 sp30;
|
||||
|
||||
if (!this->initialized) {
|
||||
switch (this->marker->id) {
|
||||
switch(this->marker->id) {
|
||||
default:
|
||||
local->vegetable_id = VEGETABLE_3_COLLY_WOBBLE; //cauliflower
|
||||
local->vegetable_type = CH_VEGETABLE_3_COLLIWOBBLE;
|
||||
break;
|
||||
|
||||
case MARKER_12A_TOPPER_A: //L803880F0
|
||||
case MARKER_1E6_TOPPER_B: //L803880F0
|
||||
local->vegetable_id = VEGETABLE_1_TOPPER; //carrot
|
||||
case MARKER_12A_TOPPER_THE_CARROT_A:
|
||||
case MARKER_1E6_TOPPER_THE_CARROT_B:
|
||||
local->vegetable_type = CH_VEGETABLE_1_TOPPER;
|
||||
break;
|
||||
|
||||
case MARKER_129_BAWL_A: //L80388100
|
||||
case MARKER_1E7_BAWL_B: //L80388100
|
||||
local->vegetable_id = VEGETABLE_2_BAWL; //onion
|
||||
case MARKER_129_BAWL_THE_ONION_A:
|
||||
case MARKER_1E7_BAWL_THE_ONION_B:
|
||||
local->vegetable_type = CH_VEGETABLE_2_BAWL;
|
||||
break;
|
||||
}
|
||||
|
||||
actor_collisionOff(this);
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, __chVegetables_die);
|
||||
|
||||
marker_setCollisionScripts(this->marker, NULL, NULL, __chVegetables_vegetableMarkerDeathParticles);
|
||||
this->unk1C_x = this->position_x;
|
||||
this->unk1C_y = this->position_y;
|
||||
this->unk1C_z = this->position_z;
|
||||
this->position_y -= 200.f;
|
||||
|
||||
do {//L80388154
|
||||
// set temp_velX/Z to > 5
|
||||
do{
|
||||
temp_velX = randf2(-10.0f, 10.0f);
|
||||
temp_f0 = 0.0f <= temp_velX ? temp_velX : -temp_velX;
|
||||
temp_f0 = (0.0f <= temp_velX) ? temp_velX : -temp_velX;
|
||||
} while (temp_f0 < 5.0);
|
||||
|
||||
do {//L803881AC
|
||||
do{
|
||||
temp_velZ = randf2(-10.0f, 10.0f);
|
||||
temp_f0 = 0.0f <= temp_velZ ? temp_velZ : -temp_velZ;
|
||||
} while (temp_f0 < 5.0);
|
||||
temp_f0 = (0.0f <= temp_velZ) ? temp_velZ : -temp_velZ;
|
||||
} while(temp_f0 < 5.0);
|
||||
|
||||
this->velocity_x = temp_velX;
|
||||
this->velocity_y = local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 90.0f : 70.0f;
|
||||
this->velocity_y = (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 90.0f : 70.0f;
|
||||
this->velocity_z = temp_velZ;
|
||||
|
||||
this->has_met_before = TRUE;
|
||||
this->unk138_23 = 0;
|
||||
this->unk38_0 = 0;
|
||||
this->initialized = TRUE;
|
||||
this->scale = 0.5;
|
||||
}//L80388278
|
||||
}
|
||||
|
||||
switch (this->state) {
|
||||
case VEGETABLES_STATE_1_UNKNOWN: //L803882B0
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(
|
||||
VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) || this->unk10_12) {//L803882E4
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) { //L8038830C
|
||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 120.0 : 0.0;
|
||||
}
|
||||
else {//L80388350
|
||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 270.0 : 85.0;
|
||||
}
|
||||
//L80388384
|
||||
subaddie_set_state(this, VEGETABLES_STATE_4_UNKNOWN);
|
||||
switch (this->state)
|
||||
{
|
||||
case CH_VEGETABLES_STATE_1_UNKNOWN:
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) || this->unk10_12) {
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
||||
this->unk1C_y += (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 120.0 : 0.0;
|
||||
} else {
|
||||
this->unk1C_y += (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) ? 270.0 : 85.0;
|
||||
}
|
||||
break;
|
||||
subaddie_set_state(this, CH_VEGETABLES_STATE_4_UNKNOWN);
|
||||
}
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_4_UNKNOWN:
|
||||
this->position_x = this->velocity_x + this->position_x;
|
||||
this->position_y = this->velocity_y + this->position_y;
|
||||
this->position_z = this->velocity_z + this->position_z;
|
||||
this->velocity_y -= 5.0f;
|
||||
this->scale = MIN(this->scale + 0.05, 1.0);
|
||||
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
||||
this->position_y = mapModel_getFloorY(this->position);
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE)
|
||||
__chVegetables_elevateAndMoveVegetable(this);
|
||||
|
||||
case VEGETABLES_STATE_4_UNKNOWN: //L8038839C
|
||||
this->position_x = this->velocity_x + this->position_x;
|
||||
this->position_y = this->velocity_y + this->position_y;
|
||||
this->position_z = this->velocity_z + this->position_z;
|
||||
actor_collisionOn(this);
|
||||
subaddie_set_state(this, CH_VEGETABLES_STATE_2_UNKNOWN);
|
||||
}
|
||||
|
||||
this->velocity_y -= 5.0f;
|
||||
this->scale = MIN(this->scale + 0.05, 1.0);
|
||||
|
||||
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
||||
this->position_y = mapModel_getFloorY(this->position);
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
||||
func_80387F00(this);
|
||||
}
|
||||
|
||||
actor_collisionOn(this);
|
||||
subaddie_set_state(this, VEGETABLES_STATE_2_UNKNOWN);
|
||||
}//L80388494
|
||||
|
||||
if (!this->unk138_23) {
|
||||
if (0.0f < this->position_y) {
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1000, 2000);
|
||||
this->unk138_23 = 1;
|
||||
this->scale = 1.0f;
|
||||
}
|
||||
if (!this->unk138_23) {
|
||||
if (0.0f < this->position_y) {
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1000, 2000);
|
||||
this->unk138_23 = 1;
|
||||
this->scale = 1.0f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VEGETABLES_STATE_2_UNKNOWN: //L803884E4
|
||||
if (this->unk38_0) {
|
||||
if (func_80329480(this)) {
|
||||
this->unk38_0 = 0;
|
||||
}
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_2_UNKNOWN:
|
||||
if (this->unk38_0) {
|
||||
if (func_80329480(this)) {
|
||||
this->unk38_0 = 0;
|
||||
}
|
||||
else {//L80388520
|
||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
||||
this->actor_specific_1_f = 3.0f;
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || 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);
|
||||
this->unk38_0 = 1;
|
||||
}//L803885A0
|
||||
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L803885CC
|
||||
else if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1E, 0x5A);
|
||||
}//L80388B68
|
||||
}
|
||||
else {//L80388618
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
}
|
||||
else if (local->vegetable_id == VEGETABLE_2_BAWL) {//L80388634
|
||||
this->actor_specific_1_f = 4.0f;
|
||||
|
||||
} else {
|
||||
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER) {
|
||||
this->actor_specific_1_f = 3.0f;
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || 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);
|
||||
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
|
||||
this->unk38_0 = 1;
|
||||
}//L80388698
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(
|
||||
this))) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L803886E4
|
||||
else if (randf() < 0.02) {//D_8038B1D0){
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
else {//L80388730
|
||||
tick = time_getDelta();
|
||||
|
||||
sp6C[0] = this->unk1C_x - this->position_x;
|
||||
sp6C[1] = this->unk1C_y - this->position_y;
|
||||
sp6C[2] = this->unk1C_z - this->position_z;
|
||||
|
||||
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
||||
ml_vec3f_set_length(sp6C, 400.0f);
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
else {
|
||||
ml_vec3f_set_length(sp6C, 100.0f);
|
||||
}
|
||||
|
||||
this->position_x += this->velocity_x * tick + sp6C[0] * tick * tick;
|
||||
this->position_y += this->velocity_y * tick + sp6C[1] * tick * tick;
|
||||
this->position_z += this->velocity_z * tick + sp6C[2] * tick * tick;
|
||||
|
||||
this->velocity_x += sp6C[0] * tick;
|
||||
this->velocity_y += sp6C[1] * tick;
|
||||
this->velocity_z += sp6C[2] * tick;
|
||||
|
||||
if (gu_sqrtf(SQ(this->velocity_z) + (SQ(this->velocity_x) + SQ(this->velocity_y))) > 50.0f) {
|
||||
ml_vec3f_set_length(this->velocity, 50.0f);
|
||||
}
|
||||
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 20.0f) {
|
||||
func_80387E64(this);
|
||||
}
|
||||
|
||||
this->actor_specific_1_f = 5.0f;
|
||||
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))) { //L8038892C
|
||||
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;
|
||||
}//L80388994
|
||||
}
|
||||
else { //L803889A0
|
||||
this->position_x -= local->unk0_x;
|
||||
this->position_y -= local->unk0_y;
|
||||
this->position_z -= local->unk0_z;
|
||||
|
||||
this->unk1C_x -= local->unk0_x;
|
||||
this->unk1C_y -= local->unk0_y;
|
||||
this->unk1C_z -= local->unk0_z;
|
||||
|
||||
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;
|
||||
local->unk0_z = sp60[2] + local->unk0_z;
|
||||
|
||||
this->position_x = local->unk0_x + this->position_x;
|
||||
this->position_y = local->unk0_y + this->position_y;
|
||||
this->position_z = local->unk0_z + this->position_z;
|
||||
|
||||
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
||||
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}//L80388AD8
|
||||
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}//L80388B04
|
||||
else if (randf() < 0.01) {
|
||||
func_80328CEC(this, (s32) this->yaw, 0x1e, 0x5A);
|
||||
if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
else { //L80388B50
|
||||
}
|
||||
else {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
}
|
||||
else if (local->vegetable_type == CH_VEGETABLE_2_BAWL) {
|
||||
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;
|
||||
}
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(this))) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
} else {
|
||||
if (randf() < 0.02) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sp78 = time_getDelta();
|
||||
sp6C[0] = this->unk1C_x - this->position_x;
|
||||
sp6C[1] = this->unk1C_y - this->position_y;
|
||||
sp6C[2] = this->unk1C_z - this->position_z;
|
||||
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
||||
ml_vec3f_set_length(sp6C, 400.0f);
|
||||
}
|
||||
else {
|
||||
ml_vec3f_set_length(sp6C, 100.0f);
|
||||
}
|
||||
this->position_x += this->velocity_x*sp78 + sp6C[0]*sp78*sp78;
|
||||
this->position_y += this->velocity_y*sp78 + sp6C[1]*sp78*sp78;
|
||||
this->position_z += this->velocity_z*sp78 + sp6C[2]*sp78*sp78;
|
||||
this->velocity_x += sp6C[0]*sp78;
|
||||
this->velocity_y += sp6C[1]*sp78;
|
||||
this->velocity_z += sp6C[2]*sp78;
|
||||
if (gu_sqrtf(this->velocity_z*this->velocity_z + (this->velocity_x*this->velocity_x + this->velocity_y*this->velocity_y)) > 50.0f) {
|
||||
ml_vec3f_set_length(this->velocity, 50.0f);
|
||||
}
|
||||
if (ml_distance_vec3f(this->position, this->unk1C) < 20.0f) {
|
||||
__chVegetables_moveVegetable(this);
|
||||
}
|
||||
this->actor_specific_1_f = 5.0f;
|
||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))) { //L8038892C
|
||||
if (!__chVegetables_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;
|
||||
}
|
||||
} else {
|
||||
this->position_x -= local->unk0_x;
|
||||
this->position_y -= local->unk0_y;
|
||||
this->position_z -= local->unk0_z;
|
||||
this->unk1C_x -= local->unk0_x;
|
||||
this->unk1C_y -= local->unk0_y;
|
||||
this->unk1C_z -= local->unk0_z;
|
||||
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;
|
||||
local->unk0_z = sp60[2] + local->unk0_z;
|
||||
this->position_x = local->unk0_x + this->position_x;
|
||||
this->position_y = local->unk0_y + this->position_y;
|
||||
this->position_z = local->unk0_z + this->position_z;
|
||||
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
||||
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||
}
|
||||
if (func_803292E0(this)) {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
} else {
|
||||
if (randf() < 0.01) {
|
||||
func_80328CEC(this, (s32)this->yaw, 0x1e, 0x5A);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//L80388B68
|
||||
|
||||
func_80328FB0(this, 2.0f);
|
||||
|
||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE && actor_animationIsAt(this, 0.3f)) {
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 1.0f, 22000, this->position, 1000, 2000);
|
||||
}
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE && actor_animationIsAt(this, 0.4f)) {
|
||||
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);
|
||||
}
|
||||
break;
|
||||
|
||||
case VEGETABLES_STATE_3_UNKNOWN: //L80388BFC
|
||||
if (actor_animationIsAt(this, local->vegetable_id == VEGETABLE_2_BAWL ? 0.4 : 0.05)) {
|
||||
position[0] = this->position_x;
|
||||
position[1] = this->position_y;
|
||||
position[2] = this->position_z;
|
||||
|
||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
||||
position[1] += 150.0f;
|
||||
} else {
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
}
|
||||
|
||||
this->has_met_before = FALSE;
|
||||
func_80387A80(partEmitMgr_newEmitter(3), position, 3,
|
||||
local->vegetable_id == VEGETABLE_1_TOPPER ? ASSET_4F0_MODEL_UNKNOWN : ASSET_4F1_MODEL_UNKNOWN);
|
||||
}//L80388CC4
|
||||
|
||||
if (actor_animationIsAt(this, 0.75f)) {
|
||||
func_80326310(this);
|
||||
}
|
||||
break;
|
||||
}//L80388CE0
|
||||
}//*/
|
||||
}
|
||||
func_80328FB0(this, 2.0f);
|
||||
|
||||
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.3f))
|
||||
FUNC_8030E8B4(SFX_3F2_UNKNOWN, 1.0f, 22000, this->position, 1000, 2000);
|
||||
|
||||
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.4f))
|
||||
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);
|
||||
|
||||
break;
|
||||
case CH_VEGETABLES_STATE_3_UNKNOWN:
|
||||
if (actor_animationIsAt(this, (local->vegetable_type == CH_VEGETABLE_2_BAWL) ? 0.4 : 0.05)) {
|
||||
sp54[0] = this->position_x;
|
||||
sp54[1] = this->position_y;
|
||||
sp54[2] = this->position_z;
|
||||
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER)
|
||||
sp54[1] += 150.0f;
|
||||
this->has_met_before = FALSE;
|
||||
__chVegetables_setParticlesForModel2(partEmitMgr_newEmitter(3), sp54, 3, (local->vegetable_type == CH_VEGETABLE_1_TOPPER) ? ASSET_4F0_MODEL_TOPPER_UNKNOWN: ASSET_4F1_MODEL_BAWL_OR_COLLIWOBBLE_UNKNOWN);
|
||||
}
|
||||
|
||||
if (actor_animationIsAt(this, 0.75f))
|
||||
func_80326310(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
594
src/SM/code_2990.c
Normal file
594
src/SM/code_2990.c
Normal file
@@ -0,0 +1,594 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
//external
|
||||
Actor *func_802D94B4(ActorMarker*, Gfx**, Mtx**, Vtx**);
|
||||
void func_8028E668(f32*, f32, f32, f32);
|
||||
void func_80328FB0(Actor *, f32);
|
||||
void func_8030DA44(u8);
|
||||
void timed_exitStaticCamera(f32);
|
||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
|
||||
//static types
|
||||
typedef struct {
|
||||
s16 learn_text;
|
||||
s16 refresher_text;
|
||||
s8 camera_node;
|
||||
s8 ability;
|
||||
} ChSmMoleDescription;
|
||||
|
||||
//public
|
||||
void chsmmole_Update(Actor * this);
|
||||
void chsmmole_80389610(Actor * this);
|
||||
|
||||
/* .data */
|
||||
ActorAnimationInfo smMoleAnimations[6] = {
|
||||
{0, 0.0f},
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f},
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 4.5f},
|
||||
{ASSET_13B_ANIM_BOTTLES_IDLE, 7.0f},
|
||||
{ASSET_139_ANIM_BOTTLES_EXIT, 1.7f},
|
||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
||||
};
|
||||
|
||||
ActorInfo gChSmMole = {
|
||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||
1, smMoleAnimations,
|
||||
chsmmole_Update, actor_update_func_80326224, func_802D94B4,
|
||||
0, 0, 0.0f, 0
|
||||
};
|
||||
|
||||
ChSmMoleDescription smMoleTable[8] = {
|
||||
{ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION, ASSET_E08_DIALOG_BOTTLES_FIND_ANOTHER_MOLEHILL, 1, -1},
|
||||
{ASSET_DF4_DIALOG_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF5_DIALOG_BOTTLES_CAMERA_CONTROL_REFRESHER, 3, ABILITY_3_CAMERA_CONTROL},
|
||||
{ASSET_DFB_DIALOG_BOTTLES_DIVE_LEARN, ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER, 5, ABILITY_F_DIVE},
|
||||
{ -1, ASSET_E00_DIALOG_BOTTLES_ATTACK_REFRESHER, 6, ABILITY_B_RATATAT_RAP},
|
||||
{ASSET_E04_DIALOG_BOTTLES_BEAK_BARGE_LEARN, ASSET_E06_DIALOG_BOTTLES_BEAK_BARGE_REFRESHER, 8, ABILITY_0_BARGE},
|
||||
{ -1, ASSET_DFA_DIALOG_BOTTLES_JUMP_REFRESHER, 4, ABILITY_8_FLAP_FLIP},
|
||||
{ASSET_E01_DIALOG_BOTTLES_CLIMB_LEARN, ASSET_E03_DIALOG_BOTTLES_CLIMB_REFRESHER, 7, ABILITY_5_CLIMB},
|
||||
{ASSET_E10_DIALOG_BOTTLES_BRIDGE_BROKEN, ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN, 0x11, -1},
|
||||
};
|
||||
|
||||
s32 D_8038AFE4 = 0;
|
||||
|
||||
|
||||
/* .code */
|
||||
|
||||
/**
|
||||
* @brief Checks if any Spiral Mountain abilities have been learned
|
||||
*/
|
||||
int chsmmole_learnedAnySpiralMountainAbilities(void){
|
||||
return ability_isUnlocked(ABILITY_F_DIVE)
|
||||
|| ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
|| ability_isUnlocked(ABILITY_C_ROLL)
|
||||
|| ability_isUnlocked(ABILITY_B_RATATAT_RAP)
|
||||
|| ability_isUnlocked(ABILITY_0_BARGE)
|
||||
|| ability_isUnlocked(ABILITY_A_HOLD_A_JUMP_HIGHER)
|
||||
|| ability_isUnlocked(ABILITY_7_FEATHERY_FLAP)
|
||||
|| ability_isUnlocked(ABILITY_8_FLAP_FLIP)
|
||||
|| ability_isUnlocked(ABILITY_5_CLIMB);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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);
|
||||
ability_setHasUsed(ABILITY_2_BEAK_BUSTER);
|
||||
ability_setHasUsed(ABILITY_3_CAMERA_CONTROL);
|
||||
ability_setHasUsed(ABILITY_4_CLAW_SWIPE);
|
||||
ability_setHasUsed(ABILITY_5_CLIMB);
|
||||
ability_setHasUsed(ABILITY_B_RATATAT_RAP);
|
||||
ability_setHasUsed(ABILITY_C_ROLL);
|
||||
ability_setHasUsed(ABILITY_A_HOLD_A_JUMP_HIGHER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unlocks all of the Spiral Mountain moves.
|
||||
*/
|
||||
void chsmmole_skipIntroTutorial(void){
|
||||
ability_unlock(ABILITY_F_DIVE);
|
||||
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
||||
ability_unlock(ABILITY_C_ROLL);
|
||||
ability_unlock(ABILITY_B_RATATAT_RAP);
|
||||
ability_unlock(ABILITY_0_BARGE);
|
||||
ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER);
|
||||
ability_unlock(ABILITY_7_FEATHERY_FLAP);
|
||||
ability_unlock(ABILITY_8_FLAP_FLIP);
|
||||
ability_unlock(ABILITY_5_CLIMB);
|
||||
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){
|
||||
|
||||
if(this->unkF4_8 == 1 && !mapSpecificFlags_get(1)){
|
||||
timed_setStaticCameraToNode(0.0f, 0x12);
|
||||
}
|
||||
else{ //L80388F68
|
||||
timed_setStaticCameraToNode(0.0f, smMoleTable[this->unkF4_8 -1].camera_node);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80388FA0(Actor *this, s32 arg1){
|
||||
Actor *other;
|
||||
ActorMarker *myOther;
|
||||
|
||||
switch(this->state){
|
||||
case 1://L80388FE8
|
||||
this->unk138_23 = 1;
|
||||
break;
|
||||
case 4://L80388FF8
|
||||
this->unk138_23 = 0;
|
||||
case 2://L80389004
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
break;
|
||||
case 5://L80389018
|
||||
this->unk138_23 = 0;
|
||||
func_8028F918(0);
|
||||
|
||||
break;
|
||||
}//L8038902C
|
||||
|
||||
switch(arg1){
|
||||
case 4:
|
||||
other = subaddie_getLinkedActor(this);
|
||||
myOther = this->unk100;
|
||||
if(myOther && other && myOther->id == 0xB8)
|
||||
subaddie_set_state_with_direction(other, 3, 0.0001f, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, 0x3f9);
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x6590);
|
||||
func_8028F918(0);
|
||||
break;
|
||||
case 1:
|
||||
animctrl_setSmoothTransition(this->animctrl, 0);
|
||||
break;
|
||||
case 5:
|
||||
chsmmole_setSpiralMountainStaticCamera(this);
|
||||
func_8028F94C(2,this->position);
|
||||
chsmmole_80389610(this);
|
||||
break;
|
||||
case 3:
|
||||
actor_loopAnimation(this);
|
||||
break;
|
||||
case 2:
|
||||
other = subaddie_getLinkedActor(this);
|
||||
myOther = this->unk100;
|
||||
if(myOther && other && myOther->id == 0xB8)
|
||||
subaddie_set_state_with_direction(other, 2, 0.0001f, 1);
|
||||
animctrl_setSmoothTransition(this->animctrl, 1);
|
||||
actor_playAnimationOnce(this);
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, 0x3f9);
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x6590);
|
||||
chsmmole_setSpiralMountainStaticCamera(this);
|
||||
func_8028F94C(2, this->position);
|
||||
break;
|
||||
}
|
||||
subaddie_set_state_with_direction(this, arg1, 0.0001f, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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:
|
||||
timed_setStaticCameraToNode(0.0f, 2);
|
||||
break;
|
||||
case 4:
|
||||
mapSpecificFlags_set(4,1);
|
||||
break;
|
||||
case 5:
|
||||
timed_setStaticCameraToNode(0.0f, 0x12);
|
||||
break;
|
||||
case 6:
|
||||
comusic_playTrack(COMUSIC_2B_DING_B);
|
||||
break;
|
||||
case 0xff:
|
||||
chsmmole_setSpiralMountainStaticCamera(actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void func_803892C8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
||||
Actor *actor;
|
||||
|
||||
actor = marker_getActor(marker);
|
||||
if(!mapSpecificFlags_get(3) && chmole_learnedAllSpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(3, 1);
|
||||
gcdialog_showText(ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, func_803892C8, NULL);
|
||||
}//L8038933C
|
||||
else{
|
||||
if(!(text_id == ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION
|
||||
|| text_id == ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER
|
||||
|| text_id == ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT)){
|
||||
timed_exitStaticCamera(0.0f);
|
||||
}
|
||||
switch(text_id){
|
||||
case ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED:
|
||||
break;
|
||||
case ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION: /* 2FB8 803893A8 3C188039 */
|
||||
gcdialog_showText(ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER, 0x8e, actor->position, actor->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
|
||||
break;
|
||||
|
||||
case ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER: /* 2FEC 803893DC 9209003B */
|
||||
actor->unk38_0 = 1;
|
||||
break;
|
||||
|
||||
case ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT: /* 2FFC 803893EC 920B0138 */
|
||||
actor->has_met_before = FALSE;
|
||||
actor->lifetime_value = 0.0f;
|
||||
break;
|
||||
|
||||
case ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN: /* 3014 80389404 0C0A3E46 */
|
||||
func_8028F918(0);
|
||||
break;
|
||||
|
||||
case ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL:
|
||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||
func_80388FA0(actor,4);
|
||||
break;
|
||||
|
||||
default:
|
||||
if(actor->state != 5)
|
||||
gcdialog_showText(ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED, 4, NULL, NULL, NULL, NULL);
|
||||
|
||||
func_80388FA0(actor, actor->state == 5 ? 1:4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)){
|
||||
if(fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)){
|
||||
*arg1 = D_8038AFE4 + ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1;
|
||||
D_8038AFE4++;
|
||||
D_8038AFE4 = MIN(D_8038AFE4, 5);
|
||||
if(*arg1 != ASSET_E0E_DIALOG_BOTTLES_REFUSE_HELP_5){
|
||||
*arg2 |= 1;
|
||||
}
|
||||
}else{//L8038956C
|
||||
*arg2 |= 1;
|
||||
*arg1 = smMoleTable[this->unkF4_8 -1].refresher_text;
|
||||
if(*arg1 == ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER && !ability_hasUsed(ABILITY_3_CAMERA_CONTROL)){
|
||||
*arg1 = ASSET_DFD_DIALOG_BOTTLES_SWIM_LEARN;
|
||||
}
|
||||
}
|
||||
}else{//L803895C0
|
||||
*arg1 = smMoleTable[this->unkF4_8 -1].learn_text;
|
||||
ability_unlock(smMoleTable[this->unkF4_8 -1].ability);
|
||||
}
|
||||
}
|
||||
|
||||
void chsmmole_80389610(Actor * this){
|
||||
s32 sp2C;
|
||||
s32 sp28;
|
||||
|
||||
sp28 = 0xe;
|
||||
sp2C = 0;
|
||||
|
||||
switch(this->unkF4_8){
|
||||
case 1://L8038965C
|
||||
if(mapSpecificFlags_get(1)){
|
||||
sp28 |= 1;
|
||||
if(fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL)){
|
||||
sp2C = D_8038AFE4 + 0xE0A; //dialog index
|
||||
D_8038AFE4++;
|
||||
D_8038AFE4 = MIN(D_8038AFE4, 5);
|
||||
}else{//L803896C0
|
||||
sp2C = smMoleTable[this->unkF4_8 -1].refresher_text;
|
||||
}
|
||||
}
|
||||
else{//L803896E8
|
||||
sp2C = smMoleTable[this->unkF4_8 -1].learn_text;
|
||||
mapSpecificFlags_set(1,1);
|
||||
}
|
||||
break;
|
||||
case 8://L80389720
|
||||
if(mapSpecificFlags_get(3)){
|
||||
if(fileProgressFlag_get(FILEPROG_A6_FURNACE_FUN_COMPLETE)){
|
||||
sp2C = ASSET_E37_DIALOG_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN;
|
||||
sp28 |= 1;
|
||||
}else{//L80389758
|
||||
if(mapSpecificFlags_get(0xf)){
|
||||
sp2C = ASSET_E0F_DIALOG_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN;
|
||||
sp28 |= 1;
|
||||
}else{//L80389780
|
||||
chsmmole_setSpiralMountainAbilitiesAsUsed();
|
||||
sp2C = fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) ? 0xe1e : 0xe13;
|
||||
mapSpecificFlags_set(0xf, 1);
|
||||
}
|
||||
} //L803897B4
|
||||
mapSpecificFlags_set(2, 1);
|
||||
}
|
||||
else{//L803897C8
|
||||
if(mapSpecificFlags_get(2)){
|
||||
sp2C = smMoleTable[this->unkF4_8 -1].refresher_text;
|
||||
sp28 |= 1;
|
||||
}
|
||||
else{
|
||||
sp2C = smMoleTable[this->unkF4_8 -1].learn_text;
|
||||
mapSpecificFlags_set(2, 1);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 4://L80389848
|
||||
if( !ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||
|| !ability_isUnlocked(ABILITY_C_ROLL)
|
||||
|| !ability_isUnlocked(ABILITY_B_RATATAT_RAP)
|
||||
){//L803898D4
|
||||
mapSpecificFlags_set(4, 1);
|
||||
}
|
||||
else{//L803898E4
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6://L803898A0
|
||||
if( !ability_isUnlocked(ABILITY_A_HOLD_A_JUMP_HIGHER)
|
||||
|| !ability_isUnlocked(ABILITY_7_FEATHERY_FLAP)
|
||||
|| !ability_isUnlocked(ABILITY_8_FLAP_FLIP)
|
||||
){//L803898D4
|
||||
mapSpecificFlags_set(0xE, 1);
|
||||
}
|
||||
else{//L803898E4
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
}
|
||||
break;
|
||||
default://L803898F8
|
||||
chsmmole_learnAbility(this, &sp2C, &sp28);
|
||||
break;
|
||||
}//L80389904
|
||||
if(sp2C){
|
||||
gcdialog_showText(sp2C, sp28, this->position, this->marker, func_803892C8, __chsmmole_additionalAbilityLearnActions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Spawns a molehill for the actor
|
||||
*/
|
||||
void chsmmole_spawnMolehill(ActorMarker * marker){
|
||||
Actor *actor;
|
||||
Actor *other;
|
||||
s32 pad;
|
||||
|
||||
actor = marker_getActor(marker);
|
||||
other = spawn_child_actor(ACTOR_12C_MOLEHILL, &actor);
|
||||
actor->unk100 = other->marker;
|
||||
|
||||
if(marker);
|
||||
}
|
||||
|
||||
void func_80389984(Actor * this){
|
||||
u8 tmp;
|
||||
|
||||
tmp = this->unk44_31;
|
||||
if(tmp)
|
||||
func_8030DA44(tmp);
|
||||
}
|
||||
|
||||
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 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
|
||||
if(this->unkF4_8 >= 9)
|
||||
return;
|
||||
|
||||
if(!this->initialized){
|
||||
this->marker->propPtr->unk8_3 = 0;
|
||||
actor_collisionOff(this);
|
||||
this->initialized = TRUE;
|
||||
marker_setFreeMethod(this->marker, func_80389984);
|
||||
if(this->unkF4_8 == 1 || this->unkF4_8 == 8){//L80389A30
|
||||
sp40 = nodeprop_findByActorIdAndActorPosition(0x349, this);
|
||||
if(!sp40){
|
||||
this->unk1C_x = this->position_x;
|
||||
this->unk1C_y = this->position_y;
|
||||
this->unk1C_z = this->position_z;
|
||||
this->actor_specific_1_f = 300.0f;
|
||||
} else{ //L80389A68
|
||||
nodeprop_getPosition(sp40, this->unk1C);
|
||||
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)){
|
||||
func_80388FA0(this, 3);
|
||||
}
|
||||
}
|
||||
}//L80389AC8
|
||||
if(chsmmole_learnedAnySpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(1,1);
|
||||
|
||||
if(chmole_learnedAllSpiralMountainAbilities()){
|
||||
mapSpecificFlags_set(3, 1);
|
||||
mapSpecificFlags_set(2, 1);
|
||||
mapSpecificFlags_set(0xC, 1);
|
||||
mapSpecificFlags_set(0xF, 1);
|
||||
}
|
||||
}
|
||||
}//L80389B20
|
||||
|
||||
if(!this->volatile_initialized){
|
||||
__spawnQueue_add_1((GenFunction_1)chsmmole_spawnMolehill, reinterpret_cast(s32, this->marker));
|
||||
this->volatile_initialized = TRUE;
|
||||
}//L80389B4C
|
||||
|
||||
if(this->unk138_23){
|
||||
func_8028E668(this->position, 180.0f, -40.0f, 120.0f);
|
||||
}//L80389B64
|
||||
|
||||
func_8024E55C(0,sp50); //get face buttons press counters
|
||||
player_getPosition(sp44);
|
||||
switch (this->state)
|
||||
{
|
||||
case 1://L80389BAC
|
||||
this->yaw_ideal = (f32)func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if( (this->unkF4_8 == 1 && !mapSpecificFlags_get(1))
|
||||
|| (this->unkF4_8 == 8 && !mapSpecificFlags_get(2))
|
||||
|| (this->unkF4_8 == 8 && mapSpecificFlags_get(3) && !mapSpecificFlags_get(0xF))
|
||||
){//L80389C50
|
||||
|
||||
if( ((ml_distance_vec3f(sp44, this->unk1C) < this->actor_specific_1_f) && func_8028F20C())
|
||||
|| mapSpecificFlags_get(0x10)
|
||||
){//L80389C8C
|
||||
if(func_80329530(this, 0x96))
|
||||
func_8028F45C(9, this->position);
|
||||
//L80389CA4
|
||||
func_80388FA0(this, 2);
|
||||
}
|
||||
}
|
||||
else{//L80389CBC
|
||||
if( !func_80329530(this, 0xfa)
|
||||
|| func_8028ECAC()
|
||||
|| !func_8028F20C()
|
||||
|| func_8028EC04()
|
||||
) break;
|
||||
|
||||
sp34 = !((!(smMoleTable[this->unkF4_8-1].ability + 1)) || (!ability_isUnlocked( smMoleTable[this->unkF4_8-1].ability)));
|
||||
if( (!sp34 && this->unkF4_8 != 1)
|
||||
|| fileProgressFlag_get(FILEPROG_DB_SKIPPED_TUTORIAL) == 0
|
||||
|| D_8038AFE4 < 6
|
||||
){
|
||||
if(this->unkF4_8 != 8 || !fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY)){
|
||||
if( func_8028EFC8()
|
||||
&& sp50[FACE_BUTTON(BUTTON_B)] == 1
|
||||
){
|
||||
if(sp34 || this->unkF4_8 == 1 || this->unkF4_8 == 8){
|
||||
func_80388FA0(this, 5);
|
||||
}
|
||||
else{
|
||||
if(func_80329530(this, 0x96) && !sp34){
|
||||
func_8028F45C(9, this->position);
|
||||
}
|
||||
func_80388FA0(this, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2://L80389E2C
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if( (f64) 0.0 < animctrl_getAnimTimer(this->animctrl)
|
||||
&& animctrl_getAnimTimer(this->animctrl) < 0.16
|
||||
){
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}//L80389EA0
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
if(!mapSpecificFlags_get(1)){
|
||||
chsmmole_80389610(this);
|
||||
}
|
||||
func_80388FA0(this, 3);
|
||||
}//L80389EE0
|
||||
else if(actor_animationIsAt(this, 0.14f)){
|
||||
FUNC_8030E8B4(SFX_C6_SHAKING_MOUTH, 1.2f, 24000, this->position, 1250, 2500);
|
||||
}else if(actor_animationIsAt(this, 0.4f)){ //L80389F14
|
||||
FUNC_8030E8B4(SFX_2C_PULLING_NOISE, 1.2f, 24000, this->position, 1250, 2500);
|
||||
}else if(actor_animationIsAt(this, 0.75f)){//L80389F48
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 32000, this->position, 1250, 2500);
|
||||
|
||||
}else if(actor_animationIsAt(this, 0.35f)){//L80389F78
|
||||
if(mapSpecificFlags_get(1)){
|
||||
chsmmole_80389610(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3://L80389FAC
|
||||
this->yaw_ideal = func_80329784(this);
|
||||
func_80328FB0(this, 4.0f);
|
||||
if( ( actor_animationIsAt(this, 0.37f)
|
||||
|| actor_animationIsAt(this, 0.66f)
|
||||
|| actor_animationIsAt(this, 0.85f)
|
||||
)
|
||||
&& randf() < 0.2
|
||||
){
|
||||
animctrl_setDirection(this->animctrl, animctrl_isPlayedForwards(this->animctrl)^1);
|
||||
}//L8038A088
|
||||
else if( actor_animationIsAt(this, 0.25f)
|
||||
|| actor_animationIsAt(this, 0.28f)
|
||||
|| actor_animationIsAt(this, 0.31f)
|
||||
){
|
||||
func_8030E878(SFX_6F_BANJO_HEADSCRATCH, randf2(1.4f, 1.55f), 16000, this->position, 1250.0f, 2500.0f);
|
||||
} //L8038A0D8
|
||||
else if( actor_animationIsAt(this, 0.45f)
|
||||
|| actor_animationIsAt(this, 0.48f)
|
||||
|| actor_animationIsAt(this, 0.51f)
|
||||
|| actor_animationIsAt(this, 0.7f)
|
||||
|| actor_animationIsAt(this, 0.73f)
|
||||
|| actor_animationIsAt(this, 0.76f)
|
||||
){
|
||||
func_8030E878(SFX_6F_BANJO_HEADSCRATCH, randf2(1.35f, 1.5f), 6000, this->position, 1250.0f, 2500.0f);
|
||||
}//L8038A194
|
||||
|
||||
if(mapSpecificFlags_get(5)){
|
||||
mapSpecificFlags_set(5,0);
|
||||
func_80388FA0(this, 4);
|
||||
}//L8038A1B8
|
||||
user_input = -1;
|
||||
if(this->unk38_0){
|
||||
this->lifetime_value += time_getDelta();
|
||||
if(func_803114C4() != 0xe1d){
|
||||
if(sp50[FACE_BUTTON(BUTTON_A)] == 1)
|
||||
user_input = 1; //A button pressed
|
||||
else if(sp50[FACE_BUTTON(BUTTON_B)] == 1)
|
||||
user_input = 0; //B button pressed
|
||||
}//L8038A218
|
||||
|
||||
if( user_input != -1){ //button was pressed
|
||||
fileProgressFlag_set(FILEPROG_DB_SKIPPED_TUTORIAL, (user_input)?0:1);
|
||||
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->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;
|
||||
case 4://L8038A31C
|
||||
if( 0.35 < animctrl_getAnimTimer(this->animctrl)
|
||||
&& animctrl_getAnimTimer(this->animctrl) < 0.9
|
||||
){
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}else{//L8038A378
|
||||
if(actor_animationIsAt(this, 0.9999f)){
|
||||
func_80388FA0(this, 1);
|
||||
func_80386540();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}//L8038A3A0
|
||||
}
|
@@ -11,15 +11,15 @@ extern s32 D_80275650;
|
||||
|
||||
extern ActorInfo D_8038AB00;
|
||||
extern ActorInfo D_8038ABF0;
|
||||
extern ActorInfo D_8038AC20; //chAttackTutorial
|
||||
extern ActorInfo D_8038AC78; //chCarrot Slave?
|
||||
extern ActorInfo D_8038ACE8; //ch onion A
|
||||
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 chBottles; //chSmMole bottles
|
||||
extern ActorInfo D_8038B0B0; //chJumpTutorial code_4070
|
||||
extern ActorInfo gChAttackTutorial;
|
||||
extern ActorInfo gChVegetablesTopperA;
|
||||
extern ActorInfo gChVegetablesBawlA;
|
||||
extern ActorInfo gChVegetablesCollywobbleA;
|
||||
extern ActorInfo gChVegetablesTopperB;
|
||||
extern ActorInfo gChVegetablesBawlB;
|
||||
extern ActorInfo gChVegetablesCollywobbleB;
|
||||
extern ActorInfo gChBottles;
|
||||
extern ActorInfo gChJumpTutorial;
|
||||
extern ActorInfo D_8038B0E0;
|
||||
extern ActorInfo D_8038B008; //chBanjosBed
|
||||
extern ActorInfo D_8038B044; //chBanjosChair
|
||||
@@ -142,15 +142,15 @@ void SM_func_80386810(void)
|
||||
{
|
||||
spawnableActorList_add(&D_8038AB00, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038ABF0, actor_new, ACTOR_FLAG_UNKNOWN_7);
|
||||
spawnableActorList_add(&D_8038AC20, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038AC78, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038ACE8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD58, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AC9C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD0C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&D_8038AD7C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&chBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
||||
spawnableActorList_add(&D_8038B0B0, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&gChAttackTutorial, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&gChVegetablesTopperA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesBawlA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesCollywobbleA, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesTopperB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesBawlB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChVegetablesCollywobbleB, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25);
|
||||
spawnableActorList_add(&gChBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
||||
spawnableActorList_add(&gChJumpTutorial, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038B0E0, actor_new, ACTOR_FLAG_NONE);
|
||||
spawnableActorList_add(&D_8038B008, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
|
||||
spawnableActorList_add(&D_8038B044, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
|
||||
|
@@ -77,19 +77,19 @@ enum asset_e chmole_learnedAllLevelAbilitiesDialog(void){
|
||||
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;
|
||||
return learned_all_moves ? ASSET_B4E_DIALOG_BOTTLES_ALL_MM_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_2_TREASURE_TROVE_COVE:
|
||||
return learned_all_moves ? ASSET_A27_TEXT_BOTTLES_ALL_TTC_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_A27_DIALOG_BOTTLES_ALL_TTC_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_3_CLANKERS_CAVERN:
|
||||
return learned_all_moves ? ASSET_D37_TEXT_BOTTLES_ALL_CC_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_D37_DIALOG_BOTTLES_ALL_CC_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_4_BUBBLEGLOOP_SWAMP:
|
||||
return learned_all_moves ? ASSET_C8A_TEXT_BOTTLES_ALL_BGS_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C8A_DIALOG_BOTTLES_ALL_BGS_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_5_FREEZEEZY_PEAK:
|
||||
return learned_all_moves ? ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C2A_DIALOG_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
case LEVEL_7_GOBIS_VALLEY:
|
||||
return learned_all_moves ? ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return learned_all_moves ? ASSET_C2A_DIALOG_BOTTLES_ALL_FP_GV_MOVES_LEARNED : ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
default:
|
||||
return ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED;
|
||||
return ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -157,9 +157,9 @@ void chmole_healthRefill(ActorMarker *marker, enum asset_e arg1, s32 arg2){
|
||||
if( arg1 == moleTable[actor->unkF4_8-9].teach_text_id
|
||||
&& item_getCount(ITEM_14_HEALTH) < item_getCount(ITEM_15_HEALTH_TOTAL)
|
||||
){
|
||||
gcdialog_showText(ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
gcdialog_showText(ASSET_D39_DIALOG_BOTTLES_REFILL_HEALTH, 7, 0, actor->marker, chmole_healthRefill, chmole_additionalAbilityLearnActions);
|
||||
}//L802D9738
|
||||
else if(arg1 == moleTable[actor->unkF4_8-9].teach_text_id || arg1 == ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH){
|
||||
else if(arg1 == moleTable[actor->unkF4_8-9].teach_text_id || arg1 == ASSET_D39_DIALOG_BOTTLES_REFILL_HEALTH){
|
||||
gcdialog_showText(chmole_learnedAllGameAbilities()? 0xa87 : chmole_learnedAllLevelAbilitiesDialog(), 7, 0, actor->marker, chmole_healthRefill, NULL);
|
||||
}
|
||||
else{//L802D97BC
|
||||
|
@@ -17,13 +17,13 @@ typedef struct{
|
||||
|
||||
/* .data */
|
||||
Struct_core2_B62B0_0 D_80370AC0[0xBB] = {
|
||||
{MARKER_12A_TOPPER_A, 0x0000, {0x0904, 0x8504, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}},
|
||||
{MARKER_129_BAWL_A, 0x0000, {0x0504, 0x0984, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}},
|
||||
{MARKER_128_COLLYWOBBLE_A, 0x0000, {0x0000, 0x0000, 0x8404, 0x0984, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404}},
|
||||
{MARKER_12A_TOPPER_THE_CARROT_A, 0x0000, {0x0904, 0x8504, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}},
|
||||
{MARKER_129_BAWL_THE_ONION_A, 0x0000, {0x0504, 0x0984, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}},
|
||||
{MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, 0x0000, {0x0000, 0x0000, 0x8404, 0x0984, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404}},
|
||||
{MARKER_135_QUARRIE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}},
|
||||
{MARKER_1E6_TOPPER_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1E7_BAWL_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1E8_COLLYWOBBLE_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1E6_TOPPER_THE_CARROT_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1E7_BAWL_THE_ONION_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}},
|
||||
{MARKER_1EA_GRUNTLING_RED, 0x0001, {0x0A08, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0984, 0x2020}},
|
||||
{MARKER_295_GRUNTLING_BLUE, 0x0001, {0x0A0C, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}},
|
||||
{MARKER_1F1_GRUNTLING_BLACK, 0x0001, {0x0A10, 0x898C, 0x8100, 0x8988, 0x8A08, 0x8A08, 0x0A84, 0x098C, 0x0A04, 0x0000, 0x2020}},
|
||||
|
@@ -48,7 +48,7 @@ void func_8038BADC(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
gcdialog_showText(ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, 0xC, this->position, this->marker, func_8038BADC, NULL);
|
||||
gcdialog_showText(ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED, 0xC, this->position, this->marker, func_8038BADC, NULL);
|
||||
return;
|
||||
}
|
||||
subaddie_set_state(this, 1);
|
||||
|
Reference in New Issue
Block a user