From fbeb744fc67f182f1019cd03fc29bc8f36f3e2f8 Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Fri, 6 Sep 2024 12:07:27 +0200 Subject: [PATCH 1/7] Further documentations have made: - src/fight: named all ActorInfos and related functions - src/core2: named shock jump and flight pad ActorInfos and related functions in code_43A40.c, partially documented code_CF3E0.c - include/enums.h: added some enum values --- include/enums.h | 24 +++++++++------ include/prop.h | 2 +- src/core2/code_43A40.c | 36 +++++++++++----------- src/core2/code_CF3E0.c | 49 ++++++++++++++++------------- src/core2/spawnqueue.c | 8 ++--- src/fight/chbossjinjo.c | 34 ++++++++++---------- src/fight/chbossjinjobase.c | 2 +- src/fight/chbossshadow.c | 2 +- src/fight/chfinalboss.c | 2 +- src/fight/chjinjonator.c | 2 +- src/fight/chjinjonatorbase.c | 2 +- src/fight/chspellbarrier.c | 2 +- src/fight/chspellfireball.c | 4 +-- src/fight/chstonejinjo.c | 6 ++-- src/fight/code_0.c | 60 ++++++++++++++++++------------------ src/fight/code_9850.c | 14 ++++----- 16 files changed, 130 insertions(+), 119 deletions(-) diff --git a/include/enums.h b/include/enums.h index 28c8bdaf..bf33c92f 100644 --- a/include/enums.h +++ b/include/enums.h @@ -12,8 +12,10 @@ #define SPRITE_TYPE_RGBA32 (1 << 11) enum file_progress_e{ - - FILEPROG_3_MUSIC_NOTE_TEXT = 0x3, + FILEPROG_0_UNKNOWN, + FILEPROG_1_UNKNOWN, + FILEPROG_2_UNKNOWN, + FILEPROG_3_MUSIC_NOTE_TEXT, FILEPROG_4_MUMBO_TOKEN_TEXT, FILEPROG_5_BLUE_EGG_TEXT, FILEPROG_6_RED_FEATHER_TEXT, @@ -227,6 +229,10 @@ enum file_progress_e{ FILEPROG_FD_BANNED_CHEATCODES_ENTERED //2 bit }; +enum volatile_progress_e{ + VOLAPROG_0_UNKNOWN +}; + enum unkflags_1{ UNKFLAGS1_6_HAS_SEEN_BOSS_BOOM_BOX_FF_MINIGAME = 0x6, UNKFLAGS1_7_HAS_SEEN_VILE_FF_MINIGAME, @@ -1988,13 +1994,13 @@ enum actor_e ACTOR_387_PORTRAIT_OF_TEEHEE, ACTOR_388_PORTRAIT_OF_MINION, ACTOR_389_GRUNTY_SPELL_FIREBALL, - - ACTOR_38B_GRUNTILDA_FINAL_BOSS = 0x38B, + ACTOR_38A_SPRITE_SMOKE_GREEN_2, + ACTOR_38B_GRUNTILDA_FINAL_BOSS, ACTOR_39F_FIGHT_FLIGHT_PAD = 0x39F, ACTOR_3A0_ICECUBE_B, - ACTOR_3A1_STONE_JINJO = 0x3A1, - ACTOR_3A2_JINJO_STATUE_BASE = 0x3A2, + ACTOR_3A1_STONE_JINJO, + ACTOR_3A2_JINJO_STATUE_BASE, ACTOR_3A5_BOSS_JINJO_ORANGE = 0x3A5, ACTOR_3A6_BOSS_JINJO_GREEN, @@ -4573,9 +4579,9 @@ enum marker_e{ MARKER_25A_PORTRAIT_OF_TEEHEE, MARKER_25B_PORTRAIT_OF_MINION, MARKER_25C_GRUNTY_SPELL_FIREBALL, - - MARKER_25E_GRUNTILDA_FINAL_BOSS = 0x25E, - MARKER_25F_ICECUBE_B = 0x25F, + MARKER_25D_SPRITE_SMOKE_GREEN_2, + MARKER_25E_GRUNTILDA_FINAL_BOSS, + MARKER_25F_ICECUBE_B, MARKER_261_FIGHT_FLIGHT_PAD = 0x261, diff --git a/include/prop.h b/include/prop.h index 4025977b..b8031639 100644 --- a/include/prop.h +++ b/include/prop.h @@ -284,7 +284,7 @@ typedef struct actor_s{ s8 pad167[0x1]; s32 unk168; //saved marker->unk58 u32 unk16C_31:27; //saved s1->marker->unk5C - u32 unk16C_4:1; + u32 unk16C_4:1; // initialization related? u32 unk16C_3:1; u32 unk16C_2:1; u32 unk16C_1:1; diff --git a/src/core2/code_43A40.c b/src/core2/code_43A40.c index 70846f97..1a23170b 100644 --- a/src/core2/code_43A40.c +++ b/src/core2/code_43A40.c @@ -2,34 +2,34 @@ #include "functions.h" #include "variables.h" -void func_802CA9D0(Actor *this); -void func_802CAA44(Actor *this); -void func_802CAB70(Actor *this); +void chShockJump_update(Actor *this); +void chFlightPad_update(Actor *this); +void chFightFlightPad_update(Actor *this); /* .data */ -extern ActorInfo D_80366F20 = { +extern ActorInfo chShockJump = { 0x0D4, ACTOR_B_SHOCKSPRING_PAD, ASSET_489_MODEL_SHOCKSPRING_PAD, 0, NULL, - func_802CA9D0, func_80326224, actor_draw, + chShockJump_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; -extern ActorInfo D_80366F44 = { +extern ActorInfo chFlightPad = { MARKER_45_FLIGHT_PAD, ACTOR_E4_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD, 0, NULL, - func_802CAA44, func_80326224, actor_draw, + chFlightPad_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; -extern ActorInfo D_80366F68 = { +extern ActorInfo chFightFlightPad = { MARKER_261_FIGHT_FLIGHT_PAD, ACTOR_39F_FIGHT_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD, 0, NULL, - func_802CAB70, func_80326224, actor_draw, + chFightFlightPad_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; -extern struct31s D_80366F8C = { +extern struct31s chFightFlightPad_D_80366F8C = { {0.4f, 0.4f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -38,14 +38,14 @@ extern struct31s D_80366F8C = { }; -extern struct43s D_80366FB4 = { +extern struct43s chFightFlightPad_D_80366FB4 = { {{-360.0f, 360.0f, -360.0}, {360.0f, 660.0f, 360.0f}}, {{0.0f, -1200.0f, 0.0f}, {0.0f, -1200.0f, 0.0f}}, {{0.0f, 0.0f, 0.0f}, {0.0f, 40.0f, 0.0f}} }; /* .code */ -void func_802CA9D0(Actor *this){ +void chShockJump_update(Actor *this){ this->marker->propPtr->unk8_3 = TRUE; if(func_803203FC(UNKFLAGS1_86_SANDCASTLE_SHOCKSPRING_JUMP_UNLOCKED)){ ability_unlock(ABILITY_D_SHOCK_JUMP); @@ -59,7 +59,7 @@ void func_802CA9D0(Actor *this){ } } -void func_802CAA44(Actor *this){ +void chFlightPad_update(Actor *this){ this->marker->propPtr->unk8_3 = TRUE; if(func_803203FC(UNKFLAGS1_8A_SANDCASTLE_FLIGHT_UNLOCKED)){ ability_unlock(ABILITY_9_FLIGHT); @@ -80,20 +80,20 @@ void func_802CAA44(Actor *this){ } } -void func_802CAAF0(f32 position[3]){ +void chFightFlightPad_emitSparklesAtPosition(f32 position[3]){ ParticleEmitter *pCtrl = partEmitMgr_newEmitter(0x18); particleEmitter_setSprite(pCtrl, ASSET_715_SPRITE_SPARKLE_RED); particleEmitter_setPosition(pCtrl, position); - particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80366FB4); - func_802EFB98(pCtrl, &D_80366F8C); + particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &chFightFlightPad_D_80366FB4); + func_802EFB98(pCtrl, &chFightFlightPad_D_80366F8C); func_802EFA78(pCtrl, 1); particleEmitter_emitN(pCtrl, 0x18); } -void func_802CAB70(Actor *this){ +void chFightFlightPad_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; - func_802CAAF0(this->position); + chFightFlightPad_emitSparklesAtPosition(this->position); FUNC_8030E8B4(SFX_113_PAD_APPEARS, 1.0f, 32000, this->position, 5000, 12000); } this->marker->propPtr->unk8_3 = TRUE; diff --git a/src/core2/code_CF3E0.c b/src/core2/code_CF3E0.c index 9547d0ba..0f7c9071 100644 --- a/src/core2/code_CF3E0.c +++ b/src/core2/code_CF3E0.c @@ -2,9 +2,10 @@ #include "functions.h" #include "variables.h" -typedef KEY_VALUE_PAIR(s16, s16) unkD_80372730; +typedef KEY_VALUE_PAIR(s16, s16) MapProgressFlagToDialogID; -unkD_80372730 D_80372730[] = { +/* Mapping for file progess flags to Dialog IDs */ +MapProgressFlagToDialogID fileProgressDialogMap[] = { { FILEPROG_AB_SWIM_OILY_WATER, 0xBA1}, { FILEPROG_AC_DIVE_OILY_WATER, 0xBA2}, { FILEPROG_AA_HAS_TOUCHED_CCW_BRAMBLE_FIELD, 0xCE6}, @@ -33,8 +34,9 @@ unkD_80372730 D_80372730[] = { { -1, -1} }; - -unkD_80372730 D_80372798[] = { +/* This progress IDs are not saved in the save file, like when Banjo goes near a Note door which requires more notes than the Banjo has. */ +/* Triggers a dialog every time after the game restarts. */ +MapProgressFlagToDialogID volatileProgressDialogMap[] = { {0x9E, 0xBA3}, {0x9F, 0xCE8}, {0xA0, 0x1032}, @@ -59,52 +61,55 @@ unkD_80372730 D_80372798[] = { { -1, -1} }; -static s32 __findIndex(unkD_80372730 *arg0, s32 arg1) { - s32 phi_v1 = 0; +static s32 __findIndex(MapProgressFlagToDialogID *map, s32 key) { + s32 i = 0; - while (arg0[phi_v1].key >= 0) { - if (arg1 == arg0[phi_v1].key) { - return phi_v1; + while (map[i].key >= 0) { + if (key == map[i].key) { + return i; } - phi_v1++; + i++; } + return -1; } -s32 func_803563B8(enum file_progress_e arg0, s32 arg1) { +/* Checks for a specific file progress flag and triggers a dialog only if the progress flag was not set and sets the progress flag */ +s32 func_803563B8(enum file_progress_e progress_flag, s32 arg1) { s32 index; - if (fileProgressFlag_get(arg0) != 0) { + if (fileProgressFlag_get(progress_flag) != 0) { return 0; } else { - index = __findIndex(D_80372730, arg0); + index = __findIndex(fileProgressDialogMap, progress_flag); if (index != -1) { - if (func_80311480(D_80372730[index].value, arg1, 0, 0, 0, 0) != 0) { - fileProgressFlag_set(arg0, 1); + if (func_80311480(fileProgressDialogMap[index].value, arg1, 0, 0, 0, 0) != 0) { + fileProgressFlag_set(progress_flag, 1); } - return fileProgressFlag_get(arg0); + return fileProgressFlag_get(progress_flag); } return 0; } } -void func_8035644C(enum file_progress_e arg0){ - func_803563B8(arg0, 0); +void func_8035644C(enum file_progress_e progress_flag){ + func_803563B8(progress_flag, 0); } -void func_8035646C(s32 arg0) { - func_803563B8(arg0, 4); +void func_8035646C(enum file_progress_e progress_flag) { + func_803563B8(progress_flag, 4); } +/* Checks for a specific "volatile" progress flag and triggers a dialog only if the progress flag was not set and sets the progress flag */ s32 func_8035648C(s32 arg0, s32 arg1) { s32 index; if (func_803203FC() != 0) { return 0; } else { - index = __findIndex(D_80372798, arg0); + index = __findIndex(volatileProgressDialogMap, arg0); if (index != -1) { - if (func_80311480(D_80372798[index].value, arg1, 0, 0, 0, 0) != 0) { + if (func_80311480(volatileProgressDialogMap[index].value, arg1, 0, 0, 0, 0) != 0) { func_803204E4(arg0, 1); } return func_803203FC(arg0); diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index c0b27aee..70b79f5d 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -38,8 +38,8 @@ extern ActorInfo D_80366C80; //chhoneycarrier extern ActorInfo D_80366CA4; //chhoney extern ActorInfo chTrainers; extern ActorInfo D_80366EF0; //large_shadow -extern ActorInfo D_80366F20; //chshockjump -extern ActorInfo D_80366F44; //flight_pad +extern ActorInfo chShockJump; //chshockjump +extern ActorInfo chFlightPad; //flight_pad extern ActorInfo D_803670B8; //snippet extern ActorInfo D_803670DC; //black_snippet extern ActorInfo D_80367100; //mutie_snippet @@ -251,8 +251,8 @@ void spawnQueue_reset(void){ spawnableActorList_add(&D_80367F30, actor_new, 0x0000400); spawnableActorList_add(&chBubble, actor_new, 0x0000004); spawnableActorList_add(&chGloop, actor_new, 0x000008A); //gloop - spawnableActorList_add(&D_80366F20, actor_new, 0x0000000); //chshockjump - spawnableActorList_add(&D_80366F44, actor_new, 0x0000000); //flight_pad + spawnableActorList_add(&chShockJump, actor_new, 0x0000000); //chshockjump + spawnableActorList_add(&chFlightPad, actor_new, 0x0000000); //flight_pad spawnableActorList_add(&D_80367D24, actor_new, 0x0200000); //redfeather spawnableActorList_add(&D_80367D48, actor_new, 0x0200000); //goldfeather spawnableActorList_add(&D_80367C90, actor_new, 0x0000004); //spent_redfeather diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index 2b72d6d9..42e093a9 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -12,11 +12,11 @@ extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32); extern void func_80329904(ActorMarker*, s32, f32*); -void func_8038C840(Actor *this); -void func_8038D014(Actor *this); +void chBossJinjo_update(Actor *this); +void chBossJinjo_func_8038D014(Actor *this); /* .data */ -ActorAnimationInfo D_80391810[] = { +ActorAnimationInfo chBossJinjoAnimations[] = { {0, 0.0f}, {0x264, 1000000.0f}, {0x264, 2.26f}, @@ -25,31 +25,31 @@ ActorAnimationInfo D_80391810[] = { {0x262, 2.0f} }; -ActorInfo D_80391840 = { +ActorInfo chBossJinjoOrange = { MARKER_27B_BOSS_JINJO_ORANGE, ACTOR_3A5_BOSS_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, - 0x1, D_80391810, - func_8038C840, func_8038D014, actor_draw, + 0x1, chBossJinjoAnimations, + chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; -ActorInfo D_80391864 = { +ActorInfo chBossJinjoGreen = { MARKER_27C_BOSS_JINJO_GREEN, ACTOR_3A6_BOSS_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, - 0x1, D_80391810, - func_8038C840, func_8038D014, actor_draw, + 0x1, chBossJinjoAnimations, + chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; -ActorInfo D_80391888 = { +ActorInfo chBossJinjoPink = { MARKER_27D_BOSS_JINJO_PINK, ACTOR_3A7_BOSS_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, - 0x1, D_80391810, - func_8038C840, func_8038D014, actor_draw, + 0x1, chBossJinjoAnimations, + chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; -ActorInfo D_803918AC = { +ActorInfo chBossJinjoYellow = { MARKER_27E_BOSS_JINJO_YELLOW, ACTOR_3A8_BOSS_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, - 0x1, D_80391810, - func_8038C840, func_8038D014, actor_draw, + 0x1, chBossJinjoAnimations, + chBossJinjo_update, chBossJinjo_func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; @@ -184,7 +184,7 @@ void func_8038C79C(Actor *this){ } } -void func_8038C840(Actor *this){ +void chBossJinjo_update(Actor *this){ f32 sp74 = time_getDelta(); f32 sp68[3]; f32 sp5C[3]; @@ -346,7 +346,7 @@ void func_8038CED8(f32 arg0[3], enum asset_e model_id, f32 arg2, f32 arg3){ particleEmitter_emitN(s0, 1); } -void func_8038D014(Actor *this){ +void chBossJinjo_func_8038D014(Actor *this){ s32 temp_a1; if(!this->unk16C_4){ diff --git a/src/fight/chbossjinjobase.c b/src/fight/chbossjinjobase.c index 77fdc646..cdd8b4a7 100644 --- a/src/fight/chbossjinjobase.c +++ b/src/fight/chbossjinjobase.c @@ -9,7 +9,7 @@ typedef struct { void func_8038D568(Actor *this); /* .data */ -ActorInfo D_80391990 = { +ActorInfo chBossJinjoBase = { MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE, 0x1, NULL, func_8038D568, func_80326224, actor_draw, diff --git a/src/fight/chbossshadow.c b/src/fight/chbossshadow.c index 2ff645d6..0ca0469b 100644 --- a/src/fight/chbossshadow.c +++ b/src/fight/chbossshadow.c @@ -6,7 +6,7 @@ Actor *chbossshadow_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3) void chbossshadow_update(Actor *this); /* .data */ -ActorInfo D_80392090 = { +ActorInfo chBossShadow = { MARKER_288_GRUNTY_SHADOW, ACTOR_3AF_GRUNTY_SHADOW, ASSET_3BF_MODEL_PLAYER_SHADOW, 0x1, NULL, chbossshadow_update, func_80326224, chbossshadow_draw, 0, 0, 0.0f, 0 diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index 2fc3432b..a1aeedff 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -112,7 +112,7 @@ ActorAnimationInfo D_803913A0[] = { { 0x266, 4.0f} }; -ActorInfo fight_D_80391500 = { +ActorInfo chFinalBoss = { MARKER_25E_GRUNTILDA_FINAL_BOSS, ACTOR_38B_GRUNTILDA_FINAL_BOSS, ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, 1, D_803913A0, chfinalboss_update, func_80326224, chfinalboss_draw, diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index 7ec97b7b..cd32034e 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -44,7 +44,7 @@ ActorAnimationInfo D_80391FB0[] = { {0x280, 0.4f} }; -ActorInfo D_80392018 = { +ActorInfo chJinjonator = { MARKER_285_JINJONATOR, ACTOR_3AC_JINJONATOR, ASSET_551_MODEL_JINJONATOR, 0x1, D_80391FB0, chjinjonator_update, func_80326224, actor_draw, diff --git a/src/fight/chjinjonatorbase.c b/src/fight/chjinjonatorbase.c index 9580765f..304b4ef5 100644 --- a/src/fight/chjinjonatorbase.c +++ b/src/fight/chjinjonatorbase.c @@ -9,7 +9,7 @@ typedef struct { void chjinjonatorbase_update(Actor *); /* .data */ -ActorInfo fight_D_80391A40 = { +ActorInfo chJinjonatorBase = { MARKER_27F_JINJONATOR_STATUE_BASE, ACTOR_3A9_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE, 0x1, NULL, chjinjonatorbase_update, func_80326224, actor_draw, diff --git a/src/fight/chspellbarrier.c b/src/fight/chspellbarrier.c index 974c10d4..65482518 100644 --- a/src/fight/chspellbarrier.c +++ b/src/fight/chspellbarrier.c @@ -26,7 +26,7 @@ typedef struct { void chspellbarrier_update(Actor *this); /* .data */ -ActorInfo D_80391AD0 = { +ActorInfo chSpellBarrier = { MARKER_284_GRUNTY_SPELL_BARRIER, ACTOR_3AB_GRUNTY_SPELL_BARRIER, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER, 0x1, NULL, chspellbarrier_update, func_80326224, actor_draw, diff --git a/src/fight/chspellfireball.c b/src/fight/chspellfireball.c index 50cb2d05..4fc80f92 100644 --- a/src/fight/chspellfireball.c +++ b/src/fight/chspellfireball.c @@ -19,14 +19,14 @@ typedef struct { void func_8038F620(Actor *this); /* .data */ -ActorInfo fight_D_80391B00 = { +ActorInfo chSpellFireball = { MARKER_25C_GRUNTY_SPELL_FIREBALL, ACTOR_389_GRUNTY_SPELL_FIREBALL, ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK, 0x1, NULL, func_8038F620, func_80326224, actor_draw, 0, 0, 1.0f, 0 }; -ActorInfo D_80391B24 = { +ActorInfo chSpellGreen = { MARKER_280_GRUNTY_SPELL_GREEN_ATTACK, ACTOR_3AA_GRUNTY_SPELL_GREEN_ATTACK, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 0x1, NULL, func_8038F620, func_80326224, func_80325CAC, diff --git a/src/fight/chstonejinjo.c b/src/fight/chstonejinjo.c index a0506114..00211318 100644 --- a/src/fight/chstonejinjo.c +++ b/src/fight/chstonejinjo.c @@ -10,15 +10,15 @@ extern f32 chbossjinjo_8038D268(void); void chstonejinjo_update(Actor *); /* .data */ -ActorAnimationInfo fight_D_803919F0[] ={ +ActorAnimationInfo chStoneJinjo_AnimationInfo[] ={ {0, 0.0f}, {0x265, 1e+8f}, {0x265, 1e+8f}, {0x265, 1e+8f}, }; -ActorInfo fight_D_80391A10 = { +ActorInfo chStoneJinjo = { MARKER_276_STONE_JINJO, ACTOR_3A1_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO, - 0x1, fight_D_803919F0, + 0x1, chStoneJinjo_AnimationInfo, chstonejinjo_update, func_80326224, actor_draw, 0, 0x800, 1.0f, 0 }; diff --git a/src/fight/code_0.c b/src/fight/code_0.c index 76405444..bb02b1f1 100644 --- a/src/fight/code_0.c +++ b/src/fight/code_0.c @@ -3,41 +3,41 @@ #include "variables.h" #include "prop.h" -extern ActorInfo D_80366F68; -extern ActorInfo fight_D_80391500; -extern ActorInfo D_80391840; -extern ActorInfo D_80391864; -extern ActorInfo D_80391888; -extern ActorInfo D_803918AC; -extern ActorInfo D_80391990; -extern ActorInfo fight_D_80391A10; -extern ActorInfo fight_D_80391A40; -extern ActorInfo D_80391AD0; -extern ActorInfo fight_D_80391B00; -extern ActorInfo D_80391B24; -extern ActorInfo D_80391DC0; -extern ActorInfo D_80392018; -extern ActorInfo D_80392090; +extern ActorInfo chFightFlightPad; +extern ActorInfo chFinalBoss; +extern ActorInfo chBossJinjoOrange; +extern ActorInfo chBossJinjoGreen; +extern ActorInfo chBossJinjoPink; +extern ActorInfo chBossJinjoYellow; +extern ActorInfo chBossJinjoBase; +extern ActorInfo chStoneJinjo; +extern ActorInfo chJinjonatorBase; +extern ActorInfo chSpellBarrier; +extern ActorInfo chSpellFireball; +extern ActorInfo chSpellGreen; +extern ActorInfo chSpriteSmokeGreen2; +extern ActorInfo chJinjonator; +extern ActorInfo chBossShadow; /* .bss */ u8 pad_fight_80392740[0x10]; void fight_func_803863F0(void) { - spawnableActorList_add(&fight_D_80391B00, actor_new, 0X108444); - spawnableActorList_add(&D_80391DC0, actor_new, 0X108444); - spawnableActorList_add(&fight_D_80391500, actor_new, 0X300468); - spawnableActorList_add(&D_80391840, actor_new, 0X8464); - spawnableActorList_add(&D_80391864, actor_new, 0X8464); - spawnableActorList_add(&D_80391888, actor_new, 0X8464); - spawnableActorList_add(&D_803918AC, actor_new, 0X8464); - spawnableActorList_add(&fight_D_80391A10, actor_new, 0X20004); - spawnableActorList_add(&D_80391990, actor_new, 0X800100C); - spawnableActorList_add(&fight_D_80391A40, actor_new, 0X8009404); - spawnableActorList_add(&D_80391B24, actor_new, 0X108444); - spawnableActorList_add(&D_80391AD0, actor_new, 0X101404); - spawnableActorList_add(&D_80366F68, actor_new, 0X100404); - spawnableActorList_add(&D_80392018, actor_new, 0X9464); - spawnableActorList_add(&D_80392090, actor_new, 0X100404); + spawnableActorList_add(&chSpellFireball, actor_new, 0X108444); + spawnableActorList_add(&chSpriteSmokeGreen2, actor_new, 0X108444); + spawnableActorList_add(&chFinalBoss, actor_new, 0X300468); + spawnableActorList_add(&chBossJinjoOrange, actor_new, 0X8464); + spawnableActorList_add(&chBossJinjoGreen, actor_new, 0X8464); + spawnableActorList_add(&chBossJinjoPink, actor_new, 0X8464); + spawnableActorList_add(&chBossJinjoYellow, actor_new, 0X8464); + spawnableActorList_add(&chStoneJinjo, actor_new, 0X20004); + spawnableActorList_add(&chBossJinjoBase, actor_new, 0X800100C); + spawnableActorList_add(&chJinjonatorBase, actor_new, 0X8009404); + spawnableActorList_add(&chSpellGreen, actor_new, 0X108444); + spawnableActorList_add(&chSpellBarrier, actor_new, 0X101404); + spawnableActorList_add(&chFightFlightPad, actor_new, 0X100404); + spawnableActorList_add(&chJinjonator, actor_new, 0X9464); + spawnableActorList_add(&chBossShadow, actor_new, 0X100404); } diff --git a/src/fight/code_9850.c b/src/fight/code_9850.c index a3894f18..d2ab329e 100644 --- a/src/fight/code_9850.c +++ b/src/fight/code_9850.c @@ -6,14 +6,14 @@ extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]); extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32); extern Actor *func_80325CAC(ActorMarker *, Gfx **, Mtx **, Vtx**); -void func_8038FE94(Actor *this); -Actor *func_8038FC40(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); +void chSpriteSmokeGreen2_update(Actor *this); +Actor *chSpriteSmokeGreen2_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); /* .data */ -ActorInfo D_80391DC0 = { - 0x25D, 0x38A, ASSET_6C7_SPRITE_SMOKE_GREEN_2, +ActorInfo chSpriteSmokeGreen2 = { + MARKER_25D_SPRITE_SMOKE_GREEN_2, ACTOR_38A_SPRITE_SMOKE_GREEN_2, ASSET_6C7_SPRITE_SMOKE_GREEN_2, 0x1, NULL, - func_8038FE94, func_80326224, func_8038FC40, + chSpriteSmokeGreen2_update, func_80326224, chSpriteSmokeGreen2_draw, 0, 0, 1.0f, 0 }; @@ -48,7 +48,7 @@ f32 D_80391F94[4] = {0.0f, 0.01f, 0.7f, 0.8f}; f32 D_80391FA4[2] = {0.0f, 0.65f}; /* .code */ -Actor *func_8038FC40(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ +Actor *chSpriteSmokeGreen2_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ Actor *actor = marker_getActor(marker); func_80344C2C(1); return func_80325CAC(marker, gdl, mptr, arg3); @@ -88,7 +88,7 @@ void func_8038FCF0(ActorMarker *marker, ActorMarker *other_marker){ marker_despawn(actor->marker); } -void func_8038FE94(Actor *this){ +void chSpriteSmokeGreen2_update(Actor *this){ f32 sp54 = time_getDelta(); f32 sp48[3]; From 539d6f48042c7cf0debdddc3e7163177494d02c5 Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Fri, 6 Sep 2024 19:37:28 +0200 Subject: [PATCH 2/7] Further documentations have been made: - src/fight: named more variables and functions, named some parameters - src/core1, src/core2: named some dummy functions, documented a bit of the graphics stack --- include/enums.h | 6 +- include/prop.h | 2 +- src/core1/code_0.c | 43 ++-- src/core1/code_15770.c | 40 ++-- src/core1/code_15B30.c | 140 ++++++------- src/core1/code_18210.c | 2 +- src/core1/code_1D590.c | 8 +- src/core1/code_8C50.c | 2 +- src/core1/code_E360.c | 20 +- src/core1/memory.c | 2 +- src/core2/ch/bottlesbonuscursor.c | 2 +- src/core2/code_5C240.c | 16 +- src/core2/code_5C870.c | 48 +++-- src/core2/code_77E50.c | 4 +- src/core2/code_851D0.c | 8 +- src/core2/code_8DC20.c | 6 +- src/core2/code_9E370.c | 333 +++++++++++++++--------------- src/core2/code_AD5B0.c | 2 +- src/core2/code_B7F40.c | 44 ++-- src/core2/code_E910.c | 2 +- src/core2/fx/common3score.c | 2 +- src/core2/gc/sky.c | 4 +- src/fight/chspellfireball.c | 120 +++++------ src/fight/code_0.c | 4 +- src/fight/code_9850.c | 166 ++++++++------- 25 files changed, 521 insertions(+), 505 deletions(-) diff --git a/include/enums.h b/include/enums.h index bf33c92f..3685bdd1 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1994,7 +1994,7 @@ enum actor_e ACTOR_387_PORTRAIT_OF_TEEHEE, ACTOR_388_PORTRAIT_OF_MINION, ACTOR_389_GRUNTY_SPELL_FIREBALL, - ACTOR_38A_SPRITE_SMOKE_GREEN_2, + ACTOR_38A_GREEN_BLAST, ACTOR_38B_GRUNTILDA_FINAL_BOSS, ACTOR_39F_FIGHT_FLIGHT_PAD = 0x39F, @@ -3698,7 +3698,7 @@ enum asset_e ASSET_6C4_SPRITE_SMOKE_YELLOW, ASSET_6C5_SPRITE_SMOKE_ORANGE, ASSET_6C6_SPRITE_SMOKE_PINK, - ASSET_6C7_SPRITE_SMOKE_GREEN_2, + ASSET_6C7_GREEN_BLAST, ASSET_6C8_SPRITE_SMOKE_BLUE, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, @@ -4579,7 +4579,7 @@ enum marker_e{ MARKER_25A_PORTRAIT_OF_TEEHEE, MARKER_25B_PORTRAIT_OF_MINION, MARKER_25C_GRUNTY_SPELL_FIREBALL, - MARKER_25D_SPRITE_SMOKE_GREEN_2, + MARKER_25D_GREEN_BLAST, MARKER_25E_GRUNTILDA_FINAL_BOSS, MARKER_25F_ICECUBE_B, diff --git a/include/prop.h b/include/prop.h index b8031639..2542bcc1 100644 --- a/include/prop.h +++ b/include/prop.h @@ -192,7 +192,7 @@ typedef struct actor_s{ u32 unk58_1: 1; u32 unk58_0: 1; f32 unk5C; - f32 unk60; //0x60 + f32 unk60; // actor lifetime? f32 yaw_ideal; //0x64 f32 pitch;//0x68 f32 unk6C; diff --git a/src/core1/code_0.c b/src/core1/code_0.c index fb4e023a..fd93a3c0 100644 --- a/src/core1/code_0.c +++ b/src/core1/code_0.c @@ -5,7 +5,7 @@ #include "gc/gctransition.h" -void func_8023E00C(enum map_e); +void setBootMap(enum map_e); void func_8023DFF0(s32); @@ -27,8 +27,8 @@ u8 pad_8027A138[0x400]; u64 D_8027A538; u8 pad_8027A540[0x17F8]; OSThread s_MainThread; -s32 D_8027BEE8; -s32 D_8027BEEC; +s32 gBootMap; +s32 gDisableInput; u64 D_8027BEF0; extern u8 core2_TEXT_START[]; @@ -60,12 +60,12 @@ void func_8023DA9C(s32 arg0){ func_8023DA74(); D_8027A130 = arg0; if (D_8027A130 == 3){ - func_802E4214(D_8027BEE8); + func_802E4214(gBootMap); } if (D_8027A130 == 4){ - func_802E35D0(); + dummy_func_802E35D0(); } - func_80255CD8(); + dummy_func_80255CD8(); } u32 globalTimer_getTimeMasked(u32 mask){ @@ -80,40 +80,40 @@ void globalTimer_reset(void){ gGlobalTimer = 0; } -s32 func_8023DB74(void){ +enum map_e getSpecialBootMap(void){ return (DEBUG_use_special_bootmap())? MAP_80_GL_FF_ENTRANCE : MAP_91_FILE_SELECT; } -s32 func_8023DBA4(void){ +enum map_e getDefaultBootMap(void){ return MAP_1F_CS_START_RAREWARE; } void func_8023DBAC(void){ - func_8023E00C(func_8023DBA4()); + setBootMap(getDefaultBootMap()); func_8023DFF0(3); } void func_8023DBDC(void){ - func_8023E00C(func_8023DB74()); + setBootMap(getSpecialBootMap()); func_8023DFF0(3); } void core1_init(void){ func_80255C30(); - func_8023E00C(func_8023DBA4()); + setBootMap(getDefaultBootMap()); rarezip_init(); //initialize decompressor's huft table func_8024BE30(); overlayManagerloadCore2(); D_8027BEF0 = D_8027A538; heap_init(); func_80254028(); - func_8025AFB0(); - func_8033EF58(); + dummy_func_8025AFB0(); + allocUnusedBlock(); assetCache_init(); pfsManager_init(); rumbleManager_init(); audioManager_init(); - func_8025425C(); + graphicsCache_init(); ml_init(); gctransition_reset(); D_8027A130 = 0; @@ -143,9 +143,10 @@ void mainLoop(void){ if(D_8027A130 != 3 || getGameMode() != GAME_MODE_4_PAUSED) globalTimer_incTimer(); - if(!D_8027BEEC) + if(!gDisableInput) pfsManager_update(); - D_8027BEEC = 0; + gDisableInput = 0; + rumbleManager_80250C08(); if(!mapSpecificFlags_validateCRC1()){ @@ -161,7 +162,7 @@ void mainLoop(void){ func_80255ACC(); spawnQueue_func_802C3A18(); if(func_802E4424()) - func_802E3F8C(0); + game_draw(0); spawnQueue_flush(); break; }//L8023DE34 @@ -211,8 +212,8 @@ s32 func_8023E000(void){ return D_8027A130; } -void func_8023E00C(enum map_e map_id){ - D_8027BEE8 = map_id; +void setBootMap(enum map_e map_id){ + gBootMap = map_id; } void mainThread_create(void){ @@ -225,6 +226,6 @@ OSThread *mainThread_get(void){ return &s_MainThread; } -void func_8023E06C(void){ - D_8027BEEC = 1; +void disableInput_set(void){ + gDisableInput = 1; } diff --git a/src/core1/code_15770.c b/src/core1/code_15770.c index f2d9b580..3201401e 100644 --- a/src/core1/code_15770.c +++ b/src/core1/code_15770.c @@ -3,9 +3,9 @@ #include "variables.h" struct { - u16 *unk0; + u16 *data; int unk4; -} D_80282FE0; +} gzBuffer; extern u8 D_8000E800; extern u16 D_803A5D00[2][0xF660]; @@ -13,14 +13,14 @@ extern u16 D_803A5D00[2][0xF660]; void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer); void func_80253190(Gfx **gdl){ - func_80253208(gdl, 0, 0, framebuffer_width, framebuffer_height, D_803A5D00[func_8024BDA0()]); + func_80253208(gdl, 0, 0, framebuffer_width, framebuffer_height, D_803A5D00[getActiveFramebuffer()]); } void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer){ - if( D_80282FE0.unk0 != NULL && (getGameMode() != GAME_MODE_4_PAUSED || func_80335134())){ + if( gzBuffer.data != NULL && (getGameMode() != GAME_MODE_4_PAUSED || func_80335134())){ //draw z_buffer gDPPipeSync((*gdl)++); - gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(D_80282FE0.unk0)); + gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(gzBuffer.data)); gDPSetCycleType((*gdl)++, G_CYC_FILL); gDPSetRenderMode((*gdl)++, G_RM_NOOP, G_RM_NOOP2); gDPSetFillColor((*gdl)++, 0xFFFCFFFC); @@ -33,44 +33,42 @@ void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer){ } int func_80253400(void){ - return D_80282FE0.unk4; + return gzBuffer.unk4; } int func_8025340C(void){ - return D_80282FE0.unk0 != NULL; + return gzBuffer.data != NULL; } -void func_80253420(void){} +void dummy_func_80253420(void){} void func_80253428(int arg0) { u16 *var_v0; int new_var; if (arg0) { - var_v0 = (D_80282FE0.unk0 = &D_8000E800); - while (((s32) D_80282FE0.unk0) % 0x40) {\ - var_v0 = (D_80282FE0.unk0 = var_v0 + 1); + var_v0 = (gzBuffer.data = &D_8000E800); + while (((s32) gzBuffer.data) % 0x40) {\ + var_v0 = (gzBuffer.data = var_v0 + 1); } do { } while ((&D_8000E800 && 1) * 0); //remove this }else{ - D_80282FE0.unk0 = 0; + gzBuffer.data = 0; } - D_80282FE0.unk4 = 0; + gzBuffer.unk4 = 0; } void func_802534A8(int arg0){ - D_80282FE0.unk4 = (D_80282FE0.unk0 != NULL && arg0); + gzBuffer.unk4 = (gzBuffer.data != NULL && arg0); } -//zBuffer_set -void func_802534CC(Gfx **gdl){ - if(D_80282FE0.unk0 && getGameMode() != GAME_MODE_4_PAUSED){ +void zBuffer_set(Gfx **gdl){ + if(gzBuffer.data && getGameMode() != GAME_MODE_4_PAUSED){ gDPPipeSync((*gdl)++); - gDPSetDepthImage((*gdl)++, D_80282FE0.unk0); + gDPSetDepthImage((*gdl)++, gzBuffer.data); } } -//zBuffer_get -void *func_80253540(void){ - return D_80282FE0.unk0; +void *zBuffer_get(void){ + return gzBuffer.data; } diff --git a/src/core1/code_15B30.c b/src/core1/code_15B30.c index 7ba8f1c0..f44e6bbc 100644 --- a/src/core1/code_15B30.c +++ b/src/core1/code_15B30.c @@ -14,28 +14,28 @@ typedef struct { extern u8 D_803A5D00[2][0x1ecc0]; /* .data */ -Gfx *D_80276580[2] = {NULL, NULL}; +Gfx *gGfxStack[2] = {NULL, NULL}; s32 framebuffer_width = 292; s32 framebuffer_height = 216; /* .bss */ -Mtx *D_80282FF0[2]; -Vtx *D_80282FF8[2]; -s32 D_80283000; -s32 D_80283004; +Mtx *gMtxStack[2]; +Vtx *gVtxStack[2]; +s32 gStackSelector; +s32 gTextureFilterPoint; Struct_Core1_15B30 D_80283008[20]; s32 D_802831E8; OSMesgQueue D_802831F0; OSMesg D_80283208; -u16 D_8028320C; -u16 D_8028320E; -u16 D_80283210; -u16 D_80283212; +u16 gScissorBoxLeft; +u16 gScissorBoxRight; +u16 gScissorBoxTop; +u16 gScissorBoxBottom; Gfx *D_80283214; /* .h */ -void func_80254348(void); -void func_80254464(void); +void scissorBox_setDefault(void); +void dummy_func_80254464(void); /* .code */ void func_80253550(void){ @@ -71,13 +71,13 @@ void func_80253640(Gfx ** gdl, void *arg1){ gDPPipelineMode((*gdl)++, G_PM_NPRIMITIVE); gDPSetAlphaCompare((*gdl)++, G_AC_NONE); gDPSetColorDither((*gdl)++, G_CD_MAGICSQ); - gDPSetScissor((*gdl)++, G_SC_NON_INTERLACE, D_8028320C, D_8028320E, D_80283210, D_80283212); + gDPSetScissor((*gdl)++, G_SC_NON_INTERLACE, gScissorBoxLeft, gScissorBoxRight, gScissorBoxTop, gScissorBoxBottom); func_80253208(gdl, 0, 0, framebuffer_width, framebuffer_height, arg1); gDPSetColorImage((*gdl)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_K0_TO_PHYSICAL(arg1)); gDPSetCycleType((*gdl)++, G_CYC_1CYCLE); gDPSetTextureConvert((*gdl)++, G_TC_FILT); gDPSetTextureDetail((*gdl)++, G_TD_CLAMP); - if(D_80283004){ + if(gTextureFilterPoint){ gDPSetTextureFilter((*gdl)++, G_TF_POINT); }else{ gDPSetTextureFilter((*gdl)++, G_TF_BILERP); @@ -85,24 +85,24 @@ void func_80253640(Gfx ** gdl, void *arg1){ gDPSetTextureLOD((*gdl)++, G_TL_TILE); gDPSetTextureLUT((*gdl)++, G_TT_NONE); gDPSetTexturePersp((*gdl)++, G_TP_PERSP); - func_802534CC(gdl); + zBuffer_set(gdl); } -void func_802539AC(Gfx **gdl, s32 arg1){ +void scissorBox_SetForGameMode(Gfx **gdl, s32 framebuffer_idx) { if(getGameMode() == GAME_MODE_8_BOTTLES_BONUS || getGameMode() == GAME_MODE_A_SNS_PICTURE) { - func_8030C710(); + scissorBox_setSmall(); func_80253640(gdl, func_8030C704()); } else{ - func_80254348(); - func_80253640(gdl, D_803A5D00[arg1]); + scissorBox_setDefault(); + func_80253640(gdl, D_803A5D00[framebuffer_idx]); } } -void func_80253A58(Gfx **gfx, s32 arg1){ +void setupScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_address){ gSPSegment((*gfx)++, 0x00, 0x00000000); - gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(arg1)); + gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(framebuffer_address)); gSPClearGeometryMode((*gfx)++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); gSPTexture((*gfx)++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); gSPSetGeometryMode((*gfx)++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH); @@ -113,20 +113,20 @@ void func_80253A58(Gfx **gfx, s32 arg1){ gDPSetColorDither((*gfx)++, G_CD_DISABLE); gDPSetRenderMode((*gfx)++, G_RM_AA_ZB_XLU_LINE, G_RM_AA_ZB_XLU_LINE2); gSPClipRatio((*gfx)++, FRUSTRATIO_1); - gDPSetScissor((*gfx)++, G_SC_NON_INTERLACE, D_8028320C, D_8028320E, D_80283210, D_80283212); + gDPSetScissor((*gfx)++, G_SC_NON_INTERLACE, gScissorBoxLeft, gScissorBoxRight, gScissorBoxTop, gScissorBoxBottom); gDPPipeSync((*gfx)++); } -void func_80253D60(Gfx **gfx, s32 arg1){ - func_80254348(); - func_80253A58(gfx, D_803A5D00[arg1]); +void setupDefaultScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_idx){ + scissorBox_setDefault(); + setupScissorBoxAndFramebuffer(gfx, D_803A5D00[framebuffer_idx]); } void func_80253DC0(Gfx **gfx){ func_802476EC(gfx); } -void func_80253DE0(Gfx **gdl) { +void finishFrame(Gfx **gdl) { gDPFullSync((*gdl)++); gSPEndDisplayList((*gdl)++); } @@ -174,11 +174,11 @@ void func_80253F94(Gfx **arg0, Gfx **arg1){ func_80253EE4(arg0, arg1, 0x40000000); } -void func_80253FB4(u32 *arg0, u32 *arg1, u32 *arg2, u32 *arg3){ - *arg0 = D_8028320C; - *arg1 = D_80283210; - *arg2 = D_8028320E; - *arg3 = D_80283212; +void scissorBox_get(u32 *left, u32 *top, u32 *right, u32 *bottom){ + *left = gScissorBoxLeft; + *top = gScissorBoxTop; + *right = gScissorBoxRight; + *bottom = gScissorBoxBottom; } void func_80253FE8(void){ @@ -194,10 +194,10 @@ void func_80254028(void){ osCreateMesgQueue(&D_802831F0, &D_80283208, 1); osSendMesg(&D_802831F0, NULL, 1); func_80247560(); - func_80254348(); + scissorBox_setDefault(); } -void func_80254084(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b){ +void drawRectangle2D(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b){ gDPPipeSync((*gfx)++); gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE); gDPSetCycleType((*gfx)++, G_CYC_FILL); @@ -206,45 +206,45 @@ void func_80254084(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b){ gDPScisFillRectangle((*gfx)++, x, y, x + w -1, y + h -1); } -void func_802541E8(void){ - if(D_80276580[0]){ - free(D_80276580[0]); - free(D_80276580[1]); - free(D_80282FF0[0]); - free(D_80282FF0[1]); - free(D_80282FF8[0]); - free(D_80282FF8[1]); - D_80276580[0] = NULL; +void graphicsCache_release(void){ + if(gGfxStack[0]){ + free(gGfxStack[0]); + free(gGfxStack[1]); + free(gMtxStack[0]); + free(gMtxStack[1]); + free(gVtxStack[0]); + free(gVtxStack[1]); + gGfxStack[0] = NULL; } } -void func_8025425C(void){ - if(D_80276580[0] == NULL){ - D_80276580[0] = (Gfx *)malloc(29600); - D_80276580[1] = (Gfx *)malloc(29600); - D_80282FF0[0] = (Mtx *)malloc(44800); - D_80282FF0[1] = (Mtx *)malloc(44800); - D_80282FF8[0] = (Vtx *)malloc(6880); - D_80282FF8[1] = (Vtx *)malloc(6880); - func_80254464(); +void graphicsCache_init(void){ + if(gGfxStack[0] == NULL){ + gGfxStack[0] = (Gfx *)malloc(29600); // 3700 dlist commands + gGfxStack[1] = (Gfx *)malloc(29600); + gMtxStack[0] = (Mtx *)malloc(44800); // 700 matrices + gMtxStack[1] = (Mtx *)malloc(44800); + gVtxStack[0] = (Vtx *)malloc(6880); // 430 vertices + gVtxStack[1] = (Vtx *)malloc(6880); + dummy_func_80254464(); } - D_80283000 = 0; - D_80283004 = 0; + gStackSelector = 0; + gTextureFilterPoint = 0; } -void func_802542F4(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - D_8028320C = arg0; - D_80283210 = arg1; - D_8028320E = arg2; - D_80283212 = arg3; - framebuffer_width = arg1 - arg0; - framebuffer_height = arg3 - arg2; +void scissorBox_set(s32 left, s32 top, s32 right, s32 bottom) { + gScissorBoxLeft = left; + gScissorBoxTop = top; + gScissorBoxRight = right; + gScissorBoxBottom = bottom; + framebuffer_width = top - left; + framebuffer_height = bottom - right; func_8024CC5C(); } -void func_80254348(void){ - func_802542F4(0, 0x124, 0, 0xd8); +void scissorBox_setDefault(void){ + scissorBox_set(0, 292, 0, 216); } void func_80254374(s32 arg0) { @@ -259,16 +259,16 @@ void func_80254374(s32 arg0) { func_80246670(sp1C); } -void func_802543EC(void){ - u32 ret_val = D_80283004; - D_80283004 = ret_val < 1; +void toggleTextureFilterPoint(void){ + u32 ret_val = gTextureFilterPoint; + gTextureFilterPoint = ret_val < 1; } -void func_80254404(Gfx **gfx, Mtx **mtx, Vtx **vtx){ - D_80283000 = (1 - D_80283000); - *gfx = D_80276580[D_80283000]; - *mtx = D_80282FF0[D_80283000]; - *vtx = D_80282FF8[D_80283000]; +void getGraphicsStacks(Gfx **gfx, Mtx **mtx, Vtx **vtx){ + gStackSelector = (1 - gStackSelector); + *gfx = gGfxStack[gStackSelector]; + *mtx = gMtxStack[gStackSelector]; + *vtx = gVtxStack[gStackSelector]; } -void func_80254464(void){} +void dummy_func_80254464(void){} diff --git a/src/core1/code_18210.c b/src/core1/code_18210.c index 650109f4..2a72255f 100644 --- a/src/core1/code_18210.c +++ b/src/core1/code_18210.c @@ -18,7 +18,7 @@ void func_80255C30(void) { } } -void func_80255CD8(void){} +void dummy_func_80255CD8(void){} void func_80255CE0(void){ osPiReadIo(0, NULL); diff --git a/src/core1/code_1D590.c b/src/core1/code_1D590.c index 4d2e8c18..a75c8e12 100644 --- a/src/core1/code_1D590.c +++ b/src/core1/code_1D590.c @@ -3,13 +3,13 @@ #include "variables.h" -void func_8025AFB0(void) {} +void dummy_func_8025AFB0(void) {} -void func_8025AFB8(void) {} +void dummy_func_8025AFB8(void) {} -void func_8025AFC0(Gfx **arg0, Mtx **arg1, Vtx **arg2) {} +void dummy_func_8025AFC0(Gfx **arg0, Mtx **arg1, Vtx **arg2) {} -s32 func_8025AFD0(void) +s32 dummy_func_8025AFD0(void) { return 0; } diff --git a/src/core1/code_8C50.c b/src/core1/code_8C50.c index 64f8958a..6e1e9d62 100644 --- a/src/core1/code_8C50.c +++ b/src/core1/code_8C50.c @@ -245,7 +245,7 @@ void func_80246D78(void){ osDpSetStatus(DPC_CLR_FREEZE); D_8027FC14 = D_8027FC18; - func_8025AFB8(); + dummy_func_8025AFB8(); if(D_8027FC14 & 1){ D_80275998 = 0x1E; diff --git a/src/core1/code_E360.c b/src/core1/code_E360.c index 9a6054a7..5a1fd17d 100644 --- a/src/core1/code_E360.c +++ b/src/core1/code_E360.c @@ -56,7 +56,7 @@ OSViMode D_80275CD0 = { // C3A68832 DDC3A724 00000000 00000000 -u32 D_80280720; +u32 gActiveFramebuffer; u32 D_80280724; u32 D_80280728; struct1 D_80280730[8]; @@ -80,15 +80,15 @@ void func_8024C428(void); /* .code */ bool func_8024BD80(void){ sizeof(OSThread); - return NOT(D_80280720); + return NOT(gActiveFramebuffer); } s32 func_8024BD94(void){ return D_80280724; } -s32 func_8024BDA0(void){ - return D_80280720; +s32 getActiveFramebuffer(void){ + return gActiveFramebuffer; } void func_8024BDAC(OSMesgQueue *mq, OSMesg msg){ @@ -107,7 +107,7 @@ void func_8024BE30(void){ s32 i; func_8024C428(); - osCreateViManager(0xfe); + osCreateViManager(OS_PRIORITY_VIMGR); if(osTvType != OS_TV_NTSC) osViSetMode(&D_80275CD0); //PAL else @@ -120,7 +120,7 @@ void func_8024BE30(void){ osCreateMesgQueue(&D_802807B0, D_802807C8, 1); osCreateMesgQueue(&D_802807D0, D_802807E8, 60); osViSetEvent(&D_80280770,NULL,1); - D_80280720 = 0; + gActiveFramebuffer = 0; D_80280724 = 1; D_80280728 = 0; for(i = 0; i<8; i++){ @@ -162,7 +162,7 @@ void func_8024BFD8(s32 arg0){ osRecvMesg(&D_802807D0, NULL, OS_MESG_NOBLOCK); } - osViSwapBuffer(D_803A5D00[D_80280720 = func_8024BD80()]); + osViSwapBuffer(D_803A5D00[gActiveFramebuffer = func_8024BD80()]); D_80280E90 = 0; while(!(osDpGetStatus() & 2) && osViGetCurrentFramebuffer() != osViGetNextFramebuffer()){ osRecvMesg(&D_802807D0, NULL, OS_MESG_BLOCK); @@ -177,7 +177,7 @@ void func_8024BFD8(s32 arg0){ void func_8024C1B4(void){ func_8024BFD8(0); - func_8025AFB8(); + dummy_func_8025AFB8(); } void func_8024C1DC(void){ @@ -195,8 +195,8 @@ void func_8024C1FC(OSMesgQueue *mq, OSMesg msg){ } void func_8024C2A0(s32 arg0) { - D_80280720 = arg0; - osViSwapBuffer(D_803A5D00[D_80280720]); + gActiveFramebuffer = arg0; + osViSwapBuffer(D_803A5D00[gActiveFramebuffer]); } void func_8024C2F8(void *arg0){ diff --git a/src/core1/memory.c b/src/core1/memory.c index c0c3d9a9..6c83ac94 100644 --- a/src/core1/memory.c +++ b/src/core1/memory.c @@ -804,7 +804,7 @@ void func_80255A3C(void){ if(!func_802559A0()){ ml_defrag(); - func_80254464(); + dummy_func_80254464(); } } diff --git a/src/core2/ch/bottlesbonuscursor.c b/src/core2/ch/bottlesbonuscursor.c index 49615def..46faccf4 100644 --- a/src/core2/ch/bottlesbonuscursor.c +++ b/src/core2/ch/bottlesbonuscursor.c @@ -154,7 +154,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_80253208(gfx, (s32)(D_8037E5C0.unk18[0] - sp3C/2), (s32)(D_8037E5C0.unk18[1] - sp3C/2), (s32)sp3C, (s32)sp3C, - D_803A5D00[func_8024BDA0()] + D_803A5D00[getActiveFramebuffer()] ); modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, func_80330B1C(chBottlesBonusCursorMarker)); func_8024E030(this->position, D_8037E5C0.unk10); diff --git a/src/core2/code_5C240.c b/src/core2/code_5C240.c index d07e2479..55799da4 100644 --- a/src/core2/code_5C240.c +++ b/src/core2/code_5C240.c @@ -46,24 +46,24 @@ void func_802E329C(s32 arg0, Gfx **gfx_begin, Gfx **gfx_end) { Vtx *vtx; Vtx *vtx_start; - func_80254404(&gfx, &mtx, &vtx); + getGraphicsStacks(&gfx, &mtx, &vtx); gfx_start = gfx; mtx_start = mtx; vtx_start = vtx; - func_802539AC(&gfx, arg0); + scissorBox_SetForGameMode(&gfx, arg0); if (D_8037E8C0.unk14 == 2) { - func_80254084(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0); + drawRectangle2D(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0); } if ((D_8037E8C0.unk14 == 0) || (D_8037E8C0.unk14 == 3)) { func_8024C904(&gfx, &mtx); gcbound_draw(&gfx); } if (D_8037E8C0.unk14 == 1) { - func_80254084(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0); + drawRectangle2D(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0); func_8024C904(&gfx, &mtx); func_802F1858(D_8037E8C0.unk10, &gfx, &mtx, &vtx); } - func_80253DE0(&gfx); + finishFrame(&gfx); osWritebackDCache(mtx_start, (mtx - mtx_start) * sizeof(Mtx)); osWritebackDCache(vtx_start, (vtx - vtx_start) * sizeof(Vtx)); *gfx_begin = gfx_start; @@ -83,7 +83,7 @@ void func_802E3460(s32 arg0) { if (func_8025AD7C(COMUSIC_31_GAME_OVER)) { comusic_8025AB44(COMUSIC_31_GAME_OVER, 0, 200); } - func_802F1934(D_8037E8C0.unk10, func_8024BDA0()); + func_802F1934(D_8037E8C0.unk10, getActiveFramebuffer()); } else if (D_8037E8C0.unk14 == 3) { D_8037E8C0.unk0 = 0.0f; @@ -106,11 +106,11 @@ void func_802E3580(void) { func_802F1884(D_8037E8C0.unk10); func_802E5F68(); comusicPlayer_free(); - func_80253420(); + dummy_func_80253420(); func_8024BF94(2); } -void func_802E35D0(void){} +void dummy_func_802E35D0(void){} void func_802E35D8(void ) { s32 sp40[6]; diff --git a/src/core2/code_5C870.c b/src/core2/code_5C870.c index 1b0c87b5..7e24cae3 100644 --- a/src/core2/code_5C870.c +++ b/src/core2/code_5C870.c @@ -74,7 +74,7 @@ void func_802E3854(void){ int i; func_8033B61C(); - func_80254464(); + dummy_func_80254464(); for(i = 0; i < 0xF; i++){ func_802E6820(5); modelRender_defrag(); @@ -115,16 +115,16 @@ void func_802E398C(s32 arg0) { } } -void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 arg3, s32 arg4){ +void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 framebuffer_idx, s32 arg4){ Mtx* m_start = *mptr; Vtx* v_start = *vptr; - func_802539AC(gdl, arg3); + scissorBox_SetForGameMode(gdl, framebuffer_idx); D_8037E8E0.unkC = FALSE; func_80334540(gdl, mptr, vptr); if(!arg4){ func_802E67AC(); - func_802E3BD0(func_8024BDA0()); + func_802E3BD0(getActiveFramebuffer()); func_802E67C4(); func_802E5F10(gdl); } @@ -147,7 +147,7 @@ void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 arg3, s32 arg4){ gcpausemenu_draw(gdl, mptr, vptr); if(!game_is_frozen()){ - func_8025AFC0(gdl, mptr, vptr); + dummy_func_8025AFC0(gdl, mptr, vptr); } gcdialog_draw(gdl, mptr, vptr); @@ -163,7 +163,7 @@ void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 arg3, s32 arg4){ ){ gctransition_draw(gdl, mptr, vptr); } - func_80253DE0(gdl); + finishFrame(gdl); osWritebackDCache(m_start, sizeof(Mtx)*( *mptr - m_start)); osWritebackDCache(v_start, sizeof(Vtx)*( *vptr - v_start)); } @@ -282,29 +282,33 @@ s32 func_802E3F80(void){ return D_8037E8E0.unk0; } -//game_draw -void func_802E3F8C(s32 arg0){ - Gfx *sp34; +void game_draw(s32 arg0){ + Gfx *gfx; Gfx *gfx_start; Gfx *sp2C; - Mtx *sp28; - Vtx *sp24; - if(arg0){ - func_80254348(); + Mtx *mtx; + Vtx *vtx; + + if(arg0) { + scissorBox_setDefault(); } - func_80254404(&sp34, &sp28, &sp24); + getGraphicsStacks(&gfx, &mtx, &vtx); + if(D_8037E8E0.unkC == 1){ - func_80254404(&sp34, &sp28, &sp24); + getGraphicsStacks(&gfx, &mtx, &vtx); } - gfx_start = sp34; - func_802E39D0(&sp34, &sp28, &sp24, func_8024BDA0(), arg0); + + gfx_start = gfx; + func_802E39D0(&gfx, &mtx, &vtx, getActiveFramebuffer(), arg0); + if(D_8037E8E0.unkC == 0){ - sp2C = sp34; + sp2C = gfx; func_8024C1DC(); func_80253EC4(gfx_start, sp2C); - if(arg0){ - func_80254348(); + + if(arg0) { + scissorBox_setDefault(); } } } @@ -364,7 +368,7 @@ void func_802E4170(void){ timedFuncQueue_free(); func_802F9C48(); modelRender_free(); - func_80253420(); + dummy_func_80253420(); func_802E398C(0); func_8030AFD8(0); func_80321854(); @@ -399,7 +403,7 @@ void func_802E4214(enum map_e map_id){ viewport_reset(); viewport_set_near_far(1.0f, 10000.0f); rand_reset(); - func_80254348(); + scissorBox_setDefault(); func_80253FE8(); func_8033DC70(); func_8033DC04(); diff --git a/src/core2/code_77E50.c b/src/core2/code_77E50.c index f1fc3e63..987ecc94 100644 --- a/src/core2/code_77E50.c +++ b/src/core2/code_77E50.c @@ -11,7 +11,7 @@ void func_802FEDE0(BKTextureList *texture_list, s32 indx, s32 x_offset, s32 y_of s32 x; sp24 = (u16*)func_802EA620(texture_list) + indx*32*32; - frame_buffer_ptr = D_803A5D00[func_8024BDA0()]; + frame_buffer_ptr = D_803A5D00[getActiveFramebuffer()]; for(y = 0; y < 32; y++){//L802FEE60 for(x = 0; x < 32; x++){//L802FEE68 sp24[32*(31 - y) + x] = frame_buffer_ptr[(y_offset + y)*framebuffer_width + (x_offset + x)] | 1; //framebuffer to texture??? @@ -25,7 +25,7 @@ void func_802FEF48(BKModelBin *model_bin){ s32 x, y; texture_list = model_getTextureList(model_bin); - osInvalDCache((void *)D_803A5D00[func_8024BDA0()], framebuffer_width * framebuffer_height*2); + osInvalDCache((void *)D_803A5D00[getActiveFramebuffer()], framebuffer_width * framebuffer_height*2); for(y = 0; y < 8; y++){//L802FEFEC for(x = 0; x < 10; x++){ diff --git a/src/core2/code_851D0.c b/src/core2/code_851D0.c index a4fb0185..e39b1218 100644 --- a/src/core2/code_851D0.c +++ b/src/core2/code_851D0.c @@ -90,8 +90,8 @@ void func_8030C27C(void){ } void func_8030C2D4(Gfx **gdl, Mtx **mptr, Vtx **vptr){ - func_80254348(); - func_80253640(gdl, D_803A5D00[func_8024BDA0()]); + scissorBox_setDefault(); + func_80253640(gdl, D_803A5D00[getActiveFramebuffer()]); } // Draws a 160x128 image pointed to by D_80382450 into the center of the screen @@ -128,6 +128,6 @@ s32 func_8030C704(void){ return D_80382450; } -void func_8030C710(void){ - func_802542F4(0, 0xA0, 0, 0x80); +void scissorBox_setSmall(void){ + scissorBox_set(0, 160, 0, 128); } diff --git a/src/core2/code_8DC20.c b/src/core2/code_8DC20.c index f6908fc4..518bec41 100644 --- a/src/core2/code_8DC20.c +++ b/src/core2/code_8DC20.c @@ -53,13 +53,13 @@ void func_80314BB0(Gfx **gfx, Mtx **mtx, Vtx **vtx, void * frame_buffer_1, void } } gSPDisplayList((*gfx)++, D_8036C690); - gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(D_803A5D00[func_8024BDA0()])); + gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(D_803A5D00[getActiveFramebuffer()])); } void func_80315084(Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_80335128(0); D_803830A0 = 2; - func_80314BB0(gfx, mtx, vtx, func_80253540(), D_803A5D00[func_8024BDA0()]); + func_80314BB0(gfx, mtx, vtx, zBuffer_get(), D_803A5D00[getActiveFramebuffer()]); } void func_80315110(Gfx **gfx, Mtx **mtx, Vtx **vtx){ @@ -72,7 +72,7 @@ void func_80315110(Gfx **gfx, Mtx **mtx, Vtx **vtx){ else{ D_803830A0--; } - func_80314BB0(gfx, mtx, vtx, D_803A5D00[func_8024BDA0()], func_80253540()); + func_80314BB0(gfx, mtx, vtx, D_803A5D00[getActiveFramebuffer()], zBuffer_get()); } void func_803151D0(Gfx **gfx, Mtx **mtx, Vtx **vtx){ diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 4bbeee08..79c8c55b 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -63,7 +63,7 @@ f32 D_8036E598[4] = {1000.f, 20.0f, 10.5f, 1.0f}; /* .bss */ -Actor *D_80383390; +Actor *suLastBaddie; s32 D_80383394; Actor *suBaddieJiggyArray[14]; //array of jiggy actor ptrs @@ -768,267 +768,270 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ suBaddieActorArray->cnt = 0; suBaddieActorArray->max_cnt = 20; } - //i = suBaddieActorArray->cnt + 1; + if(suBaddieActorArray->cnt + 1 > suBaddieActorArray->max_cnt){ suBaddieActorArray->max_cnt = suBaddieActorArray->cnt + 5; suBaddieActorArray = (ActorArray *)realloc(suBaddieActorArray, sizeof(ActorArray) + suBaddieActorArray->max_cnt*sizeof(Actor)); } + ++suBaddieActorArray->cnt; - D_80383390 = &suBaddieActorArray->data[suBaddieActorArray->cnt - 1]; - D_80383390->actor_info = actorInfo; - D_80383390->unk10_25 = 0; - D_80383390->unk10_18 = 0; - D_80383390->state = actorInfo->startAnimation; - D_80383390->position_x = (f32)position[0]; - D_80383390->position_y = (f32)position[1]; - D_80383390->position_z = (f32)position[2]; - D_80383390->unkF4_8 = 0; - D_80383390->yaw = (f32) yaw; - D_80383390->yaw_ideal = (f32) yaw; - D_80383390->pitch = 0.0f; - D_80383390->roll = 0.0f; - D_80383390->unk6C = 0.0f; - D_80383390->unk28 = 0.0f; - D_80383390->unk10_12 = 0; - D_80383390->unk38_0 = 0; - D_80383390->unk38_31 = 0; - D_80383390->unk58_0 = 1; - D_80383390->unk40 = 0; - D_80383390->unk44_31 = 0; - D_80383390->despawn_flag = 0; - D_80383390->unk44_14 = -1; - D_80383390->unk48 = 0.0f; - D_80383390->unk4C = 100.0f; - D_80383390->unk10_1 = 1; - D_80383390->unkF4_30 = 0; - D_80383390->unkF4_29 = 0; - D_80383390->scale = 1.0f; - D_80383390->unk124_7 = 0; - D_80383390->unk124_6 = 1; - D_80383390->modelCacheIndex = actorInfo->actorId; - D_80383390->unk44_2 = func_80326C18(); - D_80383390->marker = func_8032F9DC(position, actorInfo->draw_func, (func_8033B64C(actorInfo->modelId) == 1) ? 0 : 1, actorInfo->markerId, (flags & 0x400) ? 1 : 0); - D_80383390->marker->unk3E_0 = 1; - D_80383390->unk138_28 = 1; - D_80383390->unk10_3 = -1; - D_80383390->unk10_4 = 0; - D_80383390->unk10_8 = 0; - D_80383390->unk10_7 = 0; - D_80383390->unk10_6 = 0; - D_80383390->unk54 = 0.0f; - D_80383390->unk58_31 = 0; - D_80383390->unk5C = 0.0f; - D_80383390->unkF4_31 = 0; - D_80383390->unk138_30 = 0; - D_80383390->unk138_3 = 0; - D_80383390->unk38_21 = 0; - D_80383390->unk38_13 = 0; - D_80383390->unk78_22 = 0; - D_80383390->unk78_31 = 0; - D_80383390->unk74 = 0.0f; - D_80383390->unk70 = 0.0f; - D_80383390->unkF4_24 = 0; - D_80383390->unk140 = 0.0f; - D_80383390->unk144 = 0.0f; - D_80383390->unk44_1 = 0; - D_80383390->unk44_0 = 0; - D_80383390->initialized = FALSE; - D_80383390->unk16C_4 = 0; - D_80383390->unk60 = 0.0f; - D_80383390->unk10_0 = 0; - D_80383390->unk104 = NULL; - D_80383390->unk100 = NULL; - D_80383390->unk158[0] = NULL; - D_80383390->unk158[1] = NULL; - D_80383390->unk78_13 = 0; - D_80383390->unk124_31 = 0; - D_80383390->unkF4_20 = 0; - D_80383390->sound_timer = 0.0f; - func_8032FFD4(D_80383390->marker, suBaddieActorArray->cnt - 1); - marker_setModelId(D_80383390->marker, actorInfo->modelId); - func_803300C8(D_80383390->marker, actorInfo->update_func); - func_803300D0(D_80383390->marker, actorInfo->unk10); - ml_vec3f_clear(D_80383390->unk1C); - ml_vec3f_clear(D_80383390->velocity); - ml_vec3f_clear(D_80383390->spawn_position); - D_80383390->stored_animctrl_index = 0; - D_80383390->unk58_2 = 1; - D_80383390->stored_animctrl_playbackType_ = 0; - D_80383390->stored_animctrl_forwards = 0; - D_80383390->stored_animctrl_smoothTransistion = 0; - D_80383390->stored_animctrl_duration = 0.0f; - D_80383390->unkEC = 0.0f; - D_80383390->unk138_19 = 0; - D_80383390->stored_animctrl_subrangeMin = 0.0f; - D_80383390->stored_animctrl_subrangeMax = 1.0f; - D_80383390->unkF4_22 = 0; - D_80383390->unk58_1 = 0; - D_80383390->unk138_29 = 0; - D_80383390->unk18 = actorInfo->animations; - D_80383390->animctrl = NULL; - D_80383390->unkEC = 0.0f; - D_80383390->unk130 = 0; - D_80383390->unk124_5 = 0; - D_80383390->unk124_3 = 0; - D_80383390->unk138_9 = 0; - D_80383390->unk138_8 = 0; - D_80383390->unk138_25 = 0; - D_80383390->unk16C_3 = 0; - D_80383390->unk16C_2 = 0; - D_80383390->unk16C_1 = 0; - D_80383390->unk16C_0 = 0; - D_80383390->unk17C_31 = 0; - D_80383390->unk14C[0] = NULL; - D_80383390->unk14C[1] = NULL; - D_80383390->unk138_27 = 0; - D_80383390->unk138_24 = 0; - D_80383390->unk138_23 = 0; - D_80383390->unk138_22 = 0; - D_80383390->unk138_21 = 0; - D_80383390->unk138_20 = 0; - D_80383390->unk174 = 0.0f; - D_80383390->unk178 = 0.0f; + suLastBaddie = &suBaddieActorArray->data[suBaddieActorArray->cnt - 1]; + + suLastBaddie->actor_info = actorInfo; + suLastBaddie->unk10_25 = 0; + suLastBaddie->unk10_18 = 0; + suLastBaddie->state = actorInfo->startAnimation; + suLastBaddie->position_x = (f32)position[0]; + suLastBaddie->position_y = (f32)position[1]; + suLastBaddie->position_z = (f32)position[2]; + suLastBaddie->unkF4_8 = 0; + suLastBaddie->yaw = (f32) yaw; + suLastBaddie->yaw_ideal = (f32) yaw; + suLastBaddie->pitch = 0.0f; + suLastBaddie->roll = 0.0f; + suLastBaddie->unk6C = 0.0f; + suLastBaddie->unk28 = 0.0f; + suLastBaddie->unk10_12 = 0; + suLastBaddie->unk38_0 = 0; + suLastBaddie->unk38_31 = 0; + suLastBaddie->unk58_0 = 1; + suLastBaddie->unk40 = 0; + suLastBaddie->unk44_31 = 0; + suLastBaddie->despawn_flag = 0; + suLastBaddie->unk44_14 = -1; + suLastBaddie->unk48 = 0.0f; + suLastBaddie->unk4C = 100.0f; + suLastBaddie->unk10_1 = 1; + suLastBaddie->unkF4_30 = 0; + suLastBaddie->unkF4_29 = 0; + suLastBaddie->scale = 1.0f; + suLastBaddie->unk124_7 = 0; + suLastBaddie->unk124_6 = 1; + suLastBaddie->modelCacheIndex = actorInfo->actorId; + suLastBaddie->unk44_2 = func_80326C18(); + suLastBaddie->marker = func_8032F9DC(position, actorInfo->draw_func, (func_8033B64C(actorInfo->modelId) == 1) ? 0 : 1, actorInfo->markerId, (flags & 0x400) ? 1 : 0); + suLastBaddie->marker->unk3E_0 = 1; + suLastBaddie->unk138_28 = 1; + suLastBaddie->unk10_3 = -1; + suLastBaddie->unk10_4 = 0; + suLastBaddie->unk10_8 = 0; + suLastBaddie->unk10_7 = 0; + suLastBaddie->unk10_6 = 0; + suLastBaddie->unk54 = 0.0f; + suLastBaddie->unk58_31 = 0; + suLastBaddie->unk5C = 0.0f; + suLastBaddie->unkF4_31 = 0; + suLastBaddie->unk138_30 = 0; + suLastBaddie->unk138_3 = 0; + suLastBaddie->unk38_21 = 0; + suLastBaddie->unk38_13 = 0; + suLastBaddie->unk78_22 = 0; + suLastBaddie->unk78_31 = 0; + suLastBaddie->unk74 = 0.0f; + suLastBaddie->unk70 = 0.0f; + suLastBaddie->unkF4_24 = 0; + suLastBaddie->unk140 = 0.0f; + suLastBaddie->unk144 = 0.0f; + suLastBaddie->unk44_1 = 0; + suLastBaddie->unk44_0 = 0; + suLastBaddie->initialized = FALSE; + suLastBaddie->unk16C_4 = 0; + suLastBaddie->unk60 = 0.0f; + suLastBaddie->unk10_0 = 0; + suLastBaddie->unk104 = NULL; + suLastBaddie->unk100 = NULL; + suLastBaddie->unk158[0] = NULL; + suLastBaddie->unk158[1] = NULL; + suLastBaddie->unk78_13 = 0; + suLastBaddie->unk124_31 = 0; + suLastBaddie->unkF4_20 = 0; + suLastBaddie->sound_timer = 0.0f; + func_8032FFD4(suLastBaddie->marker, suBaddieActorArray->cnt - 1); + marker_setModelId(suLastBaddie->marker, actorInfo->modelId); + func_803300C8(suLastBaddie->marker, actorInfo->update_func); + func_803300D0(suLastBaddie->marker, actorInfo->unk10); + ml_vec3f_clear(suLastBaddie->unk1C); + ml_vec3f_clear(suLastBaddie->velocity); + ml_vec3f_clear(suLastBaddie->spawn_position); + suLastBaddie->stored_animctrl_index = 0; + suLastBaddie->unk58_2 = 1; + suLastBaddie->stored_animctrl_playbackType_ = 0; + suLastBaddie->stored_animctrl_forwards = 0; + suLastBaddie->stored_animctrl_smoothTransistion = 0; + suLastBaddie->stored_animctrl_duration = 0.0f; + suLastBaddie->unkEC = 0.0f; + suLastBaddie->unk138_19 = 0; + suLastBaddie->stored_animctrl_subrangeMin = 0.0f; + suLastBaddie->stored_animctrl_subrangeMax = 1.0f; + suLastBaddie->unkF4_22 = 0; + suLastBaddie->unk58_1 = 0; + suLastBaddie->unk138_29 = 0; + suLastBaddie->unk18 = actorInfo->animations; + suLastBaddie->animctrl = NULL; + suLastBaddie->unkEC = 0.0f; + suLastBaddie->unk130 = 0; + suLastBaddie->unk124_5 = 0; + suLastBaddie->unk124_3 = 0; + suLastBaddie->unk138_9 = 0; + suLastBaddie->unk138_8 = 0; + suLastBaddie->unk138_25 = 0; + suLastBaddie->unk16C_3 = 0; + suLastBaddie->unk16C_2 = 0; + suLastBaddie->unk16C_1 = 0; + suLastBaddie->unk16C_0 = 0; + suLastBaddie->unk17C_31 = 0; + suLastBaddie->unk14C[0] = NULL; + suLastBaddie->unk14C[1] = NULL; + suLastBaddie->unk138_27 = 0; + suLastBaddie->unk138_24 = 0; + suLastBaddie->unk138_23 = 0; + suLastBaddie->unk138_22 = 0; + suLastBaddie->unk138_21 = 0; + suLastBaddie->unk138_20 = 0; + suLastBaddie->unk174 = 0.0f; + suLastBaddie->unk178 = 0.0f; if( actorInfo->animations){ - sp54 = &D_80383390->unk18[D_80383390->state]; + sp54 = &suLastBaddie->unk18[suLastBaddie->state]; if(sp54->index != 0){ - D_80383390->animctrl = animctrl_new(0); - animctrl_reset(D_80383390->animctrl); - animctrl_setIndex(D_80383390->animctrl, sp54->index); - animctrl_setDuration(D_80383390->animctrl, sp54->duration); - animctrl_start(D_80383390->animctrl, "subaddie.c", 0x4A5); + suLastBaddie->animctrl = animctrl_new(0); + animctrl_reset(suLastBaddie->animctrl); + animctrl_setIndex(suLastBaddie->animctrl, sp54->index); + animctrl_setDuration(suLastBaddie->animctrl, sp54->duration); + animctrl_start(suLastBaddie->animctrl, "subaddie.c", 0x4A5); } }//L80327BA8 - D_80383390->unk124_11 = 0; - D_80383390->alpha_124_19 = 0xff; - D_80383390->depth_mode = MODEL_RENDER_DEPTH_FULL; - D_80383390->unk124_0 = D_80383390->unk138_31 = 1; + suLastBaddie->unk124_11 = 0; + suLastBaddie->alpha_124_19 = 0xff; + suLastBaddie->depth_mode = MODEL_RENDER_DEPTH_FULL; + suLastBaddie->unk124_0 = suLastBaddie->unk138_31 = 1; for(i = 0; i < 0x10; i++){ - ((s32 *)D_80383390->unk7C)[i] = 0; + ((s32 *)suLastBaddie->unk7C)[i] = 0; } for(i = 0; i < 0x0C; i++){ - ((s32 *)D_80383390->unkBC)[i] = 0; + ((s32 *)suLastBaddie->unkBC)[i] = 0; } if(flags & ACTOR_FLAG_UNKNOWN_0){ - D_80383390->unk10_25 = func_80306DDC(position) + 1; - if(D_80383390->unk10_25 == 0){ - D_80383390->unk10_25 = 0; + suLastBaddie->unk10_25 = func_80306DDC(position) + 1; + if(suLastBaddie->unk10_25 == 0){ + suLastBaddie->unk10_25 = 0; }else{ sp44[0] = (f32)position[0]; sp44[1] = (f32)position[1]; sp44[2] = (f32)position[2]; - D_80383390->unk10_18 = func_80307258(&sp44, D_80383390->unk10_25 - 1, 0) + 1; + suLastBaddie->unk10_18 = func_80307258(&sp44, suLastBaddie->unk10_25 - 1, 0) + 1; } }//L80327D30 if(flags & ACTOR_FLAG_UNKNOWN_2){ - D_80383390->unk10_1 = 0; + suLastBaddie->unk10_1 = 0; } if(flags & ACTOR_FLAG_UNKNOWN_3){ - D_80383390->unkF4_30 = 1; + suLastBaddie->unkF4_30 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_1){ - D_80383390->marker->unk44 = 1; + suLastBaddie->marker->unk44 = 1; } else if(flags & ACTOR_FLAG_UNKNOWN_6){ - D_80383390->marker->unk44 = func_8034A2C8(); + suLastBaddie->marker->unk44 = func_8034A2C8(); } if(flags & ACTOR_FLAG_UNKNOWN_12){ - func_8033F738(D_80383390->marker); - func_8034BFF8(D_80383390->marker); + func_8033F738(suLastBaddie->marker); + func_8034BFF8(suLastBaddie->marker); } - D_80383390->unk148 = 0; + suLastBaddie->unk148 = 0; if(flags & ACTOR_FLAG_UNKNOWN_11){ - D_80383390->unk148 = skeletalAnim_new(); + suLastBaddie->unk148 = skeletalAnim_new(); } if(flags & ACTOR_FLAG_UNKNOWN_14){ - D_80383390->marker->unk50 = func_803406B0(); + suLastBaddie->marker->unk50 = func_803406B0(); } if(flags & ACTOR_FLAG_UNKNOWN_4){ - D_80383390->unk124_31 = -1; + suLastBaddie->unk124_31 = -1; } if(flags & ACTOR_FLAG_UNKNOWN_7){ - D_80383390->unkF4_22 = 1; + suLastBaddie->unkF4_22 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_19){ - D_80383390->unk58_1 = 1; + suLastBaddie->unk58_1 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_8){ - D_80383390->unk130 = func_803255FC; + suLastBaddie->unk130 = func_803255FC; } if(flags & ACTOR_FLAG_UNKNOWN_9){ - D_80383390->marker->unk40_21 = 1; + suLastBaddie->marker->unk40_21 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_15){ - D_80383390->marker->unk40_20 = 1; + suLastBaddie->marker->unk40_20 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_17){ - D_80383390->marker->unk40_22 = 1; + suLastBaddie->marker->unk40_22 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_22){ - D_80383390->marker->unk40_19 = 1; + suLastBaddie->marker->unk40_19 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_16){ - D_80383390->unk138_9 = 1; + suLastBaddie->unk138_9 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_18){ - D_80383390->unk138_8 = 1; + suLastBaddie->unk138_8 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_21){ - D_80383390->unk138_25 = 1; + suLastBaddie->unk138_25 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_23){ - D_80383390->unk16C_3 = 1; + suLastBaddie->unk16C_3 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_24){ - D_80383390->unk16C_2 = 1; + suLastBaddie->unk16C_2 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_25){ - D_80383390->unk16C_1 = 1; + suLastBaddie->unk16C_1 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_26){ - D_80383390->unk17C_31 = 1; + suLastBaddie->unk17C_31 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_13){ - D_80383390->unk138_29 = 1; + suLastBaddie->unk138_29 = 1; } if(flags & ACTOR_FLAG_UNKNOWN_20){ - D_80383390->unk58_2 = 0; + suLastBaddie->unk58_2 = 0; } - D_80383390->unk154 = 0x005e0000; - D_80383390->marker->unk54 = func_8032B5C0; + suLastBaddie->unk154 = 0x005e0000; + suLastBaddie->marker->unk54 = func_8032B5C0; for(i = 0; i < 3; ++i){ - D_80383390->unk164[i] = 0x63; + suLastBaddie->unk164[i] = 0x63; } - D_80383390->unk170 = -10.0f; - D_80383390->unk138_7 = 0; - D_80383390->unk3C = flags; - return D_80383390; + suLastBaddie->unk170 = -10.0f; + suLastBaddie->unk138_7 = 0; + suLastBaddie->unk3C = flags; + + return suLastBaddie; } static void __actor_free(ActorMarker *arg0, Actor *arg1){ diff --git a/src/core2/code_AD5B0.c b/src/core2/code_AD5B0.c index f6a990c4..4949adbb 100644 --- a/src/core2/code_AD5B0.c +++ b/src/core2/code_AD5B0.c @@ -29,7 +29,7 @@ void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) { f32 sp40; if (D_803835E0 == 0) { - func_80254084(gdl, 0, 0, framebuffer_width, framebuffer_height, 0, 0, 0); + drawRectangle2D(gdl, 0, 0, framebuffer_width, framebuffer_height, 0, 0, 0); func_802BBD2C(&sp44, &sp40); viewport_set_near_far(sp44, sp40); func_8024C904(gdl, mptr); diff --git a/src/core2/code_B7F40.c b/src/core2/code_B7F40.c index f098b389..b6bee4c2 100644 --- a/src/core2/code_B7F40.c +++ b/src/core2/code_B7F40.c @@ -2,53 +2,53 @@ #include "functions.h" #include "variables.h" -void func_8033EF08(void); -void func_8033EF10(void); +void dummy_func_8033EF08(void); +void dummy_func_8033EF10(void); /* .data */ -void *D_80371E60 = NULL; +void *gUnusedBlock = NULL; /* .code */ -void func_8033EED0(void){ - func_8033EF10(); - func_8033EF08(); +void dummy_func_8033EED0(void){ + dummy_func_8033EF10(); + dummy_func_8033EF08(); } -void func_8033EEF8(void){} +void dummy_func_8033EEF8(void){} -void func_8033EF00(void){} +void dummy_func_8033EF00(void){} -void func_8033EF08(void){} +void dummy_func_8033EF08(void){} -void func_8033EF10(void){} +void dummy_func_8033EF10(void){} -void func_8033EF18(s32 arg0, s32 arg1){ +void dummy_func_8033EF18(s32 arg0, s32 arg1){ return; } -void func_8033EF24(void){ - if(D_80371E60){ - free(D_80371E60); +void unallocUnusedBlock(void){ + if(gUnusedBlock){ + free(gUnusedBlock); } - D_80371E60 = NULL; + gUnusedBlock = NULL; } -void func_8033EF58(void){ - D_80371E60 = malloc(0x50); +void allocUnusedBlock(void){ + gUnusedBlock = malloc(80); } -void func_8033EF7C(s32 arg0){ +void dummy_func_8033EF7C(s32 arg0){ return; } -void func_8033EF84(void){} +void dummy_func_8033EF84(void){} -void func_8033EF8C(void){} +void dummy_func_8033EF8C(void){} -void func_8033EF94(s32 arg0){ +void dummy_func_8033EF94(s32 arg0){ return; } -void func_8033EF9C(s32 arg0){ +void dummy_func_8033EF9C(s32 arg0){ return; } diff --git a/src/core2/code_E910.c b/src/core2/code_E910.c index ca026660..80db2d2c 100644 --- a/src/core2/code_E910.c +++ b/src/core2/code_E910.c @@ -282,7 +282,7 @@ void func_80295C14(void){ stateTimer_update(); func_8029E100(); pfsManager_update();//controller_update - func_8023E06C(); + disableInput_set(); func_80295448(); func_8029B174(); func_8029533C(); //dive_cooldown_update diff --git a/src/core2/fx/common3score.c b/src/core2/fx/common3score.c index 9c5e041c..09918d5f 100644 --- a/src/core2/fx/common3score.c +++ b/src/core2/fx/common3score.c @@ -209,7 +209,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx, if(a1->unk6C == 0.0f){ a1->unk6C = 1.1*(vtxList_getGlobalNorm(model_getVtxList(a1->model)) * a1->unk3C); } - func_80253208(gfx, a1->unk30 - a1->unk6C, sp40 - a1->unk6C, 2*a1->unk6C, 2*a1->unk6C, D_803A5D00[func_8024BDA0()]); + func_80253208(gfx, a1->unk30 - a1->unk6C, sp40 - a1->unk6C, 2*a1->unk6C, 2*a1->unk6C, D_803A5D00[getActiveFramebuffer()]); if(a1->anim_ctrl != NULL){ animctrl_drawSetup(a1->anim_ctrl, sp5C, 1); } diff --git a/src/core2/gc/sky.c b/src/core2/gc/sky.c index f0453c9b..a650a7d2 100644 --- a/src/core2/gc/sky.c +++ b/src/core2/gc/sky.c @@ -76,7 +76,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){ viewport_set_near_far(5.0f, 15000.0f); if(gcSky.model_bins[0]){ - func_80254084(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height,0, 0, 0); //fill screen with black + drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height,0, 0, 0); //fill screen with black func_8024C904(gfx, mtx); viewport_get_position_vec3f(position); for(i = 0; i < 3; i++){ @@ -90,7 +90,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){ } } else{//L8030B200 - func_80254084(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height, 0, 0, 0); + drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height, 0, 0, 0); }//L8030B254 } diff --git a/src/fight/chspellfireball.c b/src/fight/chspellfireball.c index 4fc80f92..39ef4e29 100644 --- a/src/fight/chspellfireball.c +++ b/src/fight/chspellfireball.c @@ -98,64 +98,64 @@ void func_8038EB90(ActorMarker *arg0, f32 *arg1) { temp_v0->position_y = temp_v0->position_y + 210.0f; } -void func_8038EBE0(f32 arg0[3], u32 arg1, enum asset_e arg2, f32 arg3[6], f32 arg4[6], f32 arg5[6], f32 arg6[4], f32 arg7[4], f32 arg8[2]) { - ParticleEmitter *temp_v0 = partEmitMgr_newEmitter(arg1); +void chSpellFireball_emitSparkles(f32 position[3], u32 count, enum asset_e sprite, f32 position_range[6], f32 acceleration_range[6], f32 velocity_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) { + ParticleEmitter *pe = partEmitMgr_newEmitter(count); - particleEmitter_setSprite(temp_v0, arg2); - particleEmitter_setStartingFrameRange(temp_v0, 1, 6); - particleEmitter_setPosition(temp_v0, arg0); - particleEmitter_setParticleSpawnPositionRange(temp_v0, arg3[0], arg3[1], arg3[2], arg3[3], arg3[4], arg3[5]); - particleEmitter_setParticleAccelerationRange(temp_v0, arg4[0], arg4[1], arg4[2], arg4[3], arg4[4], arg4[5]); - particleEmitter_setParticleVelocityRange(temp_v0, arg5[0], arg5[1], arg5[2], arg5[3], arg5[4], arg5[5]); - particleEmitter_setAngularVelocityRange(temp_v0, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); - func_802EFB70(temp_v0, arg6[0], arg6[1]); - func_802EFB84(temp_v0, arg6[2], arg6[3]); - func_802EF9F8(temp_v0, 0.5f); - func_802EFA18(temp_v0, 3); - particleEmitter_setSpawnIntervalRange(temp_v0, arg7[0], arg7[1]); - particleEmitter_setParticleLifeTimeRange(temp_v0, arg7[2], arg7[3]); - particleEmitter_setFade(temp_v0, arg8[0], arg8[1]); - func_802EFA78(temp_v0, 1); - particleEmitter_setDrawMode(temp_v0, 4); - particleEmitter_emitN(temp_v0, arg1); + particleEmitter_setSprite(pe, sprite); + particleEmitter_setStartingFrameRange(pe, 1, 6); + particleEmitter_setPosition(pe, position); + particleEmitter_setParticleSpawnPositionRange(pe, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]); + particleEmitter_setParticleAccelerationRange(pe, acceleration_range[0], acceleration_range[1], acceleration_range[2], acceleration_range[3], acceleration_range[4], acceleration_range[5]); + particleEmitter_setParticleVelocityRange(pe, velocity_range[0], velocity_range[1], velocity_range[2], velocity_range[3], velocity_range[4], velocity_range[5]); + particleEmitter_setAngularVelocityRange(pe, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); + func_802EFB70(pe, scale_range[0], scale_range[1]); + func_802EFB84(pe, scale_range[2], scale_range[3]); + func_802EF9F8(pe, 0.5f); + func_802EFA18(pe, 3); + particleEmitter_setSpawnIntervalRange(pe, lifetime_range[0], lifetime_range[1]); + particleEmitter_setParticleLifeTimeRange(pe, lifetime_range[2], lifetime_range[3]); + particleEmitter_setFade(pe, fade[0], fade[1]); + func_802EFA78(pe, 1); + particleEmitter_setDrawMode(pe, 4); + particleEmitter_emitN(pe, count); } -void func_8038ED9C(f32 arg0[3], u32 arg1, s32 arg2, s32 arg3[2], f32 arg4[6], f32 arg5[4], f32 arg6[4], f32 arg7[2]) { - ParticleEmitter *temp_v0 = partEmitMgr_newEmitter(arg2); +void chSpellFireball_emitExplosion(f32 position[3], enum asset_e sprite, s32 count, s32 staring_frame_range[2], f32 position_range[6], f32 scale_range[4], f32 lifetime_range[4], f32 fade[2]) { + ParticleEmitter *pe = partEmitMgr_newEmitter(count); - particleEmitter_setSprite(temp_v0, arg1); - particleEmitter_setStartingFrameRange(temp_v0, arg3[0], arg3[1]); - particleEmitter_setParticleFramerateRange(temp_v0, 8.0f, 8.0f); - particleEmitter_setPosition(temp_v0, arg0); - particleEmitter_setParticleSpawnPositionRange(temp_v0, arg4[0], arg4[1], arg4[2], arg4[3], arg4[4], arg4[5]); - particleEmitter_setParticleVelocityRange(temp_v0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); - func_802EFB70(temp_v0, arg5[0], arg5[1]); - func_802EFB84(temp_v0, arg5[2], arg5[3]); - particleEmitter_setSpawnIntervalRange(temp_v0, arg6[0], arg6[1]); - particleEmitter_setParticleLifeTimeRange(temp_v0, arg6[2], arg6[3]); - particleEmitter_setFade(temp_v0, arg7[0], arg7[1]); - particleEmitter_setDrawMode(temp_v0, PART_EMIT_NO_DEPTH); - func_802EFA78(temp_v0, 1); - particleEmitter_emitN(temp_v0, arg2); + particleEmitter_setSprite(pe, sprite); + particleEmitter_setStartingFrameRange(pe, staring_frame_range[0], staring_frame_range[1]); + particleEmitter_setParticleFramerateRange(pe, 8.0f, 8.0f); + particleEmitter_setPosition(pe, position); + particleEmitter_setParticleSpawnPositionRange(pe, position_range[0], position_range[1], position_range[2], position_range[3], position_range[4], position_range[5]); + particleEmitter_setParticleVelocityRange(pe, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + func_802EFB70(pe, scale_range[0], scale_range[1]); + func_802EFB84(pe, scale_range[2], scale_range[3]); + particleEmitter_setSpawnIntervalRange(pe, lifetime_range[0], lifetime_range[1]); + particleEmitter_setParticleLifeTimeRange(pe, lifetime_range[2], lifetime_range[3]); + particleEmitter_setFade(pe, fade[0], fade[1]); + particleEmitter_setDrawMode(pe, PART_EMIT_NO_DEPTH); + func_802EFA78(pe, 1); + particleEmitter_emitN(pe, count); } -void func_8038EEFC(f32 arg0[3], u32 arg1, f32 *arg2) { - ParticleEmitter *temp_v0 = partEmitMgr_newEmitter(arg1); +void chSpellFireball_emitSmoke(f32 position[3], u32 count, f32 *lifetime_and_spawn_range) { + ParticleEmitter *pe = partEmitMgr_newEmitter(count); - particleEmitter_setSprite(temp_v0, ASSET_70E_SPRITE_SMOKE_2); - particleEmitter_setRGB(temp_v0, D_80391B48); - particleEmitter_setAlpha(temp_v0, 0xEB); - particleEmitter_setStartingFrameRange(temp_v0, 0, 7); - particleEmitter_setPosition(temp_v0, arg0); - particleEmitter_setPositionAndVelocityRanges(temp_v0, &D_80391B54); - func_802EFB70(temp_v0, 0.1f, 0.2f); - func_802EFB84(temp_v0, 3.6f, 4.6f); - particleEmitter_setSpawnIntervalRange(temp_v0, arg2[0], arg2[1]); - particleEmitter_setParticleLifeTimeRange(temp_v0, arg2[2], arg2[3]); - particleEmitter_setFade(temp_v0, 0.05f, 0.1f); - particleEmitter_setDrawMode(temp_v0, PART_EMIT_NO_DEPTH); - func_802EFA78(temp_v0, 1); - particleEmitter_emitN(temp_v0, arg1); + particleEmitter_setSprite(pe, ASSET_70E_SPRITE_SMOKE_2); + particleEmitter_setRGB(pe, D_80391B48); + particleEmitter_setAlpha(pe, 0xEB); + particleEmitter_setStartingFrameRange(pe, 0, 7); + particleEmitter_setPosition(pe, position); + particleEmitter_setPositionAndVelocityRanges(pe, &D_80391B54); + func_802EFB70(pe, 0.1f, 0.2f); + func_802EFB84(pe, 3.6f, 4.6f); + particleEmitter_setSpawnIntervalRange(pe, lifetime_and_spawn_range[0], lifetime_and_spawn_range[1]); + particleEmitter_setParticleLifeTimeRange(pe, lifetime_and_spawn_range[2], lifetime_and_spawn_range[3]); + particleEmitter_setFade(pe, 0.05f, 0.1f); + particleEmitter_setDrawMode(pe, PART_EMIT_NO_DEPTH); + func_802EFA78(pe, 1); + particleEmitter_emitN(pe, count); } void func_8038F01C(void) { @@ -184,31 +184,31 @@ void func_8038F084(ActorMarker *marker){ actor->unk58_0 = 0; actor->scale *= 1.6; if(actor->marker->unk14_20 != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ - func_8038EBE0(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, + chSpellFireball_emitSparkles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74 ); - func_8038EBE0(actor->position, 4, ASSET_715_SPRITE_SPARKLE_RED, + chSpellFireball_emitSparkles(actor->position, 4, ASSET_715_SPRITE_SPARKLE_RED, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74 ); - func_8038EEFC(actor->position, 3, D_80391BFC); - func_8038ED9C(D_803928E8, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391BA4, D_80391BE4, + chSpellFireball_emitSmoke(actor->position, 3, D_80391BFC); + chSpellFireball_emitExplosion(D_803928E8, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391BA4, D_80391BE4, D_80391BAC, D_80391BBC, D_80391BDC ); D_803928E8[1] -= 50.0f; - func_8038ED9C(D_803928E8, ASSET_6C1_SPRITE_SMOKE, 2, D_80391BA4, D_80391BE4, + chSpellFireball_emitExplosion(D_803928E8, ASSET_6C1_SPRITE_SMOKE, 2, D_80391BA4, D_80391BE4, D_80391BAC, D_80391BBC, D_80391BDC ); } else{//L8038F304 - func_8038EBE0(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, + chSpellFireball_emitSparkles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391BCC, D_80391C74 ); - func_8038EEFC(actor->position, 3, D_80391BFC); + chSpellFireball_emitSmoke(actor->position, 3, D_80391BFC); func_8038CED8(actor->position, 0x558, 0.15f, 0.5f); actor->position_y += 260.0f; chbossjinjo_spawnParticles(actor, 0x712, ASSET_6C3_SPRITE_SMOKE_GREEN, 1.6f); @@ -313,13 +313,13 @@ void func_8038F620(Actor *this){ switch(this->marker->unk14_20){ case MARKER_25C_GRUNTY_SPELL_FIREBALL://L8038F8AC - func_8038ED9C(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1, + chSpellFireball_emitExplosion(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391CEC, D_80391D34, D_80391CF4, D_80391D04, D_80391D14 ); break; case MARKER_280_GRUNTY_SPELL_GREEN_ATTACK://L8038F8C8 - func_8038ED9C(this->position, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1, + chSpellFireball_emitExplosion(this->position, ASSET_6C9_SPRITE_GREEN_SPELL_ATTACK, 1, D_80391CEC, D_80391D34, D_80391CF4, D_80391D1C, D_80391D2C ); diff --git a/src/fight/code_0.c b/src/fight/code_0.c index bb02b1f1..2ec3311c 100644 --- a/src/fight/code_0.c +++ b/src/fight/code_0.c @@ -16,7 +16,7 @@ extern ActorInfo chJinjonatorBase; extern ActorInfo chSpellBarrier; extern ActorInfo chSpellFireball; extern ActorInfo chSpellGreen; -extern ActorInfo chSpriteSmokeGreen2; +extern ActorInfo chGreenBlast; extern ActorInfo chJinjonator; extern ActorInfo chBossShadow; @@ -26,7 +26,7 @@ u8 pad_fight_80392740[0x10]; void fight_func_803863F0(void) { spawnableActorList_add(&chSpellFireball, actor_new, 0X108444); - spawnableActorList_add(&chSpriteSmokeGreen2, actor_new, 0X108444); + spawnableActorList_add(&chGreenBlast, actor_new, 0X108444); spawnableActorList_add(&chFinalBoss, actor_new, 0X300468); spawnableActorList_add(&chBossJinjoOrange, actor_new, 0X8464); spawnableActorList_add(&chBossJinjoGreen, actor_new, 0X8464); diff --git a/src/fight/code_9850.c b/src/fight/code_9850.c index d2ab329e..56834e23 100644 --- a/src/fight/code_9850.c +++ b/src/fight/code_9850.c @@ -6,49 +6,49 @@ extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]); extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32); extern Actor *func_80325CAC(ActorMarker *, Gfx **, Mtx **, Vtx**); -void chSpriteSmokeGreen2_update(Actor *this); -Actor *chSpriteSmokeGreen2_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); +void chGreenBlast_update(Actor *this); +Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); /* .data */ -ActorInfo chSpriteSmokeGreen2 = { - MARKER_25D_SPRITE_SMOKE_GREEN_2, ACTOR_38A_SPRITE_SMOKE_GREEN_2, ASSET_6C7_SPRITE_SMOKE_GREEN_2, +ActorInfo chGreenBlast = { + MARKER_25D_GREEN_BLAST, ACTOR_38A_GREEN_BLAST, ASSET_6C7_GREEN_BLAST, 0x1, NULL, - chSpriteSmokeGreen2_update, func_80326224, chSpriteSmokeGreen2_draw, + chGreenBlast_update, func_80326224, chGreenBlast_draw, 0, 0, 1.0f, 0 }; f32 D_80391DE4[4] = {0.6f, 1.0f, 1.0f, 1.0f}; f32 D_80391DF4[4] = {0.3f, 0.3f, 0.3f, 1.0f}; -s32 D_80391E04[2] = {1, 9}; -f32 D_80391E0C[4] = {4.5f, 4.5f, 4.5f, 4.5f}; -f32 D_80391E1C[4] = {0.0f, 0.0f, 0.85f, 1.35f}; -f32 fight_D_80391E2C[2] = {0.6f, 0.7f}; -f32 D_80391E34[6] = {-130.0f, 0.0f, -130.0f, 130.0f, 0.0f, 130.0f}; -f32 D_80391E4C[4] = {1.1f, 1.1f, 4.0f, 5.4f}; +s32 chGreenBlastExplosionStartFrameRange[2] = {1, 9}; +f32 chGreenBlastExplosionScaleRange[4] = {4.5f, 4.5f, 4.5f, 4.5f}; +f32 chGreenBlastExplosionLifetimeRange[4] = {0.0f, 0.0f, 0.85f, 1.35f}; +f32 chGreenBlastExplosionFade[2] = {0.6f, 0.7f}; +f32 chGreenBlastExplosionPositionRange[6] = {-130.0f, 0.0f, -130.0f, 130.0f, 0.0f, 130.0f}; +f32 chGreenBlastSmokeLifetime[4] = {1.1f, 1.1f, 4.0f, 5.4f}; -f32 D_80391E5C[6] = {-20.0f, 0.0f, -20.0f, 20.0f, 40.0f, 20.0f}; -f32 fight_D_80391E74[6] = {0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f}; -f32 D_80391E8C[6] = {-420.0f, 410.0f, -420.0f, 480.0f, 860.0f, 480.0f}; -f32 D_80391EA4[4] = {0.35f, 0.65f, 0.0f, 0.0f}; -f32 D_80391EB4[4] = {0.0f, 0.01f, 2.0f, 2.3f}; -f32 D_80391EC4[2] = { 0.0f, 0.35f}; +f32 chGreenBlastDieSparklesPositionRange[6] = {-20.0f, 0.0f, -20.0f, 20.0f, 40.0f, 20.0f}; +f32 chGreenBlastDieSparklesAccelerationRange[6] = {0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f}; +f32 chGreenBlastDieSparklesVelocityRange[6] = {-420.0f, 410.0f, -420.0f, 480.0f, 860.0f, 480.0f}; +f32 chGreenBlastDieSparklesScaleRange[4] = {0.35f, 0.65f, 0.0f, 0.0f}; +f32 chGreenBlastDieSparklesLifetimeRange[4] = {0.0f, 0.01f, 2.0f, 2.3f}; +f32 chGreenBlastDieSparklesFade[2] = { 0.0f, 0.35f}; -f32 D_80391ECC[6] = {0.0f, 50.0f, 0.0f, 0.0f, 50.0f, 0.0f}; -f32 D_80391EE4[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; -f32 D_80391EFC[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; -f32 D_80391F14[4] = {0.2f, 0.25f, 2.3f, 2.5f}; -f32 D_80391F24[4] = {0.0f, 0.0f, 0.34f, 0.34f}; -f32 D_80391F34[2] = {0.7f, 0.8f}; +f32 chGreenBlast_unused_D_80391ECC[6] = {0.0f, 50.0f, 0.0f, 0.0f, 50.0f, 0.0f}; +f32 chGreenBlast_unused_D_80391EE4[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +f32 chGreenBlast_unused_D_80391EFC[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +f32 chGreenBlast_unused_D_80391F14[4] = {0.2f, 0.25f, 2.3f, 2.5f}; +f32 chGreenBlast_unused_D_80391F24[4] = {0.0f, 0.0f, 0.34f, 0.34f}; +f32 chGreenBlast_unused_D_80391F34[2] = {0.7f, 0.8f}; -f32 D_80391F3C[6] = { -50.0f, -50.0f, -50.0f, 50.0f, 50.0f, 50.0f}; -f32 D_80391F54[6] = { 0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f}; -f32 D_80391F6C[6] = { -260.0f, -260.0f, -260.0f, 260.0f, 260.0f, 260.0f}; -f32 D_80391F84[4] = {0.15f, 0.3f, 0.0f, 0.0f}; -f32 D_80391F94[4] = {0.0f, 0.01f, 0.7f, 0.8f}; -f32 D_80391FA4[2] = {0.0f, 0.65f}; +f32 chGreenBlastSparklesPositionRange[6] = { -50.0f, -50.0f, -50.0f, 50.0f, 50.0f, 50.0f}; +f32 chGreenBlastSparklesAccelerationRange[6] = { 0.0f, -1200.0f, 0.0f, 0.0f, -1200.0f, 0.0f}; +f32 chGreenBlastSparklesVelocityRange[6] = { -260.0f, -260.0f, -260.0f, 260.0f, 260.0f, 260.0f}; +f32 chGreenBlastSparklesScaleRange[4] = {0.15f, 0.3f, 0.0f, 0.0f}; +f32 chGreenBlastSparklesLifetimeRange[4] = {0.0f, 0.01f, 0.7f, 0.8f}; +f32 chGreenBlastSparklesFade[2] = {0.0f, 0.65f}; /* .code */ -Actor *chSpriteSmokeGreen2_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ +Actor *chGreenBlast_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ Actor *actor = marker_getActor(marker); func_80344C2C(1); return func_80325CAC(marker, gdl, mptr, arg3); @@ -62,72 +62,82 @@ void func_8038FCBC(void){ func_80386654(1.0f, &D_80391DE4, &D_80391DF4); } -void func_8038FCF0(ActorMarker *marker, ActorMarker *other_marker){ +void chGreenBlast_collisionDie(ActorMarker *marker, ActorMarker *other_marker){ Actor *actor = marker_getActor(marker); - f32 sp38[3]; - sp38[0] = actor->position_x; - sp38[1] = actor->position_y; - sp38[2] = actor->position_z; - sp38[1] += 160.0f; + f32 explosion_position[3]; + + explosion_position[0] = actor->position_x; + explosion_position[1] = actor->position_y; + explosion_position[2] = actor->position_z; + explosion_position[1] += 160.0f; + FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32000, actor->position, 1000, 3500); timedFunc_set_0(0.0f, func_8038FC88); timedFunc_set_0(0.3f, func_8038FCBC); - func_8038EBE0(actor->position, 4, ASSET_710_SPRITE_SPARKLE_PURPLE, - &D_80391E5C, &fight_D_80391E74, &D_80391E8C, - &D_80391EA4, &D_80391EB4, &D_80391EC4 + + chSpellFireball_emitSparkles(actor->position, 4, ASSET_710_SPRITE_SPARKLE_PURPLE, + chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange, + chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade ); - func_8038EBE0(actor->position, 4, ASSET_711_SPRITE_SPARKLE_DARK_BLUE, - &D_80391E5C, &fight_D_80391E74, &D_80391E8C, - &D_80391EA4, &D_80391EB4, &D_80391EC4 + + chSpellFireball_emitSparkles(actor->position, 4, ASSET_711_SPRITE_SPARKLE_DARK_BLUE, + chGreenBlastDieSparklesPositionRange, chGreenBlastDieSparklesAccelerationRange, chGreenBlastDieSparklesVelocityRange, + chGreenBlastDieSparklesScaleRange, chGreenBlastDieSparklesLifetimeRange, chGreenBlastDieSparklesFade ); - func_8038EEFC(actor->position, 3, &D_80391E4C); - func_8038ED9C(&sp38, 0x6C8, 3, - &D_80391E04, &D_80391E34, - &D_80391E0C, &D_80391E1C, &fight_D_80391E2C + + chSpellFireball_emitSmoke(actor->position, 3, chGreenBlastSmokeLifetime); + + chSpellFireball_emitExplosion(&explosion_position, 0x6C8, 3, + chGreenBlastExplosionStartFrameRange, chGreenBlastExplosionPositionRange, + chGreenBlastExplosionScaleRange, chGreenBlastExplosionLifetimeRange, chGreenBlastExplosionFade ); + marker_despawn(actor->marker); } -void chSpriteSmokeGreen2_update(Actor *this){ - f32 sp54 = time_getDelta(); - f32 sp48[3]; +void chGreenBlast_update(Actor *this){ + f32 delta_time = time_getDelta(); + f32 target_position[3]; - if(!this->unk16C_4){ + if (!this->unk16C_4) { this->unk16C_4 = 1; - marker_setCollisionScripts(this->marker, NULL, NULL, func_8038FCF0); + marker_setCollisionScripts(this->marker, NULL, NULL, chGreenBlast_collisionDie); this->marker->propPtr->unk8_3 = 0; actor_collisionOn(this); this->unk60 = 10.0f; this->scale = (f64)this->scale + this->scale; - }//L8038FF18 - this->roll += 20.0f; - if(globalTimer_getTime()%4 == 1){ - if(randf() < 0.5){ - func_8038EBE0(this->position, 4, ASSET_718_SPRITE_SPARKLE_WHITE_2, - &D_80391F3C, &D_80391F54, &D_80391F6C, - &D_80391F84, &D_80391F94, &D_80391FA4 - ); - } - else{//L8038FFE0 - func_8038EBE0(this->position, 4, ASSET_719_SPRITE_SPARKLE_GREEN_2, - &D_80391F3C, &D_80391F54, &D_80391F6C, - &D_80391F84, &D_80391F94, &D_80391FA4 - ); - } - }//L80390020 - player_getPosition(sp48); - sp48[1] += 50.0f; - func_80387470(this, sp48, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f); - - if(func_8028F25C()){ - func_8038FCF0(this->marker, 0); } - else{ - if(0.0 <= this->unk60){ - this->unk60 -= sp54; + + this->roll += 20.0f; + + if (globalTimer_getTime() % 4 == 1) { + if (randf() < 0.5) { + chSpellFireball_emitSparkles(this->position, 4, ASSET_718_SPRITE_SPARKLE_WHITE_2, + chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange, + chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade + ); } - else{ - func_8038FCF0(this->marker, 0); + else { + chSpellFireball_emitSparkles(this->position, 4, ASSET_719_SPRITE_SPARKLE_GREEN_2, + chGreenBlastSparklesPositionRange, chGreenBlastSparklesAccelerationRange, chGreenBlastSparklesVelocityRange, + chGreenBlastSparklesScaleRange, chGreenBlastSparklesLifetimeRange, chGreenBlastSparklesFade + ); + } + } + + player_getPosition(target_position); + target_position[1] += 50.0f; + func_80387470(this, target_position, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f); + + if (func_8028F25C()) { + chGreenBlast_collisionDie(this->marker, 0); + } + else { + if(0.0 <= this->unk60) { + this->unk60 -= delta_time; + } + else { + chGreenBlast_collisionDie(this->marker, 0); } } } From 78142ca16275d1137dd44e2d1421ae8ba45a19b3 Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Fri, 6 Sep 2024 19:43:22 +0200 Subject: [PATCH 3/7] renamed: src/fight/code_9850.c -> src/fight/chgreenblast.c --- decompressed.us.v10.yaml | 6 +++--- src/fight/{code_9850.c => chgreenblast.c} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename src/fight/{code_9850.c => chgreenblast.c} (100%) diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index 618e3a3e..7c80d57b 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -2246,7 +2246,7 @@ segments: - [0x10AEBB0, c, chjinjonatorbase] #DONE - [0x10AF360, c, chspellbarrier] #DONE - [0x10AF770, c, chspellfireball] #DONE - - [0x10B0820, c, code_9850] #DONE + - [0x10B0820, c, chgreenblast] #DONE - [0x10B0D10, c, chjinjonator] #DONE - [0x10B1EA0, c, chbossshadow] #DONE - [0x10B1F60, .data, chfinalboss] @@ -2256,7 +2256,7 @@ segments: - [0x10B2620, .data, chjinjonatorbase] - [0x10B26B0, .data, chspellbarrier] - [0x10B26E0, .data, chspellfireball] - - [0x10B29A0, .data, code_9850] + - [0x10B29A0, .data, chgreenblast] - [0x10B2B90, .data, chjinjonator] - [0x10B2C70, .data, chbossshadow] - [0x10B2CA0, .rodata, chfinalboss] @@ -2266,7 +2266,7 @@ segments: - [0x10B3160, .rodata, chjinjonatorbase] - [0x10B3190, .rodata, chspellbarrier] - [0x10B31A0, .rodata, chspellfireball] - - [0x10B31F0, .rodata, code_9850] + - [0x10B31F0, .rodata, chgreenblast] - [0x10B3200, .rodata, chjinjonator] - [0x10B3310, .rodata, chbossshadow] - [0x10B3320, .bss, code_0] diff --git a/src/fight/code_9850.c b/src/fight/chgreenblast.c similarity index 100% rename from src/fight/code_9850.c rename to src/fight/chgreenblast.c From c8598c26772dfc58f291c090004b3c549402684c Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Sat, 7 Sep 2024 12:52:35 +0200 Subject: [PATCH 4/7] documentations: - various particle system functions/structs - more in src/fight - beehive - added prototypes (reduced compiler warnings) --- include/enums.h | 5 +- include/functions.h | 6 +- include/structs.h | 6 +- src/BGS/ch/yumblie.c | 2 +- src/FP/ch/boggy2.c | 4 +- src/FP/ch/snowmanbutton.c | 4 +- src/FP/ch/twinkly.c | 3 +- src/FP/ch/twinklybox.c | 20 ++--- src/FP/ch/wozzasjig.c | 4 +- src/FP/ch/xmastreeice.c | 8 +- src/FP/ch/xmastreeswitch.c | 4 +- src/GV/ch/gobi1.c | 2 +- src/GV/ch/gobi2.c | 2 +- src/GV/ch/gobirock.c | 2 +- src/GV/code_2EE0.c | 2 +- src/MM/ch/juju.c | 2 +- src/MMM/ch/motzhand.c | 2 +- src/MMM/code_16B0.c | 8 +- src/RBB/ch/bossboombox.c | 3 +- src/RBB/ch/propellorswitch.c | 2 +- src/RBB/ch/whistle.c | 6 +- src/RBB/ch/whistleswitch.c | 4 +- src/RBB/code_1570.c | 4 +- src/SM/ch/vegetables.c | 16 ++-- src/TTC/ch/clam.c | 4 +- src/TTC/ch/nipper.c | 4 +- src/TTC/ch/treasurehunt.c | 6 +- src/core1/code_18350.c | 32 ++++---- src/core2/ch/badShad.c | 2 +- src/core2/ch/beehive.c | 98 +++++++++++----------- src/core2/ch/bottlesbonus.c | 4 +- src/core2/ch/bottlesbonuscursor.c | 2 +- src/core2/ch/drips.c | 2 +- src/core2/ch/flotsam.c | 4 +- src/core2/ch/gravestone.c | 4 +- src/core2/ch/jinjo.c | 1 - src/core2/ch/molehill.c | 4 +- src/core2/ch/overlaynocontroller.c | 2 +- src/core2/ch/overlaypressstart.c | 2 +- src/core2/ch/snowball.c | 4 +- src/core2/ch/snowman.c | 4 +- src/core2/code_43800.c | 2 +- src/core2/code_43A40.c | 4 +- src/core2/code_47BD0.c | 2 +- src/core2/code_4BE10.c | 4 +- src/core2/code_509D0.c | 4 +- src/core2/code_51950.c | 4 +- src/core2/code_55390.c | 2 +- src/core2/code_55850.c | 2 +- src/core2/code_57C70.c | 2 +- src/core2/code_581D0.c | 2 +- src/core2/code_59780.c | 2 +- src/core2/code_9E370.c | 4 +- src/core2/code_A5BC0.c | 13 ++- src/core2/code_B8080.c | 2 +- src/core2/code_D0CA0.c | 4 +- src/core2/code_DA3A0.c | 4 +- src/core2/particle.c | 4 +- src/core2/spawnqueue.c | 4 +- src/cutscenes/code_0.c | 64 +++++++-------- src/cutscenes/code_6730.c | 4 +- src/cutscenes/code_69F0.c | 8 +- src/cutscenes/code_6C90.c | 4 +- src/fight/chbossjinjo.c | 5 +- src/fight/chbossjinjobase.c | 128 ++++++++++++++++------------- src/fight/chbossshadow.c | 31 ++++--- src/fight/chfinalboss.c | 4 +- src/fight/chgreenblast.c | 1 + src/fight/chjinjonator.c | 1 + src/fight/chjinjonatorbase.c | 7 +- src/fight/chspellbarrier.c | 2 +- src/fight/chspellfireball.c | 1 + src/fight/code_0.c | 19 +---- src/fight/fight.h | 21 +++++ src/lair/code_0.c | 11 ++- src/lair/code_86F0.c | 4 +- src/lair/code_AD70.c | 8 +- 77 files changed, 356 insertions(+), 332 deletions(-) diff --git a/include/enums.h b/include/enums.h index 3685bdd1..aa3f260f 100644 --- a/include/enums.h +++ b/include/enums.h @@ -4311,8 +4311,9 @@ enum marker_e{ MARKER_4B_CC_SCREW, MARKER_4C_CLANKER_TOKEN_TOOTH_EXT, MARKER_4D_CLANKER_JIGGY_TOOTH_EXT, - - MARKER_51_MM_HUT = 0x51, + + MARKER_50_BEEHIVE = 0x50, + MARKER_51_MM_HUT, MARKER_52_JIGGY, MARKER_53_EMPTY_HONEYCOMB, diff --git a/include/functions.h b/include/functions.h index 11ac0cf0..9ca143e0 100644 --- a/include/functions.h +++ b/include/functions.h @@ -238,7 +238,7 @@ void particleEmitter_setParticleFramerateRange(ParticleEmitter *, f32, f32); void particleEmitter_setParticleSpawnPositionRange(ParticleEmitter *, f32, f32, f32, f32, f32, f32); void func_802EFB70(ParticleEmitter *, f32, f32); void func_802EFB84(ParticleEmitter *, f32, f32); -void func_802EFB98(ParticleEmitter *, struct31s *); +void particleEmitter_setScaleAndLifetimeRanges(ParticleEmitter *, ParticleScaleAndLifetimeRanges *); void particleEmitter_setVelocityAndAccelerationRanges(ParticleEmitter *, struct41s *); void particleEmitter_setPositionAndVelocityRanges(ParticleEmitter *this, struct42s *arg1); void particleEmitter_setAngularVelocityRange(ParticleEmitter *, f32, f32, f32, f32, f32, f32); @@ -552,4 +552,8 @@ extern void fxSparkle_chTreasure(s16[3]); extern void actor_collisionOn(Actor *); extern void subaddie_set_state_forward(Actor *, s32); +extern BKModelBin *marker_loadModelBin(ActorMarker *this); +extern Struct70s *func_8034C2C4(ActorMarker *marker, s32 arg1); +extern void func_80326310(Actor *this); + #endif diff --git a/include/structs.h b/include/structs.h index b38fb70a..91f241d9 100644 --- a/include/structs.h +++ b/include/structs.h @@ -374,14 +374,14 @@ typedef struct particle_emitter{ struct particle *pList_capacity_12C; //capacity_end_ptr; } ParticleEmitter; -typedef struct struct_31_s{ +typedef struct particle_scale_and_lifetime_ranges_s{ f32 unk0[2]; //particle_starting_scale_range f32 unk8[2]; //particle_starting_scale_range f32 unk10[2]; //particle_spawn_interval_range f32 unk18[2]; //particle_lifetime_range f32 unk20; //particle_fade_in f32 unk24; //particle_fade_in -} struct31s; +} ParticleScaleAndLifetimeRanges; typedef struct struct_32_s{ f32 unk0[3]; @@ -399,7 +399,7 @@ typedef struct struct_34_s{ } struct34s; typedef struct struct_40_s{ - struct31s unk0; + ParticleScaleAndLifetimeRanges unk0; f32 unk28; f32 unk2C; } struct40s; diff --git a/src/BGS/ch/yumblie.c b/src/BGS/ch/yumblie.c index 0ef64071..65dfdbd6 100644 --- a/src/BGS/ch/yumblie.c +++ b/src/BGS/ch/yumblie.c @@ -122,7 +122,7 @@ Actor *chyumblie_draw(ActorMarker *this, Gfx **gfx, Mtx** mtx, Vtx **vtx){ modelRender_draw(gfx, mtx, sp44, sp38, 1.0f, NULL, chvilegame_get_grumblie_model(sp40->game_marker)); } else{ - modelRender_draw(gfx, mtx, sp44, sp38, 1.0f, NULL, func_80330B1C(this)); + modelRender_draw(gfx, mtx, sp44, sp38, 1.0f, NULL, marker_loadModelBin(this)); } return thisActor; } diff --git a/src/FP/ch/boggy2.c b/src/FP/ch/boggy2.c index b73d2008..9b2bc779 100644 --- a/src/FP/ch/boggy2.c +++ b/src/FP/ch/boggy2.c @@ -230,7 +230,7 @@ void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2){ void func_80388EE8(ParticleEmitter *pCtrl){ static s32 D_80391D24[3] = {0xc8, 0xc8, 0xe6}; - static struct31s D_80391D30 = { + static ParticleScaleAndLifetimeRanges D_80391D30 = { {0.2f, 0.4f}, {1.2f, 1.6f}, {0.0f, 0.001f}, @@ -244,7 +244,7 @@ void func_80388EE8(ParticleEmitter *pCtrl){ particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST); particleEmitter_setRGB(pCtrl, D_80391D24); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_80391D58); - func_802EFB98(pCtrl, &D_80391D30); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80391D30); particleEmitter_manualFree(pCtrl); } diff --git a/src/FP/ch/snowmanbutton.c b/src/FP/ch/snowmanbutton.c index e862101b..b5c2b884 100644 --- a/src/FP/ch/snowmanbutton.c +++ b/src/FP/ch/snowmanbutton.c @@ -20,7 +20,7 @@ ActorInfo FP_D_80391AB0 = { 0, 0x800, 0.0f, 0 }; -struct31s D_80391AD4 = { +ParticleScaleAndLifetimeRanges D_80391AD4 = { {0.4f, 0.6f}, {1.8f, 3.6f}, {0.0f, 0.01f}, @@ -59,7 +59,7 @@ void FP_func_80386BEC(Actor *this){ particleEmitter_setSprite(pCtrl, ASSET_700_SPRITE_DUST); particleEmitter_setPosition(pCtrl, plyr_pos); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80391AFC); - func_802EFB98(pCtrl, &D_80391AD4); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80391AD4); particleEmitter_emitN(pCtrl, 12); } diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index f598272e..b9d7f9ba 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -3,7 +3,6 @@ #include "variables.h" 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)); -extern Struct70s *func_8034C2C4(ActorMarker *marker, s32 arg1); 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); @@ -61,7 +60,7 @@ s32 D_803920B0[4] = {0xFF, 0xFF, 0xFF, 0x00}; /* .code */ Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE(s32) arg3){ - UNK_TYPE(s32) sp5C = func_8033A12C(func_80330B1C(marker)); + UNK_TYPE(s32) sp5C = func_8033A12C(marker_loadModelBin(marker)); Actor *this = marker_getActor(marker); f32 sp4C[3]; f32 sp40[3]; diff --git a/src/FP/ch/twinklybox.c b/src/FP/ch/twinklybox.c index f47efbca..7fdd4066 100644 --- a/src/FP/ch/twinklybox.c +++ b/src/FP/ch/twinklybox.c @@ -34,7 +34,7 @@ Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){ - static struct31s D_8039210C = { + static ParticleScaleAndLifetimeRanges D_8039210C = { { 0.4f, 0.8f }, {-1.0f, -1.0f }, { 0.0f, 0.02f}, @@ -57,14 +57,14 @@ void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){ 100.0f, 100.0f, 100.0f, 200.0f, 200.0f, 200.0f ); - func_802EFB98(pCtrl, &D_8039210C); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8039210C); func_802EF9F8(pCtrl, 0.6f); func_802EFA18(pCtrl, 3); particleEmitter_emitN(pCtrl, count); } void func_8038D01C(f32 position[3], s32 count, enum asset_e sprite_id){ - static struct31s D_8039217C = { + static ParticleScaleAndLifetimeRanges D_8039217C = { {0.8f, 1.2f }, {1.4f, 2.0f }, {0.0f, 0.01f}, @@ -86,12 +86,12 @@ void func_8038D01C(f32 position[3], s32 count, enum asset_e sprite_id){ particleEmitter_setSprite(pCtrl, sprite_id); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_803921B0); - func_802EFB98(pCtrl, &D_8039217C); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8039217C); particleEmitter_emitN(pCtrl, count); } void func_8038D0A8(f32 position[3], s32 count, enum asset_e model_id){ - static struct31s D_803921F8 = { + static ParticleScaleAndLifetimeRanges D_803921F8 = { { 0.2f, 0.3f }, {-1.0f, -1.0f }, { 0.0f, 0.02f}, @@ -114,14 +114,14 @@ void func_8038D0A8(f32 position[3], s32 count, enum asset_e model_id){ 200.0f, 200.0f, 200.0f, 300.0f, 300.0f, 300.0f ); - func_802EFB98(pCtrl, &D_803921F8); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_803921F8); func_802EF9F8(pCtrl, 0.2f); func_802EFA18(pCtrl, 2); particleEmitter_emitN(pCtrl, count); } void func_8038D170(f32 position[3], s32 count, enum asset_e sprite_id){ - static struct31s D_80392268 ={ + static ParticleScaleAndLifetimeRanges D_80392268 ={ { 0.4f, 0.6f }, {-1.0f, -1.0f }, { 0.0f, 0.02f}, @@ -140,14 +140,14 @@ void func_8038D170(f32 position[3], s32 count, enum asset_e sprite_id){ particleEmitter_setSprite(pCtrl, sprite_id); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_80392290); - func_802EFB98(pCtrl, &D_80392268); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80392268); func_802EF9F8(pCtrl, 0.2f); func_802EFA18(pCtrl, 2); particleEmitter_emitN(pCtrl, count); } void func_8038D208(f32 position[3], s32 count, enum asset_e sprite_id){ - static struct31s D_803922D8 = { + static ParticleScaleAndLifetimeRanges D_803922D8 = { {0.5f, 0.7f }, {1.4f, 1.7f }, {0.0f, 0.01f}, @@ -167,7 +167,7 @@ void func_8038D208(f32 position[3], s32 count, enum asset_e sprite_id){ particleEmitter_setSprite(pCtrl, sprite_id); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8039230C); - func_802EFB98(pCtrl, &D_803922D8); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_803922D8); particleEmitter_emitN(pCtrl, count); } diff --git a/src/FP/ch/wozzasjig.c b/src/FP/ch/wozzasjig.c index d4d6ab70..201bfcfd 100644 --- a/src/FP/ch/wozzasjig.c +++ b/src/FP/ch/wozzasjig.c @@ -37,7 +37,7 @@ Actor *func_8038FF00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } void func_8038FF54(Actor *this){ - static struct31s D_8039264C = {{0.3f, 0.5f}, {0.5f, 0.7f}, {0.0f, 0.01f}, {0.3f, 0.4f}, 0.3f, 0.7f}; + static ParticleScaleAndLifetimeRanges D_8039264C = {{0.3f, 0.5f}, {0.5f, 0.7f}, {0.0f, 0.01f}, {0.3f, 0.4f}, 0.3f, 0.7f}; Actor *other; f32 sp40[3]; ParticleEmitter *sp3C; @@ -97,7 +97,7 @@ void func_8038FF54(Actor *this){ 0.0f, -60.0f, 0.0f, 0.0f, -90.0f, 0.0f ); - func_802EFB98(sp3C, &D_8039264C); + particleEmitter_setScaleAndLifetimeRanges(sp3C, &D_8039264C); particleEmitter_emitN(sp3C, 1); } } diff --git a/src/FP/ch/xmastreeice.c b/src/FP/ch/xmastreeice.c index 7afd5695..90a474ad 100644 --- a/src/FP/ch/xmastreeice.c +++ b/src/FP/ch/xmastreeice.c @@ -21,7 +21,7 @@ Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){ - static struct31s D_80392754 = {{0.2f, 0.4f}, {-1.0f, -1.0f}, {0.0f, 0.02f}, {2.2f, 2.2f}, 0.0f, 0.3f}; + 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 struct43s D_8039277C = { {{-300.0f, 350.0f, -300.0f}, {300.0f, 600.0f, 300.0f}}, /*position*/ {{ 0.0f, -1000.0f, 0.0f}, { 0.0f, -1000.0f, 0.0f}}, /*velocitcy*/ @@ -35,7 +35,7 @@ void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){ 100.0f, 100.0f, 100.0f, 250.0f, 250.0f, 250.0f ); - func_802EFB98(pCtrl, &D_80392754); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80392754); func_802EF9F8(pCtrl, 0.6f); func_802EFA18(pCtrl, 0); func_802EFA20(pCtrl, 1.0f, 1.3f); @@ -44,7 +44,7 @@ void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){ } void func_80390A30(f32 position[3], s32 cnt, enum asset_e sprite_id){ - static struct31s D_803927C4 = {{0.6f, 0.8f}, {1.0f, 1.4f}, {0.0f, 0.01f}, {1.2f, 1.8f}, 0.0f, 0.01f}; + 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 struct43s D_803927EC = { {{-200.0f, 0.0f, -200.0f}, {200.0f, 200.0f, 200.0f}}, /*position*/ {{ 0.0f, -10.0f, 0.0f}, { 0.0f, -10.0f, 0.0f}}, /*velocitcy*/ @@ -56,7 +56,7 @@ void func_80390A30(f32 position[3], s32 cnt, enum asset_e sprite_id){ particleEmitter_setSprite(pCtrl, sprite_id); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_803927EC); - func_802EFB98(pCtrl, &D_803927C4); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_803927C4); particleEmitter_emitN(pCtrl, cnt); } diff --git a/src/FP/ch/xmastreeswitch.c b/src/FP/ch/xmastreeswitch.c index b183ef34..f3ae72b5 100644 --- a/src/FP/ch/xmastreeswitch.c +++ b/src/FP/ch/xmastreeswitch.c @@ -46,7 +46,7 @@ void func_8038E7CC(ActorMarker *this_marker, ActorMarker *other_marker){ } void func_8038E840(f32 position[3], s32 cnt, enum asset_e sprite_id){ - static struct31s D_80392444 = {{0.4f, 0.6f}, {0.8f, 1.8f}, {0.0f, 0.01f}, {0.5f, 1.4f}, 0.0f, 0.01f}; + 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); particleEmitter_setPosition(pCtrl, position); @@ -62,7 +62,7 @@ void func_8038E840(f32 position[3], s32 cnt, enum asset_e sprite_id){ -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f ); - func_802EFB98(pCtrl, &D_80392444); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80392444); particleEmitter_emitN(pCtrl, cnt); } diff --git a/src/GV/ch/gobi1.c b/src/GV/ch/gobi1.c index 72bc6296..9b6ee577 100644 --- a/src/GV/ch/gobi1.c +++ b/src/GV/ch/gobi1.c @@ -203,7 +203,7 @@ void chGobi1_update(Actor *this){ if(this->state == 4){ func_80326224(this); - tmp_s1 = func_8033A12C(func_80330B1C(this->marker)); + tmp_s1 = func_8033A12C(marker_loadModelBin(this->marker)); if(tmp_s1){ player_getPosition(sp54); sp54[1] += 50.0f; diff --git a/src/GV/ch/gobi2.c b/src/GV/ch/gobi2.c index d576eaac..916ac163 100644 --- a/src/GV/ch/gobi2.c +++ b/src/GV/ch/gobi2.c @@ -132,7 +132,7 @@ Actor *chGobi2_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp3C[2] = this->roll; modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148)); modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); - modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, func_80330B1C(this_marker)); + modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, marker_loadModelBin(this_marker)); if(this->state == 4){ modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(local->unk4)); diff --git a/src/GV/ch/gobirock.c b/src/GV/ch/gobirock.c index 64a76f61..2e19db59 100644 --- a/src/GV/ch/gobirock.c +++ b/src/GV/ch/gobirock.c @@ -71,7 +71,7 @@ Actor *chGobiRock_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx sp3C[2] = this->roll; modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32) this); func_8033A450(func_80329934()); - modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL,func_80330B1C(this_marker)); + modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL,marker_loadModelBin(this_marker)); func_8034A174(func_80329934(), 5, local->unk0); return this; diff --git a/src/GV/code_2EE0.c b/src/GV/code_2EE0.c index fa7b6831..b45c7f87 100644 --- a/src/GV/code_2EE0.c +++ b/src/GV/code_2EE0.c @@ -30,7 +30,7 @@ Actor *func_803892D0(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ position[2] = this->position_z; position[1] += 8.0f; modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); - modelRender_draw(gfx, mtx, position, rotation, this->unk1C[0], NULL, func_80330B1C(this_marker)); + modelRender_draw(gfx, mtx, position, rotation, this->unk1C[0], NULL, marker_loadModelBin(this_marker)); } return this; } diff --git a/src/MM/ch/juju.c b/src/MM/ch/juju.c index 1493d8fe..9ff7dcf5 100644 --- a/src/MM/ch/juju.c +++ b/src/MM/ch/juju.c @@ -54,7 +54,7 @@ Actor* func_80389014(ActorMarker *this, Gfx **dl, Mtx **mPtr, Vtx **arg2){ jujuPtr = (ActorLocal_Juju_2 *)&actorPtr->local; if(jujuPtr->unk0 != 2){ modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); - modelRender_draw(dl, mPtr, actorPtr->position, sp34, jujuPtr->unk14, NULL, func_80330B1C(this)); + modelRender_draw(dl, mPtr, actorPtr->position, sp34, jujuPtr->unk14, NULL, marker_loadModelBin(this)); } return actorPtr; } diff --git a/src/MMM/ch/motzhand.c b/src/MMM/ch/motzhand.c index a9147255..05e74cf9 100644 --- a/src/MMM/ch/motzhand.c +++ b/src/MMM/ch/motzhand.c @@ -78,7 +78,7 @@ Actor *chMotzhand_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp3C[0] = sp3C[1] = sp3C[2] = 0.0f; sp3C[1] = 180.0f; modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); - modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, marker_loadModelBin(marker)); this->marker->unk14_21 = func_8033A170(); return this; } diff --git a/src/MMM/code_16B0.c b/src/MMM/code_16B0.c index ca0a4929..f30523e1 100644 --- a/src/MMM/code_16B0.c +++ b/src/MMM/code_16B0.c @@ -117,7 +117,7 @@ void func_80387D48(ActorMarker *marker){ void func_80387DF8(f32 position[3], s32 count, enum asset_e sprite_id) { static s32 D_8038BAF4[3] = {0xB4, 0xFF, 0x8C}; - static struct31s D_8038BB00 = {{0.2f, 0.4f}, {1.8f, 2.8f}, {0.0f, 0.15f}, {0.7f, 1.2f}, 0.0f, 0.01f}; + static ParticleScaleAndLifetimeRanges D_8038BB00 = {{0.2f, 0.4f}, {1.8f, 2.8f}, {0.0f, 0.15f}, {0.7f, 1.2f}, 0.0f, 0.01f}; static struct43s D_8038BB28 = { {{-150.0f, 250.0f, -150.0f}, {150.0f, 300.0f, 150.0f}}, {{ 0.0f, -600.0f, 0.0f}, { 0.0f, -600.0f, 0.0f}}, @@ -130,12 +130,12 @@ void func_80387DF8(f32 position[3], s32 count, enum asset_e sprite_id) { particleEmitter_setSprite(pCtrl, sprite_id); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8038BB28); - func_802EFB98(pCtrl, &D_8038BB00); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038BB00); particleEmitter_emitN(pCtrl, count); } void func_80387E84(f32 position[3], s32 count, enum asset_e model_id) { - static struct31s D_8038BB70 = {{1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.0f}, {3.2f, 3.2f}, 0.0f, 0.45f}; + static ParticleScaleAndLifetimeRanges D_8038BB70 = {{1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.0f}, {3.2f, 3.2f}, 0.0f, 0.45f}; static struct43s D_8038BB98 = { {{-90.0f, 300.0f, -90.0f}, {90.0f, 660.0f, 90.0f}}, {{ 0.0f, -1200.0f, 0.0f}, { 0.0f, -1200.0f, 0.0f}}, @@ -153,7 +153,7 @@ void func_80387E84(f32 position[3], s32 count, enum asset_e model_id) { func_802EFA20(pCtrl, 1.0f, 1.3f); particleEmitter_setSfx(pCtrl, SFX_2F_ORANGE_SPLAT, 16000); particleEmitter_setDrawMode(pCtrl, 2); - func_802EFB98(pCtrl, &D_8038BB70); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038BB70); particleEmitter_emitN(pCtrl, count); } diff --git a/src/RBB/ch/bossboombox.c b/src/RBB/ch/bossboombox.c index c8e006c2..e9de3192 100644 --- a/src/RBB/ch/bossboombox.c +++ b/src/RBB/ch/bossboombox.c @@ -5,7 +5,6 @@ extern void actor_predrawMethod(Actor *); extern void actor_postdrawMethod(ActorMarker *); extern void func_8030E394(u8); -extern void func_80326310(Actor *); extern int func_803342AC(f32 (*)[3], f32(*)[3], f32); extern void particleEmitter_setModel(ParticleEmitter *, s32); @@ -466,7 +465,7 @@ Actor *func_8038D638(ActorMarker *marker, Gfx **gdl, Mtx ** mptr, s32 arg3){ } modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)actor); modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); - modelRender_draw(gdl, mptr, actor->position, sp3C, actor->scale, NULL, func_80330B1C(marker)); + modelRender_draw(gdl, mptr, actor->position, sp3C, actor->scale, NULL, marker_loadModelBin(marker)); return actor; } diff --git a/src/RBB/ch/propellorswitch.c b/src/RBB/ch/propellorswitch.c index d45e0984..a59d86a9 100644 --- a/src/RBB/ch/propellorswitch.c +++ b/src/RBB/ch/propellorswitch.c @@ -81,7 +81,7 @@ Actor *chPropellorSwitch_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 ar modelRender_draw(gdl, mptr, &actor->position, NULL, 1.0f, NULL, local->unk4); } else{ - modelRender_draw(gdl, mptr, &actor->position, NULL, 1.0f, NULL, func_80330B1C(marker)); + modelRender_draw(gdl, mptr, &actor->position, NULL, 1.0f, NULL, marker_loadModelBin(marker)); } return actor; } diff --git a/src/RBB/ch/whistle.c b/src/RBB/ch/whistle.c index 835679c8..90e7d196 100644 --- a/src/RBB/ch/whistle.c +++ b/src/RBB/ch/whistle.c @@ -46,7 +46,7 @@ ActorInfo RBB_D_803909F8 = { 0, 0, 0.0f, 0 }; -struct31s D_80390A1C = { +ParticleScaleAndLifetimeRanges D_80390A1C = { { 1.0f, 2.0f}, { 3.0f, 5.0f}, { 0.05f, 0.1f}, @@ -91,7 +91,7 @@ void RBB_func_8038B0B8(Actor *this, s32 arg1){ -400.0f, 0.0f, -30.0f, -800.0f, 0.0f, 30.0f ); - func_802EFB98(other, &D_80390A1C); + particleEmitter_setScaleAndLifetimeRanges(other, &D_80390A1C); particleEmitter_setSpawnInterval(other, 0.5f); } } @@ -113,7 +113,7 @@ Actor *func_8038B230(ActorMarker *marker, Gfx** gdl, Mtx** mptr, s32 arg3){ sp3C[2] = actor->roll; modelRender_preDraw(&actor_predrawMethod, actor); func_8033A450(func_80329934()); - modelRender_draw(gdl, mptr, &actor->position, &sp3C, actor->scale, NULL, func_80330B1C(marker)); + modelRender_draw(gdl, mptr, &actor->position, &sp3C, actor->scale, NULL, marker_loadModelBin(marker)); func_8034A174(func_80329934(), 5, &local->unk4); local->unk4[0] -= 60.0f; return actor; diff --git a/src/RBB/ch/whistleswitch.c b/src/RBB/ch/whistleswitch.c index f57b760c..686cc61f 100644 --- a/src/RBB/ch/whistleswitch.c +++ b/src/RBB/ch/whistleswitch.c @@ -69,7 +69,7 @@ void func_8038AC18(Actor *this, s32 new_state){ local->unk8 = 0.0f; if(new_state == 2){ func_8030E6D4(SFX_90_SWITCH_PRESS); - local->unkC = vtxList_clone(model_getVtxList(func_80330B1C(this->marker))); + local->unkC = vtxList_clone(model_getVtxList(marker_loadModelBin(this->marker))); mapSpecificFlags_set(local->unk4->unk10, TRUE); this->position_y -= 30.0f; @@ -113,7 +113,7 @@ Actor *func_8038AD9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){ if( actor->state == 2 && local->unk0 != 0 ){ - temp_v0 = func_80330B1C(marker); + temp_v0 = marker_loadModelBin(marker); sp1C = (local->unk0 == 2) ? &D_80390938 : &D_8039092C; vtxList_tint(local->unkC, sp1C, (local->unk4->unk4[1] - actor->position_y)/30.0, diff --git a/src/RBB/code_1570.c b/src/RBB/code_1570.c index 4dbbbe2d..b8fad6cb 100644 --- a/src/RBB/code_1570.c +++ b/src/RBB/code_1570.c @@ -27,7 +27,7 @@ f32 D_803902D4[3] = {4500.0f, 0.0f, 500.0f}; f32 D_803902E0[3] = {4500.0f, 0.0f, 500.0f}; f32 D_803902EC[3] = {4000.0f, -600.0f, 0.0f}; f32 D_803902F8[3] = {4500.0f, 0.0f, 500.0f}; -struct31s D_80390304 = { +ParticleScaleAndLifetimeRanges D_80390304 = { { 5.0f, 5.0f}, { 5.0f, 5.0f}, { 0.0f, 0.01f}, @@ -142,7 +142,7 @@ void func_80387D80(void){ ParticleEmitter *actor = partEmitMgr_newEmitter(3); particleEmitter_setSprite(actor, ASSET_70E_SPRITE_SMOKE_2); particleEmitter_setStartingFrameRange(actor, 0, 7); - func_802EFB98(actor, &D_80390304); + particleEmitter_setScaleAndLifetimeRanges(actor, &D_80390304); particleEmitter_setParticleVelocityRange(actor, 0.0f, 100.0f, 0.0f, 0.0f, 200.0f ,0.0f); particleEmitter_emitInVolume(actor, &D_803902EC, &D_803902F8, 3); } diff --git a/src/SM/ch/vegetables.c b/src/SM/ch/vegetables.c index 168f655d..0e58d6c6 100644 --- a/src/SM/ch/vegetables.c +++ b/src/SM/ch/vegetables.c @@ -80,7 +80,7 @@ ActorInfo D_8038AD7C = { MARKER_1E8_COLLYWOBBLE_B, ACTOR_COLLYWOBBLE_B, MODEL_CO s32 D_8038ADA0[3] = {0xFF, 0xFF, 0xFF}; -struct31s D_8038ADAC = { +ParticleScaleAndLifetimeRanges D_8038ADAC = { {0.1f, 0.5f}, {1.5f, 3.0f}, {0.0f, 0.01f}, @@ -93,7 +93,7 @@ struct42s D_8038ADD4 = { {{-40.0f, -40.0f, -40.0f}, {40.0f, 40.0f, 40.0f}} }; -struct31s D_8038AE04 = { +ParticleScaleAndLifetimeRanges D_8038AE04 = { {0.5f, 0.75f}, {0.4f, 0.6f}, {0.0f, 0.01f}, @@ -107,7 +107,7 @@ struct43s D_8038AE2C = { {{-80.0f, -80.0f, -80.0f}, {80.0f, 80.0f, 80.0f}} }; -struct31s D_8038AE74 = { +ParticleScaleAndLifetimeRanges D_8038AE74 = { {1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.01f}, @@ -121,7 +121,7 @@ struct43s D_8038AE9C = { {{-20.0f, -20.0f, -20.0f}, {20.0f, 20.0f, 20.0f}} }; -struct31s D_8038AEE4 = { +ParticleScaleAndLifetimeRanges D_8038AEE4 = { {0.6f, 0.8f}, {0.5f, 0.7f}, {0.0f, 0.01f}, @@ -142,7 +142,7 @@ void func_80387910(ParticleEmitter *arg0, f32 *arg1, s32 arg2){ particleEmitter_setSprite(arg0, ASSET_700_SPRITE_DUST); particleEmitter_setStartingFrameRange(arg0, 0, 7); particleEmitter_setPosition(arg0, arg1); - func_802EFB98(arg0, &D_8038ADAC); + particleEmitter_setScaleAndLifetimeRanges(arg0, &D_8038ADAC); particleEmitter_setPositionAndVelocityRanges(arg0, &D_8038ADD4); particleEmitter_emitN(arg0, arg2); } @@ -154,7 +154,7 @@ void func_803879B8(ParticleEmitter *arg0, f32 *arg1, s32 arg2, enum asset_e mode particleEmitter_setPosition(arg0, arg1); particleEmitter_setDrawMode(arg0, 2); particleEmitter_setAngularVelocityRange(arg0, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); - func_802EFB98(arg0, &D_8038AE04); + particleEmitter_setScaleAndLifetimeRanges(arg0, &D_8038AE04); particleEmitter_setPositionVelocityAndAccelerationRanges(arg0, &D_8038AE2C); particleEmitter_emitN(arg0, arg2); } @@ -166,7 +166,7 @@ void func_80387A80(ParticleEmitter *arg0, f32 *arg1, s32 arg2, enum asset_e mode particleEmitter_setPosition(arg0, arg1); particleEmitter_setDrawMode(arg0, 2); particleEmitter_setAngularVelocityRange(arg0, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); - func_802EFB98(arg0, &D_8038AE74); + particleEmitter_setScaleAndLifetimeRanges(arg0, &D_8038AE74); particleEmitter_setPositionVelocityAndAccelerationRanges(arg0, &D_8038AE9C); particleEmitter_emitN(arg0, arg2); } @@ -179,7 +179,7 @@ void func_80387B48(ParticleEmitter *arg0, f32 arg1[3], s32 arg2, enum asset_e mo particleEmitter_setDrawMode(arg0, 2); particleEmitter_setAngularVelocityRange(arg0, 150.0f, -300.0f, -300.0f, 300.0f, 300.0f, -150.0f); particleEmitter_setSfx(arg0, SFX_1F_HITTING_AN_ENEMY_3, 8000); - func_802EFB98(arg0, &D_8038AEE4); + particleEmitter_setScaleAndLifetimeRanges(arg0, &D_8038AEE4); particleEmitter_setPositionVelocityAndAccelerationRanges(arg0, &D_8038AF0C); particleEmitter_emitN(arg0, arg2); } diff --git a/src/TTC/ch/clam.c b/src/TTC/ch/clam.c index ab2b743e..cf094b94 100644 --- a/src/TTC/ch/clam.c +++ b/src/TTC/ch/clam.c @@ -197,7 +197,7 @@ void __chClam_emitSmallShellParticles(f32 position[3], s32 count){ } void __chClam_emitEatencollectibleParticles(f32 position[3], enum asset_e sprite_id, s32 count){ - static struct31s D_8038C484 = { + static ParticleScaleAndLifetimeRanges D_8038C484 = { {0.2f, 0.35f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -217,7 +217,7 @@ void __chClam_emitEatencollectibleParticles(f32 position[3], enum asset_e sprite particleEmitter_setStartingFrameRange(pCtrl, 1, 6); particleEmitter_setPosition(pCtrl, position); particleEmitter_setVelocityAndAccelerationRanges(pCtrl, &D_8038C4AC); - func_802EFB98(pCtrl, &D_8038C484); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038C484); particleEmitter_emitN(pCtrl, count); } diff --git a/src/TTC/ch/nipper.c b/src/TTC/ch/nipper.c index 23952e43..c6247272 100644 --- a/src/TTC/ch/nipper.c +++ b/src/TTC/ch/nipper.c @@ -30,7 +30,7 @@ ActorInfo D_8038C580 = { /* .code */ void func_80387DC0(f32 *position, s32 count) { static s32 D_8038C5A4[3] = {180, 180, 180}; - static struct31s D_8038C5B0 = { + static ParticleScaleAndLifetimeRanges D_8038C5B0 = { {0.1f, 0.5f}, {1.4f, 2.8f}, {0.0f, 0.01f}, @@ -53,7 +53,7 @@ void func_80387DC0(f32 *position, s32 count) { -40.0f, 10.0f, -40.0f, 40.0f, 40.0f, 40.0f ); - func_802EFB98(pCtrl, &D_8038C5B0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038C5B0); particleEmitter_emitN(pCtrl, count); } diff --git a/src/TTC/ch/treasurehunt.c b/src/TTC/ch/treasurehunt.c index abd9a40d..91939865 100644 --- a/src/TTC/ch/treasurehunt.c +++ b/src/TTC/ch/treasurehunt.c @@ -57,7 +57,7 @@ ActorInfo D_8038C8F8 = { }; s32 D_8038C91C[3] = {160, 120, 20}; -struct31s D_8038C928 = { +ParticleScaleAndLifetimeRanges D_8038C928 = { {1.1f, 1.5f}, {4.0f, 4.6f}, {0.0f, 0.01f}, @@ -164,7 +164,7 @@ void func_80389CC4(s16 arg0[3], s32 arg1){ particleEmitter_setStartingFrameRange(D_8038D700, 0, 7); particleEmitter_setPosition(D_8038D700, D_8038D708); particleEmitter_setPositionAndVelocityRanges(D_8038D700, &D_8038C950); - func_802EFB98(D_8038D700, &D_8038C928); + particleEmitter_setScaleAndLifetimeRanges(D_8038D700, &D_8038C928); particleEmitter_emitN(D_8038D700, 5); D_8038D708[2] += 300.0f; gcpausemenu_80314AC8(0); @@ -240,6 +240,6 @@ Actor *func_8038A0D0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8032AA58(actor, sp3C); modelRender_preDraw(actor_predrawMethod, actor); - modelRender_draw(gfx, mtx, sp40, sp4C, sp3C, NULL, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, sp40, sp4C, sp3C, NULL, marker_loadModelBin(marker)); return actor; } diff --git a/src/core1/code_18350.c b/src/core1/code_18350.c index 336d2147..93df7bb3 100644 --- a/src/core1/code_18350.c +++ b/src/core1/code_18350.c @@ -724,37 +724,37 @@ f32 func_80257AD4(f32 val1, f32 val2) return sinf((ml_remainder_f(val1, val2) / val2) * (2*BAD_PI)); } -f32 ml_map_f(f32 a, f32 b, f32 c, f32 d, f32 e) +f32 ml_map_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max) { - f32 val; + f32 result; - if (c != b) + if (in_max != in_min) { - if (d < e) + if (out_min < out_max) { - val = (((a - b) / (c - b)) * (e - d)) + d; + result = (((val - in_min) / (in_max - in_min)) * (out_max - out_min)) + out_min; - if (val > e) - return e; + if (result > out_max) + return out_max; - if (val < d) - return d; + if (result < out_min) + return out_min; } else { - val = (((a - b) / (c - b)) * (e - d)) + d; + result = (((val - in_min) / (in_max - in_min)) * (out_max - out_min)) + out_min; - if (val < e) - return e; + if (result < out_max) + return out_max; - if (val > d) - return d; + if (result > out_min) + return out_min; } - return val; + return result; } - return e; + return out_max; } f32 ml_mapRange_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max) diff --git a/src/core2/ch/badShad.c b/src/core2/ch/badShad.c index fe9417d8..bbe3b848 100644 --- a/src/core2/ch/badShad.c +++ b/src/core2/ch/badShad.c @@ -52,7 +52,7 @@ Actor *chBadShad_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ modelRender_setAlpha(other->alpha_124_19); sp40 = ml_map_f(this->unk28, 0.0f , 800.0f, 0.53f, 0.18f)*this->unk1C[1]; modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE); - modelRender_draw(gfx, mtx, this->position, sp44, sp40, NULL, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, this->position, sp44, sp40, NULL, marker_loadModelBin(marker)); return this; } diff --git a/src/core2/ch/beehive.c b/src/core2/ch/beehive.c index 61db5e17..527995e6 100644 --- a/src/core2/ch/beehive.c +++ b/src/core2/ch/beehive.c @@ -2,30 +2,34 @@ #include "functions.h" #include "variables.h" -void func_802CE8D4(Actor *this); +void chBeehive_update(Actor *this); -/* .data */ -ActorAnimationInfo D_803672C0[] ={ +enum chBeehive_state { + CHBEEHIVE_STATE_0_UNKNOWN, + CHBEEHIVE_STATE_1_IDLE, + CHBEEHIVE_STATE_2_DIE +}; + +ActorAnimationInfo chBeehiveAnimations[] ={ {0x000, 0.0f}, {ASSET_165_ANIM_BEEHIVE_IDLE, 0.65f}, {ASSET_65_ANIM_BEEHIVE_DIE, 0.5f}, {ASSET_65_ANIM_BEEHIVE_DIE, 1000000.0f}, }; -ActorInfo D_803672E0 = {0x50, ACTOR_12_BEEHIVE, ASSET_364_MODEL_BEEHIVE, - 1, D_803672C0, - func_802CE8D4, func_80326224, actor_draw, +ActorInfo chBeehive = {MARKER_50_BEEHIVE, ACTOR_12_BEEHIVE, ASSET_364_MODEL_BEEHIVE, + 1, chBeehiveAnimations, + chBeehive_update, func_80326224, actor_draw, 0, 0x333, 0.0f, 0 }; -/* .code */ -void func_802CE7E0(ActorMarker *marker, ActorMarker *other){ - Actor *actor = marker_getActor(marker); +void chBeehive_die(ActorMarker *this, ActorMarker *other){ + Actor *actor = marker_getActor(this); FUNC_8030E8B4(SFX_11_WOOD_BREAKING_1, 1.0f, 28000, actor->position, 300, 3000); FUNC_8030E8B4(SFX_D_EGGSHELL_BREAKING, 1.0f, 28000, actor->position, 300, 3000); - subaddie_set_state(actor, 2); + subaddie_set_state(actor, CHBEEHIVE_STATE_2_DIE); actor_playAnimationOnce(actor); - marker->collidable = FALSE; + this->collidable = FALSE; actor->unk138_27 = 3; __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); @@ -34,9 +38,9 @@ void func_802CE7E0(ActorMarker *marker, ActorMarker *other){ func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES); } -void func_802CE8D4(Actor *this){ +void chBeehive_update(Actor *this){ if(!this->unk16C_4){ - marker_setCollisionScripts(this->marker, NULL, NULL, func_802CE7E0); + marker_setCollisionScripts(this->marker, NULL, NULL, chBeehive_die); this->marker->propPtr->unk8_3 = 1; this->unk44_31 = func_8030D90C(); this->unk16C_4 = 1; @@ -48,42 +52,44 @@ void func_802CE8D4(Actor *this){ return; } this->unk58_0 = 1; - }//L802CE9A4 + } + switch(this->state) { - case 1://L802CE9C4 - if( !fileProgressFlag_get(FILEPROG_D_BEEHIVE_TEXT) - && subaddie_playerIsWithinCylinder(this, 250, 300) - ){ - if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){ - if( player_getTransformation() == TRANSFORM_1_BANJO - && func_80311480(ASSET_D96_DIALOG_BEEHIVE_MEET, 0, NULL, NULL, NULL, 0) - ){ - fileProgressFlag_set(FILEPROG_D_BEEHIVE_TEXT, 1); + case CHBEEHIVE_STATE_1_IDLE: + if( !fileProgressFlag_get(FILEPROG_D_BEEHIVE_TEXT) + && subaddie_playerIsWithinCylinder(this, 250, 300) + ){ + if(func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT){ + if( player_getTransformation() == TRANSFORM_1_BANJO + && func_80311480(ASSET_D96_DIALOG_BEEHIVE_MEET, 0, NULL, NULL, NULL, 0) + ){ + fileProgressFlag_set(FILEPROG_D_BEEHIVE_TEXT, 1); + } } } - }//L802CEA48 - if( actor_animationIsAt(this, 0.45f) - || actor_animationIsAt(this, 0.55f) - || actor_animationIsAt(this, 0.6f) - ){ - if(!this->unk38_0){ - func_8030E394(this->unk44_31); - sfxsource_setSfxId(this->unk44_31, SFX_67_BEEHIVE_CLONK); - sfxsource_setSampleRate(this->unk44_31, 12000); - func_8030DBB4(this->unk44_31, (animctrl_getAnimTimer(this->animctrl) + 0.9) - 0.4); - sfxsource_set_position(this->unk44_31, this->position); - sfxsource_set_fade_distances(this->unk44_31, 300.0f, 1500.0f); - func_8030DD14(this->unk44_31, 3); - func_8030E2C4(this->unk44_31); + + if( actor_animationIsAt(this, 0.45f) + || actor_animationIsAt(this, 0.55f) + || actor_animationIsAt(this, 0.6f) + ){ + if(!this->unk38_0){ + func_8030E394(this->unk44_31); + sfxsource_setSfxId(this->unk44_31, SFX_67_BEEHIVE_CLONK); + sfxsource_setSampleRate(this->unk44_31, 12000); + func_8030DBB4(this->unk44_31, (animctrl_getAnimTimer(this->animctrl) + 0.9) - 0.4); + sfxsource_set_position(this->unk44_31, this->position); + sfxsource_set_fade_distances(this->unk44_31, 300.0f, 1500.0f); + func_8030DD14(this->unk44_31, 3); + func_8030E2C4(this->unk44_31); + } } - }//L802CEB48 - break; - case 2://L802CEB2C - if(animctrl_isStopped(this->animctrl)){ - func_80326310(this); - } - break; - }//L802CEB48 -} + break; + case CHBEEHIVE_STATE_2_DIE: + if(animctrl_isStopped(this->animctrl)) { + func_80326310(this); + } + break; + } +} diff --git a/src/core2/ch/bottlesbonus.c b/src/core2/ch/bottlesbonus.c index 9e86fe47..335cd15a 100644 --- a/src/core2/ch/bottlesbonus.c +++ b/src/core2/ch/bottlesbonus.c @@ -178,7 +178,7 @@ Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)sp6C); modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); - modelRender_draw(gfx, mtx, sp60, NULL, D_80368250, sp54, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, sp60, NULL, D_80368250, sp54, marker_loadModelBin(marker)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); gDPSetColorDither((*gfx)++, G_CD_MAGICSQ); chBottlesBonusCursor_draw(gfx, mtx, vtx); @@ -226,7 +226,7 @@ f32 *chBottlesBonus_func_802DD584(s32 arg0){ // temp_f0 = D_80376F48; sizeof(BKAnimationList); - temp_v1 = (BKAnimation*)(model_getAnimationList(func_80330B1C(chBottlesBonusMarker)) + 1); + temp_v1 = (BKAnimation*)(model_getAnimationList(marker_loadModelBin(chBottlesBonusMarker)) + 1); D_8037DF70[0] = temp_v1[5 + arg0].unk0[0] * 0.01; D_8037DF70[1] = temp_v1[5 + arg0].unk0[1] * 0.01; D_8037DF70[2] = temp_v1[5 + arg0].unk0[2] * 0.01; diff --git a/src/core2/ch/bottlesbonuscursor.c b/src/core2/ch/bottlesbonuscursor.c index 46faccf4..98aac683 100644 --- a/src/core2/ch/bottlesbonuscursor.c +++ b/src/core2/ch/bottlesbonuscursor.c @@ -156,7 +156,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { (s32)sp3C, (s32)sp3C, D_803A5D00[getActiveFramebuffer()] ); - modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, func_80330B1C(chBottlesBonusCursorMarker)); + modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, marker_loadModelBin(chBottlesBonusCursorMarker)); func_8024E030(this->position, D_8037E5C0.unk10); if (this->state == 1) { D_8037E5C0.unk10[0] -= 24.0f; diff --git a/src/core2/ch/drips.c b/src/core2/ch/drips.c index d8a4db68..c432aac2 100644 --- a/src/core2/ch/drips.c +++ b/src/core2/ch/drips.c @@ -49,7 +49,7 @@ void func_80359A40(f32 position[3], struct_core2_D2AB0 *arg1, s32 cnt){ particleEmitter_emitN(pCtrl, cnt); } -void __chdrips_particleCallback(struct31s *pCtrl, f32 position[3]){ +void __chdrips_particleCallback(ParticleScaleAndLifetimeRanges *pCtrl, f32 position[3]){ if(func_8024549C(position, 4.0f)){ position[1] += 2.0f; func_80359A40(position, &D_80372AF0, 1); diff --git a/src/core2/ch/flotsam.c b/src/core2/ch/flotsam.c index 405bcaff..00621e00 100644 --- a/src/core2/ch/flotsam.c +++ b/src/core2/ch/flotsam.c @@ -29,7 +29,7 @@ ActorInfo D_80372C80 = { 0, 0, 1.0f, 0 }; -struct31s D_80372CA4 = { +ParticleScaleAndLifetimeRanges D_80372CA4 = { {1.0f, 1.2f}, {1.6f, 2.0f}, {0.05f, 0.05f}, @@ -183,7 +183,7 @@ void func_8035C080(Actor *this, s32 next_state){ particleEmitter_setStartingFrameRange(local->pCtrl_8, 0, 7); particleEmitter_setPosition(local->pCtrl_8, this->position); particleEmitter_setPositionVelocityAndAccelerationRanges(local->pCtrl_8, &D_80372CCC); - func_802EFB98(local->pCtrl_8, &D_80372CA4); + particleEmitter_setScaleAndLifetimeRanges(local->pCtrl_8, &D_80372CA4); particleEmitter_setSpawnInterval(local->pCtrl_8, 4); }//L8035C698 diff --git a/src/core2/ch/gravestone.c b/src/core2/ch/gravestone.c index 06f79c1b..42bbb2fb 100644 --- a/src/core2/ch/gravestone.c +++ b/src/core2/ch/gravestone.c @@ -70,7 +70,7 @@ bool func_8035ED60(Actor *this) { void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) { static s32 D_80373014[3] = {0xAA, 0xAA, 0xAA}; - static struct31s D_80373020 = {{0.4f, 0.8f}, {1.4f, 2.0f}, {0.0f, 0.01f}, {1.2f, 1.8f}, 0.0f, 0.01}; + static ParticleScaleAndLifetimeRanges D_80373020 = {{0.4f, 0.8f}, {1.4f, 2.0f}, {0.0f, 0.01f}, {1.2f, 1.8f}, 0.0f, 0.01}; static struct43s D_80373048 = { {{-200.0f, -200.0f, -200.0f}, { 200.0f, 200.0f, 200.0f}}, {{ 0.0f, -10.0f, 0.0f}, { 0.0f, -10.0f, 0.0f}}, @@ -83,7 +83,7 @@ void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) { particleEmitter_setSprite(p_ctrl, sprite); particleEmitter_setPosition(p_ctrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(p_ctrl, &D_80373048); - func_802EFB98(p_ctrl, &D_80373020); + particleEmitter_setScaleAndLifetimeRanges(p_ctrl, &D_80373020); particleEmitter_setDrawMode(p_ctrl, PART_EMIT_NO_DEPTH); particleEmitter_emitN(p_ctrl, count); } diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 5eff07f3..3c89d878 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -5,7 +5,6 @@ extern void subaddie_set_state_with_direction(Actor *, s32, f32 , s32); extern f32 func_80309B24(f32*); extern void func_80329904(ActorMarker*, s32, f32*); -extern void func_80326310(Actor *); extern void func_8032BB88(Actor *, s32, s32); void chJinjo_update(Actor *this); diff --git a/src/core2/ch/molehill.c b/src/core2/ch/molehill.c index d571b58a..b89bfeb1 100644 --- a/src/core2/ch/molehill.c +++ b/src/core2/ch/molehill.c @@ -28,7 +28,7 @@ ActorInfo D_80367E20= { 0, 0, 0.0f, 0 }; -struct31s D_80367E44 = { +ParticleScaleAndLifetimeRanges D_80367E44 = { {0.05f, 0.1f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -59,7 +59,7 @@ void func_802DA634(ParticleEmitter *pCtrl, f32 arg1[3], s32 cnt){ particleEmitter_setPosition(pCtrl, arg1); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setParticleVelocityRange(pCtrl, -150.0f, 150.0f, -150.0f, 150.0f, 360.0f, 150.0f); - func_802EFB98(pCtrl, &D_80367E44); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80367E44); func_802EF9F8(pCtrl, 0.01f); func_802EFA18(pCtrl, 3); particleEmitter_emitN(pCtrl, cnt); diff --git a/src/core2/ch/overlaynocontroller.c b/src/core2/ch/overlaynocontroller.c index b9f5f279..1b68e459 100644 --- a/src/core2/ch/overlaynocontroller.c +++ b/src/core2/ch/overlaynocontroller.c @@ -46,7 +46,7 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt func_8024C904(gdl, mptr); {sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;}; {sp34[0] = 0.0f; sp34[1] = 165.0f; sp34[2] = 0.0f;}; - modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, func_80330B1C(marker)); + modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, marker_loadModelBin(marker)); func_8024E2FC(); func_8024C904(gdl, mptr); return actor; diff --git a/src/core2/ch/overlaypressstart.c b/src/core2/ch/overlaypressstart.c index 74fdb6e8..68722cc3 100644 --- a/src/core2/ch/overlaypressstart.c +++ b/src/core2/ch/overlaypressstart.c @@ -56,7 +56,7 @@ Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx func_8024C904(gdl, mptr); {sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;}; {sp34[0] = 0.0f; sp34[1] = 400.0f; sp34[2] = 0.0f;}; - modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, func_80330B1C(marker)); + modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, marker_loadModelBin(marker)); func_8024E2FC(); func_8024C904(gdl, mptr); return actor; diff --git a/src/core2/ch/snowball.c b/src/core2/ch/snowball.c index 1882b977..93185b8a 100644 --- a/src/core2/ch/snowball.c +++ b/src/core2/ch/snowball.c @@ -39,7 +39,7 @@ Actor *chSnowball_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { } void __chSnowball_spawnPieces(f32 position[3]) { - static struct31s D_80368734 = {{0.65f, 1.1}, {0.0f, 0.0f}, {0.0f, 0.01f}, {0.8f, 0.8f}, 0.0f, 0.5f}; + static ParticleScaleAndLifetimeRanges D_80368734 = {{0.65f, 1.1}, {0.0f, 0.0f}, {0.0f, 0.01f}, {0.8f, 0.8f}, 0.0f, 0.5f}; static struct43s D_8036875C = { {{-220.0f, 210.0f, -220.0f}, {280.0f, 460.0f, 280.0f}}, {{ 0.0f, -800.0f, 0.0f}, { 0.0f, -800.0f, 0.0f}}, @@ -53,7 +53,7 @@ void __chSnowball_spawnPieces(f32 position[3]) { particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &D_8036875C); particleEmitter_setAngularVelocityRange(pCtrl, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); - func_802EFB98(pCtrl, &D_80368734); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80368734); particleEmitter_emitN(pCtrl, 8); } diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index d42a1532..16dfcb9d 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -104,7 +104,7 @@ void __chSnowman_spawnHat(ActorMarker *marker){ } void __chSnowman_spawnSnowballParticles(f32 position[3], s32 count){ - static struct31s D_80368694 = { + static ParticleScaleAndLifetimeRanges D_80368694 = { {0.4f, 1.55f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -127,7 +127,7 @@ void __chSnowman_spawnSnowballParticles(f32 position[3], s32 count){ func_802EFA18(particleSpawner, 3); func_802EFA20(particleSpawner, 1.0f, 1.3f); particleEmitter_setSfx(particleSpawner, SFX_2F_ORANGE_SPLAT, 16000); - func_802EFB98(particleSpawner, &D_80368694); + particleEmitter_setScaleAndLifetimeRanges(particleSpawner, &D_80368694); particleEmitter_emitN(particleSpawner, count); } diff --git a/src/core2/code_43800.c b/src/core2/code_43800.c index 8b611a13..f39aaecc 100644 --- a/src/core2/code_43800.c +++ b/src/core2/code_43800.c @@ -53,7 +53,7 @@ Actor *func_802CA7BC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ rotation[2] = this->roll; sp44 = ml_map_f(sp54[1] - sp40, 0.0f, 300.0f, 0.43f, 0.28f); modelRender_preDraw((GenFunction_1)func_802CA790, (s32)this); - modelRender_draw(gfx, mtx, this->position, rotation, sp44, NULL, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, this->position, rotation, sp44, NULL, marker_loadModelBin(marker)); return this; } diff --git a/src/core2/code_43A40.c b/src/core2/code_43A40.c index 1a23170b..737fde84 100644 --- a/src/core2/code_43A40.c +++ b/src/core2/code_43A40.c @@ -29,7 +29,7 @@ extern ActorInfo chFightFlightPad = { }; -extern struct31s chFightFlightPad_D_80366F8C = { +extern ParticleScaleAndLifetimeRanges chFightFlightPad_D_80366F8C = { {0.4f, 0.4f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -85,7 +85,7 @@ void chFightFlightPad_emitSparklesAtPosition(f32 position[3]){ particleEmitter_setSprite(pCtrl, ASSET_715_SPRITE_SPARKLE_RED); particleEmitter_setPosition(pCtrl, position); particleEmitter_setPositionVelocityAndAccelerationRanges(pCtrl, &chFightFlightPad_D_80366FB4); - func_802EFB98(pCtrl, &chFightFlightPad_D_80366F8C); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &chFightFlightPad_D_80366F8C); func_802EFA78(pCtrl, 1); particleEmitter_emitN(pCtrl, 0x18); } diff --git a/src/core2/code_47BD0.c b/src/core2/code_47BD0.c index 9501230e..3e10693a 100644 --- a/src/core2/code_47BD0.c +++ b/src/core2/code_47BD0.c @@ -87,7 +87,7 @@ Actor *chBeeSwarm_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ this = marker_getActor(marker); local = (ActorLocal_core2_47BD0 *)&this->local; - phi_fp = func_80330B1C(marker); + phi_fp = marker_loadModelBin(marker); for(phi_s2 = 0, phi_s0 = local->unk8; phi_s2 < local->unk0; phi_s2++){ sp80[0] = 0.0f; sp80[1] = phi_s0->unk24[1] - 90.0f; diff --git a/src/core2/code_4BE10.c b/src/core2/code_4BE10.c index c2517356..b19475f8 100644 --- a/src/core2/code_4BE10.c +++ b/src/core2/code_4BE10.c @@ -12,7 +12,7 @@ ActorInfo D_803675F0 = { 0, 0, 0.0f, 0 }; s16 D_80367614[] = {3,2,3,4,3,5,3,0}; -struct31s D_80367624 = {{0.7f, 0.3f}, {0.01f, 0.01f}, {0.05f, 0.05f}, {0.2f, 0.2f}, 0.0f, 0.01f}; +ParticleScaleAndLifetimeRanges D_80367624 = {{0.7f, 0.3f}, {0.01f, 0.01f}, {0.05f, 0.05f}, {0.2f, 0.2f}, 0.0f, 0.01f}; struct42s D_8036764C = { {{-100.0f, 400.0f, -100.0f}, { 100.0f, 800.0f, 100.0f}}, {{-100.0f, 0.0f, -100.0f}, { 100.0f, 0.0f, 100.0f}} @@ -39,7 +39,7 @@ void func_802D2DA0(Actor *this) { particleEmitter_setStartingFrameRange(pCtrl, 0, 0); particleEmitter_setPosition(pCtrl, sp70); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8036764C); - func_802EFB98(pCtrl, &D_80367624); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80367624); particleEmitter_setSpawnInterval(pCtrl, 1.0f); } } diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index d4772c70..cd2d1900 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -55,7 +55,7 @@ ActorInfo D_80367C10 = { /* .code */ void __chLevelCollectible_presentReturnEmitSparkles(f32 position[3], enum asset_e sprite_id) { - static struct31s D_80367C34 = {{0.2f, 0.4f}, {0.1f, 0.1f}, {0.0f, 0.01f}, {3.0f, 3.5f}, 0.1f, 0.1f}; + static ParticleScaleAndLifetimeRanges D_80367C34 = {{0.2f, 0.4f}, {0.1f, 0.1f}, {0.0f, 0.01f}, {3.0f, 3.5f}, 0.1f, 0.1f}; ParticleEmitter *p_emitter; p_emitter = partEmitMgr_newEmitter(1); @@ -64,7 +64,7 @@ void __chLevelCollectible_presentReturnEmitSparkles(f32 position[3], enum asset_ particleEmitter_setPosition(p_emitter, position); particleEmitter_setParticleSpawnPositionRange(p_emitter, -40.0f, 0.0f, -40.0f, 40.0f, 60.0f, 40.0f); particleEmitter_setParticleAccelerationRange(p_emitter, 0.0f, -1000.0f, 0.0f, 0.0f, -1000.0f, 0.0f); - func_802EFB98(p_emitter, &D_80367C34); + particleEmitter_setScaleAndLifetimeRanges(p_emitter, &D_80367C34); particleEmitter_emitN(p_emitter, 1); } diff --git a/src/core2/code_51950.c b/src/core2/code_51950.c index f9c2bd63..039e21d2 100644 --- a/src/core2/code_51950.c +++ b/src/core2/code_51950.c @@ -21,7 +21,7 @@ ActorInfo D_80367CB4 = { 0, 0, 0.0f, 0 }; -struct31s D_80367CD8 = { +ParticleScaleAndLifetimeRanges D_80367CD8 = { {0.24f, 0.2f}, {0.01f, 0.01f}, {0.0f, 0.0f}, @@ -55,7 +55,7 @@ void func_802D88E0(Actor *this) { particleEmitter_setPosition(pCtrl, sp5C); particleEmitter_setSprite(pCtrl, (this->modelCacheIndex == 0x1FF) ? ASSET_715_SPRITE_SPARKLE_RED : ASSET_713_SPRITE_SPARKLE_YELLOW); particleEmitter_setStartingFrameRange(pCtrl, 0, 0); - func_802EFB98(pCtrl, &D_80367CD8); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_80367CD8); func_802EFF50(pCtrl, 1.0f); particleEmitter_setSpawnInterval(pCtrl, 0.25f); } diff --git a/src/core2/code_55390.c b/src/core2/code_55390.c index 00ae1f2d..3c898192 100644 --- a/src/core2/code_55390.c +++ b/src/core2/code_55390.c @@ -48,7 +48,7 @@ Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp34[0] = 0.0f; sp34[1] = 137.5f; sp34[2] = 0.0f; - modelRender_draw(gfx, mtx, model_position, NULL, 1.0f, sp34, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, model_position, NULL, 1.0f, sp34, marker_loadModelBin(marker)); func_8024E2FC(); func_8024C904(gfx, mtx); return this; diff --git a/src/core2/code_55850.c b/src/core2/code_55850.c index f4cc3204..afe72ef7 100644 --- a/src/core2/code_55850.c +++ b/src/core2/code_55850.c @@ -47,7 +47,7 @@ Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp34[0] = 0.0f; sp34[1] = -87.0f; sp34[2] = 0.0f; - modelRender_draw(gfx, mtx, sp40, NULL, 1.0f, sp34, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, sp40, NULL, 1.0f, sp34, marker_loadModelBin(marker)); func_8024E2FC(); func_8024C904(gfx, mtx); return this; diff --git a/src/core2/code_57C70.c b/src/core2/code_57C70.c index 65ecac43..a709693b 100644 --- a/src/core2/code_57C70.c +++ b/src/core2/code_57C70.c @@ -67,7 +67,7 @@ Actor *func_802DEC00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp48)); modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); - modelRender_draw(gfx, mtx, this->position, NULL, 4.5f, sp4C, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, this->position, NULL, 4.5f, sp4C, marker_loadModelBin(marker)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); gDPSetColorDither((*gfx)++, G_CD_MAGICSQ); chBottlesBonus_func_802DD158(gfx, mtx); diff --git a/src/core2/code_581D0.c b/src/core2/code_581D0.c index ed008aee..a6702acf 100644 --- a/src/core2/code_581D0.c +++ b/src/core2/code_581D0.c @@ -33,7 +33,7 @@ Actor *func_802DF160(Gfx **gfx, Mtx **mtx, Vtx **vtx) { gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp38)); modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)D_8037E000); - modelRender_draw(gfx, mtx, &D_80368360, NULL, 1.0f, NULL, func_80330B1C(D_8037E000)); + modelRender_draw(gfx, mtx, &D_80368360, NULL, 1.0f, NULL, marker_loadModelBin(D_8037E000)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); return this; } diff --git a/src/core2/code_59780.c b/src/core2/code_59780.c index 7f3a94c3..94a5e785 100644 --- a/src/core2/code_59780.c +++ b/src/core2/code_59780.c @@ -91,7 +91,7 @@ Actor *func_802E0738(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ this = marker_getActorAndRotation(marker, &sp34); modelRender_preDraw( (GenFunction_1)func_802E0710, (s32)this); modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); - modelRender_draw(gfx, mtx, this->position, sp34, this->scale, NULL, func_80330B1C(marker)); + modelRender_draw(gfx, mtx, this->position, sp34, this->scale, NULL, marker_loadModelBin(marker)); return this; } diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 79c8c55b..ef040a76 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -80,7 +80,7 @@ Actor *func_80325340(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ BKModelBin * model_bin = func_80330DE4(marker); if(model_bin && func_8033A12C(model_bin)){ if(marker->collidable) - func_80330B1C(marker); + marker_loadModelBin(marker); } return NULL; } @@ -92,7 +92,7 @@ void actor_predrawMethod(Actor *this){ BKVertexList *sp40; f32 sp34[3]; - sp48 = func_80330B1C(this->marker); + sp48 = marker_loadModelBin(this->marker); func_80330534(this); if(this->animctrl != NULL){ animctrl_drawSetup(this->animctrl, this->position, 1); diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index 26e8ba06..c519cff0 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -1491,8 +1491,7 @@ Struct6Cs *func_80330B10(void){ return &D_8036E7D0; } -//marker_loadModelBin -BKModelBin *func_80330B1C(ActorMarker *this){ +BKModelBin *marker_loadModelBin(ActorMarker *this){ Actor* thisActor; BKModelBin * model; ModelCache *modelInfo; @@ -1540,7 +1539,7 @@ BKVertexList *func_80330CFC(Actor *this, s32 arg1){ ModelCache *model_cache_ptr; model_cache_ptr = &modelCache[this->modelCacheIndex]; if(model_cache_ptr->modelPtr == NULL){ - func_80330B1C(this->marker); + marker_loadModelBin(this->marker); } if(this->unkF4_30 && this->unk14C[this->unkF4_29 ^ arg1] != NULL) return this->unk14C[this->unkF4_29 ^ arg1]; @@ -1718,10 +1717,10 @@ s32 func_803311D4(Cube *arg0, f32 *arg1, f32 *arg2, f32 *arg3, u32 arg4) { if (!(var_s1->actorProp.marker->unk3E_0 && (marker_getActor(var_s1->actorProp.marker)->unk3C & 0x008000000))) { var_a0 = func_80330DE4(var_s1->actorProp.marker); } else { - var_a0 = func_80330B1C(var_s1->actorProp.marker); + var_a0 = marker_loadModelBin(var_s1->actorProp.marker); } - if(var_a0 != NULL || (func_8028F280() && (var_a0 = func_80330B1C(var_s1->actorProp.marker), TRUE))){ + if(var_a0 != NULL || (func_8028F280() && (var_a0 = marker_loadModelBin(var_s1->actorProp.marker), TRUE))){ temp_s0 = model_getCollisionList(var_a0); if (temp_s0 != 0) { temp_s2_2 = marker_getActor(var_s1->actorProp.marker); @@ -1734,7 +1733,7 @@ s32 func_803311D4(Cube *arg0, f32 *arg1, f32 *arg2, f32 *arg3, u32 arg4) { sp7C[2] = (f32) var_s1->actorProp.marker->roll; temp_s0_2 = func_802E805C(temp_s0, temp_a1, &sp88, &sp7C, temp_s2_2->scale, arg1, arg2, arg3, arg4); if ((temp_s0_2 != 0) && (func_8029453C())) { - func_80330B1C(var_s1->actorProp.marker); + marker_loadModelBin(var_s1->actorProp.marker); if (var_s1->actorProp.marker->unk50 != 0) { D_80383410[0] = arg2[0]; D_80383410[1] = arg2[1]; @@ -2007,7 +2006,7 @@ f32 func_80331F54(ActorMarker *marker) { f32 model_center[3]; BKModelBin *model; - model = func_80330B1C(marker); + model = marker_loadModelBin(marker); if (model == NULL) { return 1.0f; } diff --git a/src/core2/code_B8080.c b/src/core2/code_B8080.c index fd8a5258..ca91adf2 100644 --- a/src/core2/code_B8080.c +++ b/src/core2/code_B8080.c @@ -187,7 +187,7 @@ void func_8033F738(ActorMarker *arg0) { BKModelBin *sp1C; s32 sp18; - sp1C = func_80330B1C(arg0); + sp1C = marker_loadModelBin(arg0); sp18 = func_8033A0B0(sp1C); arg0->unk48 = func_8033F5F8(sp18, model_getVtxList(sp1C)); } diff --git a/src/core2/code_D0CA0.c b/src/core2/code_D0CA0.c index 5f972083..128ed0c7 100644 --- a/src/core2/code_D0CA0.c +++ b/src/core2/code_D0CA0.c @@ -238,7 +238,7 @@ void func_803584BC(Actor *this) { void func_80358524(f32 position[3], s32 count, enum asset_e model_id) { - static struct31s D_803728C4 = { {1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.01f}, {1.2f, 1.2f}, 0.0f, 0.1f}; + static ParticleScaleAndLifetimeRanges D_803728C4 = { {1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.01f}, {1.2f, 1.2f}, 0.0f, 0.1f}; static struct43s D_803728EC = { {{-250.0f, 500.0f, -250.0f}, { 350.0f, 760.0f, 350.0f}}, {{ 0.0f, -1200.0f, 0.0f}, { 0.0f, -1200.0f, 0.0f}}, @@ -257,7 +257,7 @@ void func_80358524(f32 position[3], s32 count, enum asset_e model_id) { func_802EFA20(p_ctrl, 1.0f, 1.3f); particleEmitter_setSfx(p_ctrl, SFX_2F_ORANGE_SPLAT, 16000); particleEmitter_setPositionVelocityAndAccelerationRanges(p_ctrl, &D_803728EC); - func_802EFB98(p_ctrl, &D_803728C4); + particleEmitter_setScaleAndLifetimeRanges(p_ctrl, &D_803728C4); particleEmitter_emitN(p_ctrl, count); } diff --git a/src/core2/code_DA3A0.c b/src/core2/code_DA3A0.c index f338d520..521f2546 100644 --- a/src/core2/code_DA3A0.c +++ b/src/core2/code_DA3A0.c @@ -26,7 +26,7 @@ ActorInfo D_80373158 = { 0, 0, 0.0f, 0 }; -struct31s D_8037317C = { +ParticleScaleAndLifetimeRanges D_8037317C = { {0.01f, 0.01f}, {2.5f, 3.0f}, {0.05f, 0.05f}, @@ -56,7 +56,7 @@ void func_80361330(Actor *this, s32 next_state){ particleEmitter_setStartingFrameRange(pctrl, 0, 7); particleEmitter_setParticleSpawnPositionRange(pctrl, -20.0f, -20.0f, -20.0f, 20.0f, 20.0f, 20.0f); particleEmitter_setPosition(pctrl, this->position); - func_802EFB98(pctrl, &D_8037317C); + particleEmitter_setScaleAndLifetimeRanges(pctrl, &D_8037317C); particleEmitter_setParticleVelocityRange(pctrl, sp40[0] *0.6, sp40[1]*0.6, sp40[2]*0.6, sp40[0], sp40[1], sp40[2] diff --git a/src/core2/particle.c b/src/core2/particle.c index a9775acb..4562cfe3 100644 --- a/src/core2/particle.c +++ b/src/core2/particle.c @@ -459,7 +459,7 @@ void func_802EFB84(ParticleEmitter * this, f32 min, f32 max){ this->particleFinalScaleRange_B4_max = max; } -void func_802EFB98(ParticleEmitter *this, struct31s *arg1){ +void particleEmitter_setScaleAndLifetimeRanges(ParticleEmitter *this, ParticleScaleAndLifetimeRanges *arg1){ this->particleStartingScaleRange_AC_min = arg1->unk0[0]; this->particleStartingScaleRange_AC_max = arg1->unk0[1]; if(-1.0f != arg1->unk8[0]){ @@ -474,7 +474,7 @@ void func_802EFB98(ParticleEmitter *this, struct31s *arg1){ } void func_802EFC28(ParticleEmitter *this, struct40s *arg1){ - func_802EFB98(this, &arg1->unk0); + particleEmitter_setScaleAndLifetimeRanges(this, &arg1->unk0); particleEmitter_setDrawMode(this, (s32)arg1->unk28); particleEmitter_emitN(this, (s32)arg1->unk2C); } diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index 70b79f5d..4f1bb87b 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -51,7 +51,7 @@ extern ActorInfo chJinjoGreen; //jingo_green extern ActorInfo chJinjoYellow; //jingo_yellow extern ActorInfo chJinjoPink; //jingo_pink extern ActorInfo chJinjoOrange; //jingo_orange -extern ActorInfo D_803672E0; //chbeehive +extern ActorInfo chBeehive; //chbeehive extern ActorInfo D_80367310; //chswarm extern ActorInfo D_80367390; //chwaterfallfx extern ActorInfo chShrapnelDescription; //scrapnel @@ -215,7 +215,7 @@ void spawnQueue_reset(void){ spawnableActorList_add(&D_80366090, actor_new, 0x2010103); spawnableActorList_add(&D_803660B4, actor_new, 0x0000103); spawnableActorList_add(&D_803674E0, actor_new, 0x0000182); - spawnableActorList_add(&D_803672E0, actor_new, 0x2000108); + spawnableActorList_add(&chBeehive, actor_new, 0x2000108); spawnableActorList_add(&D_80367310, actor_new, 0x0020001); spawnableActorList_add(&D_80367390, actor_new, 0x0080084); spawnableActorList_add(&chJinjoYellow, actor_new, 0x0000140); diff --git a/src/cutscenes/code_0.c b/src/cutscenes/code_0.c index cfa7b15b..4e33d4b9 100644 --- a/src/cutscenes/code_0.c +++ b/src/cutscenes/code_0.c @@ -170,7 +170,7 @@ void func_80386A90(s32 marker, s32 duration) { } void func_80386AC8(s32 arg0) { - static struct31s D_8038D350 = {{2.2f, 2.8f}, {6.3f, 9.4f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.2f, 0.9f}; + static ParticleScaleAndLifetimeRanges D_8038D350 = {{2.2f, 2.8f}, {6.3f, 9.4f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.2f, 0.9f}; Actor *actor; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -186,12 +186,12 @@ void func_80386AC8(s32 arg0) { particleEmitter_setParticleSpawnPositionRange(pCtrl, -50.0f, 600.0f, -50.0f, 50.0f, 600.0f, 50.0f); func_802EF9F8(pCtrl, 0.01f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D350); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D350); particleEmitter_emitN(pCtrl, 10); } void func_80386C34(s32 arg0) { - static struct31s D_8038D378 = {{3.0f, 6.0f}, {6.3f, 9.4f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.0f, 0.9f}; + static ParticleScaleAndLifetimeRanges D_8038D378 = {{3.0f, 6.0f}, {6.3f, 9.4f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.0f, 0.9f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -207,12 +207,12 @@ void func_80386C34(s32 arg0) { particleEmitter_setParticleSpawnPositionRange(pCtrl, -50.0f, 600.0f, -50.0f, 50.0f, 600.0f, 50.0f); func_802EF9F8(pCtrl, 0.01f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D378); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D378); particleEmitter_emitN(pCtrl, 15); } void func_80386DA0(s32 arg0) { - static struct31s D_8038D3A0 = {{10.0f, 10.0f}, {100.0f, 100.0f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.3f, 0.9f}; + static ParticleScaleAndLifetimeRanges D_8038D3A0 = {{10.0f, 10.0f}, {100.0f, 100.0f}, {0.0f, 0.05f}, {10.0f, 10.0f}, 0.3f, 0.9f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -228,12 +228,12 @@ void func_80386DA0(s32 arg0) { particleEmitter_setParticleSpawnPositionRange(pCtrl, -50.0f, 1500.0f, -50.0f, 50.0f, 1500.0f, 50.0f); func_802EF9F8(pCtrl, 0.01f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D3A0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D3A0); particleEmitter_emitN(pCtrl, 1); } void func_80386EF8(s32 arg0) { - static struct31s D_8038D3C8 = {{0.05f, 0.1f}, {0.0f, 0.0f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.3f}; + static ParticleScaleAndLifetimeRanges D_8038D3C8 = {{0.05f, 0.1f}, {0.0f, 0.0f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.3f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -248,12 +248,12 @@ void func_80386EF8(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -600.0f, 0.0f, 0.0f, -600.0f, 0.0f); func_802EF9F8(pCtrl, 0.01f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D3C8); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D3C8); particleEmitter_emitN(pCtrl, 8); } void func_8038702C(s32 arg0) { - static struct31s D_8038D3F0 = {{0.2f, 0.25f}, {0.35f, 0.4f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.8f}; + static ParticleScaleAndLifetimeRanges D_8038D3F0 = {{0.2f, 0.25f}, {0.35f, 0.4f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.8f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -269,12 +269,12 @@ void func_8038702C(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f); func_802EF9F8(pCtrl, 0.4f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D3F0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D3F0); particleEmitter_emitN(pCtrl, 8); } void func_80387170(s32 arg0) { - static struct31s D_8038D418 ={{0.2f, 0.25f}, {0.35f, 0.4f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.8f}; + static ParticleScaleAndLifetimeRanges D_8038D418 ={{0.2f, 0.25f}, {0.35f, 0.4f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.8f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -290,7 +290,7 @@ void func_80387170(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -800.0f, 0.0f, 0.0f, -800.0f, 0.0f); func_802EF9F8(pCtrl, 0.4f); func_802EFA18(pCtrl, 3); - func_802EFB98(pCtrl, &D_8038D418); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D418); particleEmitter_emitN(pCtrl, 8); } @@ -312,7 +312,7 @@ void func_803872B4(s32 arg0) { func_8034A174((struct5Bs *)sp44->marker->unk44, 7, sp34); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D470); - func_802EFB98(pCtrl, &D_8038D440.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D440.unk0); particleEmitter_emitN(pCtrl, 4); } @@ -336,12 +336,12 @@ void func_80387364(s32 arg0) { func_8034A174((struct5Bs *) sp34->marker->unk44, 8, sp24); particleEmitter_setPosition(pCtrl, sp24); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D4DC); - func_802EFB98(pCtrl, &D_8038D4AC.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D4AC.unk0); particleEmitter_emitN(pCtrl, 1); } void func_80387424(s32 arg0) { - static struct31s D_8038D50C = {{0.06f, 0.07f}, {0.07f, 0.07f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; + static ParticleScaleAndLifetimeRanges D_8038D50C = {{0.06f, 0.07f}, {0.07f, 0.07f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -355,13 +355,13 @@ void func_80387424(s32 arg0) { particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setParticleVelocityRange(pCtrl, -30.0f, 130.0f, -30.0f, 130.0f, 45.0f, 30.0f); - func_802EFB98(pCtrl, &D_8038D50C); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D50C); particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -300.0f, 0.0f, 0.0f, -300.0f, 0.0f); particleEmitter_emitN(pCtrl, 8); } void cutscenes_func_80387560(s32 arg0) { - static struct31s D_8038D534 = {{0.15f, 0.15f}, {0.15f, 0.15f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; + static ParticleScaleAndLifetimeRanges D_8038D534 = {{0.15f, 0.15f}, {0.15f, 0.15f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -373,13 +373,13 @@ void cutscenes_func_80387560(s32 arg0) { particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setParticleVelocityRange(pCtrl, -30.0f, 130.0f, -30.0f, 130.0f, 45.0f, 30.0f); - func_802EFB98(pCtrl, &D_8038D534); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D534); particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -500.0f, 0.0f, 0.0f, -500.0f, 0.0f); particleEmitter_emitN(pCtrl, 11); } void func_80387680(s32 arg0) { - static struct31s D_8038D55C = {{0.03f, 0.03f}, {0.03f, 0.03f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; + static ParticleScaleAndLifetimeRanges D_8038D55C = {{0.03f, 0.03f}, {0.03f, 0.03f}, {0.0f, 0.8f}, {1.0f, 1.1f}, 0.0f, 0.4f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -391,7 +391,7 @@ void func_80387680(s32 arg0) { particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f, -600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setParticleVelocityRange(pCtrl, -30.0f, 130.0f, -30.0f, 130.0f, 45.0f, 30.0f); - func_802EFB98(pCtrl, &D_8038D55C); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D55C); particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -500.0f, 0.0f, 0.0f, -500.0f, 0.0f); particleEmitter_emitN(pCtrl, 11); } @@ -419,12 +419,12 @@ void func_803877A0(s32 arg0) { func_8034A174((struct5Bs *) sp34->marker->unk44, 6, sp24); particleEmitter_setPosition(pCtrl, sp24); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D5C0); - func_802EFB98(pCtrl, &D_8038D590.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D590.unk0); particleEmitter_emitN(pCtrl, 1); } void func_803878A4(s32 arg0) { - static struct31s D_8038D5F0 = {{1.6f, 1.6f}, {1.6f, 1.6f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.3f}; + static ParticleScaleAndLifetimeRanges D_8038D5F0 = {{1.6f, 1.6f}, {1.6f, 1.6f}, {0.0f, 0.05f}, {4.0f, 4.0f}, 0.0f, 0.3f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -440,13 +440,13 @@ void func_803878A4(s32 arg0) { func_802EF9F8(pCtrl, 0.3f); func_802EFA18(pCtrl, 3); particleEmitter_setDrawMode(pCtrl, 2); - func_802EFB98(pCtrl, &D_8038D5F0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D5F0); particleEmitter_setSfx(pCtrl, SFX_21_EGG_BOUNCE_1, 15000); particleEmitter_emitN(pCtrl, 1); } void cutscenes_func_803879E0(s32 arg0) { - static struct31s D_8038D618 = {{1.6f, 1.6f}, {1.6f, 1.6f}, {0.0f, 3.0f}, {4.0f, 4.0f}, 0.0f, 0.3f}; + static ParticleScaleAndLifetimeRanges D_8038D618 = {{1.6f, 1.6f}, {1.6f, 1.6f}, {0.0f, 3.0f}, {4.0f, 4.0f}, 0.0f, 0.3f}; Actor *sp44; ParticleEmitter *pCtrl; f32 sp34[3]; @@ -463,7 +463,7 @@ void cutscenes_func_803879E0(s32 arg0) { func_802EF9F8(pCtrl, 0.3f); func_802EFA18(pCtrl, 3); particleEmitter_setDrawMode(pCtrl, 2); - func_802EFB98(pCtrl, &D_8038D618); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D618); particleEmitter_setSfx(pCtrl, SFX_21_EGG_BOUNCE_1, 15000); particleEmitter_emitN(pCtrl, 2); } @@ -488,7 +488,7 @@ void func_80387B58(s32 arg0) { func_8034A174((struct5Bs *) sp44->marker->unk44, 5, sp34); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D670); - func_802EFB98(pCtrl, &D_8038D640.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D640.unk0); particleEmitter_emitN(pCtrl, 1); } @@ -517,7 +517,7 @@ void func_80387C64(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -30.0f, 0.0f, 0.0f, -30.0f, 0.0f); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D6DC); - func_802EFB98(pCtrl, &D_8038D6AC.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D6AC.unk0); particleEmitter_emitN(pCtrl, 1); } } @@ -543,7 +543,7 @@ void func_80387D88(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -30.0f, 0.0f, 0.0f, -30.0f, 0.0f); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D73C); - func_802EFB98(pCtrl, &D_8038D70C.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D70C.unk0); particleEmitter_emitN(pCtrl, 25); } } @@ -571,7 +571,7 @@ void func_80387E9C(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, -30.0f, 0.0f, 0.0f, -30.0f, 0.0f); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D7A8); - func_802EFB98(pCtrl, &D_8038D778.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D778.unk0); particleEmitter_emitN(pCtrl, 1); } } @@ -598,7 +598,7 @@ void func_80387FC0(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, 200.0f, 0.0f, 0.0f, 200.0f, 0.0f); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D808); - func_802EFB98(pCtrl, &D_8038D7D8.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D7D8.unk0); particleEmitter_emitN(pCtrl, 1); } } @@ -626,7 +626,7 @@ void func_803880C8(s32 arg0) { func_8034A174((struct5Bs *) sp34->marker->unk44, 5, sp24); particleEmitter_setPosition(pCtrl, sp24); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D874); - func_802EFB98(pCtrl, &D_8038D844.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D844.unk0); particleEmitter_emitN(pCtrl, 1); } @@ -651,7 +651,7 @@ void func_803881CC(s32 arg0) { particleEmitter_setParticleAccelerationRange(pCtrl, 0.0f, 100.0f, 0.0f, 0.0f, 300.0f, 0.0f); particleEmitter_setPosition(pCtrl, sp34); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038D8D4); - func_802EFB98(pCtrl, &D_8038D8A4.unk0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038D8A4.unk0); particleEmitter_emitN(pCtrl, 2); } } diff --git a/src/cutscenes/code_6730.c b/src/cutscenes/code_6730.c index caa0b1dc..39b3c925 100644 --- a/src/cutscenes/code_6730.c +++ b/src/cutscenes/code_6730.c @@ -25,7 +25,7 @@ extern ActorInfo D_8038E718 = { extern s32 D_8038E73C[3] = {0xff, 0xff, 0xff}; -extern struct31s D_8038E748 = { +extern ParticleScaleAndLifetimeRanges D_8038E748 = { {0.1f, 0.3f}, {0.0f, 0.0f}, {0.0f, 0.01f}, @@ -45,7 +45,7 @@ void cutscenes_func_8038CB20(ParticleEmitter *pCtrl){ particleEmitter_setAlpha(pCtrl, 230); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f,-600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setVelocityAndAccelerationRanges(pCtrl, &D_8038E770); - func_802EFB98(pCtrl, &D_8038E748); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038E748); particleEmitter_setDrawMode(pCtrl, 4); particleEmitter_manualFree(pCtrl); } diff --git a/src/cutscenes/code_69F0.c b/src/cutscenes/code_69F0.c index 2b2ad6d9..c26a37a1 100644 --- a/src/cutscenes/code_69F0.c +++ b/src/cutscenes/code_69F0.c @@ -19,7 +19,7 @@ ActorInfo D_8038E7A0 = { s32 D_8038E7C4[3] = {0xFF, 0xFF, 0xFF}; -struct31s D_8038E7D0 = { +ParticleScaleAndLifetimeRanges D_8038E7D0 = { {0.7f, 0.9f}, {0.4f, 0.5f}, {0.0f, 0.01f}, @@ -34,7 +34,7 @@ struct42s D_8038E7F8 ={ s32 D_8038E828[3] = {0xFF, 0xFF, 0xFF}; -struct31s D_8038E834 = { +ParticleScaleAndLifetimeRanges D_8038E834 = { {0.05f, 0.1f}, {0.1f, 0.2f}, {0.0f, 0.01f}, @@ -55,7 +55,7 @@ void func_8038CDE0(ParticleEmitter *pCtrl){ particleEmitter_setAlpha(pCtrl, 0xff); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f,-600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038E7F8); - func_802EFB98(pCtrl, &D_8038E7D0); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038E7D0); func_802EFA78(pCtrl, 1); particleEmitter_setDrawMode(pCtrl, 4); particleEmitter_manualFree(pCtrl); @@ -67,7 +67,7 @@ void func_8038CE98(ParticleEmitter *pCtrl){ particleEmitter_setAlpha(pCtrl, 0xff); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f,-600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setPositionAndVelocityRanges(pCtrl, &D_8038E85C); - func_802EFB98(pCtrl, &D_8038E834); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038E834); func_802EFA78(pCtrl, 1); particleEmitter_setDrawMode(pCtrl, 4); particleEmitter_manualFree(pCtrl); diff --git a/src/cutscenes/code_6C90.c b/src/cutscenes/code_6C90.c index cee45e44..a81fa45d 100644 --- a/src/cutscenes/code_6C90.c +++ b/src/cutscenes/code_6C90.c @@ -25,7 +25,7 @@ ActorInfo D_8038E8A8 = { s32 D_8038E8CC[3] = {0xff, 0xff, 0xff}; -struct31s D_8038E8D8 = { +ParticleScaleAndLifetimeRanges D_8038E8D8 = { {0.6f, 0.6f}, {0.9f, 0.9f}, {0.0f, 0.01f}, @@ -46,7 +46,7 @@ void func_8038D080(ParticleEmitter *pCtrl){ particleEmitter_setAlpha(pCtrl, 60); particleEmitter_setAngularVelocityRange(pCtrl, -600.0f, -600.0f,-600.0f, 600.0f, 600.0f, 600.0f); particleEmitter_setVelocityAndAccelerationRanges(pCtrl, &D_8038E900); - func_802EFB98(pCtrl, &D_8038E8D8); + particleEmitter_setScaleAndLifetimeRanges(pCtrl, &D_8038E8D8); particleEmitter_setDrawMode(pCtrl, 4); particleEmitter_manualFree(pCtrl); } diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index 42e093a9..57f4dfab 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" #include "core2/particle.h" @@ -68,7 +69,7 @@ f32 D_80391948[4] = {1.0f, 1.0f, 1.0f, 1.0f}; f32 D_80391958[4] = {0.33f, 0.33f, 0.33f, 1.0f}; -struct31s D_80391968 = { +ParticleScaleAndLifetimeRanges D_80391968 = { {0.1f, 0.1f}, {10.0f, 10.0f}, {0.0f, 0.01f}, {0.8f, 0.8f}, 0.1f, 0.1f }; @@ -340,7 +341,7 @@ void func_8038CED8(f32 arg0[3], enum asset_e model_id, f32 arg2, f32 arg3){ D_80391968.unk0[1] *= arg2; D_80391968.unk8[0] *= arg2; D_80391968.unk8[1] *= arg2; - func_802EFB98(s0, &D_80391968); + particleEmitter_setScaleAndLifetimeRanges(s0, &D_80391968); particleEmitter_setDrawMode(s0, PART_EMIT_NO_DEPTH); func_802EFA78(s0, 1); particleEmitter_emitN(s0, 1); diff --git a/src/fight/chbossjinjobase.c b/src/fight/chbossjinjobase.c index cdd8b4a7..ded84712 100644 --- a/src/fight/chbossjinjobase.c +++ b/src/fight/chbossjinjobase.c @@ -1,24 +1,31 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" typedef struct { u8 unk0; -}ActorLocal_fight_6E90; +}ActorLocal_BossJinjoBase; -void func_8038D568(Actor *this); +enum chBossJinjoBase_states { + CHBOSSJINJOBASE_STATE_1_RAISE = 1, + CHBOSSJINJOBASE_STATE_2_DEFAULT = 2, + CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO = 3 +}; + +void chBossJinjoBase_update(Actor *this); /* .data */ ActorInfo chBossJinjoBase = { MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE, 0x1, NULL, - func_8038D568, func_80326224, actor_draw, + chBossJinjoBase_update, func_80326224, actor_draw, 0, 0x800, 0.0f, 0 }; -s32 D_803919B4[3] = {0xC8, 0xC8, 0xA0}; +s32 chBossJinjoBase_smokeColor[3] = {0xC8, 0xC8, 0xA0}; -struct31s D_803919C0 = { +ParticleScaleAndLifetimeRanges chBossJinjoBase_smokeSettings = { {1.0f, 1.0f}, {1.7f, 2.7f}, {0.0f, 0.05f}, @@ -36,17 +43,17 @@ void chbossjinjobase_spawnStoneJinjo(ActorMarker *arg0) { sp1C->unk100 = temp_v0->marker; } -void func_8038D2EC(f32 arg0[3], s32 arg1) { - ParticleEmitter *temp_v0 = partEmitMgr_newEmitter(arg1); +void chBossJinjoBase_emitSmoke(f32 position[3], s32 count) { + ParticleEmitter *p = partEmitMgr_newEmitter(count); - particleEmitter_setSprite(temp_v0, ASSET_70E_SPRITE_SMOKE_2); - particleEmitter_setRGB(temp_v0, D_803919B4); - particleEmitter_setStartingFrameRange(temp_v0, 0, 7); - particleEmitter_setPosition(temp_v0, arg0); - particleEmitter_setParticleSpawnPositionRange(temp_v0, -90.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f); - particleEmitter_setParticleVelocityRange(temp_v0, -170.0f, 0.0f, -170.0f, 170.0f, 100.0f, 170.0f); - func_802EFB98(temp_v0, &D_803919C0); - particleEmitter_emitN(temp_v0, arg1); + particleEmitter_setSprite(p, ASSET_70E_SPRITE_SMOKE_2); + particleEmitter_setRGB(p, chBossJinjoBase_smokeColor); + particleEmitter_setStartingFrameRange(p, 0, 7); + particleEmitter_setPosition(p, position); + particleEmitter_setParticleSpawnPositionRange(p, -90.0f, 0.0f, -80.0f, 80.0f, 60.0f, 80.0f); + particleEmitter_setParticleVelocityRange(p, -170.0f, 0.0f, -170.0f, 170.0f, 100.0f, 170.0f); + particleEmitter_setScaleAndLifetimeRanges(p, &chBossJinjoBase_smokeSettings); + particleEmitter_emitN(p, count); } void func_8038D3DC(Actor* this, s32 arg1, f32 arg2, f32 arg3, f32 arg4){ @@ -57,25 +64,27 @@ void func_8038D3DC(Actor* this, s32 arg1, f32 arg2, f32 arg3, f32 arg4){ } } -void func_8038D428(ActorMarker *arg0, ActorMarker *arg1) { - Actor *temp_v0; - Actor *s0; +void chBossJinjoBase_getHitByEgg(ActorMarker *this, ActorMarker *other) { + Actor *actor_base; + Actor *actor_other; - temp_v0 = marker_getActor(arg0); - if (temp_v0->state != 3) { + actor_base = marker_getActor(this); + + if (actor_base->state != CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO) { func_8025A70C(COMUSIC_2B_DING_B); - temp_v0->unk38_31++; - if (temp_v0->unk38_31 >= 3) { - subaddie_set_state(temp_v0, 3); - chstonejinjo_breakOpen(temp_v0->unk100); - func_8038D3DC(temp_v0, 0x19A, -100.0f, 0.0f, 1.2f); - func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, temp_v0->position, 1000.0f, 2000.0f); + actor_base->unk38_31++; // hit count + + if (actor_base->unk38_31 >= 3) { // spawn Jjnjonator + subaddie_set_state(actor_base, CHBOSSJINJOBASE_STATE_3_SPAWNED_BOSS_JINJO); + chstonejinjo_breakOpen(actor_base->unk100); + func_8038D3DC(actor_base, 0x19A, -100.0f, 0.0f, 1.2f); + func_80324D54(1.2f, SFX_90_SWITCH_PRESS, 1.0f, 32000, actor_base->position, 1000.0f, 2000.0f); } } } void fight_func_8038D510(Actor *arg0) { - ActorLocal_fight_6E90 *sp18 = (ActorLocal_fight_6E90 *)&arg0->local; + ActorLocal_BossJinjoBase *sp18 = (ActorLocal_BossJinjoBase *)&arg0->local; if ((u8)arg0->unk44_31 != 0) { func_8030DA44(arg0->unk44_31); @@ -87,21 +96,21 @@ void fight_func_8038D510(Actor *arg0) { } } -void func_8038D568(Actor *this){ - ActorLocal_fight_6E90 *local = (ActorLocal_fight_6E90 *)&this->local; +void chBossJinjoBase_update(Actor *this) { + ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *)&this->local; - f32 sp48 = time_getDelta(); - u32 sp44 = globalTimer_getTime() & 0xF; - Actor *other; //sp40 - f32 sp3C; - f32 sp30[3]; + f32 delta_time = time_getDelta(); + u32 shake_noise = globalTimer_getTime() & 0xF; + Actor *actor_stone_jinjo; //sp40 + f32 y_delta; + f32 position_delta[3]; this->unkF4_29 = 0; - func_80330B1C(this->marker); + marker_loadModelBin(this->marker); if(!this->unk16C_4){ this->unk16C_4 = 1; - marker_setCollisionScripts(this->marker, NULL, func_8038D428, NULL); + marker_setCollisionScripts(this->marker, NULL, chBossJinjoBase_getHitByEgg, NULL); marker_setFreeMethod(this->marker, fight_func_8038D510); this->marker->propPtr->unk8_3 = 1; actor_collisionOn(this); @@ -128,44 +137,45 @@ void func_8038D568(Actor *this){ func_802BB3DC(0, 8.0f, 0.92f); __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]); - func_8038D2EC(this->unk1C, 0x10); + chBossJinjoBase_emitSmoke(this->unk1C, 0x10); SPAWNQUEUE_ADD_1(chbossjinjobase_spawnStoneJinjo, this->marker); } - else{//L8038D774 - if(this->state == 1){ - other = marker_getActor(this->unk100); - sp3C = this->velocity_y * sp48; - if(this->position_y + sp3C < this->unk1C[1]){ - if( !fileProgressFlag_get(FILEPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) || this->unkF4_8 == 1){ + else{ + if(this->state == CHBOSSJINJOBASE_STATE_1_RAISE) { + actor_stone_jinjo = marker_getActor(this->unk100); + y_delta = this->velocity_y * delta_time; + + if(this->position_y + y_delta < this->unk1C[1]) { + if( !fileProgressFlag_get(FILEPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) || this->unkF4_8 == 1) { func_8030E2C4(this->unk44_31); func_8030E2C4(local->unk0); } - sp30[0] = (sp44 & 1) ? 3.0f : -3.0f; - sp30[1] = sp3C; - sp30[2] = (sp44 & 2) ? 3.0f : -3.0f; + + position_delta[0] = (shake_noise & 1) ? 3.0f : -3.0f; + position_delta[1] = y_delta; + position_delta[2] = (shake_noise & 2) ? 3.0f : -3.0f; this->position_x = this->unk1C[0]; this->position_z = this->unk1C[2]; - this->position_x = sp30[0] + this->position_x; - this->position_y = sp30[1] + this->position_y; - this->position_z = sp30[2] + this->position_z; - - other->position_x = this->unk1C[0]; - other->position_z = this->unk1C[2]; - other->position_x = sp30[0] + other->position_x; - other->position_y = sp30[1] + other->position_y; - other->position_z = sp30[2] + other->position_z; + this->position_x = position_delta[0] + this->position_x; + this->position_y = position_delta[1] + this->position_y; + this->position_z = position_delta[2] + this->position_z; + actor_stone_jinjo->position_x = this->unk1C[0]; + actor_stone_jinjo->position_z = this->unk1C[2]; + actor_stone_jinjo->position_x = position_delta[0] + actor_stone_jinjo->position_x; + actor_stone_jinjo->position_y = position_delta[1] + actor_stone_jinjo->position_y; + actor_stone_jinjo->position_z = position_delta[2] + actor_stone_jinjo->position_z; } - else{//L8038D8E0 - subaddie_set_state(this, 2); + else { + subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT); func_8030DA44(this->unk44_31); this->unk44_31 = 0; func_8030DA44(local->unk0); local->unk0 = 0; TUPLE_COPY(this->position, this->unk1C); - TUPLE_COPY(other->position, this->unk1C); - other->position_y += 172.0f; + TUPLE_COPY(actor_stone_jinjo->position, this->unk1C); + actor_stone_jinjo->position_y += 172.0f; } } }//L8038D954 diff --git a/src/fight/chbossshadow.c b/src/fight/chbossshadow.c index 0ca0469b..6cc6b843 100644 --- a/src/fight/chbossshadow.c +++ b/src/fight/chbossshadow.c @@ -1,30 +1,29 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" -Actor *chbossshadow_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3); -void chbossshadow_update(Actor *this); - -/* .data */ ActorInfo chBossShadow = { MARKER_288_GRUNTY_SHADOW, ACTOR_3AF_GRUNTY_SHADOW, ASSET_3BF_MODEL_PLAYER_SHADOW, 0x1, NULL, - chbossshadow_update, func_80326224, chbossshadow_draw, + chBossShadow_update, func_80326224, chBossShadow_draw, 0, 0, 0.0f, 0 }; -/* .code */ -Actor *chbossshadow_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ - f32 sp34[3]; - f32 sp30; - Actor *this; - this = marker_getActorAndRotation(marker, sp34); - sp30 = this->scale * ml_map_f(this->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f); +Actor *chBossShadow_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **vptr) { + f32 rotation[3]; + f32 scale; + Actor *actor; + + // unk1C[0] of ACTOR_3AF_GRUNTY_SHADOW is set in chfinalboss_update to the distance between Gruntilda and the floor triangle below her + actor = marker_getActorAndRotation(this, rotation); + scale = actor->scale * ml_map_f(actor->unk1C[0], 0.0f, 1000.0f, 1.75f, 0.9f); + modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE); - modelRender_draw(gdl, mptr, this->position, sp34, sp30, NULL, func_80330B1C(marker)); - return this; + modelRender_draw(gdl, mptr, actor->position, rotation, scale, NULL, marker_loadModelBin(this)); + + return actor; } - -void chbossshadow_update(Actor *this){ +void chBossShadow_update(Actor *this) { actor_collisionOff(this); } diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index a1aeedff..d707abfe 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -122,7 +122,7 @@ f32 fight_D_80391524[3] = {0.0f, -8.0f, 400.0f}; f32 D_80391530[3] = {0.0f, -8.0f, 0.0f}; -struct31s D_8039153C ={ +ParticleScaleAndLifetimeRanges D_8039153C ={ {1.0f, 1.0f}, {1.0f, 1.0f}, {0.0f, 0.01f}, @@ -285,7 +285,7 @@ void chfinalboss_spawnBroomstickParticles(f32 position[3], enum asset_e model_id particleEmitter_setPosition(temp_s0, position); particleEmitter_setAngularVelocityRange(temp_s0, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f); particleEmitter_setPositionVelocityAndAccelerationRanges(temp_s0, &D_80391564); - func_802EFB98(temp_s0, &D_8039153C); + particleEmitter_setScaleAndLifetimeRanges(temp_s0, &D_8039153C); func_802EFA78(temp_s0, 1); particleEmitter_emitN(temp_s0, n); } diff --git a/src/fight/chgreenblast.c b/src/fight/chgreenblast.c index 56834e23..468a57a8 100644 --- a/src/fight/chgreenblast.c +++ b/src/fight/chgreenblast.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]); extern void func_80387470(Actor *, f32 [3], f32, f32, f32, f32, f32); diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index cd32034e..eaf721fc 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" extern f32 func_8038C288(void); extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32); diff --git a/src/fight/chjinjonatorbase.c b/src/fight/chjinjonatorbase.c index 304b4ef5..64e7113f 100644 --- a/src/fight/chjinjonatorbase.c +++ b/src/fight/chjinjonatorbase.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" typedef struct { u8 unk0[4]; @@ -18,7 +19,7 @@ ActorInfo chJinjonatorBase = { s32 D_80391A64[3] = {0xC8, 0xC8, 0xA0}; -struct31s fight_D_80391A70 = { +ParticleScaleAndLifetimeRanges fight_D_80391A70 = { {1.0f, 1.0f}, {1.7f, 2.7f}, {0.0f, 0.05f}, @@ -53,7 +54,7 @@ void func_8038E03C(f32 arg0[3], u32 arg1) { particleEmitter_setStartingFrameRange(temp_v0, 0, 7); particleEmitter_setPosition(temp_v0, arg0); particleEmitter_setPositionAndVelocityRanges(temp_v0, &D_80391A98); - func_802EFB98(temp_v0, &fight_D_80391A70); + particleEmitter_setScaleAndLifetimeRanges(temp_v0, &fight_D_80391A70); particleEmitter_emitN(temp_v0, arg1); } @@ -116,7 +117,7 @@ void chjinjonatorbase_update(Actor *this){ f32 sp38[3]; - func_80330B1C(this->marker); + marker_loadModelBin(this->marker); if(!this->unk16C_4){ this->unk16C_4 = 1; marker_setCollisionScripts(this->marker, NULL, func_8038E120, NULL); diff --git a/src/fight/chspellbarrier.c b/src/fight/chspellbarrier.c index 65482518..99009fed 100644 --- a/src/fight/chspellbarrier.c +++ b/src/fight/chspellbarrier.c @@ -1,7 +1,7 @@ #include #include "functions.h" #include "variables.h" - +#include "fight.h" extern ActorMarker *chfinalboss_findCollidingJinjo(Actor*, f32); void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]); diff --git a/src/fight/chspellfireball.c b/src/fight/chspellfireball.c index 39ef4e29..1dac6dca 100644 --- a/src/fight/chspellfireball.c +++ b/src/fight/chspellfireball.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "fight.h" #include "core2/particle.h" extern void func_80324CFC(f32, s32, s32); diff --git a/src/fight/code_0.c b/src/fight/code_0.c index 2ec3311c..bd57eed5 100644 --- a/src/fight/code_0.c +++ b/src/fight/code_0.c @@ -1,26 +1,9 @@ #include #include "functions.h" #include "variables.h" - #include "prop.h" +#include "fight.h" -extern ActorInfo chFightFlightPad; -extern ActorInfo chFinalBoss; -extern ActorInfo chBossJinjoOrange; -extern ActorInfo chBossJinjoGreen; -extern ActorInfo chBossJinjoPink; -extern ActorInfo chBossJinjoYellow; -extern ActorInfo chBossJinjoBase; -extern ActorInfo chStoneJinjo; -extern ActorInfo chJinjonatorBase; -extern ActorInfo chSpellBarrier; -extern ActorInfo chSpellFireball; -extern ActorInfo chSpellGreen; -extern ActorInfo chGreenBlast; -extern ActorInfo chJinjonator; -extern ActorInfo chBossShadow; - -/* .bss */ u8 pad_fight_80392740[0x10]; void fight_func_803863F0(void) diff --git a/src/fight/fight.h b/src/fight/fight.h index 365ed708..c2f8d511 100644 --- a/src/fight/fight.h +++ b/src/fight/fight.h @@ -9,4 +9,25 @@ enum bossjinjo_e{ BOSSJINJO_JINJONATOR }; +extern ActorInfo chFightFlightPad; +extern ActorInfo chFinalBoss; +extern ActorInfo chBossJinjoOrange; +extern ActorInfo chBossJinjoGreen; +extern ActorInfo chBossJinjoPink; +extern ActorInfo chBossJinjoYellow; +extern ActorInfo chBossJinjoBase; +extern ActorInfo chStoneJinjo; +extern ActorInfo chJinjonatorBase; +extern ActorInfo chSpellBarrier; +extern ActorInfo chSpellFireball; +extern ActorInfo chSpellGreen; +extern ActorInfo chGreenBlast; +extern ActorInfo chJinjonator; +extern ActorInfo chBossShadow; + +extern void fight_func_803863F0(void); + +extern Actor *chBossShadow_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **vptr); +extern void chBossShadow_update(Actor *this); + #endif diff --git a/src/lair/code_0.c b/src/lair/code_0.c index 32ee0a05..bdfb5ddd 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -16,7 +16,6 @@ extern int actor_animationIsAt(Actor *, f32); extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32); extern void func_8033A45C(s32, s32); extern void func_8034E0FC(void *, s32); -extern void *func_8034C2C4(ActorMarker *, s32); @@ -162,7 +161,7 @@ ActorInfo D_8039339C = { 0x234, 0x23E, 0x4E1, 0x12, D_80392CB0, func_8038982C, f ActorInfo D_803933C0 = { 0x163, 0x258, 0x511, 0x12, D_80392CB0, func_80389898, func_80326224, func_8038664C, 0, 0, 0.0f, 0x8E}; ActorInfo D_803933E4 = { 0x160, 0x255, 0x509, 0x15, D_80392CB0, func_80389934, func_80326224, actor_draw, 0, 0, 0.0f, 0}; ActorInfo D_80393408 = { 0x102, 0x203, 0x491, 0x1, D_80392CB0, func_80387730, func_80326224, func_80387DA8, 0, 0, 0.0f, 0}; -struct31s D_8039342C = { +ParticleScaleAndLifetimeRanges D_8039342C = { {0.31f, 0.37f}, {0.17f, 0.22f}, {0.0f, 0.01f}, @@ -199,7 +198,7 @@ s16 D_8039347C[] = {50, 180, 260, 350, 450, 640, 765, 810, 828, 846, 864, 882}; s16 D_80393494[] = {0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B}; s32 D_803934A0[3] = {0x00, 0xFF, 0x00}; -struct31s D_803934AC = { +ParticleScaleAndLifetimeRanges D_803934AC = { {1.0f, 2.0f}, {2.4f, 5.0f}, {0.0f, 3.2f}, @@ -320,7 +319,7 @@ ParticleEmitter *func_803866D8(s32 a0) particleEmitter_manualFree(ptr); particleEmitter_setSprite(ptr, ASSET_710_SPRITE_SPARKLE_PURPLE); - func_802EFB98(ptr, &D_8039342C); + particleEmitter_setScaleAndLifetimeRanges(ptr, &D_8039342C); particleEmitter_setParticleVelocityRange(ptr, 0.f, 70.f, 0.f, 0.f, 140.f, 0.f); colour[0] = a0 * 0xFF; @@ -1191,7 +1190,7 @@ void func_80388524(Actor *this) { particleEmitter_setAlpha(sp2C, 0x3C); particleEmitter_setPosition(sp2C, this->position); particleEmitter_setPositionAndVelocityRanges(sp2C, &D_803934D4); - func_802EFB98(sp2C, &D_803934AC); + particleEmitter_setScaleAndLifetimeRanges(sp2C, &D_803934AC); particleEmitter_emitN(sp2C, 3); } break; @@ -1640,7 +1639,7 @@ void func_80389934(Actor *this) if (actor_animationIsAt(this, 0.95f)) { subaddie_set_state_with_direction(this, 0x18, 0.999f, 1); - FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 1.0f, 26000,); + FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 1.0f, 26000); } break; diff --git a/src/lair/code_86F0.c b/src/lair/code_86F0.c index 47d02d86..ad7b2e89 100644 --- a/src/lair/code_86F0.c +++ b/src/lair/code_86F0.c @@ -41,7 +41,7 @@ Struct_lair_86F0_0 D_803947F8[0xb] ={ { 4, 0x3, FILEPROG_7F_DOUBLE_HEALTH_PUZZLE_PIECES_PLACED} }; s32 D_80394824[3] = {0xff, 0xff, 0}; -struct31s D_80394830 = { +ParticleScaleAndLifetimeRanges D_80394830 = { {0.17f, 0.24f}, {0.08f, 0.13f}, {0.0f, 0.01f}, @@ -460,7 +460,7 @@ void lair_func_8038F924(Actor *this) { sp54 = partEmitMgr_newEmitter(6); particleEmitter_setSprite(sp54, ASSET_710_SPRITE_SPARKLE_PURPLE); particleEmitter_setAlpha(sp54, 0xFF); - func_802EFB98(sp54, &D_80394830); + particleEmitter_setScaleAndLifetimeRanges(sp54, &D_80394830); particleEmitter_setPosition(sp54, this->position); sp58[2] = randf() * 255.0f; particleEmitter_setRGB(sp54, sp58); diff --git a/src/lair/code_AD70.c b/src/lair/code_AD70.c index 36289cd6..7d801c5a 100644 --- a/src/lair/code_AD70.c +++ b/src/lair/code_AD70.c @@ -20,7 +20,7 @@ void func_80391B04(Actor *this); /* .data */ ActorInfo D_80394AB0 = { 0x1EF, 0x3BB, 0x54B, 0x1, NULL, func_80391B04, func_80326224, func_80325340, 0, 0, 0.0f, 0}; s32 D_80394AD4[3] = {0xBA, 0xBA, 0xBA}; -struct31s D_80394AE0 = { +ParticleScaleAndLifetimeRanges D_80394AE0 = { {0.1f, 0.2f}, {3.6f, 4.6f}, {1.0f, 1.0f}, @@ -28,7 +28,7 @@ struct31s D_80394AE0 = { 0.05f, 0.1f }; -struct31s D_80394B08 = { +ParticleScaleAndLifetimeRanges D_80394B08 = { {0.3f, 0.5f}, {0.0f, 0.0f}, {0.0f, 0.1f}, @@ -62,7 +62,7 @@ void func_80391160(f32 pos[3], u32 count) particleEmitter_setPosition(p, pos); particleEmitter_setParticleSpawnPositionRange(p, -55, -55, -55, 55, 55, 55); particleEmitter_setParticleVelocityRange(p, -70, -70, -70, 70, 70, 70); - func_802EFB98(p, &D_80394AE0); + particleEmitter_setScaleAndLifetimeRanges(p, &D_80394AE0); particleEmitter_emitN(p, count); } @@ -91,7 +91,7 @@ void func_8039137C(f32 pos[3], u32 count, enum asset_e sprite) func_802EFA18(p, 3); particleEmitter_setAngularVelocityRange(p, 0, 0, 600, 0, 0, 900); particleEmitter_setPositionVelocityAndAccelerationRanges(p, &D_80394B30); - func_802EFB98(p, &D_80394B08); + particleEmitter_setScaleAndLifetimeRanges(p, &D_80394B08); particleEmitter_setDrawMode(p, 2); particleEmitter_emitN(p, count); } From f1dea250de3766c705da7b67445a8329920473d7 Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Sat, 7 Sep 2024 21:51:24 +0200 Subject: [PATCH 5/7] documentations - spawnableActorList_add: decode flags - add some prototypes in functions.h - ActorMarker: docu unk8 (drawFunc) and unk14_20 (id) --- include/actor.h | 1 + include/functions.h | 4 + include/prop.h | 8 +- src/BGS/code_3030.c | 2 +- src/CCW/code_2B00.c | 2 +- src/CCW/code_5BF0.c | 16 +- src/CCW/code_76C0.c | 104 ++++++------- src/FP/ch/bearcub.c | 4 +- src/FP/ch/twinkly.c | 4 +- src/FP/ch/twinklymuncher.c | 10 +- src/FP/code_ABD0.c | 106 ++++++------- src/GV/code_3D90.c | 2 +- src/GV/code_43B0.c | 2 +- src/GV/code_7FF0.c | 84 +++++------ src/MMM/code_16B0.c | 6 +- src/MMM/code_2040.c | 59 ++++---- src/RBB/ch/bossboombox.c | 4 +- src/RBB/code_640.c | 106 ++++++------- src/RBB/code_9840.c | 2 +- src/SM/ch/vegetables.c | 2 +- src/SM/code_2990.c | 4 +- src/SM/code_3FC0.c | 2 +- src/SM/code_F0.c | 33 +++-- src/TTC/ch/clam.c | 2 +- src/TTC/ch/nipper.c | 6 +- src/TTC/code_26D0.c | 39 ++--- src/core2/ba/marker.c | 2 +- src/core2/ch/bigbutt.c | 8 +- src/core2/ch/clucker.c | 8 +- src/core2/ch/code_CFA60.c | 6 +- src/core2/ch/collectible.c | 4 +- src/core2/ch/crab.c | 16 +- src/core2/ch/gameSelect.c | 6 +- src/core2/ch/jinjo.c | 4 +- src/core2/ch/mole.c | 6 +- src/core2/ch/snowman.c | 4 +- src/core2/code_3EAD0.c | 2 +- src/core2/code_42CB0.c | 4 +- src/core2/code_4C020.c | 12 +- src/core2/code_509D0.c | 22 +-- src/core2/code_7060.c | 2 +- src/core2/code_7AF80.c | 2 +- src/core2/code_9E370.c | 22 +-- src/core2/code_A4D00.c | 2 +- src/core2/code_A5BC0.c | 14 +- src/core2/code_B3A80.c | 2 +- src/core2/code_B62B0.c | 8 +- src/core2/code_B9770.c | 12 +- src/core2/code_CC1E0.c | 2 +- src/core2/code_D6180.c | 8 +- src/core2/code_D6600.c | 4 +- src/core2/spawnqueue.c | 286 ++++++++++++++++++------------------ src/cutscenes/code_60F0.c | 157 ++++++++++---------- src/fight/chbossjinjo.c | 4 +- src/fight/chfinalboss.c | 22 +-- src/fight/chspellbarrier.c | 2 +- src/fight/chspellfireball.c | 16 +- src/fight/code_0.c | 31 ++-- src/lair/code_0.c | 142 +++++++++--------- src/lair/code_9C40.c | 8 +- src/lair/code_A170.c | 2 +- 61 files changed, 738 insertions(+), 728 deletions(-) diff --git a/include/actor.h b/include/actor.h index b805b435..0e5892bb 100644 --- a/include/actor.h +++ b/include/actor.h @@ -29,5 +29,6 @@ #define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000 #define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000 #define ACTOR_FLAG_UNKNOWN_26 (1 << 26) // 0x4000000 +#define ACTOR_FLAG_UNKNOWN_27 (1 << 27) // 0x4000000 #endif // ACTOR_H diff --git a/include/functions.h b/include/functions.h index 9ca143e0..983cf825 100644 --- a/include/functions.h +++ b/include/functions.h @@ -555,5 +555,9 @@ extern void subaddie_set_state_forward(Actor *, s32); extern BKModelBin *marker_loadModelBin(ActorMarker *this); extern Struct70s *func_8034C2C4(ActorMarker *marker, s32 arg1); extern void func_80326310(Actor *this); +extern ActorMarker *marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, int marker_id, int arg4); +extern s32 asset_getFlag(enum asset_e arg0); +extern void spawnableActorList_add(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2); +extern void spawnableActorList_addIfMapVisited(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2, enum map_e arg3); #endif diff --git a/include/prop.h b/include/prop.h index 2542bcc1..b6cee62b 100644 --- a/include/prop.h +++ b/include/prop.h @@ -75,13 +75,13 @@ typedef void (*ActorFreeFunc)(struct actor_s *); typedef struct actorMarker_s{ ActorProp* propPtr; struct cude_s* cubePtr; - MarkerDrawFunc unk8; + MarkerDrawFunc drawFunc; MarkerCollisionFunc unkC; //ow_func MarkerCollisionFunc unk10; u32 yaw:9; u32 unk14_22:1; u32 unk14_21:1; - u32 unk14_20:10; //contains jingo_id for chjinjo + u32 id:10; // marker_id u32 unk14_10:11; //used in ch/jiggy Struct6Cs *unk18; MarkerCollisionFunc unk1C; //die_func @@ -220,7 +220,7 @@ typedef struct actor_s{ f32 unkEC; //animCtrl??? f32 stored_animctrl_duration; //animCtrlDuration u32 unkF4_31:1; - u32 unkF4_30:1; + u32 unkF4_30:1; // has something to do with vertices u32 unkF4_29:1; u32 unkF4_28:1; //saved marker->propPtr->unk8_3 u32 unkF4_27:1; //saved marker->propPtr->unk8_2 @@ -265,7 +265,7 @@ typedef struct actor_s{ u32 unk138_22:1; u32 unk138_21:1; u32 unk138_20:1; - u32 unk138_19:10; //saved maker->unk14_20 + u32 unk138_19:10; //saved maker->id u32 unk138_9:1; u32 unk138_8:1; u32 unk138_7:4; diff --git a/src/BGS/code_3030.c b/src/BGS/code_3030.c index d5e81f23..9fb1de67 100644 --- a/src/BGS/code_3030.c +++ b/src/BGS/code_3030.c @@ -61,7 +61,7 @@ void func_803895D0(ActorMarker *marker, ActorMarker *other_marker){ } Actor *BGS_func_80389610(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { - func_8033A45C(4, marker->unk14_20 - 0x19A); + func_8033A45C(4, marker->id - 0x19A); return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/CCW/code_2B00.c b/src/CCW/code_2B00.c index 8cf3cf75..8221dc28 100644 --- a/src/CCW/code_2B00.c +++ b/src/CCW/code_2B00.c @@ -40,7 +40,7 @@ ActorInfo D_8038EE4C = { 0x12C, 0x168, 0x4F8, 0x5, D_8038ED20, func_80388FD4, fu /* .code */ s32 func_80388EF0(Actor *this){ - switch(this->marker->unk14_20){ + switch(this->marker->id){ case 0x133: //L80388F28 case 0x132: //L80388F28 return 0; diff --git a/src/CCW/code_5BF0.c b/src/CCW/code_5BF0.c index f68f0eb6..95c58509 100644 --- a/src/CCW/code_5BF0.c +++ b/src/CCW/code_5BF0.c @@ -45,22 +45,22 @@ void CCW_func_8038C16C(Actor *this, s32 next_state) { } if (next_state == 2) { - if (this->marker->unk14_20 == 0x1CA) { + if (this->marker->id == 0x1CA) { skeletalAnim_set(this->unk148, 0x22E, 0.2f, 3.53f); skeletalAnim_setCallback_1(this->unk148, 0.1f, func_8038C0E8, this->marker); } - if (this->marker->unk14_20 == 0x1C7) { + if (this->marker->id == 0x1C7) { skeletalAnim_set(this->unk148, 0x230, 0.2f, 4.0f); } - if (this->marker->unk14_20 == 0x1CB) { + if (this->marker->id == 0x1CB) { skeletalAnim_set(this->unk148, 0x1A2, 0.2f, 4.0f); skeletalAnim_setCallback_1(this->unk148, 0.3f, func_8038BFE0, this->marker); skeletalAnim_setCallback_1(this->unk148, 0.65f, func_8038C064, this->marker); } - if (this->marker->unk14_20 == 0x1C8) { + if (this->marker->id == 0x1C8) { skeletalAnim_set(this->unk148, 0x231, 0.2f, 4.0f); } - if ((this->marker->unk14_20 == 0x1C7) || (this->marker->unk14_20 == 0x1CB) || (this->marker->unk14_20 == 0x1C8)) { + if ((this->marker->id == 0x1C7) || (this->marker->id == 0x1CB) || (this->marker->id == 0x1C8)) { other = actorArray_findActorFromActorId(0x313); if (other != 0) { this->position[0] = other->position[0]; @@ -100,7 +100,7 @@ void func_8038C41C(Actor *this) { if (this->state == 0) { if( map_get() == MAP_60_CCW_AUTUMN_NABNUTS_HOUSE && !jiggyscore_isSpawned(JIGGY_4A_CCW_NABNUT) - && (this->marker->unk14_20 == 0x1C6 || this->marker->unk14_20 == 0x1CA) + && (this->marker->id == 0x1C6 || this->marker->id == 0x1CA) ){ CCW_func_8038C16C(this, 1); } else { @@ -108,11 +108,11 @@ void func_8038C41C(Actor *this) { } } - if ((this->marker->unk14_20 == 0x1CA) && (this->state != 1)) { + if ((this->marker->id == 0x1CA) && (this->state != 1)) { func_8028E668(this->position, 300.0f, -50.0f, 120.0f); } - if ((this->marker->unk14_20 == 0x1CB) && (this->state == 2)) { + if ((this->marker->id == 0x1CB) && (this->state == 2)) { player_getPosition(sp2C); if (!this->unk138_24 && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) { this->unk138_24 = TRUE; diff --git a/src/CCW/code_76C0.c b/src/CCW/code_76C0.c index 729340de..0196ba88 100644 --- a/src/CCW/code_76C0.c +++ b/src/CCW/code_76C0.c @@ -1,8 +1,8 @@ #include #include "functions.h" #include "variables.h" - #include "prop.h" +#include "actor.h" extern void func_802D3D54(Actor *); extern void func_802D3D74(Actor *); @@ -101,55 +101,55 @@ void CCW_func_8038DB0C(Actor *this){ void CCW_func_8038DB6C(void) { - spawnableActorList_add(&D_8038EB50, actor_new, 0X80); - spawnableActorList_add(&D_8038EB74, actor_new, 0X80); - spawnableActorList_add(&D_8038EBA0, actor_new, 0X180); - spawnableActorList_add(&D_8038EBD0, actor_new, 0X200080C); - spawnableActorList_add(&D_8038EC14, actor_new, 0X888); - spawnableActorList_add(&D_8038EC70, actor_new, 0X94C88); - spawnableActorList_add(&D_8038ECA0, actor_new, 0X84C88); - spawnableActorList_add(&D_8038ECE8, actor_new, 0X809A8); - spawnableActorList_add(&D_8038EE70, actor_new, 0XC80); - spawnableActorList_add(&D_8038F130, actor_new, 0X84C2A); - spawnableActorList_add(&chCaterpillar, actor_new, 0X881); - spawnableActorList_add(&D_8038F190, actor_new, 0X80D80); - spawnableActorList_add(&D_8038F230, actor_new, 0XD80); - spawnableActorList_add(&D_8038F6F0, actor_new, 0X804); - spawnableActorList_add(&D_8038ED50, actor_new, 0X400); - spawnableActorList_add(&D_8038ED98, actor_new, 0X400); - spawnableActorList_add(&D_8038EDE0, actor_new, 0X400); - spawnableActorList_add(&D_8038EE28, actor_new, 0X400); - spawnableActorList_add(&D_8038ED74, actor_new, 0); - spawnableActorList_add(&D_8038EDBC, actor_new, 0); - spawnableActorList_add(&D_8038EE04, actor_new, 0); - spawnableActorList_add(&D_8038EE4C, actor_new, 0); - spawnableActorList_add(&D_8038F270, actor_new, 0X989); - spawnableActorList_add(&D_8038F300, actor_new, 0X989); - spawnableActorList_add(&D_8038F35C, actor_new, 0X909); - spawnableActorList_add(&D_8038F380, actor_new, 0X80); - spawnableActorList_add(&D_8038F3A4, actor_new, 0X888); - spawnableActorList_add(&D_8038F3C8, actor_new, 0X888); - spawnableActorList_add(&D_8038F3EC, actor_new, 0X80); - spawnableActorList_add(&D_8038F410, actor_new, 0X988); - spawnableActorList_add(&D_8038F434, actor_new, 0X888); - spawnableActorList_add(&D_8038F460, actor_new, 0X880); - spawnableActorList_add(&D_8038F4A8, actor_new, 0X98A); - spawnableActorList_add(&D_8038F4D0, actor_new, 0X988); - spawnableActorList_add(&D_8038F614, actor_new, 0X988); - spawnableActorList_add(&D_8038F640, actor_new, 0X80); - spawnableActorList_add(&D_8038F908, actor_new, 8); - spawnableActorList_add(&D_8038F8C0, actor_new, 8); - spawnableActorList_add(&D_8038F720, actor_new, 0); - spawnableActorList_add(&D_8038F744, actor_new, 0); - spawnableActorList_add(&D_8038F768, actor_new, 0); - spawnableActorList_add(&D_8038F78C, actor_new, 0); - spawnableActorList_add(&chGrublinHood, actor_new, 0X2010121); - spawnableActorList_add(&gChVacationTextTrigger, actor_new, 0); - spawnableActorList_add(&D_8038F7D4, actor_new, 0X400); - spawnableActorList_add(&D_8038F7B0, actor_new, 0X400); - spawnableActorList_add(&D_8038F888, actor_new, 0X80); - spawnableActorList_add(&D_8038F7F8, actor_new, 0X400); - spawnableActorList_add(&D_8038F81C, actor_new, 0X400); - spawnableActorList_add(&D_8038F840, actor_new, 0X400); - spawnableActorList_add(&D_8038F864, actor_new, 0X400); + spawnableActorList_add(&D_8038EB50, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038EB74, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038EBA0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038EBD0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038EC14, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038EC70, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_14 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_8038ECA0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_14 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_8038ECE8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_8038EE70, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F130, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_14 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&chCaterpillar, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F190, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_8038F230, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F6F0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038ED50, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038ED98, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038EDE0, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038EE28, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038ED74, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038EDBC, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038EE04, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038EE4C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038F270, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F300, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F35C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F380, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038F3A4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F3C8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F3EC, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038F410, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F434, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F460, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F4A8, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F4D0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F614, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_8038F640, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038F908, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038F8C0, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038F720, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038F744, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038F768, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038F78C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&chGrublinHood, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&gChVacationTextTrigger, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038F7D4, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038F7B0, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038F888, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038F7F8, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038F81C, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038F840, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038F864, actor_new, ACTOR_FLAG_UNKNOWN_10); } diff --git a/src/FP/ch/bearcub.c b/src/FP/ch/bearcub.c index 2ced0299..3df5de82 100644 --- a/src/FP/ch/bearcub.c +++ b/src/FP/ch/bearcub.c @@ -88,7 +88,7 @@ void func_8038A384(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = FALSE; - switch(this->marker->unk14_20){ + switch(this->marker->id){ case MARKER_1FA_POLAR_BEAR_CUB_BLUE://L8038A404 this->unk1C[0] = 1.0f; this->unk1C[1] = 1.2f; @@ -139,7 +139,7 @@ void func_8038A384(Actor *this){ }//L8038A648 - switch(this->marker->unk14_20){ + switch(this->marker->id){ case MARKER_1FA_POLAR_BEAR_CUB_BLUE: sp3C = 0; break; diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index b9d7f9ba..c55022ba 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -252,7 +252,7 @@ void func_8038C9A0(Actor *this){ Actor *other; //sp34 void * sp30; - if(this->marker->unk14_20 == 0x200){ + if(this->marker->id == 0x200){ sp30 = func_8034C2C4(this->marker, 0x190); } other = marker_getActor(this->unk100); @@ -278,7 +278,7 @@ void func_8038C9A0(Actor *this){ }//L8038CA9C if(1.0f == other->unk1C[1]){ - func_8038C398(this->position, this->marker->unk14_20); + func_8038C398(this->position, this->marker->id); FUNC_8030E8B4(SFX_7B_ICE_BREAKING_1, 1.0f, 32000, this->position, 0x6d6, 0xdac);\ marker_despawn(this->marker); return; diff --git a/src/FP/ch/twinklymuncher.c b/src/FP/ch/twinklymuncher.c index a65bef17..40acd2c6 100644 --- a/src/FP/ch/twinklymuncher.c +++ b/src/FP/ch/twinklymuncher.c @@ -78,7 +78,7 @@ Actor *func_8038DF34(Actor *this){ if(prop && prop->unk8_0){ other = marker_getActor(prop->marker); - marker_id = other->marker->unk14_20; + marker_id = other->marker->id; if( marker_id == MARKER_200_TWINKLY_BLUE || marker_id == MARKER_201_TWINKLY_GREEN || marker_id == MARKER_202_TWINKLY_ORANGE @@ -168,7 +168,7 @@ void func_8038E094(Actor *this){ sp38 = func_8038DF34(this); if(sp38){ func_8038DE40(this); - this->unk38_31 = sp38->marker->unk14_20; + this->unk38_31 = sp38->marker->id; break; } @@ -187,16 +187,16 @@ void func_8038E094(Actor *this){ sp38 = func_8038DF34(this); if(sp38){ func_8038DE40(this); - this->unk38_31 = sp38->marker->unk14_20; + this->unk38_31 = sp38->marker->id; } break; case 4: //L8038E4F0 this->marker->propPtr->unk8_3 = TRUE; sp38 = func_8038DF34(this); - if(sp38 && sp38->marker->unk14_20 == this->unk38_31){ + if(sp38 && sp38->marker->id == this->unk38_31){ if(actor_animationIsAt(this, 0.23)){ - func_8038C398(sp38->position, sp38->marker->unk14_20); + func_8038C398(sp38->position, sp38->marker->id); FUNC_8030E8B4(SFX_110_TWINKLY_DEATH, 1.0f, 32000, this->position, 1250, 2500); FUNC_8030E8B4(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); diff --git a/src/FP/code_ABD0.c b/src/FP/code_ABD0.c index fd5c16ef..1892bd39 100644 --- a/src/FP/code_ABD0.c +++ b/src/FP/code_ABD0.c @@ -1,9 +1,9 @@ #include #include "functions.h" #include "variables.h" - #include "prop.h" #include "SnS.h" +#include "actor.h" extern ActorInfo D_80367FE0; @@ -91,7 +91,7 @@ void func_80391040(Actor *this){ if(randf() < 0.5){ a1 = 8; - switch(this->marker->unk14_20){ + switch(this->marker->id){ case 0x247://L80391128 sp2C = 0x710; break; @@ -126,7 +126,7 @@ void func_80391180(Actor *this){ } this->unk58_0 = func_8038DD14() ? 0 : 1; - if(this->marker->unk14_20 == 0x21F){ + if(this->marker->id == 0x21F){ this->marker->unk40_22 = subaddie_playerIsWithinSphere(this, 2000) ? 1 : 0; } } @@ -135,10 +135,10 @@ void FP_func_80391254(Actor *this){ func_802D3D74(this); if(!this->unk16C_4){ this->unk16C_4 = TRUE; - if(this->marker->unk14_20 == 0x221 || this->marker->unk14_20 == 0x223){ + if(this->marker->id == 0x221 || this->marker->id == 0x223){ this->pitch = 3.0f; } - if(this->marker->unk14_20 == 0x222){ + if(this->marker->id == 0x222){ this->pitch = 2.0f; } } @@ -154,54 +154,54 @@ void func_803912EC(Actor *this){ void FP_func_80391324(void) { - spawnableActorList_add(&FP_D_80391AB0, actor_new, 0X600); - spawnableActorList_add(&D_80391BB0, actor_new, 0X2A); - spawnableActorList_add(&D_80391C18, actor_new, 0X180084); - spawnableActorList_add(&D_80391C58, actor_new, 0X180084); - spawnableActorList_add(&D_80391CE8, actor_new, 0X2002E); - spawnableActorList_add(&D_80391E08, actor_new, 0X100); - spawnableActorList_add(&FP_D_80391E2C, actor_new, 0X100); - spawnableActorList_add(&D_80391E50, actor_new, 0X100); - spawnableActorList_add(&D_80391F88, actor_new, 0X2100C); - spawnableActorList_add(&D_80391FAC, actor_new, 0X2100C); - spawnableActorList_add(&D_80391FD0, actor_new, 0X2100C); - spawnableActorList_add(&D_80391FF4, actor_new, 0X2100C); - spawnableActorList_add(&D_803920E8, actor_new, 0X408); - spawnableActorList_add(&D_803923D0, actor_new, 0X100006C); - spawnableActorList_add(&chXmasTree, actor_new, 0X20400); - spawnableActorList_add(&D_80392420, actor_new, 4); - spawnableActorList_add(&D_80392470, actor_new, 0X444); - spawnableActorList_add(&D_803924B0, actor_new, 8); - spawnableActorList_add(&D_803924D4, actor_new, 8); - spawnableActorList_add(&D_803924F8, actor_new, 8); - spawnableActorList_add(&chScarfSled, actor_new, 0); - spawnableActorList_add(&chRaceSled, actor_new, 0X20); - spawnableActorList_add(&D_80392588, actor_new, 0X80108); - spawnableActorList_add(&D_80392628, actor_new, 0X44); - spawnableActorList_add(&D_80392690, actor_new, 0XA8); - spawnableActorList_add(&D_803926C0, actor_new, 0X8000400); - spawnableActorList_add(&D_80392700, actor_new, 0X108); - spawnableActorList_add(&FP_D_80392840, actor_new, 0); - spawnableActorList_add(&D_80392730, actor_new, 0X20000); - spawnableActorList_add(&D_80367FE0, actor_new, 0); - spawnableActorList_add(&FP_D_803928E0, actor_new, 0X40); - spawnableActorList_add(&D_80392904, actor_new, 0X40); - spawnableActorList_add(&D_80392928, actor_new, 0X40); - spawnableActorList_add(&D_8039294C, actor_new, 0X40); - spawnableActorList_add(&D_80392B20, actor_new, 0X400); - spawnableActorList_add(&D_80392B44, actor_new, 0X400); - spawnableActorList_add(&D_80392970, actor_new, 0X400); - spawnableActorList_add(&D_80392994, actor_new, 0X400); - spawnableActorList_add(&D_803929B8, actor_new, 0X404); - spawnableActorList_add(&D_803929DC, actor_new, 0X404); - spawnableActorList_add(&D_80392A00, actor_new, 0X404); - spawnableActorList_add(&D_80392A24, actor_new, 0X20004); - spawnableActorList_add(&D_80392A48, actor_new, 4); - spawnableActorList_add(&D_80392A6C, actor_new, 0X20004); - spawnableActorList_add(&D_80392A90, actor_new, 0X20004); - spawnableActorList_add(&D_80392AB4, actor_new, 0X400); - spawnableActorList_add(&D_80392AD8, actor_new, 0X400); - spawnableActorList_add(&D_80392AFC, actor_new, 0X400); + spawnableActorList_add(&FP_D_80391AB0, 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(&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(&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(&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(&FP_D_80392840, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80392730, 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); + spawnableActorList_add(&D_80392928, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8039294C, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_80392B20, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392B44, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392970, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392994, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803929B8, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803929DC, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392A00, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392A24, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80392A48, actor_new, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80392A6C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80392A90, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80392AB4, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392AD8, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80392AFC, actor_new, ACTOR_FLAG_UNKNOWN_10); } diff --git a/src/GV/code_3D90.c b/src/GV/code_3D90.c index a77a2e4b..8028262d 100644 --- a/src/GV/code_3D90.c +++ b/src/GV/code_3D90.c @@ -141,7 +141,7 @@ void func_8038A31C(Actor *this){ }//L8038A6A4 this->unk124_11 = 0x3; this->pitch = 0.0f; - if(this->unk100 && sp24 && this->unk100->unk14_20 == MARKER_AF_MAGIC_CARPET_SHADOW){ + if(this->unk100 && sp24 && this->unk100->id == MARKER_AF_MAGIC_CARPET_SHADOW){ sp24->position_x = this->position_x; sp24->position_y = func_80309724(this->position) + 60.0f; sp24->position_z = this->position_z; diff --git a/src/GV/code_43B0.c b/src/GV/code_43B0.c index 41b810ef..efcaa2bc 100644 --- a/src/GV/code_43B0.c +++ b/src/GV/code_43B0.c @@ -101,7 +101,7 @@ void GV_func_8038A9C0(Actor *this){ } this->unk1C[2] = this->unk1C[1]; this->unk1C[1] = this->unk48; - if(this->unk100 != NULL && sp24 != NULL && this->unk100->unk14_20 == MARKER_AF_MAGIC_CARPET_SHADOW){ + if(this->unk100 != NULL && sp24 != NULL && this->unk100->id == MARKER_AF_MAGIC_CARPET_SHADOW){ sp24->unk1C[0] = func_8038A860(sp24, this); } } diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index 66ff3221..b16b8311 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -1,8 +1,8 @@ #include #include "functions.h" #include "variables.h" - #include "SnS.h" +#include "actor.h" extern void func_80244BB0(s32, s32, s32, f32); extern void func_802D3D54(Actor *this); @@ -467,47 +467,47 @@ void func_8038F130(UNK_TYPE(s32) arg0, ActorMarker *arg1){ void GV_func_8038F154(void) { - spawnableActorList_add(&chToots, actor_new, 0X180); - spawnableActorList_add(&chAncientOne, actor_new, 0X58A); - spawnableActorList_add(&Gobi1, actor_new, 0X9A8); - spawnableActorList_add(&chGobiRope, actor_new, 0X880); - spawnableActorList_add(&chGobiRock, actor_new, 0X80); - spawnableActorList_add(&chGobi2, actor_new, 0XDA8); - spawnableActorList_add(&chGobi3, actor_new, 0X9A8); - spawnableActorList_add(&chTrunker, actor_new, 0XD80); - spawnableActorList_add(&GV_D_80390DD0, actor_new, 0X4004); - spawnableActorList_add(&chSarcophagus, actor_new, 0X448); - spawnableActorList_add(&chSNSSarcophagus, actor_new, 0X48); - spawnableActorList_add(&D_80390ED0, actor_new, 0X180); - spawnableActorList_add(&D_80390F00, actor_new, 0X80); - spawnableActorList_add(&D_80390FD0, actor_new, 0X4048); - spawnableActorList_add(&D_80391010, actor_new, 0X4048); - spawnableActorList_add(&D_80391098, actor_new, 0X10069); - spawnableActorList_add(&D_80391158, actor_new, 0X48); - spawnableActorList_add(&D_803911C0, actor_new, 8); - spawnableActorList_add(&D_803911F4, actor_new, 0X80988); - spawnableActorList_add(&D_80391218, actor_new, 0X80988); - spawnableActorList_add(&D_8039123C, actor_new, 0X80988); - spawnableActorList_add(&D_80391260, actor_new, 0X80); - spawnableActorList_add(&D_80391318, actor_new, 0X78A); - spawnableActorList_add(&D_80391358, actor_new, 0X518); - spawnableActorList_add(&D_803912B8, actor_new, 0X500); - spawnableActorList_add(&GV_D_80391390, actor_new, 0X500); - spawnableActorList_add(&D_803913B4, actor_new, 0X500); - spawnableActorList_add(&D_80390F40, actor_new, 0); - spawnableActorList_add(&D_80391494, actor_new, 0X408); - spawnableActorList_add(&chMazeCtrl, actor_new, 0); - spawnableActorList_add(&chBuriedPyramid, actor_new, 0X400); - spawnableActorList_add(&D_803914B8, actor_new, 0X400); - spawnableActorList_add(&D_803914DC, actor_new, 0X400); - spawnableActorList_add(&GV_D_80391500, actor_new, 0X400); - spawnableActorList_add(&GV_D_80391524, actor_new, 0X400); - spawnableActorList_add(&D_8039156C, actor_new, 0X400); - spawnableActorList_add(&D_80391428, actor_new, 8); - spawnableActorList_add(&D_8039144C, actor_new, 8); - spawnableActorList_add(&D_80391470, actor_new, 8); - spawnableActorList_add(&D_80391548, actor_new, 0X400); - spawnableActorList_add(&D_80391590, actor_new, 0X400); + spawnableActorList_add(&chToots, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chAncientOne, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&Gobi1, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&chGobiRope, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&chGobiRock, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&chGobi2, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&chGobi3, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&chTrunker, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&GV_D_80390DD0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&chSarcophagus, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&chSNSSarcophagus, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_80390ED0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_80390F00, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390FD0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80391010, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80391098, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_16); + spawnableActorList_add(&D_80391158, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_803911C0, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_803911F4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_80391218, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_8039123C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_80391260, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80391318, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80391358, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_4 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803912B8, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&GV_D_80391390, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803913B4, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80390F40, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80391494, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&chMazeCtrl, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&chBuriedPyramid, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803914B8, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803914DC, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&GV_D_80391500, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&GV_D_80391524, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8039156C, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80391428, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8039144C, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_80391470, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_80391548, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80391590, actor_new, ACTOR_FLAG_UNKNOWN_10); } s32 func_8038F4C0(Actor *arg0, s32 arg1){ diff --git a/src/MMM/code_16B0.c b/src/MMM/code_16B0.c index f30523e1..a84f0467 100644 --- a/src/MMM/code_16B0.c +++ b/src/MMM/code_16B0.c @@ -31,7 +31,7 @@ Actor *func_80387AA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { void func_80387B14(Actor *this, s32 next_state){ ActorLocal_PortraitChompa *local = (ActorLocal_PortraitChompa *) &this->local; f32 tmp = 2.5f; - this->marker->unk14_20 = 0x1d1; + this->marker->id = 0x1d1; if(next_state == 1 || next_state == 2){ skeletalAnim_set(this->unk148, 0x23e, 0.0f, 2.5f); @@ -54,7 +54,7 @@ void func_80387B14(Actor *this, s32 next_state){ } if(next_state == 4){ - this->marker->unk14_20 = MARKER_254_PORTRAIT_CHOMPA_A; + this->marker->id = MARKER_254_PORTRAIT_CHOMPA_A; skeletalAnim_set(this->unk148, 0x23e, 0.0f, 2.5f); skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); if(this->unk100){ @@ -222,7 +222,7 @@ void func_80388028(Actor *this){ if(this->state == 4){ skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if(sp44 < 0.56 && 0.56 <= sp40){ - this->marker->unk14_20 = 0x1d1; + this->marker->id = 0x1d1; } if(sp44 < 0.5 && 0.5 <= sp40){ diff --git a/src/MMM/code_2040.c b/src/MMM/code_2040.c index 6592f514..9059a6f8 100644 --- a/src/MMM/code_2040.c +++ b/src/MMM/code_2040.c @@ -2,6 +2,7 @@ #include "functions.h" #include "variables.h" #include "SnS.h" +#include "actor.h" extern ActorInfo D_8038BC28; extern ActorInfo D_8038BCDC; @@ -207,7 +208,7 @@ bool func_80388670(ActorMarker * this_marker, ActorMarker * other_marker){ f32 sp20[3]; player_getPosition(sp20); - switch(this->marker->unk14_20){ + switch(this->marker->id){ case 0x9f: //L803886D0 return (-335.0f < sp20[0] && sp20[0] < -200.0f) && (-2730.0f < sp20[2] && sp20[2] < -2400.0f); @@ -228,7 +229,7 @@ void func_803888B8(Actor *this){ this->unk60 = 0.0f; switch(this->state){ case 4: - switch(this->marker->unk14_20){ + switch(this->marker->id){ case 0x9F: this->roll = MMM_func_80388430(this, 0, -1, this->roll); break; @@ -391,31 +392,31 @@ void func_803890B8(Actor *this) { } void MMM_func_803890E0(void){ - spawnableActorList_add(&D_8038BC28, actor_new, 0); - spawnableActorList_add(&D_8038BCDC, actor_new, 0); - spawnableActorList_add(&D_8038BC4C, actor_new, 0); - spawnableActorList_add(&D_8038BDB4, actor_new, 0x40); - spawnableActorList_add(&D_8038BDD8, actor_new, 0x40); - spawnableActorList_add(&D_8038BDFC, actor_new, 0x440); - spawnableActorList_add(&D_8038BC94, actor_new, 0); - spawnableActorList_add(&D_8038BC70, actor_new, 0); - spawnableActorList_add(&D_8038BD00, actor_new, 0); - spawnableActorList_add(&D_8038BD24, actor_new, 0x8600); - spawnableActorList_add(&D_8038BD48, actor_new, 0x8600); - spawnableActorList_add(&D_8038BD6C, actor_new, 0x8600); - spawnableActorList_add(&D_8038BCB8, actor_new, 0x8600); - spawnableActorList_add(&D_8038BD90, actor_new, 8); - spawnableActorList_add(&chNapper, actor_new, 0x18A0); - spawnableActorList_add(&D_8038BA68, actor_new, 0x100); - spawnableActorList_add(&chMotzhand, actor_new, 0x20880); - spawnableActorList_add(&D_80367E70, actor_new, 0); - spawnableActorList_add(&chLoggo, actor_new, 0x108); - spawnableActorList_add(&D_8038BAD0, actor_new, 0x2800960); - spawnableActorList_add(&D_8038BE48, actor_new, 0x800040); - spawnableActorList_add(&D_8038BE6C, actor_new, 0x800040); - spawnableActorList_add(&D_8038BE90, actor_new, 0x800040); - spawnableActorList_add(&D_8038BEB4, actor_new, 0x800040); - spawnableActorList_add(&D_8038BED8, actor_new, 0x800040); - spawnableActorList_add(&D_8038BEFC, actor_new, 0x800040); - spawnableActorList_add(&D_80372C3C, actor_new, 0xA11A9); + spawnableActorList_add(&D_8038BC28, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BCDC, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BC4C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BDB4, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038BDD8, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038BDFC, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038BC94, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BC70, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BD00, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038BD24, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038BD48, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038BD6C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038BCB8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038BD90, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&chNapper, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_8038BA68, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chMotzhand, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80367E70, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&chLoggo, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038BAD0, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_23 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038BE48, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_8038BE6C, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_8038BE90, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_8038BEB4, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_8038BED8, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_8038BEFC, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_80372C3C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19); } diff --git a/src/RBB/ch/bossboombox.c b/src/RBB/ch/bossboombox.c index e9de3192..2b8ce103 100644 --- a/src/RBB/ch/bossboombox.c +++ b/src/RBB/ch/bossboombox.c @@ -445,7 +445,7 @@ void func_8038D5BC(ActorMarker *marker, s32 arg1){ } void func_8038D608(ActorMarker *marker, ActorMarker *other){ - func_8038D7E8(marker, other->unk14_20 == 1); + func_8038D7E8(marker, other->id == 1); } Actor *func_8038D638(ActorMarker *marker, Gfx **gdl, Mtx ** mptr, s32 arg3){ @@ -504,7 +504,7 @@ void func_8038D8BC(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; - local->unk0 = &D_80390B70[this->marker->unk14_20 - 0x1A1]; + local->unk0 = &D_80390B70[this->marker->id - 0x1A1]; local->unk4 = 0; local->unk20 = 0; diff --git a/src/RBB/code_640.c b/src/RBB/code_640.c index 34ad2721..55c85fab 100644 --- a/src/RBB/code_640.c +++ b/src/RBB/code_640.c @@ -1,8 +1,8 @@ #include #include "functions.h" #include "variables.h" - #include "prop.h" +#include "actor.h" extern ActorInfo D_80390D20; extern ActorInfo D_80390050; @@ -169,56 +169,56 @@ void func_80386BF8(Actor *arg0){ } void RBB_func_80386C48(void){ - spawnableActorList_add(&D_80390D20, actor_new, 0x4880); - spawnableActorList_add(&D_80390050, actor_new, 0); - spawnableActorList_add(&D_80390200, actor_new, 0x80); - spawnableActorList_add(&D_80390270, actor_new, 0x80); - spawnableActorList_add(&D_80390D50, actor_new, 0x8004480); - spawnableActorList_add(&D_803906E0, actor_new, 0x80); - spawnableActorList_add(&D_80390738, actor_new, 0x80); - spawnableActorList_add(&D_803907D0, actor_new, 0x6488); - spawnableActorList_add(&D_803907F4, actor_new, 0x6488); - spawnableActorList_add(&D_80390818, actor_new, 0x6488); - spawnableActorList_add(&D_8039083C, actor_new, 0x6488); - spawnableActorList_add(&D_803904C0, actor_new, 0x6408); - spawnableActorList_add(&D_803904E4, actor_new, 0x6408); - spawnableActorList_add(&D_80390508, actor_new, 0x6408); - spawnableActorList_add(&D_803903B0, actor_new, 0x6408); - spawnableActorList_add(&D_803903D4, actor_new, 0x6408); - spawnableActorList_add(&D_803903F8, actor_new, 0x6408); - spawnableActorList_add(&D_80390640, actor_new, 0x400); - spawnableActorList_add(&D_80390664, actor_new, 0x400); - spawnableActorList_add(&D_80390688, actor_new, 0x400); - spawnableActorList_add(&D_803906B0, actor_new, 0); - spawnableActorList_add(&D_803908C0, actor_new, 0x80); - spawnableActorList_add(&D_803908E4, actor_new, 0x80); - spawnableActorList_add(&D_80390908, actor_new, 0x80); - spawnableActorList_add(&D_803909B0, actor_new, 0x880); - spawnableActorList_add(&D_803909D4, actor_new, 0x880); - spawnableActorList_add(&RBB_D_803909F8, actor_new, 0x880); - spawnableActorList_add(&D_80390A50, actor_new, 0x80); - spawnableActorList_add(&D_80390380, actor_new, 0x9aa); - spawnableActorList_add(&D_80390A80, actor_new, 0x80); //anchorswitch - spawnableActorList_add(&RBB_D_80390AB0, actor_new, 0x8C8); //dolphin - spawnableActorList_add(&RBB_D_80390AE0, actor_new, 0xC80); //anchor - spawnableActorList_add(&RBB_D_80390B10, actor_new, 0x80); - spawnableActorList_add(&D_80390B40, actor_new, 0x880); //rarewareflag - spawnableActorList_add(&RBB_D_80390BD0, actor_new, 0xc2c); - spawnableActorList_add(&D_80390BF4, actor_new, 0xc2c); - spawnableActorList_add(&D_80390C18, actor_new, 0xc2c); - spawnableActorList_add(&RBB_D_80390C3C, actor_new, 0xc2c); - spawnableActorList_add(&RBB_D_80390CF0, actor_new, 0x80); - spawnableActorList_add(&D_80390D88, actor_new, 0x2000889); - spawnableActorList_add(&D_80390DAC, actor_new, 0x2000889); - spawnableActorList_add(&RBB_D_80390E00, actor_new, 0x80); - spawnableActorList_add(&D_80390E34, actor_new, 0x80); - spawnableActorList_add(&D_80390E58, actor_new, 0x80); - spawnableActorList_add(&D_803900E0, actor_new, 0); - spawnableActorList_add(&D_80390104, actor_new, 0x8600); //captcabinwooddoor - spawnableActorList_add(&D_80390128, actor_new, 0); - spawnableActorList_add(&D_8039014C, actor_new, 0); - spawnableActorList_add(&D_803901B8, actor_new, 0x8600); - spawnableActorList_add(&D_803901DC, actor_new, 0x8600); - spawnableActorList_add(&D_80390170, actor_new, 0x8600); //skylight - spawnableActorList_add(&D_80390194, actor_new, 0x8); //honeycombswitch + spawnableActorList_add(&D_80390D20, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80390050, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80390200, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390270, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390D50, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_14 | ACTOR_FLAG_UNKNOWN_27); + spawnableActorList_add(&D_803906E0, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390738, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_803907D0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803907F4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80390818, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_8039083C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803904C0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803904E4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80390508, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803903B0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803903D4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_803903F8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_13 | ACTOR_FLAG_UNKNOWN_14); + spawnableActorList_add(&D_80390640, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80390664, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80390688, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_803906B0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_803908C0, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_803908E4, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390908, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_803909B0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_803909D4, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&RBB_D_803909F8, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80390A50, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390380, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80390A80, actor_new, ACTOR_FLAG_UNKNOWN_7); //anchorswitch + spawnableActorList_add(&RBB_D_80390AB0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); //dolphin + spawnableActorList_add(&RBB_D_80390AE0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); //anchor + spawnableActorList_add(&RBB_D_80390B10, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390B40, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); //rarewareflag + spawnableActorList_add(&RBB_D_80390BD0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80390BF4, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80390C18, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&RBB_D_80390C3C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&RBB_D_80390CF0, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390D88, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80390DAC, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&RBB_D_80390E00, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390E34, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80390E58, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_803900E0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80390104, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); //captcabinwooddoor + spawnableActorList_add(&D_80390128, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8039014C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_803901B8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803901DC, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80390170, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); //skylight + spawnableActorList_add(&D_80390194, actor_new, ACTOR_FLAG_UNKNOWN_3); //honeycombswitch } diff --git a/src/RBB/code_9840.c b/src/RBB/code_9840.c index e1cdbeee..c1950d0d 100644 --- a/src/RBB/code_9840.c +++ b/src/RBB/code_9840.c @@ -38,7 +38,7 @@ void func_8038FC48(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; actor_collisionOff(this); - local->unk4 = RBB_D_80390E30 + (this->marker->unk14_20 - 0x1d2); + local->unk4 = RBB_D_80390E30 + (this->marker->id - 0x1d2); local->unk8 = NULL; local->unk0 = func_802F9AA8(0x400); diff --git a/src/SM/ch/vegetables.c b/src/SM/ch/vegetables.c index 0e58d6c6..538949e3 100644 --- a/src/SM/ch/vegetables.c +++ b/src/SM/ch/vegetables.c @@ -287,7 +287,7 @@ void func_80388080(Actor *this){ if(!this->initialized){ - switch(this->marker->unk14_20){ + switch(this->marker->id){ default: local->unkC = 3; //cauliflower break; diff --git a/src/SM/code_2990.c b/src/SM/code_2990.c index 3187a64d..ec1642ee 100644 --- a/src/SM/code_2990.c +++ b/src/SM/code_2990.c @@ -142,7 +142,7 @@ void func_80388FA0(Actor *this, s32 arg1){ case 4: other = subaddie_getLinkedActor(this); myOther = this->unk100; - if(myOther && other && myOther->unk14_20 == 0xB8) + if(myOther && other && myOther->id == 0xB8) subaddie_set_state_with_direction(other, 3, 0.0001f, 1); actor_playAnimationOnce(this); this->unk44_31 = func_8030D90C(); @@ -166,7 +166,7 @@ void func_80388FA0(Actor *this, s32 arg1){ case 2: other = subaddie_getLinkedActor(this); myOther = this->unk100; - if(myOther && other && myOther->unk14_20 == 0xB8) + if(myOther && other && myOther->id == 0xB8) subaddie_set_state_with_direction(other, 2, 0.0001f, 1); animctrl_setSmoothTransition(this->animctrl, 1); actor_playAnimationOnce(this); diff --git a/src/SM/code_3FC0.c b/src/SM/code_3FC0.c index ac0a0659..92dbfbfe 100644 --- a/src/SM/code_3FC0.c +++ b/src/SM/code_3FC0.c @@ -50,7 +50,7 @@ ActorInfo D_8038B080 ={ /* .code */ void func_8038A3B0(Actor *this){ - s32 sp24 = this->marker->unk14_20 - 0xe1; + s32 sp24 = this->marker->id - 0xe1; if(this->marker->unk14_21) func_8034A174(this->marker->unk44, 0x1f, D_80365E04[sp24]); diff --git a/src/SM/code_F0.c b/src/SM/code_F0.c index 10be99bb..5d918fbb 100644 --- a/src/SM/code_F0.c +++ b/src/SM/code_F0.c @@ -2,6 +2,7 @@ #include "functions.h" #include "variables.h" #include "prop.h" +#include "actor.h" int ability_hasLearned(s32); @@ -139,20 +140,20 @@ bool SM_CRCs_are_valid(void){ void SM_func_80386810(void) { - spawnableActorList_add(&D_8038AB00, actor_new, 0X2000180); - spawnableActorList_add(&D_8038ABF0, actor_new, 0X80); - spawnableActorList_add(&D_8038AC20, actor_new, 0); - spawnableActorList_add(&D_8038AC78, actor_new, 0X2000121); - spawnableActorList_add(&D_8038ACE8, actor_new, 0X2000121); - spawnableActorList_add(&D_8038AD58, actor_new, 0X2200121); - spawnableActorList_add(&D_8038AC9C, actor_new, 0X2000121); - spawnableActorList_add(&D_8038AD0C, actor_new, 0X2000121); - spawnableActorList_add(&D_8038AD7C, actor_new, 0X2200121); - spawnableActorList_add(&chSmMole, actor_new, 0X100); - spawnableActorList_add(&D_8038B0B0, actor_new, 0); - spawnableActorList_add(&D_8038B0E0, actor_new, 0); - spawnableActorList_add(&D_8038B008, actor_new, 0X6C8); - spawnableActorList_add(&D_8038B044, actor_new, 0X6C8); - spawnableActorList_add(&D_8038B080, actor_new, 0X6C8); - spawnableActorList_add(&D_8038AB24, actor_new, 0X400); + spawnableActorList_add(&D_8038AB00, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038ABF0, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_8038AC20, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038AC78, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038ACE8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038AD58, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038AC9C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038AD0C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038AD7C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_21 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&chSmMole, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038B0B0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038B0E0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038B008, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038B044, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038B080, 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_8038AB24, actor_new, ACTOR_FLAG_UNKNOWN_10); } diff --git a/src/TTC/ch/clam.c b/src/TTC/ch/clam.c index cf094b94..db1b4d0c 100644 --- a/src/TTC/ch/clam.c +++ b/src/TTC/ch/clam.c @@ -279,7 +279,7 @@ void chClam_update(Actor *this){ if(this->state != 3){ sp48 = func_80309724(this->position); if(sp4C != NULL){ - sp44 = sp4C->marker->unk14_20; + sp44 = sp4C->marker->id; } if(sp44 == MARKER_60_BLUE_EGG_COLLECTIBLE || sp44 == MARKER_B5_RED_FEATHER_COLLECTIBLE){ diff --git a/src/TTC/ch/nipper.c b/src/TTC/ch/nipper.c index c6247272..bdb6e020 100644 --- a/src/TTC/ch/nipper.c +++ b/src/TTC/ch/nipper.c @@ -153,10 +153,10 @@ void func_80388178(ActorMarker *this_marker, ActorMarker *other_marker) { bool func_803882E4(ActorMarker * this_marker, ActorMarker * other_marker){ if(this_marker->unk40_31 == 1){ - this_marker->unk14_20 = 0x16C; + this_marker->id = 0x16C; } else{ - this_marker->unk14_20 = MARKER_A5_NIPPER; + this_marker->id = MARKER_A5_NIPPER; } return TRUE; } @@ -164,7 +164,7 @@ bool func_803882E4(ActorMarker * this_marker, ActorMarker * other_marker){ void func_80388344(ActorMarker * this_marker, ActorMarker *other_marker){ Actor *this; - if(other_marker->unk14_20 == 1){ + if(other_marker->id == 1){ this = marker_getActor(this_marker); if( !mapSpecificFlags_get(7) && this->unk138_24 diff --git a/src/TTC/code_26D0.c b/src/TTC/code_26D0.c index d06b3381..ddf3bcd5 100644 --- a/src/TTC/code_26D0.c +++ b/src/TTC/code_26D0.c @@ -3,6 +3,7 @@ #include "variables.h" #include "prop.h" #include "SnS.h" +#include "actor.h" extern ActorInfo chClam; extern ActorInfo TTC_D_8038C510; @@ -90,25 +91,25 @@ ActorInfo D_8038C6DC = { /* .code */ void TTC_func_80388AC0(void) { - spawnableActorList_add(&D_8038C5E0, actor_new, 0); - spawnableActorList_add(&D_8038C604, actor_new, 0); - spawnableActorList_add(&D_8038C580, actor_new, 0X4100168); - spawnableActorList_add(&TTC_D_8038C510, actor_new, 0X4000101); - spawnableActorList_add(&D_8038C718, actor_new, 0X188); - spawnableActorList_add(&D_8038C790, actor_new, 0X148); - spawnableActorList_add(&D_8038C7B4, actor_new, 0X148); - spawnableActorList_add(&D_8038C7D8, actor_new, 0X148); - spawnableActorList_add(&D_8038C8B0, actor_new, 0X400); - spawnableActorList_add(&D_8038C8D4, actor_new, 0X400); - spawnableActorList_add(&D_8038C8F8, actor_new, 0X400); - spawnableActorList_add(&gChTreasureInfo, actor_new, 0X2000048); - spawnableActorList_add(&D_8038C628, actor_new, 0X8680); - spawnableActorList_add(&D_8038C64C, actor_new, 0X400); - spawnableActorList_add(&D_8038C670, actor_new, 0X20404); - spawnableActorList_add(&D_8038C694, actor_new, 0X400); - spawnableActorList_add(&D_8038C6B8, actor_new, 0X400); - spawnableActorList_add(&D_8038C6DC, actor_new, 0X400); - spawnableActorList_add(&chClam, actor_new, 0X2000041); + spawnableActorList_add(&D_8038C5E0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038C604, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038C580, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_26); + spawnableActorList_add(&TTC_D_8038C510, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_26); + spawnableActorList_add(&D_8038C718, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038C790, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038C7B4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038C7D8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038C8B0, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038C8D4, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038C8F8, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&gChTreasureInfo, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_8038C628, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038C64C, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038C670, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_8038C694, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038C6B8, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_8038C6DC, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&chClam, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_25); } void TTC_func_80388C78(Actor *this){ diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index ca3e0209..f255b6ef 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -270,7 +270,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ if(func_8033D410(playerMarker, marker)) return; - switch(marker->unk14_20){ + switch(marker->id){ case 0x125: //L8028BE88 case 0x126: //L8028BE88 obj_collision_type = 1; diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 2b85cc2b..99b54be6 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -314,11 +314,11 @@ void func_802C6240(Actor *this){ break; }//L802C6D1C if(this->state == 0xe){ - if(this->marker->unk14_20 != 0x29e) - this->marker->unk14_20 = 0x29e; + if(this->marker->id != 0x29e) + this->marker->id = 0x29e; }else{//L802C6D60 - if(this->marker->unk14_20 != 3) - this->marker->unk14_20 = 3; + if(this->marker->id != 3) + this->marker->id = 3; } } diff --git a/src/core2/ch/clucker.c b/src/core2/ch/clucker.c index 2eccf9ed..6cebd886 100644 --- a/src/core2/ch/clucker.c +++ b/src/core2/ch/clucker.c @@ -52,7 +52,7 @@ void func_80357264(Actor *this, s32 next_state){ f32 sp38; s32 pad34; - this->marker->unk14_20 = MARKER_1D0_CLUCKER_B; + this->marker->id = MARKER_1D0_CLUCKER_B; actor_collisionOff(this); if(next_state == 1 || next_state == 2){ skeletalAnim_set(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, 2.5f); @@ -78,7 +78,7 @@ void func_80357264(Actor *this, s32 next_state){ local->unk4 = 0.2f; if(next_state == 4){ - this->marker->unk14_20 = MARKER_1B2_CLUCKER_A; + this->marker->id = MARKER_1B2_CLUCKER_A; actor_collisionOn(this); local->unk0 = (local->unk0 + 1) % 3; if(local->unk0 < 2) @@ -177,7 +177,7 @@ void func_8035765C(Actor *this){ skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); if(skeletalAnim_getAnimId(this->unk148) == 0x185){ if(sp4C < 0.58 && 0.58 <= sp48){ - this->marker->unk14_20 = MARKER_1D0_CLUCKER_B; + this->marker->id = MARKER_1D0_CLUCKER_B; } if(sp4C < 0.05 && 0.05 <= sp48){ FUNC_8030E624(SFX_2_CLAW_SWIPE, 0.9f, 32000); @@ -194,7 +194,7 @@ void func_8035765C(Actor *this){ } else{//L803579F0 if(sp4C < 0.63 && 0.63 <= sp48){ - this->marker->unk14_20 = MARKER_1D0_CLUCKER_B; + this->marker->id = MARKER_1D0_CLUCKER_B; } if(sp4C < 0.1 && 0.1 <= sp48){ FUNC_8030E624(SFX_2_CLAW_SWIPE, 0.9f, 32000); diff --git a/src/core2/ch/code_CFA60.c b/src/core2/ch/code_CFA60.c index 1e076be4..19a48d39 100644 --- a/src/core2/ch/code_CFA60.c +++ b/src/core2/ch/code_CFA60.c @@ -22,7 +22,7 @@ ActorInfo D_80372840 = { void func_803569F0(Actor *this, s32 next_state){ ActorLocal_Core2_CFA60 *local = (ActorLocal_Core2_CFA60 *)&this->local; - this->marker->unk14_20 = 0x1cf; + this->marker->id = 0x1cf; actor_collisionOff(this); if(next_state == 1 || next_state == 2){ skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f); @@ -42,7 +42,7 @@ void func_803569F0(Actor *this, s32 next_state){ local->unk0 = 0.2f; } if(next_state == 4){ - this->marker->unk14_20 = 0x29; + this->marker->id = 0x29; actor_collisionOn(this); skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, randf2(2.3f, 2.7f)); skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); @@ -123,7 +123,7 @@ void func_80356CCC(Actor *this){ if(this->state == 4){ skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); if(sp4C < 0.59 && 0.59 <= sp48){ - this->marker->unk14_20 = 0x1cf; + this->marker->id = 0x1cf; } if(sp4C < 0.5 && 0.5 <= sp48){ func_8030E760(SFX_2_CLAW_SWIPE, 0.9f, 32000); diff --git a/src/core2/ch/collectible.c b/src/core2/ch/collectible.c index c1ed1c85..7bf7e85e 100644 --- a/src/core2/ch/collectible.c +++ b/src/core2/ch/collectible.c @@ -53,7 +53,7 @@ void chCollectible_setState(Actor *arg0, s32 next_state){ void func_802D8C98(Actor *this, s32 arg1) { s32 phi_v0; - switch (this->marker->unk14_20) + switch (this->marker->id) { case MARKER_60_BLUE_EGG_COLLECTIBLE: phi_v0 = TRUE; @@ -143,7 +143,7 @@ void chCollectible_update(Actor *this) { u32 temp_v0; if (!this->initialized) { - if (this->marker->unk14_20 != 0x60) { + if (this->marker->id != 0x60) { func_8032AA58(this, 0.56f); } this->unk10_12 = -1; diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index 755ec886..00080408 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -81,13 +81,13 @@ void __chCrab_ow(ActorMarker *marker, ActorMarker *other) { this->unk60 = 3.0f; subaddie_set_state(this, 6); actor_playAnimationOnce(this); - if (marker->unk14_20 == MARKER_13_SNIPPET) { + if (marker->id == MARKER_13_SNIPPET) { FUNC_8030E8B4(SFX_6E_VILE_EGH, 2.0f, 26000, this->position, 950, 1900); - marker->unk14_20 = MARKER_16B_SNIPPET_UPSIDEDOWN; + marker->id = MARKER_16B_SNIPPET_UPSIDEDOWN; } - if (marker->unk14_20 == MARKER_DD_BLACK_SNIPPET) { + if (marker->id == MARKER_DD_BLACK_SNIPPET) { FUNC_8030E8B4(SFX_6E_VILE_EGH, 2.0f, 26000, this->position, 950, 1900); - marker->unk14_20 = MARKER_DE_BLACK_SNIPPET_UPSIDEDOWN; + marker->id = MARKER_DE_BLACK_SNIPPET_UPSIDEDOWN; } } @@ -357,11 +357,11 @@ void chCrab_update(Actor *this) { if (this->unk60 == 0.0f) { subaddie_set_state(this, 7); actor_playAnimationOnce(this); - if (this->marker->unk14_20 == 0x16B) { - this->marker->unk14_20 = MARKER_13_SNIPPET; + if (this->marker->id == 0x16B) { + this->marker->id = MARKER_13_SNIPPET; } - if (this->marker->unk14_20 == 0xDE) { - this->marker->unk14_20 = MARKER_DD_BLACK_SNIPPET; + if (this->marker->id == 0xDE) { + this->marker->id = MARKER_DD_BLACK_SNIPPET; } } break; diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index b306dfbd..ff84663d 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -114,7 +114,7 @@ f32 D_8037DD34; /* .code */ Actor *func_802C4360(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ - s32 sp1C = marker->unk14_20 - 0xe4; + s32 sp1C = marker->id - 0xe4; func_8033A45C(3, sp1C); func_8033A45C(1, 1); func_8033A45C(4, 1); @@ -284,7 +284,7 @@ void func_802C4BB4(ActorMarker *marker){ s32 sp20; Actor *other; f32 sp18; - sp20 = marker->unk14_20 - 0xe4; + sp20 = marker->id - 0xe4; this = marker_getActor(marker); sp18 = this->scale; other = func_8032813C(sp20 + 0x198, this->position, (s32)this->yaw); @@ -308,7 +308,7 @@ void func_802C4C14(Actor *this){ s32 tmp_a2_2; f32 sp34[3]; - sp84 = this->marker->unk14_20 - 0xe4; + sp84 = this->marker->id - 0xe4; sp80 = (sp84 == D_80365E00); sp50 = time_getDelta(); if(chGameSelectBottomZoombox == NULL) diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 3c89d878..095c1100 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -46,11 +46,11 @@ void __chJinjo_802CDBA8(ActorMarker *this, ActorMarker *other){ if(actorPtr->state < 5){ if(!fileProgressFlag_get(FILEPROG_E_JINJO_TEXT)){ - func_80311480(__chJinjo_getMeetDialogId(actorPtr->marker->unk14_20), 4, 0, 0, 0, 0); + func_80311480(__chJinjo_getMeetDialogId(actorPtr->marker->id), 4, 0, 0, 0, 0); fileProgressFlag_set(FILEPROG_E_JINJO_TEXT, 1); } subaddie_set_state_with_direction(actorPtr, 6, 0.0f , -1); - if(item_adjustByDiffWithHud(ITEM_12_JINJOS, 1 << (this->unk14_20 + 6) ) == 0x1f) + if(item_adjustByDiffWithHud(ITEM_12_JINJOS, 1 << (this->id + 6) ) == 0x1f) localPtr->unk4 = 1; actor_loopAnimation(actorPtr); this->collidable = 0; diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index 6cd45194..1446d240 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -123,7 +123,7 @@ Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ void func_802D9530(Actor *this){ Actor *other = subaddie_getLinkedActor(this); if(this->unk100 && other){ - if(this->unk100->unk14_20 == 0xB8) + if(this->unk100->id == 0xB8) subaddie_set_state_with_direction(other, 3, 0.0001f, 1); } subaddie_set_state_with_direction(this, 4, 0.0001f, 1); @@ -248,7 +248,7 @@ int chmole_learnAbility(Actor *this){ void func_802D9ADC(Actor *this){ Actor *other = subaddie_getLinkedActor(this); - if(this->unk100 && other && this->unk100->unk14_20 == 0xB8){ + if(this->unk100 && other && this->unk100->id == 0xB8){ subaddie_set_state_with_direction(other, 2, 0.0001f, 1); } this->marker->propPtr->unk8_3 = 1; @@ -339,7 +339,7 @@ void chmole_update(Actor *this){ this->unk100 = (other) ? other->marker : NULL; if(this->unk100){ other = subaddie_getLinkedActor(this); - if(other && this->unk100->unk14_20 == 0xB8){ + if(other && this->unk100->id == 0xB8){ subaddie_set_state(other, 1); } } diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index 16dfcb9d..f178012e 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -172,10 +172,10 @@ int __chSnowman_isPlayerInAttackRange(Actor *this, s32 min_distance, s32 max_dis int __chSnowman_func_802E1F70(ActorMarker *marker, s32 arg1){ if(marker->unk40_31 == 0xB){ - marker->unk14_20 = 0x287; + marker->id = 0x287; } else{ - marker->unk14_20 = MARKER_B1_SIR_SLUSH; + marker->id = MARKER_B1_SIR_SLUSH; } return TRUE; } diff --git a/src/core2/code_3EAD0.c b/src/core2/code_3EAD0.c index a58db43b..99061426 100644 --- a/src/core2/code_3EAD0.c +++ b/src/core2/code_3EAD0.c @@ -33,7 +33,7 @@ void func_802C5A60(Actor *this){ // Spawns a sparkle sprite when touching turbo trainers or wading boots ActorLocal_Core2_3EAD0 *local = (ActorLocal_Core2_3EAD0*)&this->local; if(!this->initialized){ - switch(this->marker->unk14_20){ + switch(this->marker->id){ case 0x58: func_8032AA58(this, 0.35f); break; diff --git a/src/core2/code_42CB0.c b/src/core2/code_42CB0.c index 9e8dd37d..25c3c1b5 100644 --- a/src/core2/code_42CB0.c +++ b/src/core2/code_42CB0.c @@ -100,7 +100,7 @@ void chHoneycomb_update(Actor *this){ if(!this->initialized){ this->unk60 = (randf() < 0.5) ? 200.0 : -200.0; this->initialized = TRUE; - if( this->marker->unk14_20 == MARKER_53_EMPTY_HONEYCOMB){ + if( this->marker->id == MARKER_53_EMPTY_HONEYCOMB){ if(local->uid == 0) local->uid = (!this->unk44_2)? D_8037DDC0 : func_802C9C40(this); if( honeycombscore_get(local->uid) @@ -115,7 +115,7 @@ void chHoneycomb_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; - if( this->marker->unk14_20 == MARKER_55_HONEYCOMB + if( this->marker->id == MARKER_55_HONEYCOMB && !this->unk44_2 ){ marker_setFreeMethod(this->marker, __chHoneycomb_free); diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index 6b6662ce..2f8528c1 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -138,7 +138,7 @@ void func_802D2FB0(Actor *this, s32 arg1, s32 arg2, s32 arg3, f32 arg4, s32 arg5 } void func_802D3138(ActorMarker *marker, ActorMarker *other_marker){ - if(marker->unk14_20 == 0x224 || marker->unk14_20 == 0x225){ + if(marker->id == 0x224 || marker->id == 0x225){ func_8025A70C(COMUSIC_2B_DING_B); } } @@ -153,7 +153,7 @@ void func_802D31AC(ActorMarker *arg0, ActorMarker * arg1) { sp2C = marker_getActor(arg0); arg0->collidable = FALSE; - switch (arg0->unk14_20) { + switch (arg0->id) { case 0x9F: case 0xA0: case 0xFF: @@ -215,16 +215,16 @@ void func_802D31AC(ActorMarker *arg0, ActorMarker * arg1) { case 0xEA: case 0x108: case 0x263: - if ((arg0->unk14_20 == 0x9D) || (arg0->unk14_20 == 0xE7)) { + if ((arg0->id == 0x9D) || (arg0->id == 0xE7)) { levelSpecificFlags_set(0x2E, 1); } - if (arg0->unk14_20 == 0x263) { + if (arg0->id == 0x263) { levelSpecificFlags_set(0x38, 1); } func_802D2FB0(sp2C, 5, -0x28, 0xC8, 0.85f, 0xDC, 0x3C, 0x64); func_8030E540(SFX_D_EGGSHELL_BREAKING); func_8030E540(SFX_11_WOOD_BREAKING_1); - switch (arg0->unk14_20) { + switch (arg0->id) { case 0x9E: func_802EE278(sp2C, 0xD, 9, 0x82, 0.34f, 1.0f); break; @@ -304,7 +304,7 @@ void func_802D31AC(ActorMarker *arg0, ActorMarker * arg1) { case 0x239: func_8030E540(SFX_13A_GLASS_BREAKING_7); func_802EE278(sp2C, 4, 0x2D, 0x82, 1.0f, 1.0f); - if (arg0->unk14_20 == 0x1F3) { + if (arg0->id == 0x1F3) { func_802EE278(sp2C, 4, 0x2D, 0x104, 1.0f, 1.0f); } marker_despawn(arg0); diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index cd2d1900..b560f71e 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -105,7 +105,7 @@ void __chLevelCollectible_collide(ActorMarker *marker, ActorMarker *other_marker sp18[0] = this->position[0]; sp18[1] = this->position[1]; sp18[2] = this->position[2]; - switch (marker->unk14_20) { + switch (marker->id) { case MARKER_36_ORANGE_COLLECTIBLE: if (mapSpecificFlags_get(1)) return; @@ -160,7 +160,7 @@ void func_802D7DE8(ActorMarker *marker, f32 arg1[3]) { f32 var_f14; f32 var_f18; - sp4C = marker->unk14_20; + sp4C = marker->id; this = marker_getActor(marker); ml_vec3f_to_vec3w(sp50, arg1); if (sp4C == MARKER_37_GOLD_BULLION) { @@ -204,7 +204,7 @@ void __chLevelCollectible_returnObj(Actor *this) { f32 sp20; local = (s32*)&this->local; - if( (this->marker->unk14_20 != MARKER_36_ORANGE_COLLECTIBLE) + if( (this->marker->id != MARKER_36_ORANGE_COLLECTIBLE) || (this->unk78_13 == 0) ) { this->position[0] += this->velocity[0]; @@ -224,13 +224,13 @@ void __chLevelCollectible_returnObj(Actor *this) { } } this->position[1] = sp20; - if (this->marker->unk14_20 != MARKER_36_ORANGE_COLLECTIBLE) { + if (this->marker->id != MARKER_36_ORANGE_COLLECTIBLE) { FUNC_8030E8B4(SFX_21_EGG_BOUNCE_1, 0.76f, 25000, this->position, 1000, 2000); } else { FUNC_8030E8B4(SFX_B3_ORANGE_TALKING, 1.0f, 25000, this->position, 1000, 2000); } if (this->state == 4) { - switch (this->marker->unk14_20) { + switch (this->marker->id) { case MARKER_37_GOLD_BULLION: break; case MARKER_36_ORANGE_COLLECTIBLE: @@ -254,7 +254,7 @@ void __chLevelCollectible_returnObj(Actor *this) { this->unk138_22 = this->unk138_21 = 0; subaddie_set_state(this, 2); } - switch (this->marker->unk14_20) { + switch (this->marker->id) { case MARKER_1FD_BLUE_PRESENT_COLLECTIBLE: __chLevelCollectible_presentReturnEmitSparkles(this->position, ASSET_711_SPRITE_SPARKLE_DARK_BLUE); break; @@ -316,9 +316,9 @@ void chLevelCollectible_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; - if( this->marker->unk14_20 == MARKER_1FD_BLUE_PRESENT_COLLECTIBLE - || this->marker->unk14_20 == MARKER_1FE_GREEN_PRESENT_COLLECTIBLE - || this->marker->unk14_20 == MARKER_1FF_RED_PRESENT_COLLECTIBLE + if( this->marker->id == MARKER_1FD_BLUE_PRESENT_COLLECTIBLE + || this->marker->id == MARKER_1FE_GREEN_PRESENT_COLLECTIBLE + || this->marker->id == MARKER_1FF_RED_PRESENT_COLLECTIBLE ){ if(jiggyscore_isCollected(JIGGY_2E_FP_PRESENTS)){ marker_despawn(this->marker); @@ -355,9 +355,9 @@ void chLevelCollectible_update(Actor *this){ break; } - marker_id = this->marker->unk14_20; + marker_id = this->marker->id; - switch(this->marker->unk14_20){ + switch(this->marker->id){ case MARKER_37_GOLD_BULLION: //L802D86CC func_802D83EC(this); diff --git a/src/core2/code_7060.c b/src/core2/code_7060.c index 66361b57..198c1f5e 100644 --- a/src/core2/code_7060.c +++ b/src/core2/code_7060.c @@ -294,7 +294,7 @@ enum marker_e bacarry_get_markerId(void){ marker = bacarry_get_marker(); if(marker){ - return marker->unk14_20; + return marker->id; } return 0; } diff --git a/src/core2/code_7AF80.c b/src/core2/code_7AF80.c index e7f32862..630be8fd 100644 --- a/src/core2/code_7AF80.c +++ b/src/core2/code_7AF80.c @@ -2000,7 +2000,7 @@ void func_80307CA0(ActorMarker *marker) { s32 temp_v0_3; s32 var_s0; - temp_s4 = D_8036A9E4[marker->unk14_20]; + temp_s4 = D_8036A9E4[marker->id]; if ((temp_s4 != 0xFF) && (bitfield_isBitSet(D_8036A9E0, temp_s4) == 1)) { func_8032E010(marker->propPtr, sp58); cubePtrList = func_80307948(sp58); diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index ef040a76..f7107a03 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -369,7 +369,7 @@ void func_80325FE8(Actor *this) { u8 temp_v0; marker = this->marker; - marker->unk14_20 = 0; + marker->id = 0; if (this->animctrl != NULL) { animctrl_free(this->animctrl); } @@ -631,7 +631,7 @@ Actor *actorArray_findActorFromMarkerId(enum marker_e marker_id) { actor_begin = suBaddieActorArray->data; for(i_actor = actor_begin; i_actor - actor_begin < suBaddieActorArray->cnt; i_actor++) { - if ((marker_id == i_actor->marker->unk14_20) && !i_actor->despawn_flag) { + if ((marker_id == i_actor->marker->id) && !i_actor->despawn_flag) { return i_actor; } } @@ -809,7 +809,7 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ suLastBaddie->unk124_6 = 1; suLastBaddie->modelCacheIndex = actorInfo->actorId; suLastBaddie->unk44_2 = func_80326C18(); - suLastBaddie->marker = func_8032F9DC(position, actorInfo->draw_func, (func_8033B64C(actorInfo->modelId) == 1) ? 0 : 1, actorInfo->markerId, (flags & 0x400) ? 1 : 0); + suLastBaddie->marker = marker_init(position, actorInfo->draw_func, (asset_getFlag(actorInfo->modelId) == 1) ? 0 : 1, actorInfo->markerId, (flags & 0x400) ? 1 : 0); suLastBaddie->marker->unk3E_0 = 1; suLastBaddie->unk138_28 = 1; suLastBaddie->unk10_3 = -1; @@ -1373,7 +1373,7 @@ f32 func_80328DCC(Actor *this, f32 angle, f32 angle_ideal, s32 arg3) { var_f2 += 360.0f; } - if ((this->marker->unk14_20 != 0x12) && (this->marker->unk2C_2 == 1) && ((var_f2 >= 50.0f) || (var_f2 < -50.0f))) { + if ((this->marker->id != 0x12) && (this->marker->unk2C_2 == 1) && ((var_f2 >= 50.0f) || (var_f2 < -50.0f))) { return angle_ideal; } var_f2 = var_f2 / func_80328DAC(this); @@ -1742,7 +1742,7 @@ void *actors_appendToSavestate(void * begin, u32 end){ s0->unk100 = NULL; s0->unk158[0] = NULL; s0->unk158[1] = NULL; - s0->unk138_19 = s1->marker->unk14_20; + s0->unk138_19 = s1->marker->id; s0->unk108 = s1->marker->unkC; s0->unk10C = s1->marker->unk10; s0->unk134 = s1->marker->unk1C; @@ -2132,7 +2132,7 @@ void actorArray_defrag(void) { i_actor->marker->unk50 = func_803406D4(i_actor->marker->unk50); } - if (i_actor->marker->unk14_20 == MARKER_217_BEE_SWARM) { + if (i_actor->marker->id == MARKER_217_BEE_SWARM) { func_802CEB60(i_actor); } } @@ -2155,7 +2155,7 @@ ActorMarker *func_8032B16C(enum jiggy_e jiggy_id) { if (suBaddieActorArray != NULL) { temp_s3 = &suBaddieActorArray->data[0]; for(var_s0 = temp_s3; (var_s0 - temp_s3) < suBaddieActorArray->cnt; var_s0++){ - if ((var_s0->marker->unk14_20 == MARKER_52_JIGGY) && (chjiggy_getJiggyId(&(var_s0->marker)) == jiggy_id)) { + if ((var_s0->marker->id == MARKER_52_JIGGY) && (chjiggy_getJiggyId(&(var_s0->marker)) == jiggy_id)) { return var_s0->marker; } } @@ -2199,7 +2199,7 @@ void func_8032B3A0(Actor *this, ActorMarker *arg1) { sp54[2] = this->position[2]; func_802EE6CC(sp54, 0, D_8036E5B0, !this->unk16C_0, 0.75f, 0.0f, 125, 250, 0); func_802F3CF8(sp54, !this->unk16C_0, - (arg1->unk14_20 == 1) ? 1 + (arg1->id == 1) ? 1 : (player_getTransformation() == TRANSFORM_5_CROC) ? 2 : 0 ); @@ -2215,7 +2215,7 @@ void func_8032B4DC(Actor *this, ActorMarker *arg1, s32 arg2) { func_8034A174(this->marker->unk44, arg2, &sp3C); func_802EE6CC(sp3C, NULL, D_8036E5C0, !this->unk16C_0, 0.75f, 0.0f, 125, 250, 0); func_802F3CF8(sp3C, !this->unk16C_0, - (arg1->unk14_20 == 1) ? 1 + (arg1->id == 1) ? 1 : (player_getTransformation() == TRANSFORM_5_CROC) ? 2 : 0 ); @@ -2244,7 +2244,7 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { sp64 = func_8033D574(arg2); if (((func_80297C6C() != 3) && func_8028F1E0()) || (func_8033D594(arg2) == 0)) { if (sp64 == 0) { - if ((sp68 != 0) || (arg1->unk14_20 == 0)) { + if ((sp68 != 0) || (arg1->id == 0)) { if (sp68 <= 0) { sp68 = 1; } @@ -2265,7 +2265,7 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { if (this->unk138_25) { func_802C9334(sp6C + 0x21, this); } else { - if ((this->marker->unk14_20 < 0x1A1) || (this->marker->unk14_20 >= 0x1A5)) { + if ((this->marker->id < 0x1A1) || (this->marker->id >= 0x1A5)) { func_802C9334(sp6C + 0x18, this); } } diff --git a/src/core2/code_A4D00.c b/src/core2/code_A4D00.c index 04e0b931..8d1fad2f 100644 --- a/src/core2/code_A4D00.c +++ b/src/core2/code_A4D00.c @@ -329,7 +329,7 @@ bool func_8032C850(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3, bool nonactor) func_80320ED8(actor->marker, temp_f0 / 2, 2); actor->marker->collidable = stored_collidability; for(var_v1 = func_8032F528(); var_v1 != NULL; var_v1 = func_8032F528()) { - if (nonactor || (var_v1->markerFlag && (var_v1->actorProp.marker->unk14_20 == actor->marker->unk14_20))) { + if (nonactor || (var_v1->markerFlag && (var_v1->actorProp.marker->id == actor->marker->id))) { D_803833D0 = var_v1; actor->position[0] = (f32) arg1[0]; actor->position[1] = (f32) arg1[1]; diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index c519cff0..1dc3bcb8 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -267,7 +267,7 @@ void __marker_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx){ f32 draw_dist_f; f32 percentage; if(!this->unk3E_0){ - this->unk8(this, gfx, mtx, vtx); + this->drawFunc(this, gfx, mtx, vtx); return; } actor = marker_getActor(this); @@ -288,7 +288,7 @@ void __marker_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx){ percentage = 1.0f; } func_8033A280(percentage); - this->unk8(this, gfx, mtx, vtx); + this->drawFunc(this, gfx, mtx, vtx); }//L8032D300 func_8033A244(30000.0f); func_8033A280(1.0f); @@ -1135,12 +1135,12 @@ void func_8032F7EC(f32 position[3], ActorMarker *marker, f32 rotation[3]) { func_8032F64C(position, marker); } -ActorMarker * func_8032F9DC(s32 *pos, MarkerDrawFunc arg1, int arg2, int arg3, int arg4){ +ActorMarker * marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, int marker_id, int arg4){ ActorMarker * marker = func_80332A60(); marker->propPtr = NULL; marker->cubePtr = NULL; - marker->unk8 = arg1; - marker->unk14_20 = arg3; + marker->drawFunc = draw_func; + marker->id = marker_id; marker->unk40_23 = arg4; func_8032F3D4(pos, marker, arg2); marker->actrArrayIdx = 0; @@ -1187,7 +1187,7 @@ ActorMarker * func_8032FB80(f32 *pos, MarkerDrawFunc arg1, int arg2, enum asset_ sp24[0] = pos[0]; sp24[1] = pos[1]; sp24[2] = pos[2]; - func_8032F9DC(sp24, arg1, arg2, model_id, arg4); + marker_init(sp24, arg1, arg2, model_id, arg4); } ActorMarker * func_8032FBE4(f32 *pos, MarkerDrawFunc arg1, int arg2, enum asset_e model_id){ @@ -1207,7 +1207,7 @@ void func_8032FDDC(f32 rotation[3], ActorMarker *marker) { } int func_8032FFB4(ActorMarker *this, s32 arg1){ - this->unk14_20 = arg1; + this->id = arg1; } //marker_setActorArrayIndex diff --git a/src/core2/code_B3A80.c b/src/core2/code_B3A80.c index 59065812..26ddc169 100644 --- a/src/core2/code_B3A80.c +++ b/src/core2/code_B3A80.c @@ -310,7 +310,7 @@ void func_8033B61C(void){ func_8033B1BC(); } -s32 func_8033B64C(s32 arg0){ +s32 asset_getFlag(enum asset_e arg0){ return assetSectionRomMetaList[arg0].unk6; } diff --git a/src/core2/code_B62B0.c b/src/core2/code_B62B0.c index 93946008..ac307fc7 100644 --- a/src/core2/code_B62B0.c +++ b/src/core2/code_B62B0.c @@ -229,9 +229,9 @@ s16 D_80383F10[0x2A9]; /* .code */ s32 func_8033D240(ActorMarker *arg0, ActorMarker *arg1){ if(arg0){ - if(!arg0->unk14_20 && player_getActiveHitbox(arg1) == HITBOX_6_WONDERWING) + if(!arg0->id && player_getActiveHitbox(arg1) == HITBOX_6_WONDERWING) return -1; - return arg0->unk14_20; + return arg0->id; } return -1; } @@ -240,7 +240,7 @@ s32 func_8033D2A8(ActorMarker *arg0, ActorMarker *arg1){ if(!arg0) return HITBOX_6_WONDERWING; - if(!arg0->unk14_20) + if(!arg0->id) return player_getActiveHitbox(arg1); return HITBOX_0_NONE; } @@ -273,7 +273,7 @@ bool func_8033D410(ActorMarker *arg0, ActorMarker *arg1) { s16 temp_t0; s32 temp_s0; - sp38 = D_80383F10[arg1->unk14_20]; + sp38 = D_80383F10[arg1->id]; if (sp38 == -1) { return FALSE; } diff --git a/src/core2/code_B9770.c b/src/core2/code_B9770.c index f0f0efde..f59f3b73 100644 --- a/src/core2/code_B9770.c +++ b/src/core2/code_B9770.c @@ -857,7 +857,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ if (sp68 != 0) { if (sp50 != (-9999.0f)) { arg0->yaw = sp50; - if (arg0->marker->unk14_20 == 0x12) { + if (arg0->marker->id == 0x12) { arg0->yaw = (f32) func_80342244((s32) arg0->yaw); } arg0->yaw_ideal = arg0->yaw; @@ -1012,7 +1012,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ arg0->unk38_21 = sp48->unkC.bit31; arg0->unk78_31 = arg1->t1.unk4.bit15; arg0->unk78_22 = sp48->unk4.bit15; - if (arg0->marker->unk14_20 == 0x12) + if (arg0->marker->id == 0x12) { arg0->unk38_13 = func_80342244(arg0->unk38_13); arg0->unk38_21 = func_80342244(arg0->unk38_21); @@ -1028,7 +1028,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ if (!arg0->unk10_4){ if (arg0->unk10_8){ arg0->yaw_ideal = (f32) arg1->t1.unkC.bit31; - if (arg0->marker->unk14_20 == 0x12){ + if (arg0->marker->id == 0x12){ arg0->yaw_ideal = (f32) func_80342244((s32) arg0->yaw_ideal); } } @@ -1043,7 +1043,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ void func_803430B4(Actor *arg0) { f32 d_yaw; - if ((arg0->marker->unk14_20 == 0x12) && (arg0->unk138_30 == 1)) { + if ((arg0->marker->id == 0x12) && (arg0->unk138_30 == 1)) { d_yaw = arg0->yaw_ideal - arg0->yaw; while (d_yaw >= 360.0f) { d_yaw -= 360.0f; } while (d_yaw < 0.0f) { d_yaw += 360.0f; } @@ -1091,7 +1091,7 @@ void func_803431D0(Actor *arg0, s32 arg1, s32 arg2, s32 arg3) { if (arg0->unk10_4) { player_getPosition(sp4C); func_802BC434(sp40, sp4C, arg0->position); - if (arg0->marker->unk14_20 != 0x12) { + if (arg0->marker->id != 0x12) { sp40[1] += 180.0f; while (sp40[1] >= 360.0f) { sp40[1] -= 360.0f; @@ -1196,7 +1196,7 @@ s32 func_803438E0(Actor *actor, s32 arg1, s32 arg2, s32 arg3) { } sp4C = func_803421A4(actor->unk44_14, actor->unk48); if ((actor->unk54 == 0.0f) && (actor->unk138_3 == 0)) { - if (actor->marker->unk14_20 == 0xB0) { + if (actor->marker->id == 0xB0) { actor->unk48 = func_803240E0(D_80371E70[actor->unk44_14], actor->unk48, sp40, &sp44); } else { actor->unk48 = func_80323FDC(D_80371E70[actor->unk44_14], actor->unk48, sp40, &sp44); diff --git a/src/core2/code_CC1E0.c b/src/core2/code_CC1E0.c index ae89d5ed..5efeb409 100644 --- a/src/core2/code_CC1E0.c +++ b/src/core2/code_CC1E0.c @@ -68,7 +68,7 @@ s32 func_803531C8(u8 projectile_indx, s32 arg1){ prop = func_80320EB0(marker, 30.0f, 1); if(prop != NULL && prop->unk8_0){ other_marker = prop->marker; - sp34 =other_marker->unk14_20; + sp34 =other_marker->id; if(!func_8033D410(marker, other_marker)){ switch(sp34){ case MARKER_FC_CROCTUS: //L803532C4 diff --git a/src/core2/code_D6180.c b/src/core2/code_D6180.c index 1affdf06..d2e0b036 100644 --- a/src/core2/code_D6180.c +++ b/src/core2/code_D6180.c @@ -116,12 +116,12 @@ void func_8035D3D8(Actor *this) { } func_802DB5A0(this); if (this->state == 9) { - if (this->marker->unk14_20 != MARKER_298_MUMMUM_BALL) { - this->marker->unk14_20 = MARKER_298_MUMMUM_BALL; + if (this->marker->id != MARKER_298_MUMMUM_BALL) { + this->marker->id = MARKER_298_MUMMUM_BALL; } } else { - if (this->marker->unk14_20 != MARKER_219_MUMMUM) { - this->marker->unk14_20 = MARKER_219_MUMMUM; + if (this->marker->id != MARKER_219_MUMMUM) { + this->marker->id = MARKER_219_MUMMUM; } } } diff --git a/src/core2/code_D6600.c b/src/core2/code_D6600.c index 92ea4c55..77be8500 100644 --- a/src/core2/code_D6600.c +++ b/src/core2/code_D6600.c @@ -138,7 +138,7 @@ void func_8035DA1C(Actor *this) { marker_setCollisionScripts(this->marker, func_8035D8F0, NULL, func_8035D88C); } - this->marker->unk14_20 = MARKER_69_CHUMP_FISH; + this->marker->id = MARKER_69_CHUMP_FISH; if (randf() < 0.01) { LOCAL_D6600(this)->unk0 = 5; } @@ -207,7 +207,7 @@ void func_8035DA1C(Actor *this) { func_8030E6A4(SFX_6D_CROC_BITE, 1.1f, 10000); } case 5://L8035DE84 - this->marker->unk14_20 = MARKER_173_CHUMP_FISH_2; + this->marker->id = MARKER_173_CHUMP_FISH_2; func_803297FC(this, &sp40, &sp44); subaddie_set_ideal_yaw(this, (s32) sp44); func_80328CA8(this, (s32) func_8035D590(sp40)); diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index 4f1bb87b..83e49bdb 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -2,8 +2,8 @@ #include "functions.h" #include "variables.h" #include "actor.h" - #include "prop.h" +#include "functions.h" #include "ch/snacker.h" @@ -210,145 +210,145 @@ void spawnQueue_reset(void){ func_803062D0(); func_80325F8C(); spawnableActorList_new(); - spawnableActorList_add(&D_80367160, actor_new, 0x0000000); //cutscene Trigger? - spawnableActorList_add(&D_803675F0, actor_new, 0x0000040); - spawnableActorList_add(&D_80366090, actor_new, 0x2010103); - spawnableActorList_add(&D_803660B4, actor_new, 0x0000103); - spawnableActorList_add(&D_803674E0, actor_new, 0x0000182); - spawnableActorList_add(&chBeehive, actor_new, 0x2000108); - spawnableActorList_add(&D_80367310, actor_new, 0x0020001); - spawnableActorList_add(&D_80367390, actor_new, 0x0080084); - spawnableActorList_add(&chJinjoYellow, actor_new, 0x0000140); - spawnableActorList_add(&chJinjoOrange, actor_new, 0x0000140); - spawnableActorList_add(&chJinjoBlue, actor_new, 0x0000140); - spawnableActorList_add(&chJinjoPink, actor_new, 0x0000140); - spawnableActorList_add(&chJinjoGreen, actor_new, 0x0000140); - spawnableActorList_add(&D_803662A8, actor_new, 0x02000C0); - spawnableActorList_add(&chJigsawDance, actor_new, 0x0000004); - spawnableActorList_add(&D_80367C60, actor_new, 0x0000004); - spawnableActorList_add(&D_80367A20, actor_new, 0x0000000); - spawnableActorList_add(&D_80366C80, actor_new, 0x0200040); //chhoneycarrier - spawnableActorList_add(&D_80366CA4, actor_new, 0x0200040); //chhoney - spawnableActorList_add(&D_80366C50, actor_new, 0x0200000); //music_note - spawnableActorList_add(&D_80367D00, actor_new, 0x0200000); //egg - spawnableActorList_add(&D_80366340, func_802C8A54, 0x0000004); - spawnableActorList_add(&D_80366364, func_802C8AA8, 0x0000004); - spawnableActorList_add(&D_80366388, func_802C8AF8, 0x0000004); - spawnableActorList_add(&D_803663AC, func_802C8B4C, 0x0000004); - spawnableActorList_add(&D_803663D0, func_802C8BA8, 0x0000004); - spawnableActorList_add(&D_803663F4, func_802C8C04, 0x0000004); - spawnableActorList_add(&D_80367AB0, func_802D7558, 0x0000004); - spawnableActorList_add(&D_80367AD4, func_802D75B4, 0x0000004); - spawnableActorList_add(&D_80367AF8, func_802D7610, 0x0000004); - spawnableActorList_add(&chTrainers, actor_new, 0x0000000); - spawnableActorList_add(&D_80365F60, actor_new, 0x0000004); - spawnableActorList_add(&D_80365F84, actor_new, 0x0000004); //turbotrainers - spawnableActorList_add(&D_80367184, actor_new, 0x0000000); - spawnableActorList_add(&chExtraLife, actor_new, 0x0200000); //extralife - spawnableActorList_add(&D_80365FB0, actor_new, 0x0000004); //shrapnel - spawnableActorList_add(&chBadShad, actor_new, 0x0000004); //chbadshad - spawnableActorList_add(&D_803685A0, actor_new, 0x0000040); //mumbotoken - spawnableActorList_add(&D_80367F30, actor_new, 0x0000400); - spawnableActorList_add(&chBubble, actor_new, 0x0000004); - spawnableActorList_add(&chGloop, actor_new, 0x000008A); //gloop - spawnableActorList_add(&chShockJump, actor_new, 0x0000000); //chshockjump - spawnableActorList_add(&chFlightPad, actor_new, 0x0000000); //flight_pad - spawnableActorList_add(&D_80367D24, actor_new, 0x0200000); //redfeather - spawnableActorList_add(&D_80367D48, actor_new, 0x0200000); //goldfeather - spawnableActorList_add(&D_80367C90, actor_new, 0x0000004); //spent_redfeather - spawnableActorList_add(&D_80367CB4, actor_new, 0x0000004); //spent_goldfeather - spawnableActorList_add(&gChMole, actor_new, 0x0000180); //bottles - spawnableActorList_add(&D_80367E20, actor_new, 0x44); //chmolehill - spawnableActorList_add(&D_80373DC0, actor_new, 0x80000); - spawnableActorList_add(&D_80367E70, actor_new, 0x0); - spawnableActorList_add(&gChSnacker, actor_new, 0x10004); //snacker - spawnableActorList_add(&D_80366EF0, actor_new, 0x20004); //large_shadow - spawnableActorList_add(&D_80367B20, actor_new, 0x80); //chclimbbase - spawnableActorList_add(&D_80367BA4, actor_new, 0x40); //gold_bullion - spawnableActorList_add(&D_80367B80, actor_new, 0x2); //orange - spawnableActorList_add(&D_80372970, actor_new, 0x80); //leaf_particle - spawnableActorList_add(&D_80372994, actor_new, 0x80); - spawnableActorList_add(&D_803729B8, actor_new, 0x80); //rain - spawnableActorList_add(&D_803729DC, actor_new, 0x80); - spawnableActorList_add(&D_80372A00, actor_new, 0x80); //snow - spawnableActorList_add(&D_80372A24, actor_new, 0x80); - spawnableActorList_add(&D_80372A48, actor_new, 0x81); - spawnableActorList_add(&D_80372A6C, actor_new, 0x81); - spawnableActorList_add(&chMinigame, actor_new, 0x80); //boombox - spawnableActorList_add(&D_803677A8, actor_new, 0x8600); //ice_key - spawnableActorList_add(&D_80367814, actor_new, 0x8600); //SnS_egg - spawnableActorList_add(&gChFireFxInfo, actor_new, 0x0); //fire - spawnableActorList_add(&D_80367838, actor_new, 0x8600); //level_entry_disk - spawnableActorList_add(&D_80367760, actor_new, 0x1000); - spawnableActorList_add(&D_80367784, actor_new, 0x1000); - spawnableActorList_add(&D_80365E58, actor_new, 0x20480); //banjo.without_right_hand - spawnableActorList_add(&D_80365EAC, actor_new, 0x20480); //banjo.playing_gameboy - spawnableActorList_add(&D_80365F00, actor_new, 0x20480); //banjo.cooking - spawnableActorList_add(&D_803677CC, actor_new, 0x8680);//mumbo_transform_pad - spawnableActorList_add(&D_803677F0, actor_new, 0x8680); - spawnableActorList_add(&D_803731B0, actor_new, 0x0); - spawnableActorList_add(&chSnowball, actor_new, 0x100044);//snowball - spawnableActorList_add(&chSnowmanHat, actor_new, 0x4);//sir_slush_hat - spawnableActorList_add(&gChDripsInfo, actor_new, 0x400);//water_drops - spawnableActorList_add(&D_80372BA4, actor_new, 0x2020141);//ice_cube - spawnableActorList_add(&D_8036804C, actor_new, 0x508604);//GAME_OVER - spawnableActorList_add(&D_8036807C, actor_new, 0x508604);//THE_END - spawnableActorList_add(&D_803680AC, actor_new, 0x508604);//player_KAZOOIE - spawnableActorList_add(&chOverlayCopyrightDescription, actor_new, 0x508604);//copyright_info - spawnableActorList_add(&D_80368124, actor_new, 0x508604);//PRESS_START - spawnableActorList_add(&chBottlesBonusDescription, chBottlesBonus_new, 0x509604);//jiggy_picture - spawnableActorList_add(&D_8036833C, actor_new, 0x508604); - spawnableActorList_add(&D_8036838C, actor_new, 0x509604); - spawnableActorList_add(&D_80368418, actor_new, 0x508644);//banjos_hand_BB - spawnableActorList_add(&D_80368174, actor_new, 0x508604);//NO_CONTROLLER); - spawnableActorList_add(&D_80367530, actor_new, 0x0);//mumbo_token_sign.5 - spawnableActorList_add(&D_80367554, actor_new, 0x0);//mumbo_toke_sign.10 - spawnableActorList_add(&D_80367578, actor_new, 0x0);//mumbo_toke_sign.15 - spawnableActorList_add(&D_8036759C, actor_new, 0x0);//mumbo_toke_sign.20 - spawnableActorList_add(&D_803675C0, actor_new, 0x0);//mumbo_toke_sign.25 - spawnableActorList_add(&D_8036785C, actor_new, 0x0);//witch_switch.mm; - spawnableActorList_add(&D_80367880, actor_new, 0x0);//witch_switch.mmm - spawnableActorList_add(&D_803678A4, actor_new, 0x0);//witch_switch.ttc - spawnableActorList_add(&D_803678C8, actor_new, 0x0);//witch_switch.rbb - spawnableActorList_add(&D_803678EC, actor_new, 0x0);//witch_switch.ccw - spawnableActorList_add(&D_80367910, actor_new, 0x0);//witch_switch.fp - spawnableActorList_add(&D_80367934, actor_new, 0x0);//witch_switch.cc - spawnableActorList_add(&D_80367958, actor_new, 0x0);//witch_switch.bgs - spawnableActorList_add(&D_8036797C, actor_new, 0x400);//witch_switch.gv - spawnableActorList_add(&D_80368450, actor_new, 0x20000);//fire_sparkle - spawnableActorList_add(&D_803684BC, actor_new, 0x180);//roysten - spawnableActorList_add(&D_803684E0, actor_new, 0x0);//cuckoo_clock - spawnableActorList_add(&D_80368504, actor_new, 0x0); - spawnableActorList_add(&D_80368528, actor_new, 0x0); - spawnableActorList_add(&D_8036854C, actor_new, 0x0); - spawnableActorList_add(&D_80368570, actor_new, 0x0); - spawnableActorList_add(&D_80368474, actor_new, 0xC8); - spawnableActorList_add(&D_80368498, actor_new, 0x0); - spawnableActorList_add(&D_803732E0, actor_new, 0x0); - spawnableActorList_add(&D_80372810, actor_new, 0x8008A8); - spawnableActorList_add(&D_80373100, actor_new, 0x28008A8); - spawnableActorList_add(&D_80373134, actor_new, 0x880); - spawnableActorList_add(&D_80373158, actor_new, 0x880); - spawnableActorList_add(&D_80372EE0, actor_new, 0x2000141); - spawnableActorList_addIfMapVisited(&chTermite, actor_new, 0x2010101, MAP_2_MM_MUMBOS_MOUNTAIN); //ticker - spawnableActorList_addIfMapVisited(&D_80372C80, actor_new, 0x2010981, MAP_31_RBB_RUSTY_BUCKET_BAY); //floatsam - spawnableActorList_addIfMapVisited(&D_80372C18, actor_new, 0x211A9, MAP_1B_MMM_MAD_MONSTER_MANSION); //teehee - spawnableActorList_addIfMapVisited(&D_80372FC0, actor_new, 0x2010001, MAP_1B_MMM_MAD_MONSTER_MANSION); - spawnableActorList_addIfMapVisited(&D_80372FE4, actor_new, 0x2010401, MAP_1B_MMM_MAD_MONSTER_MANSION); - spawnableActorList_addIfMapVisited(&D_803730D8, actor_new, 0x2200021, MAP_1B_MMM_MAD_MONSTER_MANSION); //nibbly - spawnableActorList_addIfMapVisited(&D_80367130, actor_new, 0x20009a9, MAP_D_BGS_BUBBLEGLOOP_SWAMP); //buzzbomb - spawnableActorList_addIfMapVisited(&D_80372B80, actor_new, 0x2020141, MAP_27_FP_FREEZEEZY_PEAK); - spawnableActorList_addIfMapVisited(&chShrapnelDescription, actor_new, 0x2000101, MAP_7_TTC_TREASURE_TROVE_COVE); //scrapnel - spawnableActorList_addIfMapVisited(&D_80372D78, actor_new, 0x3010121, MAP_1B_MMM_MAD_MONSTER_MANSION); //limbo - spawnableActorList_addIfMapVisited(&D_80372DF8, actor_new, 0x2010121, MAP_31_RBB_RUSTY_BUCKET_BAY); //grublin_hood - spawnableActorList_addIfMapVisited(&D_80372E78, actor_new, 0x3010129, MAP_12_GV_GOBIS_VALLEY); //mummum - spawnableActorList_addIfMapVisited(&D_80372840, actor_new, 0x2800960, MAP_B_CC_CLANKERS_CAVERN); //grillchompa - spawnableActorList_addIfMapVisited(&D_803670B8, actor_new, 0x3000121, MAP_7_TTC_TREASURE_TROVE_COVE); //snippet - spawnableActorList_addIfMapVisited(&D_803670DC, actor_new, 0x30000a0, MAP_7_TTC_TREASURE_TROVE_COVE); //black_snippet - spawnableActorList_addIfMapVisited(&D_80367100, actor_new, 0x3001021, MAP_7_TTC_TREASURE_TROVE_COVE); //mutie_snippet - spawnableActorList_addIfMapVisited(&D_80372870, actor_new, 0x2800820, MAP_40_CCW_HUB); //clucker - spawnableActorList_addIfMapVisited(&D_803728A0, actor_new, 0x2000981, MAP_12_GV_GOBIS_VALLEY); //scarab - spawnableActorList_addIfMapVisited(&chSnowman, actor_new, 0x2000460, MAP_27_FP_FREEZEEZY_PEAK); //sirslush + spawnableActorList_add(&D_80367160, actor_new, ACTOR_FLAG_NONE); //cutscene Trigger? + spawnableActorList_add(&D_803675F0, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_80366090, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_803660B4, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_803674E0, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chBeehive, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80367310, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80367390, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&chJinjoYellow, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chJinjoOrange, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chJinjoBlue, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chJinjoPink, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&chJinjoGreen, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_803662A8, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_21); + spawnableActorList_add(&chJigsawDance, actor_new, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80367C60, actor_new, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80367A20, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80366C80, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_21); //chhoneycarrier + spawnableActorList_add(&D_80366CA4, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_21); //chhoney + spawnableActorList_add(&D_80366C50, actor_new, ACTOR_FLAG_UNKNOWN_21); //music_note + spawnableActorList_add(&D_80367D00, actor_new, ACTOR_FLAG_UNKNOWN_21); //egg + spawnableActorList_add(&D_80366340, func_802C8A54, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80366364, func_802C8AA8, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80366388, func_802C8AF8, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_803663AC, func_802C8B4C, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_803663D0, func_802C8BA8, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_803663F4, func_802C8C04, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80367AB0, func_802D7558, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80367AD4, func_802D75B4, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80367AF8, func_802D7610, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&chTrainers, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80365F60, actor_new, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&D_80365F84, actor_new, ACTOR_FLAG_UNKNOWN_2); //turbotrainers + spawnableActorList_add(&D_80367184, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&chExtraLife, actor_new, ACTOR_FLAG_UNKNOWN_21); //extralife + spawnableActorList_add(&D_80365FB0, actor_new, ACTOR_FLAG_UNKNOWN_2); //shrapnel + spawnableActorList_add(&chBadShad, actor_new, ACTOR_FLAG_UNKNOWN_2); //chbadshad + spawnableActorList_add(&D_803685A0, actor_new, ACTOR_FLAG_UNKNOWN_6); //mumbotoken + spawnableActorList_add(&D_80367F30, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&chBubble, actor_new, ACTOR_FLAG_UNKNOWN_2); + spawnableActorList_add(&chGloop, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7); //gloop + spawnableActorList_add(&chShockJump, actor_new, ACTOR_FLAG_NONE); //chshockjump + spawnableActorList_add(&chFlightPad, actor_new, ACTOR_FLAG_NONE); //flight_pad + spawnableActorList_add(&D_80367D24, actor_new, ACTOR_FLAG_UNKNOWN_21); //redfeather + spawnableActorList_add(&D_80367D48, actor_new, ACTOR_FLAG_UNKNOWN_21); //goldfeather + spawnableActorList_add(&D_80367C90, actor_new, ACTOR_FLAG_UNKNOWN_2); //spent_redfeather + spawnableActorList_add(&D_80367CB4, actor_new, ACTOR_FLAG_UNKNOWN_2); //spent_goldfeather + spawnableActorList_add(&gChMole, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); //bottles + spawnableActorList_add(&D_80367E20, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6); //chmolehill + spawnableActorList_add(&D_80373DC0, actor_new, ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_80367E70, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&gChSnacker, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_16); //snacker + spawnableActorList_add(&D_80366EF0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_17); //large_shadow + spawnableActorList_add(&D_80367B20, actor_new, ACTOR_FLAG_UNKNOWN_7); //chclimbbase + spawnableActorList_add(&D_80367BA4, actor_new, ACTOR_FLAG_UNKNOWN_6); //gold_bullion + spawnableActorList_add(&D_80367B80, actor_new, ACTOR_FLAG_UNKNOWN_1); //orange + spawnableActorList_add(&D_80372970, actor_new, ACTOR_FLAG_UNKNOWN_7); //leaf_particle + spawnableActorList_add(&D_80372994, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_803729B8, actor_new, ACTOR_FLAG_UNKNOWN_7); //rain + spawnableActorList_add(&D_803729DC, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80372A00, actor_new, ACTOR_FLAG_UNKNOWN_7); //snow + spawnableActorList_add(&D_80372A24, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80372A48, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80372A6C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&chMinigame, actor_new, ACTOR_FLAG_UNKNOWN_7); //boombox + spawnableActorList_add(&D_803677A8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); //ice_key + spawnableActorList_add(&D_80367814, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); //SnS_egg + spawnableActorList_add(&gChFireFxInfo, actor_new, ACTOR_FLAG_NONE); //fire + spawnableActorList_add(&D_80367838, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); //level_entry_disk + spawnableActorList_add(&D_80367760, actor_new, ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_80367784, actor_new, ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_80365E58, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_17); //banjo.without_right_hand + spawnableActorList_add(&D_80365EAC, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_17); //banjo.playing_gameboy + spawnableActorList_add(&D_80365F00, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_17); //banjo.cooking + spawnableActorList_add(&D_803677CC, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15);//mumbo_transform_pad + spawnableActorList_add(&D_803677F0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803731B0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&chSnowball, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_20);//snowball + spawnableActorList_add(&chSnowmanHat, actor_new, ACTOR_FLAG_UNKNOWN_2);//sir_slush_hat + spawnableActorList_add(&gChDripsInfo, actor_new, ACTOR_FLAG_UNKNOWN_10);//water_drops + spawnableActorList_add(&D_80372BA4, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_25);//ice_cube + spawnableActorList_add(&D_8036804C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//GAME_OVER + spawnableActorList_add(&D_8036807C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//THE_END + spawnableActorList_add(&D_803680AC, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//player_KAZOOIE + spawnableActorList_add(&chOverlayCopyrightDescription, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//copyright_info + spawnableActorList_add(&D_80368124, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//PRESS_START + spawnableActorList_add(&chBottlesBonusDescription, chBottlesBonus_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//jiggy_picture + spawnableActorList_add(&D_8036833C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22); + spawnableActorList_add(&D_8036838C, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22); + spawnableActorList_add(&D_80368418, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//banjos_hand_BB + spawnableActorList_add(&D_80368174, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_22);//NO_CONTROLLER); + spawnableActorList_add(&D_80367530, actor_new, ACTOR_FLAG_NONE);//mumbo_token_sign.5 + spawnableActorList_add(&D_80367554, actor_new, ACTOR_FLAG_NONE);//mumbo_toke_sign.10 + spawnableActorList_add(&D_80367578, actor_new, ACTOR_FLAG_NONE);//mumbo_toke_sign.15 + spawnableActorList_add(&D_8036759C, actor_new, ACTOR_FLAG_NONE);//mumbo_toke_sign.20 + spawnableActorList_add(&D_803675C0, actor_new, ACTOR_FLAG_NONE);//mumbo_toke_sign.25 + spawnableActorList_add(&D_8036785C, actor_new, ACTOR_FLAG_NONE);//witch_switch.mm; + spawnableActorList_add(&D_80367880, actor_new, ACTOR_FLAG_NONE);//witch_switch.mmm + spawnableActorList_add(&D_803678A4, actor_new, ACTOR_FLAG_NONE);//witch_switch.ttc + spawnableActorList_add(&D_803678C8, actor_new, ACTOR_FLAG_NONE);//witch_switch.rbb + spawnableActorList_add(&D_803678EC, actor_new, ACTOR_FLAG_NONE);//witch_switch.ccw + spawnableActorList_add(&D_80367910, actor_new, ACTOR_FLAG_NONE);//witch_switch.fp + spawnableActorList_add(&D_80367934, actor_new, ACTOR_FLAG_NONE);//witch_switch.cc + spawnableActorList_add(&D_80367958, actor_new, ACTOR_FLAG_NONE);//witch_switch.bgs + spawnableActorList_add(&D_8036797C, actor_new, ACTOR_FLAG_UNKNOWN_10);//witch_switch.gv + spawnableActorList_add(&D_80368450, actor_new, ACTOR_FLAG_UNKNOWN_17);//fire_sparkle + spawnableActorList_add(&D_803684BC, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8);//roysten + spawnableActorList_add(&D_803684E0, actor_new, ACTOR_FLAG_NONE);//cuckoo_clock + spawnableActorList_add(&D_80368504, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80368528, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8036854C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80368570, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80368474, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80368498, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_803732E0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80372810, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_23); + spawnableActorList_add(&D_80373100, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_23 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80373134, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80373158, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_11); + spawnableActorList_add(&D_80372EE0, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_addIfMapVisited(&chTermite, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25, MAP_2_MM_MUMBOS_MOUNTAIN); //ticker + spawnableActorList_addIfMapVisited(&D_80372C80, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25, MAP_31_RBB_RUSTY_BUCKET_BAY); //floatsam + spawnableActorList_addIfMapVisited(&D_80372C18, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17, MAP_1B_MMM_MAD_MONSTER_MANSION); //teehee + spawnableActorList_addIfMapVisited(&D_80372FC0, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25, MAP_1B_MMM_MAD_MONSTER_MANSION); + spawnableActorList_addIfMapVisited(&D_80372FE4, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25, MAP_1B_MMM_MAD_MONSTER_MANSION); + spawnableActorList_addIfMapVisited(&D_803730D8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_21 |ACTOR_FLAG_UNKNOWN_25, MAP_1B_MMM_MAD_MONSTER_MANSION); //nibbly + spawnableActorList_addIfMapVisited(&D_80367130, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_25, MAP_D_BGS_BUBBLEGLOOP_SWAMP); //buzzbomb + spawnableActorList_addIfMapVisited(&D_80372B80, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_25, MAP_27_FP_FREEZEEZY_PEAK); + spawnableActorList_addIfMapVisited(&chShrapnelDescription, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_25, MAP_7_TTC_TREASURE_TROVE_COVE); //scrapnel + spawnableActorList_addIfMapVisited(&D_80372D78, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_24 | ACTOR_FLAG_UNKNOWN_25, MAP_1B_MMM_MAD_MONSTER_MANSION); //limbo + spawnableActorList_addIfMapVisited(&D_80372DF8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25, MAP_31_RBB_RUSTY_BUCKET_BAY); //grublin_hood + spawnableActorList_addIfMapVisited(&D_80372E78, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_24 | ACTOR_FLAG_UNKNOWN_25, MAP_12_GV_GOBIS_VALLEY); //mummum + spawnableActorList_addIfMapVisited(&D_80372840, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_23 |ACTOR_FLAG_UNKNOWN_25, MAP_B_CC_CLANKERS_CAVERN); //grillchompa + spawnableActorList_addIfMapVisited(&D_803670B8, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_24 | ACTOR_FLAG_UNKNOWN_25, MAP_7_TTC_TREASURE_TROVE_COVE); //snippet + spawnableActorList_addIfMapVisited(&D_803670DC, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_24 | ACTOR_FLAG_UNKNOWN_25, MAP_7_TTC_TREASURE_TROVE_COVE); //black_snippet + spawnableActorList_addIfMapVisited(&D_80367100, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_24 | ACTOR_FLAG_UNKNOWN_25, MAP_7_TTC_TREASURE_TROVE_COVE); //mutie_snippet + spawnableActorList_addIfMapVisited(&D_80372870, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_23 |ACTOR_FLAG_UNKNOWN_25, MAP_40_CCW_HUB); //clucker + spawnableActorList_addIfMapVisited(&D_803728A0, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_25, MAP_12_GV_GOBIS_VALLEY); //scarab + spawnableActorList_addIfMapVisited(&chSnowman, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_25, MAP_27_FP_FREEZEEZY_PEAK); //sirslush switch(loaded_asm_file){ default: break; @@ -387,9 +387,9 @@ void spawnQueue_reset(void){ break; case OVERLAY_9_SNOW: FP_func_80391324(); - spawnableActorList_add(&D_80367BC8, actor_new, 0x8); - spawnableActorList_add(&D_80367BEC, actor_new, 0x8); - spawnableActorList_add(&D_80367C10, actor_new, 0x8); + spawnableActorList_add(&D_80367BC8, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_80367BEC, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_80367C10, actor_new, ACTOR_FLAG_UNKNOWN_3); break; case OVERLAY_A_TREE: CCW_func_8038DB6C(); diff --git a/src/cutscenes/code_60F0.c b/src/cutscenes/code_60F0.c index 0d6255b9..dca112f6 100644 --- a/src/cutscenes/code_60F0.c +++ b/src/cutscenes/code_60F0.c @@ -1,6 +1,7 @@ #include #include "functions.h" #include "variables.h" +#include "actor.h" extern void func_802E07E0(Actor *); extern Actor* func_802E0738(ActorMarker *, Gfx **, Mtx**, Vtx **); @@ -606,82 +607,82 @@ ActorInfo D_8038E6D4 = void cutscene_func_8038C4E0(void){ - spawnableActorList_add(&D_8038DC90, actor_new, 0X40); - spawnableActorList_add(&D_8038DCFC, actor_new, 0X140); - spawnableActorList_add(&D_8038DCD8, actor_new, 0X2000); - spawnableActorList_add(&D_8038DCB4, actor_new, 0X2000); - spawnableActorList_add(&D_8038DD20, actor_new, 0X100); - spawnableActorList_add(&D_8038DD44, actor_new, 8); - spawnableActorList_add(&D_8038DD68, actor_new, 0X48); - spawnableActorList_add(&D_8038DD8C, actor_new, 0); - spawnableActorList_add(&D_8038DDB0, actor_new, 0); - spawnableActorList_add(&D_8038DDD4, actor_new, 0); - spawnableActorList_add(&D_8038DDF8, actor_new, 0); - spawnableActorList_add(&D_8038DE1C, actor_new, 0); - spawnableActorList_add(&D_8038DE40, actor_new, 0); - spawnableActorList_add(&D_8038DE64, actor_new, 0); - spawnableActorList_add(&D_8038DE88, actor_new, 0); - spawnableActorList_add(&D_8038DEAC, actor_new, 0); - spawnableActorList_add(&D_8038DED0, actor_new, 0X8648); - spawnableActorList_add(&D_8038DEF4, actor_new, 0); - spawnableActorList_add(&D_8038DF18, actor_new, 0); - spawnableActorList_add(&D_8038DF3C, actor_new, 0); - spawnableActorList_add(&D_8038DF60, actor_new, 0X2008); - spawnableActorList_add(&D_8038DF84, actor_new, 0); - spawnableActorList_add(&D_8038DFA8, actor_new, 0X148); - spawnableActorList_add(&D_8038DFCC, actor_new, 0); - spawnableActorList_add(&D_8038DFF0, actor_new, 0X8748); - spawnableActorList_add(&D_8038E014, actor_new, 0X140); - spawnableActorList_add(&D_8038E038, actor_new, 8); - spawnableActorList_add(&D_8038E05C, actor_new, 8); - spawnableActorList_add(&D_8038E080, actor_new, 8); - spawnableActorList_add(&D_8038E0A4, actor_new, 0X8608); - spawnableActorList_add(&D_8038E0C8, actor_new, 0); - spawnableActorList_add(&D_8038E0EC, actor_new, 0X8748); - spawnableActorList_add(&D_8038E110, actor_new, 0X3008); - spawnableActorList_add(&D_8038E134, actor_new, 0X140); - spawnableActorList_add(&D_8038E158, actor_new, 0X40); - spawnableActorList_add(&D_8038E17C, actor_new, 0X1000); - spawnableActorList_add(&D_8038E1A0, actor_new, 0X140); - spawnableActorList_add(&D_8038E1C4, actor_new, 8); - spawnableActorList_add(&D_8038E1E8, actor_new, 0X8608); - spawnableActorList_add(&D_8038E20C, actor_new, 0X8608); - spawnableActorList_add(&D_8038E230, actor_new, 0X40); - spawnableActorList_add(&D_8038E254, actor_new, 8); - spawnableActorList_add(&D_8038E278, actor_new, 0); - spawnableActorList_add(&D_8038E29C, actor_new, 0X100); - spawnableActorList_add(&D_8038E2C0, actor_new, 0); - spawnableActorList_add(&D_8038E2E4, actor_new, 0); - spawnableActorList_add(&D_8038E308, actor_new, 0X8608); - spawnableActorList_add(&D_8038E32C, actor_new, 0); - spawnableActorList_add(&D_8038E350, actor_new, 0X8608); - spawnableActorList_add(&D_8038E374, actor_new, 0X100); - spawnableActorList_add(&D_8038E398, actor_new, 0X1048); - spawnableActorList_add(&D_8038E3BC, actor_new, 0X100); - spawnableActorList_add(&D_8038E3E0, actor_new, 0X140); - spawnableActorList_add(&D_8038E404, actor_new, 0X40); - spawnableActorList_add(&D_8038E428, actor_new, 0X1000); - spawnableActorList_add(&D_8038E44C, actor_new, 0X40); - spawnableActorList_add(&D_8038E470, actor_new, 0X9608); - spawnableActorList_add(&D_8038E494, actor_new, 0X100); - spawnableActorList_add(&D_8038E4B8, actor_new, 0X40); - spawnableActorList_add(&D_8038E4DC, actor_new, 0X40); - spawnableActorList_add(&D_8038E500, actor_new, 0); - spawnableActorList_add(&D_8038E524, actor_new, 0X100); - spawnableActorList_add(&D_8038E548, actor_new, 0X9600); - spawnableActorList_add(&D_8038E56C, actor_new, 0); - spawnableActorList_add(&D_8038E590, actor_new, 0X8748); - spawnableActorList_add(&D_8038E5B4, actor_new, 0X8608); - spawnableActorList_add(&D_8038E5D8, actor_new, 0); - spawnableActorList_add(&D_8038E5FC, actor_new, 0); - spawnableActorList_add(&D_8038E620, actor_new, 0); - spawnableActorList_add(&D_8038E644, actor_new, 0); - spawnableActorList_add(&D_8038E668, actor_new, 0); - spawnableActorList_add(&D_8038E68C, actor_new, 0); - spawnableActorList_add(&D_8038E6B0, actor_new, 0); - spawnableActorList_add(&D_8038E6D4, actor_new, 0); - spawnableActorList_add(&D_80366CD0, actor_new, 0); - spawnableActorList_add(&D_8038E718, actor_new, 2); - spawnableActorList_add(&D_8038E7A0, actor_new, 0X8648); - spawnableActorList_add(&D_8038E8A8, actor_new, 2); + spawnableActorList_add(&D_8038DC90, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038DCFC, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038DCD8, actor_new, ACTOR_FLAG_UNKNOWN_13); + spawnableActorList_add(&D_8038DCB4, actor_new, ACTOR_FLAG_UNKNOWN_13); + spawnableActorList_add(&D_8038DD20, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038DD44, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038DD68, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038DD8C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DDB0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DDD4, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DDF8, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DE1C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DE40, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DE64, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DE88, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DEAC, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DED0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038DEF4, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DF18, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DF3C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DF60, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_13); + spawnableActorList_add(&D_8038DF84, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DFA8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038DFCC, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038DFF0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E014, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E038, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038E05C, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038E080, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038E0A4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E0C8, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E0EC, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E110, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_13); + spawnableActorList_add(&D_8038E134, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E158, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E17C, actor_new, ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_8038E1A0, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E1C4, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038E1E8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E20C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E230, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E254, actor_new, ACTOR_FLAG_UNKNOWN_3); + spawnableActorList_add(&D_8038E278, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E29C, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E2C0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E2E4, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E308, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E32C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E350, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E374, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E398, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_8038E3BC, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E3E0, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E404, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E428, actor_new, ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_8038E44C, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E470, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E494, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E4B8, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E4DC, actor_new, ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_8038E500, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E524, actor_new, ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_8038E548, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E56C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E590, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E5B4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E5D8, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E5FC, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E620, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E644, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E668, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E68C, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E6B0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E6D4, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80366CD0, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_8038E718, actor_new, ACTOR_FLAG_UNKNOWN_1); + spawnableActorList_add(&D_8038E7A0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8038E8A8, actor_new, ACTOR_FLAG_UNKNOWN_1); } diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index 57f4dfab..9ee82135 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -133,7 +133,7 @@ void chbossjinjo_spawnParticles(Actor *this, enum asset_e arg1, enum asset_e arg void chbossjinjo_spawnAttackParticles(Actor *this){ s32 sparkle_sprite_id; s32 smoke_sprite_id; - switch(this->marker->unk14_20){ + switch(this->marker->id){ default: sparkle_sprite_id = ASSET_718_SPRITE_SPARKLE_WHITE_2; smoke_sprite_id = ASSET_6C2_SPRITE_SMOKE_WHITE; @@ -374,7 +374,7 @@ void chBossJinjo_func_8038D014(Actor *this){ func_8030E6A4(0x3ee, randf2(1.0f, 1.15f), 32000); timed_playSfx(0.1f, 0x416, 0.6f, 32000); marker_despawn(this->marker); - switch (this->marker->unk14_20) + switch (this->marker->id) { case MARKER_27B_BOSS_JINJO_ORANGE: temp_a1 = 0x557; diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index d707abfe..12152f0e 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -1586,7 +1586,7 @@ ActorMarker *chfinalboss_findCollidingJinjo(Actor *this, f32 arg1) { while(prop !=NULL){ if (prop->markerFlag){ jinjo = marker_getActor(prop->actorProp.marker); - jinjo_marker_id = jinjo->marker->unk14_20; + jinjo_marker_id = jinjo->marker->id; if( (jinjo_marker_id == MARKER_27B_BOSS_JINJO_ORANGE) || (jinjo_marker_id == MARKER_27C_BOSS_JINJO_GREEN) @@ -1637,7 +1637,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) { chfinalboss_phase4_setState(this, 0x20); } else{ - temp_t6 = marker_getActor(sp6C)->marker->unk14_20; + temp_t6 = marker_getActor(sp6C)->marker->id; if ((temp_t6 == MARKER_27B_BOSS_JINJO_ORANGE) || (temp_t6 == MARKER_27E_BOSS_JINJO_YELLOW)) { local->mirror_phase5 = FALSE; } else { @@ -1851,7 +1851,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { sp38 = 0x14; sp34 = animctrl_getAnimTimer(this->animctrl); jinjonator_marker = chfinalboss_findCollidingJinjo(this, func_8033229C(this->marker) / 3.0f); - if ((jinjonator_marker != NULL) && (jinjonator_marker->unk14_20 == MARKER_285_JINJONATOR)) { + if ((jinjonator_marker != NULL) && (jinjonator_marker->id == MARKER_285_JINJONATOR)) { if (chjinjonator_8039125C(jinjonator_marker)) { __chFinalBossJinjonatorHits++; if (local->mirror_phase5) { @@ -2054,29 +2054,29 @@ bool func_8038B834(ActorMarker *marker, ActorMarker * arg1) { switch (local->phase) { case 1: if ((this->state == 6) || (this->state == 7)) { - marker->unk14_20 = 0x260; + marker->id = 0x260; } else { - marker->unk14_20 = 0x25E; + marker->id = 0x25E; } break; case 2: if (local->unkA == 0) { - marker->unk14_20 = 0x260; + marker->id = 0x260; } else { - marker->unk14_20 = 0x281; + marker->id = 0x281; } break; case 3: - marker->unk14_20 = 0x282; + marker->id = 0x282; break; case 4: - marker->unk14_20 = 0x283; + marker->id = 0x283; break; case 5: - marker->unk14_20 = 0x283; + marker->id = 0x283; break; default: - marker->unk14_20 = 0x25E; + marker->id = 0x25E; break; } return TRUE; diff --git a/src/fight/chspellbarrier.c b/src/fight/chspellbarrier.c index 99009fed..8777a948 100644 --- a/src/fight/chspellbarrier.c +++ b/src/fight/chspellbarrier.c @@ -88,7 +88,7 @@ void chspellbarrier_update(Actor *this){ }//L8038E97C jinjo_marker = chfinalboss_findCollidingJinjo(this, 600.0f); if(jinjo_marker){ - if(jinjo_marker->unk14_20 == MARKER_285_JINJONATOR){ + if(jinjo_marker->id == MARKER_285_JINJONATOR){ marker_despawn(this->marker); chfinalboss_spellBarrierInactive(); return; diff --git a/src/fight/chspellfireball.c b/src/fight/chspellfireball.c index 1dac6dca..2a78770f 100644 --- a/src/fight/chspellfireball.c +++ b/src/fight/chspellfireball.c @@ -184,7 +184,7 @@ void func_8038F084(ActorMarker *marker){ timedFunc_set_0(0.3f, func_8038F050); actor->unk58_0 = 0; actor->scale *= 1.6; - if(actor->marker->unk14_20 != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ + if(actor->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ chSpellFireball_emitSparkles(actor->position, 4, ASSET_713_SPRITE_SPARKLE_YELLOW, D_80391C0C, D_80391C24, D_80391C3C, D_80391C54, D_80391C64, D_80391C74 @@ -220,9 +220,9 @@ void func_8038F084(ActorMarker *marker){ } void func_8038F3B4(ActorMarker *marker, ActorMarker *other){ - if( other->unk14_20 == 0x276 - || other->unk14_20 == 0x27A - || other->unk14_20 == 0x27F + if( other->id == 0x276 + || other->id == 0x27A + || other->id == 0x27F ) return; func_8038F084(marker); @@ -283,7 +283,7 @@ void func_8038F620(Actor *this){ actor_collisionOn(this); this->unk60 = 8.0f; this->scale = 0.1f; - if( this->marker->unk14_20 == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ + if( this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ actor_collisionOff(this); marker_setFreeMethod(this->marker, func_8038F5F8); func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 32000); @@ -303,7 +303,7 @@ void func_8038F620(Actor *this){ ); } }//L8038F79C - if(D_803928E5 && this->marker->unk14_20 == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ + if(D_803928E5 && this->marker->id == MARKER_280_GRUNTY_SPELL_GREEN_ATTACK){ ncStaticCamera_rotateToTarget(this->position); }//L8038F7D4 @@ -312,7 +312,7 @@ void func_8038F620(Actor *this){ D_80392914 = sp40*1.4; this->scale = (this->scale + D_80392914 < 1.0) ? this->scale + D_80392914 : 1.0f; - switch(this->marker->unk14_20){ + switch(this->marker->id){ case MARKER_25C_GRUNTY_SPELL_FIREBALL://L8038F8AC chSpellFireball_emitExplosion(this->position, ASSET_4A0_SPRITE_EXPLOSION, 1, D_80391CEC, D_80391D34, @@ -359,7 +359,7 @@ void func_8038F620(Actor *this){ } } // L8038FABC - if( this->marker->unk14_20 != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK + if( this->marker->id != MARKER_280_GRUNTY_SPELL_GREEN_ATTACK && func_8028F25C() ){ func_8038F084(this->marker); diff --git a/src/fight/code_0.c b/src/fight/code_0.c index bd57eed5..03421b13 100644 --- a/src/fight/code_0.c +++ b/src/fight/code_0.c @@ -3,24 +3,25 @@ #include "variables.h" #include "prop.h" #include "fight.h" +#include "actor.h" u8 pad_fight_80392740[0x10]; void fight_func_803863F0(void) { - spawnableActorList_add(&chSpellFireball, actor_new, 0X108444); - spawnableActorList_add(&chGreenBlast, actor_new, 0X108444); - spawnableActorList_add(&chFinalBoss, actor_new, 0X300468); - spawnableActorList_add(&chBossJinjoOrange, actor_new, 0X8464); - spawnableActorList_add(&chBossJinjoGreen, actor_new, 0X8464); - spawnableActorList_add(&chBossJinjoPink, actor_new, 0X8464); - spawnableActorList_add(&chBossJinjoYellow, actor_new, 0X8464); - spawnableActorList_add(&chStoneJinjo, actor_new, 0X20004); - spawnableActorList_add(&chBossJinjoBase, actor_new, 0X800100C); - spawnableActorList_add(&chJinjonatorBase, actor_new, 0X8009404); - spawnableActorList_add(&chSpellGreen, actor_new, 0X108444); - spawnableActorList_add(&chSpellBarrier, actor_new, 0X101404); - spawnableActorList_add(&chFightFlightPad, actor_new, 0X100404); - spawnableActorList_add(&chJinjonator, actor_new, 0X9464); - spawnableActorList_add(&chBossShadow, actor_new, 0X100404); + spawnableActorList_add(&chSpellFireball, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20); + spawnableActorList_add(&chGreenBlast, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20); + spawnableActorList_add(&chFinalBoss, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_20 | ACTOR_FLAG_UNKNOWN_21); + spawnableActorList_add(&chBossJinjoOrange, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&chBossJinjoGreen, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&chBossJinjoPink, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&chBossJinjoYellow, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&chStoneJinjo, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&chBossJinjoBase, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_27); + spawnableActorList_add(&chJinjonatorBase, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_27); + spawnableActorList_add(&chSpellGreen, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_20); + spawnableActorList_add(&chSpellBarrier, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_20); + spawnableActorList_add(&chFightFlightPad, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_20); + spawnableActorList_add(&chJinjonator, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&chBossShadow, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_20); } diff --git a/src/lair/code_0.c b/src/lair/code_0.c index bdfb5ddd..91a2ad31 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -1,8 +1,8 @@ #include #include "functions.h" #include "variables.h" - #include "prop.h" +#include "actor.h" extern void func_8028F918(s32); extern void func_802D2FB0(Actor *, s32, s32, s32, f32, s32, s32, s32); @@ -1843,74 +1843,74 @@ void func_8038A0A4(Actor *this) void lair_func_8038A0C4(void) { - spawnableActorList_add(&D_80392F40, actor_new, 0x18628); - spawnableActorList_add(&D_80392F64, actor_new, 0x18608); - spawnableActorList_add(&D_803932E8, actor_new, 0x8600); - spawnableActorList_add(&D_80393408, actor_new, 0x96C0); - spawnableActorList_add(&D_80392F88, actor_new, 0x8600); - spawnableActorList_add(&D_80392FAC, actor_new, 0x8600); - spawnableActorList_add(&D_80392FD0, actor_new, 0x8600); - spawnableActorList_add(&D_80393018, actor_new, 0x8600); - spawnableActorList_add(&D_8039303C, actor_new, 0x8600); - spawnableActorList_add(&D_80393060, actor_new, 0x8604); - spawnableActorList_add(&D_803931EC, actor_new, 0x8600); - spawnableActorList_add(&D_80393210, actor_new, 0x8600); - spawnableActorList_add(&D_80392EF8, actor_new, 0x8600); - spawnableActorList_add(&D_8039339C, actor_new, 0x8600); - spawnableActorList_add(&D_803933C0, actor_new, 0x8600); - spawnableActorList_add(&D_80392DB4, actor_new, 0x8608); - spawnableActorList_add(&D_80392DD8, actor_new, 0x8608); - spawnableActorList_add(&D_80392DFC, actor_new, 0x8608); - spawnableActorList_add(&D_80392E20, actor_new, 0x8608); - spawnableActorList_add(&D_80392E44, actor_new, 0x8608); - spawnableActorList_add(&D_80392E68, actor_new, 0x8608); - spawnableActorList_add(&D_80392E8C, actor_new, 0x8608); - spawnableActorList_add(&D_803930F0, actor_new, 0x8600); - spawnableActorList_add(&D_80393234, actor_new, 0x8600); - spawnableActorList_add(&D_80393258, actor_new, 0x8600); - spawnableActorList_add(&D_80392FF4, actor_new, 0x8600); - spawnableActorList_add(&D_8039327C, actor_new, 0x8600); - spawnableActorList_add(&D_803932A0, actor_new, 0x8600); - spawnableActorList_add(&D_803932C4, actor_new, 0x8600); - spawnableActorList_add(&D_8039315C, actor_new, 0x8600); - spawnableActorList_add(&D_80393180, actor_new, 0x8600); - spawnableActorList_add(&D_803931A4, actor_new, 0x8600); - spawnableActorList_add(&D_8039330C, actor_new, 0x8600); - spawnableActorList_add(&D_80393330, actor_new, 0x8600); - spawnableActorList_add(&D_80393114, actor_new, 0); - spawnableActorList_add(&D_80393138, actor_new, 0x8600); - spawnableActorList_add(&D_803930CC, actor_new, 0x8600); - spawnableActorList_add(&D_803931C8, actor_new, 0x28600); - spawnableActorList_add(&D_80393560, actor_new, 0x97AA); - spawnableActorList_add(&D_80393584, actor_new, 0x87AA); - spawnableActorList_add(&D_803933E4, actor_new, 0x8608); - spawnableActorList_add(&D_80393378, actor_new, 0x8640); - spawnableActorList_add(&D_803947B0, actor_new, 0xA1480); - spawnableActorList_add(&D_803947D4, actor_new, 0xA1480); - spawnableActorList_add(&chBrentilda, actor_new, 0x140); - spawnableActorList_add(&D_80394A80, actor_new, 0); - spawnableActorList_add(&D_80394AB0, actor_new, 0x44); - spawnableActorList_add(&D_80392EB0, actor_new, 0x8608); - spawnableActorList_add(&D_80393084, actor_new, 0x8680); - spawnableActorList_add(&D_80392ED4, actor_new, 0x8608); - spawnableActorList_add(&D_803930A8, actor_new, 0xC680); - spawnableActorList_add(&D_80394870, actor_new, 0x1A0); - spawnableActorList_add(&D_80394894, actor_new, 0x1A0); - spawnableActorList_add(&D_803948B8, actor_new, 0x1A0); - spawnableActorList_add(&D_80394910, actor_new, 0x10C0); - spawnableActorList_add(&D_80394934, actor_new, 200); - spawnableActorList_add(&D_80394958, actor_new, 200); - spawnableActorList_add(&D_80392F1C, actor_new, 0x8608); - spawnableActorList_add(&D_80394A08, actor_new, 0x2010129); - spawnableActorList_add(&D_80394A2C, actor_new, 0x2010129); - spawnableActorList_add(&D_80394A50, actor_new, 0x2010129); - spawnableActorList_add(&D_80394980, actor_new, 0x80); - spawnableActorList_add(&D_80394C28, actor_new, 0x400); - spawnableActorList_add(&D_80394C4C, actor_new, 0x400); - spawnableActorList_add(&D_80394C70, actor_new, 0x400); - spawnableActorList_add(&D_80394D20, actor_new, 0); - spawnableActorList_add(&D_80394CF0, actor_new, 0x80508); - spawnableActorList_add(&D_80394C94, actor_new, 0x500); - spawnableActorList_add(&D_80393354, actor_new, 0x8602); - spawnableActorList_add(&lair_D_80392D90, actor_new, 0x20000); + spawnableActorList_add(&D_80392F40, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_16); + spawnableActorList_add(&D_80392F64, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_16); + spawnableActorList_add(&D_803932E8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393408, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392F88, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392FAC, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392FD0, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393018, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8039303C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393060, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803931EC, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393210, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392EF8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8039339C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803933C0, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392DB4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392DD8, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392DFC, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392E20, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392E44, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392E68, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392E8C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803930F0, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393234, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393258, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392FF4, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8039327C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803932A0, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803932C4, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8039315C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393180, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803931A4, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_8039330C, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393330, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393114, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80393138, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803930CC, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803931C8, actor_new, ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15 | ACTOR_FLAG_UNKNOWN_17); + spawnableActorList_add(&D_80393560, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393584, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803933E4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393378, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803947B0, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_803947D4, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_12 | ACTOR_FLAG_UNKNOWN_17 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&chBrentilda, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_80394A80, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80394AB0, actor_new, ACTOR_FLAG_UNKNOWN_2 | ACTOR_FLAG_UNKNOWN_6); + spawnableActorList_add(&D_80392EB0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80393084, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80392ED4, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_803930A8, actor_new, ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_14 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80394870, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_80394894, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_803948B8, actor_new, ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8); + spawnableActorList_add(&D_80394910, actor_new, ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_12); + spawnableActorList_add(&D_80394934, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80394958, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_6 | ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80392F1C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&D_80394A08, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80394A2C, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80394A50, actor_new, ACTOR_FLAG_UNKNOWN_0 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_5 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_16 | ACTOR_FLAG_UNKNOWN_25); + spawnableActorList_add(&D_80394980, actor_new, ACTOR_FLAG_UNKNOWN_7); + spawnableActorList_add(&D_80394C28, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80394C4C, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80394C70, actor_new, ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80394D20, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&D_80394CF0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_19); + spawnableActorList_add(&D_80394C94, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80393354, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); + spawnableActorList_add(&lair_D_80392D90, actor_new, ACTOR_FLAG_UNKNOWN_17); } diff --git a/src/lair/code_9C40.c b/src/lair/code_9C40.c index d5a9d9bc..1bc77511 100644 --- a/src/lair/code_9C40.c +++ b/src/lair/code_9C40.c @@ -42,7 +42,7 @@ void lair_func_803900DC(ActorMarker *marker, enum asset_e text_id, s32 arg2){ void func_803900EC(ActorMarker *marker, enum asset_e text_id, s32 arg2){ s32 sp1C; - sp1C = marker->unk14_20 - 0x16D; + sp1C = marker->id - 0x16D; func_8028F918(0); if (!fileProgressFlag_get(sp1C + 0xAD)) { fileProgressFlag_set(sp1C + 0xAD, 1); @@ -52,7 +52,7 @@ void func_803900EC(ActorMarker *marker, enum asset_e text_id, s32 arg2){ s32 func_80390158(ActorMarker *marker, enum asset_e text_id, s32 arg2){ s32 phi_v1; - phi_v1 = marker->unk14_20 - 0x16D; + phi_v1 = marker->id - 0x16D; return phi_v1; } @@ -61,7 +61,7 @@ void func_80390174(ActorMarker *marker, s32 arg1) { s32 sp28; this = marker_getActor(marker); - sp28 = this->marker->unk14_20 - 0x16D; + sp28 = this->marker->id - 0x16D; func_8028F94C(2, this->position); if (fileProgressFlag_get(sp28 + 0xAD)) { func_80311480(sp28 + 0xF83, 0xE, this->position, this->marker, func_803900EC, lair_func_803900DC); @@ -88,7 +88,7 @@ void func_803902B8(Actor *this) { s32 sp54; s32 sp3C[6]; - sp54 = this->marker->unk14_20 - 0x16D; + sp54 = this->marker->id - 0x16D; if (!this->initialized) { marker_setFreeMethod(this->marker, func_80390298); this->unk138_24 = func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE); diff --git a/src/lair/code_A170.c b/src/lair/code_A170.c index 783cb3e8..1beb16a4 100644 --- a/src/lair/code_A170.c +++ b/src/lair/code_A170.c @@ -32,7 +32,7 @@ Actor *func_80390560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } void func_803905CC(ActorMarker *marker, ActorMarker *other_marker){ - switch (marker->unk14_20) { + switch (marker->id) { case 0x170: item_setMaxCount(ITEM_D_EGGS); fxSparkle_giantBlueEgg(&marker->propPtr->x); From b5c7accc37b0b10958b0286c3209de3d00debb62 Mon Sep 17 00:00:00 2001 From: mariob92 <21146795-mariob92@users.noreply.gitlab.com> Date: Sun, 8 Sep 2024 00:55:04 +0200 Subject: [PATCH 6/7] documentations: - added comments - documented marker struct functions --- include/actor.h | 6 +++--- include/functions.h | 2 ++ include/prop.h | 34 +++++++++++++++--------------- src/BGS/ch/code_2270.c | 2 +- src/BGS/ch/mrvile.c | 2 +- src/BGS/code_3420.c | 2 +- src/CC/code_530.c | 2 +- src/CCW/code_14B0.c | 2 +- src/CCW/code_2270.c | 2 +- src/CCW/code_950.c | 2 +- src/GV/ch/gobi1.c | 2 +- src/GV/ch/gobi2.c | 2 +- src/GV/ch/gobirock.c | 2 +- src/GV/ch/mazectrl.c | 2 +- src/GV/code_6370.c | 2 +- src/GV/code_7DB0.c | 1 + src/GV/code_7FF0.c | 2 +- src/RBB/ch/cog.c | 2 +- src/RBB/ch/propellorswitch.c | 2 +- src/RBB/ch/whistleswitch.c | 2 +- src/RBB/code_CA0.c | 2 +- src/core2/ch/bigbutt.c | 6 +++--- src/core2/ch/flotsam.c | 2 +- src/core2/ch/jinjo.c | 2 +- src/core2/ch/soundsource.c | 2 +- src/core2/code_45310.c | 2 +- src/core2/code_509D0.c | 2 +- src/core2/code_59780.c | 2 +- src/core2/code_9E370.c | 36 +++++++++++++++++--------------- src/core2/code_A5BC0.c | 40 ++++++++++++++++++------------------ src/core2/code_D0CA0.c | 2 +- 31 files changed, 90 insertions(+), 83 deletions(-) diff --git a/include/actor.h b/include/actor.h index 0e5892bb..703b026b 100644 --- a/include/actor.h +++ b/include/actor.h @@ -6,7 +6,7 @@ #define ACTOR_FLAG_UNKNOWN_1 (1 << 1) // 0x2 #define ACTOR_FLAG_UNKNOWN_2 (1 << 2) // 0x4 #define ACTOR_FLAG_UNKNOWN_3 (1 << 3) // 0x8 -#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10 +#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10 - only used by GV Jinxy Head 2 #define ACTOR_FLAG_UNKNOWN_5 (1 << 5) // 0x20 #define ACTOR_FLAG_UNKNOWN_6 (1 << 6) // 0x40 #define ACTOR_FLAG_UNKNOWN_7 (1 << 7) // 0x80 @@ -20,11 +20,11 @@ #define ACTOR_FLAG_UNKNOWN_15 (1 << 15) // 0x8000 #define ACTOR_FLAG_UNKNOWN_16 (1 << 16) // 0x10000 #define ACTOR_FLAG_UNKNOWN_17 (1 << 17) // 0x20000 -#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000 +#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000 - never used? #define ACTOR_FLAG_UNKNOWN_19 (1 << 19) // 0x80000 #define ACTOR_FLAG_UNKNOWN_20 (1 << 20) // 0x100000 #define ACTOR_FLAG_UNKNOWN_21 (1 << 21) // 0x200000 -#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000 +#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000 - used by overlay texts #define ACTOR_FLAG_UNKNOWN_23 (1 << 23) // 0x800000 #define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000 #define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000 diff --git a/include/functions.h b/include/functions.h index 983cf825..133b94f7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -559,5 +559,7 @@ extern ActorMarker *marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, in extern s32 asset_getFlag(enum asset_e arg0); extern void spawnableActorList_add(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2); extern void spawnableActorList_addIfMapVisited(ActorInfo *arg0, Actor *(*arg1)(s32[3], s32, ActorInfo *, u32), u32 arg2, enum map_e arg3); +extern void marker_setActorUpdateFunc(ActorMarker *marker, ActorUpdateFunc method); +extern void marker_setActorUpdate2Func(ActorMarker *marker, ActorUpdateFunc method); #endif diff --git a/include/prop.h b/include/prop.h index b6cee62b..7b3f6b7f 100644 --- a/include/prop.h +++ b/include/prop.h @@ -73,20 +73,20 @@ typedef void (*ActorUpdateFunc)(struct actor_s *); typedef void (*ActorFreeFunc)(struct actor_s *); typedef struct actorMarker_s{ - ActorProp* propPtr; - struct cude_s* cubePtr; - MarkerDrawFunc drawFunc; - MarkerCollisionFunc unkC; //ow_func - MarkerCollisionFunc unk10; + ActorProp* propPtr; + struct cude_s* cubePtr; + MarkerDrawFunc drawFunc; + MarkerCollisionFunc collisionFunc; //ow_func + MarkerCollisionFunc collision2Func; u32 yaw:9; u32 unk14_22:1; u32 unk14_21:1; u32 id:10; // marker_id u32 unk14_10:11; //used in ch/jiggy Struct6Cs *unk18; - MarkerCollisionFunc unk1C; //die_func + MarkerCollisionFunc dieFunc; s32 unk20; - ActorUpdateFunc unk24; + ActorUpdateFunc actorUpdateFunc; s32 unk28; u32 actrArrayIdx:11; //unk2C u32 pitch:9; @@ -94,8 +94,8 @@ typedef struct actorMarker_s{ u32 unk2C_2:1; u32 unk2C_1:1; u32 collidable:1; - ActorFreeFunc unk30; //actor free method - s32 unk34; + ActorFreeFunc actorFreeFunc; + ActorUpdateFunc actorUpdate2Func; s16 unk38[3]; u16 pad3E_15:1; u16 modelId:13; @@ -179,9 +179,9 @@ typedef struct actor_s{ u32 modelCacheIndex:10; //modelCacheIndex s32 unk44_14:10; u32 despawn_flag:1; - u32 unk44_2:1; - u32 unk44_1:1; - u32 unk44_0:1; + u32 unk44_2:1; // is set, when actors created inside Cube? + u32 unk44_1:1; // only used by blubber? + u32 unk44_0:1; // unused f32 unk48; //used in chlmonkey (chimpy) f32 unk4C; /* 0x50 */ f32 yaw; //0x50 @@ -236,12 +236,12 @@ typedef struct actor_s{ ActorMarker *unk100; ActorMarker *unk104; Struct62s *unk108; - // void ( *unk108)(struct actorMarker_s *, s32); //saved from marker->unkC + // void ( *unk108)(struct actorMarker_s *, s32); //saved from marker->collisionFunc s32 unk10C; //saved marker->unk10 f32 roll;//110 f32 sound_timer; TUPLE(f32, spawn_position); //0x118 - u32 unk124_31:12; + u32 unk124_31:12; // only used by GV Jinxy Head 2 u32 alpha_124_19:8; u32 unk124_11:2; //blend_mode? u32 depth_mode:2; //render_mode (passed to modelRender_setDepthMode()) @@ -253,7 +253,7 @@ typedef struct actor_s{ f32 scale; /* 0x12C */ struct actor_info_s *actor_info; void (* unk130)(struct actor_s *); - vector(struct2s) **unk134; //vector //saved marker->unk1C + vector(struct2s) **unk134; //vector //saved marker->dieFunc u32 unk138_31:1; u32 unk138_30:1; u32 unk138_29:1; @@ -267,10 +267,10 @@ typedef struct actor_s{ u32 unk138_20:1; u32 unk138_19:10; //saved maker->id u32 unk138_9:1; - u32 unk138_8:1; + u32 unk138_8:1; // set to one by ACTOR_FLAG_UNKNOWN_18, which no actor seems to use u32 unk138_7:4; u32 unk138_3:4; - void (*unk13C)(struct actorMarker_s *);//saved marker->unk30 + ActorFreeFunc backupFreeFunc; // saved marker->actorFreeFunc f32 unk140; f32 unk144; SkeletalAnimation *unk148; diff --git a/src/BGS/ch/code_2270.c b/src/BGS/ch/code_2270.c index d778bbee..e978adb2 100644 --- a/src/BGS/ch/code_2270.c +++ b/src/BGS/ch/code_2270.c @@ -282,7 +282,7 @@ void func_80389080(Actor *this){ sp3C = time_getDelta(); if(!this->unk16C_4){ this->unk16C_4 = 1; - this->marker->unk30 = func_80388FC0; + this->marker->actorFreeFunc = func_80388FC0; marker_setCollisionScripts(this->marker, func_80388E44, NULL, NULL); unqPtr->unk0 = 0; diff --git a/src/BGS/ch/mrvile.c b/src/BGS/ch/mrvile.c index a1b4fd9c..bb1d3839 100644 --- a/src/BGS/ch/mrvile.c +++ b/src/BGS/ch/mrvile.c @@ -339,7 +339,7 @@ void chvile_update(Actor *this) { local = (ActorLocal_MrVile *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = chvile_free; + this->marker->actorFreeFunc = chvile_free; local->unk0 = 0; local->unk4 = assetcache_get(0x3F6); local->game_marker = NULL; diff --git a/src/BGS/code_3420.c b/src/BGS/code_3420.c index 7079b1ef..4fcdf6e1 100644 --- a/src/BGS/code_3420.c +++ b/src/BGS/code_3420.c @@ -626,7 +626,7 @@ void chvilegame_update(Actor *this) { local = (ActorLocal_BGS_3420 *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = &chvilegame_free; + this->marker->actorFreeFunc = &chvilegame_free; local->game_pieces = vector_new(sizeof(struct vilegame_piece), 0x20); local->grumblie_model_bin = assetcache_get(0x3F7); local->unkC = 0; diff --git a/src/CC/code_530.c b/src/CC/code_530.c index 9a6c701b..ac4b4d81 100644 --- a/src/CC/code_530.c +++ b/src/CC/code_530.c @@ -101,7 +101,7 @@ void func_80386B28(Actor *this){ local->unk14 = 0.0f; player_getPosition(&local->unk4); local->unk3 = 3; - marker->unk30 = func_80386AF8; + marker->actorFreeFunc = func_80386AF8; marker->propPtr->unk8_3 = 1; this->position_x = 5700.0f; this->position_y = -2620.0f; diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index 58c67841..bd1fa345 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -71,7 +71,7 @@ void CCW_func_80387A40(Actor *this) { sp68 = time_getDelta(); if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = CCW_func_80387A20; + this->marker->actorFreeFunc = CCW_func_80387A20; local->unk4 = &D_8038EC00[0]; while((local->unk4->unk0 != 0) && (map_get() != local->unk4->unk0)) { local->unk4++; diff --git a/src/CCW/code_2270.c b/src/CCW/code_2270.c index 62464cb6..44ec5ab0 100644 --- a/src/CCW/code_2270.c +++ b/src/CCW/code_2270.c @@ -136,7 +136,7 @@ void chGobiCCW_update(Actor *this) { if (!this->unk16C_4) { this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = TRUE; - this->marker->unk30 = chGobiCCW_free; + this->marker->actorFreeFunc = chGobiCCW_free; this->unk138_24 = FALSE; local->unk4 = skeletalAnim_new(); local->spit_model = assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); diff --git a/src/CCW/code_950.c b/src/CCW/code_950.c index 582aaaed..d63e8953 100644 --- a/src/CCW/code_950.c +++ b/src/CCW/code_950.c @@ -112,7 +112,7 @@ void chwasp_update(Actor *this) { local = (ActorLocal_CCW_950 *)&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = func_8038717C; + this->marker->actorFreeFunc = func_8038717C; local->unk0 = func_8030D90C(); local->unk4 = 0; local->unk14 = 1000.0f; diff --git a/src/GV/ch/gobi1.c b/src/GV/ch/gobi1.c index 9b6ee577..de7f400c 100644 --- a/src/GV/ch/gobi1.c +++ b/src/GV/ch/gobi1.c @@ -116,7 +116,7 @@ void chGobi1_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; marker_setCollisionScripts(this->marker, func_803873B0, NULL, NULL); - marker->unk30 = func_8038736C; + marker->actorFreeFunc = func_8038736C; marker->propPtr->unk8_3 = TRUE; marker->collidable = TRUE; GV_D_80391A40.unk0 = 0; diff --git a/src/GV/ch/gobi2.c b/src/GV/ch/gobi2.c index 916ac163..b818b789 100644 --- a/src/GV/ch/gobi2.c +++ b/src/GV/ch/gobi2.c @@ -173,7 +173,7 @@ void chGobi2_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; marker_setCollisionScripts(this->marker, __chGobi2_ow, NULL, NULL); - sp34->unk30 = __chGobi2_80387EFC; + sp34->actorFreeFunc = __chGobi2_80387EFC; local->unk4 = skeletalAnim_new(); local->unk8 = (BKModelBin*) assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); D_80391A50 = 0; diff --git a/src/GV/ch/gobirock.c b/src/GV/ch/gobirock.c index 2e19db59..bf8b4e5a 100644 --- a/src/GV/ch/gobirock.c +++ b/src/GV/ch/gobirock.c @@ -99,7 +99,7 @@ void chGobiRock_update(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; - sp34->unk30 = chGobiRock_free; + sp34->actorFreeFunc = chGobiRock_free; sp34->propPtr->unk8_3 = TRUE; marker_setCollisionScripts(this->marker, NULL, NULL, __chGobiRock_destroy); local->unkC = particleEmitter_new(20); diff --git a/src/GV/ch/mazectrl.c b/src/GV/ch/mazectrl.c index be8d00ce..b8a7f3b3 100644 --- a/src/GV/ch/mazectrl.c +++ b/src/GV/ch/mazectrl.c @@ -152,7 +152,7 @@ void chMazeCtrl_update(Actor *this){ sp34 = time_getDelta(); if(!this->unk16C_4){ this->unk16C_4 = TRUE; - this->marker->unk30 = __chMazeCtrl_8038F5E4; + this->marker->actorFreeFunc = __chMazeCtrl_8038F5E4; if(this->state == 2){ comusic_8025AB44(COMUSIC_26_GV_SANDYBUTT_DANGER, 30000, 30000); item_set(ITEM_6_HOURGLASS, TRUE); diff --git a/src/GV/code_6370.c b/src/GV/code_6370.c index d726653f..78996cca 100644 --- a/src/GV/code_6370.c +++ b/src/GV/code_6370.c @@ -160,7 +160,7 @@ void func_8038CC98(Actor *this){ if(!this->unk16C_4){ sp7C = fileProgressFlag_getN(FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, 2); this->unk16C_4 = TRUE; - this->marker->unk30 = func_8038C880; + this->marker->actorFreeFunc = func_8038C880; local->unk8 = &D_803911F0[this->modelCacheIndex - 0x285]; local->unk10 = 0; local->unk14 = 0; diff --git a/src/GV/code_7DB0.c b/src/GV/code_7DB0.c index 44ae1c6e..290a4369 100644 --- a/src/GV/code_7DB0.c +++ b/src/GV/code_7DB0.c @@ -13,6 +13,7 @@ ActorAnimationInfo D_80391340[] ={ {0xF0, 1.6f}, }; +// 0x121 - Big Jinxy Head, 0x3E6 - GV Jinxy Head 2 ActorInfo D_80391358 = { 0xAE, 0x121, 0x3E6, 0x1, D_80391340, func_8038E1A0, func_8038E1A8, actor_draw, diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index b16b8311..ef814183 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -490,7 +490,7 @@ void GV_func_8038F154(void) spawnableActorList_add(&D_8039123C, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_11 | ACTOR_FLAG_UNKNOWN_19); spawnableActorList_add(&D_80391260, actor_new, ACTOR_FLAG_UNKNOWN_7); spawnableActorList_add(&D_80391318, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_7 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10); - spawnableActorList_add(&D_80391358, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_4 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); + spawnableActorList_add(&D_80391358, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_4 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); // Big Jinxy Head ? spawnableActorList_add(&D_803912B8, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&GV_D_80391390, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&D_803913B4, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); diff --git a/src/RBB/ch/cog.c b/src/RBB/ch/cog.c index d164470c..374b74a8 100644 --- a/src/RBB/ch/cog.c +++ b/src/RBB/ch/cog.c @@ -48,7 +48,7 @@ void func_80388C20(Actor *this){ if(!this->unk16C_4){ actor_collisionOff(this); this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = func_80388BE8; + this->marker->actorFreeFunc = func_80388BE8; this->unk16C_4 = 1; if(this->modelCacheIndex == 0x17B){ local->sfxsource_index = func_8030D90C(); diff --git a/src/RBB/ch/propellorswitch.c b/src/RBB/ch/propellorswitch.c index a59d86a9..7960d8b7 100644 --- a/src/RBB/ch/propellorswitch.c +++ b/src/RBB/ch/propellorswitch.c @@ -96,7 +96,7 @@ void chPropellorSwitch_update(Actor *this){ ActorLocal_RBB_3CB0 *local = (ActorLocal_RBB_3CB0 *)&this->local; if(!this->unk16C_4){ this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = chPropellorSwitch_free; + this->marker->actorFreeFunc = chPropellorSwitch_free; this->unk16C_4 = 1; local->unk0 = &D_80390720[((this->unk78_13 == 2) ? 0:1)]; if(local->unk0->unk6 == 0) diff --git a/src/RBB/ch/whistleswitch.c b/src/RBB/ch/whistleswitch.c index 686cc61f..b3c2d8da 100644 --- a/src/RBB/ch/whistleswitch.c +++ b/src/RBB/ch/whistleswitch.c @@ -132,7 +132,7 @@ void func_8038AEB8(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; this->marker->propPtr->unk8_3 = 1; - this->marker->unk30 = func_8038AD7C; + this->marker->actorFreeFunc = func_8038AD7C; marker_setCollisionScripts(this->marker, NULL, func_8038AD3C, NULL); local->unk4 = RBB_func_8038ABC0(this); mapSpecificFlags_set(local->unk4->unk10, FALSE); diff --git a/src/RBB/code_CA0.c b/src/RBB/code_CA0.c index 8cfe978f..c71a744e 100644 --- a/src/RBB/code_CA0.c +++ b/src/RBB/code_CA0.c @@ -200,7 +200,7 @@ void func_80387890(Actor *this){ void func_803878B0(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = 1; - this->marker->unk30 = func_80387890; + this->marker->actorFreeFunc = func_80387890; marker_setCollisionScripts(this->marker, 0, func_80387850, 0); func_8032AA58(this, 1.1f); func_8038756C(this, 1); diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 99b54be6..fc84f5e2 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -118,9 +118,9 @@ void func_802C6240(Actor *this){ if(!this->initialized){ - this->marker->unk1C = func_802C61C0; - this->marker->unkC = func_802C60AC; - this->marker->unk10 = func_802C6150; + this->marker->dieFunc = func_802C61C0; + this->marker->collisionFunc = func_802C60AC; + this->marker->collision2Func = func_802C6150; this->unk138_24 = 0; this->unk16C_0 = 1; this->initialized = TRUE; diff --git a/src/core2/ch/flotsam.c b/src/core2/ch/flotsam.c index 00621e00..7f5f53e7 100644 --- a/src/core2/ch/flotsam.c +++ b/src/core2/ch/flotsam.c @@ -259,7 +259,7 @@ void func_8035C8F4(Actor *this){ sp34 = time_getDelta(); if(this->state == 0){ this->marker->unk14_21 = FALSE; - this->marker->unk30 = func_8035C8C8; + this->marker->actorFreeFunc = func_8035C8C8; marker_setCollisionScripts(this->marker, func_8035C6C4, func_8035C6C4, func_8035C6F0); local->unk4 = func_80309724(this->position); local->pCtrl_8 = NULL; diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 095c1100..d4f71437 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -108,7 +108,7 @@ void chJinjo_update(Actor * this){ local->unk0 = 1; local->unk4 = 0; local->unk8 = (this->position_y < func_80309B24(this->position)); - this->marker->unkC = __chJinjo_802CDBA8; + this->marker->collisionFunc = __chJinjo_802CDBA8; marker_setFreeMethod(this->marker, __chJinjo_802CDD3C); if(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE)){ marker_despawn(this->marker); diff --git a/src/core2/ch/soundsource.c b/src/core2/ch/soundsource.c index cdfc21d7..6be92dee 100644 --- a/src/core2/ch/soundsource.c +++ b/src/core2/ch/soundsource.c @@ -80,7 +80,7 @@ void func_802D07C8(Actor *this){ f32 sp28; if(!this->unk16C_4){ this->unk16C_4 = 1; - this->marker->unk30 = func_802D07A8; + this->marker->actorFreeFunc = func_802D07A8; func_802D05A0(this, 1); } player_getPosition(sp2C); diff --git a/src/core2/code_45310.c b/src/core2/code_45310.c index 0c30823e..ab517669 100644 --- a/src/core2/code_45310.c +++ b/src/core2/code_45310.c @@ -304,7 +304,7 @@ void func_802CCC5C(Actor *this) { local = (ActorLocal_Core2_45310 * )&this->local; if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = func_802CCBC8; + this->marker->actorFreeFunc = func_802CCBC8; local->unk38 = 0; local->unk39 = 0; local->unk3A = 0; diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index b560f71e..82a3bcf4 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -195,7 +195,7 @@ void func_802D8030(Actor *this){ local = (s32*)&this->local; *local = 1; - this->marker->unkC = __chLevelCollectible_collide; + this->marker->collisionFunc = __chLevelCollectible_collide; subaddie_set_state(this, 2); } diff --git a/src/core2/code_59780.c b/src/core2/code_59780.c index 94a5e785..0bf2ce2d 100644 --- a/src/core2/code_59780.c +++ b/src/core2/code_59780.c @@ -121,7 +121,7 @@ void func_802E07E0(Actor *this) { func_802C7318(this); } func_80361E10(this); - this->marker->unk30 = func_802E07C0; + this->marker->actorFreeFunc = func_802E07C0; } func_80326244(this); diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index f7107a03..f0d75c08 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -384,9 +384,9 @@ void func_80325FE8(Actor *this) { func_8032BB88(this, -1, 8000); this->unk138_7 = 0; } - if (marker->unk30 != NULL) { - marker->unk30(this); - marker->unk30 = NULL; + if (marker->actorFreeFunc != NULL) { + marker->actorFreeFunc(this); + marker->actorFreeFunc = NULL; } if ((s32)marker->unk44 < 0) { func_8033E7CC(marker); @@ -544,13 +544,13 @@ void func_803268B4(void) { } if (!actor->despawn_flag) { if (marker->unk2C_2) { - ((void (*)(Actor *)) marker->unk34)(actor); + marker->actorUpdate2Func(actor); if (anim_ctrl != NULL) { actor->sound_timer = animctrl_getAnimTimer(anim_ctrl); } } else if (!temp_s1 || (temp_s1 && func_803296D8(actor, temp_s1))) { - if ( marker->unk24 != NULL) { - marker->unk24(actor); + if ( marker->actorUpdateFunc != NULL) { + marker->actorUpdateFunc(actor); if (anim_ctrl != NULL) { actor->sound_timer = animctrl_getAnimTimer(anim_ctrl); } @@ -848,8 +848,8 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ suLastBaddie->sound_timer = 0.0f; func_8032FFD4(suLastBaddie->marker, suBaddieActorArray->cnt - 1); marker_setModelId(suLastBaddie->marker, actorInfo->modelId); - func_803300C8(suLastBaddie->marker, actorInfo->update_func); - func_803300D0(suLastBaddie->marker, actorInfo->unk10); + marker_setActorUpdateFunc(suLastBaddie->marker, actorInfo->update_func); + marker_setActorUpdate2Func(suLastBaddie->marker, actorInfo->unk10); ml_vec3f_clear(suLastBaddie->unk1C); ml_vec3f_clear(suLastBaddie->velocity); ml_vec3f_clear(suLastBaddie->spawn_position); @@ -1650,12 +1650,12 @@ void func_803299B4(Actor *arg0) { s32 position[3]; s32 rotation[3]; - arg0->marker->unkC = arg0->unk108; - arg0->marker->unk10 = arg0->unk10C; - arg0->marker->unk1C = arg0->unk134; + arg0->marker->collisionFunc = arg0->unk108; + arg0->marker->collision2Func = arg0->unk10C; + arg0->marker->dieFunc = arg0->unk134; arg0->marker->unk54 = arg0->unk160; arg0->marker->unk58 = arg0->unk168; - arg0->marker->unk30 = arg0->unk13C; + arg0->marker->actorFreeFunc = arg0->backupFreeFunc; arg0->marker->unk5C = arg0->unk16C_31; arg0->marker->propPtr->unk8_3 = arg0->unkF4_28; arg0->marker->propPtr->unk8_2 = arg0->unkF4_27; @@ -1743,12 +1743,12 @@ void *actors_appendToSavestate(void * begin, u32 end){ s0->unk158[0] = NULL; s0->unk158[1] = NULL; s0->unk138_19 = s1->marker->id; - s0->unk108 = s1->marker->unkC; - s0->unk10C = s1->marker->unk10; - s0->unk134 = s1->marker->unk1C; + s0->unk108 = s1->marker->collisionFunc; + s0->unk10C = s1->marker->collision2Func; + s0->unk134 = s1->marker->dieFunc; s0->unk160 = s1->marker->unk54; s0->unk168 = s1->marker->unk58; - s0->unk13C = s1->marker->unk30; + s0->backupFreeFunc = s1->marker->actorFreeFunc; s0->unk16C_31 = s1->marker->unk5C; s0->unkF4_26 = s1->marker->unk2C_1; s0->stored_marker_collidable = s1->marker->collidable; @@ -1868,6 +1868,7 @@ void func_8032A09C(s32 arg0, ActorListSaveState *arg1) { spawnQueue_unlock(); } +// only used for GV Jinxy Head 2 void func_8032A5F8(void) { Actor *var_s0; @@ -1881,6 +1882,7 @@ void func_8032A5F8(void) { } } +// only used by GV Jinxy Head 2 void func_8032A6A8(Actor *arg0) { f32 var_f0; f32 var_f2; @@ -1903,6 +1905,7 @@ void func_8032A6A8(Actor *arg0) { } } +// only used by GV Jinxy Head 2 Actor *func_8032A7AC(Actor *arg0) { Actor *var_a0; @@ -1945,6 +1948,7 @@ void func_8032A88C(Actor *arg0) { } } +// only called by blubber void func_8032A95C(Actor *arg0, s32 arg1, s32 arg2) { func_80343F00(arg1, arg0->position); arg0->unk44_14 = arg1; diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index 1dc3bcb8..4185c82c 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -1159,16 +1159,16 @@ ActorMarker * marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, int mark marker->unk40_22 = 0; marker->unk40_19 = 0; marker->unk40_21 = 0; - marker->unkC = NULL; - marker->unk10 = NULL; - marker->unk1C = NULL; + marker->collisionFunc = NULL; + marker->collision2Func = NULL; + marker->dieFunc = NULL; marker->unk54 = NULL; marker->unk58 = 0; marker->unk18 = 0; - marker->unk24 = 0; - marker->unk30 = NULL; + marker->actorUpdateFunc = NULL; + marker->actorFreeFunc = NULL; marker->unk28 = 0; - marker->unk34 = 0; + marker->actorUpdate2Func = NULL; marker->unk38[0] = 0; marker->unk38[1] = 0; marker->unk38[2] = 0; @@ -1222,16 +1222,16 @@ void func_8032FFEC(ActorMarker *this, s32 arg1){ void func_8032FFF4(ActorMarker *this, ActorMarker *other, s32 type){ switch(type){ case 0: //ow - if(this->unkC) - this->unkC(this, other); + if(this->collisionFunc) + this->collisionFunc(this, other); break; case 1: - if(this->unk10) - this->unk10(this, other); + if(this->collision2Func) + this->collision2Func(this, other); break; case 2: //die - if(this->unk1C) - this->unk1C(this, other); + if(this->dieFunc) + this->dieFunc(this, other); break; } } @@ -1244,9 +1244,9 @@ void func_80330078(ActorMarker *marker, ActorMarker *other_marker, s16 *arg2){ //marker_setCollisionMethods void marker_setCollisionScripts(ActorMarker *this, MarkerCollisionFunc ow_func, MarkerCollisionFunc arg2, MarkerCollisionFunc die_func){ - this->unkC = ow_func; - this->unk10 = arg2; - this->unk1C = die_func; + this->collisionFunc = ow_func; + this->collision2Func = arg2; + this->dieFunc = die_func; } void func_803300B8(ActorMarker *marker, MarkerCollisionFunc method){ @@ -1257,16 +1257,16 @@ void func_803300C0(ActorMarker *marker, bool (*method)(ActorMarker *, ActorMarke marker->unk58 = method; } -void func_803300C8(ActorMarker *marker, ActorUpdateFunc method){ - marker->unk24 = method; +void marker_setActorUpdateFunc(ActorMarker *marker, ActorUpdateFunc method){ + marker->actorUpdateFunc = method; } -void func_803300D0(ActorMarker *marker, s32 arg1){ - marker->unk34 = arg1; +void marker_setActorUpdate2Func(ActorMarker *marker, ActorUpdateFunc method){ + marker->actorUpdate2Func = method; } void marker_setFreeMethod(ActorMarker *marker, ActorFreeFunc method){ - marker->unk30 = method; + marker->actorFreeFunc = method; } void func_803300E0(ActorMarker *marker, Struct6Cs *arg1){ diff --git a/src/core2/code_D0CA0.c b/src/core2/code_D0CA0.c index 128ed0c7..05a0aab4 100644 --- a/src/core2/code_D0CA0.c +++ b/src/core2/code_D0CA0.c @@ -292,7 +292,7 @@ void func_80358684(Actor *this) { sp88 = time_getDelta(); if (!this->unk16C_4) { this->unk16C_4 = TRUE; - this->marker->unk30 = func_80358490; + this->marker->actorFreeFunc = func_80358490; local->unk38 = 0; local->unk39 = 0; local->unk28 = 0.0f; From 415f0b0228ec62c5dac731e424e047d9466d5ede Mon Sep 17 00:00:00 2001 From: Cyrus Kashef Date: Sat, 7 Sep 2024 23:25:16 +0000 Subject: [PATCH 7/7] Added Table Of Contents To Building Instructions --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c6241961..4ed6fac7 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ The following instructions should work on the following platforms: - Linux (x86_64, ARM) - macOS (x86_64, ARM) +Building Instructions Table Of Contents: +- [Local (Linux)](#local-linux) +- [Local (Docker - Linux/macOS)](#local-docker---linuxmacos) +- [Cloud (GitLab CI)](#cloud-gitlab-ci)) + ## Local (Linux) Works with Ubuntu 18.04 or higher.