ref_soft: fix Werrors

This commit is contained in:
mittorn 2020-01-25 15:54:56 +07:00
parent d4efb55492
commit 59f053b1db
6 changed files with 10 additions and 10 deletions

View File

@ -309,7 +309,7 @@ void GAME_EXPORT R_ProcessEntData( qboolean allocate )
// stubs
void GAME_EXPORT GL_SetTexCoordArrayMode( void )
void GAME_EXPORT GL_SetTexCoordArrayMode( uint mode )
{
}

View File

@ -572,14 +572,14 @@ static qboolean GL_UploadTexture( image_t *tex, rgbdata_t *pic )
// increase size to workaround triangle renderer bugs
// it seems to assume memory readable. maybe it was pointed to WAD?
//tex->pixels[j] = (byte*)Mem_Calloc( r_temppool, width * height * sizeof(pixel_t) + 1024 ) + 512;
tex->pixels[j] = (byte*)Mem_Calloc( r_temppool, width * height * sizeof(pixel_t) );
tex->pixels[j] = (pixel_t*)Mem_Calloc( r_temppool, width * height * sizeof(pixel_t) );
//memset( (byte*)tex->pixels[j] - 512, 0xFF, 512 );
//memset( (byte*)tex->pixels[j] + width * height * sizeof(pixel_t), 0xFF, 512 );
if( j == 0 && tex->flags & TF_HAS_ALPHA )
tex->alpha_pixels = (byte*)Mem_Calloc( r_temppool, width * height * sizeof(pixel_t) );
tex->alpha_pixels = (pixel_t*)Mem_Calloc( r_temppool, width * height * sizeof(pixel_t) );
for(i = 0; i < height * width; i++ )
{

View File

@ -363,7 +363,7 @@ typedef struct image_s
int servercount;
uint hashValue;
struct gltexture_s *nextHash;
struct image_s *nextHash;
} image_t;
#if 0
@ -956,7 +956,7 @@ typedef struct
typedef struct
{
byte *surfdat; // destination for generated surface
pixel_t *surfdat; // destination for generated surface
int rowbytes; // destination logical width in bytes
msurface_t *surf; // description for surface to generate
fixed8_t lightadj[MAXLIGHTMAPS];

View File

@ -637,7 +637,7 @@ static void R_SetupFrame( void )
// if( !gl_nosort->value )
{
// sort translucents entities by rendermode and distance
qsort( tr.draw_list->trans_entities, tr.draw_list->num_trans_entities, sizeof( cl_entity_t* ), R_TransEntityCompare );
qsort( tr.draw_list->trans_entities, tr.draw_list->num_trans_entities, sizeof( cl_entity_t* ), (void*)R_TransEntityCompare );
}
// current viewleaf

View File

@ -1423,8 +1423,8 @@ void R_PolysetDrawSpans8_Opaque (spanpackage_t *pspanpackage)
if (lcount)
{
int lsfrac, ltfrac;
byte *lpdest;
byte *lptex;
pixel_t *lpdest;
pixel_t *lptex;
int llight;
int lzi;
short *lpz;

View File

@ -2159,7 +2159,7 @@ static void R_StudioDrawPoints( void )
if( r_studio_sort_textures->value && need_sort )
{
// resort opaque and translucent meshes draw order
qsort( g_studio.meshes, m_pSubModel->nummesh, sizeof( sortedmesh_t ), R_StudioMeshCompare );
qsort( g_studio.meshes, m_pSubModel->nummesh, sizeof( sortedmesh_t ), (void*)R_StudioMeshCompare );
}
// NOTE: rewind normals at start
@ -2880,7 +2880,7 @@ void R_StudioRenderFinal( void )
{
for( i = 0; i < m_pStudioHeader->numbodyparts; i++ )
{
R_StudioSetupModel( i, &m_pBodyPart, &m_pSubModel );
R_StudioSetupModel( i, (void*)&m_pBodyPart, (void*)&m_pSubModel );
GL_StudioSetRenderMode( rendermode );
R_StudioDrawPoints();