mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 03:51:46 +00:00
Introduce this new pack in a more proper reviewable manner (#1192)
* Introduce this new pack in a more proper reviewable manner Ideally I should have made a PR for my new pack and I understand the new geo function may have come out of no where. I've been thinking about adding it for a while and was going to utilize it in a new project I'm working on but I should have explained it first before pushing anything for sure * Address suggestions * Restore these, whoops
This commit is contained in:
parent
638a242763
commit
6919878b40
8 changed files with 21 additions and 0 deletions
|
|
@ -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[] = {
|
||||
|
|
|
|||
BIN
dynos/packs/Coop Cafe Pipe/warp_pipe_geo.bin
Normal file
BIN
dynos/packs/Coop Cafe Pipe/warp_pipe_geo.bin
Normal file
Binary file not shown.
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue