TEXMAPL.H 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  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. * $Source: f:/miner/source/texmap/rcs/texmapl.h $
  15. * $Revision: 1.14 $
  16. * $Author: john $
  17. * $Date: 1995/02/20 18:23:02 $
  18. *
  19. * Local include file for texture mapper library -- NOT to be included by users.
  20. *
  21. * $Log: texmapl.h $
  22. * Revision 1.14 1995/02/20 18:23:02 john
  23. * Put all the externs in the assembly modules into tmap_inc.asm.
  24. * Also, moved all the C versions of the inner loops into a new module,
  25. * scanline.c.
  26. *
  27. * Revision 1.13 1995/02/20 17:09:16 john
  28. * Added code so that you can build the tmapper with no assembly!
  29. *
  30. * Revision 1.12 1994/11/28 13:34:34 mike
  31. * optimizations.
  32. *
  33. * Revision 1.11 1994/11/12 16:41:27 mike
  34. * function prototype.
  35. *
  36. * Revision 1.10 1994/05/24 17:30:00 mike
  37. * Prototype fix_recip, asm_tmap_scanline_lin_v.
  38. *
  39. * Revision 1.9 1994/04/21 15:04:26 mike
  40. * Add prototype for texmapl.h
  41. *
  42. * Revision 1.8 1994/03/31 08:34:53 mike
  43. * *** empty log message ***
  44. *
  45. * Revision 1.7 1994/03/22 20:37:04 mike
  46. * *** empty log message ***
  47. *
  48. * Revision 1.6 1994/03/14 15:43:03 mike
  49. * streamline code.
  50. *
  51. * Revision 1.5 1994/01/31 15:43:18 mike
  52. * window_height, asm_tmap_scanline_lin_sky_v
  53. *
  54. * Revision 1.4 1994/01/21 21:12:27 mike
  55. * Prototype asm_tmap_scanline_lin_sky
  56. *
  57. * Revision 1.3 1994/01/14 14:01:45 mike
  58. * Add a bunch of variables.
  59. *
  60. * Revision 1.2 1993/11/22 10:25:11 mike
  61. * *** empty log message ***
  62. *
  63. * Revision 1.1 1993/09/08 17:29:13 mike
  64. * Initial revision
  65. *
  66. *
  67. */
  68. // Local include file for texture map library.
  69. extern int prevmod(int val,int modulus);
  70. extern int succmod(int val,int modulus);
  71. extern void texture_map_flat(g3ds_tmap *t,int color);
  72. extern fix compute_dx_dy(g3ds_tmap *t, int top_vertex,int bottom_vertex, fix recip_dy);
  73. extern void compute_y_bounds(g3ds_tmap *t, int *vlt, int *vlb, int *vrt, int *vrb,int *bottom_y_ind);
  74. extern void asm_tmap_scanline_flat(void);
  75. extern void asm_tmap_scanline_matt(void);
  76. extern void asm_tmap_scanline_lin_v(void);
  77. extern int fx_y,fx_xleft,fx_xright,per2_flag;
  78. extern unsigned char tmap_flat_color;
  79. extern unsigned char *pixptr;
  80. // texture mapper scanline renderers
  81. extern void asm_tmap_scanline_per(void);
  82. extern void asm_tmap_scanline_per_doubled(void);
  83. extern void asm_tmap_scanline_lin(void);
  84. extern void asm_tmap_scanline_lin_16(void);
  85. extern void asm_tmap_scanline_per_16(void);
  86. extern void asm_tmap_scanline_lin_lighted(void);
  87. extern void asm_tmap_scanline_lin_lighted_k(void);
  88. extern void asm_tmap_scanline_lin_rgb(void);
  89. extern void asm_tmap_scanline_lin_rgb_16(void);
  90. extern void asm_tmap_scanline_lin_rgb_16g(void);
  91. extern void asm_tmap_scanline_lin_ld(void);
  92. extern void asm_tmap_scanline_lin_sky(void);
  93. extern void asm_tmap_scanline_lin_sky_v(void);
  94. extern fix compute_dx_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
  95. extern fix compute_dx_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
  96. extern fix compute_du_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
  97. extern fix compute_du_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
  98. extern fix compute_dv_dy_lin(g3ds_tmap *t,int vlt,int vlb, fix recip_dy);
  99. extern fix compute_dv_dy_lin(g3ds_tmap *t,int vrt,int vrb, fix recip_dy);
  100. // Interface variables to assembler code
  101. extern fix fx_u,fx_v,fx_z,fx_du_dx,fx_dv_dx,fx_dz_dx;
  102. extern fix fx_dl_dx,fx_l;
  103. extern int fx_r,fx_g,fx_b,fx_dr_dx,fx_dg_dx,fx_db_dx;
  104. extern unsigned char *pixptr;
  105. extern int bytes_per_row;
  106. extern int write_buffer;
  107. extern int window_left;
  108. extern int window_right;
  109. extern int window_top;
  110. extern int window_bottom;
  111. extern int window_width;
  112. extern int window_height;
  113. extern int scan_doubling_flag;
  114. extern int linear_if_far_flag;
  115. extern int dither_intensity_lighting;
  116. extern int Interlacing_on;
  117. extern short _pixel_data_selector;
  118. extern ubyte * tmap_flat_cthru_table;
  119. extern ubyte tmap_flat_color;
  120. extern ubyte tmap_flat_shade_value;
  121. extern fix fix_recip[];
  122. extern void init_interface_vars_to_assembler(void);
  123. extern int prevmod(int val,int modulus);
  124. #define FIX_RECIP_TABLE_SIZE 321
  125.