Fix shadow transparency

This commit is contained in:
Arceveti
2021-09-15 10:35:58 -07:00
parent 3e16820b1e
commit a09bdd0ffb
2 changed files with 7 additions and 1 deletions

View File

@@ -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--;
}
}