mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-30 00:10:53 +00:00
soft: fix cppcheck warning and remove unused fullscreen property
This commit is contained in:
parent
2b9c4e88fe
commit
6590097752
8 changed files with 34 additions and 27 deletions
|
@ -455,7 +455,7 @@ void R_DrawSolidClippedSubmodelPolygons(entity_t *currententity, const model_t *
|
||||||
|
|
||||||
void R_AliasDrawModel(entity_t *currententity, const model_t *currentmodel);
|
void R_AliasDrawModel(entity_t *currententity, const model_t *currentmodel);
|
||||||
void R_BeginEdgeFrame(void);
|
void R_BeginEdgeFrame(void);
|
||||||
void R_ScanEdges(entity_t *currententity, surf_t *surface);
|
void R_ScanEdges(entity_t *currententity, const surf_t *surface);
|
||||||
void RI_PushDlights(const model_t *model);
|
void RI_PushDlights(const model_t *model);
|
||||||
void R_RotateBmodel(const entity_t *currententity);
|
void R_RotateBmodel(const entity_t *currententity);
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ extern byte d_8to24table[256 * 4];
|
||||||
void R_InitImages(void);
|
void R_InitImages(void);
|
||||||
void R_ShutdownImages(void);
|
void R_ShutdownImages(void);
|
||||||
image_t *R_FindImage(const char *name, imagetype_t type);
|
image_t *R_FindImage(const char *name, imagetype_t type);
|
||||||
image_t *R_LoadPic(char *name, byte *pic, int width, int realwidth, int height, int realheight,
|
image_t *R_LoadPic(const char *name, const byte *pic, int width, int realwidth, int height, int realheight,
|
||||||
size_t data_size, imagetype_t type, int bits);
|
size_t data_size, imagetype_t type, int bits);
|
||||||
byte *Get_BestImageSize(const image_t *image, int *req_width, int *req_height);
|
byte *Get_BestImageSize(const image_t *image, int *req_width, int *req_height);
|
||||||
void R_FreeUnusedImages(void);
|
void R_FreeUnusedImages(void);
|
||||||
|
|
|
@ -598,7 +598,7 @@ Each surface has a linked list of its visible spans
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
R_ScanEdges (entity_t *currententity, surf_t *surface)
|
R_ScanEdges (entity_t *currententity, const surf_t *surface)
|
||||||
{
|
{
|
||||||
shift20_t iv, bottom;
|
shift20_t iv, bottom;
|
||||||
surf_t *s;
|
surf_t *s;
|
||||||
|
|
|
@ -331,7 +331,7 @@ R_LoadPic8(const char *name, const byte *pic, int width, int realwidth, int heig
|
||||||
}
|
}
|
||||||
|
|
||||||
image_t *
|
image_t *
|
||||||
R_LoadPic(char *name, byte *pic, int width, int realwidth, int height, int realheight,
|
R_LoadPic(const char *name, const byte *pic, int width, int realwidth, int height, int realheight,
|
||||||
size_t data_size, imagetype_t type, int bits)
|
size_t data_size, imagetype_t type, int bits)
|
||||||
{
|
{
|
||||||
if (!realwidth || !realheight)
|
if (!realwidth || !realheight)
|
||||||
|
|
|
@ -225,8 +225,9 @@ RI_BuildLightMap(drawsurf_t* drawsurf)
|
||||||
for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
|
for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
|
||||||
maps++)
|
maps++)
|
||||||
{
|
{
|
||||||
|
const light_t *max_light;
|
||||||
|
light_t *curr_light;
|
||||||
unsigned scale;
|
unsigned scale;
|
||||||
light_t *curr_light, *max_light;
|
|
||||||
|
|
||||||
curr_light = blocklights;
|
curr_light = blocklights;
|
||||||
max_light = blocklights + size;
|
max_light = blocklights + size;
|
||||||
|
@ -277,8 +278,9 @@ RI_BuildLightMap(drawsurf_t* drawsurf)
|
||||||
for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
|
for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
|
||||||
maps++)
|
maps++)
|
||||||
{
|
{
|
||||||
|
const light_t *max_light;
|
||||||
|
light_t *curr_light;
|
||||||
unsigned scale;
|
unsigned scale;
|
||||||
light_t *curr_light, *max_light;
|
|
||||||
|
|
||||||
curr_light = blocklights;
|
curr_light = blocklights;
|
||||||
max_light = blocklights + size;
|
max_light = blocklights + size;
|
||||||
|
@ -302,7 +304,8 @@ RI_BuildLightMap(drawsurf_t* drawsurf)
|
||||||
|
|
||||||
// bound, invert, and shift
|
// bound, invert, and shift
|
||||||
{
|
{
|
||||||
light_t *curr_light, *max_light;
|
const light_t *max_light;
|
||||||
|
light_t *curr_light;
|
||||||
|
|
||||||
curr_light = blocklights;
|
curr_light = blocklights;
|
||||||
max_light = blocklights + size;
|
max_light = blocklights + size;
|
||||||
|
|
|
@ -64,11 +64,10 @@ pixel_t *r_warpbuffer;
|
||||||
|
|
||||||
typedef struct swstate_s
|
typedef struct swstate_s
|
||||||
{
|
{
|
||||||
qboolean fullscreen;
|
int prev_mode; /* last valid SW mode */
|
||||||
int prev_mode; // last valid SW mode
|
|
||||||
|
|
||||||
unsigned char gammatable[256];
|
unsigned char gammatable[256];
|
||||||
unsigned char currentpalette[1024];
|
unsigned char currentpalette[1024];
|
||||||
} swstate_t;
|
} swstate_t;
|
||||||
|
|
||||||
static swstate_t sw_state;
|
static swstate_t sw_state;
|
||||||
|
@ -928,7 +927,7 @@ R_BmodelCheckBBox
|
||||||
=============
|
=============
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
R_BmodelCheckBBox (const float *minmaxs)
|
R_BmodelCheckBBox(const float *minmaxs)
|
||||||
{
|
{
|
||||||
int i, clipflags;
|
int i, clipflags;
|
||||||
|
|
||||||
|
@ -937,7 +936,7 @@ R_BmodelCheckBBox (const float *minmaxs)
|
||||||
for (i=0 ; i<4 ; i++)
|
for (i=0 ; i<4 ; i++)
|
||||||
{
|
{
|
||||||
vec3_t acceptpt, rejectpt;
|
vec3_t acceptpt, rejectpt;
|
||||||
int *pindex;
|
const int *pindex;
|
||||||
float d;
|
float d;
|
||||||
|
|
||||||
// generate accept and reject points
|
// generate accept and reject points
|
||||||
|
@ -986,7 +985,7 @@ R_FindTopnode (vec3_t mins, vec3_t maxs)
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
cplane_t *splitplane;
|
const cplane_t *splitplane;
|
||||||
int sides;
|
int sides;
|
||||||
|
|
||||||
if (node->visframe != r_visframecount)
|
if (node->visframe != r_visframecount)
|
||||||
|
@ -2085,7 +2084,7 @@ char shift_size;
|
||||||
static void
|
static void
|
||||||
RE_CopyFrame (Uint32 * pixels, int pitch, int vmin, int vmax)
|
RE_CopyFrame (Uint32 * pixels, int pitch, int vmin, int vmax)
|
||||||
{
|
{
|
||||||
Uint32 *sdl_palette = (Uint32 *)sw_state.currentpalette;
|
const Uint32 *sdl_palette = (Uint32 *)sw_state.currentpalette;
|
||||||
|
|
||||||
// no gaps between images rows
|
// no gaps between images rows
|
||||||
if (pitch == vid_buffer_width)
|
if (pitch == vid_buffer_width)
|
||||||
|
@ -2130,7 +2129,8 @@ RE_CopyFrame (Uint32 * pixels, int pitch, int vmin, int vmax)
|
||||||
static int
|
static int
|
||||||
RE_BufferDifferenceStart(int vmin, int vmax)
|
RE_BufferDifferenceStart(int vmin, int vmax)
|
||||||
{
|
{
|
||||||
int *front_buffer, *back_buffer, *back_max;
|
int *front_buffer, *back_buffer;
|
||||||
|
const int *back_max;
|
||||||
|
|
||||||
back_buffer = (int*)(swap_frames[0] + vmin);
|
back_buffer = (int*)(swap_frames[0] + vmin);
|
||||||
front_buffer = (int*)(swap_frames[1] + vmin);
|
front_buffer = (int*)(swap_frames[1] + vmin);
|
||||||
|
@ -2146,7 +2146,8 @@ RE_BufferDifferenceStart(int vmin, int vmax)
|
||||||
static int
|
static int
|
||||||
RE_BufferDifferenceEnd(int vmin, int vmax)
|
RE_BufferDifferenceEnd(int vmin, int vmax)
|
||||||
{
|
{
|
||||||
int *front_buffer, *back_buffer, *back_min;
|
int *front_buffer, *back_buffer;
|
||||||
|
const int *back_min;
|
||||||
|
|
||||||
back_buffer = (int*)(swap_frames[0] + vmax);
|
back_buffer = (int*)(swap_frames[0] + vmax);
|
||||||
front_buffer = (int*)(swap_frames[1] + vmax);
|
front_buffer = (int*)(swap_frames[1] + vmax);
|
||||||
|
@ -2197,7 +2198,7 @@ RE_FlushFrame(int vmin, int vmax)
|
||||||
|
|
||||||
if (is_render_flushed)
|
if (is_render_flushed)
|
||||||
{
|
{
|
||||||
Com_Printf("%s: Render is already flushed\n", __func__);
|
R_Printf(PRINT_DEVELOPER, "%s: Render is already flushed\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ R_SetupFrame (void)
|
||||||
// current viewleaf
|
// current viewleaf
|
||||||
if ( !( r_newrefdef.rdflags & RDF_NOWORLDMODEL ) )
|
if ( !( r_newrefdef.rdflags & RDF_NOWORLDMODEL ) )
|
||||||
{
|
{
|
||||||
mleaf_t *r_viewleaf;
|
const mleaf_t *r_viewleaf;
|
||||||
|
|
||||||
if (!r_worldmodel)
|
if (!r_worldmodel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -519,10 +519,11 @@ R_DrawSpanlet66Stipple(const int *r_turb_turb)
|
||||||
static int
|
static int
|
||||||
R_ClipPolyFace(int nump, clipplane_t *pclipplane)
|
R_ClipPolyFace(int nump, clipplane_t *pclipplane)
|
||||||
{
|
{
|
||||||
int i, outcount;
|
float dists[MAXWORKINGVERTS+3] = {0};
|
||||||
float frac, clipdist, *pclipnormal;
|
const float *vert2, *pclipnormal;
|
||||||
float *in, *instep, *outstep, *vert2;
|
float *in, *instep, *outstep;
|
||||||
float dists[MAXWORKINGVERTS+3] = {0};
|
float frac, clipdist;
|
||||||
|
int i, outcount;
|
||||||
|
|
||||||
clipdist = pclipplane->dist;
|
clipdist = pclipplane->dist;
|
||||||
pclipnormal = pclipplane->normal;
|
pclipnormal = pclipplane->normal;
|
||||||
|
|
|
@ -37,7 +37,7 @@ msurface_t *r_alpha_surfaces;
|
||||||
vklightmapstate_t vk_lms;
|
vklightmapstate_t vk_lms;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DrawVkPoly(mpoly_t *p, image_t *texture, float *color)
|
DrawVkPoly(mpoly_t *p, image_t *texture, const float *color)
|
||||||
{
|
{
|
||||||
QVk_BindPipeline(&vk_drawPolyPipeline);
|
QVk_BindPipeline(&vk_drawPolyPipeline);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ DrawVkFlowingPoly -- version of DrawVkPoly that handles scrolling texture
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
DrawVkFlowingPoly(msurface_t *fa, image_t *texture, float *color)
|
DrawVkFlowingPoly(msurface_t *fa, image_t *texture, const float *color)
|
||||||
{
|
{
|
||||||
float scroll;
|
float scroll;
|
||||||
mpoly_t *p;
|
mpoly_t *p;
|
||||||
|
@ -187,7 +187,8 @@ R_DrawTriangleOutlines(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
R_RenderBrushPoly(msurface_t *fa, float *modelMatrix, float alpha, entity_t *currententity)
|
R_RenderBrushPoly(msurface_t *fa, const float *modelMatrix, float alpha,
|
||||||
|
const entity_t *currententity)
|
||||||
{
|
{
|
||||||
int maps;
|
int maps;
|
||||||
image_t *image;
|
image_t *image;
|
||||||
|
@ -390,7 +391,8 @@ DrawTextureChains(entity_t *currententity)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Vk_RenderLightmappedPoly(msurface_t *surf, float *modelMatrix, float alpha, entity_t *currententity)
|
Vk_RenderLightmappedPoly(msurface_t *surf, const float *modelMatrix, float alpha,
|
||||||
|
const entity_t *currententity)
|
||||||
{
|
{
|
||||||
int i, nv = surf->polys->numverts;
|
int i, nv = surf->polys->numverts;
|
||||||
int map;
|
int map;
|
||||||
|
|
Loading…
Reference in a new issue