1; $Id: tmap_inc.asm,v 1.3 2003/02/18 20:15:48 btb Exp $ 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. 12; 13; 14; Mike's include file for the texture mapper library. 15; 16; Old Log: 17; Revision 1.10 1995/02/20 18:22:52 john 18; Put all the externs in the assembly modules into tmap_inc.asm. 19; Also, moved all the C versions of the inner loops into a new module, 20; scanline.c. 21; 22; Revision 1.9 1994/12/02 23:29:45 mike 23; Add y_pointers. 24; 25; Revision 1.8 1994/11/12 16:39:36 mike 26; jae to ja. 27; 28; Revision 1.7 1994/10/26 23:27:39 john 29; Took out references to gr_inverse_table. 30; 31; Revision 1.6 1994/10/26 23:21:55 mike 32; kill unused stuff. 33; 34; Revision 1.5 1994/07/27 18:39:20 john 35; Took out references to blend table 36; 37; Revision 1.4 1994/01/31 15:40:17 mike 38; Add window_height. 39; 40; Revision 1.3 1993/12/07 12:27:48 john 41; Moved bmd_palette to gr_palette 42; 43; Revision 1.2 1993/11/22 10:24:10 mike 44; *** empty log message *** 45; 46; Revision 1.1 1993/09/08 17:29:47 mike 47; Initial revision 48; 49; 50; 51 52; VESA in this file must be the same as VESA in tmap.h 53VESA equ 0 54 55direct_to_video equ 0 56%if direct_to_video 57 %if VESA 58 59; for vesa mode 60WINDOW_LEFT = 0 61WINDOW_RIGHT = 300 62WINDOW_TOP = 0 63WINDOW_BOTTOM = 200 64WINDOW_WIDTH = WINDOW_RIGHT - WINDOW_LEFT 65BYTES_PER_ROW = 300*2 66 67 %else 68 69; for non-vesa mode 70WINDOW_LEFT = 58 71WINDOW_RIGHT = 262 72WINDOW_TOP = 34 73WINDOW_BOTTOM = 167 74WINDOW_WIDTH = WINDOW_RIGHT - WINDOW_LEFT 75BYTES_PER_ROW = 320 ; number of bytes between rows 76 77 %endif 78 79; for vesa, 15 bit color, 640x480x2 80SCREEN_WIDTH = 640 81SCREEN_HEIGHT = 480 82BYTES_PER_PIXEL = 2 83%endif 84 85%ifdef __linux__ 86; It appears that ELF C compilers do not prefix symbols with '_', so here we 87; cater for them... 88%define _gr_fade_table gr_fade_table 89%define _write_buffer write_buffer 90%define _window_left window_left 91%define _window_right window_right 92%define _window_top window_top 93%define _window_bottom window_bottom 94%define _window_width window_width 95%define _window_height window_height 96%define _bytes_per_row bytes_per_row 97%define _y_pointers y_pointers 98 99%define _per2_flag per2_flag 100%define _tmap_flat_cthru_table tmap_flat_cthru_table 101%define _tmap_flat_color tmap_flat_color 102%define _tmap_flat_shade_value tmap_flat_shade_value 103%define _dither_intensity_lighting dither_intensity_lighting 104%define _Lighting_on Lighting_on 105 106%define _Transparency_on Transparency_on 107%define _fx_u fx_u 108%define _fx_v fx_v 109%define _fx_z fx_z 110%define _fx_l fx_l 111%define _fx_du_dx fx_du_dx 112%define _fx_dv_dx fx_dv_dx 113%define _fx_dz_dx fx_dz_dx 114%define _fx_dl_dx fx_dl_dx 115%define _fx_y fx_y 116%define _fx_xleft fx_xleft 117%define _fx_xright fx_xright 118%define _pixptr pixptr 119%endif 120 121 extern _gr_fade_table;:byte 122;NO_INVERSE_TABLE extrn _gr_inverse_table:byte 123 extern _write_buffer;:dword 124 extern _window_left;:dword 125 extern _window_right;:dword 126 extern _window_top;:dword 127 extern _window_bottom;:dword, 128 extern _window_width;:dword, 129 extern _bytes_per_row;:dword, 130 extern _window_height;:dword 131 extern _y_pointers;:dword 132 133;NO_INVERSE_TABLE _rgb_to_palette equ _gr_inverse_table 134;NO_INVERSE_TABLE _pixel_average equ _gr_inverse_table ; should be blend table, but i took it out -john 135 136max_window_width equ 800 137num_iters equ max_window_width 138 139%if num_iters & 1 140%assign num_iters num_iters+1 141%endif 142 extern _per2_flag;:dword 143 extern _tmap_flat_cthru_table;:dword 144 extern _tmap_flat_color;:byte 145 extern _tmap_flat_shade_value;:byte 146 extern _dither_intensity_lighting;:dword 147 extern _Lighting_on;:dword 148 149; DPH: Selectors are about as portable as a rock. 150; extern _pixel_data_selector;:word 151; extern _gr_fade_table_selector;:word 152 153 extern _Transparency_on;:dword 154 extern _fx_u;:dword 155 extern _fx_v;:dword 156 extern _fx_z;:dword 157 extern _fx_l;:dword 158 extern _fx_du_dx;:dword 159 extern _fx_dv_dx;:dword 160 extern _fx_dz_dx;:dword 161 extern _fx_dl_dx;:dword 162 extern _fx_y;:dword 163 extern _fx_xleft;:dword 164 extern _fx_xright;:dword 165 extern _pixptr;:dword 166 167 168