From 0737d2e03fddc0b6f88fe6965a860634bbe6f332 Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 30 Jul 2020 18:09:47 -0700 Subject: [PATCH] Separated animations between players --- actors/group0.h | 51 + actors/group0_geo.c | 1 + actors/mario/geo2.inc.c | 1825 ++++++++++++++++++++++++++++++++ include/model_ids.h | 2 +- levels/castle_grounds/script.c | 2 +- levels/castle_inside/script.c | 2 +- levels/scripts.c | 1 + src/game/game_init.c | 12 +- src/game/game_init.h | 4 +- src/game/mario.c | 15 +- src/game/mario_misc.c | 10 +- 11 files changed, 1906 insertions(+), 19 deletions(-) create mode 100644 actors/mario/geo2.inc.c diff --git a/actors/group0.h b/actors/group0.h index 44f8b05d..e20f71de 100644 --- a/actors/group0.h +++ b/actors/group0.h @@ -16,6 +16,57 @@ extern const Gfx burn_smoke_seg4_dl_04022028[]; extern const Gfx burn_smoke_seg4_dl_04022048[]; extern const Gfx burn_smoke_seg4_dl_04022070[]; +// luigi +extern const GeoLayout luigi_geo_face_and_wings[]; +extern const GeoLayout luigi_geo_left_hand[]; +extern const GeoLayout luigi_geo_right_hand[]; +extern const GeoLayout luigi_geo_body[]; +extern const GeoLayout luigi_geo_medium_poly_left_hand[]; +extern const GeoLayout luigi_geo_medium_poly_right_hand[]; +extern const GeoLayout luigi_geo_medium_poly_body[]; +extern const GeoLayout luigi_geo_low_poly_face_and_wings[]; +extern const GeoLayout luigi_geo_low_poly_left_hand[]; +extern const GeoLayout luigi_geo_low_poly_right_hand[]; +extern const GeoLayout luigi_geo_low_poly_body[]; +extern const GeoLayout luigi_vanish_geo_face_and_wings[]; +extern const GeoLayout luigi_vanish_geo_left_hand[]; +extern const GeoLayout luigi_vanish_geo_right_hand[]; +extern const GeoLayout luigi_vanish_geo_body[]; +extern const GeoLayout luigi_vanish_geo_medium_poly_left_hand[]; +extern const GeoLayout luigi_vanish_geo_medium_poly_right_hand[]; +extern const GeoLayout luigi_vanish_geo_medium_poly_body[]; +extern const GeoLayout luigi_vanish_geo_low_poly_face_and_wings[]; +extern const GeoLayout luigi_vanish_geo_low_poly_left_hand[]; +extern const GeoLayout luigi_vanish_geo_low_poly_right_hand[]; +extern const GeoLayout luigi_vanish_geo_low_poly_body[]; +extern const GeoLayout luigi_metal_geo_face_and_wings[]; +extern const GeoLayout luigi_metal_geo_left_hand[]; +extern const GeoLayout luigi_metal_geo_right_hand[]; +extern const GeoLayout luigi_metal_geo_body[]; +extern const GeoLayout luigi_metal_geo_medium_poly_left_hand[]; +extern const GeoLayout luigi_metal_geo_medium_poly_right_hand[]; +extern const GeoLayout luigi_metal_geo_medium_poly_body[]; +extern const GeoLayout luigi_metal_geo_low_poly_face_and_wings[]; +extern const GeoLayout luigi_metal_geo_low_poly_left_hand[]; +extern const GeoLayout luigi_metal_geo_low_poly_right_hand[]; +extern const GeoLayout luigi_metal_geo_low_poly_body[]; +extern const GeoLayout luigi_metal_vanish_geo_face_and_wings[]; +extern const GeoLayout luigi_metal_vanish_geo_left_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_right_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_body[]; +extern const GeoLayout luigi_metal_vanish_geo_medium_poly_left_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_medium_poly_right_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_medium_poly_body[]; +extern const GeoLayout luigi_metal_vanish_geo_low_poly_face_and_wings[]; +extern const GeoLayout luigi_metal_vanish_geo_low_poly_left_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_low_poly_right_hand[]; +extern const GeoLayout luigi_metal_vanish_geo_low_poly_body[]; +extern const GeoLayout luigi_geo_load_body[]; +extern const GeoLayout luigi_geo_load_medium_poly_body[]; +extern const GeoLayout luigi_geo_load_low_poly_body[]; +extern const GeoLayout luigi_geo_render_body[]; +extern const GeoLayout luigi_geo[]; + // mario extern const GeoLayout mario_geo_face_and_wings[]; extern const GeoLayout mario_geo_left_hand[]; diff --git a/actors/group0_geo.c b/actors/group0_geo.c index bddefae9..4793a4e5 100644 --- a/actors/group0_geo.c +++ b/actors/group0_geo.c @@ -16,3 +16,4 @@ #include "water_splash/geo.inc.c" #include "sparkle_animation/geo.inc.c" #include "mario/geo.inc.c" +#include "mario/geo2.inc.c" diff --git a/actors/mario/geo2.inc.c b/actors/mario/geo2.inc.c new file mode 100644 index 00000000..14685d65 --- /dev/null +++ b/actors/mario/geo2.inc.c @@ -0,0 +1,1825 @@ +// Normal Mario Geo + +// 0x170002E0 +const GeoLayout luigi_geo_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_front), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_on_eyes_dead), + GEO_CLOSE_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_front), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_off_eyes_dead), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_wings), // left + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_wings), // right + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700041C +const GeoLayout luigi_geo_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000494 +const GeoLayout luigi_geo_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// The body loads all the parts with some shared dls to apply the solid color of the dl that has it, the same rule applies to the medium and low poly geos + +// 0x1700053C +const GeoLayout luigi_geo_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_butt), // starts sharing solid color with mario_torso (blue) + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_face_and_wings), // stops sharing because faces has its own dl + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_left_arm), // starts sharing solid color with mario_left_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_left_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_right_arm), // starts sharing solid color of his dl with mario_right_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_right_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_left_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_left_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_right_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_right_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x170006F8 +const GeoLayout luigi_geo_medium_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_medium_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000770 +const GeoLayout luigi_geo_medium_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_medium_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000818 +const GeoLayout luigi_geo_medium_poly_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_butt), // starts sharing solid color with mario_torso (blue) + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_medium_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_face_and_wings), // stops sharing because faces has its own dl - medium poly mario uses high poly face + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_left_arm), // starts sharing solid color with mario_left_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_medium_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_medium_poly_left_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_right_arm), // starts sharing solid color of his dl with mario_right_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_medium_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_medium_poly_right_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_left_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_medium_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_medium_poly_left_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_right_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_medium_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_medium_poly_right_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x170009D4 +const GeoLayout luigi_geo_low_poly_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_front), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_on_eyes_dead), + GEO_CLOSE_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_front), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_closed), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_cap_off_eyes_dead), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_wings), // left + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_wings), // right + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000B10 +const GeoLayout luigi_geo_low_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000B88 +const GeoLayout luigi_geo_low_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000C30 +const GeoLayout luigi_geo_low_poly_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_butt), // starts sharing solid color with mario_torso (blue) + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_low_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_low_poly_face_and_wings), // stops sharing because faces has its own dl + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_left_arm), // starts sharing solid color with mario_left_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_low_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_low_poly_left_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_right_arm), // starts sharing solid color of his dl with mario_right_forearm (red) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_low_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_low_poly_right_hand), // stops sharing because hand has its solid color (white) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_left_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_low_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_low_poly_left_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_right_thigh), // starts sharing solid color of his dl with mario_left_leg (blue) + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_low_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_right_foot), // stops sharing because foot has its solid color (brown) + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Vanish Mario Geo + +// 0x17000DEC +const GeoLayout luigi_vanish_geo_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_front), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_on_eyes_dead), + GEO_CLOSE_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_front), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_right), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_left), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_up), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_down), // unused + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_off_eyes_dead), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000F28 +const GeoLayout luigi_vanish_geo_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17000FA0 +const GeoLayout luigi_vanish_geo_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Same rule body as Normal Mario + +// 0x17001048 +const GeoLayout luigi_vanish_geo_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_left_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_right_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_left_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_right_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001204 +const GeoLayout luigi_vanish_geo_medium_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_medium_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700127C +const GeoLayout luigi_vanish_geo_medium_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_medium_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001324 +const GeoLayout luigi_vanish_geo_medium_poly_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_medium_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_left_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_medium_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_medium_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_right_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_medium_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_medium_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_medium_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_medium_poly_left_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_right_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_medium_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_medium_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x170014E0 +const GeoLayout luigi_vanish_geo_low_poly_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_front), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_right), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_left), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_up), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_down), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_on_eyes_dead), + GEO_CLOSE_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_eyes), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_front), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_half_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_closed), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_right), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_left), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_up), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_down), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_cap_off_eyes_dead), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700161C +const GeoLayout luigi_vanish_geo_low_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001694 +const GeoLayout luigi_vanish_geo_low_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700173C +const GeoLayout luigi_vanish_geo_low_poly_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_low_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_low_poly_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_left_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_low_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_low_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_right_arm), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_low_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_vanish_geo_low_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_low_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_low_poly_left_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_right_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_low_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Metal Mario Geo + +// 0x170018F8 +const GeoLayout luigi_metal_geo_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_cap_on_shared_dl), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_cap_off_shared_dl), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_cap_wings), // left + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_cap_wings), // right + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x170019A4 +const GeoLayout luigi_metal_geo_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001A1C +const GeoLayout luigi_metal_geo_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// A difference from Normal Mario is that the dls after the butt and left thigh shares the metal texture of it, same rule applies to the medium and low poly geos + +// 0x17001AC4 +const GeoLayout luigi_metal_geo_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_butt), // starts sharing metal texture with the dls below + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_metal_torso_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_face_and_wings), // unlike normal mario geo, these dls still share the metal texture + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_right_hand), // stop sharing because the wing metal cap of it + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_left_thigh), // starts sharing metal texture with the dls below + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001C80 +const GeoLayout luigi_metal_geo_medium_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_medium_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001CF8 +const GeoLayout luigi_metal_geo_medium_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_medium_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001DA0 +const GeoLayout luigi_metal_geo_medium_poly_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_medium_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_metal_medium_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_medium_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_medium_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_medium_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_medium_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_medium_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_medium_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_medium_poly_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_medium_poly_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_medium_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_medium_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17001F5C +const GeoLayout luigi_metal_geo_low_poly_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_low_poly_cap_on), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_low_poly_cap_off), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_cap_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002008 +const GeoLayout luigi_metal_geo_low_poly_left_hand[] = { + GEO_SWITCH_CASE(3, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_low_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002080 +const GeoLayout luigi_metal_geo_low_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_low_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002128 +const GeoLayout luigi_metal_geo_low_poly_body[] = { + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_low_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, 0, 0, mario_metal_low_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_low_poly_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_low_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_low_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, mario_low_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_geo_low_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_metal_low_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_low_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, mario_low_poly_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, mario_low_poly_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 89, 0, 0, mario_low_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_OPAQUE, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_metal_low_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Metal Vanish Mario Geo + +// 0x170022E4 +const GeoLayout luigi_metal_vanish_geo_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_on_shared_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_off_shared_dl), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002390 +const GeoLayout luigi_metal_vanish_geo_left_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002408 +const GeoLayout luigi_metal_vanish_geo_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Same rules as Metal Mario + +// 0x170024B0 +const GeoLayout luigi_metal_vanish_geo_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_metal_torso_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700266C +const GeoLayout luigi_metal_vanish_geo_medium_poly_left_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_medium_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_medium_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x170026E4 +const GeoLayout luigi_metal_vanish_geo_medium_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_medium_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x1700278C +const GeoLayout luigi_metal_vanish_geo_medium_poly_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_medium_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_metal_medium_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_medium_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_medium_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_medium_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_medium_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_medium_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_medium_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_medium_poly_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_medium_poly_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_medium_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_medium_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002958 +const GeoLayout luigi_metal_vanish_geo_low_poly_face_and_wings[] = { + GEO_ASM(1, geo_mario_head_rotation), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_SWITCH_CASE(1, geo_switch_mario_cap_on_off), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_low_poly_cap_on), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_low_poly_cap_off), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, -126, 22, -40, -135), + GEO_OPEN_NODE(), + GEO_ASM(2, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_TRANSLATE_ROTATE(0, 142, -51, 126, -22, 40, -135), + GEO_OPEN_NODE(), + GEO_ASM(3, geo_mario_rotate_wing_cap_wings), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_cap_wings_transparent), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002A04 +const GeoLayout luigi_metal_vanish_geo_low_poly_left_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(5, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_low_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_left_hand_open_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_low_poly_left_hand_closed_shared_dl), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002A7C +const GeoLayout luigi_metal_vanish_geo_low_poly_right_hand[] = { + GEO_SWITCH_CASE(2, geo_switch_mario_hand), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(4, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_low_poly_right_hand_closed), + GEO_CLOSE_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_open), + GEO_OPEN_NODE(), + GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_peace_shared_dl), // here we go hand + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_metal_right_hand_cap_shared_dl), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_metal_right_hand_cap_shared_dl_wings), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002B24 +const GeoLayout luigi_metal_vanish_geo_low_poly_body[] = { + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_low_poly_butt), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_move_mario_part_from_parent), + GEO_ASM(1, geo_mario_tilt_torso), + GEO_ROTATION_NODE(0x00, 0, 0, 0), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, 0, 0, mario_metal_low_poly_torso), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 87, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_low_poly_face_and_wings), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, -10, 79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_left_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_low_poly_left_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_low_poly_left_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 68, -10, -79, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_right_arm_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, mario_low_poly_right_forearm_shared_dl), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_metal_vanish_geo_low_poly_right_hand), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, 42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_metal_low_poly_left_thigh), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_low_poly_left_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, mario_low_poly_left_foot_shared_dl), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 13, -8, -42, NULL), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, mario_low_poly_right_thigh_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 89, 0, 0, mario_low_poly_right_leg_shared_dl), + GEO_OPEN_NODE(), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 67, 0, 0, NULL), + GEO_OPEN_NODE(), + GEO_ASM(6, geo_mario_hand_foot_scaler), + GEO_SCALE(0x00, 65536), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_metal_low_poly_right_foot), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// High Poly + +// 0x17002CE0 +const GeoLayout luigi_geo_load_body[] = { + GEO_SWITCH_CASE(1, geo_switch_mario_cap_effect), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_body), + GEO_BRANCH(1, luigi_vanish_geo_body), + GEO_BRANCH(1, luigi_metal_geo_body), + GEO_BRANCH(1, luigi_metal_vanish_geo_body), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Medium Poly + +// 0x17002D14 +const GeoLayout luigi_geo_load_medium_poly_body[] = { + GEO_SWITCH_CASE(1, geo_switch_mario_cap_effect), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_medium_poly_body), + GEO_BRANCH(1, luigi_vanish_geo_medium_poly_body), + GEO_BRANCH(1, luigi_metal_geo_medium_poly_body), + GEO_BRANCH(1, luigi_metal_vanish_geo_medium_poly_body), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// Low Poly + +// 0x17002D48 +const GeoLayout luigi_geo_load_low_poly_body[] = { + GEO_SWITCH_CASE(1, geo_switch_mario_cap_effect), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_low_poly_body), + GEO_BRANCH(1, luigi_vanish_geo_low_poly_body), + GEO_BRANCH(1, luigi_metal_geo_low_poly_body), + GEO_BRANCH(1, luigi_metal_vanish_geo_low_poly_body), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// 0x17002D7C +const GeoLayout luigi_geo_render_body[] = { + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_RENDER_RANGE(-2048, 600), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_load_body), + GEO_CLOSE_NODE(), + GEO_RENDER_RANGE(600, 1600), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_load_medium_poly_body), + GEO_CLOSE_NODE(), + GEO_RENDER_RANGE(1600, 32767), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_load_low_poly_body), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_RETURN(), +}; + +// This last geo is used to load all of Mario Geo in the Level Scripts + +// 0x17002DD4 +const GeoLayout luigi_geo[] = { + GEO_SHADOW(SHADOW_CIRCLE_PLAYER, 0xB4, 100), + GEO_OPEN_NODE(), + GEO_SCALE(0x00, 16384), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_mirror_mario_backface_culling), + GEO_ASM(1, geo_mirror_mario_set_alpha), + GEO_SWITCH_CASE(1, geo_switch_mario_stand_run), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_load_body), + GEO_BRANCH(1, luigi_geo_render_body), + GEO_CLOSE_NODE(), + GEO_ASM(1, geo_mirror_mario_backface_culling), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_END(), +}; diff --git a/include/model_ids.h b/include/model_ids.h index 1cd0a253..85aba462 100644 --- a/include/model_ids.h +++ b/include/model_ids.h @@ -24,7 +24,7 @@ /* Global models that are loaded for every level */ #define MODEL_MARIO 0x01 // mario_geo -#define MODEL_LUIGI 0x02 // unused +#define MODEL_LUIGI 0x02 // luigi_geo /* Various static level geometry, the geo layout differs but terrain object presets treat them the same.*/ diff --git a/levels/castle_grounds/script.c b/levels/castle_grounds/script.c index 55065154..4b5c2ef1 100644 --- a/levels/castle_grounds/script.c +++ b/levels/castle_grounds/script.c @@ -105,7 +105,7 @@ const LevelScript level_castle_grounds_entry[] = { LOAD_RAW( /*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd), ALLOC_LEVEL_POOL(), MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario), - LUIGI(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi), + LUIGI(/*model*/ MODEL_LUIGI, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi), JUMP_LINK(script_func_global_1), JUMP_LINK(script_func_global_11), JUMP_LINK(script_func_global_16), diff --git a/levels/castle_inside/script.c b/levels/castle_inside/script.c index a56652c3..ee0b0f62 100644 --- a/levels/castle_inside/script.c +++ b/levels/castle_inside/script.c @@ -227,7 +227,7 @@ const LevelScript level_castle_inside_entry[] = { LOAD_RAW( /*seg*/ 0x0D, _group15_geoSegmentRomStart, _group15_geoSegmentRomEnd), ALLOC_LEVEL_POOL(), MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario), - LUIGI(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi), + LUIGI(/*model*/ MODEL_LUIGI, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi), JUMP_LINK(script_func_global_16), LOAD_MODEL_FROM_GEO(MODEL_CASTLE_BOWSER_TRAP, castle_geo_000F18), LOAD_MODEL_FROM_GEO(MODEL_CASTLE_WATER_LEVEL_PILLAR, castle_geo_001940), diff --git a/levels/scripts.c b/levels/scripts.c index 972c9ad0..d7cf96d4 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -66,6 +66,7 @@ const LevelScript level_main_scripts_entry[] = { LOAD_RAW( /*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd), ALLOC_LEVEL_POOL(), LOAD_MODEL_FROM_GEO(MODEL_MARIO, mario_geo), + LOAD_MODEL_FROM_GEO(MODEL_LUIGI, luigi_geo), LOAD_MODEL_FROM_GEO(MODEL_SMOKE, smoke_geo), LOAD_MODEL_FROM_GEO(MODEL_SPARKLES, sparkles_geo), LOAD_MODEL_FROM_GEO(MODEL_BUBBLE, bubble_geo), diff --git a/src/game/game_init.c b/src/game/game_init.c index c2df4510..a6f4fc25 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -43,9 +43,9 @@ OSMesg D_80339CD4; struct VblankHandler gGameVblankHandler; uintptr_t gPhysicalFrameBuffers[3]; uintptr_t gPhysicalZBuffer; -void *D_80339CF0; +void *D_80339CF0[2]; void *D_80339CF4; -struct MarioAnimation D_80339D10; +struct MarioAnimation D_80339D10[2]; struct MarioAnimation gDemo; UNUSED u8 filler80339D30[0x90]; @@ -547,9 +547,11 @@ void setup_game_memory(void) { gPhysicalFrameBuffers[0] = VIRTUAL_TO_PHYSICAL(gFrameBuffer0); gPhysicalFrameBuffers[1] = VIRTUAL_TO_PHYSICAL(gFrameBuffer1); gPhysicalFrameBuffers[2] = VIRTUAL_TO_PHYSICAL(gFrameBuffer2); - D_80339CF0 = main_pool_alloc(0x4000, MEMORY_POOL_LEFT); - set_segment_base_addr(17, (void *) D_80339CF0); - func_80278A78(&D_80339D10, gMarioAnims, D_80339CF0); + for (int i = 0; i < 2; i++) { + D_80339CF0[i] = main_pool_alloc(0x4000, MEMORY_POOL_LEFT); + set_segment_base_addr(17, (void *)D_80339CF0[i]); + func_80278A78(&D_80339D10[i], gMarioAnims, D_80339CF0[i]); + } D_80339CF4 = main_pool_alloc(2048, MEMORY_POOL_LEFT); set_segment_base_addr(24, (void *) D_80339CF4); func_80278A78(&gDemo, gDemoInputs, D_80339CF4); diff --git a/src/game/game_init.h b/src/game/game_init.h index 2dd25d1c..ca1b7631 100644 --- a/src/game/game_init.h +++ b/src/game/game_init.h @@ -32,7 +32,7 @@ extern OSMesg D_80339CD4; extern struct VblankHandler gGameVblankHandler; extern uintptr_t gPhysicalFrameBuffers[3]; extern uintptr_t gPhysicalZBuffer; -extern void *D_80339CF0; +extern void *D_80339CF0[2]; extern void *D_80339CF4; extern struct SPTask *gGfxSPTask; extern Gfx *gDisplayListHead; @@ -51,7 +51,7 @@ extern struct DemoInput gRecordedDemoInput; // this area is the demo input + the header. when the demo is loaded in, there is a header the size // of a single word next to the input list. this word is the current ID count. -extern struct MarioAnimation D_80339D10; +extern struct MarioAnimation D_80339D10[2]; extern struct MarioAnimation gDemo; extern u8 gMarioAnims[]; diff --git a/src/game/mario.c b/src/game/mario.c index e42a7562..6dbf4934 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1276,6 +1276,9 @@ void debug_print_speed_action_normal(struct MarioState *m) { * Update the button inputs for Mario. */ void update_mario_button_inputs(struct MarioState *m) { + // disable Luigi inputs + if (m != &gMarioStates[1]) { return; } + if (m->controller->buttonPressed & A_BUTTON) { m->input |= INPUT_A_PRESSED; } @@ -1316,6 +1319,9 @@ void update_mario_button_inputs(struct MarioState *m) { * Updates the joystick intended magnitude. */ void update_mario_joystick_inputs(struct MarioState *m) { + // disable Luigi inputs + if (m != &gMarioStates[1]) { return; } + struct Controller *controller = m->controller; f32 mag = ((controller->stickMag / 64.0f) * (controller->stickMag / 64.0f)) * 64.0f; @@ -1934,15 +1940,16 @@ skippy: } void init_mario_from_save_file(void) { + bool isMario = (gMarioState == &gMarioStates[0]); gMarioState->unk00 = 0; gMarioState->flags = 0; gMarioState->action = 0; - int i = (gMarioState == &gMarioStates[0]) ? 0 : 1; + int i = isMario ? 0 : 1; gMarioState->spawnInfo = &gPlayerSpawnInfos[i]; - gMarioState->statusForCamera = &gPlayerCameraState[0]; + gMarioState->statusForCamera = &gPlayerCameraState[i]; gMarioState->marioBodyState = &gBodyStates[i]; gMarioState->controller = &gControllers[0]; - gMarioState->animation = &D_80339D10; + gMarioState->animation = &D_80339D10[i]; gMarioState->numCoins = 0; gMarioState->numStars = @@ -1958,7 +1965,7 @@ void init_mario_from_save_file(void) { gHudDisplay.coins = 0; gHudDisplay.wedges = 8; - if (gMarioState == &gMarioStates[0]) { + if (isMario) { gMarioState = &gMarioStates[1]; init_mario_from_save_file(); gMarioState = &gMarioStates[0]; diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index e6354e89..375127d8 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -430,14 +430,14 @@ Gfx *geo_mario_head_rotation(s32 callContext, struct GraphNode *node, UNUSED Mat */ Gfx *geo_switch_mario_hand(s32 callContext, struct GraphNode *node, UNUSED Mat4 *c) { struct GraphNodeSwitchCase *switchCase = (struct GraphNodeSwitchCase *) node; - struct MarioBodyState *bodyState = &gBodyStates[0]; + struct MarioBodyState *bodyState = &gBodyStates[switchCase->numCases >> 1]; if (callContext == GEO_CONTEXT_RENDER) { if (bodyState->handState == MARIO_HAND_FISTS) { // switch between fists (0) and open (1) switchCase->selectedCase = ((bodyState->action & ACT_FLAG_SWIMMING_OR_FLYING) != 0); } else { - if (switchCase->numCases == 0) { + if ((switchCase->numCases & 0x01) == 0) { switchCase->selectedCase = (bodyState->handState < 5) ? bodyState->handState : MARIO_HAND_OPEN; } else { @@ -461,17 +461,17 @@ Gfx *geo_mario_hand_foot_scaler(s32 callContext, struct GraphNode *node, UNUSED static s16 sMarioAttackAnimCounter = 0; struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; struct GraphNodeScale *scaleNode = (struct GraphNodeScale *) node->next; - struct MarioBodyState *bodyState = &gBodyStates[0]; + struct MarioBodyState *bodyState = &gBodyStates[asGenerated->parameter >> 2]; if (callContext == GEO_CONTEXT_RENDER) { scaleNode->scale = 1.0f; - if (asGenerated->parameter == bodyState->punchState >> 6) { + if ((asGenerated->parameter & 0x03) == bodyState->punchState >> 6) { if (sMarioAttackAnimCounter != gAreaUpdateCounter && (bodyState->punchState & 0x3F) > 0) { bodyState->punchState -= 1; sMarioAttackAnimCounter = gAreaUpdateCounter; } scaleNode->scale = - gMarioAttackScaleAnimation[asGenerated->parameter * 6 + (bodyState->punchState & 0x3F)] + gMarioAttackScaleAnimation[(asGenerated->parameter & 0x03) * 6 + (bodyState->punchState & 0x3F)] / 10.0f; } }