2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
14 * $Source: /cvs/cvsroot/d2x/texmap/texmapl.h,v $
17 * $Date: 2001-10-25 02:22:46 $
19 * Local include file for texture mapper library -- NOT to be included by users.
21 * $Log: not supported by cvs2svn $
22 * Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb
25 * Revision 1.1.1.1 1999/06/14 22:14:11 donut
26 * Import of d1x 1.37 source.
28 * Revision 1.14 1995/02/20 18:23:02 john
29 * Put all the externs in the assembly modules into tmap_inc.asm.
30 * Also, moved all the C versions of the inner loops into a new module,
33 * Revision 1.13 1995/02/20 17:09:16 john
34 * Added code so that you can build the tmapper with no assembly!
36 * Revision 1.12 1994/11/28 13:34:34 mike
39 * Revision 1.11 1994/11/12 16:41:27 mike
42 * Revision 1.10 1994/05/24 17:30:00 mike
43 * Prototype fix_recip, asm_tmap_scanline_lin_v.
45 * Revision 1.9 1994/04/21 15:04:26 mike
46 * Add prototype for texmapl.h
48 * Revision 1.8 1994/03/31 08:34:53 mike
49 * *** empty log message ***
51 * Revision 1.7 1994/03/22 20:37:04 mike
52 * *** empty log message ***
54 * Revision 1.6 1994/03/14 15:43:03 mike
57 * Revision 1.5 1994/01/31 15:43:18 mike
58 * window_height, asm_tmap_scanline_lin_sky_v
60 * Revision 1.4 1994/01/21 21:12:27 mike
61 * Prototype asm_tmap_scanline_lin_sky
63 * Revision 1.3 1994/01/14 14:01:45 mike
64 * Add a bunch of variables.
66 * Revision 1.2 1993/11/22 10:25:11 mike
67 * *** empty log message ***
69 * Revision 1.1 1993/09/08 17:29:13 mike
75 // Local include file for texture map library.
77 extern int prevmod(int val,int modulus);
78 extern int succmod(int val,int modulus);
79 extern void texture_map_flat(g3ds_tmap *t,int color);
81 extern fix compute_dx_dy(g3ds_tmap *t, int top_vertex,int bottom_vertex, fix recip_dy);
82 extern void compute_y_bounds(g3ds_tmap *t, int *vlt, int *vlb, int *vrt, int *vrb,int *bottom_y_ind);
83 extern void asm_tmap_scanline_lin_v(void);
85 extern int fx_y,fx_xleft,fx_xright,per2_flag;
86 extern unsigned char tmap_flat_color;
87 extern unsigned char *pixptr;
89 // texture mapper scanline renderers
90 extern void asm_tmap_scanline_per(void);
91 extern void asm_pent_tmap_scanline_per(void);
92 extern void asm_ppro_tmap_scanline_per(void);
93 //extern void asm_tmap_scanline_per_doubled(void);
94 extern void asm_tmap_scanline_lin(void);
95 //extern void asm_tmap_scanline_lin_16(void);
96 //extern void asm_tmap_scanline_per_16(void);
97 extern void asm_tmap_scanline_lin_lighted(void);
98 extern void asm_tmap_scanline_flat(void);
99 extern void asm_tmap_scanline_shaded(void);
100 //extern void asm_tmap_scanline_lin_lighted_k(void);
101 //extern void asm_tmap_scanline_lin_rgb(void);
102 //extern void asm_tmap_scanline_lin_rgb_16(void);
103 //extern void asm_tmap_scanline_lin_rgb_16g(void);
104 //extern void asm_tmap_scanline_lin_ld(void);
105 //extern void asm_tmap_scanline_lin_sky(void);
106 //extern void asm_tmap_scanline_lin_sky_v(void);
108 extern fix compute_dx_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
109 extern fix compute_dx_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
110 extern fix compute_du_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
111 extern fix compute_du_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
112 extern fix compute_dv_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
113 extern fix compute_dv_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
116 // Interface variables to assembler code
117 extern fix fx_u,fx_v,fx_z,fx_du_dx,fx_dv_dx,fx_dz_dx;
118 extern fix fx_dl_dx,fx_l;
119 extern int fx_r,fx_g,fx_b,fx_dr_dx,fx_dg_dx,fx_db_dx;
120 extern unsigned char *pixptr;
122 extern int bytes_per_row;
123 extern unsigned char *write_buffer;
124 extern int window_left;
125 extern int window_right;
126 extern int window_top;
127 extern int window_bottom;
128 extern int window_width;
129 extern int window_height;
130 extern int scan_doubling_flag;
131 extern int linear_if_far_flag;
132 extern int dither_intensity_lighting;
133 extern int Interlacing_on;
135 extern ubyte * tmap_flat_cthru_table;
136 extern ubyte tmap_flat_color;
137 extern ubyte tmap_flat_shade_value;
140 extern fix fix_recip[];
142 extern void init_interface_vars_to_assembler(void);
143 extern int prevmod(int val,int modulus);