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/scanline.c,v $
17 * $Date: 2001-10-25 02:22:46 $
19 * Routines to draw the texture mapped scanlines.
21 * $Log: not supported by cvs2svn $
22 * Revision 1.2 2001/01/31 15:18:04 bradleyb
23 * Makefile and conf.h fixes
25 * Revision 1.1.1.1 2001/01/19 03:30:16 bradleyb
28 * Revision 1.4 1999/10/18 00:31:01 donut
29 * more alpha fixes from Falk Hueffner
31 * Revision 1.3 1999/10/14 04:48:21 donut
32 * alpha fixes, and gl_font args
34 * Revision 1.2 1999/09/21 07:22:40 sekmu
35 * remove unused var warning
37 * Revision 1.1.1.1 1999/06/14 22:14:08 donut
38 * Import of d1x 1.37 source.
40 * Revision 1.2 1995/02/20 18:23:39 john
41 * Added new module for C versions of inner loops.
43 * Revision 1.1 1995/02/20 17:42:27 john
54 static char rcsid[] = "$Id: scanline.c,v 1.3 2001-10-25 02:22:46 bradleyb Exp $";
71 void c_tmap_scanline_flat()
76 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y ) );
78 /* for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
79 *dest++ = tmap_flat_color;
81 memset(dest,tmap_flat_color,fx_xright-fx_xleft+1);
84 void c_tmap_scanline_shaded()
90 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
92 fade = tmap_flat_shade_value<<8;
93 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
95 *dest++ = gr_fade_table[ fade |(tmp)];
99 void c_tmap_scanline_lin_nolight()
111 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
113 if (!Transparency_on) {
114 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
115 *dest++ = (uint)pixptr[ (f2i(v)&(64*63)) + (f2i(u)&63) ];
120 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
121 c = (uint)pixptr[ (f2i(v)&(64*63)) + (f2i(u)&63) ];
133 void c_tmap_scanline_lin()
138 fix u,v,l,dudx, dvdx, dldx;
147 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
149 if (!Transparency_on) {
150 ubyte* pixPtrLocalCopy = pixptr;
151 ubyte* fadeTableLocalCopy = gr_fade_table;
152 unsigned long destlong;
154 x = fx_xright-fx_xleft+1;
156 if ((j = (unsigned long) dest & 3) != 0)
165 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
166 *dest++ = (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ];
179 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
180 destlong = (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ] << 24;
185 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
186 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ] << 16;
191 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
192 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ] << 8;
197 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
198 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ];
203 *((unsigned long *) dest) = destlong;
211 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
212 *dest++ = (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint) pixPtrLocalCopy[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ];
220 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
221 c = (uint)pixptr[ (f2i(v)&(64*63)) + (f2i(u)&63) ];
222 if ( c!=TRANSPARENCY_COLOR)
223 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
224 *dest = gr_fade_table[ (l&(0x7f00)) + c ];
235 void c_tmap_scanline_lin()
240 fix u,v,l,dudx, dvdx, dldx;
249 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
251 if (!Transparency_on) {
252 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
253 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
254 *dest++ = gr_fade_table[ (l&(0x7f00)) + (uint)pixptr[ (f2i(v)&(64*63)) + (f2i(u)&63) ] ];
261 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
262 c = (uint)pixptr[ (f2i(v)&(64*63)) + (f2i(u)&63) ];
264 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
265 *dest = gr_fade_table[ (l&(0x7f00)) + c ];
276 // Used for energy centers. See comments for c_tmap_scanline_per().
277 void c_fp_tmap_scanline_per_nolight()
282 double u, v, z, dudx, dvdx, dzdx, rec_z;
286 v = f2db(fx_v) * 64.0;
288 dudx = f2db(fx_du_dx);
289 dvdx = f2db(fx_dv_dx) * 64.0;
290 dzdx = f2db(fx_dz_dx);
294 dest = (ubyte *) (write_buffer + fx_xleft + (bytes_per_row * fx_y));
296 x = fx_xright - fx_xleft + 1;
297 if (!Transparency_on) {
299 if ((j = (size_t) dest & 7) != 0) {
304 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
305 (((int) (u * rec_z)) & 63)];
317 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
318 (((int) (u * rec_z)) & 63)];
324 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
325 (((int) (u * rec_z)) & 63)] << 8;
331 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
332 (((int) (u * rec_z)) & 63)] << 16;
338 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
339 (((int) (u * rec_z)) & 63)] << 24;
345 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
346 (((int) (u * rec_z)) & 63)] << 32;
352 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
353 (((int) (u * rec_z)) & 63)] << 40;
359 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
360 (((int) (u * rec_z)) & 63)] << 48;
366 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
367 (((int) (u * rec_z)) & 63)] << 56;
373 *((u_int64_t *) dest) = destlong;
381 (u_int64_t) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
382 (((int) (u * rec_z)) & 63)];
389 x = fx_xright - fx_xleft + 1;
392 if ((j = (size_t) dest & 7) != 0) {
397 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
398 (((int) (u * rec_z)) & 63)];
413 destlong = *((u_int64_t *) dest);
414 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
415 (((int) (u * rec_z)) & 63)];
417 destlong &= ~(u_int64_t)0xFF;
418 destlong |= (u_int64_t) c;
424 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
425 (((int) (u * rec_z)) & 63)];
427 destlong &= ~((u_int64_t)0xFF << 8);
428 destlong |= (u_int64_t) c << 8;
434 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
435 (((int) (u * rec_z)) & 63)];
437 destlong &= ~((u_int64_t)0xFF << 16);
438 destlong |= (u_int64_t) c << 16;
444 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
445 (((int) (u * rec_z)) & 63)];
447 destlong &= ~((u_int64_t)0xFF << 24);
448 destlong |= (u_int64_t) c << 24;
454 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
455 (((int) (u * rec_z)) & 63)];
457 destlong &= ~((u_int64_t)0xFF << 32);
458 destlong |= (u_int64_t) c << 32;
464 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
465 (((int) (u * rec_z)) & 63)];
467 destlong &= ~((u_int64_t)0xFF << 40);
468 destlong |= (u_int64_t) c << 40;
474 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
475 (((int) (u * rec_z)) & 63)];
477 destlong &= ~((u_int64_t)0xFF << 48);
478 destlong |= (u_int64_t) c << 48;
484 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
485 (((int) (u * rec_z)) & 63)];
487 destlong &= ~((u_int64_t)0xFF << 56);
488 destlong |= (u_int64_t) c << 56;
495 *((u_int64_t *) dest) = destlong;
502 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
503 (((int) (u * rec_z)) & 63)];
515 void c_tmap_scanline_per_nolight()
520 fix u,v,z,dudx, dvdx, dzdx;
529 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
531 if (!Transparency_on) {
532 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
533 *dest++ = (uint)pixptr[ ( (v/z)&(64*63) ) + ((u/z)&63) ];
539 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
540 c = (uint)pixptr[ ( (v/z)&(64*63) ) + ((u/z)&63) ];
551 // This texture mapper uses floating point extensively and writes 8 pixels at once, so it likely works
552 // best on 64 bit RISC processors.
553 // WARNING: it is not endian clean. For big endian, reverse the shift counts in the unrolled loops. I
554 // have no means to test that, so I didn't try it. Please tell me if you get this to work on a big
556 // If you're using an Alpha, use the Compaq compiler for this file for quite some fps more.
557 // Unfortunately, it won't compile the whole source, so simply compile everything, change the
558 // compiler to ccc, remove scanline.o and compile again.
559 // Please send comments/suggestions to falk.hueffner@student.uni-tuebingen.de.
560 void c_fp_tmap_scanline_per()
565 double u, v, z, l, dudx, dvdx, dzdx, dldx, rec_z;
569 v = f2db(fx_v) * 64.0;
572 dudx = f2db(fx_du_dx);
573 dvdx = f2db(fx_dv_dx) * 64.0;
574 dzdx = f2db(fx_dz_dx);
575 dldx = f2db(fx_dl_dx);
577 rec_z = 1.0 / z; // gcc 2.95.2 is won't do this optimization itself
579 dest = (ubyte *) (write_buffer + fx_xleft + (bytes_per_row * fx_y));
580 x = fx_xright - fx_xleft + 1;
582 if (!Transparency_on) {
584 if ((j = (size_t) dest & 7) != 0) {
589 gr_fade_table[((int) fabs(l)) * 256 +
590 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
591 (((int) (u * rec_z)) & 63)]];
605 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
606 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
607 (((int) (u * rec_z)) & 63)]];
614 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
615 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
616 (((int) (u * rec_z)) & 63)]] << 8;
623 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
624 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
625 (((int) (u * rec_z)) & 63)]] << 16;
632 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
633 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
634 (((int) (u * rec_z)) & 63)]] << 24;
641 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
642 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
643 (((int) (u * rec_z)) & 63)]] << 32;
650 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
651 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
652 (((int) (u * rec_z)) & 63)]] << 40;
659 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
660 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
661 (((int) (u * rec_z)) & 63)]] << 48;
668 (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 +
669 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) +
670 (((int) (u * rec_z)) & 63)]] << 56;
677 *((u_int64_t *) dest) = destlong;
685 gr_fade_table[((int) fabs(l)) * 256 +
686 (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)]];
695 if ((j = (size_t) dest & 7) != 0) {
699 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
701 *dest = gr_fade_table[((int) fabs(l)) * 256 + c];
715 destlong = *((u_int64_t *) dest);
716 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
718 destlong &= ~(u_int64_t)0xFF;
719 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c];
726 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
728 destlong &= ~((u_int64_t)0xFF << 8);
729 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 8;
736 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
738 destlong &= ~((u_int64_t)0xFF << 16);
739 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 16;
746 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
748 destlong &= ~((u_int64_t)0xFF << 24);
749 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 24;
756 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
758 destlong &= ~((u_int64_t)0xFF << 32);
759 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 32;
766 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
768 destlong &= ~((u_int64_t)0xFF << 40);
769 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 40;
776 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
778 destlong &= ~((u_int64_t)0xFF << 48);
779 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 48;
786 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
788 destlong &= ~((u_int64_t)0xFF << 56);
789 destlong |= (u_int64_t) gr_fade_table[((int) fabs(l)) * 256 + c] << 56;
797 *((u_int64_t *) dest) = destlong;
804 c = (uint) pixptr[(((int) (v * rec_z)) & (64 * 63)) + (((int) (u * rec_z)) & 63)];
806 *dest = gr_fade_table[((int) fabs(l)) * 256 + c];
818 // note the unrolling loop is broken. It is never called, and uses big endian. -- FH
819 void c_tmap_scanline_per()
825 fix dudx, dvdx, dzdx, dldx;
836 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
838 if (!Transparency_on) {
839 ubyte* pixPtrLocalCopy = pixptr;
840 ubyte* fadeTableLocalCopy = gr_fade_table;
841 unsigned long destlong;
843 x = fx_xright-fx_xleft+1;
845 if ((j = (unsigned long) dest & 3) != 0)
854 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
855 *dest++ = fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ];
869 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
870 destlong = (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ] << 24;
876 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
877 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ] << 16;
883 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
884 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ] << 8;
890 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
891 destlong |= (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ];
897 *((unsigned long *) dest) = destlong;
905 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
906 *dest++ = (unsigned long) fadeTableLocalCopy[ (l&(0x7f00)) + (uint)pixPtrLocalCopy[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ];
915 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
916 c = (uint)pixptr[ ( (v/z)&(64*63) ) + ((u/z)&63) ];
917 if ( c!=TRANSPARENCY_COLOR)
918 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
919 *dest = gr_fade_table[ (l&(0x7f00)) + c ];
931 void c_tmap_scanline_per()
936 fix u,v,z,l,dudx, dvdx, dzdx, dldx;
947 dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) );
949 if (!Transparency_on) {
950 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
951 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
952 *dest++ = gr_fade_table[ (l&(0x7f00)) + (uint)pixptr[ ( (v/z)&(64*63) ) + ((u/z)&63) ] ];
960 for (x= fx_xright-fx_xleft+1 ; x > 0; --x ) {
961 c = (uint)pixptr[ ( (v/z)&(64*63) ) + ((u/z)&63) ];
963 //edited 05/18/99 Matt Mueller - changed from 0xff00 to 0x7f00 to fix glitches
964 *dest = gr_fade_table[ (l&(0x7f00)) + c ];
977 void (*cur_tmap_scanline_per)(void);
978 void (*cur_tmap_scanline_per_nolight)(void);
979 void (*cur_tmap_scanline_lin)(void);
980 void (*cur_tmap_scanline_lin_nolight)(void);
981 void (*cur_tmap_scanline_flat)(void);
982 void (*cur_tmap_scanline_shaded)(void);
984 //runtime selection of optimized tmappers. 12/07/99 Matthew Mueller
985 //the reason I did it this way rather than having a *tmap_funcs that then points to a c_tmap or fp_tmap struct thats already filled in, is to avoid a second pointer dereference.
986 void select_tmap(char *type){
996 if (stricmp(type,"i386")==0){
997 cur_tmap_scanline_per=asm_tmap_scanline_per;
998 cur_tmap_scanline_per_nolight=asm_tmap_scanline_per;
999 cur_tmap_scanline_lin=asm_tmap_scanline_lin_lighted;
1000 cur_tmap_scanline_lin_nolight=asm_tmap_scanline_lin;
1001 cur_tmap_scanline_flat=asm_tmap_scanline_flat;
1002 cur_tmap_scanline_shaded=asm_tmap_scanline_shaded;
1004 else if (stricmp(type,"pent")==0){
1005 cur_tmap_scanline_per=asm_pent_tmap_scanline_per;
1006 cur_tmap_scanline_per_nolight=asm_pent_tmap_scanline_per;
1007 cur_tmap_scanline_lin=asm_tmap_scanline_lin_lighted;
1008 cur_tmap_scanline_lin_nolight=asm_tmap_scanline_lin;
1009 cur_tmap_scanline_flat=asm_tmap_scanline_flat;
1010 cur_tmap_scanline_shaded=asm_tmap_scanline_shaded;
1012 else if (stricmp(type,"ppro")==0){
1013 cur_tmap_scanline_per=asm_ppro_tmap_scanline_per;
1014 cur_tmap_scanline_per_nolight=asm_ppro_tmap_scanline_per;
1015 cur_tmap_scanline_lin=asm_tmap_scanline_lin_lighted;
1016 cur_tmap_scanline_lin_nolight=asm_tmap_scanline_lin;
1017 cur_tmap_scanline_flat=asm_tmap_scanline_flat;
1018 cur_tmap_scanline_shaded=asm_tmap_scanline_shaded;
1022 if (stricmp(type,"fp")==0){
1023 cur_tmap_scanline_per=c_fp_tmap_scanline_per;
1024 cur_tmap_scanline_per_nolight=c_fp_tmap_scanline_per_nolight;
1025 cur_tmap_scanline_lin=c_tmap_scanline_lin;
1026 cur_tmap_scanline_lin_nolight=c_tmap_scanline_lin_nolight;
1027 cur_tmap_scanline_flat=c_tmap_scanline_flat;
1028 cur_tmap_scanline_shaded=c_tmap_scanline_shaded;
1031 if (stricmp(type,"c")!=0)
1032 printf("unknown tmap requested, using c tmap\n");
1033 cur_tmap_scanline_per=c_tmap_scanline_per;
1034 cur_tmap_scanline_per_nolight=c_tmap_scanline_per_nolight;
1035 cur_tmap_scanline_lin=c_tmap_scanline_lin;
1036 cur_tmap_scanline_lin_nolight=c_tmap_scanline_lin_nolight;
1037 cur_tmap_scanline_flat=c_tmap_scanline_flat;
1038 cur_tmap_scanline_shaded=c_tmap_scanline_shaded;