diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index bb2e6ef42..fcda613d2 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -3697,7 +3697,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr, const boolean papersprite) //Hurdler: 25/04/2000: now support colormap in hardware mode HWR_GetMappedPatch(gpatch, spr->colormap); - hwrpatch = ((GLPatch_t *)gpatch->hardware); + hwrpatch = static_cast(gpatch->hardware); // Draw shadow BEFORE sprite if (UNLIKELY(cv_shadow.value // Shadows enabled @@ -3799,10 +3799,10 @@ static void HWR_SplitSprite(gl_vissprite_t *spr, const boolean papersprite) { // make hyu´d players translucent with reducevfx, could be done better, but im lazy as crap if (cv_reducevfx.value && sprmo->player->kartstuff[k_hyudorotimer] > 0) - Surf.PolyColor.s.alpha = FixedMul(FRACUNIT/2, Surf.PolyColor.s.alpha); + Surf.PolyColor.s.alpha = static_cast(FixedMul(FRACUNIT/2, static_cast(Surf.PolyColor.s.alpha))); if (cv_playerfade.value) - Surf.PolyColor.s.alpha = FixedMul(R_DoPlayerFade(sprmo), Surf.PolyColor.s.alpha); + Surf.PolyColor.s.alpha = static_cast(FixedMul(R_DoPlayerFade(sprmo), static_cast(Surf.PolyColor.s.alpha))); } if (HWR_UseShader()) @@ -3985,7 +3985,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr) //Hurdler: 25/04/2000: now support colormap in hardware mode HWR_GetMappedPatch(gpatch, spr->colormap); - hwrpatch = ((GLPatch_t *)gpatch->hardware); + hwrpatch = static_cast(gpatch->hardware); // create the sprite billboard // @@ -4096,10 +4096,10 @@ static void HWR_DrawSprite(gl_vissprite_t *spr) { // make hyu´d players translucent with reducevfx, could be done better, but im lazy as crap if (cv_reducevfx.value && sprmo->player->kartstuff[k_hyudorotimer] > 0) - Surf.PolyColor.s.alpha = FixedMul(FRACUNIT/2, Surf.PolyColor.s.alpha); + Surf.PolyColor.s.alpha = static_cast(FixedMul(FRACUNIT/2, static_cast(Surf.PolyColor.s.alpha))); if (cv_playerfade.value) - Surf.PolyColor.s.alpha = FixedMul(R_DoPlayerFade(sprmo), Surf.PolyColor.s.alpha); + Surf.PolyColor.s.alpha = static_cast(FixedMul(R_DoPlayerFade(sprmo), static_cast(Surf.PolyColor.s.alpha))); } if (HWR_UseShader()) @@ -4135,7 +4135,7 @@ static void HWR_DrawPrecipitationSprite(gl_vissprite_t *spr) //Hurdler: 25/04/2000: now support colormap in hardware mode HWR_GetMappedPatch(gpatch, spr->colormap); - hwrpatch = ((GLPatch_t *)gpatch->hardware); + hwrpatch = static_cast(gpatch->hardware); // create the sprite billboard // @@ -4526,7 +4526,6 @@ static void HWR_RenderDrawNodes(void) drawnodes.clear(); // clear so our size is 0 again! } - // -------------------------------------------------------------------------- // Draw all vissprites // -------------------------------------------------------------------------- diff --git a/src/r_things.cpp b/src/r_things.cpp index 773db62d6..ce66311cf 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1670,7 +1670,7 @@ static void R_ProjectSprite(mobj_t *thing) if (thing->frame & FF_ABSOLUTELIGHTLEVEL) { - const UINT8 n = R_ThingLightLevel(thing); + const UINT8 n = static_cast(R_ThingLightLevel(thing)); // n = uint8 aka 0 - 255, so the shift will always be 0 - LIGHTLEVELS - 1 lights_array = scalelight[n >> LIGHTSEGSHIFT]; }