From 708618728838fa295290ad2097c111b71f69c155 Mon Sep 17 00:00:00 2001 From: Nabnut Date: Mon, 23 Sep 2024 19:13:12 +0200 Subject: [PATCH] Renaming spawn functions --- include/enums.h | 4 +- include/functions.h | 8 +- manual_syms.pal.txt | 4 +- src/BGS/ch/code_8A60.c | 4 +- src/BGS/ch/mudhut.c | 8 +- src/BGS/ch/tanktup.c | 4 +- src/BGS/code_3420.c | 8 +- src/CCW/ch/grublinhood.c | 2 +- src/CCW/code_160.c | 2 +- src/CCW/code_3310.c | 2 +- src/CCW/code_5540.c | 2 +- src/FP/ch/boggy2.c | 2 +- src/FP/ch/twinkly.c | 2 +- src/FP/ch/twinklybox.c | 6 +- src/FP/ch/wozzasjig.c | 2 +- src/FP/ch/xmastree.c | 2 +- src/FP/racectrl.c | 16 +-- src/FP/sirslushgame.c | 2 +- src/FP/snowmanbuttongame.c | 2 +- src/GV/ch/ancientone.c | 6 +- src/GV/ch/gobi3.c | 4 +- src/GV/code_5570.c | 2 +- src/GV/code_7FF0.c | 2 +- src/MM/ch/conga.c | 8 +- src/MM/ch/hut.c | 12 +- src/MM/ch/juju.c | 2 +- src/MM/ch/jujuhitbox.c | 2 +- src/RBB/ch/boombox.c | 2 +- src/RBB/ch/bossboombox.c | 4 +- src/RBB/ch/bossboomboxctrl.c | 2 +- src/RBB/ch/whistlectrl.c | 2 +- src/RBB/code_9670.c | 4 +- src/SM/ch/vegetables.c | 4 +- src/SM/code_5B0.c | 4 +- src/TTC/ch/blubber.c | 2 +- src/TTC/ch/clam.c | 6 +- src/TTC/ch/treasure.c | 2 +- src/TTC/ch/treasurehunt.c | 6 +- src/core2/ba/marker.c | 10 +- src/core2/ba/model.c | 2 +- src/core2/ch/badShad.c | 2 +- src/core2/ch/beehive.c | 4 +- src/core2/ch/bottlesbonus.c | 2 +- src/core2/ch/bottlesbonuscursor.c | 2 +- src/core2/ch/crab.c | 2 +- src/core2/ch/gameSelect.c | 2 +- src/core2/ch/gloop.c | 2 +- src/core2/ch/icecube.c | 6 +- src/core2/ch/jiggy.c | 6 +- src/core2/ch/overlaycopyright.c | 2 +- src/core2/ch/overlaynocontroller.c | 4 +- src/core2/ch/overlaypressstart.c | 4 +- src/core2/ch/shrapnel.c | 2 +- src/core2/ch/snacker.c | 2 +- src/core2/ch/soundsource.c | 2 +- src/core2/code_16010.c | 2 +- src/core2/code_41FB0.c | 173 +++++++++++++++-------------- src/core2/code_4C020.c | 2 +- src/core2/code_51950.c | 2 +- src/core2/code_55390.c | 2 +- src/core2/code_556C0.c | 2 +- src/core2/code_55850.c | 2 +- src/core2/code_57C70.c | 2 +- src/core2/code_581D0.c | 2 +- src/core2/code_6B30.c | 4 +- src/core2/code_7AF80.c | 4 +- src/core2/code_9E370.c | 38 ++++--- src/core2/code_C0B80.c | 2 +- src/core2/code_C0CF0.c | 2 +- src/core2/code_C0E60.c | 2 +- src/core2/code_D5D10.c | 2 +- src/core2/code_D6180.c | 6 +- src/core2/code_EF50.c | 2 +- src/core2/spawnqueue.c | 55 +++++---- src/fight/chbossjinjobase.c | 2 +- src/fight/chfinalboss.c | 26 ++--- src/fight/chjinjonatorbase.c | 2 +- src/lair/code_0.c | 6 +- src/lair/code_86F0.c | 2 +- src/lair/code_A4A0.c | 2 +- 80 files changed, 287 insertions(+), 273 deletions(-) diff --git a/include/enums.h b/include/enums.h index 962df97f..43317b4d 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1753,6 +1753,7 @@ enum actor_e ACTOR_67_SNIPPET = 0x67, ACTOR_68_SNACKER, ACTOR_69_CLAM, + ACTOR_6A_UNKNOWN, ACTOR_6D_GV_BANJO_DOOR = 0x6D, @@ -2048,7 +2049,8 @@ enum actor_e ACTOR_34F_MUMMUM, ACTOR_350_SEAMAN_GRUBLIN, - ACTOR_353_XMAS_TREE_EGG_TOLL = 0x353, + ACTOR_352_UNKOWN = 0x352, + ACTOR_353_XMAS_TREE_EGG_TOLL, ACTOR_354_DRIPS, ACTOR_367_GRUNTLING_RED = 0x367, diff --git a/include/functions.h b/include/functions.h index e3dacff6..74211232 100644 --- a/include/functions.h +++ b/include/functions.h @@ -224,7 +224,7 @@ void particleEmitter_setPosition(ParticleEmitter *, f32[3]); ParticleEmitter *partEmitMgr_newEmitter(u32); void func_802BB3DC(s32, f32, f32); void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32); -Actor *func_802C4140(enum actor_e actor_id, s32 x, s32 y, s32 z); +Actor *spawnQueue_actor_f32(enum actor_e actor_id, s32 x, s32 y, s32 z); void func_8030DA44(u8); @@ -381,7 +381,7 @@ extern s32 func_802F9AA8(enum sfx_e); Actor * func_803055E0(enum actor_e id, s32 pos[3], s32 arg2, s32 arg3, s32 arg4); -Actor * spawn_actor(enum actor_e id, s32 pos[3], s32 yaw); +Actor * __actor_spawnWithYaw_s32(enum actor_e id, s32 pos[3], s32 yaw); f32 mapModel_getFloorY(f32[3]); BKModelBin *func_8030A428(s32); u8 func_8030D90C(void); @@ -427,7 +427,7 @@ void func_80326244(Actor *); void func_8032728C(f32[3], f32, s32, int(*)(Actor *)); -Actor *spawn_actor_f32(enum actor_e actor_id, f32 position[3], s32 yaw); +Actor *actor_spawnWithYaw_f32(enum actor_e actor_id, f32 position[3], s32 yaw); int func_8032863C(AnimCtrl *, f32, f32); int func_80328A2C(Actor *, f32, s32, f32); void subaddie_set_state(Actor *, u32); @@ -499,7 +499,7 @@ int actor_animationIsAt(Actor*, f32); void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32); -void func_802C8F70(f32); +void bundle_setYaw(f32); void func_802F9DB8(s32, f32, f32, f32); void func_802F9F80(s32, f32, f32, f32); void func_802FA060(s32, s32, s32, f32); diff --git a/manual_syms.pal.txt b/manual_syms.pal.txt index f50b8b46..9534fce9 100644 --- a/manual_syms.pal.txt +++ b/manual_syms.pal.txt @@ -121,7 +121,7 @@ ncFirstPersonCamera_getState = 0x802c2980; spawnQueue_func_802C3A18 = 0x802C3898; spawnQueue_flush = 0x802c38b8; __spawnQueue_add_4 = 0x802c3d84; -func_802C418C = 0x802c400c; +spawnQueue_actor_s16 = 0x802c400c; func_802C5A30 = 0x802c5b20; chjiggy_getJiggyId = 0x802c8248; func_802C9C14 = 0x802c9dd4; @@ -251,7 +251,7 @@ func_80324DBC = 0x8032520c; timedFunc_set_1 = 0x80325334; timedFunc_set_2 = 0x80325370; timedFunc_set_3 = 0x803253b4; -func_8032811C = 0x80328574; +actor_spawnWithYaw_s32 = 0x80328574; marker_despawn = 0x8032874c; marker_getActor = 0x80329db0; func_8032AD7C = 0x8032b1d4; diff --git a/src/BGS/ch/code_8A60.c b/src/BGS/ch/code_8A60.c index 8e8218fd..ef53acf3 100644 --- a/src/BGS/ch/code_8A60.c +++ b/src/BGS/ch/code_8A60.c @@ -26,7 +26,7 @@ void func_8038EE50(void){ if(nodeProp_findPositionFromActorId(0x14d, sp24)){ jiggy_spawn(JIGGY_20_BGS_ELEVATED_WALKWAY, sp24); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]) @@ -69,7 +69,7 @@ void func_8038F018(void){ if(nodeProp_findPositionFromActorId(0x1fc, sp24)){ jiggy_spawn(JIGGY_25_BGS_MAZE, sp24); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]) diff --git a/src/BGS/ch/mudhut.c b/src/BGS/ch/mudhut.c index d0f5d8d1..523ea4a0 100644 --- a/src/BGS/ch/mudhut.c +++ b/src/BGS/ch/mudhut.c @@ -8,7 +8,7 @@ extern void player_stateTimer_set(enum state_timer_e, f32); extern f32 player_stateTimer_get(enum state_timer_e); -void func_802C4218(u32,f32,f32,f32); +void spawnQueue_bundle_f32(u32,f32,f32,f32); void subaddie_set_state(Actor *, u32); /* local declarations */ @@ -61,8 +61,8 @@ void func_8038EB4C(ActorMarker *this){ Actor *thisActor; thisActor = marker_getActor(this); - thisActor = spawn_actor_f32(ACTOR_D_WOOD_DEMOLISHED, thisActor->position, NULL); - thisActor = spawn_actor_f32(ACTOR_4D_STEAM_2, thisActor->position, NULL); + thisActor = actor_spawnWithYaw_f32(ACTOR_D_WOOD_DEMOLISHED, thisActor->position, NULL); + thisActor = actor_spawnWithYaw_f32(ACTOR_4D_STEAM_2, thisActor->position, NULL); if(this); } @@ -105,7 +105,7 @@ void chmudhut_update(Actor *this){ } __spawnQueue_add_1((GenFunction_1)func_8038EB4C, reinterpret_cast(s32, this->marker)); if(tmp < 5){ - __spawnQueue_add_4((GenFunction_4)func_802C4218, D_80390B50[tmp], + __spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, D_80390B50[tmp], reinterpret_cast(s32, diffPos[0]), reinterpret_cast(s32, diffPos[1]), reinterpret_cast(s32, diffPos[2]) diff --git a/src/BGS/ch/tanktup.c b/src/BGS/ch/tanktup.c index c7682fed..36eb2500 100644 --- a/src/BGS/ch/tanktup.c +++ b/src/BGS/ch/tanktup.c @@ -46,7 +46,7 @@ void func_8038F470(ActorMarker *this, s32 arg1, enum chtanktup_leg_e leg_id){ sp18[2] = thisActor->position_z; sp18[1] += 50.0f; - leg = spawn_actor_f32(leg_id + ACTOR_E9_TANKTUP_LEG_FL, sp18, (s32)thisActor->yaw); + leg = actor_spawnWithYaw_f32(leg_id + ACTOR_E9_TANKTUP_LEG_FL, sp18, (s32)thisActor->yaw); subaddie_set_state_with_direction(leg, arg1 + 1, 0, -1); leg->unk10_12 = leg_id; } @@ -205,7 +205,7 @@ void func_8038F6A4(Actor *this) { f32 sp34[3]; func_8034A174(this->marker->unk44, 6, sp34); - func_802C8F70(this->yaw); + bundle_setYaw(this->yaw); sp34[1] -= 125.0f; jiggy_spawn(JIGGY_26_BGS_TANKTUP, sp34); } diff --git a/src/BGS/code_3420.c b/src/BGS/code_3420.c index 7da9da10..b1b30acf 100644 --- a/src/BGS/code_3420.c +++ b/src/BGS/code_3420.c @@ -140,7 +140,7 @@ void BGS_func_80389850(Actor *this, s32 arg1) { sp94[0] = vile->position[0] + sp7C[0]; sp94[1] = vile->position[1] + sp7C[1]; sp94[2] = vile->position[2] + sp7C[2]; - func_802C8F70(vile->yaw); + bundle_setYaw(vile->yaw); jiggy_spawn(JIGGY_28_BGS_MR_VILE, sp94); } else { sp7C[0] = 0.0f - vile->position[0]; @@ -151,7 +151,7 @@ void BGS_func_80389850(Actor *this, s32 arg1) { sp94[0] = vile->position[0] + sp7C[0]; sp94[1] = vile->position[1] + sp7C[1]; sp94[2] = vile->position[2] + sp7C[2]; - func_802C8F70(func_8025715C(sp7C[0], sp7C[2])); + bundle_setYaw(func_8025715C(sp7C[0], sp7C[2])); jiggy_spawn(JIGGY_28_BGS_MR_VILE, sp94); } } @@ -302,9 +302,9 @@ void func_80389F08(ActorMarker *marker) { } for(i = 0; i < 3; i++){ if (var_s2 < 3) { - func_802C8F70(vile->yaw + (f32) (i * 30)); + bundle_setYaw(vile->yaw + (f32) (i * 30)); func_802C8F7C(2.0f); - func_802C937C(6, vile->position); + bundle_spawn_f32(6, vile->position); var_s2 += 1; } else { item_inc(ITEM_16_LIFE); diff --git a/src/CCW/ch/grublinhood.c b/src/CCW/ch/grublinhood.c index 9f168294..77828e21 100644 --- a/src/CCW/ch/grublinhood.c +++ b/src/CCW/ch/grublinhood.c @@ -87,7 +87,7 @@ void __chgrublinhood_die(ActorMarker* marker, s32 arg1) { FUNC_8030E8B4(SFX_C2_GRUBLIN_EGH, 1.0f, 32000, actor->position, 1250, 2500); pCtrl = partEmitMgr_newEmitter(1); __chgrublinhood_emitHat(pCtrl, actor, ASSET_52D_MODEL_GRUBLIN_HOOD_HAT); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32,actor->position_x), reinterpret_cast(s32,actor->position_y), reinterpret_cast(s32,actor->position_z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32,actor->position_x), reinterpret_cast(s32,actor->position_y), reinterpret_cast(s32,actor->position_z)); actor_collisionOff(actor); actor->is_first_encounter = TRUE; } diff --git a/src/CCW/code_160.c b/src/CCW/code_160.c index 7473bc64..33c79c26 100644 --- a/src/CCW/code_160.c +++ b/src/CCW/code_160.c @@ -195,7 +195,7 @@ void func_8038687C(Actor *this) { break; } - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x29B, reinterpret_cast(s32, sp4C[0]), reinterpret_cast(s32, sp4C[1]), reinterpret_cast(s32, sp4C[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x29B, reinterpret_cast(s32, sp4C[0]), reinterpret_cast(s32, sp4C[1]), reinterpret_cast(s32, sp4C[2])); local->unk4++; } local->unkC = randf2(0.5 - ((local->unk8 / 10) * 0.4), 1.0 - ((local->unk8 / 10) * 0.8)); diff --git a/src/CCW/code_3310.c b/src/CCW/code_3310.c index 39b00f2e..681b089e 100644 --- a/src/CCW/code_3310.c +++ b/src/CCW/code_3310.c @@ -109,7 +109,7 @@ void func_80389700(ActorMarker *marker, enum asset_e text_id, s32 arg2) { void func_80389740(ActorMarker *marker) { Actor *this = marker_getActor(marker); if (this->marker->unk14_21) { - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x30C, reinterpret_cast(s32, D_8038FDE0[0]), reinterpret_cast(s32, D_8038FDE0[1]), reinterpret_cast(s32, D_8038FDE0[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x30C, reinterpret_cast(s32, D_8038FDE0[0]), reinterpret_cast(s32, D_8038FDE0[1]), reinterpret_cast(s32, D_8038FDE0[2])); } } diff --git a/src/CCW/code_5540.c b/src/CCW/code_5540.c index a3f49cf4..912025b5 100644 --- a/src/CCW/code_5540.c +++ b/src/CCW/code_5540.c @@ -55,7 +55,7 @@ void chnabnut_setState(Actor *this, s32 next_state) { if (next_state == NABNUT_STATE_4_THANK_PLAYER) { skeletalAnim_set(this->unk148, ASSET_22E_ANIM_NABNUT_STAND, 0.2f, 3.53f); skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); - func_802C8F70(this->yaw - 40.0f); + bundle_setYaw(this->yaw - 40.0f); jiggy_spawn(JIGGY_4A_CCW_NABNUT, this->position); } diff --git a/src/FP/ch/boggy2.c b/src/FP/ch/boggy2.c index 7bc6e623..f0a65be7 100644 --- a/src/FP/ch/boggy2.c +++ b/src/FP/ch/boggy2.c @@ -390,7 +390,7 @@ void func_803895E0(void){ f20 = (f32)func_80304DA8(s0); f8 = (f32)func_80304DB8(s0); f22 = f8*0.01; - actor = spawn_actor_f32(D_80391DB8[i].actor_id, sp64, (s32)f20); + actor = actor_spawnWithYaw_f32(D_80391DB8[i].actor_id, sp64, (s32)f20); actor->scale = f22; } } diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index be79c1a1..df9f31b8 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -233,7 +233,7 @@ void func_8038C8F0(ActorMarker *marker){ this = marker_getActor(reinterpret_cast(ActorMarker *, marker)); other = marker_getActor(this->unk100); - muncher = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392070, 170); + muncher = actor_spawnWithYaw_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392070, 170); muncher->unk100 = other->marker; muncher->unkF4_8 = 1; diff --git a/src/FP/ch/twinklybox.c b/src/FP/ch/twinklybox.c index 1de52093..c08e244a 100644 --- a/src/FP/ch/twinklybox.c +++ b/src/FP/ch/twinklybox.c @@ -3,7 +3,7 @@ #include "variables.h" extern void func_80324CD8(f32); -extern Actor *spawn_actor_f32(enum actor_e, f32[3], s32); +extern Actor *actor_spawnWithYaw_f32(enum actor_e, f32[3], s32); Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_8038D6C8(Actor *this); @@ -209,9 +209,9 @@ void func_8038D41C(ActorMarker *marker){ ActorMarker *_marker = reinterpret_cast(ActorMarker *, marker); Actor *actor; - actor = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392354, 170); + actor = actor_spawnWithYaw_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392354, 170); actor->unk100 = _marker; - actor = spawn_actor_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392360, 170); + actor = actor_spawnWithYaw_f32(ACTOR_337_TWINKLY_MUNCHER, D_80392360, 170); actor->unk100 = _marker; if(pad[0]); } diff --git a/src/FP/ch/wozzasjig.c b/src/FP/ch/wozzasjig.c index 201bfcfd..c8dc588a 100644 --- a/src/FP/ch/wozzasjig.c +++ b/src/FP/ch/wozzasjig.c @@ -74,7 +74,7 @@ void func_8038FF54(Actor *this){ sp40[0] = (f32)(s32)sp40[0]; sp40[1] = (f32)(s32)sp40[1]; sp40[2] = (f32)(s32)sp40[2]; - func_802C8F70(this->yaw + 90.0f); + bundle_setYaw(this->yaw + 90.0f); jiggy_spawn(JIGGY_32_FP_WOZZA, sp40); levelSpecificFlags_set(0x26, TRUE); marker_despawn(this->marker); diff --git a/src/FP/ch/xmastree.c b/src/FP/ch/xmastree.c index bcbad51c..04f4f2f4 100644 --- a/src/FP/ch/xmastree.c +++ b/src/FP/ch/xmastree.c @@ -53,7 +53,7 @@ void __chXmasTree_80386F84(Actor * this){ void __chXmasTree_spawnSwitch(void){ static s32 chXmasTree_switch_spawn_position[3] = {-0x1220, 0x6A, 0x1945}; - func_8032811C(ACTOR_338_XMAS_TREE_SWITCH, chXmasTree_switch_spawn_position, 350); + actor_spawnWithYaw_s32(ACTOR_338_XMAS_TREE_SWITCH, chXmasTree_switch_spawn_position, 350); } void __chXmasTree_spawnStar(void *marker){ diff --git a/src/FP/racectrl.c b/src/FP/racectrl.c index 96a6ac7b..b9feb161 100644 --- a/src/FP/racectrl.c +++ b/src/FP/racectrl.c @@ -90,8 +90,8 @@ void func_8038AC90(s32 indx, s32 arg1){ Actor *a1; Actor *a2; - m1 = spawn_actor_f32(0x161, D_80392F70[indx].position, 0)->marker; - m2 = spawn_actor_f32(0x162, D_80393280[indx].position, 0)->marker; + m1 = actor_spawnWithYaw_f32(0x161, D_80392F70[indx].position, 0)->marker; + m2 = actor_spawnWithYaw_f32(0x162, D_80393280[indx].position, 0)->marker; a1 = marker_getActor(m1); a2 = marker_getActor(m2); @@ -143,23 +143,23 @@ void func_8038AEE0(s32 indx){ Actor *sp1C; switch(indx){ case 0:// L8038AF0C - sp1C = spawn_actor_f32(0x22d, D_80391ED0, D_80391EDC); + sp1C = actor_spawnWithYaw_f32(0x22d, D_80391ED0, D_80391EDC); break; case 1:// L8038AF38 - sp1C = spawn_actor_f32(0x22e, D_80391EE0, D_80391EEC); + sp1C = actor_spawnWithYaw_f32(0x22e, D_80391EE0, D_80391EEC); break; case 2:// L8038AF64 - sp1C = spawn_actor_f32(0x22d, D_80391EF0, FP_D_80391EFC); + sp1C = actor_spawnWithYaw_f32(0x22d, D_80391EF0, FP_D_80391EFC); break; case 3:// L8038AF90 - sp1C = spawn_actor_f32(0x22d, D_80391F00, D_80391F0C); + sp1C = actor_spawnWithYaw_f32(0x22d, D_80391F00, D_80391F0C); break; case 4:// L8038AFBC - sp1C = spawn_actor_f32(0x22d, D_80391F10, D_80391F1C); + sp1C = actor_spawnWithYaw_f32(0x22d, D_80391F10, D_80391F1C); break; } D_80393590[indx] = sp1C->marker; @@ -191,7 +191,7 @@ void FP_func_8038B0B8(void){ } void func_8038B0F8(void){ - Actor *trainers = spawn_actor_f32(ACTOR_2C_TURBO_TALON_TRAINERS, D_80391F20, 100); + Actor *trainers = actor_spawnWithYaw_f32(ACTOR_2C_TURBO_TALON_TRAINERS, D_80391F20, 100); trainers->unk10_1 = FALSE; } diff --git a/src/FP/sirslushgame.c b/src/FP/sirslushgame.c index aae2f377..cc57a49a 100644 --- a/src/FP/sirslushgame.c +++ b/src/FP/sirslushgame.c @@ -54,7 +54,7 @@ void fp_sirslushgame_update(void){ if(D_80392F30.unk1C){ func_802BAFE4(0x12); jiggy_spawn(JIGGY_31_FP_SIR_SLUSH, D_80392F30.spawn_pos); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, D_80392F30.spawn_pos[0]), reinterpret_cast(s32, D_80392F30.spawn_pos[1]), reinterpret_cast(s32, D_80392F30.spawn_pos[2]) diff --git a/src/FP/snowmanbuttongame.c b/src/FP/snowmanbuttongame.c index 99a0c14c..56f4f147 100644 --- a/src/FP/snowmanbuttongame.c +++ b/src/FP/snowmanbuttongame.c @@ -52,7 +52,7 @@ void fp_snowmanButtonGame_update(void){ if(D_80392F50.unk18){ func_802BAFE4(0x11); jiggy_spawn(JIGGY_2D_FP_SNOWMAN_BUTTONS, D_80392F50.spawn_pos); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, D_80392F50.spawn_pos[0]), reinterpret_cast(s32, D_80392F50.spawn_pos[1]), reinterpret_cast(s32, D_80392F50.spawn_pos[2]) diff --git a/src/GV/ch/ancientone.c b/src/GV/ch/ancientone.c index 0a3e291f..6e747d60 100644 --- a/src/GV/ch/ancientone.c +++ b/src/GV/ch/ancientone.c @@ -89,7 +89,7 @@ void func_803867F4(void){ func_802BAFE4(4); if(nodeProp_findPositionFromActorId(0x148, sp24)){ jiggy_spawn(JIGGY_46_GV_ANCIENT_ONES, sp24); - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); } } @@ -183,10 +183,10 @@ void chAncientOne_update(Actor *this){ this->position_z += (sp38 & 2) ? 0xC : -0xC; if(this->unkF4_8 != 1){ if(sp38 == 6){ - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); } if(sp38 == 4 && this->position_y < LOCAL_CH_ANCIENT_ONE(this)->unk1C - 600.0f){ - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); }//L80386D80 } if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){ diff --git a/src/GV/ch/gobi3.c b/src/GV/ch/gobi3.c index f3c55bb0..a98b9380 100644 --- a/src/GV/ch/gobi3.c +++ b/src/GV/ch/gobi3.c @@ -22,9 +22,9 @@ void __chGobi3_spawnHoneyComb(Actor *this){ s32 pad24; f32 sp18[3]; TUPLE_ASSIGN(sp18, -6885.0f, 2383.0f, 1335.0f); - func_802C8F70(this->yaw); + bundle_setYaw(this->yaw); func_802CA1CC(HONEYCOMB_C_GV_GOBI_3); - func_802C937C(0xd, sp18); + bundle_spawn_f32(0xd, sp18); } void __chGobi3_runaway(ActorMarker *caller, enum asset_e text_id, s32 arg2){ diff --git a/src/GV/code_5570.c b/src/GV/code_5570.c index 175b7799..5042f4f7 100644 --- a/src/GV/code_5570.c +++ b/src/GV/code_5570.c @@ -200,7 +200,7 @@ void GV_func_8038BEA0(Actor *this){ this->unk38_31 = 0; D_80391A80 = this->state; func_802BB3DC(0, 14.0f, 0.92f); - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x11f, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z) ); } diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index db2ef2fc..874c1844 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -448,7 +448,7 @@ void func_8038F028(UNK_TYPE(s32) arg0, ActorMarker *arg1, s32 arg2, s32 arg3){ sp24[0] = (f32)arg1->propPtr->x; sp24[1] = (f32)arg1->propPtr->y; sp24[2] = (f32)arg1->propPtr->z; - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4e, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x4e, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); func_8025A6EC(COMUSIC_2B_DING_B, 22000); if(mapSpecificFlags_get(arg3)){ timedFunc_set_0(2.0f, func_8038F004); diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index a42048b3..cfb638ae 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -14,9 +14,9 @@ void func_80328FB0(Actor *, f32); void subaddie_set_state_with_direction(Actor*, s32, f32, s32); -void func_802C8F70(f32); +void bundle_setYaw(f32); void timed_exitStaticCamera(f32); -Actor *func_8032811C(s32 actor_id, s32 position[3], s32 yaw); +Actor *actor_spawnWithYaw_s32(s32 actor_id, s32 position[3], s32 yaw); void MM_func_80387F44(void); void func_803876D0(Actor *); @@ -111,7 +111,7 @@ void func_80387100(ActorMarker *this){ position[0] = actorPtr->position_x; position[1] = actorPtr->position_y + 60.0f; position[2] = actorPtr->position_z; - func_802C8F70(0.0f); + bundle_setYaw(0.0f); func_80333270(JIGGY_A_MM_CONGA, position, func_803870D0, m); } @@ -182,7 +182,7 @@ void __chConga_sendOrangeProjectile(ActorMarker *congaMarker){ congaPtr->unk10_12 -= (congaPtr->unk10_12 && ( conga_state == 7)); MM_func_80387F44(); congaPtr->unk28 = 2.0f; - orangePtr = func_8032811C(ACTOR_14_ORANGE_PROJECTILE, conga_localPtr->orangeSpawnPosition, congaPtr->yaw); + orangePtr = actor_spawnWithYaw_s32(ACTOR_14_ORANGE_PROJECTILE, conga_localPtr->orangeSpawnPosition, congaPtr->yaw); if(orangePtr != NULL){ player_getPosition(plyr.pos); diff --git a/src/MM/ch/hut.c b/src/MM/ch/hut.c index c6615639..c6b41cdd 100644 --- a/src/MM/ch/hut.c +++ b/src/MM/ch/hut.c @@ -19,8 +19,8 @@ /* extern function declarations */ -void func_802C8F70(f32); -void func_802C4218(s32, s32, s32, s32); +void bundle_setYaw(f32); +void spawnQueue_bundle_f32(s32, s32, s32, s32); /* public function declarations */ Actor *chhut_draw(ActorMarker *, Gfx **, Mtx**, Vtx **); @@ -58,8 +58,8 @@ void func_803869EC(ActorMarker *this){ f32 *pos; actorPtr = marker_getActor(this); - actorPtr = spawn_actor_f32(0x4B, actorPtr->position, 0); - spawn_actor_f32(ACTOR_4D_STEAM_2, actorPtr->position, 0); + actorPtr = actor_spawnWithYaw_f32(0x4B, actorPtr->position, 0); + actor_spawnWithYaw_f32(ACTOR_4D_STEAM_2, actorPtr->position, 0); if(this); } @@ -95,9 +95,9 @@ void chhut_update(Actor *this){ subaddie_set_state(this, HUT_STATE_DAMAGED); actor_playAnimationOnce(this); __spawnQueue_add_1((GenFunction_1)func_803869EC, (s32)this->marker); - func_802C8F70(this->yaw); + bundle_setYaw(this->yaw); if(D_8037DCB0 < 5){ - __spawnQueue_add_4((GenFunction_4)func_802C4218, D_803898D8[D_8037DCB0], *(s32*)(&diff_pos[0]),*(s32*)(&diff_pos[1]),*(s32*)(&diff_pos[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, D_803898D8[D_8037DCB0], *(s32*)(&diff_pos[0]),*(s32*)(&diff_pos[1]),*(s32*)(&diff_pos[2])); } else{ jiggy_spawn(JIGGY_5_MM_HUTS, diff_pos); diff --git a/src/MM/ch/juju.c b/src/MM/ch/juju.c index 6865adbe..7681724b 100644 --- a/src/MM/ch/juju.c +++ b/src/MM/ch/juju.c @@ -70,7 +70,7 @@ void func_803890A0(ActorMarker *marker, s32 arg1){ position[1] = actorPtr->position_y; position[2] = actorPtr->position_z; for(i = 0; i < 4; i++){ - jujuPtr = spawn_actor_f32(ACTOR_59_JUJU, actorPtr->position, actorPtr->yaw); + jujuPtr = actor_spawnWithYaw_f32(ACTOR_59_JUJU, actorPtr->position, actorPtr->yaw); jujuPtr->marker->collidable = FALSE; actorPtr = marker_getActor(marker); func_80388DE8(actorPtr, i, jujuPtr); diff --git a/src/MM/ch/jujuhitbox.c b/src/MM/ch/jujuhitbox.c index 9610a518..6b85461f 100644 --- a/src/MM/ch/jujuhitbox.c +++ b/src/MM/ch/jujuhitbox.c @@ -74,7 +74,7 @@ void func_80388BEC(NodeProp *node, ActorMarker *marker){ ((ActorLocal_JujuHitbox *)&closest_actor->local)->unk4++; func_803892A8(((ActorLocal_JujuHitbox *)&closest_actor->local)->unk8); func_80353580(marker); - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x58, *(s32 *)&position[0], *(s32 *)&position[1], *(s32 *)&position[2]); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x58, *(s32 *)&position[0], *(s32 *)&position[1], *(s32 *)&position[2]); } } } diff --git a/src/RBB/ch/boombox.c b/src/RBB/ch/boombox.c index 4300f585..e65b3c3a 100644 --- a/src/RBB/ch/boombox.c +++ b/src/RBB/ch/boombox.c @@ -5,7 +5,7 @@ extern void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32); -extern void func_802C8F70(f32); +extern void bundle_setYaw(f32); extern int func_80309EB0(f32(*)[3], f32, f32 (*)[3], s32); extern int func_803342AC(f32(*)[3], f32(*)[3],f32); diff --git a/src/RBB/ch/bossboombox.c b/src/RBB/ch/bossboombox.c index 8fea46b3..c23ccfd6 100644 --- a/src/RBB/ch/bossboombox.c +++ b/src/RBB/ch/bossboombox.c @@ -375,12 +375,12 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ sp68[0] = this->position_x + 200.0f*local->unk0->unk4; sp68[1] = this->position_y + 80.0f*local->unk0->unk4; sp68[2] = this->position_z; - __spawnQueue_add_4((GenFunction_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); sp68[0] = this->position_x - 200.0f*local->unk0->unk4; sp68[1] = this->position_y + 80.0f*local->unk0->unk4; sp68[2] = this->position_z; - __spawnQueue_add_4((GenFunction_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); } }//L8038D378 diff --git a/src/RBB/ch/bossboomboxctrl.c b/src/RBB/ch/bossboomboxctrl.c index 9704ad48..ea24d8e2 100644 --- a/src/RBB/ch/bossboomboxctrl.c +++ b/src/RBB/ch/bossboomboxctrl.c @@ -24,7 +24,7 @@ void chBossBoomBoxCtrl_update(Actor *this){ if(jiggyscore_isSpawned(JIGGY_56_RBB_BOSS_BOOM_BOX) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME)){ marker_despawn(this->marker); }else{ - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_281_BOSS_BOOM_BOX_LARGEST, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_281_BOSS_BOOM_BOX_LARGEST, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z)); __chBossBoomBoxCtrl_setState(this, 1); } }//L8038DEF4 diff --git a/src/RBB/ch/whistlectrl.c b/src/RBB/ch/whistlectrl.c index 4a5a7476..dced3307 100644 --- a/src/RBB/ch/whistlectrl.c +++ b/src/RBB/ch/whistlectrl.c @@ -27,7 +27,7 @@ void __chWhistleCtrl_setState(Actor *actor, s32 arg1){ } void __chWhistleCtrl_soundWhistle(void){ - func_802C8F70(225.0f); + bundle_setYaw(225.0f); jiggy_spawn(JIGGY_54_RBB_WHISTLE, D_80390A74); } diff --git a/src/RBB/code_9670.c b/src/RBB/code_9670.c index 98df7990..cecded28 100644 --- a/src/RBB/code_9670.c +++ b/src/RBB/code_9670.c @@ -19,8 +19,8 @@ u8 D_803912B0; /* .code */ void RBB_func_8038FA60(ActorMarker *marker){ Actor *actor = marker_getActor(marker); - func_802C8F70(actor->yaw); - func_802C937C(6, &actor->position); + bundle_setYaw(actor->yaw); + bundle_spawn_f32(6, &actor->position); } void func_8038FA9C(Actor *this, s32 arg1){ diff --git a/src/SM/ch/vegetables.c b/src/SM/ch/vegetables.c index ed9d54e3..456e74b5 100644 --- a/src/SM/ch/vegetables.c +++ b/src/SM/ch/vegetables.c @@ -6,7 +6,7 @@ //external f32 mapModel_getFloorY(f32*); -void func_802C4218(s32, f32, f32, f32); +void spawnQueue_bundle_f32(s32, f32, f32, f32); void func_803252D0(f32, s32); void subaddie_set_state_with_direction(Actor *, s32, f32, s32); @@ -203,7 +203,7 @@ void func_80387C28(Actor * this){ if(this->unk38_31){ this->position_y += 100.0f; func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE); - __spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z)); }//L80387D64 func_803252D0(1.5f, 7); actor_collisionOff(this); diff --git a/src/SM/code_5B0.c b/src/SM/code_5B0.c index 09472111..e2c12a58 100644 --- a/src/SM/code_5B0.c +++ b/src/SM/code_5B0.c @@ -5,7 +5,7 @@ #include "prop.h" void func_803869A0(Actor*, f32, f32); -void func_802C4218(s32, f32, f32, f32); +void spawnQueue_bundle_f32(s32, f32, f32, f32); void SM_func_80386EF4(Actor *this); void SM_func_80386A00(Actor *this); @@ -113,7 +113,7 @@ void SM_func_80386D68(Actor *this){ if(this->unk100 && func_803870E8(this->unk100)){ func_802CA1CC(HONEYCOMB_18_SM_QUARRIES); - __spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1F, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, 0x1F, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); } marker_despawn(this->marker); } diff --git a/src/TTC/ch/blubber.c b/src/TTC/ch/blubber.c index eedaf6da..fa20c84a 100644 --- a/src/TTC/ch/blubber.c +++ b/src/TTC/ch/blubber.c @@ -69,7 +69,7 @@ void func_80387574(ActorMarker *caller, enum asset_e text_id, s32 arg1){ if(nodeProp_findPositionFromActorId(0x14b, sp24)){ jiggy_spawn(JIGGY_14_TTC_BLUBBER, sp24); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); } } diff --git a/src/TTC/ch/clam.c b/src/TTC/ch/clam.c index 32bfca8e..6a81640d 100644 --- a/src/TTC/ch/clam.c +++ b/src/TTC/ch/clam.c @@ -2,7 +2,7 @@ #include "functions.h" #include "variables.h" -extern void func_802C4218(s32, s32, s32, s32); +extern void spawnQueue_bundle_f32(s32, s32, s32, s32); extern f32 func_80257204(f32, f32, f32, f32); extern ActorProp * func_80320EB0(ActorMarker *, f32, s32); @@ -240,8 +240,8 @@ void __chClam_playerDropsItem(s32 index, enum item_e item_id){ f32 position[3]; player_getPosition(position); - func_802C8F70(randf2(0.0f, 359.0f)); - __spawnQueue_add_4((GenFunction_4)func_802C4218, index, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2])); + bundle_setYaw(randf2(0.0f, 359.0f)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_bundle_f32, index, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2])); item_dec(item_id); } diff --git a/src/TTC/ch/treasure.c b/src/TTC/ch/treasure.c index 943d16e3..7c51dd5b 100644 --- a/src/TTC/ch/treasure.c +++ b/src/TTC/ch/treasure.c @@ -22,7 +22,7 @@ ActorInfo gChTreasureInfo = { /* .code */ void __chtreasure_die(ActorMarker *marker, ActorMarker *otherMarker){ Actor *this = marker_getActor(marker); - __spawnQueue_add_4((GenFunction_4) func_802C4140, 0x4C, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4) spawnQueue_actor_f32, 0x4C, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); func_802EE278(this, 3, 0xf, 0x3C, 0.2f, 1.2f); func_803115C4(0xA19); jiggy_spawn(JIGGY_11_TTC_RED_X, this->position); diff --git a/src/TTC/ch/treasurehunt.c b/src/TTC/ch/treasurehunt.c index f423908f..2b6de7ba 100644 --- a/src/TTC/ch/treasurehunt.c +++ b/src/TTC/ch/treasurehunt.c @@ -92,7 +92,7 @@ void func_80389A1C(void) { Actor *actor; ActorLocal_TreasureHunt *local; - actor = spawn_actor_f32(0x55, D_8038C820[D_8037DCB4], 0); + actor = actor_spawnWithYaw_f32(0x55, D_8038C820[D_8037DCB4], 0); local = (ActorLocal_TreasureHunt *)&actor->local; actor->yaw = D_8038C868[D_8037DCB4]; local->unk0 = D_8037DCB4; @@ -105,7 +105,7 @@ void func_80389A9C(void) { ActorLocal_TreasureHunt *local; s32 actor_id; - actor = spawn_actor_f32((D_8038C898 - 1)[D_8037DCB4], D_8038C820[D_8037DCB4 - 1], 0); + actor = actor_spawnWithYaw_f32((D_8038C898 - 1)[D_8037DCB4], D_8038C820[D_8037DCB4 - 1], 0); local = (ActorLocal_TreasureHunt *)&actor->local; actor->yaw = D_8038C880[D_8037DCB4 - 1]; local->unk0 = D_8037DCB4; @@ -157,7 +157,7 @@ void func_80389CC4(s16 arg0[3], s32 arg1){ D_8038D708[1] = (f32)arg0[1]; D_8038D708[2] = (f32)arg0[2]; D_8038D708[1] = mapModel_getFloorY(D_8038D708); - __spawnQueue_add_4((GenFunction_4)func_802C4140, 0xF4, reinterpret_cast(s32, D_8038D708[0]), reinterpret_cast(s32, D_8038D708[1]), reinterpret_cast(s32, D_8038D708[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0xF4, reinterpret_cast(s32, D_8038D708[0]), reinterpret_cast(s32, D_8038D708[1]), reinterpret_cast(s32, D_8038D708[2])); D_8038D700 = partEmitMgr_newEmitter(3); particleEmitter_setRGB(D_8038D700, D_8038C91C); particleEmitter_setSprite(D_8038D700, ASSET_700_SPRITE_DUST); diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index a3f7c6a6..9c7dfe11 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -9,7 +9,7 @@ extern void func_803012F8(void); extern f32 ml_distanceSquared_vec3f(f32 arg0[3], f32 arg1[3]); extern void __baMarker_8028BA00(s32); -extern void func_802C418C(void); +extern void spawnQueue_actor_s16(void); extern void func_802A6388(f32); extern f32 chwadingboots_802D6E4C(Actor *); extern void set_turbo_duration(f32); @@ -160,7 +160,7 @@ void __baMarker_8028B9A8(s32 arg0){ tmp_v0 = cubeList_findNodePropByActorId(0x1F6, 0); nodeprop_getPosition_s32(tmp_v0, &ideal_yaw); func_802CA1CC(arg0); - func_8032811C(ACTOR_47_EMPTY_HONEYCOMB, &ideal_yaw, 0); + actor_spawnWithYaw_s32(ACTOR_47_EMPTY_HONEYCOMB, &ideal_yaw, 0); func_8025A6EC(COMUSIC_2B_DING_B, 28000); } @@ -575,7 +575,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ case 0x54: //L8028C820 func_8025A6EC(COMUSIC_19_LOW_PITCH_FLUTES, 28000); func_803012F8(); - __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); marker_despawn(marker); break; @@ -748,7 +748,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ miscFlag_set(MISC_FLAG_E_TOUCHING_WADING_BOOTS); func_802A6388(chwadingboots_802D6E4C(actor)); bs_checkInterrupt(BS_INTR_1B); - __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); chwadingboots_802D6E54(actor); break; @@ -772,7 +772,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ miscFlag_set(MISC_FLAG_10_TOUCHING_TURBO_TRAINERS); set_turbo_duration(chtrainers_getDuration(actor)); bs_checkInterrupt(BS_INTR_1A); - __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); chtrainers_pickup(actor); break; diff --git a/src/core2/ba/model.c b/src/core2/ba/model.c index 8037a355..64c86696 100644 --- a/src/core2/ba/model.c +++ b/src/core2/ba/model.c @@ -145,7 +145,7 @@ void baModel_reset(void){ if(!func_8028ADB4()) baModel_updateModel(); player_getPosition(plyr_pos); - __spawnQueue_add_4((GenFunction_4)func_802C4140, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_17_PLAYER_SHADOW, reinterpret_cast(s32, plyr_pos[0]), reinterpret_cast(s32, plyr_pos[1]), diff --git a/src/core2/ch/badShad.c b/src/core2/ch/badShad.c index f2cf4eb2..395f32f1 100644 --- a/src/core2/ch/badShad.c +++ b/src/core2/ch/badShad.c @@ -114,7 +114,7 @@ void func_802D71A0(s32 this, s32 arg1){ sp2C[0] = (s32) D_8037DE10[0]; sp2C[1] = (s32) D_8037DE10[1]; sp2C[2] = (s32) D_8037DE10[2]; - sp3C = spawn_actor(0x108, sp2C, (s32)sp38->yaw); + sp3C = __actor_spawnWithYaw_s32(0x108, sp2C, (s32)sp38->yaw); if(sp3C){ marker_getActor(marker)->unk104 = sp3C->marker; sp3C->unk104 = marker; diff --git a/src/core2/ch/beehive.c b/src/core2/ch/beehive.c index 74a80315..48e6070e 100644 --- a/src/core2/ch/beehive.c +++ b/src/core2/ch/beehive.c @@ -31,8 +31,8 @@ void chBeehive_die(ActorMarker *this, ActorMarker *other){ actor_playAnimationOnce(actor); 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])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 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)spawnQueue_actor_f32, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); actor->marker->propPtr->unk8_3 = 0; func_803115C4(ASSET_D96_DIALOG_BEEHIVE_MEET); func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES); diff --git a/src/core2/ch/bottlesbonus.c b/src/core2/ch/bottlesbonus.c index 6e661681..ea0ca60a 100644 --- a/src/core2/ch/bottlesbonus.c +++ b/src/core2/ch/bottlesbonus.c @@ -548,7 +548,7 @@ void chBottlesBonus_update(Actor *this) { void __chBottlesBonus_spawn(void){ Actor *actor; if(chBottlesBonusMarker == NULL){ - actor = spawn_actor_f32(0x1E0, D_803682C4, 0); + actor = actor_spawnWithYaw_f32(0x1E0, D_803682C4, 0); chBottlesBonusMarker = actor->marker; chBottlesBonusCursor_spawn(); func_802DF270(); diff --git a/src/core2/ch/bottlesbonuscursor.c b/src/core2/ch/bottlesbonuscursor.c index 01de7ec5..a45b9853 100644 --- a/src/core2/ch/bottlesbonuscursor.c +++ b/src/core2/ch/bottlesbonuscursor.c @@ -170,7 +170,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { } ActorMarker *chBottlesBonusCursor_spawn(void){ - Actor *this = spawn_actor_f32(0x2B4, D_80368400, 0); + Actor *this = actor_spawnWithYaw_f32(0x2B4, D_80368400, 0); chBottlesBonusCursorMarker = this->marker; return chBottlesBonusCursorMarker; } diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index 10de9c57..ef213ba5 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -179,7 +179,7 @@ void __chCrab_die(ActorMarker *marker, ActorMarker *other){ is_black_snippet = this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET; FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 32750, this->position, 950, 1900); FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 28000, this->position, 950, 1900); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); this->lifetime_value = 5.0f; marker->collidable = FALSE; this->unk138_27 = 1; diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index b844bfdd..8ac16e09 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -287,7 +287,7 @@ void func_802C4BB4(ActorMarker *marker){ sp20 = marker->id - 0xe4; this = marker_getActor(marker); sp18 = this->scale; - other = spawn_actor_f32(sp20 + 0x198, this->position, (s32)this->yaw); + other = actor_spawnWithYaw_f32(sp20 + 0x198, this->position, (s32)this->yaw); other->scale = sp18; } diff --git a/src/core2/ch/gloop.c b/src/core2/ch/gloop.c index cf460ecb..88c4d951 100644 --- a/src/core2/ch/gloop.c +++ b/src/core2/ch/gloop.c @@ -38,7 +38,7 @@ void chgloop_spawnBubble(s32 arg0, s32 arg1, s32 arg2, s32 arg3){ sp1C[0] = reinterpret_cast(f32, arg0); sp1C[1] = reinterpret_cast(f32, arg1); sp1C[2] = reinterpret_cast(f32, arg2); - spawn_actor_f32(ACTOR_E7_GLOOP_BUBBLE, sp1C, (s32)reinterpret_cast(f32, arg3)); + actor_spawnWithYaw_f32(ACTOR_E7_GLOOP_BUBBLE, sp1C, (s32)reinterpret_cast(f32, arg3)); } void chgloop_update(Actor *this){ diff --git a/src/core2/ch/icecube.c b/src/core2/ch/icecube.c index acebfc2c..58b58455 100644 --- a/src/core2/ch/icecube.c +++ b/src/core2/ch/icecube.c @@ -5,7 +5,7 @@ #define _HorzDist3v(v1, v2) ((v1[0]-v2[0])*(v1[0]-v2[0]) + (v1[2]-v2[2])*(v1[2]-v2[2])) extern void func_802D729C(Actor *, f32); extern f32 func_80257204(f32, f32, f32, f32); -extern Actor *func_802C937C(enum actor_e, f32[3]); +extern Actor *bundle_spawn_f32(enum actor_e, f32[3]); void chicecube_update(Actor *this); Actor *chicecube_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); @@ -201,8 +201,8 @@ void __chicecube_spawnHalfCubes(ActorMarker *marker){ sp54[2] = actor->position[2]; sp54[1] += 100.0f; for(i = 0; i < 2; i++){//L8035A7FC - func_802C8F70((i & 1)? actor->yaw : actor->yaw + 180.0f); - other = func_802C937C(0x21, sp54); + bundle_setYaw((i & 1)? actor->yaw : actor->yaw + 180.0f); + other = bundle_spawn_f32(0x21, sp54); other->unkF4_8 = 1; //don't spawn more other->scale = randf2(0.5f, 0.6f)*actor->scale; actor->yaw = randi2(0, 359); diff --git a/src/core2/ch/jiggy.c b/src/core2/ch/jiggy.c index 04efbefa..d3fed8d4 100644 --- a/src/core2/ch/jiggy.c +++ b/src/core2/ch/jiggy.c @@ -13,7 +13,7 @@ typedef struct chjiggy_s{ u32 index; } ActorLocal_Jiggy; -Actor *func_802C41D8(f32, f32, f32); +Actor *spawnQueue_actor_s32(f32, f32, f32); void func_802C7AF8(u32 x, u32 y, u32 z, u32 arg3); Actor *chjiggy_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3); void func_802C7D98(Actor * arg0); @@ -63,8 +63,8 @@ void func_802C7AB0(ActorMarker * arg0, u32 arg1){ } void func_802C7AF8(u32 x, u32 y, u32 z, u32 arg3){ - __spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_4C_STEAM, x, y, z); - __spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_14F_DESTROYED_JIGGY, x, y, z); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s32, ACTOR_4C_STEAM, x, y, z); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s32, ACTOR_14F_DESTROYED_JIGGY, x, y, z); mapSpecificFlags_set(arg3, 1); } diff --git a/src/core2/ch/overlaycopyright.c b/src/core2/ch/overlaycopyright.c index bbe04271..1db011b6 100644 --- a/src/core2/ch/overlaycopyright.c +++ b/src/core2/ch/overlaycopyright.c @@ -34,7 +34,7 @@ void chOverlayCopyright_update(Actor *this){ void __chOverlayCopyright_spawn(void) { Actor *actor; if (chOverlayCopyrightMarker == 0) { - actor = spawn_actor_f32(ACTOR_1DD_COPYRIGHT_OVERLAY, D_803680D0, 0); + actor = actor_spawnWithYaw_f32(ACTOR_1DD_COPYRIGHT_OVERLAY, D_803680D0, 0); chOverlayCopyrightMarker = actor->marker; } } diff --git a/src/core2/ch/overlaynocontroller.c b/src/core2/ch/overlaynocontroller.c index baa7fca9..66637a77 100644 --- a/src/core2/ch/overlaynocontroller.c +++ b/src/core2/ch/overlaynocontroller.c @@ -5,7 +5,7 @@ #include -extern Actor *spawn_actor_f32(enum actor_e, f32[3], s32); +extern Actor *actor_spawnWithYaw_f32(enum actor_e, f32[3], s32); extern void actor_postdrawMethod(ActorMarker *marker); Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); @@ -76,7 +76,7 @@ void chOverlayNoController_update(Actor *this) { void __chOverlayNoController_spawn(void){ if(chOverlayNoController_marker == NULL){ - chOverlayNoController_marker = spawn_actor_f32(ACTOR_1DF_NO_CONTROLLER_OVERLAY, D_80368168, 0)->marker; + chOverlayNoController_marker = actor_spawnWithYaw_f32(ACTOR_1DF_NO_CONTROLLER_OVERLAY, D_80368168, 0)->marker; } } diff --git a/src/core2/ch/overlaypressstart.c b/src/core2/ch/overlaypressstart.c index fd4e4051..0bddb180 100644 --- a/src/core2/ch/overlaypressstart.c +++ b/src/core2/ch/overlaypressstart.c @@ -8,7 +8,7 @@ extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32); extern void actor_predrawMethod(Actor *); extern void actor_postdrawMethod(ActorMarker *); -extern Actor *spawn_actor_f32(enum actor_e id, f32[3], s32); +extern Actor *actor_spawnWithYaw_f32(enum actor_e id, f32[3], s32); Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); @@ -88,7 +88,7 @@ void chOverlayPressStart_update(Actor *this){ void __chOverlayPressStart_spawn(void){ if(D_8037DE80 == NULL){ - D_8037DE80 = spawn_actor_f32(ACTOR_1DE_PRESS_START_OVERLAY, D_80368118, 0)->marker; + D_8037DE80 = actor_spawnWithYaw_f32(ACTOR_1DE_PRESS_START_OVERLAY, D_80368118, 0)->marker; } } diff --git a/src/core2/ch/shrapnel.c b/src/core2/ch/shrapnel.c index 339e51ed..0617e412 100644 --- a/src/core2/ch/shrapnel.c +++ b/src/core2/ch/shrapnel.c @@ -50,7 +50,7 @@ void chShrapnel_func_802D0AB8(Actor *this) { void chShrapnel_spawnExplodeActor(s32 arg0){ Actor *this = reinterpret_cast(Actor *, arg0); - spawn_actor_f32(0xF3, this->unk1C, 0); + actor_spawnWithYaw_f32(0xF3, this->unk1C, 0); } void chShrapnel_emitExplosion(Actor *this) { diff --git a/src/core2/ch/snacker.c b/src/core2/ch/snacker.c index 65b81e93..dad5a5ea 100644 --- a/src/core2/ch/snacker.c +++ b/src/core2/ch/snacker.c @@ -359,7 +359,7 @@ void chSnacker_spawn(void) { } } - snacker = spawn_actor_f32(ACTOR_68_SNACKER, spawn_position, 0); + snacker = actor_spawnWithYaw_f32(ACTOR_68_SNACKER, spawn_position, 0); s_chSnacker_marker = snacker->marker; local = (ChSnackerLocal *)&snacker->local; diff --git a/src/core2/ch/soundsource.c b/src/core2/ch/soundsource.c index 9c8ed854..ba79e25a 100644 --- a/src/core2/ch/soundsource.c +++ b/src/core2/ch/soundsource.c @@ -110,7 +110,7 @@ void func_802D096C(s32 arg0, s32 arg1, s32 arg2, s32 arg3){ sp1C[0] = reinterpret_cast(f32, arg0); sp1C[1] = reinterpret_cast(f32, arg1); sp1C[2] = reinterpret_cast(f32, arg2); - spawn_actor_f32(0x28B, sp1C, arg3); + actor_spawnWithYaw_f32(0x28B, sp1C, arg3); } diff --git a/src/core2/code_16010.c b/src/core2/code_16010.c index e4ecf392..1696e574 100644 --- a/src/core2/code_16010.c +++ b/src/core2/code_16010.c @@ -53,7 +53,7 @@ void func_8029D0D8(void) { void func_8029D154(void){ f32 plyr_pos[3]; player_getPosition(plyr_pos); - spawn_actor_f32(0x188, plyr_pos, (s32)yaw_get()); + actor_spawnWithYaw_f32(0x188, plyr_pos, (s32)yaw_get()); } void func_8029D194(void) { diff --git a/src/core2/code_41FB0.c b/src/core2/code_41FB0.c index 76bb1e53..ef5f8baf 100644 --- a/src/core2/code_41FB0.c +++ b/src/core2/code_41FB0.c @@ -64,137 +64,145 @@ enum core2_41FB0_e{ }; // #define 41FB0_FLAG_SET_YAW 0x0020 -struct41FB0s D_80366460[] = { - /*MM HUT 1*/ {0x0021, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, - /*MM HUT 2*/ {0x0021, ACTOR_52_BLUE_EGG, 5, SFX_21_EGG_BOUNCE_1, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - /*MM HUT 3*/ {0x0021, ACTOR_6_GRUBLIN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 0.0f, 0.0f, 550.0f, 250.0f, 200.0f, 0.0f, 0.6f, 0.0f}, - /*MM HUT 4*/ {0x0021, ACTOR_62_JINJO_GREEN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - /*MM HUT 6*/ {0x0021, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 16000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - /*MM HUT 5*/ {0x0021, ACTOR_49_EXTRA_LIFE, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.6f, 0.0f}, - {0x0049, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 300.0f, 0.0f, 0.5f, 0.0f}, - /*BGS HUT 1,2,4,5 */{0x002D, ACTOR_B_SHOCKSPRING_PAD, 1, 0, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.2f, 315.0f}, - /*BGS HUT 3 */ {0x0005, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 75.0f, 0.0f, 725.0f, 0.0f, 75.0f, 0.0f, 0.6f, 0.0f}, - /*BGS HUT 4 */ {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, - {0x0009, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 300.0f, 0.0f, 0.6f, 0.0f}, - /*YUM YUM EGG*/ {0x0001, ACTOR_52_BLUE_EGG, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, - /*YUM YUM FEATHER*/ {0x0001, ACTOR_129_RED_FEATHER, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, - /*0x10*/{0x0005, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.75f, 0.0f}, - {0x0005, 0x06A, 1, 0, 0, 0, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0009, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 650.0f, 0.0f, 950.0f, 0.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_51_MUSIC_NOTE, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x0065, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.7f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 250.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 2, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - /* SM QUARRIES & VEGGIES*/ {0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0129, 0x352, 1, SFX_3F2_UNKNOWN, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f}, - {0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} +struct41FB0s gBundle_array[] = { + /*MM HUT 1*/ {0x0021, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, + /*MM HUT 2*/ {0x0021, ACTOR_52_BLUE_EGG, 5, SFX_21_EGG_BOUNCE_1, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + /*MM HUT 3*/ {0x0021, ACTOR_6_GRUBLIN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 0.0f, 0.0f, 550.0f, 250.0f, 200.0f, 0.0f, 0.6f, 0.0f}, + /*MM HUT 4*/ {0x0021, ACTOR_62_JINJO_GREEN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + /*MM HUT 6*/ {0x0021, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 16000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + /*MM HUT 5*/ {0x0021, ACTOR_49_EXTRA_LIFE, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.6f, 0.0f}, + {0x0049, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 300.0f, 0.0f, 0.5f, 0.0f}, + /*BGS HUT 1,2,4,5*/ {0x002D, ACTOR_B_SHOCKSPRING_PAD, 1, 0, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.2f, 315.0f}, + /*BGS HUT 3*/ {0x0005, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 75.0f, 0.0f, 725.0f, 0.0f, 75.0f, 0.0f, 0.6f, 0.0f}, + /*BGS HUT 4*/ {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, + {0x0009, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 300.0f, 0.0f, 0.6f, 0.0f}, + /*YUM YUM EGG*/ {0x0001, ACTOR_52_BLUE_EGG, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, + /*YUM YUM FEATHER*/ {0x0001, ACTOR_129_RED_FEATHER, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, + /*0x10*/ {0x0005, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.75f, 0.0f}, + {0x0005, ACTOR_6A_UNKNOWN, 1, 0, 0, 0, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0009, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 650.0f, 0.0f, 950.0f, 0.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_51_MUSIC_NOTE, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, + {0x0001, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x0065, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.7f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 250.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 2, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + /*SM QUARRIES & VEGGIES*/ {0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f}, + {0x0129, ACTOR_352_UNKOWN, 1, SFX_3F2_UNKNOWN, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f}, + {0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} }; /* .bss */ s32 D_8037DDB0; -f32 D_8037DDB4; +f32 gBundle_yaw; f32 D_8037DDB8; /* .public */ -Actor *func_802C937C(s32 arg0, f32 position[3]); +Actor *bundle_spawn_f32(s32 arg0, f32 position[3]); /* .code */ void func_802C8F40(void){ D_8037DDB0 = 0; - D_8037DDB4 = 0.0f; + gBundle_yaw = 0.0f; D_8037DDB8 = 1.0f; } void func_802C8F68(void){} -void func_802C8F70(f32 arg0){ - D_8037DDB4 = arg0; +void bundle_setYaw(f32 yaw){ + gBundle_yaw = yaw; } void func_802C8F7C(f32 arg0){ D_8037DDB8 = arg0; } -Actor *func_802C8F88(s32 arg0, s32 arg1[3]){ - f32 sp1C[3]; - - sp1C[0] = arg1[0]; - sp1C[1] = arg1[1]; - sp1C[2] = arg1[2]; - return func_802C937C(arg0, sp1C); +Actor *bundle_spawn_s32(s32 index, s32 position[3]){ + f32 pos_float[3]; + pos_float[0] = position[0]; + pos_float[1] = position[1]; + pos_float[2] = position[2]; + return bundle_spawn_f32(index, pos_float); } -Actor *func_802C8FE4(s32 arg0, f32 position[3], Actor *arg2){ +Actor *__bundle_spawnWithFirstActor(s32 index, f32 position[3], Actor *firstActor) { static f32 D_80366C4C = 400.0f; - struct41FB0s * sp74; //s2 + struct41FB0s *bundle; //s2 Actor *actor; //s3 s32 i; struct41FB0s_1 *s0; - sp74 = D_80366460 + arg0; + bundle = gBundle_array + index; actor = NULL; - for(i = 0; i < sp74->count; i++){//L802C90B0 - D_8037DDB4 += 360.0/sp74->count; - while(360.0 <= D_8037DDB4){ D_8037DDB4 -= 360.0;} + + for (i = 0; i < bundle->count; i++) {//L802C90B0 + gBundle_yaw += 360.0 / bundle->count; + + while (360.0 <= gBundle_yaw) { + gBundle_yaw -= 360.0; + } + //L802C9114 - actor =(i == 0 && arg2) ? arg2 : spawn_actor_f32(sp74->actor_id, position, 0); + actor = (i == 0 && firstActor) ? firstActor : actor_spawnWithYaw_f32(bundle->actor_id, position, 0); actor->unk10_0 = 1; + s0 = (struct41FB0s_1 *) &actor->unkBC; - s0->unk0 = arg0; + s0->unk0 = index; s0->unk2F = 1; s0->unk6 = 1; ml_vec3f_copy(s0->unk8, actor->position); ml_vec3f_copy(actor->position, s0->unk8); - if(D_8037DDB8 != 1.0f){ - s0->unk14[0] = sp74->unk14*D_8037DDB8; - s0->unk14[1] = sp74->unk1C + randf2(0.0f, sp74->unk20); - s0->unk14[2] = sp74->unk24*D_8037DDB8; + + if (D_8037DDB8 != 1.0f) { + s0->unk14[0] = bundle->unk14 * D_8037DDB8; + s0->unk14[1] = bundle->unk1C + randf2(0.0f, bundle->unk20); + s0->unk14[2] = bundle->unk24 * D_8037DDB8; D_8037DDB8 = 1.0f; } - else{//L802C91CC - s0->unk14[0] = sp74->unk14 + randf2(0.0f, sp74->unk18); - s0->unk14[1] = sp74->unk1C + randf2(0.0f, sp74->unk20); - s0->unk14[2] = sp74->unk24 + randf2(0.0f, sp74->unk28); - + else {//L802C91CC + s0->unk14[0] = bundle->unk14 + randf2(0.0f, bundle->unk18); + s0->unk14[1] = bundle->unk1C + randf2(0.0f, bundle->unk20); + s0->unk14[2] = bundle->unk24 + randf2(0.0f, bundle->unk28); }//L802C9210 - ml_vec3f_yaw_rotate_copy(s0->unk14, s0->unk14, D_8037DDB4); + + ml_vec3f_yaw_rotate_copy(s0->unk14, s0->unk14, gBundle_yaw); s0->unk24 = D_80366C4C *= -1; - actor->yaw = s0->unk20 = (sp74->unk0 & 0x20) ? sp74->unk30 : randf2(0.0f, 360.0f); + actor->yaw = s0->unk20 = (bundle->unk0 & 0x20) ? bundle->unk30 : randf2(0.0f, 360.0f); s0->unk28 = 0.0f; s0->unk2C = 0; s0->unk2D = 1; - s0->unk4 = sp74->unk0; - s0->unk2E = (sp74->unk0 & 0x1) ? (0.5 < randf()) : 0 ; - if(sp74->unk0 & 0x200){ + s0->unk4 = bundle->unk0; + s0->unk2E = (bundle->unk0 & 0x1) ? (0.5 < randf()) : 0; + + if (bundle->unk0 & 0x200) { actor->unk5C = s0->unk8[1]; } }//L802C92E8 + return actor; } -Actor *func_802C9334(s32 arg0, Actor * arg1){ - D_80366460[arg0].unk30 = arg1->yaw; - return func_802C8FE4(arg0, arg1->position, arg1); +Actor *__bundle_spawnFromFirstActor(s32 index, Actor *actor) { + gBundle_array[index].unk30 = actor->yaw; + return __bundle_spawnWithFirstActor(index, actor->position, actor); } -Actor *func_802C937C(s32 arg0, f32 position[3]){ - return func_802C8FE4(arg0, position, 0); +Actor *bundle_spawn_f32(s32 index, f32 position[3]) { + return __bundle_spawnWithFirstActor(index, position, NULL); } bool func_802C939C(Actor *actor, f32 arg1[3], f32 arg2[3], f32 arg3[3], bool arg4) { @@ -288,8 +296,11 @@ void func_802C96E4(Actor *actor) { sp6C = time_getDelta(); sp68 = (struct41FB0s_1 *)&actor->unkBC; - sp64 = &D_80366460[sp68->unk0]; - if (D_8037DDB0 > 0) D_8037DDB0--; + sp64 = &gBundle_array[sp68->unk0]; + + if (D_8037DDB0 > 0) { + D_8037DDB0--; + } switch (sp68->unk2F) { case 3: diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index fdf48337..4848b0e6 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -746,7 +746,7 @@ void func_802D4D3C(enum actor_e arg0, enum actor_e arg1) { func_8030E6D4(SFX_1B_EXPLOSION_1); } else{ - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, sp5C[0]), reinterpret_cast(s32, sp5C[1]), reinterpret_cast(s32, sp5C[2]) diff --git a/src/core2/code_51950.c b/src/core2/code_51950.c index 09405d4d..aaad496a 100644 --- a/src/core2/code_51950.c +++ b/src/core2/code_51950.c @@ -81,7 +81,7 @@ void func_802D8B20(enum actor_e actor_id){ player_getPosition(plyr_pos); temp2 = player_getYaw(); temp_v0 = (randf() > 0.5) ? 0x1E : -0x1E; - feather = spawn_actor_f32(actor_id, plyr_pos, (s32) (temp2 + temp_v0)); + feather = actor_spawnWithYaw_f32(actor_id, plyr_pos, (s32) (temp2 + temp_v0)); func_8032AA58(feather, 0.45f); feather->unk28 = 22.0f; feather->unk1C[1] = 48.0f; diff --git a/src/core2/code_55390.c b/src/core2/code_55390.c index de380e60..81401138 100644 --- a/src/core2/code_55390.c +++ b/src/core2/code_55390.c @@ -75,7 +75,7 @@ void func_802DC45C(Actor *this){ void func_802DC4C4(void) { Actor *actor; if (D_8037DE40 == 0) { - actor = spawn_actor_f32(ACTOR_1DB_GAME_OVER, D_80368040, 0); + actor = actor_spawnWithYaw_f32(ACTOR_1DB_GAME_OVER, D_80368040, 0); D_8037DE40 = actor->marker; func_8025A58C(0, 5000); func_8025AB00(); diff --git a/src/core2/code_556C0.c b/src/core2/code_556C0.c index bd3256ef..ab3d2786 100644 --- a/src/core2/code_556C0.c +++ b/src/core2/code_556C0.c @@ -37,7 +37,7 @@ void func_802DC67C(Actor *this){ void func_802DC6E4(void) { Actor *actor; if (D_8037DE50 == 0) { - actor = spawn_actor_f32(0x19C, D_80368070, 0); + actor = actor_spawnWithYaw_f32(0x19C, D_80368070, 0); D_8037DE50 = actor->marker; func_8025A58C(0, 5000); func_8025AB00(); diff --git a/src/core2/code_55850.c b/src/core2/code_55850.c index 7f1be422..deb6e111 100644 --- a/src/core2/code_55850.c +++ b/src/core2/code_55850.c @@ -70,7 +70,7 @@ void func_802DC900(Actor *this){ void func_802DC960(void) { Actor *actor; if (D_8037DE60 == 0) { - actor = spawn_actor_f32(0x1DC, D_803680A0, 0); + actor = actor_spawnWithYaw_f32(0x1DC, D_803680A0, 0); D_8037DE60 = actor->marker; } } diff --git a/src/core2/code_57C70.c b/src/core2/code_57C70.c index 463f1a28..e778e9bc 100644 --- a/src/core2/code_57C70.c +++ b/src/core2/code_57C70.c @@ -156,7 +156,7 @@ void func_802DEE1C(Actor *this) { void func_802DF04C(void){ Actor *this; if(D_8037DFE0 == NULL){ - this = spawn_actor_f32(0x19B, D_80368330, 0); + this = actor_spawnWithYaw_f32(0x19B, D_80368330, 0); D_8037DFE0 = this->marker; } } diff --git a/src/core2/code_581D0.c b/src/core2/code_581D0.c index f10f08f5..728eb5ca 100644 --- a/src/core2/code_581D0.c +++ b/src/core2/code_581D0.c @@ -41,7 +41,7 @@ Actor *func_802DF160(Gfx **gfx, Mtx **mtx, Vtx **vtx) { void func_802DF270(void){ Actor *this; if(D_8037E000 == NULL){ - this = spawn_actor_f32(0x2B5, D_80368360, 0); + this = actor_spawnWithYaw_f32(0x2B5, D_80368360, 0); D_8037E000 = this->marker; } } diff --git a/src/core2/code_6B30.c b/src/core2/code_6B30.c index b02f725e..52084bdc 100644 --- a/src/core2/code_6B30.c +++ b/src/core2/code_6B30.c @@ -4,7 +4,7 @@ #include "core2/ba/carry.h" #include "core2/ba/physics.h" -extern Actor *spawn_actor_f32(enum actor_e, f32[3], s32); +extern Actor *actor_spawnWithYaw_f32(enum actor_e, f32[3], s32); /* .bss */ u8 D_8037BFA0; @@ -116,7 +116,7 @@ void func_8028DE0C(enum actor_e actor_id){ f32 sp20[3]; baModel_getPosition(sp20); - actor = spawn_actor_f32(actor_id, sp20, (s32) yaw_get()); + actor = actor_spawnWithYaw_f32(actor_id, sp20, (s32) yaw_get()); actor->unk138_22 = TRUE; bacarry_set_marker(actor->marker); bs_setState(BS_3A_CARRY_IDLE); diff --git a/src/core2/code_7AF80.c b/src/core2/code_7AF80.c index 1b82efa4..c7cb9ff8 100644 --- a/src/core2/code_7AF80.c +++ b/src/core2/code_7AF80.c @@ -1238,7 +1238,7 @@ NodeProp *func_80305510(s32 arg0) { } Actor * func_803055E0(enum actor_e arg0, s32 arg1[3], s32 arg2, s32 arg3, s32 arg4){ - Actor *actor = spawn_actor(arg0, arg1, arg2); + Actor *actor = __actor_spawnWithYaw_s32(arg0, arg1, arg2); NodeProp *tmp; s32 sp34[3]; f32 sp28[3]; @@ -1263,7 +1263,7 @@ Actor * func_803055E0(enum actor_e arg0, s32 arg1[3], s32 arg2, s32 arg3, s32 ar return actor; } -Actor *spawn_actor(enum actor_e arg0, s32 pos[3], s32 rot) { +Actor *__actor_spawnWithYaw_s32(enum actor_e arg0, s32 pos[3], s32 rot) { s32 i; arg0 = (!dummy_func_80320248()) ? (ACTOR_4_BIGBUTT) : (arg0); diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 7cbf85e1..6b8db97b 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -17,10 +17,10 @@ extern void func_802EE6CC(f32[3], s32[4], s32[4], s32, f32, f32, s32, s32, s32); extern void func_8033A244(f32); f32 func_80257204(f32, f32, f32, f32); -extern Actor *func_802C4260(enum actor_e actor_id, s32 x, s32 y, s32 z, s32 yaw); +extern Actor *spawnQueue_bundleWithYaw_f32(s32 actor_id, s32 x, s32 y, s32 z, s32 yaw); f32 func_8033229C(ActorMarker *); f32 player_getYaw(void); -extern void func_802C9334(s32, Actor *); +extern void __bundle_spawnFromFirstActor(s32, Actor *); extern void func_8032B3A0(Actor *, ActorMarker *); extern void func_8032EE0C(GenFunction_2, s32); extern void func_8032EE20(void); @@ -1056,11 +1056,11 @@ static void __actor_free(ActorMarker *arg0, Actor *arg1){ marker_free(arg0); } -Actor *func_8032811C(enum actor_e id, s32 (* pos)[3], s32 rot){ - return spawn_actor(id, pos, rot); +Actor *actor_spawnWithYaw_s32(enum actor_e id, s32 (* pos)[3], s32 rot){ + return __actor_spawnWithYaw_s32(id, pos, rot); } -Actor *spawn_actor_f32(enum actor_e id, f32 pos[3], s32 rot){ +Actor *actor_spawnWithYaw_f32(enum actor_e id, f32 pos[3], s32 rot){ s32 pos_float[3]; int i; @@ -1068,7 +1068,7 @@ Actor *spawn_actor_f32(enum actor_e id, f32 pos[3], s32 rot){ pos_float[i] = pos[i]; } - spawn_actor(id, &pos_float, rot); + __actor_spawnWithYaw_s32(id, &pos_float, rot); } Actor * spawn_child_actor(enum actor_e id, Actor ** parent){ @@ -1078,7 +1078,7 @@ Actor * spawn_child_actor(enum actor_e id, Actor ** parent){ sp1C[0] = (*parent)->position_x; sp1C[1] = (*parent)->position_y; sp1C[2] = (*parent)->position_z; - child = spawn_actor(id, sp1C, (*parent)->yaw); + child = __actor_spawnWithYaw_s32(id, sp1C, (*parent)->yaw); *parent = marker_getActor(sp28); return child; } @@ -1096,13 +1096,15 @@ Actor *func_80328230(enum actor_e id, f32 pos[3], f32 rot[3]){ return actor; } -Actor *func_803282AC(enum actor_e id, s16 (* pos)[3], s32 yaw){ +Actor *actor_spawnWithYaw_s16(enum actor_e id, s16 (* pos)[3], s32 yaw){ s32 sp24[3]; int i; + for(i = 0; i< 3; i++){ sp24[i] = (*pos)[i]; } - return spawn_actor(id, &sp24, yaw); + + return __actor_spawnWithYaw_s32(id, &sp24, yaw); } void marker_despawn(ActorMarker *marker){ @@ -1856,7 +1858,7 @@ void func_8032A09C(s32 arg0, ActorListSaveState *arg1) { sp50[1] = (s32) var_s0->position[1]; sp50[2] = (s32) var_s0->position[2]; pad = var_s0->yaw; - temp_v0_6 = func_8032811C(var_s0->modelCacheIndex, (sp50), pad); + temp_v0_6 = actor_spawnWithYaw_s32(var_s0->modelCacheIndex, (sp50), pad); actor_copy(var_s0, temp_v0_6); func_80329B68(temp_v0_6); func_803299B4(temp_v0_6); @@ -2180,12 +2182,12 @@ void func_8032B258(Actor *this, enum collision_e arg1) { func_8034A174( this->marker->unk44, 0x20, sp38); } if (((s32)this->marker->unk44 < 0) && ((sp38[0] != 0.0f) || (sp38[1] != 0.0f) || (sp38[2] != 0.0f))) { - __spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44)); return; } else{ sp34 = this->position[1] + 50.0f; - __spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44)); } } } @@ -2266,13 +2268,13 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { } } if (sp6C != 0) { - func_802C8F70(func_80257204(arg0->propPtr->x, arg0->propPtr->z, arg1->propPtr->x, arg1->propPtr->z) + 90.0f); + bundle_setYaw(func_80257204(arg0->propPtr->x, arg0->propPtr->z, arg1->propPtr->x, arg1->propPtr->z) + 90.0f); D_8036E564 = sp6C; if (this->unk138_25) { - func_802C9334(sp6C + 0x21, this); + __bundle_spawnFromFirstActor(sp6C + 0x21, this); } else { if ((this->marker->id < 0x1A1) || (this->marker->id >= 0x1A5)) { - func_802C9334(sp6C + 0x18, this); + __bundle_spawnFromFirstActor(sp6C + 0x18, this); } } } @@ -2301,15 +2303,15 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { } func_8032EE0C(func_8032B38C, this); if (((s32)arg0->unk44 < 0) && ((sp50[0] != 0.0f) || (sp50[1] != 0.0f) || (sp50[2] != 0.0f))) { - __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); } else if (this->unk16C_3 && func_803048E0(sp3C, &sp4C, &sp48, 3, (s32) (func_8033229C(arg0) * 4.0f))) { sp50[0] = (f32) sp48->x; sp50[1] = (f32) sp48->y; sp50[2] = (f32) sp48->z; - __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); } else { sp38 = this->position[1] + func_8033229C(arg0); - __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, player_yaw)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, player_yaw)); } func_8032EE20(); } diff --git a/src/core2/code_C0B80.c b/src/core2/code_C0B80.c index a4314f24..a96e9653 100644 --- a/src/core2/code_C0B80.c +++ b/src/core2/code_C0B80.c @@ -6,7 +6,7 @@ extern void func_80329904(ActorMarker *, s32, f32 *); void func_80347B10(Struct81s *arg0){ Actor *actor; - actor = func_802C937C(0x10, arg0->position); + actor = bundle_spawn_f32(0x10, arg0->position); actor->unk54 = 3.0f; func_803333DC(arg0, actor); } diff --git a/src/core2/code_C0CF0.c b/src/core2/code_C0CF0.c index 5e989178..bd899f44 100644 --- a/src/core2/code_C0CF0.c +++ b/src/core2/code_C0CF0.c @@ -8,7 +8,7 @@ extern void func_80329904(ActorMarker *, s32, f32 *); /* .code */ void func_80347C80(Struct81s *arg0){ Actor *actor; - actor = spawn_actor_f32(ACTOR_46_JIGGY, arg0->position, 0); + actor = actor_spawnWithYaw_f32(ACTOR_46_JIGGY, arg0->position, 0); actor->unk54 = 3.0f; func_803333DC(arg0, actor); } diff --git a/src/core2/code_C0E60.c b/src/core2/code_C0E60.c index 66ad4e7c..743230b2 100644 --- a/src/core2/code_C0E60.c +++ b/src/core2/code_C0E60.c @@ -73,7 +73,7 @@ s32 spriteRender1PrimMode; /* .code */ void func_80347DF0(Struct81s *arg0){ Actor *actor; - actor = func_802C937C(arg0->actor_id, arg0->position); + actor = bundle_spawn_f32(arg0->actor_id, arg0->position); actor->unk54 = 3.0f; func_803333DC(arg0, actor); } diff --git a/src/core2/code_D5D10.c b/src/core2/code_D5D10.c index 30e3c753..7243542e 100644 --- a/src/core2/code_D5D10.c +++ b/src/core2/code_D5D10.c @@ -73,7 +73,7 @@ void chskeleton_despawn(ActorMarker *marker, s32 arg1) { func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4CD_MODEL_LIMBO_ARM); func_8035CCA0(partEmitMgr_newEmitter(4), this, ASSET_4D0_MODEL_LIMBO_BONE); FUNC_8030E8B4(SFX_119_FISH_DEATH, 1.0f, 32000, this->position, 1250, 2500); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); marker_despawn(marker); } diff --git a/src/core2/code_D6180.c b/src/core2/code_D6180.c index 61614678..c97d3ae2 100644 --- a/src/core2/code_D6180.c +++ b/src/core2/code_D6180.c @@ -71,7 +71,7 @@ void func_8035D1F0(ActorMarker *arg0, s32 arg1) { func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4C8_MODEL_MUMMUM_ARM); func_8035D110(partEmitMgr_newEmitter(1), this, ASSET_4CB_MODEL_MUMMUM_BODY); FUNC_8030E8B4(SFX_119_FISH_DEATH, 0.8f, 32000, this->position, 1250, 2500); - __spawnQueue_add_4((GenFunction_4) func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4) spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); marker_despawn(arg0); } @@ -133,7 +133,7 @@ void func_8035D490(ActorMarker *marker){ if (map_get() == MAP_13_GV_MEMORY_GAME) { sp1C = marker_getActor(marker); if (func_80329530(sp1C, 250) != 0) { - func_802C9334(0x1C, sp1C); + __bundle_spawnFromFirstActor(0x1C, sp1C); func_8035D2C0(marker, 0); } } @@ -146,7 +146,7 @@ void func_8035D4F0(ActorMarker *marker, s32 arg1){ actor = marker_getActor(marker); if(actor->state != 9){ if(func_8033F3E8(mapModel_getModel(0), actor->position, 0x190, 0x1A0) == arg1){ - func_802C9334(0x1C, actor); + __bundle_spawnFromFirstActor(0x1C, actor); func_8035D2C0(marker, 0); } } diff --git a/src/core2/code_EF50.c b/src/core2/code_EF50.c index fc0274fe..9bd09b71 100644 --- a/src/core2/code_EF50.c +++ b/src/core2/code_EF50.c @@ -67,7 +67,7 @@ enum bs_e func_80295EE0(enum bs_e arg0){ } else{ ml_vec3f_to_vec3h(sp20, D_8037C3E0.unk8); - sp1C = func_803282AC(ACTOR_5A_JIGSAW_DANCE, sp20, 0); + sp1C = actor_spawnWithYaw_s16(ACTOR_5A_JIGSAW_DANCE, sp20, 0); chJigsawDance_setState(sp1C, 3); bsjig_setJiggyMarkerPtr(sp1C->marker); sp1C->unk38_31 = D_8037C3E0.unk18; diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index 5bb4e4c3..5adf6112 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -534,66 +534,65 @@ void __spawnQueue_add_5(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3, s32 a } } -Actor *func_802C4140(enum actor_e actor_id, s32 x, s32 y, s32 z){ +Actor *spawnQueue_actor_f32(enum actor_e actor_id, s32 x, s32 y, s32 z) { f32 position[3]; position[0] = reinterpret_cast(f32, x); position[1] = reinterpret_cast(f32, y); position[2] = reinterpret_cast(f32, z); - return spawn_actor_f32(reinterpret_cast(enum actor_e, actor_id), position, 0); + return actor_spawnWithYaw_f32(reinterpret_cast(enum actor_e, actor_id), position, 0); } - -Actor *func_802C418C(enum actor_e actor_id, s32 x, s32 y, s32 z){ +Actor *spawnQueue_actor_s16(enum actor_e actor_id, s32 x, s32 y, s32 z) { s16 position[3]; position[0] = reinterpret_cast(s16, x); position[1] = reinterpret_cast(s16, y); position[2] = reinterpret_cast(s16, z); - return func_803282AC(reinterpret_cast(enum actor_e, actor_id), position, 0); + return actor_spawnWithYaw_s16(reinterpret_cast(enum actor_e, actor_id), position, 0); } -Actor *func_802C41D8(enum actor_e actor_id, s32 x, s32 y, s32 z){ +Actor *spawnQueue_actor_s32(enum actor_e actor_id, s32 x, s32 y, s32 z) { s32 position[3]; position[0] = reinterpret_cast(s32, x); position[1] = reinterpret_cast(s32, y); position[2] = reinterpret_cast(s32, z); - return func_8032811C(reinterpret_cast(enum actor_e, actor_id), position, 0); + return actor_spawnWithYaw_s32(reinterpret_cast(enum actor_e, actor_id), position, 0); } -Actor *func_802C4218(enum actor_e actor_id, s32 x, s32 y, s32 z){ +Actor *spawnQueue_bundle_f32(s32 index, s32 x, s32 y, s32 z) { f32 position[3]; position[0] = reinterpret_cast(f32, x); position[1] = reinterpret_cast(f32, y); position[2] = reinterpret_cast(f32, z); - return func_802C937C(reinterpret_cast(enum actor_e, actor_id), position); + return bundle_spawn_f32(reinterpret_cast(s32, index), position); } -Actor *func_802C4260(enum actor_e actor_id, s32 x, s32 y, s32 z, s32 yaw){ +Actor *spawnQueue_bundleWithYaw_f32(s32 index, s32 x, s32 y, s32 z, s32 yaw) { f32 position[3]; position[0] = reinterpret_cast(f32, x); position[1] = reinterpret_cast(f32, y); position[2] = reinterpret_cast(f32, z); - func_802C8F70(reinterpret_cast(f32, yaw)); - return func_802C937C(reinterpret_cast(enum actor_e, actor_id), position); - + bundle_setYaw(reinterpret_cast(f32, yaw)); + return bundle_spawn_f32(reinterpret_cast(s32, index), position); } -Actor *func_802C42B4(s32 arg0, s32 arg1, s32 arg2, s32 arg3){ - s32 sp1C[3]; - sp1C[0] = reinterpret_cast(s32, arg1); - sp1C[1] = reinterpret_cast(s32, arg2); - sp1C[2] = reinterpret_cast(s32, arg3); - return func_802C8F88(reinterpret_cast(s32, arg0), sp1C); +Actor *spawnQueue_bundle_s32(s32 index, s32 x, s32 y, s32 z) { + s32 position[3]; + position[0] = reinterpret_cast(s32, x); + position[1] = reinterpret_cast(s32, y); + position[2] = reinterpret_cast(s32, z); + return bundle_spawn_s32(reinterpret_cast(s32, index), position); } -Actor * func_802C42F0(s32 arg0, s32 arg1, s32 arg2, s32 arg3){ - s32 sp1C[3]; - sp1C[0] = arg1; - sp1C[1] = arg2; - sp1C[2] = arg3; - return func_802C8F88(arg0, sp1C); +Actor *spawnQueue_bundle_s32_2(s32 index, s32 x, s32 y, s32 z) { + s32 position[3]; + position[0] = x; + position[1] = y; + position[2] = z; + return bundle_spawn_s32(index, position); } -void spawnQueue_defrag(FunctionQueue *arg0){ - if((arg0 = spawnQueue) != NULL) - spawnQueue = (FunctionQueue *)defrag(); +void spawnQueue_defrag(FunctionQueue *arg0) { + if ((arg0 = spawnQueue) != NULL) { + spawnQueue = (FunctionQueue *) defrag(); + } } diff --git a/src/fight/chbossjinjobase.c b/src/fight/chbossjinjobase.c index 1c5298f5..499d89b2 100644 --- a/src/fight/chbossjinjobase.c +++ b/src/fight/chbossjinjobase.c @@ -136,7 +136,7 @@ void chBossJinjoBase_update(Actor *this) { this->velocity_y = 100.0f; 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]); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]); chBossJinjoBase_emitSmoke(this->unk1C, 0x10); SPAWNQUEUE_ADD_1(chbossjinjobase_spawnStoneJinjo, this->marker); } diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index 759167a9..28409dc4 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -11,7 +11,7 @@ extern void func_80320ED8(ActorMarker *, f32, s32); void func_80387110(ActorMarker *, f32[3], f32, s32); void func_8038856C(Actor *actor, f32 *arg1); void chfinalboss_update(Actor *this); -void func_802C8F70(f32); +void bundle_setYaw(f32); s32 func_803297C8(Actor*, f32*); Actor *func_8032813C(); void fight_func_803900DC(ActorMarker *, f32 *, f32, f32); @@ -434,8 +434,8 @@ void __chfinalboss_dropHealth(ActorMarker *arg0) { Actor *actor; actor = marker_getActor(arg0); - func_802C8F70(func_803297C8(actor, D_803916F4)); - func_802C937C(0x14, actor->position); + bundle_setYaw(func_803297C8(actor, D_803916F4)); + bundle_spawn_f32(0x14, actor->position); } void chfinalboss_despawnFlightPad(void) { @@ -447,7 +447,7 @@ void chfinalboss_spawnFlightPad(s32 arg0) { s16 *temp_v1; Actor *flight_pad; - flight_pad = spawn_actor_f32(ACTOR_39F_FIGHT_FLIGHT_PAD, D_80391700, D_8039170C); + flight_pad = actor_spawnWithYaw_f32(ACTOR_39F_FIGHT_FLIGHT_PAD, D_80391700, D_8039170C); flight_pad->alpha_124_19 = 0; flight_pad->unk38_31 = 6; __chFinalBossFlightPadMarker = flight_pad->marker; @@ -456,7 +456,7 @@ void chfinalboss_spawnFlightPad(s32 arg0) { void func_80386EC0(s32 arg0) { ActorMarker *marker; - marker = spawn_actor_f32(0x38A, D_80392758, 0)->marker; + marker = actor_spawnWithYaw_f32(0x38A, D_80392758, 0)->marker; func_8030E878(SFX_147_GRUNTY_SPELL_ATTACK_2, randf2(0.95f, 1.05f), 32000, D_80392758, 5000.0f, 12000.0f); fight_func_803900DC(marker, D_80392758, D_80392768[1], D_80392768[2]); } @@ -474,7 +474,7 @@ void func_80386F5C(ActorMarker * arg0, f32 arg1[3], f32 arg2, f32 arg3) { void func_80386FD8(s32 arg0) { ActorMarker *marker; - marker = spawn_actor_f32(0x389, D_80392758, 0)->marker; + marker = actor_spawnWithYaw_f32(0x389, D_80392758, 0)->marker; func_8030E878(SFX_146_GRUNTY_SPELL_ATTACK_1, randf2(0.95f, 1.05f), 32000, D_80392758, 5000.0f, 12000.0f); fight_func_8038FB84(marker, D_80392758, D_80392768, D_80392778); } @@ -482,7 +482,7 @@ void func_80386FD8(s32 arg0) { void func_80387074(s32 arg0) { ActorMarker *marker; - marker = spawn_actor_f32(0x3AA, D_80392758, 0)->marker; + marker = actor_spawnWithYaw_f32(0x3AA, D_80392758, 0)->marker; func_8030E878(SFX_146_GRUNTY_SPELL_ATTACK_1, randf2(0.95f, 1.05f), 32000, D_80392758, 5000.0f, 12000.0f); fight_func_8038FB84(marker, D_80392758, D_80392768, D_80392778); } @@ -1270,28 +1270,28 @@ void __chfinalboss_spawnStatue(enum bossjinjo_e statue_id) { switch (statue_id) { case BOSSJINJO_ORANGE: - sp1C = spawn_actor_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391768, 135); + sp1C = actor_spawnWithYaw_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391768, 135); __chFinalBossJinjoStatueMarker[0] = sp1C->marker; break; case BOSSJINJO_GREEN: - sp1C = spawn_actor_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391774, 45); + sp1C = actor_spawnWithYaw_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391774, 45); __chFinalBossJinjoStatueMarker[1] = sp1C->marker; break; case BOSSJINJO_PINK: - sp1C = spawn_actor_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391780, 315); + sp1C = actor_spawnWithYaw_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_80391780, 315); __chFinalBossJinjoStatueMarker[2] = sp1C->marker; break; case BOSSJINJO_YELLOW: - sp1C = spawn_actor_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_8039178C, 225); + sp1C = actor_spawnWithYaw_f32(ACTOR_3A2_JINJO_STATUE_BASE, D_8039178C, 225); __chFinalBossJinjoStatueMarker[3] = sp1C->marker; break; case BOSSJINJO_JINJONATOR: *D_80392750_ptr = ((local->mirror_phase5) ? 0.0f : 180.0f); - sp1C = spawn_actor_f32(ACTOR_3A9_JINJONATOR_STATUE_BASE, D_80391798, (s32)*D_80392750_ptr); + sp1C = actor_spawnWithYaw_f32(ACTOR_3A9_JINJONATOR_STATUE_BASE, D_80391798, (s32)*D_80392750_ptr); break; } sp1C->lifetime_value = (statue_id == BOSSJINJO_JINJONATOR) ? 5.25f : 1.54f; @@ -1524,7 +1524,7 @@ void chfinalboss_phase4_setState(Actor *this, s32 arg1) { case 32: func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - func_802C9334(0x24, this); + __bundle_spawnFromFirstActor(0x24, this); return; case 33: FUNC_8030E624(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000); diff --git a/src/fight/chjinjonatorbase.c b/src/fight/chjinjonatorbase.c index 2aeace1b..3186fc4c 100644 --- a/src/fight/chjinjonatorbase.c +++ b/src/fight/chjinjonatorbase.c @@ -98,7 +98,7 @@ void func_8038E260(ActorMarker *arg0) { Actor *sp24 = marker_getActor(arg0); func_802BB3DC(0, 18.0f, 0.92f); - __spawnQueue_add_4((GenFunction_4) func_802C4140, 0x3AD, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z)); + __spawnQueue_add_4((GenFunction_4) spawnQueue_actor_f32, 0x3AD, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z)); func_8038E03C(sp24->unk1C, 0x10); } diff --git a/src/lair/code_0.c b/src/lair/code_0.c index a849a1b4..4d4a8e51 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -799,7 +799,7 @@ void func_80387E94(s32 arg0) marker = reinterpret_cast(ActorMarker *, arg0); actor1 = marker_getActor(marker); - actorNew = spawn_actor_f32(0x25A, actor1->position, actor1->yaw); + actorNew = actor_spawnWithYaw_f32(0x25A, actor1->position, actor1->yaw); // Grab the same pointer again for good measure :^) actor2 = marker_getActor(marker); @@ -821,7 +821,7 @@ void func_80387F1C(void) { jiggy_spawn(JIGGY_35_LAIR_CC_WITCH_SWITCH, tmp); // FIXME: macro? - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, *(s32 *)&tmp[0], *(s32 *)&tmp[1], *(s32 *)&tmp[2]); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, *(s32 *)&tmp[0], *(s32 *)&tmp[1], *(s32 *)&tmp[2]); } } @@ -1544,7 +1544,7 @@ void func_803897D4(s32 arg0) marker1 = reinterpret_cast(ActorMarker *, arg0); actor1 = marker_getActor(marker1); - actor1 = spawn_actor_f32(0x258, actor1->position, actor1->yaw); + actor1 = actor_spawnWithYaw_f32(0x258, actor1->position, actor1->yaw); // Grab the same pointer again for good measure actor2 = marker_getActor(marker1); diff --git a/src/lair/code_86F0.c b/src/lair/code_86F0.c index 35a3f046..c76b89bc 100644 --- a/src/lair/code_86F0.c +++ b/src/lair/code_86F0.c @@ -437,7 +437,7 @@ void lair_func_8038F924(Actor *this) { return; } if (!fileProgressFlag_get(FILEPROG_54_CCW_PUZZLE_PODIUM_ACTIVE)) { - func_802C9334(0x20, this); + __bundle_spawnFromFirstActor(0x20, this); func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 0x7FFF); func_80324D2C(2.1f, COMUSIC_43_ENTER_LEVEL_GLITTER); func_8030E6D4(SFX_113_PAD_APPEARS); diff --git a/src/lair/code_A4A0.c b/src/lair/code_A4A0.c index 48639a11..d05446c5 100644 --- a/src/lair/code_A4A0.c +++ b/src/lair/code_A4A0.c @@ -54,7 +54,7 @@ void func_80390890(ActorMarker *marker, ActorMarker *other_marker) { subaddie_set_state_with_direction(this, 5, 0.0f, 1); actor_playAnimationOnce(this); func_8030E878(SFX_C2_GRUBLIN_EGH, local->unkC_27*0.1 + 0.8, 32000, this->position, 1250.0f, 2500.0f); - __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); actor_collisionOff(this); this->is_first_encounter = TRUE; }