mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
Fixed cap-on-ground colorization behavior
This commit is contained in:
parent
0c61b9fd07
commit
d772764c4e
6 changed files with 22 additions and 14 deletions
|
@ -4,7 +4,7 @@ const GeoLayout luigis_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -22,7 +22,7 @@ const GeoLayout luigis_metal_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -40,7 +40,7 @@ const GeoLayout luigis_wing_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -65,7 +65,7 @@ const GeoLayout luigis_winged_metal_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
|
|
@ -285,8 +285,8 @@ const Gfx luigi_cap_seg3_dl_03022FF8[] = {
|
|||
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
|
||||
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),
|
||||
gsSPCopyLightEXT(1, 5), //gsSPLight(&luigi_cap_seg3_lights_0301CF20.l, 1),
|
||||
gsSPCopyLightEXT(2, 6), //gsSPLight(&luigi_cap_seg3_lights_0301CF20.a, 2),
|
||||
gsSPLight(&luigi_cap_seg3_lights_0301CF20.l, 1),
|
||||
gsSPLight(&luigi_cap_seg3_lights_0301CF20.a, 2),
|
||||
gsSPDisplayList(luigi_cap_seg3_dl_03022B30),
|
||||
gsSPDisplayList(luigi_cap_seg3_dl_03022B68),
|
||||
gsSPDisplayList(luigi_cap_seg3_dl_03022CC8),
|
||||
|
|
|
@ -4,7 +4,7 @@ const GeoLayout marios_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -22,7 +22,7 @@ const GeoLayout marios_metal_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -40,7 +40,7 @@ const GeoLayout marios_wing_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
@ -65,7 +65,7 @@ const GeoLayout marios_winged_metal_cap_geo[] = {
|
|||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_mario_set_player_colors),
|
||||
GEO_ASM(1, geo_mario_set_player_colors),
|
||||
GEO_ASM(10, geo_update_layer_transparency),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
|
|
|
@ -285,8 +285,8 @@ const Gfx mario_cap_seg3_dl_03022FF8[] = {
|
|||
gsDPSetCombineMode(G_CC_MODULATERGBFADE, G_CC_MODULATERGBFADE),
|
||||
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),
|
||||
gsSPCopyLightEXT(1, 5), //gsSPLight(&mario_cap_seg3_lights_0301CF20.l, 1),
|
||||
gsSPCopyLightEXT(2, 6), //gsSPLight(&mario_cap_seg3_lights_0301CF20.a, 2),
|
||||
gsSPLight(&mario_cap_seg3_lights_0301CF20.l, 1),
|
||||
gsSPLight(&mario_cap_seg3_lights_0301CF20.a, 2),
|
||||
gsSPDisplayList(mario_cap_seg3_dl_03022B30),
|
||||
gsSPDisplayList(mario_cap_seg3_dl_03022B68),
|
||||
gsSPDisplayList(mario_cap_seg3_dl_03022CC8),
|
||||
|
|
|
@ -126,6 +126,7 @@ void exclamation_box_spawn_contents(struct Struct802C0DF0 *a0, u8 a1) {
|
|||
sp1C->oVelY = 20.0f;
|
||||
sp1C->oForwardVel = 3.0f;
|
||||
sp1C->oMoveAngleYaw = player->oMoveAngleYaw;
|
||||
sp1C->globalPlayerIndex = player->globalPlayerIndex;
|
||||
o->oBehParams |= a0->unk2 << 24;
|
||||
if (a0->model == 122)
|
||||
o->oFlags |= 0x4000;
|
||||
|
|
|
@ -819,8 +819,15 @@ Gfx* geo_mario_set_player_colors(s32 callContext, struct GraphNode* node, UNUSED
|
|||
gSPLight(gfx + 2, &gPlayerColors[colorIndex].shirt.l, 5);
|
||||
gSPLight(gfx + 3, &gPlayerColors[colorIndex].shirt.a, 6);
|
||||
gSPEndDisplayList(gfx + 4);
|
||||
// put on transparent layer if vanish effect, opaque otherwise
|
||||
const u32 layer = ((bodyState->modelState >> 8) & 1) ? LAYER_TRANSPARENT : LAYER_OPAQUE;
|
||||
u32 layer = LAYER_OPAQUE;
|
||||
if (asGenerated->parameter == 1) {
|
||||
layer = LAYER_OPAQUE;
|
||||
} else if (asGenerated->parameter == 2) {
|
||||
layer = LAYER_TRANSPARENT;
|
||||
} else {
|
||||
// put on transparent layer if vanish effect, opaque otherwise
|
||||
layer = ((bodyState->modelState >> 8) & 1) ? LAYER_TRANSPARENT : LAYER_OPAQUE;
|
||||
}
|
||||
asGenerated->fnNode.node.flags = (asGenerated->fnNode.node.flags & 0xFF) | (layer << 8);
|
||||
}
|
||||
return gfx;
|
||||
|
|
Loading…
Reference in a new issue