Merge branch 'mr-origin-98'
This commit is contained in:
@@ -328,7 +328,7 @@ enum volatile_flags_e {
|
|||||||
VOLATILE_FLAG_74_SANDCASTLE_INFINITE_EGGS,
|
VOLATILE_FLAG_74_SANDCASTLE_INFINITE_EGGS,
|
||||||
VOLATILE_FLAG_75_SANDCASTLE_INFINITE_RED_FEATHERS,
|
VOLATILE_FLAG_75_SANDCASTLE_INFINITE_RED_FEATHERS,
|
||||||
VOLATILE_FLAG_76_SANDCASTLE_INFINITE_GOLD_FEATHERS,
|
VOLATILE_FLAG_76_SANDCASTLE_INFINITE_GOLD_FEATHERS,
|
||||||
VOLATILE_FLAG_77_SANDCASTLE_SET_HEALTH_TO_MAX,
|
VOLATILE_FLAG_77_SANDCASTLE_SET_HEALTH_TO_MAX, // unused
|
||||||
VOLATILE_FLAG_78_SANDCASTLE_NO_BONUS,
|
VOLATILE_FLAG_78_SANDCASTLE_NO_BONUS,
|
||||||
VOLATILE_FLAG_79, // unused
|
VOLATILE_FLAG_79, // unused
|
||||||
VOLATILE_FLAG_7A, // unused
|
VOLATILE_FLAG_7A, // unused
|
||||||
@@ -1633,7 +1633,7 @@ enum honeycomb_e
|
|||||||
HONEYCOMB_14_SM_WATERFALL,
|
HONEYCOMB_14_SM_WATERFALL,
|
||||||
HONEYCOMB_15_SM_UNDERWATER,
|
HONEYCOMB_15_SM_UNDERWATER,
|
||||||
HONEYCOMB_16_SM_TREE,
|
HONEYCOMB_16_SM_TREE,
|
||||||
HONEYCOMB_17_SM_COLIWOBBLE,
|
HONEYCOMB_17_SM_COLLIWOBBLE,
|
||||||
HONEYCOMB_18_SM_QUARRIES
|
HONEYCOMB_18_SM_QUARRIES
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1978,9 +1978,9 @@ enum actor_e
|
|||||||
ACTOR_160_BOGGY_1,
|
ACTOR_160_BOGGY_1,
|
||||||
|
|
||||||
ACTOR_163_BAT = 0x163,
|
ACTOR_163_BAT = 0x163,
|
||||||
ACTOR_164_COLLYWOBBLE_A,
|
ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A,
|
||||||
ACTOR_165_BAWL_A,
|
ACTOR_165_BAWL_THE_ONION_A,
|
||||||
ACTOR_166_TOPPER_A,
|
ACTOR_166_TOPPER_THE_CARROT_A,
|
||||||
ACTOR_167_ATTACK_TUTORIAL,
|
ACTOR_167_ATTACK_TUTORIAL,
|
||||||
|
|
||||||
ACTOR_16E_UNKNOWN = 0x16E,
|
ACTOR_16E_UNKNOWN = 0x16E,
|
||||||
@@ -2173,8 +2173,8 @@ enum actor_e
|
|||||||
ACTOR_36C_25_MUMBO_TOKEN_SIGN,
|
ACTOR_36C_25_MUMBO_TOKEN_SIGN,
|
||||||
|
|
||||||
ACTOR_COLLYWOBBLE_B = 0x36D,
|
ACTOR_COLLYWOBBLE_B = 0x36D,
|
||||||
ACTOR_BAWL_B = 0x36E,
|
ACTOR_BAWL_THE_ONION_B = 0x36E,
|
||||||
ACTOR_TOPPER_B = 0x36F,
|
ACTOR_TOPPER_THE_CARROT_B = 0x36F,
|
||||||
ACTOR_370_GOLD_FEATHER = 0x370,
|
ACTOR_370_GOLD_FEATHER = 0x370,
|
||||||
|
|
||||||
ACTOR_374_VACATION_TEXT_TRIGGER = 0x374,
|
ACTOR_374_VACATION_TEXT_TRIGGER = 0x374,
|
||||||
@@ -2219,10 +2219,11 @@ enum actor_e
|
|||||||
|
|
||||||
ACTOR_3AF_GRUNTY_SHADOW = 0x3AF,
|
ACTOR_3AF_GRUNTY_SHADOW = 0x3AF,
|
||||||
|
|
||||||
ACTOR_3B9_JUMP_TUTORIAL = 0x3B9,
|
ACTOR_3BA_UNKNOWN = 0x3BA,
|
||||||
ACTOR_3BA_UNKNOWN,
|
|
||||||
|
|
||||||
ACTOR_3BF_GRUNTLING_BLUE = 0x3bf,
|
ACTOR_3B9_JUMP_TUTORIAL = 0x3B9,
|
||||||
|
|
||||||
|
ACTOR_3BF_GRUNTLING_BLUE = 0x3BF,
|
||||||
ACTOR_3C0_GRUNTLING_BLACK,
|
ACTOR_3C0_GRUNTLING_BLACK,
|
||||||
ACTOR_3C1_PURPLE_TEEHEE,
|
ACTOR_3C1_PURPLE_TEEHEE,
|
||||||
ACTOR_3C2_GIANT_GRAVESTONE,
|
ACTOR_3C2_GIANT_GRAVESTONE,
|
||||||
@@ -2454,15 +2455,15 @@ enum sm_specific_flags {
|
|||||||
SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES = 0x1,
|
SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES = 0x1,
|
||||||
SM_SPECIFIC_FLAG_2,
|
SM_SPECIFIC_FLAG_2,
|
||||||
SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED,
|
SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED,
|
||||||
SM_SPECIFIC_FLAG_4,
|
SM_SPECIFIC_FLAG_4, // if true the claw swipe can be leared
|
||||||
SM_SPECIFIC_FLAG_5,
|
SM_SPECIFIC_FLAG_5, // learned all attack moves
|
||||||
|
|
||||||
SM_SPECIFIC_FLAG_7 = 0x7,
|
SM_SPECIFIC_FLAG_7 = 0x7, // cauliflower dead?
|
||||||
SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED,
|
SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED,
|
||||||
SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED,
|
SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED,
|
||||||
SM_SPECIFIC_FLAG_A,
|
SM_SPECIFIC_FLAG_A,
|
||||||
|
|
||||||
SM_SPECIFIC_FLAG_C = 0xC,
|
SM_SPECIFIC_FLAG_C = 0xC, // learned all attack moves
|
||||||
|
|
||||||
SM_SPECIFIC_FLAG_E = 0xE,
|
SM_SPECIFIC_FLAG_E = 0xE,
|
||||||
SM_SPECIFIC_FLAG_F,
|
SM_SPECIFIC_FLAG_F,
|
||||||
@@ -2483,7 +2484,6 @@ enum mm_specific_flags {
|
|||||||
MM_SPECIFIC_FLAG_A_UNKNOWN
|
MM_SPECIFIC_FLAG_A_UNKNOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum ttc_specific_flags {
|
enum ttc_specific_flags {
|
||||||
TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN,
|
TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN,
|
||||||
TTC_SPECIFIC_FLAG_1_UNKNOWN, // something related to the sand castle
|
TTC_SPECIFIC_FLAG_1_UNKNOWN, // something related to the sand castle
|
||||||
@@ -2517,10 +2517,11 @@ enum item_e
|
|||||||
ITEM_6_HOURGLASS,
|
ITEM_6_HOURGLASS,
|
||||||
ITEM_7_SKULL_HOURGLASS,
|
ITEM_7_SKULL_HOURGLASS,
|
||||||
|
|
||||||
|
|
||||||
ITEM_9_PROPELLOR = 0x9,
|
ITEM_9_PROPELLOR = 0x9,
|
||||||
|
|
||||||
ITEM_B_XMAS_TREE = 0xb,
|
ITEM_B_XMAS_TREE = 0xb,
|
||||||
ITEM_C_NOTE,
|
ITEM_C_NOTE = 0xC,
|
||||||
ITEM_D_EGGS,
|
ITEM_D_EGGS,
|
||||||
ITEM_E_JIGGY,
|
ITEM_E_JIGGY,
|
||||||
ITEM_F_RED_FEATHER,
|
ITEM_F_RED_FEATHER,
|
||||||
@@ -2955,7 +2956,7 @@ enum asset_e
|
|||||||
ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN,
|
ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN,
|
||||||
ASSET_226_ANIM_BAWL_UNKNOWN,
|
ASSET_226_ANIM_BAWL_UNKNOWN,
|
||||||
ASSET_227_ANIM_BAWL_UNKNOWN,
|
ASSET_227_ANIM_BAWL_UNKNOWN,
|
||||||
ASSET_228_ANIM_BANJO_SLED = 0x228,
|
ASSET_228_ANIM_BANJO_SLED,
|
||||||
ASSET_229_ANIM_WHIPCRACK_ATTACK,
|
ASSET_229_ANIM_WHIPCRACK_ATTACK,
|
||||||
ASSET_22A_ANIM_WHIPCRACK_IDLE,
|
ASSET_22A_ANIM_WHIPCRACK_IDLE,
|
||||||
ASSET_22B_ANIM_NABNUT_FAT,
|
ASSET_22B_ANIM_NABNUT_FAT,
|
||||||
@@ -3538,14 +3539,14 @@ enum asset_e
|
|||||||
// 4ea FP Finish Banner
|
// 4ea FP Finish Banner
|
||||||
// 4eb FP Start Banner
|
// 4eb FP Start Banner
|
||||||
// 4ec FP Race Rostrum
|
// 4ec FP Race Rostrum
|
||||||
ASSET_4ED_MODEL_TOPPER = 0x4ed,
|
ASSET_4ED_MODEL_TOPPER = 0x4ED,
|
||||||
ASSET_4EE_MODEL_COLLYWOBBLE,
|
ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||||
ASSET_4EF_MODEL_BAWL,
|
ASSET_4EF_MODEL_BAWL,
|
||||||
ASSET_4F0_MODEL_UNKNOWN, // 4f0 Colliwobble Large Stem (Upon Death)
|
ASSET_4F0_MODEL_TOPPER_UNKNOWN,
|
||||||
ASSET_4F1_MODEL_UNKNOWN, // 4f1 Colliwobble Small Stem (Upon Death)
|
ASSET_4F1_MODEL_BAWL_OR_COLLIWOBBLE_UNKNOWN,
|
||||||
ASSET_4F2_MODEL_UNKNOWN, // 4f2 Colliwobble Large Leaf (Upon Death)
|
ASSET_4F2_MODEL_COLLIWOBBLE_LARGE_DEATH,
|
||||||
ASSET_4F3_MODEL_UNKNOWN, // 4f3 Colliwobble Small Leaf (Upon Death)
|
ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH,
|
||||||
ASSET_4F4_MODEL_UNKNOWN, // 4f4 Colliwobble Stem (Upon Death)
|
ASSET_4F4_MODEL_COLLIWOBBLE_STEM_DEATH,
|
||||||
// 4f5 CCW Spring Switch
|
// 4f5 CCW Spring Switch
|
||||||
// 4f6 CCW Summer Switch
|
// 4f6 CCW Summer Switch
|
||||||
// 4f7 CCW Autumn Switch
|
// 4f7 CCW Autumn Switch
|
||||||
@@ -4448,12 +4449,12 @@ enum asset_e
|
|||||||
ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN,
|
ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN,
|
||||||
ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES,
|
ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES,
|
||||||
|
|
||||||
ASSET_E14_DIALOG_UNKNOWN = 0xE14,
|
ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL = 0xE14,
|
||||||
ASSET_E15_DIALOG_UNKNOWN,
|
ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL,
|
||||||
ASSET_E16_DIALOG_UNKNOWN,
|
ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL,
|
||||||
ASSET_E17_DIALOG_UNKNOWN,
|
ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
|
||||||
ASSET_E18_DIALOG_UNKNOWN,
|
ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL,
|
||||||
ASSET_E19_DIALOG_UNKNOWN,
|
ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES,
|
||||||
ASSET_E1A_DIALOG_BOTTLES_UNKNOWN,
|
ASSET_E1A_DIALOG_BOTTLES_UNKNOWN,
|
||||||
ASSET_E1B_DIALOG_BOTTLES_UNKNOWN,
|
ASSET_E1B_DIALOG_BOTTLES_UNKNOWN,
|
||||||
ASSET_E1C_DIALOG_BOTTLES_UNKNOWN,
|
ASSET_E1C_DIALOG_BOTTLES_UNKNOWN,
|
||||||
@@ -4487,7 +4488,7 @@ enum asset_e
|
|||||||
|
|
||||||
ASSET_FAD_DIALOG_UNKNOWN = 0xfad,
|
ASSET_FAD_DIALOG_UNKNOWN = 0xfad,
|
||||||
|
|
||||||
ASSET_FBE_DIALOG_CHEATING_ERASE_SAVE_WARNING = 0xfbe,
|
ASSET_FBE_DIALOG_CHEATING_ERASE_SAVE_WARNING = 0xFBE,
|
||||||
ASSET_FBF_DIALOG_ERASED_SAVE,
|
ASSET_FBF_DIALOG_ERASED_SAVE,
|
||||||
|
|
||||||
ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1,
|
ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1,
|
||||||
@@ -5096,11 +5097,10 @@ enum marker_e{
|
|||||||
|
|
||||||
MARKER_124_BOGGY_1 = 0x124,
|
MARKER_124_BOGGY_1 = 0x124,
|
||||||
|
|
||||||
MARKER_126_UNKNOWN = 0x126,
|
|
||||||
MARKER_127_BAT = 0x127,
|
MARKER_127_BAT = 0x127,
|
||||||
MARKER_128_COLLYWOBBLE_A,
|
MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A,
|
||||||
MARKER_129_BAWL_A,
|
MARKER_129_BAWL_THE_ONION_A,
|
||||||
MARKER_12A_TOPPER_A,
|
MARKER_12A_TOPPER_THE_CARROT_A,
|
||||||
MARKER_12B_ATTACK_TUTORIAL,
|
MARKER_12B_ATTACK_TUTORIAL,
|
||||||
|
|
||||||
MARKER_134_UNKNOWN = 0x134,
|
MARKER_134_UNKNOWN = 0x134,
|
||||||
@@ -5174,14 +5174,13 @@ enum marker_e{
|
|||||||
|
|
||||||
|
|
||||||
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5,
|
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5,
|
||||||
MARKER_1E6_TOPPER_B,
|
MARKER_1E6_TOPPER_THE_CARROT_B,
|
||||||
MARKER_1E7_BAWL_B,
|
MARKER_1E7_BAWL_THE_ONION_B,
|
||||||
MARKER_1E8_COLLYWOBBLE_B,
|
MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B,
|
||||||
MARKER_1E9_MUMBO_COST_SIGN,
|
MARKER_1E9_MUMBO_COST_SIGN,
|
||||||
MARKER_1EA_GRUNTLING_RED,
|
MARKER_1EA_GRUNTLING_RED,
|
||||||
|
|
||||||
MARKER_1ED_JUMP_TUTORIAL = 0x1ED,
|
MARKER_1ED_JUMP_TUTORIAL = 0x1ED,
|
||||||
|
|
||||||
MARKER_1F1_GRUNTLING_BLACK = 0x1F1,
|
MARKER_1F1_GRUNTLING_BLACK = 0x1F1,
|
||||||
|
|
||||||
MARKER_1F4_TOOTS = 0x1F4,
|
MARKER_1F4_TOOTS = 0x1F4,
|
||||||
@@ -5386,5 +5385,4 @@ enum vegetable_e {
|
|||||||
VEGETABLE_3_COLLY_WOBBLE
|
VEGETABLE_3_COLLY_WOBBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -434,7 +434,7 @@ void func_8032AA58(Actor *, f32);
|
|||||||
void func_80324E38(f32, s32);
|
void func_80324E38(f32, s32);
|
||||||
void timed_playSfx(f32, enum sfx_e, f32, s32);
|
void timed_playSfx(f32, enum sfx_e, f32, s32);
|
||||||
void timed_setStaticCameraToNode(f32, s32);
|
void timed_setStaticCameraToNode(f32, s32);
|
||||||
void timed_exitStaticCamera(f32);
|
void timed_exitStaticCamera(f32 time);
|
||||||
int actor_animationIsAt(Actor*, f32);
|
int actor_animationIsAt(Actor*, f32);
|
||||||
|
|
||||||
void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32);
|
void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32);
|
||||||
|
@@ -155,7 +155,7 @@ typedef struct actor_s{
|
|||||||
u32 state:6; /* unk10_31*/
|
u32 state:6; /* unk10_31*/
|
||||||
u32 unk10_25:7;
|
u32 unk10_25:7;
|
||||||
u32 unk10_18:6;
|
u32 unk10_18:6;
|
||||||
u32 unk10_12:4;
|
u32 unk10_12:4; // number of defeated enemies in SM attack tutorial
|
||||||
u32 unk10_8:1;
|
u32 unk10_8:1;
|
||||||
u32 unk10_7:1;
|
u32 unk10_7:1;
|
||||||
u32 unk10_6:2;
|
u32 unk10_6:2;
|
||||||
|
@@ -2,249 +2,252 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
/* extern functions */
|
/* chAttackTutorial - controls bottle teaching moves in spiral */
|
||||||
void timed_exitStaticCamera(f32);
|
|
||||||
void func_8028F918(s32);
|
|
||||||
|
|
||||||
/* public functions */
|
extern void timed_exitStaticCamera(f32 time);
|
||||||
void chAttackTutorial_talk(ActorMarker *);
|
extern void func_8028F918(s32);
|
||||||
void chAttackTutorial_setState(Actor *this, s32 state);
|
|
||||||
void chAttackTutorial_update(Actor *);
|
|
||||||
|
|
||||||
/* .data */
|
enum ch_attack_tutorial_states {
|
||||||
enum chAttackTutorial_state_e {
|
CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN = 0x1, // L80387610
|
||||||
ATTACK_TUTORIAL_STATE_1_UNKNOWN = 1,
|
CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE, // L803873E0
|
||||||
ATTACK_TUTORIAL_STATE_2_UNKNOWN,
|
CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES, // L8038742C
|
||||||
ATTACK_TUTORIAL_STATE_3_UNKNOWN,
|
CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED, // L80387454
|
||||||
ATTACK_TUTORIAL_STATE_4_UNKNOWN,
|
CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG // L80387680
|
||||||
ATTACK_TUTORIAL_STATE_5_UNKNOWN
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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,
|
MARKER_12B_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL, NULL,
|
||||||
1, NULL,
|
1, NULL,
|
||||||
chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
__chAttackTutorial_update, actor_update_func_80326224, func_80325340,
|
||||||
0, 0, 0.0f, 0
|
0, 0, 0.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void __chAttackTutorial_enemy(ActorMarker *marker, enum actor_e enemy_id) {
|
static void __chAttackTutorial_spawnEnemyActorForMarker(ActorMarker* marker, enum actor_e enemy_id) {
|
||||||
Actor* actor = marker_getActor(marker);
|
Actor* actor = marker_getActor(marker);
|
||||||
s32 pad;
|
s32 pad;
|
||||||
Actor *enemy = spawn_child_actor(enemy_id, &actor);
|
Actor *other = spawn_child_actor(enemy_id, &actor);
|
||||||
|
|
||||||
actor->unk100 = enemy->marker;
|
actor->unk100 = other->marker;
|
||||||
enemy->unk100 = actor->marker;
|
other->unk100 = actor->marker;
|
||||||
|
if (actor->unk10_12 == 3 && actor->unk38_31 == 1) {
|
||||||
if (actor->unk10_12 == VEGETABLE_3_COLLY_WOBBLE && actor->unk38_31 == 1) {
|
other->unk38_31 = 1;
|
||||||
enemy->unk38_31 = 1;
|
} else {
|
||||||
}
|
other->unk38_31 = 0;
|
||||||
else {//L803871D4
|
|
||||||
enemy->unk38_31 = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enemy->unk10_12 = VEGETABLE_1_TOPPER;
|
other->unk10_12 = 1;
|
||||||
if (marker);
|
if (marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 __chAttackTutorial_spawnEnemy(Actor *this, enum vegetable_e vegetable_id) {
|
// spawn topper, bawl or collywobble based on already_killed_enemies (actor->unk10_12)
|
||||||
volatile enum actor_e enemy_id;
|
static s32 __chAttackTutorial_spawnEnemyActor(Actor *this, s32 already_killed_enemies) {
|
||||||
|
volatile enum actor_e sp1C;
|
||||||
|
s32 tmp_v0;
|
||||||
|
|
||||||
enemy_id = vegetable_id == VEGETABLE_1_TOPPER ? ACTOR_166_TOPPER_A :
|
if (already_killed_enemies == 1) {
|
||||||
vegetable_id == VEGETABLE_2_BAWL ? ACTOR_165_BAWL_A : ACTOR_164_COLLYWOBBLE_A;
|
sp1C = ACTOR_166_TOPPER_THE_CARROT_A;
|
||||||
|
} else {
|
||||||
__spawnQueue_add_2(__chAttackTutorial_enemy, this->marker, enemy_id);
|
sp1C = tmp_v0 = (already_killed_enemies == 2)
|
||||||
|
? ACTOR_165_BAWL_THE_ONION_A
|
||||||
|
: ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chAttackTutorial_learnedTextActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
__spawnQueue_add_2(__chAttackTutorial_spawnEnemyActorForMarker, this->marker, sp1C);
|
||||||
chAttackTutorial_setState(marker_getActor(marker), ATTACK_TUTORIAL_STATE_2_UNKNOWN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chAttackTutorial_learnedTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __chAttackTutorial_learnAbilityBasedOnDialog(ActorMarker *marker, enum asset_e dialog_id, s32 arg2) {
|
||||||
Actor* actor = marker_getActor(marker);
|
Actor* actor = marker_getActor(marker);
|
||||||
func_8028F918(0);
|
func_8028F918(0);
|
||||||
|
switch(dialog_id) {
|
||||||
switch (text_id) {
|
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||||
case ASSET_E15_DIALOG_UNKNOWN://L803872C8
|
|
||||||
ability_unlock(ABILITY_C_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;
|
break;
|
||||||
|
|
||||||
case ASSET_E17_DIALOG_UNKNOWN://L803872E4
|
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||||
ability_unlock(ABILITY_B_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;
|
break;
|
||||||
}//L803872FC
|
}
|
||||||
|
|
||||||
timed_exitStaticCamera(0.0f);
|
timed_exitStaticCamera(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void chAttackTutorial_setState(Actor *this, s32 state) {
|
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state) {
|
||||||
switch (state) {
|
switch (state)
|
||||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN:
|
{
|
||||||
if (this->unk10_12 == NULL) {
|
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||||
|
if (this->unk10_12 == 0) {
|
||||||
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
ability_unlock(ABILITY_4_CLAW_SWIPE);
|
||||||
gcdialog_showText(ASSET_DFF_DIALOG_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{
|
else{
|
||||||
gcdialog_showText(this->unk10_12 == VEGETABLE_1_TOPPER ? ASSET_E15_DIALOG_UNKNOWN : ASSET_E17_DIALOG_UNKNOWN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, NULL);
|
gcdialog_showText(
|
||||||
|
(this->unk10_12 == VEGETABLE_1_TOPPER) ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
|
||||||
|
0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, NULL
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L803873E0
|
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||||
this->unk38_31 = 0;
|
this->unk38_31 = 0;
|
||||||
__chAttackTutorial_spawnEnemy(this, ++this->unk10_12);
|
__chAttackTutorial_spawnEnemyActor(this, ++this->unk10_12);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTACK_TUTORIAL_STATE_3_UNKNOWN://L8038742C
|
case CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES:
|
||||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, TRUE);
|
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, 1);
|
||||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||||
marker_despawn(this->marker);
|
marker_despawn(this->marker);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTACK_TUTORIAL_STATE_4_UNKNOWN://L80387454
|
case CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED:
|
||||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE);
|
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
|
||||||
|
if (!honeycombscore_get(HONEYCOMB_17_SM_COLLIWOBBLE)) {
|
||||||
if (!honeycombscore_get(HONEYCOMB_17_SM_COLIWOBBLE)) {
|
this->unk10_12 = 3;
|
||||||
this->unk10_12 = VEGETABLE_3_COLLY_WOBBLE;
|
|
||||||
this->unk38_31 = 1;
|
this->unk38_31 = 1;
|
||||||
__chAttackTutorial_spawnEnemy(this, this->unk10_12);
|
__chAttackTutorial_spawnEnemyActor(this, this->unk10_12);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}//L803874A8
|
}
|
||||||
|
|
||||||
subaddie_set_state(this, state);
|
subaddie_set_state(this, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
int __chAttackTutorial_isEveryAbilitiesUnlocked(void) {
|
static bool __chAttackTutorial_areLearnableAbilitiesUnlocked() {
|
||||||
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE) &&
|
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||||
ability_isUnlocked(ABILITY_C_ROLL) &&
|
&& ability_isUnlocked(ABILITY_C_ROLL)
|
||||||
ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
&& ability_isUnlocked(ABILITY_B_RATATAT_RAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void chAttackTutorial_update(Actor *this) {
|
static void __chAttackTutorial_update(Actor *this) {
|
||||||
f32 distance_to_bottles;
|
f32 minimum_distance;
|
||||||
Actor *bottles_ptr;
|
Actor *bottles;
|
||||||
|
|
||||||
if (!this->initialized) {
|
if (!this->initialized) {
|
||||||
bottles_ptr = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &distance_to_bottles);
|
bottles = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &minimum_distance);
|
||||||
|
if (bottles != NULL) {
|
||||||
if (bottles_ptr != NULL) {
|
this->unk1C_x = bottles->position_x;
|
||||||
this->unk1C_x = bottles_ptr->position_x;
|
this->unk1C_y = bottles->position_y;
|
||||||
this->unk1C_y = bottles_ptr->position_y;
|
this->unk1C_z = bottles->position_z;
|
||||||
this->unk1C_z = bottles_ptr->position_z;
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
this->unk1C_x = this->position_x;
|
this->unk1C_x = this->position_x;
|
||||||
this->unk1C_y = this->position_y;
|
this->unk1C_y = this->position_y;
|
||||||
this->unk1C_z = this->position_z;
|
this->unk1C_z = this->position_z;
|
||||||
}
|
}
|
||||||
|
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL)
|
||||||
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL) ? VEGETABLE_2_BAWL :
|
? 2
|
||||||
ability_isUnlocked(ABILITY_4_CLAW_SWIPE) ? VEGETABLE_1_TOPPER : NULL;
|
: ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
|
|
||||||
this->initialized = TRUE;
|
this->initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(this->state) {
|
switch(this->state) {
|
||||||
case ATTACK_TUTORIAL_STATE_1_UNKNOWN://L80387610
|
case CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN:
|
||||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4)) {
|
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4))
|
||||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_5_UNKNOWN);
|
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG);
|
||||||
}
|
|
||||||
|
|
||||||
if (__chAttackTutorial_isEveryAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
if (__chAttackTutorial_areLearnableAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))
|
||||||
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_4_UNKNOWN);
|
__chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L80387658
|
case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
|
||||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) {
|
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) {
|
||||||
chAttackTutorial_talk(this->marker);
|
__chAttackTutorial_showDialogText(this->marker);
|
||||||
mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE);
|
mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTACK_TUTORIAL_STATE_5_UNKNOWN://L80387680
|
case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
|
||||||
break;
|
break;
|
||||||
}////L80387680
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chAttackTutorial_attackTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
static void __chAttackTutorial_handleDialog(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
|
||||||
Actor *actor = marker_getActor(marker);
|
Actor *actor = marker_getActor(marker);
|
||||||
|
|
||||||
switch (text_id) {
|
switch (text_id) {
|
||||||
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN:
|
case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN:
|
||||||
func_8028F918(0);
|
func_8028F918(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ASSET_E14_DIALOG_UNKNOWN:
|
case ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // WOW...NICE ONE! TRY ANOTHER!
|
||||||
case ASSET_E16_DIALOG_UNKNOWN:
|
case ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // BULLS-EYE! ONE MORE...
|
||||||
case ASSET_E18_DIALOG_UNKNOWN:
|
case ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // MMMM...NOT BAD, FEATHER FACE!
|
||||||
__chAttackTutorial_spawnEnemy(actor, actor->unk10_12);
|
__chAttackTutorial_spawnEnemyActor(actor, actor->unk10_12);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ASSET_E15_DIALOG_UNKNOWN:
|
case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
|
||||||
ability_unlock(ABILITY_C_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;
|
break;
|
||||||
|
|
||||||
case ASSET_E17_DIALOG_UNKNOWN:
|
case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
|
||||||
ability_unlock(ABILITY_B_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;
|
break;
|
||||||
|
|
||||||
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
|
||||||
case ASSET_E19_DIALOG_UNKNOWN:
|
case ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES:
|
||||||
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_3_UNKNOWN);
|
__chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
timed_exitStaticCamera(0.0f);
|
timed_exitStaticCamera(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void chAttackTutorial_talk(ActorMarker *marker) {
|
static void __chAttackTutorial_showDialogText(ActorMarker* marker) {
|
||||||
s32 text_id;
|
s32 dialog_text;
|
||||||
int try_count;
|
bool has_killed_enemy;
|
||||||
s32 text_flags = 4;
|
s32 dialog_flag = 0x4;
|
||||||
|
|
||||||
Actor* actor = marker_getActor(marker);
|
Actor* actor = marker_getActor(marker);
|
||||||
try_count = BOOL(actor->unk38_31);
|
|
||||||
|
|
||||||
if (try_count) {
|
has_killed_enemy = actor->unk38_31 ? TRUE : FALSE;
|
||||||
text_flags = 0xE;
|
if (has_killed_enemy) {
|
||||||
|
dialog_flag = 0xE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (actor->unk10_12) {
|
switch (actor->unk10_12) {
|
||||||
case VEGETABLE_1_TOPPER: //L803877D8
|
case VEGETABLE_1_TOPPER:
|
||||||
text_id = try_count ? ASSET_E15_DIALOG_UNKNOWN : ASSET_E14_DIALOG_UNKNOWN;
|
dialog_text = has_killed_enemy ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VEGETABLE_2_BAWL: //L803877F4
|
case VEGETABLE_2_BAWL:
|
||||||
text_id = try_count ? ASSET_E17_DIALOG_UNKNOWN : ASSET_E16_DIALOG_UNKNOWN;
|
dialog_text = has_killed_enemy ? ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP : ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VEGETABLE_3_COLLY_WOBBLE: //L80387810
|
case VEGETABLE_3_COLLY_WOBBLE:
|
||||||
text_id = try_count ? ASSET_E19_DIALOG_UNKNOWN : ASSET_E18_DIALOG_UNKNOWN;
|
dialog_text = has_killed_enemy ? ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES : ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//sp34 = actor->unk38_31;
|
|
||||||
break;
|
break;
|
||||||
}//L8038782C
|
}
|
||||||
|
|
||||||
if (text_id == ASSET_E19_DIALOG_UNKNOWN) {
|
if (dialog_text == ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES) {
|
||||||
func_8028F94C(2, actor->unk1C);
|
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);
|
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
|
||||||
text_id = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
dialog_text = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
|
||||||
}//L80387898
|
}
|
||||||
|
|
||||||
if (try_count) {
|
if (has_killed_enemy) {
|
||||||
timed_setStaticCameraToNode(0.0f, 6);
|
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++;
|
actor->unk38_31++;
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ enum chJumpTutorial_state_e {
|
|||||||
JUMP_TUTORIAL_STATE_3_DISAPPEARED
|
JUMP_TUTORIAL_STATE_3_DISAPPEARED
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038B0B0 = {
|
ActorInfo gChJumpTutorial = {
|
||||||
MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL,
|
MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL,
|
||||||
1, NULL,
|
1, NULL,
|
||||||
chJumpTutorial_update, actor_update_func_80326224, func_80325340,
|
chJumpTutorial_update, actor_update_func_80326224, func_80325340,
|
||||||
|
@@ -40,7 +40,7 @@ ActorAnimationInfo chSmBottlesAnimations[6] = {
|
|||||||
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
{ASSET_13A_ANIM_BOTTLES_ENTER, 2000000000.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo chBottles = {
|
ActorInfo gChBottles = {
|
||||||
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
MARKER_B7_TUTORIAL_BOTTLES, ACTOR_12B_TUTORIAL_BOTTLES, ASSET_387_MODEL_BOTTLES,
|
||||||
1, chSmBottlesAnimations,
|
1, chSmBottlesAnimations,
|
||||||
chSmBottles_update, actor_update_func_80326224, func_802D94B4,
|
chSmBottles_update, actor_update_func_80326224, func_802D94B4,
|
||||||
|
@@ -2,102 +2,99 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
/* extern functions */
|
extern f32 mapModel_getFloorY(f32*);
|
||||||
f32 mapModel_getFloorY(f32 *);
|
extern void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
||||||
void spawnQueue_bundle_f32(s32, f32, f32, f32);
|
extern void timed_mapSpecificFlags_setTrue(f32 time, enum sm_specific_flags flag);
|
||||||
void timed_mapSpecificFlags_setTrue(f32, s32);
|
extern void subaddie_set_state_with_direction(Actor* , s32, f32, s32);
|
||||||
void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
|
||||||
|
|
||||||
/* typedefs and declarations */
|
enum ch_vegetable_type {
|
||||||
enum chVegetables_state_e {
|
CH_VEGETABLE_1_TOPPER = 0x1,
|
||||||
VEGETABLES_STATE_1_UNKNOWN = 1,
|
CH_VEGETABLE_2_BAWL,
|
||||||
VEGETABLES_STATE_2_UNKNOWN,
|
CH_VEGETABLE_3_COLLIWOBBLE
|
||||||
VEGETABLES_STATE_3_UNKNOWN,
|
|
||||||
VEGETABLES_STATE_4_UNKNOWN
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct ch_vegetable {
|
enum ch_vegetables_states {
|
||||||
TUPLE(f32, unk0);
|
CH_VEGETABLES_STATE_1_UNKNOWN = 0x1, //L803882B0
|
||||||
s32 vegetable_id;
|
CH_VEGETABLES_STATE_2_UNKNOWN, //L803884E4
|
||||||
u32 pad10_31: 19;
|
CH_VEGETABLES_STATE_3_UNKNOWN, //L80388BFC
|
||||||
u32 unk10_12: 4;
|
CH_VEGETABLES_STATE_4_UNKNOWN //L8038839C
|
||||||
u32 pad10_8: 9;
|
};
|
||||||
} ChVeg;
|
|
||||||
|
|
||||||
/* public functions */
|
typedef struct ch_vegatable {
|
||||||
Actor *chVegetablesDraw(ActorMarker *, Gfx **, Mtx **, Vtx **);
|
TUPLE(f32, unk0);
|
||||||
void chVegetablesUpdate(Actor *);
|
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 */
|
/* .data */
|
||||||
ActorAnimationInfo chTopperAnimations[5] = {
|
static ActorAnimationInfo sChCarrotAnimations[5] = {
|
||||||
{NULL, 0.0f},
|
{NULL, NULL},
|
||||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1000000.0f},
|
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1000000.0f},
|
||||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f},
|
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f},
|
||||||
{ASSET_224_ANIM_TOPPER_UNKNOWN, 0.75f},
|
{ASSET_224_ANIM_TOPPER_UNKNOWN, 0.75f},
|
||||||
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f}
|
{ASSET_223_ANIM_TOPPER_UNKNOWN, 1.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038AC78 = {
|
ActorInfo gChVegetablesTopperA = {
|
||||||
MARKER_12A_TOPPER_A, ACTOR_166_TOPPER_A, ASSET_4ED_MODEL_TOPPER,
|
MARKER_12A_TOPPER_THE_CARROT_A, ACTOR_166_TOPPER_THE_CARROT_A, ASSET_4ED_MODEL_TOPPER,
|
||||||
1, chTopperAnimations,
|
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
2000, 0, 1.0f, 0
|
2000, 0, 1.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038AC9C = {
|
ActorInfo gChVegetablesTopperB = {
|
||||||
MARKER_1E6_TOPPER_B, ACTOR_TOPPER_B, ASSET_4ED_MODEL_TOPPER,
|
MARKER_1E6_TOPPER_THE_CARROT_B, ACTOR_TOPPER_THE_CARROT_B, ASSET_4ED_MODEL_TOPPER,
|
||||||
1, chTopperAnimations,
|
1, sChCarrotAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
2000, 0, 1.0f, 0
|
2000, 0, 1.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorAnimationInfo chBawlAnimations[5] = {
|
static ActorAnimationInfo sChOnionAnimations[5] = {
|
||||||
{NULL, 0.0f},
|
{NULL, NULL},
|
||||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1000000.0f},
|
{ASSET_226_ANIM_BAWL_UNKNOWN, 1000000.0f},
|
||||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f},
|
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f},
|
||||||
{ASSET_227_ANIM_BAWL_UNKNOWN, 0.75f},
|
{ASSET_227_ANIM_BAWL_UNKNOWN, 0.75f},
|
||||||
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f}
|
{ASSET_226_ANIM_BAWL_UNKNOWN, 1.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038ACE8 = {
|
ActorInfo gChVegetablesBawlA = {
|
||||||
MARKER_129_BAWL_A, ACTOR_165_BAWL_A, ASSET_4EF_MODEL_BAWL,
|
MARKER_129_BAWL_THE_ONION_A, ACTOR_165_BAWL_THE_ONION_A, ASSET_4EF_MODEL_BAWL,
|
||||||
1, chBawlAnimations,
|
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
0, 0, 1.0f, 0
|
0, 0, 1.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038AD0C = {
|
ActorInfo gChVegetablesBawlB = {
|
||||||
MARKER_1E7_BAWL_B, ACTOR_BAWL_B, ASSET_4EF_MODEL_BAWL,
|
MARKER_1E7_BAWL_THE_ONION_B, ACTOR_BAWL_THE_ONION_B, ASSET_4EF_MODEL_BAWL,
|
||||||
1, chBawlAnimations,
|
1, sChOnionAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
0, 0, 1.0f, 0
|
0, 0, 1.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorAnimationInfo chCollywobbleAnimations[5] = {
|
static ActorAnimationInfo sChCauliflowerAnimations[5] = {
|
||||||
{NULL, 0.0f},
|
{NULL, NULL},
|
||||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f},
|
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f},
|
||||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 10000000.0f},
|
||||||
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f}
|
{ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, 1.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038AD58 = {
|
ActorInfo gChVegetablesCollywobbleA = {
|
||||||
MARKER_128_COLLYWOBBLE_A, ACTOR_164_COLLYWOBBLE_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||||
1, chCollywobbleAnimations,
|
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
0, 0, 2.0f, 0
|
0, 0, 2.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
ActorInfo D_8038AD7C = {
|
ActorInfo gChVegetablesCollywobbleB = {
|
||||||
MARKER_1E8_COLLYWOBBLE_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, ACTOR_COLLYWOBBLE_B, ASSET_4EE_MODEL_COLLYWOBBLE,
|
||||||
1, chCollywobbleAnimations,
|
1, sChCauliflowerAnimations, __chVegetables_update, actor_update_func_80326224, __chVegetables_draw,
|
||||||
chVegetablesUpdate, actor_update_func_80326224, chVegetablesDraw,
|
|
||||||
0, 0, 2.0f, 0
|
0, 0, 2.0f, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 D_8038ADA0[3] = {0xFF, 0xFF, 0xFF};
|
static s32 sChVegetablesParticleRGB[3] = {0xFF, 0xFF, 0xFF};
|
||||||
|
|
||||||
ParticleScaleAndLifetimeRanges D_8038ADAC = {
|
static ParticleScaleAndLifetimeRanges sD_8038ADAC = {
|
||||||
{0.1f, 0.5f},
|
{0.1f, 0.5f},
|
||||||
{1.5f, 3.0f},
|
{1.5f, 3.0f},
|
||||||
{0.0f, 0.01f},
|
{0.0f, 0.01f},
|
||||||
@@ -105,12 +102,12 @@ ParticleScaleAndLifetimeRanges D_8038ADAC = {
|
|||||||
0.0f, 0.01f,
|
0.0f, 0.01f,
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleSettingsVelocityPosition D_8038ADD4 = {
|
static ParticleSettingsVelocityPosition sD_8038ADD4 = {
|
||||||
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
{{-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.5f, 0.75f},
|
||||||
{0.4f, 0.6f},
|
{0.4f, 0.6f},
|
||||||
{0.0f, 0.01f},
|
{0.0f, 0.01f},
|
||||||
@@ -118,13 +115,13 @@ ParticleScaleAndLifetimeRanges D_8038AE04 = {
|
|||||||
0.0f, 0.2f
|
0.0f, 0.2f
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleSettingsVelocityAccelerationPosition D_8038AE2C = {
|
static ParticleSettingsVelocityAccelerationPosition sD_8038AE2C = {
|
||||||
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
{{-100.0f, 200.0f, -100.0f}, {100.0f, 400.0f, 100.0f}},
|
||||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.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}}
|
{{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}}
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleScaleAndLifetimeRanges D_8038AE74 = {
|
static ParticleScaleAndLifetimeRanges sD_8038AE74 = {
|
||||||
{1.0f, 1.0f},
|
{1.0f, 1.0f},
|
||||||
{1.0f, 1.0f},
|
{1.0f, 1.0f},
|
||||||
{0.0f, 0.01f},
|
{0.0f, 0.01f},
|
||||||
@@ -132,13 +129,13 @@ ParticleScaleAndLifetimeRanges D_8038AE74 = {
|
|||||||
0.0f, 0.5f
|
0.0f, 0.5f
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleSettingsVelocityAccelerationPosition D_8038AE9C = {
|
static ParticleSettingsVelocityAccelerationPosition sD_8038AE9C = {
|
||||||
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
{{-100.0f, 400.0f, -100.0f}, {100.0f, 600.0f, 100.0f}},
|
||||||
{{0.0f, -600.0f, 0.0f}, {0.0f, -600.0f, 0.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}}
|
{{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}}
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleScaleAndLifetimeRanges D_8038AEE4 = {
|
static ParticleScaleAndLifetimeRanges sD_8038AEE4 = {
|
||||||
{0.6f, 0.8f},
|
{0.6f, 0.8f},
|
||||||
{0.5f, 0.7f},
|
{0.5f, 0.7f},
|
||||||
{0.0f, 0.01f},
|
{0.0f, 0.01f},
|
||||||
@@ -146,118 +143,111 @@ ParticleScaleAndLifetimeRanges D_8038AEE4 = {
|
|||||||
0.0f, 0.5f
|
0.0f, 0.5f
|
||||||
};
|
};
|
||||||
|
|
||||||
ParticleSettingsVelocityAccelerationPosition D_8038AF0C = {
|
static ParticleSettingsVelocityAccelerationPosition sD_8038AF0C = {
|
||||||
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
{{-200.0f, 200.0f, -200.0f}, {200.0f, 600.0f, 200.0f}},
|
||||||
{{0.0f, -900.0f, 0.0f}, {0.0f, -900.0f, 0.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}},
|
{{-100.0f, -100.0f, -100.0f}, {100.0f, 100.0f, 100.0f}},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
void __chVegetables_emitDust(ParticleEmitter *pCtrl, f32 *pos, s32 n) {
|
static void __chVegetables_setSpriteDustParticles(ParticleEmitter *emitter, f32 *position, s32 emit_count) {
|
||||||
s32 sp24[3] = D_8038ADA0;
|
s32 sp24[3] = sChVegetablesParticleRGB;
|
||||||
particleEmitter_setRGB(pCtrl, sp24);
|
particleEmitter_setRGB(emitter, sp24);
|
||||||
particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST);
|
particleEmitter_setSprite(emitter, ASSET_700_SPRITE_DUST);
|
||||||
particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
|
particleEmitter_setStartingFrameRange(emitter, 0, 7);
|
||||||
particleEmitter_setPosition(pCtrl, pos);
|
particleEmitter_setPosition(emitter, position);
|
||||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038ADAC);
|
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038ADAC);
|
||||||
particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038ADD4);
|
particleEmitter_setPositionAndVelocityRanges(emitter, &sD_8038ADD4);
|
||||||
particleEmitter_emitN(pCtrl, n);
|
particleEmitter_emitN(emitter, emit_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_803879B8(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
static void __chVegetables_setParticlesForModel(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||||
particleEmitter_func_802EFA18(pCtrl, 2);
|
particleEmitter_func_802EFA18(emitter, 2);
|
||||||
particleEmitter_setModel(pCtrl, model_id);
|
particleEmitter_setModel(emitter, model_id);
|
||||||
particleEmitter_setPosition(pCtrl, pos);
|
particleEmitter_setPosition(emitter, position);
|
||||||
particleEmitter_setDrawMode(pCtrl, 2);
|
particleEmitter_setDrawMode(emitter, 2);
|
||||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE04);
|
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE04);
|
||||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE2C);
|
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE2C);
|
||||||
particleEmitter_emitN(pCtrl, n);
|
particleEmitter_emitN(emitter, emit_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80387A80(ParticleEmitter *pCtrl, f32 *pos, s32 n, enum asset_e model_id) {
|
static void __chVegetables_setParticlesForModel2(ParticleEmitter *emitter, f32 *position, s32 emit_count, enum asset_e model_id) {
|
||||||
particleEmitter_func_802EF9F8(pCtrl, 0.6f);
|
particleEmitter_func_802EF9F8(emitter, 0.6f);
|
||||||
particleEmitter_func_802EFA18(pCtrl, 3);
|
particleEmitter_func_802EFA18(emitter, 3);
|
||||||
particleEmitter_setModel(pCtrl, model_id);
|
particleEmitter_setModel(emitter, model_id);
|
||||||
particleEmitter_setPosition(pCtrl, pos);
|
particleEmitter_setPosition(emitter, position);
|
||||||
particleEmitter_setDrawMode(pCtrl, 2);
|
particleEmitter_setDrawMode(emitter, 2);
|
||||||
particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
particleEmitter_setAngularVelocityRange(emitter, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
|
||||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AE74);
|
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AE74);
|
||||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AE9C);
|
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AE9C);
|
||||||
particleEmitter_emitN(pCtrl, n);
|
particleEmitter_emitN(emitter, emit_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80387B48(ParticleEmitter *pCtrl, f32 pos[3], s32 n, enum asset_e model_id) {
|
static void __chVegetables_setParticlesForHittingEnemyModel(ParticleEmitter *emitter, f32 position[3], s32 emit_count, enum asset_e model_id) {
|
||||||
particleEmitter_func_802EF9F8(pCtrl, 0.7f);
|
particleEmitter_func_802EF9F8(emitter, 0.7f);
|
||||||
particleEmitter_func_802EFA18(pCtrl, 4);
|
particleEmitter_func_802EFA18(emitter, 4);
|
||||||
particleEmitter_setModel(pCtrl, model_id);
|
particleEmitter_setModel(emitter, model_id);
|
||||||
particleEmitter_setPosition(pCtrl, pos);
|
particleEmitter_setPosition(emitter, position);
|
||||||
particleEmitter_setDrawMode(pCtrl, 2);
|
particleEmitter_setDrawMode(emitter, 2);
|
||||||
particleEmitter_setAngularVelocityRange(pCtrl, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
particleEmitter_setAngularVelocityRange(emitter, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f);
|
||||||
particleEmitter_setSfx(pCtrl, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
particleEmitter_setSfx(emitter, SFX_1F_HITTING_AN_ENEMY_3, 8000);
|
||||||
particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038AEE4);
|
particleEmitter_setScaleAndLifetimeRanges(emitter, &sD_8038AEE4);
|
||||||
particleEmitter_setVelocityAccelerationAndPositionRanges(pCtrl, &D_8038AF0C);
|
particleEmitter_setVelocityAccelerationAndPositionRanges(emitter, &sD_8038AF0C);
|
||||||
particleEmitter_emitN(pCtrl, n);
|
particleEmitter_emitN(emitter, emit_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chVegetables_dieActor(Actor *this) {
|
static void __chVegetables_vegetableDeathParticles(Actor* this) {
|
||||||
ChVeg *local = (ChVeg *) &this->local;
|
sChVegetable* local = (sChVegetable*)&this->local;
|
||||||
f32 pos[3];
|
f32 particles_position[3];
|
||||||
|
|
||||||
FUNC_8030E8B4(SFX_111_WHIPCRACK_DEATH, 1.0f, 32000, this->position, 1000, 2000);
|
FUNC_8030E8B4(SFX_111_WHIPCRACK_DEATH, 1.0f, 32000, this->position, 1000, 2000);
|
||||||
|
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
particles_position[0] = this->position_x;
|
||||||
pos[0] = this->position_x;
|
particles_position[1] = this->position_y;
|
||||||
pos[1] = this->position_y;
|
particles_position[2] = this->position_z;
|
||||||
pos[2] = this->position_z;
|
particles_position[1] += 50.0f;
|
||||||
pos[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);
|
||||||
func_80387B48(partEmitMgr_newEmitter(12), pos, 0xC, ASSET_4F4_MODEL_UNKNOWN);
|
__chVegetables_setParticlesForModel(partEmitMgr_newEmitter(4), particles_position, 0x4, ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH);
|
||||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F2_MODEL_UNKNOWN);
|
particles_position[1] += 50.0f;
|
||||||
func_803879B8(partEmitMgr_newEmitter(4), pos, 0x4, ASSET_4F3_MODEL_UNKNOWN);
|
__chVegetables_setSpriteDustParticles(partEmitMgr_newEmitter(8), particles_position, 8);
|
||||||
|
}
|
||||||
pos[1] += 50.0f;
|
|
||||||
__chVegetables_emitDust(partEmitMgr_newEmitter(8), pos, 8);
|
|
||||||
}//L80387D18
|
|
||||||
|
|
||||||
if (this->unk38_31) {
|
if (this->unk38_31) {
|
||||||
this->position_y += 100.0f;
|
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));
|
__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);
|
timed_mapSpecificFlags_setTrue(1.5f, SM_SPECIFIC_FLAG_7);
|
||||||
actor_collisionOff(this);
|
actor_collisionOff(this);
|
||||||
|
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE) {
|
||||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE) {
|
subaddie_set_state_with_direction(this, CH_VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
||||||
subaddie_set_state_with_direction(this, VEGETABLES_STATE_3_UNKNOWN, 0.0f, 1);
|
|
||||||
actor_playAnimationOnce(this);
|
actor_playAnimationOnce(this);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
marker_despawn(this->marker);
|
marker_despawn(this->marker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __chVegetables_die(ActorMarker *marker, ActorMarker *other_marker) {
|
static void __chVegetables_vegetableMarkerDeathParticles(ActorMarker* marker, ActorMarker* other_marker) {
|
||||||
__chVegetables_dieActor(marker_getActor(marker));
|
__chVegetables_vegetableDeathParticles(marker_getActor(marker));
|
||||||
}
|
}
|
||||||
|
|
||||||
Actor *chVegetablesDraw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
static Actor* __chVegetables_draw(ActorMarker* marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) {
|
||||||
Actor* actor = marker_getActor(marker);
|
Actor* actor = marker_getActor(marker);
|
||||||
|
|
||||||
if (actor->has_met_before) {
|
if (actor->has_met_before)
|
||||||
func_8033A470(3, 7);
|
func_8033A470(3, 7);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
func_8033A45C(3, 0);
|
func_8033A45C(3, 0);
|
||||||
}
|
|
||||||
|
|
||||||
return actor_draw(marker, gdl, mptr, arg3);
|
return actor_draw(marker, gdl, mptr, arg3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80387E64(Actor *this) {
|
static void __chVegetables_moveVegetable(Actor* this) {
|
||||||
ChVeg *local = (ChVeg *) &this->local;
|
sChVegetable* local = (sChVegetable*)&this->local;
|
||||||
|
|
||||||
this->unk1C_x = randf2(-50.0f, 50.0f);
|
this->unk1C_x = randf2(-50.0f, 50.0f);
|
||||||
this->unk1C_y = randf2(-50.0f, 50.0f);
|
this->unk1C_y = randf2(-50.0f, 50.0f);
|
||||||
@@ -268,134 +258,124 @@ void func_80387E64(Actor *this) {
|
|||||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80387F00(Actor *this) {
|
static void __chVegetables_elevateAndMoveVegetable(Actor* this) {
|
||||||
ChVeg *local = (ChVeg *) &this->local;
|
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;
|
|
||||||
|
|
||||||
|
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_x = this->position_x;
|
||||||
local->unk0_y = this->position_y;
|
local->unk0_y = this->position_y;
|
||||||
local->unk0_z = this->position_z;
|
local->unk0_z = this->position_z;
|
||||||
|
|
||||||
this->velocity_x = 0.0f;
|
this->velocity_x = 0.0f;
|
||||||
this->velocity_y = 0.0f;
|
this->velocity_y = 0.0f;
|
||||||
this->velocity_z = 0.0f;
|
this->velocity_z = 0.0f;
|
||||||
|
__chVegetables_moveVegetable(this);
|
||||||
func_80387E64(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 sp24[3];
|
||||||
f32 sp18[3];
|
f32 sp18[3];
|
||||||
|
|
||||||
sp18[0] = arg3;
|
sp18[0] = arg3;
|
||||||
sp18[1] = 0.0f;
|
sp18[1] = 0.0f;
|
||||||
sp18[2] = 0.0f;
|
sp18[2] = 0.0f;
|
||||||
|
|
||||||
ml_vec3f_yaw_rotate_copy(sp18, sp18, yaw - 90.0);
|
ml_vec3f_yaw_rotate_copy(sp18, sp18, yaw - 90.0);
|
||||||
|
|
||||||
sp24[0] = sp18[0] + local->unk0_x;
|
sp24[0] = sp18[0] + local->unk0_x;
|
||||||
sp24[1] = sp18[1] + local->unk0_y;
|
sp24[1] = sp18[1] + local->unk0_y;
|
||||||
sp24[2] = sp18[2] + local->unk0_z;
|
sp24[2] = sp18[2] + local->unk0_z;
|
||||||
|
|
||||||
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1) {
|
if (func_80307258(sp24, this->unk10_25 - 1, this->unk10_18 - 1) == -1)
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
else
|
||||||
else {
|
return TRUE;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void chVegetablesUpdate(Actor *this) {
|
static void __chVegetables_update(Actor* this) {
|
||||||
f32 temp_velZ;
|
f32 temp_velZ;
|
||||||
f32 temp_velX;
|
f32 temp_velX;
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
f32 tick;
|
f32 sp78;
|
||||||
f32 sp6C[3];
|
f32 sp6C[3];
|
||||||
f32 sp60[3];
|
f32 sp60[3];
|
||||||
f32 position[3];
|
f32 sp54[3];
|
||||||
ChVeg *local = (ChVeg *) &this->local; //sp38
|
sChVegetable* local = (sChVegetable*)&this->local; //sp38
|
||||||
f32 unused;
|
f32 sp30;
|
||||||
|
|
||||||
if (!this->initialized) {
|
if (!this->initialized) {
|
||||||
switch(this->marker->id) {
|
switch(this->marker->id) {
|
||||||
default:
|
default:
|
||||||
local->vegetable_id = VEGETABLE_3_COLLY_WOBBLE; //cauliflower
|
local->vegetable_type = CH_VEGETABLE_3_COLLIWOBBLE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MARKER_12A_TOPPER_A: //L803880F0
|
case MARKER_12A_TOPPER_THE_CARROT_A:
|
||||||
case MARKER_1E6_TOPPER_B: //L803880F0
|
case MARKER_1E6_TOPPER_THE_CARROT_B:
|
||||||
local->vegetable_id = VEGETABLE_1_TOPPER; //carrot
|
local->vegetable_type = CH_VEGETABLE_1_TOPPER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MARKER_129_BAWL_A: //L80388100
|
case MARKER_129_BAWL_THE_ONION_A:
|
||||||
case MARKER_1E7_BAWL_B: //L80388100
|
case MARKER_1E7_BAWL_THE_ONION_B:
|
||||||
local->vegetable_id = VEGETABLE_2_BAWL; //onion
|
local->vegetable_type = CH_VEGETABLE_2_BAWL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor_collisionOff(this);
|
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_x = this->position_x;
|
||||||
this->unk1C_y = this->position_y;
|
this->unk1C_y = this->position_y;
|
||||||
this->unk1C_z = this->position_z;
|
this->unk1C_z = this->position_z;
|
||||||
this->position_y -= 200.f;
|
this->position_y -= 200.f;
|
||||||
|
|
||||||
do {//L80388154
|
// set temp_velX/Z to > 5
|
||||||
|
do{
|
||||||
temp_velX = randf2(-10.0f, 10.0f);
|
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);
|
} while (temp_f0 < 5.0);
|
||||||
|
|
||||||
do {//L803881AC
|
do{
|
||||||
temp_velZ = randf2(-10.0f, 10.0f);
|
temp_velZ = randf2(-10.0f, 10.0f);
|
||||||
temp_f0 = 0.0f <= temp_velZ ? temp_velZ : -temp_velZ;
|
temp_f0 = (0.0f <= temp_velZ) ? temp_velZ : -temp_velZ;
|
||||||
} while(temp_f0 < 5.0);
|
} while(temp_f0 < 5.0);
|
||||||
|
|
||||||
this->velocity_x = temp_velX;
|
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->velocity_z = temp_velZ;
|
||||||
|
|
||||||
this->has_met_before = TRUE;
|
this->has_met_before = TRUE;
|
||||||
this->unk138_23 = 0;
|
this->unk138_23 = 0;
|
||||||
this->unk38_0 = 0;
|
this->unk38_0 = 0;
|
||||||
this->initialized = TRUE;
|
this->initialized = TRUE;
|
||||||
this->scale = 0.5;
|
this->scale = 0.5;
|
||||||
}//L80388278
|
}
|
||||||
|
|
||||||
switch (this->state) {
|
switch (this->state)
|
||||||
case VEGETABLES_STATE_1_UNKNOWN: //L803882B0
|
{
|
||||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(
|
case CH_VEGETABLES_STATE_1_UNKNOWN:
|
||||||
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) || this->unk10_12) {
|
||||||
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) { //L8038830C
|
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {
|
||||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 120.0 : 0.0;
|
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;
|
||||||
}
|
}
|
||||||
else {//L80388350
|
subaddie_set_state(this, CH_VEGETABLES_STATE_4_UNKNOWN);
|
||||||
this->unk1C_y += local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE ? 270.0 : 85.0;
|
|
||||||
}
|
|
||||||
//L80388384
|
|
||||||
subaddie_set_state(this, VEGETABLES_STATE_4_UNKNOWN);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case CH_VEGETABLES_STATE_4_UNKNOWN:
|
||||||
case VEGETABLES_STATE_4_UNKNOWN: //L8038839C
|
|
||||||
this->position_x = this->velocity_x + this->position_x;
|
this->position_x = this->velocity_x + this->position_x;
|
||||||
this->position_y = this->velocity_y + this->position_y;
|
this->position_y = this->velocity_y + this->position_y;
|
||||||
this->position_z = this->velocity_z + this->position_z;
|
this->position_z = this->velocity_z + this->position_z;
|
||||||
|
|
||||||
this->velocity_y -= 5.0f;
|
this->velocity_y -= 5.0f;
|
||||||
this->scale = MIN(this->scale + 0.05, 1.0);
|
this->scale = MIN(this->scale + 0.05, 1.0);
|
||||||
|
|
||||||
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
if (this->velocity_y < 0.0f && this->position_y < this->unk1C_y) {
|
||||||
this->position_y = mapModel_getFloorY(this->position);
|
this->position_y = mapModel_getFloorY(this->position);
|
||||||
|
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE)
|
||||||
if (local->vegetable_id == VEGETABLE_3_COLLY_WOBBLE) {
|
__chVegetables_elevateAndMoveVegetable(this);
|
||||||
func_80387F00(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
actor_collisionOn(this);
|
actor_collisionOn(this);
|
||||||
subaddie_set_state(this, VEGETABLES_STATE_2_UNKNOWN);
|
subaddie_set_state(this, CH_VEGETABLES_STATE_2_UNKNOWN);
|
||||||
}//L80388494
|
}
|
||||||
|
|
||||||
if (!this->unk138_23) {
|
if (!this->unk138_23) {
|
||||||
if (0.0f < this->position_y) {
|
if (0.0f < this->position_y) {
|
||||||
@@ -404,157 +384,131 @@ void chVegetablesUpdate(Actor *this) {
|
|||||||
this->scale = 1.0f;
|
this->scale = 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case VEGETABLES_STATE_2_UNKNOWN: //L803884E4
|
break;
|
||||||
|
case CH_VEGETABLES_STATE_2_UNKNOWN:
|
||||||
if (this->unk38_0) {
|
if (this->unk38_0) {
|
||||||
if (func_80329480(this)) {
|
if (func_80329480(this)) {
|
||||||
this->unk38_0 = 0;
|
this->unk38_0 = 0;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {//L80388520
|
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER) {
|
||||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
|
||||||
this->actor_specific_1_f = 3.0f;
|
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 (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) {//L80388554
|
||||||
if (!func_80329030(this, 0) && func_80329480(this)) {
|
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;
|
this->unk38_0 = 1;
|
||||||
}//L803885A0
|
}
|
||||||
|
|
||||||
if (func_803292E0(this)) {
|
if (func_803292E0(this)) {
|
||||||
this->yaw_ideal = func_80329784(this);
|
this->yaw_ideal = func_80329784(this);
|
||||||
}//L803885CC
|
|
||||||
else if (randf() < 0.02) {
|
|
||||||
func_80328CEC(this, (s32) this->yaw, 0x1E, 0x5A);
|
|
||||||
}//L80388B68
|
|
||||||
}
|
}
|
||||||
else {//L80388618
|
else {
|
||||||
|
if (randf() < 0.02) {
|
||||||
|
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
this->yaw_ideal = func_80329784(this);
|
this->yaw_ideal = func_80329784(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (local->vegetable_id == VEGETABLE_2_BAWL) {//L80388634
|
else if (local->vegetable_type == CH_VEGETABLE_2_BAWL) {
|
||||||
this->actor_specific_1_f = 4.0f;
|
this->actor_specific_1_f = 4.0f;
|
||||||
|
|
||||||
if (!func_80329030(this, 0) && func_80329480(this)) {
|
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;
|
this->unk38_0 = 1;
|
||||||
}//L80388698
|
}
|
||||||
|
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_C) || (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && func_803292E0(this))) {
|
||||||
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);
|
this->yaw_ideal = func_80329784(this);
|
||||||
}//L803886E4
|
} else {
|
||||||
else if (randf() < 0.02) {//D_8038B1D0){
|
if (randf() < 0.02) {
|
||||||
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
func_80328CEC(this, (s32)this->yaw, 0x1E, 0x5A);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {//L80388730
|
} else {
|
||||||
tick = time_getDelta();
|
sp78 = time_getDelta();
|
||||||
|
|
||||||
sp6C[0] = this->unk1C_x - this->position_x;
|
sp6C[0] = this->unk1C_x - this->position_x;
|
||||||
sp6C[1] = this->unk1C_y - this->position_y;
|
sp6C[1] = this->unk1C_y - this->position_y;
|
||||||
sp6C[2] = this->unk1C_z - this->position_z;
|
sp6C[2] = this->unk1C_z - this->position_z;
|
||||||
|
|
||||||
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
if (LENGTH_VEC3F(sp6C) < 40.0f) {
|
||||||
ml_vec3f_set_length(sp6C, 400.0f);
|
ml_vec3f_set_length(sp6C, 400.0f);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ml_vec3f_set_length(sp6C, 100.0f);
|
ml_vec3f_set_length(sp6C, 100.0f);
|
||||||
}
|
}
|
||||||
|
this->position_x += this->velocity_x*sp78 + sp6C[0]*sp78*sp78;
|
||||||
this->position_x += this->velocity_x * tick + sp6C[0] * tick * tick;
|
this->position_y += this->velocity_y*sp78 + sp6C[1]*sp78*sp78;
|
||||||
this->position_y += this->velocity_y * tick + sp6C[1] * tick * tick;
|
this->position_z += this->velocity_z*sp78 + sp6C[2]*sp78*sp78;
|
||||||
this->position_z += this->velocity_z * tick + sp6C[2] * tick * tick;
|
this->velocity_x += sp6C[0]*sp78;
|
||||||
|
this->velocity_y += sp6C[1]*sp78;
|
||||||
this->velocity_x += sp6C[0] * tick;
|
this->velocity_z += sp6C[2]*sp78;
|
||||||
this->velocity_y += sp6C[1] * tick;
|
if (gu_sqrtf(this->velocity_z*this->velocity_z + (this->velocity_x*this->velocity_x + this->velocity_y*this->velocity_y)) > 50.0f) {
|
||||||
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);
|
ml_vec3f_set_length(this->velocity, 50.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ml_vec3f_distance(this->position, this->unk1C) < 20.0f) {
|
if (ml_vec3f_distance(this->position, this->unk1C) < 20.0f) {
|
||||||
func_80387E64(this);
|
__chVegetables_moveVegetable(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->actor_specific_1_f = 5.0f;
|
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 (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 (!__chVegetables_func_80387FA8(this, local, (s32)this->yaw, (s32)this->actor_specific_1_f)) {
|
||||||
if (func_80329480(this)) {
|
if (func_80329480(this)) {
|
||||||
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
|
func_80328CEC(this, (s32)this->yaw, 0x78, 0xb4);
|
||||||
this->unk38_0 = 1;
|
this->unk38_0 = 1;
|
||||||
}//L80388994
|
|
||||||
}
|
}
|
||||||
else { //L803889A0
|
} else {
|
||||||
this->position_x -= local->unk0_x;
|
this->position_x -= local->unk0_x;
|
||||||
this->position_y -= local->unk0_y;
|
this->position_y -= local->unk0_y;
|
||||||
this->position_z -= local->unk0_z;
|
this->position_z -= local->unk0_z;
|
||||||
|
|
||||||
this->unk1C_x -= local->unk0_x;
|
this->unk1C_x -= local->unk0_x;
|
||||||
this->unk1C_y -= local->unk0_y;
|
this->unk1C_y -= local->unk0_y;
|
||||||
this->unk1C_z -= local->unk0_z;
|
this->unk1C_z -= local->unk0_z;
|
||||||
|
TUPLE_ASSIGN(sp60, this->actor_specific_1_f, 0.0f, 0.0f);
|
||||||
TUPLE_ASSIGN(sp60, this->actor_specific_1_f, 0.0f, 0.0f)
|
|
||||||
ml_vec3f_yaw_rotate_copy(sp60, sp60, this->yaw - 90.0);
|
ml_vec3f_yaw_rotate_copy(sp60, sp60, this->yaw - 90.0);
|
||||||
|
|
||||||
local->unk0_x = sp60[0] + local->unk0_x;
|
local->unk0_x = sp60[0] + local->unk0_x;
|
||||||
local->unk0_y = sp60[1] + local->unk0_y;
|
local->unk0_y = sp60[1] + local->unk0_y;
|
||||||
local->unk0_z = sp60[2] + local->unk0_z;
|
local->unk0_z = sp60[2] + local->unk0_z;
|
||||||
|
|
||||||
this->position_x = local->unk0_x + this->position_x;
|
this->position_x = local->unk0_x + this->position_x;
|
||||||
this->position_y = local->unk0_y + this->position_y;
|
this->position_y = local->unk0_y + this->position_y;
|
||||||
this->position_z = local->unk0_z + this->position_z;
|
this->position_z = local->unk0_z + this->position_z;
|
||||||
|
|
||||||
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
this->unk1C_x = local->unk0_x + this->unk1C_x;
|
||||||
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
this->unk1C_y = local->unk0_y + this->unk1C_y;
|
||||||
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
this->unk1C_z = local->unk0_z + this->unk1C_z;
|
||||||
}//L80388AD8
|
}
|
||||||
|
|
||||||
if (func_803292E0(this)) {
|
if (func_803292E0(this)) {
|
||||||
this->yaw_ideal = func_80329784(this);
|
this->yaw_ideal = func_80329784(this);
|
||||||
}//L80388B04
|
} else {
|
||||||
else if (randf() < 0.01) {
|
if (randf() < 0.01) {
|
||||||
func_80328CEC(this, (s32)this->yaw, 0x1e, 0x5A);
|
func_80328CEC(this, (s32)this->yaw, 0x1e, 0x5A);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { //L80388B50
|
} else {
|
||||||
this->yaw_ideal = func_80329784(this);
|
this->yaw_ideal = func_80329784(this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}//L80388B68
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
func_80328FB0(this, 2.0f);
|
func_80328FB0(this, 2.0f);
|
||||||
|
|
||||||
if (local->vegetable_id != VEGETABLE_3_COLLY_WOBBLE && actor_animationIsAt(this, 0.3f)) {
|
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);
|
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)) {
|
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);
|
FUNC_8030E8B4(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
case CH_VEGETABLES_STATE_3_UNKNOWN:
|
||||||
case VEGETABLES_STATE_3_UNKNOWN: //L80388BFC
|
if (actor_animationIsAt(this, (local->vegetable_type == CH_VEGETABLE_2_BAWL) ? 0.4 : 0.05)) {
|
||||||
if (actor_animationIsAt(this, local->vegetable_id == VEGETABLE_2_BAWL ? 0.4 : 0.05)) {
|
sp54[0] = this->position_x;
|
||||||
position[0] = this->position_x;
|
sp54[1] = this->position_y;
|
||||||
position[1] = this->position_y;
|
sp54[2] = this->position_z;
|
||||||
position[2] = this->position_z;
|
if (local->vegetable_type == CH_VEGETABLE_1_TOPPER)
|
||||||
|
sp54[1] += 150.0f;
|
||||||
if (local->vegetable_id == VEGETABLE_1_TOPPER) {
|
|
||||||
position[1] += 150.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->has_met_before = FALSE;
|
this->has_met_before = FALSE;
|
||||||
func_80387A80(partEmitMgr_newEmitter(3), position, 3,
|
__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);
|
||||||
local->vegetable_id == VEGETABLE_1_TOPPER ? ASSET_4F0_MODEL_UNKNOWN : ASSET_4F1_MODEL_UNKNOWN);
|
|
||||||
}//L80388CC4
|
|
||||||
|
|
||||||
if (actor_animationIsAt(this, 0.75f)) {
|
|
||||||
func_80326310(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (actor_animationIsAt(this, 0.75f))
|
||||||
|
func_80326310(this);
|
||||||
break;
|
break;
|
||||||
}//L80388CE0
|
}
|
||||||
}//*/
|
}
|
||||||
|
@@ -11,15 +11,15 @@ extern s32 D_80275650;
|
|||||||
|
|
||||||
extern ActorInfo D_8038AB00;
|
extern ActorInfo D_8038AB00;
|
||||||
extern ActorInfo D_8038ABF0;
|
extern ActorInfo D_8038ABF0;
|
||||||
extern ActorInfo D_8038AC20; //chAttackTutorial
|
extern ActorInfo gChAttackTutorial;
|
||||||
extern ActorInfo D_8038AC78; //chCarrot Slave?
|
extern ActorInfo gChVegetablesTopperA;
|
||||||
extern ActorInfo D_8038ACE8; //ch onion A
|
extern ActorInfo gChVegetablesBawlA;
|
||||||
extern ActorInfo D_8038AD58; //ch cauliflower A
|
extern ActorInfo gChVegetablesCollywobbleA;
|
||||||
extern ActorInfo D_8038AC9C; //chCarrot FreeRange?
|
extern ActorInfo gChVegetablesTopperB;
|
||||||
extern ActorInfo D_8038AD0C; //ch onion B
|
extern ActorInfo gChVegetablesBawlB;
|
||||||
extern ActorInfo D_8038AD7C; //ch cauliflower B
|
extern ActorInfo gChVegetablesCollywobbleB;
|
||||||
extern ActorInfo chBottles; //chSmMole bottles
|
extern ActorInfo gChBottles;
|
||||||
extern ActorInfo D_8038B0B0; //chJumpTutorial code_4070
|
extern ActorInfo gChJumpTutorial;
|
||||||
extern ActorInfo D_8038B0E0;
|
extern ActorInfo D_8038B0E0;
|
||||||
extern ActorInfo D_8038B008; //chBanjosBed
|
extern ActorInfo D_8038B008; //chBanjosBed
|
||||||
extern ActorInfo D_8038B044; //chBanjosChair
|
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_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_8038ABF0, actor_new, ACTOR_FLAG_UNKNOWN_7);
|
||||||
spawnableActorList_add(&D_8038AC20, actor_new, ACTOR_FLAG_NONE);
|
spawnableActorList_add(&gChAttackTutorial, 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(&gChVegetablesTopperA, 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(&gChVegetablesBawlA, 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(&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(&D_8038AC9C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | 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(&D_8038AD0C, 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(&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(&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(&chBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
spawnableActorList_add(&gChBottles, actor_new, ACTOR_FLAG_UNKNOWN_8);
|
||||||
spawnableActorList_add(&D_8038B0B0, actor_new, ACTOR_FLAG_NONE);
|
spawnableActorList_add(&gChJumpTutorial, actor_new, ACTOR_FLAG_NONE);
|
||||||
spawnableActorList_add(&D_8038B0E0, 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_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);
|
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);
|
||||||
|
@@ -17,13 +17,13 @@ typedef struct{
|
|||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
Struct_core2_B62B0_0 D_80370AC0[0xBB] = {
|
Struct_core2_B62B0_0 D_80370AC0[0xBB] = {
|
||||||
{MARKER_12A_TOPPER_A, 0x0000, {0x0904, 0x8504, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}},
|
{MARKER_12A_TOPPER_THE_CARROT_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_129_BAWL_THE_ONION_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_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_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_1E6_TOPPER_THE_CARROT_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_1E7_BAWL_THE_ONION_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_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_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_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}},
|
{MARKER_1F1_GRUNTLING_BLACK, 0x0001, {0x0A10, 0x898C, 0x8100, 0x8988, 0x8A08, 0x8A08, 0x0A84, 0x098C, 0x0A04, 0x0000, 0x2020}},
|
||||||
|
Reference in New Issue
Block a user