Document: FP xmas tree and twinkly minigame

This commit is contained in:
SuperZambezi 2025-11-28 19:03:32 +00:00 committed by Moses Troyer
parent 1f093a8036
commit ef39f6fb58
46 changed files with 330 additions and 309 deletions

View File

@ -453,7 +453,7 @@ enum level_flags_e
LEVEL_FLAG_26_FP_UNKNOWN,
LEVEL_FLAG_27_RBB_UNKNOWN,
LEVEL_FLAG_28_RBB_UNKNOWN,
LEVEL_FLAG_29_FP_UNKNOWN,
LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE,
LEVEL_FLAG_2A_FP_UNKNOWN,
LEVEL_FLAG_2B_FP_UNKNOWN,
LEVEL_FLAG_2C_FP_UNKNOWN,
@ -1458,7 +1458,7 @@ enum sfx_e
SFX_3EF,
SFX_3F0_FLIBBIT_TALKING,
SFX_3F1_UNKNOWN, //bsstand
SFX_3F2_UNKNOWN, //gold_chest_ttc
SFX_3F2_BOING, //gold_chest_ttc
SFX_3F5_UNKNOWN = 0x3F5, //RBB/code_5F80
SFX_3F6_RUBBING, //lair/code_0 func_803880BC
@ -1483,8 +1483,8 @@ enum sfx_e
SFX_412_FREEZING_WATER_TALKING = 0x412,
SFX_413_WATER_RIPPLE,
SFX_414_XMAS_GIFT_TALKING,
SFX_415_UNKNOWN, //xmas tree
SFX_416,
SFX_415_XMAS_LIGHTS_FLICKERING,
SFX_416_ELECTRIC_ZAP,
SFX_417_DOUBLE_HEALTH_UPGRADE,
SFX_419_UNKNOWN = 0x419,
@ -2154,15 +2154,16 @@ enum actor_e
ACTOR_333_TWINKLY_GREEN,
ACTOR_334_TWINKLY_ORANGE,
ACTOR_335_TWINKLY_RED,
ACTOR_337_TWINKLY_MUNCHER = 0x337,
ACTOR_336_TWINKLY_BOX,
ACTOR_337_TWINKLY_MUNCHER,
ACTOR_338_XMAS_TREE_SWITCH,
ACTOR_33A_BLUE_PRESENT = 0x33A,
ACTOR_339_XMAS_TREE_STAR,
ACTOR_33A_BLUE_PRESENT,
ACTOR_33B_GREEN_PRESENT,
ACTOR_33C_RED_PRESENT,
ACTOR_33F_WOZZA_IN_CAVE = 0x33F,
ACTOR_33F_WOZZA_IN_CAVE = 0x33F,
ACTOR_340_XMAS_TREE_ICE,
ACTOR_349_UNKNOWN = 0x349,
@ -2483,7 +2484,7 @@ enum mm_specific_flags {
MM_SPECIFIC_FLAG_0_CHIMPY_STUMP_RAISED,
MM_SPECIFIC_FLAG_1_ORANGE_HAS_BEEN_COLLECTED,
MM_SPECIFIC_FLAG_2_ORANGE_HAS_BEEN_RETURNED,
MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED,
MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEFT,
MM_SPECIFIC_FLAG_4_SHAKE,
MM_SPECIFIC_FLAG_CONGA_WARNED_BLOCKS = 0x6,
@ -2519,6 +2520,23 @@ enum bgs_specific_flags {
BGS_SPECIFIC_FLAG_MAZE_JIGGY = 0xD
};
enum fp_specific_flags {
FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON = 0,
FP_SPECIFIC_FLAG_1_UNKNOWN,
FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH,
FP_SPECIFIC_FLAG_3_XMAS_TREE_STAR_COMPLETE,
FP_SPECIFIC_FLAG_4_UNKNOWN,
FP_SPECIFIC_FLAG_5_WALRUS_RACE_FAILED,
FP_SPECIFIC_FLAG_6_BANJO_RACE_FAILED,
FP_SPECIFIC_FLAG_7_UNKNOWN,
FP_SPECIFIC_FLAG_8_UNKNOWN,
FP_SPECIFIC_FLAG_9_UNKNOWN,
FP_SPECIFIC_FLAG_A_FIRST_TWINKLY_EATEN,
FP_SPECIFIC_FLAG_B_UNKNOWN,
FP_SPECIFIC_FLAG_C_UNKNOWN,
FP_SPECIFIC_FLAG_D_UNKNOWN
};
enum mmm_specific_flags {
MMM_SPECIFIC_FLAG_0_UNKNOWN,
MMM_SPECIFIC_FLAG_TUMBLAR_BROKEN,
@ -3362,7 +3380,7 @@ enum asset_e
// Unused
// 424 GV Cactus
ASSET_425_MODEL_CROCTUS = 0x425,
// 426 FP Christmas Tree Star
ASSET_426_MODEL_XMAS_TREE_STAR,
// 427 (Wooden Plank)
ASSET_428_MODEL_BOSS_BOOM_BOX = 0x428,
ASSET_429_MODEL_CC_KEY,
@ -3391,7 +3409,7 @@ enum asset_e
// 43f (White Star?)
ASSET_440_MODEL_SNAREBEAR = 0x440,
// 441 (Sir Slush Snowball?)
// 442 FP Twinklies Box
ASSET_442_MODEL_TWINKLY_BOX = 0x442,
// 443 CCW Zubba Honey Lump
// 444 (CCW Zubba Entrance Lid?)
// 445 (CCW Zubba Entrance Lid?)
@ -3537,8 +3555,10 @@ enum asset_e
ASSET_4D0_MODEL_LIMBO_BONE,
// Unused
// 4d2 FP Christmas Tree Glass Container
// 4d3 FP Christmas Tree Glass Container Fragment
ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD = 0x4D4,
ASSET_4D2_MODEL_XMAS_TREE_ICE = 0x4D2,
ASSET_4D4_MODEL_XMAS_ICE_FRAGMENT = 0x4D3,
ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD,
ASSET_4D5_MODEL_WALL_COBWEB,
// 4d6 Click Clock Wood Entrance Door
// 4d7 Freezeezy Peak Entrance Left Door
@ -5354,16 +5374,18 @@ enum marker_e{
MARKER_201_TWINKLY_GREEN,
MARKER_202_TWINKLY_ORANGE,
MARKER_203_TWINKLY_RED,
MARKER_205_TWINKLY_MUNCHER = 0x205,
MARKER_208_BLUE_PRESENT = 0x208,
MARKER_204_TWINKLY_BOX,
MARKER_205_TWINKLY_MUNCHER,
MARKER_206_XMAS_TREE_SWITCH,
MARKER_207_XMAS_TREE_STAR,
MARKER_208_BLUE_PRESENT,
MARKER_209_GREEN_PRESENT,
MARKER_20A_RED_PRESENT,
MARKER_20B_WOZZA,
MARKER_20C_WOZZAS_JIGGY,
MARKER_20F_WOZZA_IN_CAVE = 0x20F,
MARKER_210_XMAS_TREE_ICE,
MARKER_217_BEE_SWARM = 0x217,
MARKER_218_LIMBO,

View File

@ -452,7 +452,7 @@ void func_8030DB04(u8, s32, f32 position[3], f32, f32);
void transitionToMap(enum map_e map, s32 exit, s32 transition);
void levelSpecificFlags_set(s32, s32);
void func_803228D8(void);
void musicKeepsPlaying(void);
void actor_predrawMethod(Actor *);
void mapSpecificFlags_set(s32, s32);

View File

@ -63,7 +63,7 @@ s32 func_8038D2F4(Actor *this, f32 *arg1, bool arg2) {
local->unkA[1] = (s16) (s32) mapModel_getFloorY(arg1);
skeletalAnim_set(this->unk148, ASSET_DB_ANIM_FLIBBIT_HOP, 0.2f, (arg2) ? randf2(0.7f, 0.8f) : randf2(0.7f, 0.8f));
skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE);
func_80324D54(0.2f, SFX_3F2_UNKNOWN, randf2(0.7f, 1.3f), randi2(25000, 27000), this->position, 500.0f, 2500.0f);
func_80324D54(0.2f, SFX_3F2_BOING, randf2(0.7f, 1.3f), randi2(25000, 27000), this->position, 500.0f, 2500.0f);
return TRUE;
}

View File

@ -18,7 +18,7 @@ ActorInfo D_8038F460 = { 0x1BC, 0x2A9, 0x48E, 0x0, NULL, func_8038C7A8, NULL, ac
/* .code */
void CCW_func_8038C5D0(ActorMarker* marker) {
Actor* actor = marker_getActor(marker);
func_8030E878(SFX_3F2_UNKNOWN, randf2(0.95f, 1.05f), 26000, actor->position, 500.0f, 1000.0f);
func_8030E878(SFX_3F2_BOING, randf2(0.95f, 1.05f), 26000, actor->position, 500.0f, 1000.0f);
}
void CCW_func_8038C638(ActorMarker* marker) {

View File

@ -21,19 +21,19 @@ ActorAnimationInfo D_80391DF0[] = {
{ASSET_17D_ANIM_POLAR_BEAR_CUB_HAPPY, 2.5f}
};
ActorInfo D_80391E08 = { MARKER_1FA_POLAR_BEAR_CUB_BLUE, ACTOR_1EA_POLAR_BEAR_CUB_BLUE, ASSET_44C_MODEL_POLAR_BEAR_CUB_BLUE,
ActorInfo gChCubMoggy = { MARKER_1FA_POLAR_BEAR_CUB_BLUE, ACTOR_1EA_POLAR_BEAR_CUB_BLUE, ASSET_44C_MODEL_POLAR_BEAR_CUB_BLUE,
0x1, D_80391DF0,
func_8038A384, actor_update_func_80326224, actor_draw,
2500, 0, 1.2f, 0
};
ActorInfo FP_D_80391E2C = { MARKER_1FB_POLAR_BEAR_CUB_GREEN, ACTOR_1EB_POLAR_BEAR_CUB_GREEN, ASSET_44D_MODEL_POLAR_BEAR_CUB_GREEN,
ActorInfo gChCubSoggy = { MARKER_1FB_POLAR_BEAR_CUB_GREEN, ACTOR_1EB_POLAR_BEAR_CUB_GREEN, ASSET_44D_MODEL_POLAR_BEAR_CUB_GREEN,
0x1, D_80391DF0,
func_8038A384, actor_update_func_80326224, actor_draw,
2500, 0, 1.2f, 0
};
ActorInfo D_80391E50 = { MARKER_1FC_POLAR_BEAR_CUB_RED, ACTOR_1EC_POLAR_BEAR_CUB_RED, ASSET_44E_MODEL_POLAR_BEAR_CUB_RED,
ActorInfo gChCubGroggy = { MARKER_1FC_POLAR_BEAR_CUB_RED, ACTOR_1EC_POLAR_BEAR_CUB_RED, ASSET_44E_MODEL_POLAR_BEAR_CUB_RED,
0x1, D_80391DF0,
func_8038A384, actor_update_func_80326224, actor_draw,
2500, 0, 1.2f, 0

View File

@ -46,7 +46,7 @@ ActorAnimationInfo D_80391C80[] = {
{0x150, 0.6f}
};
ActorInfo D_80391CE8 = { MARKER_97_BOGGY_2, ACTOR_C8_BOGGY_2, ASSET_38A_MODEL_BOGGY_1,
ActorInfo gChBoggySled = { MARKER_97_BOGGY_2, ACTOR_C8_BOGGY_2, ASSET_38A_MODEL_BOGGY_1,
0x1, D_80391C80,
FP_func_80388F4C, func_803896FC, func_80388740,
0, 0, 1.4f, 0
@ -93,7 +93,7 @@ void FP_func_803888E4(Actor *this){
static f32 D_80391D18[3] = {1463.0f, 635.0f, 5193.0f};
subaddie_set_state_with_direction(this, 0xC, 0.0001f, 1);
if(!jiggyscore_isSpawned(JIGGY_30_FP_BOGGY_2)){
if(mapSpecificFlags_get(5)){
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_5_WALRUS_RACE_FAILED)){
func_80324DBC(0.1f, ASSET_C06_DIALOG_BOGGY_SLED_WALRUS_SECOND_START, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
}
else{//L80388964
@ -102,14 +102,14 @@ void FP_func_803888E4(Actor *this){
}
else{//L803889A0
func_8028F490(D_80391D0C);
if(mapSpecificFlags_get(6)){
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_6_BANJO_RACE_FAILED)){
func_80324DBC(0.1f, ASSET_C29_DIALOG_BOGGY_SLED_BEAR_SECOND_START, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
}
else{
func_80324DBC(0.1f, ASSET_C28_DIALOG_BOGGY_SLED_BEAR_START, 0x2a, D_80391D18, this->marker, func_80388D70, NULL);
}
}//L80388A30
mapSpecificFlags_set(5, TRUE);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_5_WALRUS_RACE_FAILED, TRUE);
maSlalom_start();
}
@ -123,7 +123,7 @@ void func_80388A50(Actor *this){
void func_80388A94(Actor *this){
func_80388A50(this);
if(mapSpecificFlags_get(6)){
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_6_BANJO_RACE_FAILED)){
gcdialog_showDialog(ASSET_C0A_DIALOG_BOGGY_SLED_BEAR_MISS_RETRY, 0xe, this->position, this->marker, func_80388D70, NULL);
}
else{
@ -135,7 +135,7 @@ void func_80388B18(Actor *this, u8 arg1){
if(arg1 == TRUE){
if(player_getTransformation() == TRANSFORM_4_WALRUS){
func_80388A50(this);
if(mapSpecificFlags_get(5)){
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_5_WALRUS_RACE_FAILED)){
gcdialog_showDialog(ASSET_C05_DIALOG_BOGGY_SLED_WALRUS_MISS_RETRY, 0xf, this->position, this->marker, func_80388D70, NULL);
}
else{
@ -215,7 +215,7 @@ void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2){
switch(arg2){
case 1:
FP_func_803888E4(this);
mapSpecificFlags_set(6, TRUE);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_6_BANJO_RACE_FAILED, TRUE);
break;
case 0:
subaddie_set_state_with_direction(this, 1, 0.0001f, 1);

View File

@ -11,7 +11,7 @@ ActorAnimationInfo D_80392680[] = {
{0x222, 2.0f}
};
ActorInfo D_80392690 = { 0x20D, 0x33D, 0x38A,
ActorInfo gChBoggyHome = { 0x20D, 0x33D, 0x38A,
0x1, D_80392680,
func_80390388, actor_update_func_80326224, func_80390290,
2500, 0, 1.0f, 0

View File

@ -12,7 +12,7 @@ extern ActorAnimationInfo D_803926F0[]= {
{ASSET_221_ANIM_WOZZA_IN_CAVE, 5.0f}
};
extern ActorInfo D_80392700 = { MARKER_20F_WOZZA_IN_CAVE, ACTOR_33F_WOZZA_IN_CAVE, ASSET_494_MODEL_WOZZA,
extern ActorInfo gChWozzaCave = { MARKER_20F_WOZZA_IN_CAVE, ACTOR_33F_WOZZA_IN_CAVE, ASSET_494_MODEL_WOZZA,
0x1, D_803926F0,
func_80390630, actor_update_func_80326224, actor_draw,
2500, 0, 1.6f, 0
@ -62,7 +62,7 @@ void func_80390630(Actor *this){
|| actor_animationIsAt(this, 0.92f)
){
sfx_playFadeShorthandDefault(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000);
sfx_playFadeShorthandDefault(SFX_3F2_BOING, 0.8f, 24000, this->position, 500, 2000);
}
}

View File

@ -10,19 +10,19 @@ ActorAnimationInfo D_803924A0[] = {
{ASSET_18A_ANIM_XMAS_GIFT, 1.5f}
};
ActorInfo D_803924B0 = { MARKER_208_BLUE_PRESENT, ACTOR_33A_BLUE_PRESENT, ASSET_47F_MODEL_XMAS_GIFT_BLUE,
ActorInfo gChPresentBlue = { MARKER_208_BLUE_PRESENT, ACTOR_33A_BLUE_PRESENT, ASSET_47F_MODEL_XMAS_GIFT_BLUE,
0x1, D_803924A0,
func_8038F144, actor_update_func_80326224, func_8038F0F0,
2500, 0, 1.2f, 0
};
ActorInfo D_803924D4 = { MARKER_209_GREEN_PRESENT, ACTOR_33B_GREEN_PRESENT, ASSET_480_MODEL_XMAS_GIFT_GREEN,
ActorInfo gChPresentGreen = { MARKER_209_GREEN_PRESENT, ACTOR_33B_GREEN_PRESENT, ASSET_480_MODEL_XMAS_GIFT_GREEN,
0x1, D_803924A0,
func_8038F144, actor_update_func_80326224, func_8038F0F0,
2500, 0, 1.2f, 0
};
ActorInfo D_803924F8 = { MARKER_20A_RED_PRESENT, ACTOR_33C_RED_PRESENT, ASSET_481_MODEL_XMAS_GIFT_RED,
ActorInfo gChPresentRed = { MARKER_20A_RED_PRESENT, ACTOR_33C_RED_PRESENT, ASSET_481_MODEL_XMAS_GIFT_RED,
0x1, D_803924A0,
func_8038F144, actor_update_func_80326224, func_8038F0F0,
2500, 0, 1.2f, 0

View File

@ -13,7 +13,7 @@ ActorAnimationInfo FP_D_80391A90[] ={
{ASSET_143_ANIM_SNOWMAN_BUTTON, 800000.0f}
};
ActorInfo FP_D_80391AB0 = {
ActorInfo gSnowmanButton = {
MARKER_B9_FP_SNOWMAN_BUTTON, ACTOR_116_FP_SNOWMAN_BUTTON, ASSET_421_MODEL_FP_SNOWMAN_BUTTON,
0x1, FP_D_80391A90,
FP_func_80386CF8, actor_update_func_80326224, func_80386B80,

View File

@ -5,8 +5,8 @@
extern Actor *func_802EBAE0(UNK_TYPE(s32), f32 position[3], f32 rotation[3], f32 scale, UNK_TYPE(s32), UNK_TYPE(s32), UNK_TYPE(s32), f32, UNK_TYPE(s32));
Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE(s32) arg3);
Actor *func_8038C1F8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038C9A0(Actor *this);
Actor *chTwinkly_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chTwinkly_update(Actor *this);
/* .data */
ActorAnimationInfo D_80391F50[] = {
@ -19,27 +19,27 @@ ActorAnimationInfo D_80391F50[] = {
{0x17C, 2.0f}
};
ActorInfo D_80391F88 = { MARKER_200_TWINKLY_BLUE, ACTOR_332_TWINKLY_BLUE, ASSET_448_MODEL_TWINKLY_BLUE,
ActorInfo gChTwinklyBlue = { MARKER_200_TWINKLY_BLUE, ACTOR_332_TWINKLY_BLUE, ASSET_448_MODEL_TWINKLY_BLUE,
0x1, D_80391F50,
func_8038C9A0, actor_update_func_80326224, func_8038C1F8,
chTwinkly_update, actor_update_func_80326224, chTwinkly_draw,
0, 0, 1.0f, 0
};
ActorInfo D_80391FAC = { MARKER_201_TWINKLY_GREEN, ACTOR_333_TWINKLY_GREEN, ASSET_449_MODEL_TWINKLY_GREEN,
ActorInfo gChTwinklyGreen = { MARKER_201_TWINKLY_GREEN, ACTOR_333_TWINKLY_GREEN, ASSET_449_MODEL_TWINKLY_GREEN,
0x1, D_80391F50,
func_8038C9A0, actor_update_func_80326224, func_8038C1F8,
chTwinkly_update, actor_update_func_80326224, chTwinkly_draw,
0, 0, 1.0f, 0
};
ActorInfo D_80391FD0 = { MARKER_202_TWINKLY_ORANGE, ACTOR_334_TWINKLY_ORANGE, ASSET_44A_MODEL_TWINKLY_ORANGE,
ActorInfo gChTwinklyOrange = { MARKER_202_TWINKLY_ORANGE, ACTOR_334_TWINKLY_ORANGE, ASSET_44A_MODEL_TWINKLY_ORANGE,
0x1, D_80391F50,
func_8038C9A0, actor_update_func_80326224, func_8038C1F8,
chTwinkly_update, actor_update_func_80326224, chTwinkly_draw,
0, 0, 1.0f, 0
};
ActorInfo D_80391FF4 = { MARKER_203_TWINKLY_RED, ACTOR_335_TWINKLY_RED, ASSET_44B_MODEL_TWINKLY_RED,
ActorInfo gChTwinklyRed = { MARKER_203_TWINKLY_RED, ACTOR_335_TWINKLY_RED, ASSET_44B_MODEL_TWINKLY_RED,
0x1, D_80391F50,
func_8038C9A0, actor_update_func_80326224, func_8038C1F8,
chTwinkly_update, actor_update_func_80326224, chTwinkly_draw,
0, 0, 1.0f, 0
};
@ -82,14 +82,14 @@ Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE
}
}
Actor *func_8038C1F8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *chTwinkly_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = marker_getActor(marker);
func_8033A45C(2, this->unk38_31);
func_8033A45C(1, func_8033A0F0(2) ^ 1);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8038C260(f32 position[3], s32 count, enum asset_e model_id){
void chTwinkly_shatterEffect(f32 position[3], s32 count, enum asset_e model_id){
ParticleEmitter *pCtrl;
pCtrl = partEmitMgr_newEmitter(count);
@ -111,7 +111,7 @@ void func_8038C260(f32 position[3], s32 count, enum asset_e model_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038C398(f32 position[3], enum marker_e marker_id){
void chTwinkly_decideShatterColor(f32 position[3], enum marker_e marker_id){
enum asset_e sp1C;
switch(marker_id){
case MARKER_200_TWINKLY_BLUE:
@ -130,11 +130,11 @@ void func_8038C398(f32 position[3], enum marker_e marker_id){
sp1C = ASSET_49B_MODEL_TWINKLY_SHARD_RED;
break;
}
func_8038C260(position, 12, sp1C);
func_8038C260(position, 4, ASSET_498_MODEL_TWINKLY_SHARD_YELLOW);
chTwinkly_shatterEffect(position, 12, sp1C);
chTwinkly_shatterEffect(position, 4, ASSET_498_MODEL_TWINKLY_SHARD_YELLOW);
}
void func_8038C428(Actor *arg0, f32 arg1[3], f32 arg2)
void chTwinkly_hopToTree(Actor *arg0, f32 arg1[3], f32 arg2)
{
u8 sp7F;
s32 sp78;
@ -189,14 +189,14 @@ void func_8038C428(Actor *arg0, f32 arg1[3], f32 arg2)
arg0->velocity[0] = (f32) (var_f22 / temp_f0);
arg0->velocity[2] = (f32) (var_f24 / temp_f0);
if (sp7F) {
func_8030E878(SFX_3F2_UNKNOWN, randf2(1.2f, 1.3f), 0x7D00U, arg0->position, 1750.0f, 3500.0f);
func_8030E878(SFX_3F2_BOING, randf2(1.2f, 1.3f), 0x7D00U, arg0->position, 1750.0f, 3500.0f);
}
else {
func_8030E878(SFX_53_BANJO_HUIII, randf2(1.4f, 1.5f), 0x7D00U, arg0->position, 1750.0f, 3500.0f);
}
}
bool func_8038C718(Actor *this, f32 arg1){
bool chTwinkly_hopOutBox(Actor *this, f32 arg1){
f32 tmp;
this->position[0] += this->velocity[0];
@ -215,7 +215,7 @@ bool func_8038C718(Actor *this, f32 arg1){
return TRUE;
}
bool func_8038C844(f32 arg0[3], f32 arg1[3]){
bool func_8038C844(f32 arg0[3], f32 arg1[3]){ //connected to twinklies entering tree and interacting with munchers
if( (arg0[0] - arg1[0] < 26.0f && -26.0f < arg0[0] - arg1[0])
&& (arg0[1] - arg1[1] < 26.0f && -26.0f < arg0[1] - arg1[1])
&& (arg0[2] - arg1[2] < 26.0f && -26.0f < arg0[2] - arg1[2])
@ -225,7 +225,7 @@ bool func_8038C844(f32 arg0[3], f32 arg1[3]){
return FALSE;
}
void func_8038C8F0(ActorMarker *marker){
void chTwinkly_spawnFirstMuncher(ActorMarker *marker){
Actor *this;
Actor *muncher;
Actor *other;
@ -240,15 +240,15 @@ void func_8038C8F0(ActorMarker *marker){
if(pad);
}
void func_8038C94C(ActorMarker *caller, enum asset_e text_id, s32 arg2){
void chTwinkly_setUpMinigame(ActorMarker *caller, enum asset_e text_id, s32 arg2){
Actor *this = marker_getActor(caller);
if(!volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)){
subaddie_set_state(this, 6);
__spawnQueue_add_1((GenFunction_1)func_8038C8F0, reinterpret_cast(s32, this->marker));
__spawnQueue_add_1((GenFunction_1)chTwinkly_spawnFirstMuncher, reinterpret_cast(s32, this->marker));
}
}
void func_8038C9A0(Actor *this){
void chTwinkly_update(Actor *this){
Actor *other; //sp34
void * sp30;
@ -272,13 +272,13 @@ void func_8038C9A0(Actor *this){
this->velocity_z = 0.0f;
this->unk1C[0] = 0.0f;
anctrl_setAnimTimer(this->anctrl, 0.0f);
func_8038C428(this, D_8039207C, 0);
chTwinkly_hopToTree(this, D_8039207C, 0);
return;
}
}//L8038CA9C
if(1.0f == other->unk1C[1]){
func_8038C398(this->position, this->marker->id);
chTwinkly_decideShatterColor(this->position, this->marker->id);
sfx_playFadeShorthandDefault(SFX_7B_ICE_BREAKING_1, 1.0f, 32000, this->position, 0x6d6, 0xdac);\
marker_despawn(this->marker);
return;
@ -286,9 +286,9 @@ void func_8038C9A0(Actor *this){
switch(this->state){
case 1:// 8038CB2C
if(!func_8038C718(this, 0)){
if(!chTwinkly_hopOutBox(this, 0)){
subaddie_set_state_with_direction(this, 2, 0.001f, 1);
func_8038C428(this, D_80392088, randf2(20.0f, 24.0f));
chTwinkly_hopToTree(this, D_80392088, randf2(20.0f, 24.0f));
this->lifetime_value = this->yaw;
}
break;
@ -310,19 +310,19 @@ void func_8038C9A0(Actor *this){
this->unk38_31 = FALSE;
}
if(!func_8038C718(this, 0.0f)){
if(!chTwinkly_hopOutBox(this, 0.0f)){
if(func_8038C844(this->position, D_80392088)){
subaddie_set_state_with_direction(this, 3, 0.001f, 1);
func_8038C428(this, D_80392094, 0.0f);
chTwinkly_hopToTree(this, D_80392094, 0.0f);
}
else{
func_8038C428(this, D_80392088, randf2(20.0f, 24.0f));
chTwinkly_hopToTree(this, D_80392088, randf2(20.0f, 24.0f));
}
}
break;
case 3:// 8038CCFC
if(!func_8038C718(this, 0.0f)){
if(!chTwinkly_hopOutBox(this, 0.0f)){
if(other->unk38_31 != 0){
other->unk38_31--;
}
@ -336,11 +336,11 @@ void func_8038C9A0(Actor *this){
if(this->unk1C[1] <= this->position_y){
this->position_y = this->unk1C[1];
if(!fileProgressFlag_get(FILEPROG_82_MET_TWINKLIES)){
gcdialog_showDialog(ASSET_C12_DIALOG_TWINKLIE_MINIGAME_START, 0x2a, this->position, this->marker, func_8038C94C, NULL);
gcdialog_showDialog(ASSET_C12_DIALOG_TWINKLIE_MINIGAME_START, 0x2a, this->position, this->marker, chTwinkly_setUpMinigame, NULL);
fileProgressFlag_set(FILEPROG_82_MET_TWINKLIES, TRUE);
}
else{
gcdialog_showDialog(ASSET_C25_DIALOG_TWINKLIE_MINIGAME_RETRY, 0x2b, this->position, this->marker, func_8038C94C, NULL);
gcdialog_showDialog(ASSET_C25_DIALOG_TWINKLIE_MINIGAME_RETRY, 0x2b, this->position, this->marker, chTwinkly_setUpMinigame, NULL);
}
subaddie_set_state(this, 5);
this->pitch -= 3.0f;
@ -350,7 +350,7 @@ void func_8038C9A0(Actor *this){
case 5:// 8038CE14
this->yaw_ideal = (f32)func_80329784(this);
func_80328FB0(this, 8.0f);
if(!func_8038C718(this, this->unk1C[1])){
if(!chTwinkly_hopOutBox(this, this->unk1C[1])){
this->velocity[1] = randf2(14.0f, 20.0f);
}
break;

View File

@ -5,8 +5,8 @@
extern void func_80324CD8(f32);
extern Actor *actor_spawnWithYaw_f32(enum actor_e, f32[3], s32);
Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038D6C8(Actor *this);
Actor *chTwinklyBox_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chTwinklyBox_update(Actor *this);
/* .data */
ActorAnimationInfo D_803920C0[] ={
@ -17,14 +17,14 @@ ActorAnimationInfo D_803920C0[] ={
{0x16D, 0.8f}
};
ActorInfo D_803920E8 = { 0x204, 0x336, 0x442,
ActorInfo gChTwinklyBox = { MARKER_204_TWINKLY_BOX, ACTOR_336_TWINKLY_BOX, ASSET_442_MODEL_TWINKLY_BOX,
0x1, D_803920C0,
func_8038D6C8, actor_update_func_80326224, FP_func_8038CED0,
chTwinklyBox_update, actor_update_func_80326224, chTwinklyBox_draw,
0, 0, 0.0f, 0
};
/* .code */
Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *chTwinklyBox_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = marker_getActor(marker);
if( maSlalom_isActive() || fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME) ){
if(0.0f == this->velocity[1])
@ -33,7 +33,7 @@ Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){
void chTwinklyBox_destroyBoxShards(f32 position[3], s32 count, enum asset_e model_id){
static ParticleScaleAndLifetimeRanges D_8039210C = {
{ 0.4f, 0.8f },
{-1.0f, -1.0f },
@ -63,7 +63,7 @@ void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038D01C(f32 position[3], s32 count, enum asset_e sprite_id){
void chTwinklyBox_destroyBoxDust(f32 position[3], s32 count, enum asset_e sprite_id){
static ParticleScaleAndLifetimeRanges D_8039217C = {
{0.8f, 1.2f },
{1.4f, 2.0f },
@ -90,7 +90,7 @@ void func_8038D01C(f32 position[3], s32 count, enum asset_e sprite_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038D0A8(f32 position[3], s32 count, enum asset_e model_id){
void chTwinklyBox_openBoxShards(f32 position[3], s32 count, enum asset_e model_id){
static ParticleScaleAndLifetimeRanges D_803921F8 = {
{ 0.2f, 0.3f },
{-1.0f, -1.0f },
@ -120,7 +120,7 @@ void func_8038D0A8(f32 position[3], s32 count, enum asset_e model_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038D170(f32 position[3], s32 count, enum asset_e sprite_id){
void chTwinklyBox_openBoxSparkles(f32 position[3], s32 count, enum asset_e sprite_id){
static ParticleScaleAndLifetimeRanges D_80392268 ={
{ 0.4f, 0.6f },
{-1.0f, -1.0f },
@ -146,7 +146,7 @@ void func_8038D170(f32 position[3], s32 count, enum asset_e sprite_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038D208(f32 position[3], s32 count, enum asset_e sprite_id){
void chTwinklyBox_openBoxDust(f32 position[3], s32 count, enum asset_e sprite_id){
static ParticleScaleAndLifetimeRanges D_803922D8 = {
{0.5f, 0.7f },
{1.4f, 1.7f },
@ -171,27 +171,27 @@ void func_8038D208(f32 position[3], s32 count, enum asset_e sprite_id){
particleEmitter_emitN(pCtrl, count);
}
void func_8038D294(ActorMarker *marker){
void chTwinklyBox_destroyBox(ActorMarker *marker){
Actor *this = marker_getActor(marker);
func_8038CF54(this->position, 12, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
func_8038D01C(this->position, 12, ASSET_700_SPRITE_DUST);
chTwinklyBox_destroyBoxShards(this->position, 12, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
chTwinklyBox_destroyBoxDust(this->position, 12, ASSET_700_SPRITE_DUST);
this->velocity[1] = 0.0f;
sfx_playFadeShorthandDefault(SFX_30_MAGIC_POOF, 1.0f, 32000, this->position, 1000, 3500);
gcdialog_showDialog(ASSET_C13_DIALOG_TWINKLIE_MINIGAME_COMPLETE, 0, NULL, NULL, NULL, NULL);
}
void func_8038D324(Actor *this){
void chTwinklyBox_openBox(Actor *this){
int i;
func_8038D0A8(this->position, 24, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
chTwinklyBox_openBoxShards(this->position, 24, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD);
for(i = 0; i < 24; i++){
func_8038D170(this->position, 1, ASSET_710_SPRITE_SPARKLE_PURPLE + randi2(0, 10));
chTwinklyBox_openBoxSparkles(this->position, 1, ASSET_710_SPRITE_SPARKLE_PURPLE + randi2(0, 10));
}
func_8038D208(this->position, 8, ASSET_700_SPRITE_DUST);
chTwinklyBox_openBoxDust(this->position, 8, ASSET_700_SPRITE_DUST);
FUNC_8030E624(SFX_30_MAGIC_POOF, 1.0f, 32000);
}
void func_8038D3B0(Actor *arg0){
void chTwinklyBox_free(Actor *arg0){
item_set(ITEM_6_HOURGLASS, FALSE);
}
@ -202,7 +202,7 @@ void func_8038D3D8(void){
core1_ce60_incOrDecCounter(TRUE);
}
void func_8038D41C(ActorMarker *marker){
void chTwinklyBox_spawnSecondAndThirdMuncher(ActorMarker *marker){
static f32 D_80392354[3] = {-4165.0f, 73.0f, 4483.0f};
static f32 D_80392360[3] = {-4292.0f, 73.0f, 5054.0f};
s32 pad[2];
@ -216,7 +216,7 @@ void func_8038D41C(ActorMarker *marker){
if(pad[0]);
}
void func_8038D474(ActorMarker *marker){
void chTwinklyBox_spawnTwinkly(ActorMarker *marker){
static enum actor_e D_8039236C[4] = {
ACTOR_332_TWINKLY_BLUE,
ACTOR_333_TWINKLY_GREEN,
@ -236,21 +236,21 @@ void func_8038D474(ActorMarker *marker){
child->partnerActor = actor->marker;
}
void func_8038D51C(ActorMarker *marker){
void chTwinklyBox_completeMinigame(ActorMarker *marker){
Actor *this = marker_getActor(marker);
item_set(ITEM_6_HOURGLASS, FALSE);
fileProgressFlag_set(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME, TRUE);
FUNC_8030E624(SFX_416, 0.8f, 32000);
FUNC_8030E624(SFX_416_ELECTRIC_ZAP, 0.8f, 32000);
func_8028F8F8(7, 0);
this->unk1C[1] = 1.0f;
timed_exitStaticCamera(1.7f);
func_80324E38(1.7f, 0);
timedFunc_set_1(2.3f, (GenFunction_1)func_8038D294, (s32)this->marker);
timedFunc_set_1(2.3f, (GenFunction_1)chTwinklyBox_destroyBox, (s32)this->marker);
this->velocity[1] = 1.0f;
}
void func_8038D5C8(ActorMarker *this_marker, ActorMarker *other_marker){
void chTwinklyBox_activateBox(ActorMarker *this_marker, ActorMarker *other_marker){
static f32 D_8039237C[3] = {-3940.0f, 69.0f, 3570.0f};
Actor *this = marker_getActor(this_marker);
@ -274,12 +274,12 @@ void func_8038D5C8(ActorMarker *this_marker, ActorMarker *other_marker){
}//L8038D6B8
}
void func_8038D6C8(Actor *this){
void chTwinklyBox_update(Actor *this){
f32 sp24;
bool sp20;
sp24 = time_getDelta();
mapSpecificFlags_set(0xd, BOOL(this->state != 1 && this->state != 2));
mapSpecificFlags_set(FP_SPECIFIC_FLAG_D_UNKNOWN, BOOL(this->state != 1 && this->state != 2));
if(maSlalom_isActive() || fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
this->marker->propPtr->unk8_3 = FALSE;
@ -294,8 +294,8 @@ void func_8038D6C8(Actor *this){
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setFreeMethod(this->marker, func_8038D3B0);
marker_setCollisionScripts(this->marker, NULL, func_8038D5C8, NULL);
marker_setFreeMethod(this->marker, chTwinklyBox_free);
marker_setCollisionScripts(this->marker, NULL, chTwinklyBox_activateBox, NULL);
this->unk38_31 = 0;
this->unk1C[1] = 0.0f;
this->velocity[0] = 0.0f;
@ -315,7 +315,7 @@ void func_8038D6C8(Actor *this){
switch (this->state)
{
case 1: //L8038D89C
case 1: //L8038D89C, before standing nearby box
if(!subaddie_playerIsWithinSphereAndActive(this, 800))
break;
@ -329,7 +329,7 @@ void func_8038D6C8(Actor *this){
break;
case 2: //L8038D91C
case 2: //L8038D91C, shaking before getting hit open
sp20 = anctrl_isPlayedForwards(this->anctrl);
anctrl_setDuration(this->anctrl, this->velocity[2]);
if( ( sp20 == TRUE && actor_animationIsAt(this, 0.999f) )
@ -350,12 +350,12 @@ void func_8038D6C8(Actor *this){
}
break;
case 3: //L8038DA24
case 3: //L8038DA24, after hitting box
if(actor_animationIsAt(this, 0.3f))
func_8038D324(this);
chTwinklyBox_openBox(this);
if(actor_animationIsAt(this, 0.999f))
__spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1)chTwinklyBox_spawnTwinkly, (s32)this->marker);
if(this->velocity[0] != 0.0f)
break;
@ -368,13 +368,13 @@ void func_8038D6C8(Actor *this){
item_set(ITEM_6_HOURGLASS, TRUE);
this->unk38_31 = 0xA;
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
__spawnQueue_add_1((GenFunction_1)func_8038D41C, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1)chTwinklyBox_spawnSecondAndThirdMuncher, (s32)this->marker);
this->lifetime_value = 0.0f;
func_80347A14(0);
func_802FAD64(ITEM_14_HEALTH);
break;
case 4: //L8038DB18
case 4: //L8038DB18, winning or losing minigame
this->unk1C[2] += (sp24*-195238.0f)/80.0f;
if(this->unk1C[2] < 233333.0f)
this->unk1C[2] = 233333.0f;
@ -385,7 +385,7 @@ void func_8038D6C8(Actor *this){
coMusicPlayer_playMusic(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
func_8038D3D8();
func_80324E38(0.0f, 3);
timedFunc_set_1(1.3f, (GenFunction_1)func_8038D51C, (s32)this->marker);
timedFunc_set_1(1.3f, (GenFunction_1)chTwinklyBox_completeMinigame, (s32)this->marker);
timed_setStaticCameraToNode(0.9f, 0xC);
item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31);
func_80347A14(1);
@ -408,7 +408,7 @@ void func_8038D6C8(Actor *this){
if(0.96 < anctrl_getAnimTimer(this->anctrl)){
if(this->lifetime_value <= 0.0){
__spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker);
__spawnQueue_add_1((GenFunction_1)chTwinklyBox_spawnTwinkly, (s32)this->marker);
this->lifetime_value = 2.9f;
}
else{
@ -421,10 +421,10 @@ void func_8038D6C8(Actor *this){
}
bool func_8038DD14(void){
return mapSpecificFlags_get(0xD);
return mapSpecificFlags_get(FP_SPECIFIC_FLAG_D_UNKNOWN);
}
bool func_8038DD34(ActorMarker *marker){
bool preventSnowmanAttack(ActorMarker *marker){
Actor *this = marker_getActor(marker);
if(subaddie_playerIsWithinSphereAndActive(this, 800))
return TRUE;

View File

@ -4,8 +4,8 @@
extern ActorProp *func_80320EB0(ActorMarker *, f32, s32);
Actor *func_8038DD70(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038E094(Actor *this);
Actor *chTwinklyMuncher_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chTwinklyMuncher_update(Actor *this);
/* .data */
extern ActorAnimationInfo D_80392390[] ={
@ -19,46 +19,46 @@ extern ActorAnimationInfo D_80392390[] ={
{ASSET_1AF_ANIM_TWINKLY_MUNCHER_APPEAR, 0.667f}
};
extern ActorInfo D_803923D0 = { MARKER_205_TWINKLY_MUNCHER, ACTOR_337_TWINKLY_MUNCHER, ASSET_496_MODEL_TWINKLY_MUNCHER,
extern ActorInfo gChTwinklyMuncher = { MARKER_205_TWINKLY_MUNCHER, ACTOR_337_TWINKLY_MUNCHER, ASSET_496_MODEL_TWINKLY_MUNCHER,
0x1, D_80392390,
func_8038E094, actor_update_func_80326224, func_8038DD70,
chTwinklyMuncher_update, actor_update_func_80326224, chTwinklyMuncher_draw,
2500, 0, 1.0f, 0
};
/* .code */
Actor *func_8038DD70(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *chTwinklyMuncher_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = marker_getActor(marker);
if(this->state == 1)
return this;
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8038DDC8(Actor *this){
void chTwinklyMuncher_setSpawnState(Actor *this){
actor_collisionOn(this);
subaddie_set_state_with_direction(this, 2, 0.03f, 1);
actor_playAnimationOnce(this);
}
void func_8038DE08(Actor *this){
void chTwinklyMuncher_setPostFirstAttackState(Actor *this){
subaddie_set_state_with_direction(this, 3, 0.03f, 1);
actor_loopAnimation(this);
}
void func_8038DE40(Actor *this){
void chTwinklyMuncher_setFirstAttackState(Actor *this){
subaddie_set_state_with_direction(this, 4, 0.03f, 1);
actor_playAnimationOnce(this);
}
void func_8038DE78(Actor *this){
void chTwinklyMuncher_setDespawnState(Actor *this){
actor_collisionOff(this);
subaddie_set_state_with_direction(this, 5, 0.03f, 1);
actor_playAnimationOnce(this);
}
void func_8038DEB8(ActorMarker *this_marker, ActorMarker *other_marker){
void chTwinklyMuncher_hit(ActorMarker *this_marker, ActorMarker *other_marker){
Actor *this = marker_getActor(this_marker);
if(this->state != 1 && this->state != 5){
func_8038DE78(this);
chTwinklyMuncher_setDespawnState(this);
sfx_playFadeShorthandDefault(SFX_87_TANKTUP_OOOHW, 1.6f, 32000, this->position, 1250, 2500);
sfx_playFadeShorthandDefault(SFX_1D_HITTING_AN_ENEMY_1, 1.0f, 26000, this->position, 1250, 2500);
}
@ -90,30 +90,30 @@ Actor *func_8038DF34(Actor *this){
return NULL;
}
void func_8038E040(ActorMarker *caller, enum asset_e text_id, s32 arg2){
void chTwinklyMuncher_failMinigameExit(ActorMarker *caller, enum asset_e text_id, s32 arg2){
Actor *this = marker_getActor(caller);
timed_exitStaticCamera(0.5f);
subaddie_set_state_with_direction(this, 7, 0.03f, 1);
actor_playAnimationOnce(this);
}
void func_8038E094(Actor *this){
void chTwinklyMuncher_update(Actor *this){
s32 sp3C;
Actor *sp38;
f32 sp34 = time_getDelta();
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setCollisionScripts(this->marker, NULL, func_8038DEB8, NULL);
marker_setCollisionScripts(this->marker, NULL, chTwinklyMuncher_hit, NULL);
this->marker->propPtr->unk8_3 = TRUE;
anctrl_setAnimTimer(this->anctrl, 0.99999f);
this->lifetime_value = 0.0f;
if(this->actorTypeSpecificField == 1){
func_8038DDC8(this);
chTwinklyMuncher_setSpawnState(this);
}
if(this->actorTypeSpecificField == 2){
if(volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) && gcparade_8031B4F4() == -2){
func_8038DDC8(this);
chTwinklyMuncher_setSpawnState(this);
}
else{
marker_despawn(this->marker);
@ -127,7 +127,7 @@ void func_8038E094(Actor *this){
if(this->actorTypeSpecificField == 1 && !fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){
timed_setStaticCameraToNode(0.5f, 0xd);
gcdialog_showDialog(ASSET_C15_DIALOG_TWINKLIE_MINIGAME_MISS, 0x2b, this->position, this->marker, func_8038E040, NULL);
gcdialog_showDialog(ASSET_C15_DIALOG_TWINKLIE_MINIGAME_MISS, 0x2b, this->position, this->marker, chTwinklyMuncher_failMinigameExit, NULL);
this->velocity[0] = 1.0f;
subaddie_set_state_with_direction(this, 6, 0.03f, 1);
actor_loopAnimation(this);
@ -138,7 +138,7 @@ void func_8038E094(Actor *this){
marker_despawn(this->marker);
}
else if( this->state != 1 && this->state != 5){
func_8038DE78(this);
chTwinklyMuncher_setDespawnState(this);
}
}
}
@ -155,7 +155,7 @@ void func_8038E094(Actor *this){
if(10.0 <= this->lifetime_value || randf() < this->lifetime_value/10.0){
if(!func_8038DF34(this)){
this->lifetime_value = 0.0f;
func_8038DDC8(this);
chTwinklyMuncher_setSpawnState(this);
break;
}
}
@ -167,7 +167,7 @@ void func_8038E094(Actor *this){
this->marker->propPtr->unk8_3 = TRUE;
sp38 = func_8038DF34(this);
if(sp38){
func_8038DE40(this);
chTwinklyMuncher_setFirstAttackState(this);
this->unk38_31 = sp38->marker->id;
break;
}
@ -179,14 +179,14 @@ void func_8038E094(Actor *this){
sfx_playFadeShorthandDefault(SFX_C4_TWINKLY_MUNCHER_GRR, 1.2f, 32000, this->position, 1250, 2500);
if(actor_animationIsAt(this, 0.97f))
func_8038DE08(this);
chTwinklyMuncher_setPostFirstAttackState(this);
break;
case 3: //L8038E498
this->marker->propPtr->unk8_3 = TRUE;
sp38 = func_8038DF34(this);
if(sp38){
func_8038DE40(this);
chTwinklyMuncher_setFirstAttackState(this);
this->unk38_31 = sp38->marker->id;
}
break;
@ -196,18 +196,18 @@ void func_8038E094(Actor *this){
sp38 = func_8038DF34(this);
if(sp38 && sp38->marker->id == this->unk38_31){
if(actor_animationIsAt(this, 0.23)){
func_8038C398(sp38->position, sp38->marker->id);
chTwinkly_decideShatterColor(sp38->position, sp38->marker->id);
sfx_playFadeShorthandDefault(SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250, 2500);
sfx_playFadeShorthandDefault(SFX_27_JINJO_HI, 1.6f, 32000, this->position, 1250, 2500);
func_80324D54(0.35f, SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250.0f, 2500.0f);
marker_despawn(sp38->marker);
if( !mapSpecificFlags_get(0xa) && gcdialog_showDialog(0xc16, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(0xa, TRUE);
if( !mapSpecificFlags_get(FP_SPECIFIC_FLAG_A_FIRST_TWINKLY_EATEN) && gcdialog_showDialog(ASSET_C16_DIALOG_TWINKLIE_MINIGAME_EATEN, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(FP_SPECIFIC_FLAG_A_FIRST_TWINKLY_EATEN, TRUE);
}
}
}//L8038E620
if(actor_animationIsAt(this, 0.97f)){
func_8038DE08(this);
chTwinklyMuncher_setPostFirstAttackState(this);
}
break;

View File

@ -30,7 +30,7 @@ ActorAnimationInfo D_80392520[] ={
{0x1AE, 0.55f}
};
ActorInfo D_80392588 = { MARKER_20B_WOZZA, ACTOR_1F3_WOZZA, ASSET_494_MODEL_WOZZA,
ActorInfo gChWozza = { MARKER_20B_WOZZA, ACTOR_1F3_WOZZA, ASSET_494_MODEL_WOZZA,
0x1, D_80392520,
FP_func_8038F7AC, actor_update_func_80326224, func_8038F210,
0, 0, 1.6f, 0
@ -136,7 +136,7 @@ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){
this->yaw_ideal = (f32) func_803297C8(this, arg1);
func_80328FB0(this, arg3);
if(actor_animationIsAt(this, 0.9f)){
sfx_playFadeShorthandDefault(SFX_3F2_UNKNOWN, 0.8f, 24000, this->position, 500, 2000);
sfx_playFadeShorthandDefault(SFX_3F2_BOING, 0.8f, 24000, this->position, 500, 2000);
}
this->actor_specific_1_f = (1.0f- sp24)*arg2;
func_80329054(this, 2);

View File

@ -22,7 +22,7 @@ ActorAnimationInfo D_803925C0[] = {
{0x1AE, 0.55f}
};
ActorInfo D_80392628 = { MARKER_20C_WOZZAS_JIGGY, ACTOR_1F4_WOZZAS_JIGGY, ASSET_495_MODEL_WOZZAS_JIGGY,
ActorInfo gWozzaJiggy = { MARKER_20C_WOZZAS_JIGGY, ACTOR_1F4_WOZZAS_JIGGY, ASSET_495_MODEL_WOZZAS_JIGGY,
0x1, D_803925C0,
func_8038FF54, actor_update_func_80326224, func_8038FF00,
0, 0, 0.0f, 0

View File

@ -22,7 +22,7 @@ Actor *chXmasTree_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
return actor_draw(marker, gfx, mtx, vtx);
}
void __chXmasTree_free(Actor *this){
void chXmasTree_free(Actor *this){
u8 tmp_a0;
item_set(ITEM_6_HOURGLASS, FALSE);
@ -33,30 +33,29 @@ void __chXmasTree_free(Actor *this){
}
}
void __chXmasTree_80386EF4(Actor *this, int arg1){
void chXmasTree_setState(Actor *this, int arg1){
this->unk38_31 = arg1;
mapSpecificFlags_set(0, this->unk38_31);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON, this->unk38_31);
}
void __chXmasTree_80386F3C(void){
levelSpecificFlags_set(LEVEL_FLAG_29_FP_UNKNOWN, TRUE);
func_803228D8();
void chXmasTree_swapCameraToIce(void){
levelSpecificFlags_set(LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE, TRUE);
musicKeepsPlaying();
volatileFlag_set(VOLATILE_FLAG_E, 1);
transitionToMap(MAP_53_FP_CHRISTMAS_TREE, 1, 0);
}
void __chXmasTree_80386F84(Actor * this){
void chXmasTree_setLightsOn(Actor * this){
subaddie_set_state(this, 2);
__chXmasTree_80386EF4(this, 0);
chXmasTree_setState(this, 0);
}
void __chXmasTree_spawnSwitch(void){
void chXmasTree_spawnSwitch(void){
static s32 chXmasTree_switch_spawn_position[3] = {-0x1220, 0x6A, 0x1945};
actor_spawnWithYaw_s32(ACTOR_338_XMAS_TREE_SWITCH, chXmasTree_switch_spawn_position, 350);
}
void __chXmasTree_spawnStar(void *marker){
void chXmasTree_spawnStar(void *marker){
Actor *this = marker_getActor(reinterpret_cast(ActorMarker *, marker));
Actor *child = spawn_child_actor(0x339, &this);
s32 pad;
@ -65,22 +64,22 @@ void __chXmasTree_spawnStar(void *marker){
child->position_z += 25.0f;
}
void __chXmasTree_80387038(Actor *this){
void chXmasTree_lightsDeactivatedSounds(Actor *this){
if(func_8030E3FC(this->unk44_31))
sfxSource_triggerCallbackByIndex(this->unk44_31);
sfxsource_playSfxAtVolume(this->unk44_31, randf2(0.9f, 1.1f));
sfxSource_func_8030E2C4(this->unk44_31);
}
void __chXmasTree_8038709C(Actor *this){
void chXmasTree_setLightsOff(Actor *this){
if(this->state == 5){
if(!mapSpecificFlags_get(0))
__chXmasTree_80387038(this);
if(!mapSpecificFlags_get(FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON))
chXmasTree_lightsDeactivatedSounds(this);
return;
}
if(mapSpecificFlags_get(0) && !func_8030E3FC(this->unk44_31))
__chXmasTree_80387038(this);
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON) && !func_8030E3FC(this->unk44_31))
chXmasTree_lightsDeactivatedSounds(this);
}
void chXmasTree_update(Actor *this){
@ -91,38 +90,38 @@ void chXmasTree_update(Actor *this){
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE;
this->marker->collidable = FALSE;
marker_setFreeMethod(this->marker, __chXmasTree_free);
marker_setFreeMethod(this->marker, chXmasTree_free);
if(this->unk44_31 == 0){
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
sfxsource_setSfxId(this->unk44_31, SFX_415_UNKNOWN);
sfxsource_setSfxId(this->unk44_31, SFX_415_XMAS_LIGHTS_FLICKERING);
sfxSource_setunk43_7ByIndex(this->unk44_31, 3);
sfxsource_setSampleRate(this->unk44_31, 28000);
}
__spawnQueue_add_0(__chXmasTree_spawnSwitch);
__spawnQueue_add_1((GenFunction_1)__chXmasTree_spawnStar, reinterpret_cast(s32, this->marker));
__spawnQueue_add_0(chXmasTree_spawnSwitch);
__spawnQueue_add_1((GenFunction_1)chXmasTree_spawnStar, reinterpret_cast(s32, this->marker));
if(fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
__chXmasTree_80386F84(this);
mapSpecificFlags_set(2, FALSE);
chXmasTree_setLightsOn(this);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH, FALSE);
}
}
this->depth_mode = 1;
if (jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(LEVEL_FLAG_29_FP_UNKNOWN)) {
__chXmasTree_80386EF4(this, 1);
if (jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE)) {
chXmasTree_setState(this, 1);
return;
}
switch(this->state){
case 1: // L80387268
__chXmasTree_80386EF4(this, 0);
chXmasTree_setState(this, 0);
if(fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
__chXmasTree_80386F84(this);
chXmasTree_setLightsOn(this);
}
break;
case 2: // L80387294
if(!mapSpecificFlags_get(2)) break;
if(!mapSpecificFlags_get(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH)) break;
subaddie_set_state(this, 3);
this->lifetime_value = 2.0f;
@ -134,15 +133,15 @@ void chXmasTree_update(Actor *this){
case 3: // L803872F0
if(0.0 <= this->lifetime_value){
if( 1.8 < this->lifetime_value){
__chXmasTree_80386EF4(this, 0);
chXmasTree_setState(this, 0);
}
else if(this->lifetime_value < 0.2){//L80387340
__chXmasTree_80386EF4(this, 1);
chXmasTree_setState(this, 1);
}
else{
if(randf() < 0.2){
__chXmasTree_80386EF4(this, this->unk38_31 ^ 1);
__chXmasTree_8038709C(this);
chXmasTree_setState(this, this->unk38_31 ^ 1);
chXmasTree_setLightsOff(this);
}
}//L803873AC
this->lifetime_value -= sp2C;
@ -150,7 +149,7 @@ void chXmasTree_update(Actor *this){
else{//L803873BC
if(func_802BB270()){
subaddie_set_state(this, 4);
__chXmasTree_80386EF4(this, 1);
chXmasTree_setState(this, 1);
item_set(ITEM_0_HOURGLASS_TIMER, 3600 - 1);
item_set(ITEM_6_HOURGLASS, TRUE);
@ -159,9 +158,9 @@ void chXmasTree_update(Actor *this){
break;
case 4: // L80387400
if(mapSpecificFlags_get(3)){
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_3_XMAS_TREE_STAR_COMPLETE)){
subaddie_set_state(this, 6);
__chXmasTree_80386EF4(this, 1);
chXmasTree_setState(this, 1);
item_set(ITEM_6_HOURGLASS, FALSE);
tmp_a0 = this->unk44_31;
if(tmp_a0){
@ -169,12 +168,12 @@ void chXmasTree_update(Actor *this){
this->unk44_31 = 0;
}
func_80324E38(0.0f, 3);
timedFunc_set_0(0.5f, __chXmasTree_80386F3C);
timedFunc_set_0(0.5f, chXmasTree_swapCameraToIce);
}
else{//L80387470
if(item_empty(ITEM_6_HOURGLASS)){
subaddie_set_state(this, 5);
mapSpecificFlags_set(2, FALSE);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH, FALSE);
this->lifetime_value = 0.1f;
if(!maSlalom_isActive()){
if(!mapSpecificFlags_get(9) || mapSpecificFlags_get(1)){
@ -190,21 +189,21 @@ void chXmasTree_update(Actor *this){
case 5: // L803874EC
if(0.0 <= this->lifetime_value){
if( 1.8 < this->lifetime_value){
__chXmasTree_80386EF4(this, 1);
chXmasTree_setState(this, 1);
}
else if(this->lifetime_value < 0.2){
__chXmasTree_80386EF4(this, 0);
chXmasTree_setState(this, 0);
}
else{
if(randf() < 0.2){
__chXmasTree_80386EF4(this, this->unk38_31 ^ 1);
__chXmasTree_8038709C(this);
chXmasTree_setState(this, this->unk38_31 ^ 1);
chXmasTree_setLightsOff(this);
}
}
this->lifetime_value -= sp2C;
}
else{
__chXmasTree_80386F84(this);
chXmasTree_setLightsOn(this);
}
break;
}

View File

@ -2,25 +2,25 @@
#include "functions.h"
#include "variables.h"
Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_80390BDC(Actor *this);
Actor *chXmasTreeIce_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chXmasTreeIce_update(Actor *this);
/* .data */
ActorInfo D_80392730 = { 0x210, 0x340, 0x4D2,
ActorInfo gXmasTreeIce = { MARKER_210_XMAS_TREE_ICE, ACTOR_340_XMAS_TREE_ICE, ASSET_4D2_MODEL_XMAS_TREE_ICE,
0x0, NULL,
func_80390BDC, actor_update_func_80326224, func_803908F0,
chXmasTreeIce_update, actor_update_func_80326224, chXmasTreeIce_draw,
0, 0, 1.0f, 0
};
/* .code */
Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *chXmasTreeIce_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *this = marker_getActor(marker);
if(this->unk38_31 != 0) return this;
return actor_draw(marker, gfx, mtx, vtx);
}
void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){
void chXmasTreeIce_shatterEffect(f32 position[3], s32 cnt, enum asset_e model_id){
static ParticleScaleAndLifetimeRanges D_80392754 = {{0.2f, 0.4f}, {-1.0f, -1.0f}, {0.0f, 0.02f}, {2.2f, 2.2f}, 0.0f, 0.3f};
static ParticleSettingsVelocityAccelerationPosition D_8039277C = {
{{-300.0f, 350.0f, -300.0f}, {300.0f, 600.0f, 300.0f}}, /*position*/
@ -43,7 +43,7 @@ void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){
particleEmitter_emitN(pCtrl, cnt);
}
void func_80390A30(f32 position[3], s32 cnt, enum asset_e sprite_id){
void chXmasTreeIce_emitDust(f32 position[3], s32 cnt, enum asset_e sprite_id){
static ParticleScaleAndLifetimeRanges D_803927C4 = {{0.6f, 0.8f}, {1.0f, 1.4f}, {0.0f, 0.01f}, {1.2f, 1.8f}, 0.0f, 0.01f};
static ParticleSettingsVelocityAccelerationPosition D_803927EC = {
{{-200.0f, 0.0f, -200.0f}, {200.0f, 200.0f, 200.0f}}, /*position*/
@ -60,30 +60,30 @@ void func_80390A30(f32 position[3], s32 cnt, enum asset_e sprite_id){
particleEmitter_emitN(pCtrl, cnt);
}
void func_80390ABC(ActorMarker *marker){
void chXmasTreeIce_shatterIce(ActorMarker *marker){
Actor *this = marker_getActor(marker);
func_80390944(this->position, 0xA, 0x4D3);
func_80390A30(this->position, 6, ASSET_700_SPRITE_DUST);
chXmasTreeIce_shatterEffect(this->position, 0xA, ASSET_4D4_MODEL_XMAS_ICE_FRAGMENT);
chXmasTreeIce_emitDust(this->position, 6, ASSET_700_SPRITE_DUST);
func_8030E6D4(SFX_B6_GLASS_BREAKING_1);
coMusicPlayer_playMusic(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000);
this->unk38_31 = 1;
}
void func_80390B2C(ActorMarker *marker){
void chXmasTreeIce_returnCameraToBanjo(ActorMarker *marker){
Actor *this = marker_getActor(marker);
func_803228D8();
musicKeepsPlaying();
transitionToMap(MAP_27_FP_FREEZEEZY_PEAK, 0xd, 0);
marker_despawn(this->marker);
}
void func_80390B70(Actor *this){
void chXmasTreeIce_initiateShatter(Actor *this){
func_80324E38(0.0f, 3);
timed_setStaticCameraToNode(0.0f, 0);
timedFunc_set_1(0.6f, (GenFunction_1)func_80390ABC, reinterpret_cast(s32, this->marker));
timedFunc_set_1(2.5f, (GenFunction_1)func_80390B2C, reinterpret_cast(s32, this->marker));
timedFunc_set_1(0.6f, (GenFunction_1)chXmasTreeIce_shatterIce, reinterpret_cast(s32, this->marker));
timedFunc_set_1(2.5f, (GenFunction_1)chXmasTreeIce_returnCameraToBanjo, reinterpret_cast(s32, this->marker));
}
void func_80390BDC(Actor *this) {
void chXmasTreeIce_update(Actor *this) {
this->marker->propPtr->unk8_3 = TRUE;
actor_collisionOff(this);
@ -93,8 +93,8 @@ void func_80390BDC(Actor *this) {
if (jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE)) {
marker_despawn(this->marker);
}
else if (levelSpecificFlags_get(LEVEL_FLAG_29_FP_UNKNOWN)) {
func_80390B70(this);
else if (levelSpecificFlags_get(LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE)) {
chXmasTreeIce_initiateShatter(this);
}
}
}

View File

@ -11,13 +11,13 @@ typedef struct {
u8 unk1B;
} ActorLocal_FP_87E0;
Actor *func_8038EBD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038ECD8(Actor *this);
Actor *chXmasTreeStar_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chXmasTreeStar_update(Actor *this);
/* .data */
ActorInfo D_80392470 = { 0x207, 0x339, 0x426,
ActorInfo gXmasTreeStar = { MARKER_207_XMAS_TREE_STAR, ACTOR_339_XMAS_TREE_STAR, ASSET_426_MODEL_XMAS_TREE_STAR,
0x1, NULL,
func_8038ECD8, actor_update_func_80326224, func_8038EBD0,
chXmasTreeStar_update, actor_update_func_80326224, chXmasTreeStar_draw,
0, 0, 0.0f, 0
};
@ -25,19 +25,19 @@ ActorInfo D_80392470 = { 0x207, 0x339, 0x426,
f32 D_803935D0[3];
/* .code */
Actor *func_8038EBD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C( 2, mapSpecificFlags_get(0));
func_8033A45C( 1, mapSpecificFlags_get(0) ^ 1);
Actor *chXmasTreeStar_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C( 2, mapSpecificFlags_get(FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON));
func_8033A45C( 1, mapSpecificFlags_get(FP_SPECIFIC_FLAG_0_XMAS_TREE_LIGHTS_ON) ^ 1);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8038EC34(ActorMarker *this_marker, ActorMarker *other_marker){
void chXmasTreeStar_hitCollision(ActorMarker *this_marker, ActorMarker *other_marker){
Actor *this = marker_getActor(this_marker);
ActorLocal_FP_87E0 *local = (ActorLocal_FP_87E0 *)&this->local;
local->unk1B = TRUE;
}
void func_8038EC5C(Actor *this){
void chXmasTreeStar_successfulStarPass(Actor *this){
if(0.0f == this->lifetime_value){
this->unk38_31++;
this->lifetime_value = 0.33f;
@ -48,7 +48,7 @@ void func_8038EC5C(Actor *this){
}
}
void func_8038ECD8(Actor *this){
void chXmasTreeStar_update(Actor *this){
ActorLocal_FP_87E0 *local = (ActorLocal_FP_87E0 *)&this->local;
f32 sp68[3];
s32 sp64;
@ -65,7 +65,7 @@ void func_8038ECD8(Actor *this){
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
marker_setCollisionScripts(this->marker, NULL, func_8038EC34, NULL);
marker_setCollisionScripts(this->marker, NULL, chXmasTreeStar_hitCollision, NULL);
this->marker->propPtr->unk8_3 = TRUE;
player_getPosition(D_803935D0);
local->unk1B = 0;
@ -101,8 +101,8 @@ void func_8038ECD8(Actor *this){
switch(this->state){
case 1: //L8038EF10
this->marker->collidable = FALSE;
if(!mapSpecificFlags_get(2)) break;
if(mapSpecificFlags_get(3)) break;
if(!mapSpecificFlags_get(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH)) break;
if(mapSpecificFlags_get(FP_SPECIFIC_FLAG_3_XMAS_TREE_STAR_COMPLETE)) break;
subaddie_set_state(this, 2);
this->unk38_31 = 0;
@ -123,21 +123,21 @@ void func_8038ECD8(Actor *this){
if(sp64 == (local->unk18 ^ 1)){
local->unk19 = TRUE;
if(local->unk1B){
func_8038EC5C(this);
chXmasTreeStar_successfulStarPass(this);
}
else{
player_getPosition(sp68);
sp3C = func_80320B98(D_803935D0, sp68, sp30, 0);
if(sp3C){
if(*(s32 *)(sp3C + 8) << 9 < 0)
func_8038EC5C(this);
chXmasTreeStar_successfulStarPass(this);
}
}
}//L8038F090
if(!(this->unk38_31 < 3)){
subaddie_set_state(this, 1);
mapSpecificFlags_set(3, 1);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_3_XMAS_TREE_STAR_COMPLETE, 1);
}
}
break;

View File

@ -2,8 +2,8 @@
#include "functions.h"
#include "variables.h"
Actor *func_8038E720(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8038E940(Actor *this);
Actor *chXmasTreeSwitch_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void chXmasTreeSwitch_update(Actor *this);
/* .data */
ActorAnimationInfo D_80392400[] = {
@ -13,28 +13,28 @@ ActorAnimationInfo D_80392400[] = {
{0x143, 1.0f},
};
ActorInfo D_80392420 = { 0x206, 0x338, 0x486,
ActorInfo gXmasTreeSwitch = { MARKER_206_XMAS_TREE_SWITCH, ACTOR_338_XMAS_TREE_SWITCH, ASSET_486_MODEL_XMAS_TREE_SWITCH,
0x1, D_80392400,
func_8038E940, actor_update_func_80326224, func_8038E720,
chXmasTreeSwitch_update, actor_update_func_80326224, chXmasTreeSwitch_draw,
4500, 0, 0.0f, 0
};
/* .code */
Actor *func_8038E720(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
Actor *chXmasTreeSwitch_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8033A45C(1, 0);
func_8033A45C(2, 1);
return actor_draw(marker, gfx, mtx, vtx);
}
void func_8038E774(Actor *this){
void chXmasTreeSwitch_moveSwitch(Actor *this){
subaddie_set_state_with_direction(this, 2, 0.05f, 1);
actor_playAnimationOnce(this);
this->marker->collidable = TRUE;
this->unk38_31 = 0;
}
void func_8038E7CC(ActorMarker *this_marker, ActorMarker *other_marker){
void chXmasTreeSwitch_hitSwitch(ActorMarker *this_marker, ActorMarker *other_marker){
Actor *this = marker_getActor(this_marker);
if(this->state == 2){
@ -45,7 +45,7 @@ void func_8038E7CC(ActorMarker *this_marker, ActorMarker *other_marker){
}
}
void func_8038E840(f32 position[3], s32 cnt, enum asset_e sprite_id){
void chXmasTreeSwitch_emitSparkles(f32 position[3], s32 cnt, enum asset_e sprite_id){
static ParticleScaleAndLifetimeRanges D_80392444 = {{0.4f, 0.6f}, {0.8f, 1.8f}, {0.0f, 0.01f}, {0.5f, 1.4f}, 0.0f, 0.01f};
ParticleEmitter *pCtrl = partEmitMgr_newEmitter(cnt);
particleEmitter_setSprite(pCtrl, sprite_id);
@ -66,8 +66,8 @@ void func_8038E840(f32 position[3], s32 cnt, enum asset_e sprite_id){
particleEmitter_emitN(pCtrl, cnt);
}
void func_8038E940(Actor *this){
if (jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(LEVEL_FLAG_29_FP_UNKNOWN)) {
void chXmasTreeSwitch_update(Actor *this){
if (jiggyscore_isCollected(JIGGY_2F_FP_XMAS_TREE) || levelSpecificFlags_get(LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE)) {
this->marker->propPtr->unk8_3 = TRUE;
this->marker->collidable = FALSE;
subaddie_set_state_with_direction(this, 3, 0.95f, 0);
@ -78,7 +78,7 @@ void func_8038E940(Actor *this){
this->volatile_initialized = TRUE;
this->marker->propPtr->unk8_3 = TRUE;
this->marker->collidable = FALSE;
marker_setCollisionScripts(this->marker, NULL, func_8038E7CC, NULL);
marker_setCollisionScripts(this->marker, NULL, chXmasTreeSwitch_hitSwitch, NULL);
subaddie_set_state_with_direction(this, 1, 0.05f, 1);
this->unk38_31 = 0;
this->lifetime_value = 0.0f;
@ -88,31 +88,31 @@ void func_8038E940(Actor *this){
switch(this->state){
case 1: //L8038EA98
if(fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME) && !mapSpecificFlags_get(2))
func_8038E774(this);
if(fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME) && !mapSpecificFlags_get(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH))
chXmasTreeSwitch_moveSwitch(this);
break;
case 2: //L8038EAC8
if(actor_animationIsAt(this, 0.2f))
func_8038E840(this->position, 0x20, ASSET_717_SPRITE_SPARKLE_YELLOW_2);
chXmasTreeSwitch_emitSparkles(this->position, 0x20, ASSET_717_SPRITE_SPARKLE_YELLOW_2);
if(this->unk38_31 < 3)
break;
subaddie_set_state_with_direction(this, 3, 0.05f, 1);
actor_playAnimationOnce(this);
FUNC_8030E624(SFX_416, 0.8f, 32000);
FUNC_8030E624(SFX_416_ELECTRIC_ZAP, 0.8f, 32000);
this->marker->collidable = FALSE;
this->lifetime_value = 0.0f;
break;
case 3: //L8038EB44
if(this->lifetime_value == 0.0f && actor_animationIsAt(this, 0.95f)){
this->lifetime_value = 1.0f;
mapSpecificFlags_set(2, TRUE);
mapSpecificFlags_set(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH, TRUE);
break;
}
if(this->lifetime_value != 0.0f && !mapSpecificFlags_get(2)){
func_8038E774(this);
if(this->lifetime_value != 0.0f && !mapSpecificFlags_get(FP_SPECIFIC_FLAG_2_XMAS_TREE_SWITCH)){
chXmasTreeSwitch_moveSwitch(this);
}
break;
}//L8038EBC0

View File

@ -9,32 +9,32 @@ extern ActorInfo D_80367FE0;
extern ActorInfo chScarfSled;
extern ActorInfo chRaceSled;
extern ActorInfo FP_D_80391AB0;
extern ActorInfo gSnowmanButton;
extern ActorInfo chXmasTree;
extern ActorInfo D_80391BB0;
extern ActorInfo D_80391C18;
extern ActorInfo D_80391C58;
extern ActorInfo D_80391CE8;
extern ActorInfo D_80391E08;
extern ActorInfo FP_D_80391E2C;
extern ActorInfo D_80391E50;
extern ActorInfo D_80391F88;
extern ActorInfo D_80391FAC;
extern ActorInfo D_80391FD0;
extern ActorInfo D_80391FF4;
extern ActorInfo D_803920E8;
extern ActorInfo D_803923D0;
extern ActorInfo D_80392420;
extern ActorInfo D_80392470;
extern ActorInfo D_803924B0;
extern ActorInfo D_803924D4;
extern ActorInfo D_803924F8;
extern ActorInfo D_80392588;
extern ActorInfo D_80392628;
extern ActorInfo D_80392690;
extern ActorInfo gChBoggySled;
extern ActorInfo gChCubMoggy;
extern ActorInfo gChCubSoggy;
extern ActorInfo gChCubGroggy;
extern ActorInfo gChTwinklyBlue;
extern ActorInfo gChTwinklyGreen;
extern ActorInfo gChTwinklyOrange;
extern ActorInfo gChTwinklyRed;
extern ActorInfo gChTwinklyBox;
extern ActorInfo gChTwinklyMuncher;
extern ActorInfo gXmasTreeSwitch;
extern ActorInfo gXmasTreeStar;
extern ActorInfo gChPresentBlue;
extern ActorInfo gChPresentGreen;
extern ActorInfo gChPresentRed;
extern ActorInfo gChWozza;
extern ActorInfo gWozzaJiggy;
extern ActorInfo gChBoggyHome;
extern ActorInfo D_803926C0;
extern ActorInfo D_80392700;
extern ActorInfo D_80392730;
extern ActorInfo gChWozzaCave;
extern ActorInfo gXmasTreeIce;
extern ActorInfo FP_D_80392840;
void func_80391040(Actor *this);
@ -154,35 +154,35 @@ void func_803912EC(Actor *this){
void FP_func_80391324(void)
{
spawnableActorList_add(&FP_D_80391AB0, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&gSnowmanButton, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&D_80391BB0, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5);
spawnableActorList_add(&D_80391C18, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_19 | ACTOR_FLAG_UNKNOWN_20);
spawnableActorList_add(&D_80391C58, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_19 | ACTOR_FLAG_UNKNOWN_20);
spawnableActorList_add(&D_80391CE8, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80391E08, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&FP_D_80391E2C, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&D_80391E50, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&D_80391F88, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80391FAC, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80391FD0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80391FF4, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_803920E8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&D_803923D0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_24);
spawnableActorList_add(&gChBoggySled, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gChCubMoggy, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&gChCubSoggy, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&gChCubGroggy, actor_new, ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&gChTwinklyBlue, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gChTwinklyGreen, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gChTwinklyOrange, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gChTwinklyRed, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gChTwinklyBox, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&gChTwinklyMuncher, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_24);
spawnableActorList_add(&chXmasTree, actor_new, ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80392420, actor_new, ACTOR_FLAG_UNKNOWN_2);
spawnableActorList_add(&D_80392470, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&D_803924B0, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&D_803924D4, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&D_803924F8, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&gXmasTreeSwitch, actor_new, ACTOR_FLAG_UNKNOWN_2);
spawnableActorList_add(&gXmasTreeStar, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10);
spawnableActorList_add(&gChPresentBlue, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&gChPresentGreen, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&gChPresentRed, actor_new, ACTOR_FLAG_UNKNOWN_3);
spawnableActorList_add(&chScarfSled, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&chRaceSled, actor_new, ACTOR_FLAG_UNKNOWN_5);
spawnableActorList_add(&D_80392588, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&D_80392628, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6);
spawnableActorList_add(&D_80392690, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7);
spawnableActorList_add(&gChWozza, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_19);
spawnableActorList_add(&gWozzaJiggy, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6);
spawnableActorList_add(&gChBoggyHome, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7);
spawnableActorList_add(&D_803926C0, actor_new, ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_27);
spawnableActorList_add(&D_80392700, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&gChWozzaCave, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8);
spawnableActorList_add(&FP_D_80392840, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&D_80392730, actor_new, ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&gXmasTreeIce, actor_new, ACTOR_FLAG_UNKNOWN_17);
spawnableActorList_add(&D_80367FE0, actor_new, ACTOR_FLAG_NONE);
spawnableActorList_add(&FP_D_803928E0, actor_new, ACTOR_FLAG_UNKNOWN_6);
spawnableActorList_add(&D_80392904, actor_new, ACTOR_FLAG_UNKNOWN_6);

View File

@ -31,7 +31,7 @@ void func_80390000(s32 arg0){
if(GV_D_80391AD0 == 2){
levelSpecificFlags_set(LEVEL_FLAG_6_GV_UNKNOWN, FALSE);
func_803228D8();
musicKeepsPlaying();
transitionToMap(MAP_15_GV_WATER_PYRAMID, 1, 0);
}
}

View File

@ -38,7 +38,7 @@ void __waterCtrl_setState(s32 arg0){
if(GV_D_80391B00.state == 3){
levelSpecificFlags_set(LEVEL_FLAG_6_GV_UNKNOWN, TRUE);
func_803228D8();
musicKeepsPlaying();
volatileFlag_set(VOLATILE_FLAG_E, 1);
transitionToMap(MAP_12_GV_GOBIS_VALLEY, 0, 0);
}

View File

@ -153,7 +153,7 @@ void chlmonkey_update(Actor *this) {
}
if (0.24 <= this->unk48) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED, TRUE);
mapSpecificFlags_set(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEFT, TRUE);
}
if (0.99 <= this->unk48) {

View File

@ -68,7 +68,7 @@ void chAnchorCtrl_update(Actor *this){
if(this->state == 3 && !mapSpecificFlags_get(4)){
timed_exitStaticCamera(0.0f);
func_80324E38(0.0f, 0);
timedFunc_set_0(0.0f, func_803228D8);
timedFunc_set_0(0.0f, musicKeepsPlaying);
timedFunc_set_3(0.0f, (GenFunction_3)transitionToMap, MAP_8B_RBB_ANCHOR_ROOM, 2, 0);
}//L8038C2E4
}

View File

@ -22,7 +22,7 @@ void __chAnchorSwitch_setState(Actor *this, s32 arg1){
if(this->state == 1){
levelSpecificFlags_set(LEVEL_FLAG_30_RBB_UNKNOWN, TRUE);
volatileFlag_set(VOLATILE_FLAG_E, 1);
timedFunc_set_0(1.0f, func_803228D8);
timedFunc_set_0(1.0f, musicKeepsPlaying);
timedFunc_set_3(1.0f, (GenFunction_3)transitionToMap, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0);
}
}

View File

@ -100,7 +100,7 @@ void chPropellor_update(Actor *this){
func_80324E38(4.5f, 0);
timedFunc_set_2(4.5f, (GenFunction_2)levelSpecificFlags_set, local->unk8 ? 0x4 : 0x3, 0);
timedFunc_set_3(4.5f, (GenFunction_3)transitionToMap, MAP_34_RBB_ENGINE_ROOM, !local->unk8 ? 3 : 2, 0);
func_803228D8();
musicKeepsPlaying();
}
}//L80389EA8

View File

@ -47,7 +47,7 @@ void __chPropellorSwitch_setState(Actor *this, s32 arg1){
this->position_y -= 40.0f;
if(this->state == 1){
levelSpecificFlags_set(local->unk0->unk8, 1);
func_803228D8();
musicKeepsPlaying();
timedFunc_set_1(1.1f, (GenFunction_1)func_8028F9DC, 2);
timedFunc_set_3(1.1f, (GenFunction_3)transitionToMap, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0);
}else{

View File

@ -490,7 +490,7 @@ static void __chVegetables_update(Actor* this) {
func_80328FB0(this, 2.0f);
if (local->vegetable_type != CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.3f))
sfx_playFadeShorthandDefault(SFX_3F2_UNKNOWN, 1.0f, 22000, this->position, 1000, 2000);
sfx_playFadeShorthandDefault(SFX_3F2_BOING, 1.0f, 22000, this->position, 1000, 2000);
if (local->vegetable_type == CH_VEGETABLE_3_COLLIWOBBLE && actor_animationIsAt(this, 0.4f))
sfx_playFadeShorthandDefault(SFX_2_CLAW_SWIPE, 0.9f, 8000, this->position, 1000, 2000);

View File

@ -298,7 +298,7 @@ static void __chClam_updateFunc(Actor *this){
subaddie_set_state_with_direction(this, 2, 0.01f, 1);
actor_playAnimationOnce(this);
anctrl_setDuration(this->anctrl, 1.0f);
__chClam_playSfx(SFX_3F2_UNKNOWN, randf2(1.0f, 1.1f), 22000, this->position, 1500.0f, 2000.0f);
__chClam_playSfx(SFX_3F2_BOING, randf2(1.0f, 1.1f), 22000, this->position, 1500.0f, 2000.0f);
}
else{
anctrl_setDuration(this->anctrl, 2.0f);

View File

@ -99,7 +99,7 @@ static void __chLeaky_showDoneText(ActorMarker *caller, enum asset_e text_id, s3
func_80324E38(2.5f, 0);
timedFunc_set_1(2.5f, func_8028F9DC, 2);
timedFunc_set_3(2.5f, (GenFunction_3)transitionToMap, MAP_A_TTC_SANDCASTLE, 0, 0);
func_803228D8();
musicKeepsPlaying();
}
bool chLeaky_eggCollision(ActorMarker *marker){

View File

@ -79,12 +79,12 @@ static void __chTreasure_updateFunc(Actor *this){
subaddie_set_state_forward(this, 2);
this->marker->propPtr->unk8_3 = 1;
actor_collisionOn(this);
func_8030E878(SFX_3F2_UNKNOWN, randf2(1.2f, 1.3f), 20000, this->position, 200.0f, 1500.0f);
func_8030E878(SFX_3F2_BOING, randf2(1.2f, 1.3f), 20000, this->position, 200.0f, 1500.0f);
}
break;
case 2://L8038C344
if(actor_animationIsAt(this, 0.99f)){
func_8030E878(SFX_3F2_UNKNOWN, randf2(1.2f, 1.3f), 20000, this->position, 200.0f, 1500.0f);
func_8030E878(SFX_3F2_BOING, randf2(1.2f, 1.3f), 20000, this->position, 200.0f, 1500.0f);
}
break;

View File

@ -540,7 +540,7 @@ void maCastle_init(void)
timed_setStaticCameraToNode(0.0f, 1);
timed_exitStaticCamera(2.0f);
func_80324E38(2.0f, 0);
func_803228D8();
musicKeepsPlaying();
timedFunc_set_3(2.0f, (GenFunction_3)transitionToMap, MAP_7_TTC_TREASURE_TROVE_COVE, 1, 0);
}
else if (levelSpecificFlags_get(LEVEL_FLAG_2_TTC_UNKNOWN) || volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)) {

View File

@ -184,7 +184,7 @@ void chBottlesBonusCursor_func_802DF928(s32 indx) {
}
void chBottlesBonusCursor_func_802DF99C(void){
func_803228D8();
musicKeepsPlaying();
func_8025A55C(-1, 2000, 7);
}

View File

@ -196,7 +196,7 @@ void chjiggy_update(Actor *this) {
break;
case JIGGY_2F_FP_XMAS_TREE:
if (levelSpecificFlags_get(LEVEL_FLAG_29_FP_UNKNOWN)) {
if (levelSpecificFlags_get(LEVEL_FLAG_29_FP_XMAS_TREE_COMPLETE)) {
actor_collisionOn(this);
} else {
actor_collisionOff(this);

View File

@ -255,7 +255,7 @@ void chSnowman_update(Actor *this){
}
else if(
gsworld_get_map() != MAP_27_FP_FREEZEEZY_PEAK
|| func_8038DD34(local->unk0) == 0
|| preventSnowmanAttack(local->unk0) == 0
|| fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)
){//L802E2318
if(0.0 < local->unk4){

View File

@ -59,10 +59,10 @@ void chwadingboots_update(Actor *this){
if(actor_animationIsAt(this, 0.25f)){
if(sp2C){
FUNC_8030E624(SFX_3F2_UNKNOWN, 1.4f, 23000);
FUNC_8030E624(SFX_3F2_BOING, 1.4f, 23000);
}
else{
sfx_playFadeShorthandDefault(SFX_3F2_UNKNOWN, 1.4f, 23000, this->position, 600, 1500);
sfx_playFadeShorthandDefault(SFX_3F2_BOING, 1.4f, 23000, this->position, 600, 1500);
}
}

View File

@ -82,7 +82,7 @@ BundleInfo gBundle_array[] = {
{0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f},
{0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
{0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f},
{0x0129, ACTOR_352_UNKOWN, 1, SFX_3F2_UNKNOWN, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f},
{0x0129, ACTOR_352_UNKOWN, 1, SFX_3F2_BOING, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f},
{0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f},
{0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},
{0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f},

View File

@ -771,7 +771,7 @@ void func_802D4D3C(enum actor_e arg0, enum actor_e arg1) {
void func_802D5000(enum map_e map_id){
if(map_getLevel(map_id) != level_get())
func_802E4A70();
func_803228D8();
musicKeepsPlaying();
transitionToMap(D_80367684, 0x65, 0);
}
@ -1130,7 +1130,7 @@ void func_802D6114(void){
}//L802D6194
volatileFlag_set(VOLATILE_FLAG_21, 1);
if(sp24 != 0x1C || !func_8025ADBC(COMUSIC_23_MMM_INSIDE_CHURCH)){
func_803228D8();
musicKeepsPlaying();
}
transitionToMap(sp24, sp20, 0);
}
@ -1143,7 +1143,7 @@ void func_802D6114(void){
void func_802D61FC(enum map_e arg0){
if( map_getLevel(arg0) != map_getLevel(gsworld_get_map()))
func_802E4A70();
func_803228D8();
musicKeepsPlaying();
transitionToMap(D_80367684, 0, 0);
func_802D6750();
}

View File

@ -365,7 +365,7 @@ void chLevelCollectible_update(Actor *this){
func_802D83EC(this);
break;
case MARKER_36_ORANGE_COLLECTIBLE: //L802D86DC
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED) && gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN) {
if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEFT) && gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN) {
marker_despawn(this->marker);
}
break;

View File

@ -150,7 +150,7 @@ void func_802DEE1C(Actor *this) {
case 5:
break;
}
func_803228D8();
musicKeepsPlaying();
}
void func_802DF04C(void){

View File

@ -41,7 +41,7 @@ LocalStruct_1 D_80368DF0[] = {
{0x9, SFX_98_DEAF_THUD, 1.0f, 1.1f, 0.05f, 21000},
{0xA, SFX_99_METALLIC_THUD, 1.0f, 1.1f, 0.05f, 21000},
{0xC, SFX_123_BANJO_LANDING_10, 0.85f, 0.89f, 0.05f, 21000},
{0xD, SFX_3F2_UNKNOWN, 0.96f, 1.04f, 0.02f, 10000},
{0xD, SFX_3F2_BOING, 0.96f, 1.04f, 0.02f, 10000},
{0xE, SFX_10_BANJO_LANDING_07, 1.2f, 1.35f, 0.05f, 13000},
{0xF, SFX_DC_IDLE_PADDLING, 0.95f, 1.1f, 0.05f, 16000},
{0}

View File

@ -80,14 +80,14 @@ void func_803219F4(s32 arg0){
func_8025A8B8(D_80383314, 1);
break;
case 3: //L80321BDC
func_803228D8();
musicKeepsPlaying();
core1_ce60_incOrDecCounter(FALSE);
func_8025A55C(0, 4000, 7);
coMusicPlayer_playMusic(COMUSIC_95_BBONUS_A, -1);
func_8025A8B8(COMUSIC_95_BBONUS_A, 1);
break;
case 5: //L80321C1C
func_803228D8();
musicKeepsPlaying();
break;
case 1: //L80321C24
break;

View File

@ -251,7 +251,7 @@ void func_8032278C(s32 arg0, s32 arg1) {
}
void func_803228D8(void){
void musicKeepsPlaying(void){
if(!D_80383348){
core1_ce60_incOrDecCounter(FALSE);
D_80383348 = TRUE;

View File

@ -169,13 +169,13 @@ void gcparade_8031ABF8(void) {
if (D_803830F0.parade_id == PARADE_1_POST_GRUNTY_BATTLE) {
volatileFlag_set(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE, TRUE);
}
func_803228D8();
musicKeepsPlaying();
func_802E4A70();
}
void gcparade_8031AC8C(void) {
func_803228D8();
musicKeepsPlaying();
if (map_getLevel(D_803830F0.parade_element->map) != level_get()) {
func_802E4A70();
}
@ -214,7 +214,7 @@ void gcparade_setState(enum parade_state_e next_state) {
gcparade_8031AC8C();
break;
case PARADE_STATE_3_WARP:
func_803228D8();
musicKeepsPlaying();
if (map_getLevel(D_803830F0.parade_element->map) != level_get()) {
func_802E4A70();
}

View File

@ -185,7 +185,7 @@ gczoomboxPortraitInfo D_8036C6C0[] = {
{SFX_40B_MUMBO_TALKING_5, 28000, 1.4f}
}},
{ASSET_81E_SPRITE_LIVE_BLUE_EGG, 0xF2, 0x06, {
{SFX_3F2_UNKNOWN, 32000, 1.1f}
{SFX_3F2_BOING, 32000, 1.1f}
}},
{ASSET_820_SPRITE_LIVE_RED_FEATHER, 0xEE, 0x06, {
{SFX_AC_GOLDFEATHER_TALKING, 15000, -2.0f}

View File

@ -73,7 +73,7 @@ void chspellbarrier_update(Actor *this) {
local->sfxsourceIdx = func_8030ED2C(0x415, 3);
func_8030DB04(local->sfxsourceIdx, 32000, this->position, 4000.0f, 12000.0f);
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 1.0f);
sfx_playFadeShorthandDefault(SFX_416, 0.8f, 32000, this->position, 10000, 25000);
sfx_playFadeShorthandDefault(SFX_416_ELECTRIC_ZAP, 0.8f, 32000, this->position, 10000, 25000);
}
jinjo_marker = chfinalboss_findCollidingJinjo(this, 600.0f);