diff --git a/data/dynos_mgr_builtin.cpp b/data/dynos_mgr_builtin.cpp index bafcc8e3b..c2f8823f8 100644 --- a/data/dynos_mgr_builtin.cpp +++ b/data/dynos_mgr_builtin.cpp @@ -2037,6 +2037,7 @@ static const DynosBuiltinFunction sDynosBuiltinFuncs[] = { define_builtin_function(bhv_ambient_light_update, FUNCTION_BHV), define_builtin_function(bhv_point_light_init, FUNCTION_BHV), define_builtin_function(bhv_point_light_loop, FUNCTION_BHV), + define_builtin_function(geo_switch_character_type, FUNCTION_GEO), }; static const char *sDynosBuiltinFuncTypeNames[] = { diff --git a/dynos/packs/Fixed Smoke/title_texture_0A0001C0.tex b/dynos/packs/Coop Cafe Pipe/title_texture_0A0001C0.tex similarity index 100% rename from dynos/packs/Fixed Smoke/title_texture_0A0001C0.tex rename to dynos/packs/Coop Cafe Pipe/title_texture_0A0001C0.tex diff --git a/dynos/packs/Fixed Smoke/title_texture_0A000E40.tex b/dynos/packs/Coop Cafe Pipe/title_texture_0A000E40.tex similarity index 100% rename from dynos/packs/Fixed Smoke/title_texture_0A000E40.tex rename to dynos/packs/Coop Cafe Pipe/title_texture_0A000E40.tex diff --git a/dynos/packs/Fixed Smoke/title_texture_0A001AC0.tex b/dynos/packs/Coop Cafe Pipe/title_texture_0A001AC0.tex similarity index 100% rename from dynos/packs/Fixed Smoke/title_texture_0A001AC0.tex rename to dynos/packs/Coop Cafe Pipe/title_texture_0A001AC0.tex diff --git a/dynos/packs/Fixed Smoke/title_texture_0A002740.tex b/dynos/packs/Coop Cafe Pipe/title_texture_0A002740.tex similarity index 100% rename from dynos/packs/Fixed Smoke/title_texture_0A002740.tex rename to dynos/packs/Coop Cafe Pipe/title_texture_0A002740.tex diff --git a/dynos/packs/Coop Cafe Pipe/warp_pipe_geo.bin b/dynos/packs/Coop Cafe Pipe/warp_pipe_geo.bin new file mode 100644 index 000000000..96467814f Binary files /dev/null and b/dynos/packs/Coop Cafe Pipe/warp_pipe_geo.bin differ diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 435863e2f..b60cac7c7 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -926,3 +926,22 @@ Gfx *geo_process_lua_function(s32 callContext, struct GraphNode *node, UNUSED Ma return NULL; } + +Gfx *geo_switch_character_type(s32 callContext, struct GraphNode *node, UNUSED void *context) { + struct GraphNodeSwitchCase *switchCase; + + if (callContext == GEO_CONTEXT_RENDER) { + // move to a local var because GraphNodes are passed in all geo functions. + // cast the pointer. + switchCase = (struct GraphNodeSwitchCase *) node; + + // pass in -1 to always use local mario + // otherwise use the mariostate asssociated with the object + struct MarioState* marioState = switchCase->parameter == -1 ? gMarioState : geo_get_mario_state(); + + // assign the case number for execution. + switchCase->selectedCase = marioState->character->type; + } + + return NULL; +} diff --git a/src/game/mario_misc.h b/src/game/mario_misc.h index cf436a200..7920a8374 100644 --- a/src/game/mario_misc.h +++ b/src/game/mario_misc.h @@ -38,5 +38,6 @@ Gfx *geo_mirror_mario_backface_culling(s32 callContext, struct GraphNode *node, Gfx* geo_mario_set_player_colors(s32 callContext, struct GraphNode* node, UNUSED Mat4* c); Gfx* geo_mario_cap_display_list(s32 callContext, struct GraphNode* node, UNUSED Mat4* c); Gfx *geo_process_lua_function(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c); +Gfx *geo_switch_character_type(s32 callContext, struct GraphNode *node, UNUSED void *context); #endif // MARIO_MISC_H