diff --git a/common/3d/draw.cpp b/common/3d/draw.cpp index 27fabccf4..6a32c54e0 100644 --- a/common/3d/draw.cpp +++ b/common/3d/draw.cpp @@ -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 diff --git a/common/include/3d.h b/common/include/3d.h index 05efc61b7..a8ba6a100 100644 --- a/common/include/3d.h +++ b/common/include/3d.h @@ -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 diff --git a/common/include/ogl_init.h b/common/include/ogl_init.h index 0f1ea2368..66257ab30 100644 --- a/common/include/ogl_init.h +++ b/common/include/ogl_init.h @@ -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); diff --git a/similar/arch/ogl/ogl.cpp b/similar/arch/ogl/ogl.cpp index 92fd027d6..8355ccd9b 100644 --- a/similar/arch/ogl/ogl.cpp +++ b/similar/arch/ogl/ogl.cpp @@ -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 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; } /*