home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser-CD 2000 January / LCD_01_2000.iso / games / doom / pmdoom / include / r_draw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-17  |  4.4 KB  |  167 lines

  1. /*  Emacs style mode select   -*- C++ -*-  */
  2. /* ----------------------------------------------------------------------------- */
  3. /*  */
  4. /*  $Id:$ */
  5. /*  */
  6. /*  Copyright (C) 1993-1996 by id Software, Inc. */
  7. /*  */
  8. /*  This source is available for distribution and/or modification */
  9. /*  only under the terms of the DOOM Source Code License as */
  10. /*  published by id Software. All rights reserved. */
  11. /*  */
  12. /*  The source is distributed in the hope that it will be useful, */
  13. /*  but WITHOUT ANY WARRANTY; without even the implied warranty of */
  14. /*  FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License */
  15. /*  for more details. */
  16. /*  */
  17. /*  DESCRIPTION: */
  18. /*     System specific interface stuff. */
  19. /*  */
  20. /* ----------------------------------------------------------------------------- */
  21.  
  22.  
  23. #ifndef __R_DRAW__
  24. #define __R_DRAW__
  25.  
  26. #include "doomtype.h"
  27. #include "r_defs.h"
  28.  
  29. #ifdef __GNUG__
  30. #pragma interface
  31. #endif
  32.  
  33. #define MAXWIDTH    1120
  34. #define MAXHEIGHT    832
  35.  
  36. /*  status bar height at bottom of screen */
  37. #define SBARHEIGHT    32
  38.  
  39. /*  All drawing to the view buffer is accomplished in this file. */
  40. /*  The other refresh files only know about ccordinates, */
  41. /*   not the architecture of the frame buffer. */
  42. /*  Conveniently, the frame buffer is a linear one, */
  43. /*   and we need only the base address, */
  44. /*   and the total size == width*height*depth/8., */
  45. /*  */
  46.  
  47.  
  48. extern byte*        viewimage; 
  49. extern int        viewwidth;
  50. extern int        scaledviewwidth;
  51. extern int        viewheight;
  52. extern int        viewwindowx;
  53. extern int        viewwindowy; 
  54. extern int        columnofs[MAXWIDTH]; 
  55.  
  56. extern byte    *ylookup[MAXHEIGHT];
  57.  
  58. /*  Color tables for different players, */
  59. /*   translate a limited part to another */
  60. /*   (color ramps used for  suit colors). */
  61. /*  */
  62. extern byte        translations[3][256];
  63.  
  64.  
  65.  
  66. extern lighttable_t*    dc_colormap;
  67. extern int        dc_x;
  68. extern int        dc_yl;
  69. extern int        dc_yh;
  70. extern fixed_t        dc_iscale;
  71. extern fixed_t        dc_texturemid;
  72.  
  73. /*  first pixel in a column */
  74. extern byte*        dc_source;        
  75. extern int        dccount; /*  for profiling */
  76.  
  77. /*  The span blitting interface. */
  78. /*  Hook in assembler or system specific BLT */
  79. /*   here. */
  80. void     R_DrawColumn8 (void);
  81. void     R_DrawColumnLow8 (void);
  82. void     R_DrawColumn16 (void);
  83. void     R_DrawColumnLow16 (void);
  84. void     R_DrawColumn24 (void);
  85. void     R_DrawColumnLow24 (void);
  86. void     R_DrawColumn32 (void);
  87. void     R_DrawColumnLow32 (void);
  88.  
  89. /*  The Spectre/Invisibility effect. */
  90. void     R_DrawFuzzColumn8 (void);
  91. void     R_DrawFuzzColumnLow8 (void);
  92. void     R_DrawFuzzColumn16 (void);
  93. void     R_DrawFuzzColumnLow16 (void);
  94. void     R_DrawFuzzColumn24 (void);
  95. void     R_DrawFuzzColumnLow24 (void);
  96. void     R_DrawFuzzColumn32 (void);
  97. void     R_DrawFuzzColumnLow32 (void);
  98.  
  99. /*  Draw with color translation tables, */
  100. /*   for player sprite rendering, */
  101. /*   Green/Red/Blue/Indigo shirts. */
  102. void    R_DrawTranslatedColumn8 (void);
  103. void    R_DrawTranslatedColumnLow8 (void);
  104. void    R_DrawTranslatedColumn16 (void);
  105. void    R_DrawTranslatedColumnLow16 (void);
  106. void    R_DrawTranslatedColumn24 (void);
  107. void    R_DrawTranslatedColumnLow24 (void);
  108. void    R_DrawTranslatedColumn32 (void);
  109. void    R_DrawTranslatedColumnLow32 (void);
  110.  
  111. void    R_VideoErase(unsigned ofs,int count);
  112.  
  113. extern int        ds_y;
  114. extern int        ds_x1;
  115. extern int        ds_x2;
  116.  
  117. extern lighttable_t*    ds_colormap;
  118.  
  119. extern fixed_t        ds_xfrac;
  120. extern fixed_t        ds_yfrac;
  121. extern fixed_t        ds_xstep;
  122. extern fixed_t        ds_ystep;
  123.  
  124. /*  start of a 64*64 tile image */
  125. extern byte*        ds_source;        
  126.  
  127. extern byte*        translationtables;
  128. extern byte*        dc_translation;
  129. extern int        dscount;
  130.  
  131. /*  Span blitting for rows, floor/ceiling. */
  132. /*  No Sepctre effect needed. */
  133. void     R_DrawSpan8 (void);
  134. void     R_DrawSpanLow8 (void);
  135. void     R_DrawSpan16 (void);
  136. void     R_DrawSpanLow16 (void);
  137. void     R_DrawSpan24 (void);
  138. void     R_DrawSpanLow24 (void);
  139. void     R_DrawSpan32 (void);
  140. void     R_DrawSpanLow32 (void);
  141.  
  142. void R_InitBuffer
  143. ( int        width,
  144.   int        height );
  145.  
  146.  
  147. /*  Initialize color translation tables, */
  148. /*   for player rendering etc. */
  149. void    R_InitTranslationTables (void);
  150.  
  151.  
  152.  
  153. /*  Rendering function. */
  154. void R_FillBackScreen (void);
  155.  
  156. /*  If the view size is not full screen, draws a border around it. */
  157. void R_DrawViewBorder (void);
  158.  
  159.  
  160.  
  161. #endif
  162. /* ----------------------------------------------------------------------------- */
  163. /*  */
  164. /*  $Log:$ */
  165. /*  */
  166. /* ----------------------------------------------------------------------------- */
  167.