Remove unused return value of g3_draw_tmap

This commit is contained in:
Kp 2014-08-16 17:35:44 +00:00
parent a42a403198
commit 913a095be7
4 changed files with 14 additions and 19 deletions

View file

@ -228,11 +228,11 @@ bool g3_draw_poly(int nv,g3s_point **pointlist)
return 0; //say it drew
}
static bool must_clip_tmap_face(int nv,g3s_codes cc,grs_bitmap *bm);
static void must_clip_tmap_face(int nv,g3s_codes cc,grs_bitmap *bm);
//draw a texture-mapped face.
//returns 1 if off screen, 0 if drew
bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm)
void g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm)
{
int i;
g3s_point **bufptr;
@ -259,10 +259,13 @@ bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb
}
if (cc.uand)
return 1; //all points off screen
return; //all points off screen
if (cc.uor)
return must_clip_tmap_face(nv,cc,bm);
{
must_clip_tmap_face(nv,cc,bm);
return;
}
//now make list of 2d coords (& check for overflow)
@ -274,16 +277,14 @@ bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb
if (p->p3_flags&PF_OVERFLOW) {
Int3(); //should not overflow after clip
return 255;
return;
}
}
(*tmap_drawer_ptr)(bm,nv,bufptr);
return 0; //say it drew
}
static bool must_clip_tmap_face(int nv,g3s_codes cc,grs_bitmap *bm)
static void must_clip_tmap_face(int nv,g3s_codes cc,grs_bitmap *bm)
{
g3s_point **bufptr;
int i;
@ -315,9 +316,6 @@ free_points:
free_temp_point(bufptr[i]);
// Assert(free_point_num==0);
return 0;
}
//draw a sortof sphere - i.e., the 2d radius is proportional to the 3d

View file

@ -176,7 +176,7 @@ bool g3_draw_poly(int nv,g3s_point **pointlist);
//draw a texture-mapped face.
//returns 1 if off screen, 0 if drew
bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm);
void g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm);
//draw a sortof sphere - i.e., the 2d radius is proportional to the 3d
//radius, but not to the distance from the eye

View file

@ -107,7 +107,7 @@ unsigned char ogl_ugpixel( grs_bitmap * bitmap, int x, int y );
void ogl_ulinec(int left, int top, int right, int bot, int c);
#include "3d.h"
bool g3_draw_tmap_2(int nv,g3s_point **pointlist,g3s_uvl *uvl_list,g3s_lrgb *light_rgb, grs_bitmap *bmbot,grs_bitmap *bm, int orient);
void g3_draw_tmap_2(int nv,g3s_point **pointlist,g3s_uvl *uvl_list,g3s_lrgb *light_rgb, grs_bitmap *bmbot,grs_bitmap *bm, int orient);
void ogl_draw_vertex_reticle(int cross,int primary,int secondary,int color,int alpha,int size_offs);
void ogl_toggle_depth_test(int enable);

View file

@ -866,7 +866,7 @@ void draw_tmap_flat(grs_bitmap *,int,g3s_point **){
/*
* Everything texturemapped (walls, robots, ship)
*/
bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm)
void g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb *light_rgb,grs_bitmap *bm)
{
int c, index2, index3, index4;
GLfloat color_alpha = 1.0;
@ -887,7 +887,7 @@ bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb
color_alpha = 1.0 - (grd_curcanv->cv_fade_level/(GLfloat)NUM_LIGHTING_LEVELS);
} else {
glmprintf((0,"g3_draw_tmap: unhandled tmap_drawer %p\n",tmap_drawer_ptr));
return 0;
return;
}
RAIIdmem<GLfloat> vertex_array, color_array, texcoord_array;
@ -930,13 +930,12 @@ bool g3_draw_tmap(int nv,g3s_point **pointlist,const g3s_uvl *uvl_list,g3s_lrgb
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
return 0;
}
/*
* Everything texturemapped with secondary texture (walls with secondary texture)
*/
bool g3_draw_tmap_2(int nv, g3s_point **pointlist, g3s_uvl *uvl_list, g3s_lrgb *light_rgb, grs_bitmap *bmbot, grs_bitmap *bm, int orient)
void g3_draw_tmap_2(int nv, g3s_point **pointlist, g3s_uvl *uvl_list, g3s_lrgb *light_rgb, grs_bitmap *bmbot, grs_bitmap *bm, int orient)
{
int c, index2, index3, index4;
@ -997,8 +996,6 @@ bool g3_draw_tmap_2(int nv, g3s_point **pointlist, g3s_uvl *uvl_list, g3s_lrgb *
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
return 0;
}
/*