diff --git a/src/Sourcefile b/src/Sourcefile index a2e9ee736..e7a77c82e 100644 --- a/src/Sourcefile +++ b/src/Sourcefile @@ -50,7 +50,7 @@ z_zone.c r_bsp.c r_data.c r_draw.c -r_fps.c +r_fps.cpp r_main.cpp r_patch.c r_patchrotation.c diff --git a/src/r_fps.c b/src/r_fps.cpp similarity index 98% rename from src/r_fps.c rename to src/r_fps.cpp index 3a1ded867..5a6e47c6b 100644 --- a/src/r_fps.c +++ b/src/r_fps.cpp @@ -50,8 +50,8 @@ consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpsc consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -ps_metric_t ps_interp_frac = {0}; -ps_metric_t ps_interp_lag = {0}; +ps_metric_t ps_interp_frac = {}; +ps_metric_t ps_interp_lag = {}; static boolean R_UseBackgroundFramerateCap(void) { @@ -423,12 +423,12 @@ static void AddInterpolator(levelinterpolator_t* interpolator) levelinterpolators_size *= 2; } - levelinterpolators = Z_Realloc( + levelinterpolators = static_cast(Z_Realloc( (void*) levelinterpolators, sizeof(levelinterpolator_t*) * levelinterpolators_size, PU_LEVEL, NULL - ); + )); } levelinterpolators[levelinterpolators_len] = interpolator; @@ -514,8 +514,8 @@ void R_CreateInterpolator_Polyobj(thinker_t *thinker, polyobj_t *polyobj) interp->polyobj.polyobj = polyobj; interp->polyobj.vertices_size = polyobj->numVertices; - interp->polyobj.oldvertices = Z_Calloc(sizeof(fixed_t) * 2 * polyobj->numVertices, PU_LEVEL, NULL); - interp->polyobj.bakvertices = Z_Calloc(sizeof(fixed_t) * 2 * polyobj->numVertices, PU_LEVEL, NULL); + interp->polyobj.oldvertices = static_cast(Z_Calloc(sizeof(fixed_t) * 2 * polyobj->numVertices, PU_LEVEL, NULL)); + interp->polyobj.bakvertices = static_cast(Z_Calloc(sizeof(fixed_t) * 2 * polyobj->numVertices, PU_LEVEL, NULL)); for (size_t i = 0; i < polyobj->numVertices; i++) { interp->polyobj.oldvertices[i * 2 ] = interp->polyobj.bakvertices[i * 2 ] = polyobj->vertices[i]->x; @@ -795,12 +795,12 @@ void R_AddMobjInterpolator(mobj_t *mobj) interpolated_mobjs_capacity *= 2; } - interpolated_mobjs = Z_Realloc( + interpolated_mobjs = static_cast(Z_Realloc( interpolated_mobjs, sizeof(mobj_t *) * interpolated_mobjs_capacity, PU_LEVEL, NULL - ); + )); } interpolated_mobjs[interpolated_mobjs_len] = mobj;