diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ffac4ae2..5c43ab7b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,7 +77,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 r_debug_parser.cpp r_debug_printer.cpp r_draw.cpp - r_fps.c + r_fps.cpp r_main.cpp r_plane.cpp r_segs.cpp 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 06016e2e3..ebe15dc36 100644 --- a/src/r_fps.c +++ b/src/r_fps.cpp @@ -337,12 +337,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; @@ -409,8 +409,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; @@ -667,12 +667,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;