diff --git a/include/config.h b/include/config.h index 3661ec8b..eaae6a13 100644 --- a/include/config.h +++ b/include/config.h @@ -102,6 +102,8 @@ #define MULTILANG (0 || VERSION_EU) // Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified. //#define PUPPYCAM +// Allows Mario's shadow to be transparent on top of transparent surfaces, such as water, lava, and ice +#define FIX_SHADOW_TRANSPARENCY // Automatically calculate the optimal collision distance for an object based on its vertices. #define AUTO_COLLISION_DISTANCE // Makes obj_resolve_object_collisions work consistently diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 7d992f1f..a2bc7072 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -721,13 +721,17 @@ static void geo_process_shadow(struct GraphNodeShadow *node) { mtxf_mul(gMatStack[gMatStackIndex], mtxf, *gCurGraphNodeCamera->matrixPtr); mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]); gMatStackFixed[gMatStackIndex] = mtx; +#ifdef FIX_SHADOW_TRANSPARENCY + geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), ((gShadowAboveWaterOrLava || gShadowAboveCustomWater || gMarioOnIceOrCarpet) ? LAYER_TRANSPARENT : LAYER_TRANSPARENT_DECAL)); +#else if (gShadowAboveWaterOrLava == TRUE) { geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_ALPHA); - } else if (gMarioOnIceOrCarpet == 1 || gShadowAboveCustomWater == 1) { + } else if (gMarioOnIceOrCarpet == TRUE || gShadowAboveCustomWater == TRUE) { geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_TRANSPARENT); } else { geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), LAYER_TRANSPARENT_DECAL); } +#endif gMatStackIndex--; } }