2 * $Logfile: /Freespace2/code/Graphics/TmapScanline.h $
7 * Header file for tmapscanline.cpp.
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 2 10/07/98 10:53a Dave
17 * 1 10/07/98 10:49a Dave
19 * 25 5/13/98 2:53p John
20 * Made subspace effect work under software. Had to add new inner loop to
21 * tmapper. Added glows to end of subspace effect. Made subspace effect
22 * levels use gamepalette-subspace palette.
24 * 24 4/10/98 5:20p John
25 * Changed RGB in lighting structure to be ubytes. Removed old
26 * not-necessary 24 bpp software stuff.
28 * 23 3/22/98 2:33p John
29 * Took out fx_v/v_right. Made fx_u etc get calculated in tmapper.
31 * 22 3/10/98 4:19p John
32 * Cleaned up graphics lib. Took out most unused gr functions. Made D3D
33 * & Glide have popups and print screen. Took out all >8bpp software
34 * support. Made Fred zbuffer. Made zbuffer allocate dynamically to
35 * support Fred. Made zbuffering key off of functions rather than one
38 * 21 12/15/97 11:32a John
41 * 20 12/02/97 4:00p John
42 * Added first rev of thruster glow, along with variable levels of
43 * translucency, which retquired some restructing of palman.
45 * 19 11/30/97 3:57p John
46 * Made fixed 32-bpp translucency. Made BmpMan always map translucent
47 * color into 255 even if you aren't supposed to remap and make it's
50 * 18 11/21/97 11:32a John
51 * Added nebulas. Fixed some warpout bugs.
53 * 17 10/16/97 10:55a John
54 * added tmapper to draw a monochrome alpha blended bitmap.
56 * 16 3/14/97 3:55p John
57 * Made tiled tmapper not always be zbuffered.
59 * 15 3/13/97 10:32a John
60 * Added code for tiled 256x256 textures in certain models.
62 * 14 3/05/97 7:15p John
63 * took out the old z stop tmapper used for briefing.
65 * 13 1/20/97 4:17p John
67 * 12 1/06/97 2:44p John
68 * Added in slow (but correct) zbuffering
70 * 11 12/10/96 10:37a John
71 * Restructured texture mapper to remove some overhead from each scanline
72 * setup. This gave about a 30% improvement drawing trans01.pof, which is
73 * a really complex model. In the process, I cleaned up the scanline
74 * functions and separated them into different modules for each pixel
77 * 10 11/26/96 6:50p John
78 * Added some more hicolor primitives. Made windowed mode run as current
79 * bpp, if bpp is 8,16,or 32.
81 * 9 11/07/96 6:19p John
82 * Added a bunch of 16bpp primitives so the game sort of runs in 16bpp
85 * 8 11/05/96 4:05p John
86 * Added roller. Added code to draw a distant planet. Made bm_load
87 * return -1 if invalid bitmap.
89 * 7 10/31/96 7:20p John
90 * Added per,tiled tmapper. Made models tile if they use 64x64 textures.
92 * 6 10/26/96 1:40p John
93 * Added some now primitives to the 2d library and
94 * cleaned up some old ones.
100 #ifndef _TMAPSCANLINE_H
101 #define _TMAPSCANLINE_H
104 typedef struct tmapper_vertex {
105 float sx, sy, sw, u, v, b;
108 typedef struct tmapper_data {
109 // These are filled once for each texture map being drawn.
110 // The inner loop cannot change any of these!!
111 int nv; // number of vertices
116 float FixedScale; // constant for asm inner loop
117 float FixedScale8; // constant for asm inner loop
118 float One; // constant for asm inner loop
120 // This are filled in by the outer loop before each scan line.
122 tmapper_vertex l, r, dl, dr, deltas;
124 float clipped_left; // how many pixels were clipped off the left in 2d.
126 // These are used internally by the assembly texture mapper.
127 fix fx_l, fx_l_right, fx_dl_dx;
128 fix fx_u, fx_v, fx_du_dx, fx_dv_dx;
142 uint DeltaUFrac, DeltaVFrac;
157 extern tmapper_data Tmap;
159 extern void tmapscan_generic();
160 extern void tmapscan_generic8();
161 //extern void tmapscan_pnn();
162 extern void tmapscan_pln();
163 extern void tmapscan_lln();
164 extern void tmapscan_flat();
165 extern void tmapscan_nebula8();
166 extern void tmapscan_flat_z();
168 extern void tmapscan_flat8();
169 extern void tmapscan_lln8();
170 extern void tmapscan_lnt8();
171 extern void tmapscan_lnn8();
172 extern void tmapscan_lnt8();
173 extern void tmapscan_lln8_tiled();
174 extern void tmapscan_llt8_tiled();
175 extern void tmapscan_pln8();
176 extern void tmapscan_plt8();
178 extern void tmapscan_lnaa8();
180 extern void tmapscan_pln8_tiled();
182 extern void tmapscan_lnn8_tiled_256x256();
183 extern void tmapscan_pnn8_tiled_256x256_subspace();
185 extern void tmapscan_flat_gouraud();
187 extern void tmapscan_nebula8();