Browse Source

ref_soft: fix Werrors

pull/2/head
mittorn 5 years ago
parent
commit
59f053b1db
  1. 2
      r_context.c
  2. 4
      r_image.c
  3. 4
      r_local.h
  4. 2
      r_main.c
  5. 4
      r_polyse.c
  6. 4
      r_studio.c

2
r_context.c

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

4
r_image.c

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

4
r_local.h

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

2
r_main.c

@ -637,7 +637,7 @@ static void R_SetupFrame( void )
// if( !gl_nosort->value ) // if( !gl_nosort->value )
{ {
// sort translucents entities by rendermode and distance // 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 // current viewleaf

4
r_polyse.c

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

4
r_studio.c

@ -2159,7 +2159,7 @@ static void R_StudioDrawPoints( void )
if( r_studio_sort_textures->value && need_sort ) if( r_studio_sort_textures->value && need_sort )
{ {
// resort opaque and translucent meshes draw order // 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 // NOTE: rewind normals at start
@ -2880,7 +2880,7 @@ void R_StudioRenderFinal( void )
{ {
for( i = 0; i < m_pStudioHeader->numbodyparts; i++ ) 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 ); GL_StudioSetRenderMode( rendermode );
R_StudioDrawPoints(); R_StudioDrawPoints();

Loading…
Cancel
Save