diff --git a/actors/common1.h b/actors/common1.h index 53f45830..2e6967cb 100644 --- a/actors/common1.h +++ b/actors/common1.h @@ -165,7 +165,7 @@ extern const Gfx mario_cap_seg3_dl_03022E78[]; extern const Gfx mario_cap_seg3_dl_03022EA8[]; extern const Gfx mario_cap_seg3_dl_03022ED8[]; extern const Gfx mario_cap_seg3_dl_03022F20[]; -extern const Gfx mario_cap_m_logo_decal_dl[]; +extern const Gfx mario_cap_m_logo_decal[]; extern const Gfx mario_cap_seg3_dl_03022F48[]; extern const Gfx mario_cap_seg3_dl_03022FF8[]; extern const Gfx mario_cap_seg3_dl_030230B0[]; diff --git a/actors/custom0.h b/actors/custom0.h index 0e890e5b..27b9f004 100644 --- a/actors/custom0.h +++ b/actors/custom0.h @@ -19,7 +19,7 @@ extern const Gfx luigi_cap_seg3_dl_03022E78[]; extern const Gfx luigi_cap_seg3_dl_03022EA8[]; extern const Gfx luigi_cap_seg3_dl_03022ED8[]; extern const Gfx luigi_cap_seg3_dl_03022F20[]; -extern const Gfx luigi_cap_l_logo_decal_dl[]; +extern const Gfx luigi_cap_l_logo_decal[]; extern const Gfx luigi_cap_seg3_dl_03022F48[]; extern const Gfx luigi_cap_seg3_dl_03022FF8[]; extern const Gfx luigi_cap_seg3_dl_030230B0[]; diff --git a/actors/luigi/custom_luigi_cap.rgba16.png b/actors/luigi/custom_luigi_cap.rgba16.png new file mode 100644 index 00000000..d8216b00 Binary files /dev/null and b/actors/luigi/custom_luigi_cap.rgba16.png differ diff --git a/actors/luigi/custom_luigi_logo.rgba16.png b/actors/luigi/custom_luigi_logo.rgba16.png new file mode 100644 index 00000000..d163ae8e Binary files /dev/null and b/actors/luigi/custom_luigi_logo.rgba16.png differ diff --git a/actors/luigi/custom_luigi_logo_blend.rgba16.png b/actors/luigi/custom_luigi_logo_blend.rgba16.png new file mode 100644 index 00000000..d23e29bc Binary files /dev/null and b/actors/luigi/custom_luigi_logo_blend.rgba16.png differ diff --git a/actors/luigi/custom_luigi_sideburn.rgba32.png b/actors/luigi/custom_luigi_sideburn.rgba32.png new file mode 100644 index 00000000..2458e0dd Binary files /dev/null and b/actors/luigi/custom_luigi_sideburn.rgba32.png differ diff --git a/actors/luigi/custom_luigi_sideburn_add.rgba32.png b/actors/luigi/custom_luigi_sideburn_add.rgba32.png new file mode 100644 index 00000000..c254d775 Binary files /dev/null and b/actors/luigi/custom_luigi_sideburn_add.rgba32.png differ diff --git a/actors/luigi/custom_luigi_skin.rgba16.png b/actors/luigi/custom_luigi_skin.rgba16.png new file mode 100644 index 00000000..9799051f Binary files /dev/null and b/actors/luigi/custom_luigi_skin.rgba16.png differ diff --git a/actors/luigi/geo.inc.c b/actors/luigi/geo.inc.c index f0084c18..be9b7259 100644 --- a/actors/luigi/geo.inc.c +++ b/actors/luigi/geo.inc.c @@ -1,3 +1,4 @@ +#include "geo_header.h" // Normal Mario Geo const GeoLayout luigi_geo_face_and_wings[] = { @@ -8,10 +9,8 @@ const GeoLayout luigi_geo_face_and_wings[] = { GEO_OPEN_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_on_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_l_logo_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_hair_sideburn_decal_cap_on), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -28,9 +27,7 @@ const GeoLayout luigi_geo_face_and_wings[] = { GEO_CLOSE_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_off_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_hair_sideburn_decal_cap_off), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -102,17 +99,13 @@ const GeoLayout luigi_geo_right_hand[] = { GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), GEO_CLOSE_NODE(), GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, luigi_right_hand_peace), // here we go hand - GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, luigi_right_hand_cap), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, luigi_right_hand_cap), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_right_hand_cap_decal), GEO_CLOSE_NODE(), - GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, luigi_right_hand_cap), + GEO_ANIMATED_PART(LAYER_OPAQUE, 65, 0, 0, luigi_right_hand_cap), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_right_hand_cap_decal), GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_right_hand_cap_wings), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), @@ -200,8 +193,8 @@ const GeoLayout luigi_vanish_geo_face_and_wings[] = { GEO_OPEN_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_on_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_l_logo_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_on), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -218,7 +211,7 @@ const GeoLayout luigi_vanish_geo_face_and_wings[] = { GEO_CLOSE_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_off_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_hair_sideburn_decal_cap_off), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -290,13 +283,13 @@ const GeoLayout luigi_vanish_geo_right_hand[] = { GEO_HELD_OBJECT(0x00, 0, 0, 0, geo_switch_mario_hand_grab_pos), GEO_CLOSE_NODE(), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, luigi_right_hand_peace), // here we go hand - GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, luigi_right_hand_cap), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, luigi_right_hand_cap), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal), GEO_CLOSE_NODE(), - GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, luigi_right_hand_cap), + GEO_ANIMATED_PART(LAYER_TRANSPARENT, 65, 0, 0, luigi_right_hand_cap), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_decal), GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_right_hand_cap_wings_transparent), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), @@ -684,19 +677,30 @@ const GeoLayout luigi_geo_load_body[] = { // This last geo is used to load all of Mario Geo in the Level Scripts const GeoLayout luigi_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_PLAYER, 0xB4, 100), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), - GEO_OPEN_NODE(), - GEO_ASM(0, geo_mario_set_player_colors), - GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), - GEO_ASM(0, geo_mirror_mario_backface_culling), - GEO_ASM(0, geo_mirror_mario_set_alpha), + GEO_SHADOW(SHADOW_CIRCLE_PLAYER, 0xB4, 100), GEO_OPEN_NODE(), - GEO_BRANCH(1, luigi_geo_load_body), + GEO_SCALE(0x00, 16384), + GEO_OPEN_NODE(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_OPAQUE << 2, geo_mirror_mario_backface_culling), + GEO_ASM(LAYER_ALPHA << 2, geo_mirror_mario_backface_culling), + GEO_ASM(LAYER_TRANSPARENT << 2, geo_mirror_mario_backface_culling), + GEO_ASM(0, geo_mirror_mario_set_alpha), + GEO_OPEN_NODE(), + GEO_BRANCH(1, luigi_geo_load_body), + GEO_CLOSE_NODE(), + GEO_ASM((LAYER_OPAQUE << 2) | 1, geo_mirror_mario_backface_culling), + GEO_ASM((LAYER_ALPHA << 2) | 1, geo_mirror_mario_backface_culling), + GEO_ASM((LAYER_TRANSPARENT << 2) | 1, geo_mirror_mario_backface_culling), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), - GEO_ASM(1, geo_mirror_mario_backface_culling), - GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; diff --git a/actors/luigi/geo_header.h b/actors/luigi/geo_header.h index 3230aa92..90e8b1e0 100644 --- a/actors/luigi/geo_header.h +++ b/actors/luigi/geo_header.h @@ -55,8 +55,8 @@ extern const Gfx luigi_mustache_cap_on_dl[]; extern const Gfx luigi_face_part_cap_on_dl[]; extern const Gfx luigi_face_cap_dl[]; extern const Gfx luigi_face_back_hair_cap_on_dl[]; -extern const Gfx luigi_hair_sideburn_decal_cap_on_dl[]; -extern const Gfx luigi_l_logo_decal_dl[]; +extern const Gfx luigi_hair_sideburn_decal_cap_on[]; +extern const Gfx luigi_l_logo_decal[]; extern const Gfx luigi_face_cap_on_dl[]; extern const Gfx luigi_cap_on_eyes_front[]; extern const Gfx luigi_cap_on_eyes_half_closed[]; @@ -72,7 +72,7 @@ extern const Gfx luigi_mustache_cap_off_dl[]; extern const Gfx luigi_hair_sideburn_cap_off_dl[]; extern const Gfx luigi_face_part_cap_off_dl[]; extern const Gfx luigi_face_hair_cap_off_dl[]; -extern const Gfx luigi_hair_sideburn_decal_cap_off_dl[]; +extern const Gfx luigi_hair_sideburn_decal_cap_off[]; extern const Gfx luigi_face_cap_off_dl[]; extern const Gfx luigi_cap_off_eyes_front[]; extern const Gfx luigi_cap_off_eyes_half_closed[]; @@ -92,7 +92,7 @@ extern const Gfx luigi_right_hand_cap_l_logo_dl[]; extern const Gfx luigi_right_hand_cap_top_dl[]; extern const Gfx luigi_right_hand_cap_hand_position_dl[]; extern const Gfx luigi_right_hand_cap_bottom_dl[]; -extern const Gfx luigi_right_hand_cap_decal_dl[]; +extern const Gfx luigi_right_hand_cap_decal[]; extern const Gfx luigi_right_hand_cap_dl[]; extern const Gfx luigi_right_hand_cap_wings_half_1_dl[]; extern const Gfx luigi_right_hand_cap_wings_half_2_dl[]; @@ -112,4 +112,5 @@ extern const Gfx luigi_wings_half_2_dl[]; extern const Gfx luigi_cap_wings[]; extern const Gfx luigi_cap_wings_transparent[]; extern const Gfx luigi_metal_cap_wings[]; -extern const Gfx luigi_metal_cap_wings_transparent[]; \ No newline at end of file +extern const Gfx luigi_metal_cap_wings_transparent[]; +extern const Gfx luigi_material_revert_render_settings[]; \ No newline at end of file diff --git a/actors/luigi/luigi_externs.h b/actors/luigi/luigi_externs.h new file mode 100644 index 00000000..0e8222c0 --- /dev/null +++ b/actors/luigi/luigi_externs.h @@ -0,0 +1,7 @@ +extern ALIGNED8 const Texture luigi_texture_l_logo[]; +extern ALIGNED8 const Texture luigi_texture_l_blend[]; +extern ALIGNED8 const Texture luigi_texture_l_cap[]; +extern ALIGNED8 const Texture luigi_texture_hair_sideburn[]; +extern ALIGNED8 const Texture luigi_texture_add_sideburn[]; +extern ALIGNED8 const Texture luigi_texture_skin_sideburn[]; +extern ALIGNED8 const Texture luigi_texture_mustache[]; \ No newline at end of file diff --git a/actors/luigi/model.inc.c b/actors/luigi/model.inc.c index dddb4c07..28e34dca 100644 --- a/actors/luigi/model.inc.c +++ b/actors/luigi/model.inc.c @@ -28,8 +28,14 @@ static const Lights1 luigi_brown2_lights_group = gdSPDefLights1( 0x73, 0x06, 0x00, 0x28, 0x28, 0x28 ); +static const Lights1 luigi_black_lights_group = gdSPDefLights1( + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x28, 0x28, 0x28 +); + #include "actors/mario/mario_externs.h" -#define luigi_texture_metal mario_texture_metal +#define luigi_texture_metal_shade mario_texture_metal_shade +#define luigi_texture_metal_light mario_texture_metal_light #define luigi_texture_yellow_button mario_texture_yellow_button #define luigi_texture_eyes_front mario_texture_eyes_front #define luigi_texture_eyes_half_closed mario_texture_eyes_half_closed @@ -46,11 +52,27 @@ static const Lights1 luigi_brown2_lights_group = gdSPDefLights1( #define luigi_texture_cap_inside mario_texture_cap_inside ALIGNED8 const Texture luigi_texture_l_logo[] = { -#include "actors/luigi/custom_luigi_logo.ia16.inc.c" +#include "actors/luigi/custom_luigi_logo.rgba16.inc.c" +}; + +ALIGNED8 const Texture luigi_texture_l_blend[] = { +#include "actors/luigi/custom_luigi_logo_blend.rgba16.inc.c" +}; + +ALIGNED8 const Texture luigi_texture_l_cap[] = { +#include "actors/luigi/custom_luigi_cap.rgba16.inc.c" }; ALIGNED8 const Texture luigi_texture_hair_sideburn[] = { -#include "actors/luigi/custom_luigi_sideburn.rgba16.inc.c" +#include "actors/luigi/custom_luigi_sideburn.rgba32.inc.c" +}; + +ALIGNED8 const Texture luigi_texture_add_sideburn[] = { +#include "actors/luigi/custom_luigi_sideburn_add.rgba32.inc.c" +}; + +ALIGNED8 const Texture luigi_texture_skin_sideburn[] = { +#include "actors/luigi/custom_luigi_skin.rgba16.inc.c" }; ALIGNED8 const Texture luigi_texture_mustache[] = { @@ -226,12 +248,22 @@ const Gfx luigi_butt[] = { }; const Gfx luigi_metal_butt[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(luigi_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(luigi_butt_dl), gsSPEndDisplayList(), }; @@ -311,6 +343,8 @@ const Gfx luigi_left_arm_shared_dl[] = { }; const Gfx luigi_left_arm[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHIRT), // gsSPLight(&luigi_green_lights_group.a, 2), gsSPDisplayList(luigi_left_arm_shared_dl), gsSPEndDisplayList(), @@ -469,6 +503,8 @@ const Gfx luigi_left_hand_closed_shared_dl[] = { }; const Gfx luigi_left_hand_closed[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(luigi_left_hand_closed_shared_dl), gsSPEndDisplayList(), @@ -550,6 +586,8 @@ const Gfx luigi_right_arm_shared_dl[] = { }; const Gfx luigi_right_arm[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHIRT), // gsSPLight(&luigi_green_lights_group.a, 2), gsSPDisplayList(luigi_right_arm_shared_dl), gsSPEndDisplayList(), @@ -705,6 +743,8 @@ const Gfx luigi_right_hand_closed_dl[] = { }; const Gfx luigi_right_hand_closed[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(luigi_right_hand_closed_dl), gsSPEndDisplayList(), @@ -789,12 +829,22 @@ const Gfx luigi_left_thigh[] = { }; const Gfx luigi_metal_left_thigh[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(luigi_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(luigi_left_thigh_dl), gsSPEndDisplayList(), }; @@ -903,6 +953,8 @@ const Gfx luigi_left_foot_shared_dl[] = { }; const Gfx luigi_left_foot[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHOES), gsSPDisplayList(luigi_left_foot_shared_dl), gsSPEndDisplayList(), @@ -974,6 +1026,8 @@ const Gfx luigi_right_thigh_shared_dl[] = { }; const Gfx luigi_right_thigh[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(PANTS), // gsSPLight(&luigi_blue_lights_group.a, 2), gsSPDisplayList(luigi_right_thigh_shared_dl), gsSPEndDisplayList(), @@ -1094,6 +1148,8 @@ const Gfx luigi_right_foot_dl[] = { }; const Gfx luigi_right_foot[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHOES), gsSPDisplayList(luigi_right_foot_dl), gsDPPipeSync(), @@ -1895,7 +1951,26 @@ Gfx luigi_face_back_hair_cap_on_dl[] = { gsSPEndDisplayList(), }; -const Gfx luigi_hair_sideburn_decal_cap_on_dl[] = { +const Gfx luigi_hair_sideburn_decal_cap_on[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 11), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, luigi_texture_hair_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, luigi_texture_add_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(luigi_hair_sideburn_cap_on_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), @@ -1903,10 +1978,10 @@ const Gfx luigi_hair_sideburn_decal_cap_on_dl[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_hair_sideburn), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_skin_sideburn), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPCopyLightsPlayerPart(HAIR), + gsSPCopyLightsPlayerPart(SKIN), gsSPDisplayList(luigi_hair_sideburn_cap_on_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -1914,19 +1989,38 @@ const Gfx luigi_hair_sideburn_decal_cap_on_dl[] = { gsSPEndDisplayList(), }; -const Gfx luigi_l_logo_decal_dl[] = { +const Gfx luigi_l_logo_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_l_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_l_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(luigi_l_logo_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, luigi_texture_l_logo), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_l_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&luigi_white_lights_group.l, 1), - gsSPLight(&luigi_white_lights_group.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(luigi_l_logo_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -1935,10 +2029,8 @@ const Gfx luigi_l_logo_decal_dl[] = { }; const Gfx luigi_face_cap_on_dl[] = { - gsSPDisplayList(luigi_hair_sideburn_cap_on_dl), gsSPDisplayList(luigi_face_part_cap_on_dl), gsSPCopyLightsPlayerPart(CAP), - gsSPDisplayList(luigi_l_logo_dl), gsSPDisplayList(luigi_face_cap_dl), gsSPCopyLightsPlayerPart(HAIR), gsSPDisplayList(luigi_face_back_hair_cap_on_dl), @@ -2628,7 +2720,26 @@ Gfx luigi_face_hair_cap_off_dl[] = { gsSPEndDisplayList(), }; -const Gfx luigi_hair_sideburn_decal_cap_off_dl[] = { +const Gfx luigi_hair_sideburn_decal_cap_off[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 11), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, luigi_texture_hair_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, luigi_texture_add_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(luigi_hair_sideburn_cap_off_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), @@ -2636,10 +2747,10 @@ const Gfx luigi_hair_sideburn_decal_cap_off_dl[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_hair_sideburn), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_skin_sideburn), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPCopyLightsPlayerPart(HAIR), + gsSPCopyLightsPlayerPart(SKIN), gsSPDisplayList(luigi_hair_sideburn_cap_off_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -2648,7 +2759,6 @@ const Gfx luigi_hair_sideburn_decal_cap_off_dl[] = { }; const Gfx luigi_face_cap_off_dl[] = { - gsSPDisplayList(luigi_hair_sideburn_cap_off_dl), gsSPDisplayList(luigi_face_part_cap_off_dl), gsSPCopyLightsPlayerPart(HAIR), gsSPDisplayList(luigi_face_hair_cap_off_dl), @@ -2995,6 +3105,8 @@ const Gfx luigi_left_hand_open_shared_dl[] = { }; const Gfx luigi_left_hand_open[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(luigi_left_hand_open_shared_dl), gsSPEndDisplayList(), @@ -3137,6 +3249,8 @@ const Gfx luigi_right_hand_open_dl[] = { }; const Gfx luigi_right_hand_open[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(luigi_right_hand_open_dl), gsSPEndDisplayList(), @@ -3398,19 +3512,38 @@ const Gfx luigi_right_hand_cap_bottom_dl[] = { gsSPEndDisplayList(), }; -const Gfx luigi_right_hand_cap_decal_dl[] = { +const Gfx luigi_right_hand_cap_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&luigi_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_l_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_texture_l_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(luigi_right_hand_cap_l_logo_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, luigi_texture_l_logo), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_l_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&luigi_white_lights_group.l, 1), - gsSPLight(&luigi_white_lights_group.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(luigi_right_hand_cap_l_logo_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -3419,6 +3552,7 @@ const Gfx luigi_right_hand_cap_decal_dl[] = { }; const Gfx luigi_right_hand_cap_dl[] = { + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(luigi_right_hand_cap_top_dl), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in luigi_misc.c gsSPDisplayList(luigi_right_hand_cap_hand_position_dl), @@ -3439,52 +3573,53 @@ const Gfx luigi_right_hand_cap_dl[] = { gsSPEndDisplayList(), }; -static const Vtx luigi_right_hand_cap_wings_half_1_dl_vertex[10] = { - {{{368, 146, 7}, 0, {990, 0}, {0xBE, 0x66, 0xDA, 0xFE}}}, - {{{166, 37, 68}, 0, {0, 2012}, {0xBE, 0x66, 0xDA, 0xFE}}}, - {{{212, 96, 143}, 0, {990, 2012}, {0xBE, 0x66, 0xDA, 0xFE}}}, - {{{368, 146, 7}, 0, {990, 0}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{322, 87, -67}, 0, {0, 0}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{166, 37, 68}, 0, {0, 2012}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{178, -177, 128}, 0, {990, 2012}, {0xA7, 0xB3, 0xCF, 0xFE}}}, - {{{149, -100, 60}, 0, {0, 2012}, {0xA7, 0xB3, 0xCF, 0xFE}}}, - {{{319, -248, -14}, 0, {990, 0}, {0xA7, 0xB3, 0xCF, 0xFE}}}, - {{{290, -171, -81}, 0, {0, 0}, {0xA7, 0xB3, 0xCF, 0xFE}}}, +// 0x0401AF60 +static const Vtx luigi_right_hand_cap_wings_half_1_dl_vertex[] = { + {{{ 368, 146, 7}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 166, 37, 68}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 212, 96, 143}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 368, 146, 7}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 322, 87, -67}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 166, 37, 68}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 178, -177, 128}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 149, -100, 60}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 319, -248, -14}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 290, -171, -81}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; -static const Vtx luigi_right_hand_cap_wings_half_2_dl_vertex[8] = { - {{{414, 206, 82}, 0, {990, 0}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{212, 96, 143}, 0, {0, 2012}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{258, 156, 218}, 0, {990, 2012}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{368, 146, 7}, 0, {0, 0}, {0xBD, 0x65, 0xD9, 0xFE}}}, - {{{178, -177, 128}, 0, {0, 2012}, {0xA8, 0xB3, 0xCF, 0xFE}}}, - {{{319, -248, -14}, 0, {0, 0}, {0xA8, 0xB3, 0xCF, 0xFE}}}, - {{{349, -325, 53}, 0, {990, 0}, {0xA8, 0xB3, 0xCF, 0xFE}}}, - {{{207, -253, 195}, 0, {990, 2012}, {0xA8, 0xB3, 0xCF, 0xFE}}}, +// 0x0401B000 +static const Vtx luigi_right_hand_cap_wings_half_2_dl_vertex[] = { + {{{ 414, 206, 82}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 212, 96, 143}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 258, 156, 218}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 368, 146, 7}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 178, -177, 128}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 319, -248, -14}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 349, -325, 53}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 207, -253, 195}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, }; +// 0x0401B080 - 0x0401B0B0 const Gfx luigi_right_hand_cap_wings_half_1_dl[] = { - gsSPVertex(luigi_right_hand_cap_wings_half_1_dl_vertex + 0, 10, 0), - gsSP1Triangle(0, 1, 2, 0), - gsSP1Triangle(3, 4, 5, 0), - gsSP1Triangle(6, 7, 8, 0), - gsSP1Triangle(7, 9, 8, 0), - gsSPEndDisplayList(), + gsSPVertex(luigi_right_hand_cap_wings_half_1_dl_vertex, 10, 0), + gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), + gsSP2Triangles( 6, 7, 8, 0x0, 7, 9, 8, 0x0), + gsSPEndDisplayList(), }; +// 0x0401B0B0 - 0x0401B0E0 const Gfx luigi_right_hand_cap_wings_half_2_dl[] = { - gsSPVertex(luigi_right_hand_cap_wings_half_2_dl_vertex + 0, 8, 0), - gsSP1Triangle(0, 1, 2, 0), - gsSP1Triangle(0, 3, 1, 0), - gsSP1Triangle(4, 5, 6, 0), - gsSP1Triangle(7, 4, 6, 0), - gsSPEndDisplayList(), + gsSPVertex(luigi_right_hand_cap_wings_half_2_dl_vertex, 8, 0), + gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0), + gsSP2Triangles( 4, 5, 6, 0x0, 7, 4, 6, 0x0), + gsSPEndDisplayList(), }; +// 0x0401B0E0 - 0x0401B138 const Gfx luigi_right_hand_cap_wings_intial_dl[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPLight(&luigi_white_lights_group.l, 1), @@ -3498,7 +3633,7 @@ const Gfx luigi_right_hand_cap_wings_intial_dl[] = { const Gfx luigi_right_hand_cap_wings_transparent_intial_dl[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPLight(&luigi_white_lights_group.l, 1), @@ -3509,19 +3644,18 @@ const Gfx luigi_right_hand_cap_wings_transparent_intial_dl[] = { gsSPEndDisplayList(), }; +// 0x0401B138 - 0x0401B158 const Gfx luigi_right_hand_cap_wings_end_dl[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; const Gfx luigi_right_hand_cap[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPCopyLightsPlayerPart(CAP), - gsSPDisplayList(luigi_right_hand_cap_l_logo_dl), gsSPDisplayList(luigi_right_hand_cap_dl), gsSPEndDisplayList(), }; @@ -3797,31 +3931,37 @@ const Gfx luigi_right_hand_peace_shared_dl[] = { }; const Gfx luigi_right_hand_peace[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(luigi_right_hand_peace_shared_dl), gsSPEndDisplayList(), }; +// 0x0401C940 static const Vtx luigi_wings_half_1_dl_vertex[] = { - {{{ -105, 212, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ -105, 0, 0}, 0, { 0, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 0, 0}, 0, { 990, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 212, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}}, + {{{ -105, 212, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -105, 0, 0}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 0, 0}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 212, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; +// 0x0401C980 static const Vtx luigi_wings_half_2_dl_vertex[] = { - {{{ 0, 0, 0}, 0, { 0, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 106, 212, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 212, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 106, 0, 0}, 0, { 990, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, + {{{ 0, 0, 0}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 106, 212, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 212, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 106, 0, 0}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, }; +// 0x0401C9C0 - 0x0401C9E0 const Gfx luigi_wings_half_1_dl[] = { gsSPVertex(luigi_wings_half_1_dl_vertex, 4, 0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), gsSPEndDisplayList(), }; +// 0x0401C9E0 - 0x0401CA00 const Gfx luigi_wings_half_2_dl[] = { gsSPVertex(luigi_wings_half_2_dl_vertex, 4, 0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0), @@ -3831,8 +3971,8 @@ const Gfx luigi_wings_half_2_dl[] = { // 0x0401CA00 - 0x0401CAB8 const Gfx luigi_cap_wings[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -3851,7 +3991,7 @@ const Gfx luigi_cap_wings[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; @@ -3859,7 +3999,7 @@ const Gfx luigi_cap_wings[] = { const Gfx luigi_cap_wings_transparent[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -3878,15 +4018,15 @@ const Gfx luigi_cap_wings_transparent[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; // 0x0401CB70 - 0x0401CC28 const Gfx luigi_metal_cap_wings[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -3905,22 +4045,22 @@ const Gfx luigi_metal_cap_wings[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; // 0x0401CC28 - 0x0401CD20 const Gfx luigi_metal_cap_wings_transparent[] = { gsDPPipeSync(), - gsSPClearGeometryMode(G_TEXTURE_GEN), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), + gsSPLight(&luigi_white_lights_group.l, 1), + gsSPLight(&luigi_white_lights_group.a, 2), gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_texture_metal_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), @@ -3931,9 +4071,18 @@ const Gfx luigi_metal_cap_wings_transparent[] = { gsSPDisplayList(luigi_wings_half_2_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN | G_CULL_BACK | G_SHADING_SMOOTH), - gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE), - gsDPLoadTextureBlock(luigi_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; + +const Gfx luigi_material_revert_render_settings[] = { + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsDPSetEnvColor(255, 255, 255, 255), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList(), +}; diff --git a/actors/luigi_cap/geo.inc.c b/actors/luigi_cap/geo.inc.c index e3e31e54..ad6e7dd3 100644 --- a/actors/luigi_cap/geo.inc.c +++ b/actors/luigi_cap/geo.inc.c @@ -1,95 +1,128 @@ +#include "geo_header.h" // 0x16000CA4 const GeoLayout luigis_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022F48), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03022F48), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022F48), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03022F48), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000CF0 const GeoLayout luigis_metal_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022FF8), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03022FF8), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022FF8), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03022FF8), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000D3C const GeoLayout luigis_wing_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022F48), - GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_seg3_dl_030230B0), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03023160), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022F48), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_seg3_dl_030230B0), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_l_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03023160), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000DA8 const GeoLayout luigis_winged_metal_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022FF8), - GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_seg3_dl_03023108), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03023298), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_seg3_dl_03022FF8), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_seg3_dl_03023108), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_seg3_dl_03023298), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, luigi_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, luigi_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; diff --git a/actors/luigi_cap/geo_header.h b/actors/luigi_cap/geo_header.h new file mode 100644 index 00000000..c0bbcb97 --- /dev/null +++ b/actors/luigi_cap/geo_header.h @@ -0,0 +1,20 @@ +extern const GeoLayout luigis_cap_geo[]; +extern const GeoLayout luigis_metal_cap_geo[]; +extern const GeoLayout luigis_wing_cap_geo[]; +extern const GeoLayout luigis_winged_metal_cap_geo[]; +extern const Gfx luigi_cap_seg3_dl_03022B30[]; +extern const Gfx luigi_cap_seg3_dl_03022B68[]; +extern const Gfx luigi_cap_seg3_dl_03022CC8[]; +extern const Gfx luigi_cap_seg3_dl_03022D10[]; +extern const Gfx luigi_cap_seg3_dl_03022E78[]; +extern const Gfx luigi_cap_seg3_dl_03022EA8[]; +extern const Gfx luigi_cap_seg3_dl_03022ED8[]; +extern const Gfx luigi_cap_seg3_dl_03022F20[]; +extern const Gfx luigi_cap_l_logo_decal[]; +extern const Gfx luigi_cap_seg3_dl_03022F48[]; +extern const Gfx luigi_cap_seg3_dl_03022FF8[]; +extern const Gfx luigi_cap_seg3_dl_030230B0[]; +extern const Gfx luigi_cap_seg3_dl_03023108[]; +extern const Gfx luigi_cap_seg3_dl_03023160[]; +extern const Gfx luigi_cap_seg3_dl_03023298[]; +extern const Gfx luigi_cap_material_revert_render_settings[]; \ No newline at end of file diff --git a/actors/luigi_cap/model.inc.c b/actors/luigi_cap/model.inc.c index 51beabeb..530a12ef 100644 --- a/actors/luigi_cap/model.inc.c +++ b/actors/luigi_cap/model.inc.c @@ -1,9 +1,9 @@ -// Luigi Cap (Normal Cap, Metal, Winged, etc) +// Mario Cap (Normal Cap, Metal, Winged, etc) // 0x0301CF08 static const Lights1 luigi_cap_seg3_lights_0301CF08 = gdSPDefLights1( - 0x39, 0x03, 0x00, - 0x73, 0x06, 0x00, 0x28, 0x28, 0x28 + 0x00, 0x39, 0x00, + 0x00, 0x73, 0x00, 0x28, 0x28, 0x28 ); // 0x0301CF20 @@ -18,18 +18,23 @@ static const Lights1 luigi_cap_seg3_lights_0301CF38 = gdSPDefLights1( 0x00, 0xff, 0x00, 0x28, 0x28, 0x28 ); -#include "actors/mario_cap/mario_cap_externs.h" -#define luigi_cap_seg3_texture_0301CF50 mario_cap_seg3_texture_0301CF50 -#define luigi_cap_seg3_texture_0301E750 mario_cap_seg3_texture_0301E750 -#define luigi_cap_seg3_texture_0301F750 mario_cap_seg3_texture_0301F750 -#define luigi_cap_seg3_texture_03020750 mario_cap_seg3_texture_03020750 -#define luigi_cap_seg3_texture_03021750 mario_cap_seg3_texture_03021750 -#define luigi_cap_texture_cap_inside mario_cap_texture_cap_inside +static const Lights1 luigi_cap_black_lights_group = gdSPDefLights1( + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x28, 0x28, 0x28 +); -// 0x0301DF50 -ALIGNED8 const Texture luigi_cap_seg3_texture_0301DF50[] = { -#include "actors/luigi_cap/custom_luigi_cap_logo.ia16.inc.c" -}; +#include "actors/mario/mario_externs.h" +#include "actors/luigi/luigi_externs.h" +#define luigi_cap_texture_metal_shade mario_texture_metal_shade +#define luigi_cap_texture_metal_light mario_texture_metal_light +#define luigi_cap_texture_l_logo luigi_texture_l_logo +#define luigi_cap_texture_l_blend luigi_texture_l_blend +#define luigi_cap_texture_l_cap luigi_texture_l_cap +#define luigi_cap_texture_wings_half_1 mario_texture_wings_half_1 +#define luigi_cap_texture_wings_half_2 mario_texture_wings_half_2 +#define luigi_cap_texture_metal_wings_half_1 mario_texture_metal_wings_half_1 +#define luigi_cap_texture_metal_wings_half_2 mario_texture_metal_wings_half_2 +#define luigi_cap_texture_cap_inside mario_texture_cap_inside // 0x03022750 static const Vtx luigi_cap_seg3_vertex_03022750[] = { @@ -182,30 +187,30 @@ const Gfx luigi_cap_seg3_dl_03022D10[] = { // 0x03022D38 static const Vtx luigi_cap_seg3_vertex_03022D38[] = { - {{{ 199, 247, -55}, 0, { 990, 0}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 131, 274, 20}, 0, { 0, 0}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 69, 71, 38}, 0, { 0, 2012}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 199, 247, -55}, 0, { 990, 0}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ 69, 71, 38}, 0, { 0, 2012}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ 138, 44, -37}, 0, { 990, 2012}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ -137, 44, -37}, 0, { 990, 2012}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -68, 71, 38}, 0, { 0, 2012}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -198, 247, -55}, 0, { 990, 0}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -68, 71, 38}, 0, { 0, 2012}, {0xa7, 0xed, 0x58, 0xff}}}, - {{{ -130, 274, 20}, 0, { 0, 0}, {0xa7, 0xed, 0x58, 0xff}}}, - {{{ -198, 247, -55}, 0, { 990, 0}, {0xa7, 0xed, 0x58, 0xff}}}, + {{{ 199, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 131, 274, 20}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 69, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 199, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 69, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 138, 44, -37}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -137, 44, -37}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -68, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -68, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -130, 274, 20}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x03022DF8 static const Vtx luigi_cap_seg3_vertex_03022DF8[] = { - {{{ 268, 219, -132}, 0, { 990, 0}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 199, 247, -55}, 0, { 0, 0}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 138, 44, -37}, 0, { 0, 2012}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 207, 16, -114}, 0, { 990, 2012}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ -206, 16, -114}, 0, { 990, 2012}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -137, 44, -37}, 0, { 0, 2012}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -267, 219, -132}, 0, { 990, 0}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -198, 247, -55}, 0, { 0, 0}, {0xa7, 0xed, 0x57, 0xff}}}, + {{{ 268, 219, -132}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 199, 247, -55}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 138, 44, -37}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 207, 16, -114}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -206, 16, -114}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -137, 44, -37}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -267, 219, -132}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x03022E78 - 0x03022EA8 @@ -227,7 +232,7 @@ const Gfx luigi_cap_seg3_dl_03022EA8[] = { // 0x03022ED8 - 0x03022F20 const Gfx luigi_cap_seg3_dl_03022ED8[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), @@ -246,19 +251,38 @@ const Gfx luigi_cap_seg3_dl_03022F20[] = { gsSPEndDisplayList(), }; -const Gfx luigi_cap_l_logo_decal_dl[] = { +const Gfx luigi_cap_l_logo_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&luigi_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_l_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_l_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(luigi_cap_seg3_dl_03022B30), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301DF50), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_l_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&luigi_cap_seg3_lights_0301CF20.l, 1), - gsSPLight(&luigi_cap_seg3_lights_0301CF20.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(luigi_cap_seg3_dl_03022B30), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -270,8 +294,7 @@ const Gfx luigi_cap_l_logo_decal_dl[] = { const Gfx luigi_cap_seg3_dl_03022F48[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPCopyLightsPlayerPart(CAP), //gsSPLight(&luigi_cap_seg3_lights_0301CF38.a, 2), - gsSPDisplayList(luigi_cap_seg3_dl_03022B30), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(luigi_cap_seg3_dl_03022D10), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -282,12 +305,22 @@ const Gfx luigi_cap_seg3_dl_03022F48[] = { // 0x03022FF8 - 0x030230B0 const Gfx luigi_cap_seg3_dl_03022FF8[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(luigi_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&luigi_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(luigi_cap_seg3_dl_03022B30), gsSPDisplayList(luigi_cap_seg3_dl_03022B68), gsSPDisplayList(luigi_cap_seg3_dl_03022CC8), @@ -303,11 +336,11 @@ const Gfx luigi_cap_seg3_dl_03022FF8[] = { // 0x030230B0 - 0x03023108 const Gfx luigi_cap_seg3_dl_030230B0[] = { gsSPDisplayList(luigi_cap_seg3_dl_03022ED8), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301E750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301F750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022EA8), @@ -318,11 +351,11 @@ const Gfx luigi_cap_seg3_dl_030230B0[] = { // 0x03023108 - 0x03023160 const Gfx luigi_cap_seg3_dl_03023108[] = { gsSPDisplayList(luigi_cap_seg3_dl_03022ED8), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_03020750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_metal_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_03021750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_metal_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022EA8), @@ -344,11 +377,11 @@ const Gfx luigi_cap_seg3_dl_03023160[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301E750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301F750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022EA8), @@ -363,18 +396,22 @@ const Gfx luigi_cap_seg3_dl_03023160[] = { // 0x03023298 - 0x030233D0 const Gfx luigi_cap_seg3_dl_03023298[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_0301CF50), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD), - gsDPLoadSync(), - gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)), - gsDPPipeSync(), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD), - gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), //gsSPLight(&luigi_cap_seg3_lights_0301CF20.a, 2), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&luigi_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, luigi_cap_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(luigi_cap_seg3_dl_03022B30), gsSPDisplayList(luigi_cap_seg3_dl_03022B68), gsSPDisplayList(luigi_cap_seg3_dl_03022CC8), @@ -386,11 +423,11 @@ const Gfx luigi_cap_seg3_dl_03023298[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_03020750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_metal_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_seg3_texture_03021750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, luigi_cap_texture_metal_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(luigi_cap_seg3_dl_03022EA8), @@ -402,3 +439,14 @@ const Gfx luigi_cap_seg3_dl_03023298[] = { gsDPSetEnvColor(255, 255, 255, 255), gsSPEndDisplayList(), }; + +const Gfx luigi_cap_material_revert_render_settings[] = { + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsDPSetEnvColor(255, 255, 255, 255), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList(), +}; diff --git a/actors/mario/custom_mario_cap.rgba16.png b/actors/mario/custom_mario_cap.rgba16.png new file mode 100644 index 00000000..c8fa9b04 Binary files /dev/null and b/actors/mario/custom_mario_cap.rgba16.png differ diff --git a/actors/mario/custom_mario_cap_inside.rgba32.png b/actors/mario/custom_mario_cap_inside.rgba32.png new file mode 100644 index 00000000..7a65837a Binary files /dev/null and b/actors/mario/custom_mario_cap_inside.rgba32.png differ diff --git a/actors/mario/custom_mario_logo.rgba16.png b/actors/mario/custom_mario_logo.rgba16.png new file mode 100644 index 00000000..0af7b8bc Binary files /dev/null and b/actors/mario/custom_mario_logo.rgba16.png differ diff --git a/actors/mario/custom_mario_logo_blend.rgba16.png b/actors/mario/custom_mario_logo_blend.rgba16.png new file mode 100644 index 00000000..637a643b Binary files /dev/null and b/actors/mario/custom_mario_logo_blend.rgba16.png differ diff --git a/actors/mario/custom_mario_metal_light.rgba16.png b/actors/mario/custom_mario_metal_light.rgba16.png new file mode 100644 index 00000000..1c728193 Binary files /dev/null and b/actors/mario/custom_mario_metal_light.rgba16.png differ diff --git a/actors/mario/custom_mario_metal_shade.rgba16.png b/actors/mario/custom_mario_metal_shade.rgba16.png new file mode 100644 index 00000000..a2dd26ab Binary files /dev/null and b/actors/mario/custom_mario_metal_shade.rgba16.png differ diff --git a/actors/mario/custom_mario_sideburn.rgba32.png b/actors/mario/custom_mario_sideburn.rgba32.png new file mode 100644 index 00000000..fd35b50c Binary files /dev/null and b/actors/mario/custom_mario_sideburn.rgba32.png differ diff --git a/actors/mario/custom_mario_sideburn_add.rgba32.png b/actors/mario/custom_mario_sideburn_add.rgba32.png new file mode 100644 index 00000000..29328272 Binary files /dev/null and b/actors/mario/custom_mario_sideburn_add.rgba32.png differ diff --git a/actors/mario/custom_mario_skin.rgba16.png b/actors/mario/custom_mario_skin.rgba16.png new file mode 100644 index 00000000..2c833b78 Binary files /dev/null and b/actors/mario/custom_mario_skin.rgba16.png differ diff --git a/actors/mario/geo.inc.c b/actors/mario/geo.inc.c index 0dcd3c2d..9a6ea4d6 100644 --- a/actors/mario/geo.inc.c +++ b/actors/mario/geo.inc.c @@ -1,3 +1,4 @@ +#include "geo_header.h" // Normal Mario Geo // 0x170002E0 @@ -9,10 +10,8 @@ const GeoLayout mario_geo_face_and_wings[] = { GEO_OPEN_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_on_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_m_logo_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_hair_sideburn_decal_cap_on), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -29,9 +28,7 @@ const GeoLayout mario_geo_face_and_wings[] = { GEO_CLOSE_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_off_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_hair_sideburn_decal_cap_off), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -107,15 +104,11 @@ const GeoLayout mario_geo_right_hand[] = { 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_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_decal), GEO_CLOSE_NODE(), GEO_ANIMATED_PART(LAYER_OPAQUE, 60, 0, 0, mario_right_hand_cap), GEO_OPEN_NODE(), - GEO_ASM(2, geo_mirror_mario_backface_culling), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal_dl), - GEO_ASM(3, geo_mirror_mario_backface_culling), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_decal), GEO_DISPLAY_LIST(LAYER_ALPHA, mario_right_hand_cap_wings), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), @@ -205,8 +198,8 @@ const GeoLayout mario_vanish_geo_face_and_wings[] = { GEO_OPEN_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_on_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_m_logo_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_on), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -223,7 +216,7 @@ const GeoLayout mario_vanish_geo_face_and_wings[] = { GEO_CLOSE_NODE(), GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_off_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_hair_sideburn_decal_cap_off), GEO_OPEN_NODE(), GEO_SWITCH_CASE(0, geo_switch_mario_eyes), GEO_OPEN_NODE(), @@ -299,11 +292,11 @@ const GeoLayout mario_vanish_geo_right_hand[] = { 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_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal), GEO_CLOSE_NODE(), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 60, 0, 0, mario_right_hand_cap), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal_dl), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_decal), GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_right_hand_cap_wings_transparent), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), @@ -700,19 +693,30 @@ const GeoLayout mario_geo_load_body[] = { // 0x17002DD4 const GeoLayout mario_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_PLAYER, 0xB4, 100), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), - GEO_OPEN_NODE(), - GEO_ASM(0, geo_mario_set_player_colors), - GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), - GEO_ASM(0, geo_mirror_mario_backface_culling), - GEO_ASM(0, geo_mirror_mario_set_alpha), + GEO_SHADOW(SHADOW_CIRCLE_PLAYER, 0xB4, 100), GEO_OPEN_NODE(), - GEO_BRANCH(1, mario_geo_load_body), + GEO_SCALE(0x00, 16384), + GEO_OPEN_NODE(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_OPAQUE << 2, geo_mirror_mario_backface_culling), + GEO_ASM(LAYER_ALPHA << 2, geo_mirror_mario_backface_culling), + GEO_ASM(LAYER_TRANSPARENT << 2, geo_mirror_mario_backface_culling), + GEO_ASM(0, geo_mirror_mario_set_alpha), + GEO_OPEN_NODE(), + GEO_BRANCH(1, mario_geo_load_body), + GEO_CLOSE_NODE(), + GEO_ASM((LAYER_OPAQUE << 2) | 1, geo_mirror_mario_backface_culling), + GEO_ASM((LAYER_ALPHA << 2) | 1, geo_mirror_mario_backface_culling), + GEO_ASM((LAYER_TRANSPARENT << 2) | 1, geo_mirror_mario_backface_culling), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), - GEO_ASM(1, geo_mirror_mario_backface_culling), - GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; diff --git a/actors/mario/geo_header.h b/actors/mario/geo_header.h new file mode 100644 index 00000000..5fbe12a1 --- /dev/null +++ b/actors/mario/geo_header.h @@ -0,0 +1,116 @@ +extern const GeoLayout mario_geo_face_and_wings[]; +extern const GeoLayout mario_geo_left_hand[]; +extern const GeoLayout mario_geo_right_hand[]; +extern const GeoLayout mario_geo_body[]; +extern const GeoLayout mario_vanish_geo_face_and_wings[]; +extern const GeoLayout mario_vanish_geo_left_hand[]; +extern const GeoLayout mario_vanish_geo_right_hand[]; +extern const GeoLayout mario_vanish_geo_body[]; +extern const GeoLayout mario_metal_geo_face_and_wings[]; +extern const GeoLayout mario_metal_geo_left_hand[]; +extern const GeoLayout mario_metal_geo_right_hand[]; +extern const GeoLayout mario_metal_geo_body[]; +extern const GeoLayout mario_metal_vanish_geo_face_and_wings[]; +extern const GeoLayout mario_metal_vanish_geo_left_hand[]; +extern const GeoLayout mario_metal_vanish_geo_right_hand[]; +extern const GeoLayout mario_metal_vanish_geo_body[]; +extern const GeoLayout mario_geo_load_body[]; +extern const GeoLayout mario_geo[]; +extern const Gfx mario_butt_dl[]; +extern const Gfx mario_butt[]; +extern const Gfx mario_metal_butt[]; +extern const Gfx mario_left_arm_shared_dl[]; +extern const Gfx mario_left_arm[]; +extern const Gfx mario_left_forearm_shared_dl[]; +extern const Gfx mario_left_hand_closed_shared_dl[]; +extern const Gfx mario_left_hand_closed[]; +extern const Gfx mario_right_arm_shared_dl[]; +extern const Gfx mario_right_arm[]; +extern const Gfx mario_right_forearm_shared_dl[]; +extern const Gfx mario_right_hand_closed_dl[]; +extern const Gfx mario_right_hand_closed[]; +extern const Gfx mario_metal_right_hand_closed[]; +extern const Gfx mario_left_thigh_dl[]; +extern const Gfx mario_left_thigh[]; +extern const Gfx mario_metal_left_thigh[]; +extern const Gfx mario_left_leg_shared_dl[]; +extern const Gfx mario_left_foot_shared_dl[]; +extern const Gfx mario_left_foot[]; +extern const Gfx mario_right_thigh_shared_dl[]; +extern const Gfx mario_right_thigh[]; +extern const Gfx mario_right_leg_shared_dl[]; +extern const Gfx mario_right_foot_dl[]; +extern const Gfx mario_right_foot[]; +extern const Gfx mario_metal_right_foot[]; +extern const Gfx mario_yellow_button_dl[]; +extern const Gfx mario_pants_overalls_shared_dl[]; +extern const Gfx mario_tshirt_shared_dl[]; +extern const Gfx mario_torso_dl[]; +extern const Gfx mario_torso[]; +extern const Gfx mario_metal_torso_shared_dl[]; +extern const Gfx mario_m_logo_dl[]; +extern const Gfx mario_eyes_cap_on_dl[]; +extern const Gfx mario_hair_sideburn_cap_on_dl[]; +extern const Gfx mario_mustache_cap_on_dl[]; +extern const Gfx mario_face_part_cap_on_dl[]; +extern const Gfx mario_face_cap_dl[]; +extern const Gfx mario_face_back_hair_cap_on_dl[]; +extern const Gfx mario_hair_sideburn_decal_cap_on[]; +extern const Gfx mario_m_logo_decal[]; +extern const Gfx mario_face_cap_on_dl[]; +extern const Gfx mario_cap_on_eyes_front[]; +extern const Gfx mario_cap_on_eyes_half_closed[]; +extern const Gfx mario_cap_on_eyes_closed[]; +extern const Gfx mario_cap_on_eyes_right[]; +extern const Gfx mario_cap_on_eyes_left[]; +extern const Gfx mario_cap_on_eyes_up[]; +extern const Gfx mario_cap_on_eyes_down[]; +extern const Gfx mario_cap_on_eyes_dead[]; +extern const Gfx mario_metal_cap_on_shared_dl[]; +extern const Gfx mario_eyes_cap_off_dl[]; +extern const Gfx mario_mustache_cap_off_dl[]; +extern const Gfx mario_hair_sideburn_cap_off_dl[]; +extern const Gfx mario_face_part_cap_off_dl[]; +extern const Gfx mario_face_hair_cap_off_dl[]; +extern const Gfx mario_hair_sideburn_decal_cap_off[]; +extern const Gfx mario_face_cap_off_dl[]; +extern const Gfx mario_cap_off_eyes_front[]; +extern const Gfx mario_cap_off_eyes_half_closed[]; +extern const Gfx mario_cap_off_eyes_closed[]; +extern const Gfx mario_cap_off_eyes_right[]; +extern const Gfx mario_cap_off_eyes_left[]; +extern const Gfx mario_cap_off_eyes_up[]; +extern const Gfx mario_cap_off_eyes_down[]; +extern const Gfx mario_cap_off_eyes_dead[]; +extern const Gfx mario_metal_cap_off_shared_dl[]; +extern const Gfx mario_left_hand_open_shared_dl[]; +extern const Gfx mario_left_hand_open[]; +extern const Gfx mario_right_hand_open_dl[]; +extern const Gfx mario_right_hand_open[]; +extern const Gfx mario_metal_right_hand_open[]; +extern const Gfx mario_right_hand_cap_m_logo_dl[]; +extern const Gfx mario_right_hand_cap_top_dl[]; +extern const Gfx mario_right_hand_cap_hand_position_dl[]; +extern const Gfx mario_right_hand_cap_bottom_dl[]; +extern const Gfx mario_right_hand_cap_decal[]; +extern const Gfx mario_right_hand_cap_dl[]; +extern const Gfx mario_right_hand_cap_wings_half_1_dl[]; +extern const Gfx mario_right_hand_cap_wings_half_2_dl[]; +extern const Gfx mario_right_hand_cap_wings_intial_dl[]; +extern const Gfx mario_right_hand_cap_wings_transparent_intial_dl[]; +extern const Gfx mario_right_hand_cap_wings_end_dl[]; +extern const Gfx mario_right_hand_cap[]; +extern const Gfx mario_right_hand_cap_wings[]; +extern const Gfx mario_right_hand_cap_wings_transparent[]; +extern const Gfx mario_metal_right_hand_cap_shared_dl[]; +extern const Gfx mario_metal_right_hand_cap_shared_dl_wings[]; +extern const Gfx mario_metal_right_hand_cap_shared_dl_wings_transparent[]; +extern const Gfx mario_right_hand_peace_shared_dl[]; +extern const Gfx mario_right_hand_peace[]; +extern const Gfx mario_wings_half_1_dl[]; +extern const Gfx mario_wings_half_2_dl[]; +extern const Gfx mario_cap_wings[]; +extern const Gfx mario_cap_wings_transparent[]; +extern const Gfx mario_metal_cap_wings[]; +extern const Gfx mario_metal_cap_wings_transparent[]; +extern const Gfx mario_material_revert_render_settings[]; diff --git a/actors/mario/mario_externs.h b/actors/mario/mario_externs.h index 5538cc64..5287b0a9 100644 --- a/actors/mario/mario_externs.h +++ b/actors/mario/mario_externs.h @@ -1,13 +1,17 @@ extern ALIGNED8 const Texture mario_texture_metal[]; +extern ALIGNED8 const Texture mario_texture_metal_shade[]; +extern ALIGNED8 const Texture mario_texture_metal_light[]; extern ALIGNED8 const Texture mario_texture_yellow_button[]; extern ALIGNED8 const Texture mario_texture_m_logo[]; +extern ALIGNED8 const Texture mario_texture_m_blend[]; +extern ALIGNED8 const Texture mario_texture_m_cap[]; extern ALIGNED8 const Texture mario_texture_hair_sideburn[]; +extern ALIGNED8 const Texture mario_texture_add_sideburn[]; +extern ALIGNED8 const Texture mario_texture_skin_sideburn[]; extern ALIGNED8 const Texture mario_texture_mustache[]; extern ALIGNED8 const Texture mario_texture_eyes_front[]; extern ALIGNED8 const Texture mario_texture_eyes_half_closed[]; extern ALIGNED8 const Texture mario_texture_eyes_closed[]; -extern ALIGNED8 const Texture mario_texture_eyes_closed_unused1[]; -extern ALIGNED8 const Texture mario_texture_eyes_closed_unused2[]; extern ALIGNED8 const Texture mario_texture_eyes_right[]; extern ALIGNED8 const Texture mario_texture_eyes_left[]; extern ALIGNED8 const Texture mario_texture_eyes_up[]; diff --git a/actors/mario/model.inc.c b/actors/mario/model.inc.c index b1e489e2..4fe434c6 100644 --- a/actors/mario/model.inc.c +++ b/actors/mario/model.inc.c @@ -36,93 +36,105 @@ static const Lights1 mario_brown2_lights_group = gdSPDefLights1( 0x73, 0x06, 0x00, 0x28, 0x28, 0x28 ); -// 0x04000090 +static const Lights1 mario_black_lights_group = gdSPDefLights1( + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x28, 0x28, 0x28 +); + ALIGNED8 const Texture mario_texture_metal[] = { #include "actors/mario/mario_metal.rgba16.inc.c" }; -// 0x04001090 +ALIGNED8 const Texture mario_texture_metal_shade[] = { +#include "actors/mario/custom_mario_metal_shade.rgba16.inc.c" +}; + +ALIGNED8 const Texture mario_texture_metal_light[] = { +#include "actors/mario/custom_mario_metal_light.rgba16.inc.c" +}; + ALIGNED8 const Texture mario_texture_yellow_button[] = { #include "actors/mario/mario_overalls_button.rgba16.inc.c" }; -// 0x04001890 ALIGNED8 const Texture mario_texture_m_logo[] = { -#include "actors/mario/custom_mario_logo.ia16.inc.c" +#include "actors/mario/custom_mario_logo.rgba16.inc.c" +}; + +ALIGNED8 const Texture mario_texture_m_blend[] = { +#include "actors/mario/custom_mario_logo_blend.rgba16.inc.c" +}; + +ALIGNED8 const Texture mario_texture_m_cap[] = { +#include "actors/mario/custom_mario_cap.rgba16.inc.c" }; -// 0x04002090 ALIGNED8 const Texture mario_texture_hair_sideburn[] = { -#include "actors/mario/custom_mario_sideburn.rgba16.inc.c" +#include "actors/mario/custom_mario_sideburn.rgba32.inc.c" +}; + +ALIGNED8 const Texture mario_texture_add_sideburn[] = { +#include "actors/mario/custom_mario_sideburn_add.rgba32.inc.c" +}; + +ALIGNED8 const Texture mario_texture_skin_sideburn[] = { +#include "actors/mario/custom_mario_skin.rgba16.inc.c" }; -// 0x04002890 ALIGNED8 const Texture mario_texture_mustache[] = { #include "actors/mario/mario_mustache.rgba16.inc.c" }; -// 0x04003090 ALIGNED8 const Texture mario_texture_eyes_front[] = { #include "actors/mario/mario_eyes_center.rgba16.inc.c" }; -// 0x04003890 ALIGNED8 const Texture mario_texture_eyes_half_closed[] = { #include "actors/mario/mario_eyes_half_closed.rgba16.inc.c" }; -// 0x04004090 ALIGNED8 const Texture mario_texture_eyes_closed[] = { #include "actors/mario/mario_eyes_closed.rgba16.inc.c" }; -// 0x04005890 ALIGNED8 const Texture mario_texture_eyes_right[] = { #include "actors/mario/mario_eyes_left_unused.rgba16.inc.c" }; -// 0x04006090 ALIGNED8 const Texture mario_texture_eyes_left[] = { #include "actors/mario/mario_eyes_right_unused.rgba16.inc.c" }; -// 0x04006890 ALIGNED8 const Texture mario_texture_eyes_up[] = { #include "actors/mario/mario_eyes_up_unused.rgba16.inc.c" }; -// 0x04007090 ALIGNED8 const Texture mario_texture_eyes_down[] = { #include "actors/mario/mario_eyes_down_unused.rgba16.inc.c" }; -// 0x04007890 ALIGNED8 const Texture mario_texture_eyes_dead[] = { #include "actors/mario/mario_eyes_dead.rgba16.inc.c" }; -// 0x04008090 ALIGNED8 const Texture mario_texture_wings_half_1[] = { #include "actors/mario/mario_wing.rgba16.inc.c" }; -// 0x04009090 ALIGNED8 const Texture mario_texture_wings_half_2[] = { #include "actors/mario/mario_wing_tip.rgba16.inc.c" }; -// 0x0400A090 ALIGNED8 const Texture mario_texture_metal_wings_half_1[] = { #include "actors/mario/mario_metal_wing_unused.rgba16.inc.c" }; -// 0x0400B090 ALIGNED8 const Texture mario_texture_metal_wings_half_2[] = { #include "actors/mario/mario_metal_wing_tip_unused.rgba16.inc.c" }; ALIGNED8 const Texture mario_texture_cap_inside[] = { -#include "actors/mario/custom_mario_cap_inside.rgba16.inc.c" +#include "actors/mario/custom_mario_cap_inside.rgba32.inc.c" }; // 0x0400C090 @@ -380,12 +392,22 @@ const Gfx mario_butt[] = { // 0x0400CCC8 - 0x0400CD40 const Gfx mario_metal_butt[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(mario_butt_dl), gsSPEndDisplayList(), }; @@ -489,6 +511,8 @@ const Gfx mario_left_arm_shared_dl[] = { // 0x0400D1D8 - 0x0400D1F8 const Gfx mario_left_arm[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHIRT), // gsSPLight(&mario_red_lights_group.a, 2), gsSPDisplayList(mario_left_arm_shared_dl), gsSPEndDisplayList(), @@ -640,6 +664,8 @@ const Gfx mario_left_hand_closed_shared_dl[] = { // 0x0400D8F0 - 0x0400D910 const Gfx mario_left_hand_closed[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_left_hand_closed_shared_dl), gsSPEndDisplayList(), @@ -748,6 +774,8 @@ const Gfx mario_right_arm_shared_dl[] = { // 0x0400DDE8 - 0x0400DE08 const Gfx mario_right_arm[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHIRT), // gsSPLight(&mario_red_lights_group.a, 2), gsSPDisplayList(mario_right_arm_shared_dl), gsSPEndDisplayList(), @@ -884,6 +912,8 @@ const Gfx mario_right_hand_closed_dl[] = { // 0x0400E458 - 0x0400E478 const Gfx mario_right_hand_closed[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_right_hand_closed_dl), gsSPEndDisplayList(), @@ -972,12 +1002,22 @@ const Gfx mario_left_thigh[] = { // 0x0400E7E0 - 0x0400E858 const Gfx mario_metal_left_thigh[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(mario_left_thigh_dl), gsSPEndDisplayList(), }; @@ -1075,6 +1115,8 @@ const Gfx mario_left_foot_shared_dl[] = { // 0x0400ECA0 - 0x0400ECC0 const Gfx mario_left_foot[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHOES), gsSPDisplayList(mario_left_foot_shared_dl), gsSPEndDisplayList(), @@ -1143,6 +1185,8 @@ const Gfx mario_right_thigh_shared_dl[] = { // 0x0400EFB8 - 0x0400EFD8 const Gfx mario_right_thigh[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(PANTS), // gsSPLight(&mario_blue_lights_group.a, 2), gsSPDisplayList(mario_right_thigh_shared_dl), gsSPEndDisplayList(), @@ -1258,6 +1302,8 @@ const Gfx mario_right_foot_dl[] = { // 0x0400F4E8 - 0x0400F528 const Gfx mario_right_foot[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(SHOES), gsSPDisplayList(mario_right_foot_dl), gsDPPipeSync(), @@ -2057,7 +2103,26 @@ const Gfx mario_face_back_hair_cap_on_dl[] = { gsSPEndDisplayList(), }; -const Gfx mario_hair_sideburn_decal_cap_on_dl[] = { +const Gfx mario_hair_sideburn_decal_cap_on[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 11), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, mario_texture_hair_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, mario_texture_add_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(mario_hair_sideburn_cap_on_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), @@ -2065,10 +2130,10 @@ const Gfx mario_hair_sideburn_decal_cap_on_dl[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_hair_sideburn), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_skin_sideburn), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPCopyLightsPlayerPart(HAIR), + gsSPCopyLightsPlayerPart(SKIN), gsSPDisplayList(mario_hair_sideburn_cap_on_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -2076,19 +2141,38 @@ const Gfx mario_hair_sideburn_decal_cap_on_dl[] = { gsSPEndDisplayList(), }; -const Gfx mario_m_logo_decal_dl[] = { +const Gfx mario_m_logo_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_m_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_m_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(mario_m_logo_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, mario_texture_m_logo), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_m_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&mario_white_lights_group.l, 1), - gsSPLight(&mario_white_lights_group.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_m_logo_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -2098,10 +2182,8 @@ const Gfx mario_m_logo_decal_dl[] = { // 0x04011960 - 0x040119A0 const Gfx mario_face_cap_on_dl[] = { - gsSPDisplayList(mario_hair_sideburn_cap_on_dl), gsSPDisplayList(mario_face_part_cap_on_dl), - gsSPCopyLightsPlayerPart(CAP), // gsSPLight(&mario_red_lights_group.a, 2), - gsSPDisplayList(mario_m_logo_dl), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_face_cap_dl), gsSPCopyLightsPlayerPart(HAIR), gsSPDisplayList(mario_face_back_hair_cap_on_dl), @@ -2824,7 +2906,26 @@ const Gfx mario_face_hair_cap_off_dl[] = { gsSPEndDisplayList(), }; -const Gfx mario_hair_sideburn_decal_cap_off_dl[] = { +const Gfx mario_hair_sideburn_decal_cap_off[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 11), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, mario_texture_hair_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 1, mario_texture_add_sideburn), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(mario_hair_sideburn_cap_off_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), @@ -2832,10 +2933,10 @@ const Gfx mario_hair_sideburn_decal_cap_off_dl[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_hair_sideburn), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_skin_sideburn), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPCopyLightsPlayerPart(HAIR), + gsSPCopyLightsPlayerPart(SKIN), gsSPDisplayList(mario_hair_sideburn_cap_off_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -2845,7 +2946,6 @@ const Gfx mario_hair_sideburn_decal_cap_off_dl[] = { // 0x040139C0 - 0x040139E8 const Gfx mario_face_cap_off_dl[] = { - gsSPDisplayList(mario_hair_sideburn_cap_off_dl), gsSPDisplayList(mario_face_part_cap_off_dl), gsSPCopyLightsPlayerPart(HAIR), gsSPDisplayList(mario_face_hair_cap_off_dl), @@ -3215,6 +3315,8 @@ const Gfx mario_left_hand_open_shared_dl[] = { // 0x04019CA0 - 0x04019CC0 const Gfx mario_left_hand_open[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_left_hand_open_shared_dl), gsSPEndDisplayList(), @@ -3373,6 +3475,8 @@ const Gfx mario_right_hand_open_dl[] = { // 0x0401A428 - 0x0401A448 const Gfx mario_right_hand_open[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_right_hand_open_dl), gsSPEndDisplayList(), @@ -3619,19 +3723,38 @@ const Gfx mario_right_hand_cap_bottom_dl[] = { gsSPEndDisplayList(), }; -const Gfx mario_right_hand_cap_decal_dl[] = { +const Gfx mario_right_hand_cap_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&mario_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_m_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_texture_m_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(mario_right_hand_cap_m_logo_dl), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, mario_texture_m_logo), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_m_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&mario_white_lights_group.l, 1), - gsSPLight(&mario_white_lights_group.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_right_hand_cap_m_logo_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -3641,21 +3764,22 @@ const Gfx mario_right_hand_cap_decal_dl[] = { // 0x0401AF20 - 0x0401AF60 const Gfx mario_right_hand_cap_dl[] = { + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_right_hand_cap_top_dl), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_right_hand_cap_hand_position_dl), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_32b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (8 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_cap_inside), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, mario_texture_cap_inside), gsDPLoadSync(), - gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 8 * 8 - 1, CALC_DXT(8, G_IM_SIZ_16b_BYTES)), + gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 8 * 8 - 1, CALC_DXT(8, G_IM_SIZ_32b_BYTES)), gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_right_hand_cap_bottom_dl), - gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsSPEndDisplayList(), @@ -3663,28 +3787,28 @@ const Gfx mario_right_hand_cap_dl[] = { // 0x0401AF60 static const Vtx mario_right_hand_cap_wings_half_1_dl_vertex[] = { - {{{ 368, 146, 7}, 0, { 990, 0}, {0xbe, 0x65, 0xda, 0xff}}}, - {{{ 166, 37, 68}, 0, { 0, 2012}, {0xbe, 0x65, 0xda, 0xff}}}, - {{{ 212, 96, 143}, 0, { 990, 2012}, {0xbe, 0x65, 0xda, 0xff}}}, - {{{ 368, 146, 7}, 0, { 990, 0}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 322, 87, -67}, 0, { 0, 0}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 166, 37, 68}, 0, { 0, 2012}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 178, -177, 128}, 0, { 990, 2012}, {0xa8, 0xb4, 0xcf, 0xff}}}, - {{{ 149, -100, 60}, 0, { 0, 2012}, {0xa8, 0xb4, 0xcf, 0xff}}}, - {{{ 319, -248, -14}, 0, { 990, 0}, {0xa8, 0xb4, 0xcf, 0xff}}}, - {{{ 290, -171, -81}, 0, { 0, 0}, {0xa8, 0xb4, 0xcf, 0xff}}}, + {{{ 368, 146, 7}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 166, 37, 68}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 212, 96, 143}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 368, 146, 7}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 322, 87, -67}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 166, 37, 68}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 178, -177, 128}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 149, -100, 60}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 319, -248, -14}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 290, -171, -81}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x0401B000 static const Vtx mario_right_hand_cap_wings_half_2_dl_vertex[] = { - {{{ 414, 206, 82}, 0, { 990, 0}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 212, 96, 143}, 0, { 0, 2012}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 258, 156, 218}, 0, { 990, 2012}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 368, 146, 7}, 0, { 0, 0}, {0xbe, 0x64, 0xd9, 0xff}}}, - {{{ 178, -177, 128}, 0, { 0, 2012}, {0xa8, 0xb3, 0xcf, 0xff}}}, - {{{ 319, -248, -14}, 0, { 0, 0}, {0xa8, 0xb3, 0xcf, 0xff}}}, - {{{ 349, -325, 53}, 0, { 990, 0}, {0xa8, 0xb3, 0xcf, 0xff}}}, - {{{ 207, -253, 195}, 0, { 990, 2012}, {0xa8, 0xb3, 0xcf, 0xff}}}, + {{{ 414, 206, 82}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 212, 96, 143}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 258, 156, 218}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 368, 146, 7}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 178, -177, 128}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 319, -248, -14}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 349, -325, 53}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 207, -253, 195}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x0401B080 - 0x0401B0B0 @@ -3706,8 +3830,8 @@ const Gfx mario_right_hand_cap_wings_half_2_dl[] = { // 0x0401B0E0 - 0x0401B138 const Gfx mario_right_hand_cap_wings_intial_dl[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPLight(&mario_white_lights_group.l, 1), @@ -3721,7 +3845,7 @@ const Gfx mario_right_hand_cap_wings_intial_dl[] = { const Gfx mario_right_hand_cap_wings_transparent_intial_dl[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsSPLight(&mario_white_lights_group.l, 1), @@ -3737,7 +3861,7 @@ const Gfx mario_right_hand_cap_wings_end_dl[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; @@ -3745,8 +3869,6 @@ const Gfx mario_right_hand_cap_wings_end_dl[] = { const Gfx mario_right_hand_cap[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPCopyLightsPlayerPart(CAP), - gsSPDisplayList(mario_right_hand_cap_m_logo_dl), gsSPDisplayList(mario_right_hand_cap_dl), gsSPEndDisplayList(), }; @@ -3780,7 +3902,6 @@ const Gfx mario_right_hand_cap_wings_transparent[] = { gsSPEndDisplayList(), }; - // 0x0401B230 - 0x0401B278 const Gfx mario_metal_right_hand_cap_shared_dl[] = { gsSPDisplayList(mario_right_hand_cap_m_logo_dl), @@ -4079,6 +4200,8 @@ const Gfx mario_right_hand_peace_shared_dl[] = { // 0x0401BF30 - 0x0401BF50 const Gfx mario_right_hand_peace[] = { + gsDPPipeSync(), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), gsSPCopyLightsPlayerPart(GLOVES), // glove light, set in mario_misc.c gsSPDisplayList(mario_right_hand_peace_shared_dl), gsSPEndDisplayList(), @@ -4086,18 +4209,18 @@ const Gfx mario_right_hand_peace[] = { // 0x0401C940 static const Vtx mario_wings_half_1_dl_vertex[] = { - {{{ -105, 212, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ -105, 0, 0}, 0, { 0, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 0, 0}, 0, { 990, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 212, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}}, + {{{ -105, 212, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -105, 0, 0}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 0, 0}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 212, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x0401C980 static const Vtx mario_wings_half_2_dl_vertex[] = { - {{{ 0, 0, 0}, 0, { 0, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 106, 212, 0}, 0, { 990, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 0, 212, 0}, 0, { 0, 0}, {0x00, 0x00, 0x7f, 0xff}}}, - {{{ 106, 0, 0}, 0, { 990, 2012}, {0x00, 0x00, 0x7f, 0xff}}}, + {{{ 0, 0, 0}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 106, 212, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 0, 212, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 106, 0, 0}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x0401C9C0 - 0x0401C9E0 @@ -4117,8 +4240,8 @@ const Gfx mario_wings_half_2_dl[] = { // 0x0401CA00 - 0x0401CAB8 const Gfx mario_cap_wings[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -4137,7 +4260,7 @@ const Gfx mario_cap_wings[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; @@ -4145,7 +4268,7 @@ const Gfx mario_cap_wings[] = { const Gfx mario_cap_wings_transparent[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -4164,15 +4287,15 @@ const Gfx mario_cap_wings_transparent[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; // 0x0401CB70 - 0x0401CC28 const Gfx mario_metal_cap_wings[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -4191,7 +4314,7 @@ const Gfx mario_metal_cap_wings[] = { gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), - gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; @@ -4201,7 +4324,7 @@ const Gfx mario_metal_cap_wings_transparent[] = { gsSPClearGeometryMode(G_TEXTURE_GEN), gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_OFF), gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA), - gsSPClearGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH), + gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), @@ -4217,9 +4340,18 @@ const Gfx mario_metal_cap_wings_transparent[] = { gsSPDisplayList(mario_wings_half_2_dl), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN | G_CULL_BACK | G_SHADING_SMOOTH), - gsDPSetCombineMode(G_CC_DECALFADE, G_CC_DECALFADE), - gsDPLoadTextureBlock(mario_texture_metal, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), + gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), + gsSPSetGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPEndDisplayList(), }; + +const Gfx mario_material_revert_render_settings[] = { + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsDPSetEnvColor(255, 255, 255, 255), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList(), +}; diff --git a/actors/mario_cap/geo.inc.c b/actors/mario_cap/geo.inc.c index d4dbdc70..37546c41 100644 --- a/actors/mario_cap/geo.inc.c +++ b/actors/mario_cap/geo.inc.c @@ -1,95 +1,128 @@ +#include "geo_header.h" // 0x16000CA4 const GeoLayout marios_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022F48), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03022F48), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022F48), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03022F48), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000CF0 const GeoLayout marios_metal_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022FF8), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03022FF8), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022FF8), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03022FF8), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000D3C const GeoLayout marios_wing_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022F48), - GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_seg3_dl_030230B0), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal_dl), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03023160), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022F48), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_seg3_dl_030230B0), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_m_logo_decal), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03023160), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; // 0x16000DA8 const GeoLayout marios_winged_metal_cap_geo[] = { - GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), + GEO_NODE_START(), GEO_OPEN_NODE(), - GEO_SCALE(0x00, 16384), + GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0xB4, 75), GEO_OPEN_NODE(), - GEO_ASM(1, geo_mario_set_player_colors), - GEO_ASM(10, geo_update_layer_transparency), - GEO_SWITCH_CASE(2, geo_switch_anim_state), + GEO_SCALE(0x00, 16384), GEO_OPEN_NODE(), - GEO_NODE_START(), + GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors), + GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors), + GEO_ASM(10, geo_update_layer_transparency), + GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022FF8), - GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_seg3_dl_03023108), - GEO_CLOSE_NODE(), - GEO_NODE_START(), - GEO_OPEN_NODE(), - GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03023298), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_seg3_dl_03022FF8), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_seg3_dl_03023108), + GEO_CLOSE_NODE(), + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_seg3_dl_03023298), + GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_ALPHA, mario_cap_material_revert_render_settings), + GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_cap_material_revert_render_settings), GEO_CLOSE_NODE(), GEO_END(), }; diff --git a/actors/mario_cap/geo_header.h b/actors/mario_cap/geo_header.h new file mode 100644 index 00000000..8fdb38db --- /dev/null +++ b/actors/mario_cap/geo_header.h @@ -0,0 +1,20 @@ +extern const GeoLayout marios_cap_geo[]; +extern const GeoLayout marios_metal_cap_geo[]; +extern const GeoLayout marios_wing_cap_geo[]; +extern const GeoLayout marios_winged_metal_cap_geo[]; +extern const Gfx mario_cap_seg3_dl_03022B30[]; +extern const Gfx mario_cap_seg3_dl_03022B68[]; +extern const Gfx mario_cap_seg3_dl_03022CC8[]; +extern const Gfx mario_cap_seg3_dl_03022D10[]; +extern const Gfx mario_cap_seg3_dl_03022E78[]; +extern const Gfx mario_cap_seg3_dl_03022EA8[]; +extern const Gfx mario_cap_seg3_dl_03022ED8[]; +extern const Gfx mario_cap_seg3_dl_03022F20[]; +extern const Gfx mario_cap_m_logo_decal[]; +extern const Gfx mario_cap_seg3_dl_03022F48[]; +extern const Gfx mario_cap_seg3_dl_03022FF8[]; +extern const Gfx mario_cap_seg3_dl_030230B0[]; +extern const Gfx mario_cap_seg3_dl_03023108[]; +extern const Gfx mario_cap_seg3_dl_03023160[]; +extern const Gfx mario_cap_seg3_dl_03023298[]; +extern const Gfx mario_cap_material_revert_render_settings[]; \ No newline at end of file diff --git a/actors/mario_cap/mario_cap_externs.h b/actors/mario_cap/mario_cap_externs.h index 664ee3ea..538e3af0 100644 --- a/actors/mario_cap/mario_cap_externs.h +++ b/actors/mario_cap/mario_cap_externs.h @@ -4,4 +4,3 @@ extern ALIGNED8 const Texture mario_cap_seg3_texture_0301E750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_0301F750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_03020750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_03021750[]; -extern ALIGNED8 const Texture mario_cap_texture_cap_inside[]; diff --git a/actors/mario_cap/model.inc.c b/actors/mario_cap/model.inc.c index cb001e98..7204aa0b 100644 --- a/actors/mario_cap/model.inc.c +++ b/actors/mario_cap/model.inc.c @@ -18,6 +18,22 @@ static const Lights1 mario_cap_seg3_lights_0301CF38 = gdSPDefLights1( 0xff, 0x00, 0x00, 0x28, 0x28, 0x28 ); +static const Lights1 mario_cap_black_lights_group = gdSPDefLights1( + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x28, 0x28, 0x28 +); + +#include "actors/mario/mario_externs.h" +#define mario_cap_texture_metal_shade mario_texture_metal_shade +#define mario_cap_texture_metal_light mario_texture_metal_light +#define mario_cap_texture_m_logo mario_texture_m_logo +#define mario_cap_texture_m_blend mario_texture_m_blend +#define mario_cap_texture_m_cap mario_texture_m_cap +#define mario_cap_texture_wings_half_1 mario_texture_wings_half_1 +#define mario_cap_texture_wings_half_2 mario_texture_wings_half_2 +#define mario_cap_texture_metal_wings_half_1 mario_texture_metal_wings_half_1 +#define mario_cap_texture_metal_wings_half_2 mario_texture_metal_wings_half_2 + // 0x0301CF50 ALIGNED8 const Texture mario_cap_seg3_texture_0301CF50[] = { #include "actors/mario_cap/mario_cap_metal.rgba16.inc.c" @@ -25,7 +41,7 @@ ALIGNED8 const Texture mario_cap_seg3_texture_0301CF50[] = { // 0x0301DF50 ALIGNED8 const Texture mario_cap_seg3_texture_0301DF50[] = { -#include "actors/mario_cap/custom_mario_cap_logo.ia16.inc.c" +#include "actors/mario_cap/mario_cap_logo.rgba16.inc.c" }; // 0x0301E750 @@ -48,10 +64,6 @@ ALIGNED8 const Texture mario_cap_seg3_texture_03021750[] = { #include "actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.inc.c" }; -ALIGNED8 const Texture mario_cap_texture_cap_inside[] = { -#include "actors/mario_cap/custom_mario_cap_inside.rgba16.inc.c" -}; - // 0x03022750 static const Vtx mario_cap_seg3_vertex_03022750[] = { {{{ 33, 35, 118}, 0, { 728, 758}, {0x30, 0x26, 0x6e, 0xff}}}, @@ -190,7 +202,7 @@ const Gfx mario_cap_seg3_dl_03022D10[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (8 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_cap_inside), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_texture_cap_inside), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 8 * 8 - 1, CALC_DXT(8, G_IM_SIZ_16b_BYTES)), gsSPCopyLightsPlayerPart(CAP), //gsSPLight(&mario_cap_seg3_lights_0301CF08.a, 2), @@ -203,30 +215,30 @@ const Gfx mario_cap_seg3_dl_03022D10[] = { // 0x03022D38 static const Vtx mario_cap_seg3_vertex_03022D38[] = { - {{{ 199, 247, -55}, 0, { 990, 0}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 131, 274, 20}, 0, { 0, 0}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 69, 71, 38}, 0, { 0, 2012}, {0x59, 0xed, 0x58, 0xff}}}, - {{{ 199, 247, -55}, 0, { 990, 0}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ 69, 71, 38}, 0, { 0, 2012}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ 138, 44, -37}, 0, { 990, 2012}, {0x58, 0xee, 0x58, 0xff}}}, - {{{ -137, 44, -37}, 0, { 990, 2012}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -68, 71, 38}, 0, { 0, 2012}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -198, 247, -55}, 0, { 990, 0}, {0xa8, 0xee, 0x58, 0xff}}}, - {{{ -68, 71, 38}, 0, { 0, 2012}, {0xa7, 0xed, 0x58, 0xff}}}, - {{{ -130, 274, 20}, 0, { 0, 0}, {0xa7, 0xed, 0x58, 0xff}}}, - {{{ -198, 247, -55}, 0, { 990, 0}, {0xa7, 0xed, 0x58, 0xff}}}, + {{{ 199, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 131, 274, 20}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 69, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 199, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 69, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 138, 44, -37}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -137, 44, -37}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -68, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -68, 71, 38}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -130, 274, 20}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x03022DF8 static const Vtx mario_cap_seg3_vertex_03022DF8[] = { - {{{ 268, 219, -132}, 0, { 990, 0}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 199, 247, -55}, 0, { 0, 0}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 138, 44, -37}, 0, { 0, 2012}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ 207, 16, -114}, 0, { 990, 2012}, {0x59, 0xed, 0x57, 0xff}}}, - {{{ -206, 16, -114}, 0, { 990, 2012}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -137, 44, -37}, 0, { 0, 2012}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -267, 219, -132}, 0, { 990, 0}, {0xa7, 0xed, 0x57, 0xff}}}, - {{{ -198, 247, -55}, 0, { 0, 0}, {0xa7, 0xed, 0x57, 0xff}}}, + {{{ 268, 219, -132}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 199, 247, -55}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 138, 44, -37}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ 207, 16, -114}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -206, 16, -114}, 0, { 990, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -137, 44, -37}, 0, { 0, 2012}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -267, 219, -132}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, + {{{ -198, 247, -55}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, }; // 0x03022E78 - 0x03022EA8 @@ -248,7 +260,7 @@ const Gfx mario_cap_seg3_dl_03022EA8[] = { // 0x03022ED8 - 0x03022F20 const Gfx mario_cap_seg3_dl_03022ED8[] = { gsDPPipeSync(), - gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), + gsDPSetCombineMode(G_CC_MODULATERGBA, G_CC_MODULATERGBA), gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), @@ -267,19 +279,38 @@ const Gfx mario_cap_seg3_dl_03022F20[] = { gsSPEndDisplayList(), }; -const Gfx mario_cap_m_logo_decal_dl[] = { +const Gfx mario_cap_m_logo_decal[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, COMBINED, TEXEL0, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED), + gsDPSetCycleType(G_CYC_2CYCLE), + gsSPTexture(65535, 65535, 0, 0, 1), + gsDPSetPrimColor(0, 0, 127, 127, 127, 255), + gsSPLight(&mario_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_m_logo), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(0, 0, 0, 124, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_m_blend), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 1023, 256), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0), + gsDPSetTileSize(1, 0, 0, 124, 124), + gsSPDisplayList(mario_cap_seg3_dl_03022B30), + gsDPSetCycleType(G_CYC_1CYCLE), + gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), gsDPSetCombineMode(G_CC_MODULATERGBFADEA, G_CC_MODULATERGBFADEA), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), gsDPTileSync(), - gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301DF50), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_m_cap), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), - gsSPLight(&mario_cap_seg3_lights_0301CF20.l, 1), - gsSPLight(&mario_cap_seg3_lights_0301CF20.a, 2), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_cap_seg3_dl_03022B30), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsDPPipeSync(), @@ -291,8 +322,7 @@ const Gfx mario_cap_m_logo_decal_dl[] = { const Gfx mario_cap_seg3_dl_03022F48[] = { gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADEFADEA, G_CC_SHADEFADEA), - gsSPCopyLightsPlayerPart(CAP), //gsSPLight(&mario_cap_seg3_lights_0301CF38.a, 2), - gsSPDisplayList(mario_cap_seg3_dl_03022B30), + gsSPCopyLightsPlayerPart(CAP), gsSPDisplayList(mario_cap_seg3_dl_03022D10), gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), @@ -303,12 +333,22 @@ const Gfx mario_cap_seg3_dl_03022F48[] = { // 0x03022FF8 - 0x030230B0 const Gfx mario_cap_seg3_dl_03022FF8[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPLoadTextureBlock(mario_cap_seg3_texture_0301CF50, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 6, 5, G_TX_NOLOD, G_TX_NOLOD), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&mario_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(mario_cap_seg3_dl_03022B30), gsSPDisplayList(mario_cap_seg3_dl_03022B68), gsSPDisplayList(mario_cap_seg3_dl_03022CC8), @@ -324,11 +364,11 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = { // 0x030230B0 - 0x03023108 const Gfx mario_cap_seg3_dl_030230B0[] = { gsSPDisplayList(mario_cap_seg3_dl_03022ED8), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301E750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301F750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022EA8), @@ -339,11 +379,11 @@ const Gfx mario_cap_seg3_dl_030230B0[] = { // 0x03023108 - 0x03023160 const Gfx mario_cap_seg3_dl_03023108[] = { gsSPDisplayList(mario_cap_seg3_dl_03022ED8), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_03020750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_metal_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_03021750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_metal_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022EA8), @@ -365,11 +405,11 @@ const Gfx mario_cap_seg3_dl_03023160[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301E750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301F750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022EA8), @@ -384,18 +424,22 @@ const Gfx mario_cap_seg3_dl_03023160[] = { // 0x03023298 - 0x030233D0 const Gfx mario_cap_seg3_dl_03023298[] = { - gsDPPipeSync(), - gsSPSetGeometryMode(G_TEXTURE_GEN), - gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_0301CF50), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD), - gsDPLoadSync(), - gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 64 * 32 - 1, CALC_DXT(64, G_IM_SIZ_16b_BYTES)), - gsDPPipeSync(), - gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 6, G_TX_NOLOD), - gsDPSetTileSize(0, 0, 0, (64 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), - gsSPTexture(0x0F80, 0x07C0, 0, G_TX_RENDERTILE, G_ON), - gsSPCopyLightsPlayerPart(METAL), //gsSPLight(&mario_cap_seg3_lights_0301CF20.a, 2), + gsDPPipeSync(), + gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, TEXEL1, 0, 0, 0, ENVIRONMENT), + gsSPSetGeometryMode(G_TEXTURE_GEN), + gsSPTexture(4032, 1984, 0, 0, 1), + gsSPLight(&mario_cap_black_lights_group.l, 1), + gsSPCopyLightEXT(2, 15), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_metal_shade), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(7, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(0, 0, 0, 252, 124), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, mario_cap_texture_metal_light), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 512, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0), + gsDPLoadBlock(6, 0, 0, 2047, 128), + gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 512, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, 0), + gsDPSetTileSize(1, 0, 0, 252, 124), gsSPDisplayList(mario_cap_seg3_dl_03022B30), gsSPDisplayList(mario_cap_seg3_dl_03022B68), gsSPDisplayList(mario_cap_seg3_dl_03022CC8), @@ -407,11 +451,11 @@ const Gfx mario_cap_seg3_dl_03023298[] = { gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (64 - 1) << G_TEXTURE_IMAGE_FRAC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_03020750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_metal_wings_half_1), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022E78), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_seg3_texture_03021750), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, mario_cap_texture_metal_wings_half_2), gsDPLoadSync(), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 64 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsSPDisplayList(mario_cap_seg3_dl_03022EA8), @@ -423,3 +467,14 @@ const Gfx mario_cap_seg3_dl_03023298[] = { gsDPSetEnvColor(255, 255, 255, 255), gsSPEndDisplayList(), }; + +const Gfx mario_cap_material_revert_render_settings[] = { + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsDPSetEnvColor(255, 255, 255, 255), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList(), +}; diff --git a/actors/wario_cap/model.inc.c b/actors/wario_cap/model.inc.c index 5cfb82c0..ff57f53b 100644 --- a/actors/wario_cap/model.inc.c +++ b/actors/wario_cap/model.inc.c @@ -24,7 +24,7 @@ static const Lights1 wario_cap_seg3_lights_0301CF38 = gdSPDefLights1( #define wario_cap_seg3_texture_0301F750 mario_cap_seg3_texture_0301F750 #define wario_cap_seg3_texture_03020750 mario_cap_seg3_texture_03020750 #define wario_cap_seg3_texture_03021750 mario_cap_seg3_texture_03021750 -#define wario_cap_texture_cap_inside mario_cap_texture_cap_inside +#define wario_cap_texture_cap_inside mario_texture_cap_inside // 0x0301DF50 ALIGNED8 const Texture wario_cap_seg3_texture_0301DF50[] = { diff --git a/data/dynos_mgr_builtin_externs.h b/data/dynos_mgr_builtin_externs.h index 0caa60bf..c15b839d 100644 --- a/data/dynos_mgr_builtin_externs.h +++ b/data/dynos_mgr_builtin_externs.h @@ -1641,7 +1641,6 @@ extern ALIGNED8 const Texture mario_cap_seg3_texture_0301E750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_0301F750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_03020750[]; extern ALIGNED8 const Texture mario_cap_seg3_texture_03021750[]; -extern ALIGNED8 const Texture mario_cap_texture_cap_inside[]; extern ALIGNED8 const Texture impact_smoke_seg6_texture_0605AA28[]; extern ALIGNED8 const Texture impact_smoke_seg6_texture_0605CA28[]; extern ALIGNED8 const Texture impact_smoke_seg6_texture_0605EA28[]; diff --git a/data/dynos_mgr_builtin_tex.cpp b/data/dynos_mgr_builtin_tex.cpp index 114cbc02..ab5ad789 100644 --- a/data/dynos_mgr_builtin_tex.cpp +++ b/data/dynos_mgr_builtin_tex.cpp @@ -1073,7 +1073,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { define_builtin_tex(mario_cap_seg3_texture_0301F750, "actors/mario_cap/mario_cap_wing_tip.rgba16.png", 32, 64, 16), define_builtin_tex(mario_cap_seg3_texture_03020750, "actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png", 32, 64, 16), define_builtin_tex(mario_cap_seg3_texture_03021750, "actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png", 32, 64, 16), - define_builtin_tex(mario_cap_texture_cap_inside, "actors/mario_cap/custom_mario_cap_inside.rgba16.png", 8, 8, 16), define_builtin_tex(impact_smoke_seg6_texture_0605AA28, "actors/impact_smoke/impact_smoke_0.ia16.png", 64, 64, 16), define_builtin_tex(impact_smoke_seg6_texture_0605CA28, "actors/impact_smoke/impact_smoke_1.ia16.png", 64, 64, 16), define_builtin_tex(impact_smoke_seg6_texture_0605EA28, "actors/impact_smoke/impact_smoke_2.ia16.png", 64, 64, 16), @@ -1081,7 +1080,6 @@ static const struct BuiltinTexInfo sDynosBuiltinTexs[] = { define_builtin_tex(luigi_texture_l_logo, "actors/luigi/custom_luigi_logo.rgba16.png", 32, 32, 16), define_builtin_tex(luigi_texture_hair_sideburn, "actors/luigi/custom_luigi_sideburn.rgba16.png", 32, 32, 16), define_builtin_tex(luigi_texture_mustache, "actors/luigi/custom_luigi_mustache.rgba16.png", 32, 32, 16), - define_builtin_tex(luigi_cap_seg3_texture_0301DF50, "actors/luigi_cap/custom_luigi_cap_logo.rgba16.png", 32, 32, 16), define_builtin_tex(toad_player_texture_face, "actors/toad_player/custom_toad_face.rgba16.png", 32, 32, 16), define_builtin_tex(toad_player_texture_eyes_closed, "actors/toad_player/custom_toad_eyes_closed.rgba16.png", 32, 32, 16), define_builtin_tex(toad_player_texture_eyes_half_closed, "actors/toad_player/custom_toad_eyes_half_closed.rgba16.png", 32, 32, 16), diff --git a/src/game/characters.c b/src/game/characters.c index 91051ab0..57f1b4e6 100644 --- a/src/game/characters.c +++ b/src/game/characters.c @@ -14,9 +14,9 @@ #include "pc/lua/smlua.h" extern Gfx mario_cap_seg3_dl_03022F48[]; -extern Gfx mario_cap_m_logo_decal_dl[]; +extern Gfx mario_cap_m_logo_decal[]; extern Gfx luigi_cap_seg3_dl_03022F48[]; -extern Gfx luigi_cap_l_logo_decal_dl[]; +extern Gfx luigi_cap_l_logo_decal[]; extern Gfx toad_player_dl_cap[]; extern Gfx toad_player_dl_cap_decal[]; extern Gfx waluigi_cap_seg3_dl_03022F48[]; @@ -40,9 +40,9 @@ struct Character gCharacters[CT_MAX] = { .capMetalModelId = MODEL_MARIOS_METAL_CAP, .capWingModelId = MODEL_MARIOS_WING_CAP, .capMetalWingModelId = MODEL_MARIOS_WINGED_METAL_CAP, - .capEnemyLayer = LAYER_TRANSPARENT, + .capEnemyLayer = LAYER_ALPHA, .capEnemyGfx = mario_cap_seg3_dl_03022F48, - .capEnemyDecalGfx = mario_cap_m_logo_decal_dl, + .capEnemyDecalGfx = mario_cap_m_logo_decal, .torsoRotMult = 1.0f, // anim .animOffsetEnabled = false, @@ -317,9 +317,9 @@ struct Character gCharacters[CT_MAX] = { .capMetalModelId = MODEL_LUIGIS_METAL_CAP, .capWingModelId = MODEL_LUIGIS_WING_CAP, .capMetalWingModelId = MODEL_LUIGIS_WINGED_METAL_CAP, - .capEnemyLayer = LAYER_TRANSPARENT, + .capEnemyLayer = LAYER_ALPHA, .capEnemyGfx = luigi_cap_seg3_dl_03022F48, - .capEnemyDecalGfx = luigi_cap_l_logo_decal_dl, + .capEnemyDecalGfx = luigi_cap_l_logo_decal, .torsoRotMult = 1.0f, // anim .animOffsetEnabled = false,