Remove write-only per2_flag
This commit is contained in:
parent
489c4e00a3
commit
f91a378f6e
|
@ -40,9 +40,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
extern fix compute_lighting_value(g3s_point *vertptr);
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
// This is the main texture mapper call.
|
||||
// tmap_num references a texture map defined in Texmap_ptrs.
|
||||
|
@ -90,18 +87,13 @@ extern unsigned Current_seg_depth;
|
|||
// These are pointers to texture maps. If you want to render texture map #7, then you will render
|
||||
// the texture map defined by Texmap_ptrs[7].
|
||||
|
||||
// Interface for sky renderer
|
||||
extern void texture_map_lin_lin_sky(grs_bitmap *srcb, g3ds_tmap *t);
|
||||
extern void texture_map_lin_lin_sky_v(grs_bitmap *srcb, g3ds_tmap *t);
|
||||
extern void texture_map_hyp_lin_v(grs_bitmap *srcb, g3ds_tmap *t);
|
||||
|
||||
#ifndef OGL
|
||||
// This is the gr_upoly-like interface to the texture mapper which uses texture-mapper compatible
|
||||
// (ie, avoids cracking) edge/delta computation.
|
||||
void gr_upoly_tmap(int nverts, const int *vert );
|
||||
#endif
|
||||
|
||||
extern int Transparency_on,per2_flag;
|
||||
extern int Transparency_on;
|
||||
|
||||
extern int Window_clip_left, Window_clip_bot, Window_clip_right, Window_clip_top;
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ int Lighting_enabled;
|
|||
fix fx_l, fx_u, fx_v, fx_z, fx_du_dx, fx_dv_dx, fx_dz_dx, fx_dl_dx;
|
||||
int fx_xleft, fx_xright, fx_y;
|
||||
const unsigned char *pixptr;
|
||||
int per2_flag = 0;
|
||||
int Transparency_on = 0;
|
||||
|
||||
ubyte tmap_flat_color;
|
||||
|
@ -848,22 +847,18 @@ void draw_tmap(const grs_bitmap &rbp,int nverts,const g3s_point *const *vertbuf)
|
|||
if (Lighting_on) {
|
||||
switch (Interpolation_method) { // 0 = choose, 1 = linear, 2 = /8 perspective, 3 = full perspective
|
||||
case 0: // choose best interpolation
|
||||
per2_flag = 1;
|
||||
if (Current_seg_depth > Max_perspective_depth)
|
||||
ntexture_map_lighted_linear(*bp, Tmap1);
|
||||
else
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
case 1: // linear interpolation
|
||||
per2_flag = 1;
|
||||
ntexture_map_lighted_linear(*bp, Tmap1);
|
||||
break;
|
||||
case 2: // perspective every 8th pixel interpolation
|
||||
per2_flag = 1;
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
case 3: // perspective every pixel interpolation
|
||||
per2_flag = 0; // this hack means do divide every pixel
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
default:
|
||||
|
@ -872,22 +867,18 @@ void draw_tmap(const grs_bitmap &rbp,int nverts,const g3s_point *const *vertbuf)
|
|||
} else {
|
||||
switch (Interpolation_method) { // 0 = choose, 1 = linear, 2 = /8 perspective, 3 = full perspective
|
||||
case 0: // choose best interpolation
|
||||
per2_flag = 1;
|
||||
if (Current_seg_depth > Max_perspective_depth)
|
||||
ntexture_map_lighted_linear(*bp, Tmap1);
|
||||
else
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
case 1: // linear interpolation
|
||||
per2_flag = 1;
|
||||
ntexture_map_lighted_linear(*bp, Tmap1);
|
||||
break;
|
||||
case 2: // perspective every 8th pixel interpolation
|
||||
per2_flag = 1;
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
case 3: // perspective every pixel interpolation
|
||||
per2_flag = 0; // this hack means do divide every pixel
|
||||
ntexture_map_lighted(*bp, Tmap1);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -42,7 +42,7 @@ extern int succmod(int val,int modulus);
|
|||
fix compute_dx_dy(const g3ds_tmap &t, int top_vertex,int bottom_vertex, fix recip_dy);
|
||||
void compute_y_bounds(const g3ds_tmap &t, int &vlt, int &vlb, int &vrt, int &vrb,int &bottom_y_ind);
|
||||
|
||||
extern int fx_y,fx_xleft,fx_xright,per2_flag;
|
||||
extern int fx_y,fx_xleft,fx_xright;
|
||||
extern unsigned char tmap_flat_color;
|
||||
extern const unsigned char *pixptr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue