t3dlib10.h
上传用户:husern
上传日期:2018-01-20
资源大小:42486k
文件大小:26k
源码类别:

游戏

开发平台:

Visual C++

  1. // T3DLIB10.H - header file for T3DLIB10.H
  2. // watch for multiple inclusions
  3. #ifndef T3DLIB10
  4. #define T3DLIB10
  5. // DEFINES //////////////////////////////////////////////////////////////////
  6. // alpha blending defines
  7. #define NUM_ALPHA_LEVELS              8   // total number of alpha levels
  8. // perspective correct/ 1/z buffer defines
  9. #define FIXP28_SHIFT                  28  // used for 1/z buffering
  10. #define FIXP22_SHIFT                  22  // used for u/z, v/z perspective texture mapping
  11. // new attributes to support mip mapping
  12. #define POLY4DV2_ATTR_MIPMAP          0x0400 // flags if polygon has a mipmap
  13. #define OBJECT4DV2_ATTR_MIPMAP        0x0008 // flags if object has a mipmap
  14. ///////////////////////////////////////////////////////////////////////////////
  15. // defines that control the rendering function state attributes
  16. // note each class of control flags is contained within
  17. // a 4-bit nibble where possible, this helps with future expansion
  18. // no z buffering, polygons will be rendered as are in list
  19. #define RENDER_ATTR_NOBUFFER                     0x00000001  
  20. // use z buffering rasterization
  21. #define RENDER_ATTR_ZBUFFER                      0x00000002  
  22. // use 1/z buffering rasterization
  23. #define RENDER_ATTR_INVZBUFFER                   0x00000004  
  24. // use mipmapping
  25. #define RENDER_ATTR_MIPMAP                       0x00000010  
  26. // enable alpha blending and override
  27. #define RENDER_ATTR_ALPHA                        0x00000020  
  28. // enable bilinear filtering, but only supported for
  29. // constant shaded/affine textures
  30. #define RENDER_ATTR_BILERP                       0x00000040  
  31. // use affine texturing for all polys
  32. #define RENDER_ATTR_TEXTURE_PERSPECTIVE_AFFINE   0x00000100  
  33. // use perfect perspective texturing
  34. #define RENDER_ATTR_TEXTURE_PERSPECTIVE_CORRECT  0x00000200  
  35. // use linear piecewise perspective texturing
  36. #define RENDER_ATTR_TEXTURE_PERSPECTIVE_LINEAR   0x00000400  
  37. // use a hybrid of affine and linear piecewise based on distance
  38. #define RENDER_ATTR_TEXTURE_PERSPECTIVE_HYBRID1  0x00000800  
  39. // not implemented yet
  40. #define RENDER_ATTR_TEXTURE_PERSPECTIVE_HYBRID2  0x00001000  
  41. // TYPES ///////////////////////////////////////////////////////////////////
  42. // this is a new type to contain the "rendering context" RC, so
  43. // we don't have to keep passing more and more variables to the
  44. // rendering functions, we can fill this structure in with what we
  45. // need and then pass it as a whole
  46. typedef struct RENDERCONTEXTV1_TYP
  47. {
  48. int     attr;                 // all the rendering attributes
  49. RENDERLIST4DV2_PTR rend_list; // ptr to rendering list to render
  50. UCHAR  *video_buffer;         // ptr to video buffer to render to
  51. int     lpitch;               // memory pitch in bytes of video buffer       
  52. UCHAR  *zbuffer;              // ptr to z buffer or 1/z buffer
  53. int     zpitch;               // memory pitch in bytes of z or 1/z buffer
  54. int     alpha_override;       // alpha value to override ALL polys with
  55. int     mip_dist;             // maximum distance to divide up into 
  56.                               // mip levels
  57.                               // 0 - (NUM_ALPHA_LEVELS - 1)
  58. int     texture_dist,         // the distance to enable affine texturing
  59.         texture_dist2;        // when using hybrid perspective/affine mode
  60. // future expansion
  61. int     ival1, ivalu2;        // extra integers
  62. float   fval1, fval2;         // extra floats
  63. void    *vptr;                // extra pointer
  64. } RENDERCONTEXTV1, *RENDERCONTEXTV1_PTR;
  65. // CLASSES /////////////////////////////////////////////////////////////////
  66. // MACROS ///////////////////////////////////////////////////////////////////
  67. // EXTERNALS ///////////////////////////////////////////////////////////////
  68. // this table contains each possible RGB value multiplied by some scaler
  69. extern USHORT rgb_alpha_table[NUM_ALPHA_LEVELS][65536];  
  70. extern HWND main_window_handle; // save the window handle
  71. extern HINSTANCE main_instance; // save the instance
  72. // PROTOTYPES //////////////////////////////////////////////////////////////
  73. // z buffered versions
  74. void Draw_Textured_TriangleZB2_16(POLYF4DV2_PTR face,  // ptr to face
  75.                               UCHAR *_dest_buffer,  // pointer to video buffer
  76.                               int mem_pitch,        // bytes per line, 320, 640 etc.
  77.                               UCHAR *zbuffer,       // pointer to z-buffer
  78.                               int zpitch);          // bytes per line of zbuffer
  79. void Draw_Textured_Bilerp_TriangleZB_16(POLYF4DV2_PTR face,  // ptr to face
  80.                               UCHAR *_dest_buffer,  // pointer to video buffer
  81.                               int mem_pitch,        // bytes per line, 320, 640 etc.
  82.                               UCHAR *zbuffer,       // pointer to z-buffer
  83.                               int zpitch);          // bytes per line of zbuffer
  84. void Draw_Textured_TriangleFSZB2_16(POLYF4DV2_PTR face, // ptr to face
  85.                                  UCHAR *_dest_buffer,  // pointer to video buffer
  86.                                  int mem_pitch,        // bytes per line, 320, 640 etc.
  87.                                  UCHAR *zbuffer,       // pointer to z-buffer
  88.                                  int zpitch);          // bytes per line of zbuffer
  89. void Draw_Textured_TriangleGSZB_16(POLYF4DV2_PTR face,   // ptr to face
  90.                                  UCHAR *_dest_buffer, // pointer to video buffer
  91.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  92.                                  UCHAR *_zbuffer,     // pointer to z-buffer
  93.                                  int zpitch);         // bytes per line of zbuffer
  94. void Draw_Triangle_2DZB2_16(POLYF4DV2_PTR face, // ptr to face
  95.                            UCHAR *_dest_buffer, // pointer to video buffer
  96.                            int mem_pitch,       // bytes per line, 320, 640 etc.
  97.                            UCHAR *zbuffer,      // pointer to z-buffer
  98.                            int zpitch);         // bytes per line of zbuffer
  99. void Draw_Gouraud_TriangleZB2_16(POLYF4DV2_PTR face,   // ptr to face
  100.                               UCHAR *_dest_buffer,// pointer to video buffer
  101.                               int mem_pitch,      // bytes per line, 320, 640 etc.
  102.                               UCHAR *zbuffer,     // pointer to z-buffer
  103.                               int zpitch);        // bytes per line of zbuffer
  104. void Draw_RENDERLIST4DV2_SolidZB2_16(RENDERLIST4DV2_PTR rend_list, 
  105.                                    UCHAR *video_buffer, 
  106.            int lpitch,
  107.                                    UCHAR *zbuffer,
  108.                                    int zpitch);
  109. // 1/z versions
  110. void Draw_Textured_TriangleINVZB_16(POLYF4DV2_PTR face,  // ptr to face
  111.                               UCHAR *_dest_buffer,  // pointer to video buffer
  112.                               int mem_pitch,        // bytes per line, 320, 640 etc.
  113.                               UCHAR *zbuffer,       // pointer to z-buffer
  114.                               int zpitch);          // bytes per line of zbuffer
  115. void Draw_Textured_Bilerp_TriangleINVZB_16(POLYF4DV2_PTR face,  // ptr to face
  116.                               UCHAR *_dest_buffer,  // pointer to video buffer
  117.                               int mem_pitch,        // bytes per line, 320, 640 etc.
  118.                               UCHAR *zbuffer,       // pointer to z-buffer
  119.                               int zpitch);          // bytes per line of zbuffer
  120. void Draw_Textured_TriangleFSINVZB_16(POLYF4DV2_PTR face, // ptr to face
  121.                                  UCHAR *_dest_buffer,  // pointer to video buffer
  122.                                  int mem_pitch,        // bytes per line, 320, 640 etc.
  123.                                  UCHAR *zbuffer,       // pointer to z-buffer
  124.                                  int zpitch);          // bytes per line of zbuffer
  125. void Draw_Textured_TriangleGSINVZB_16(POLYF4DV2_PTR face,   // ptr to face
  126.                                  UCHAR *_dest_buffer, // pointer to video buffer
  127.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  128.                                  UCHAR *_zbuffer,     // pointer to z-buffer
  129.                                  int zpitch);         // bytes per line of zbuffer
  130. void Draw_Triangle_2DINVZB_16(POLYF4DV2_PTR face, // ptr to face
  131.                            UCHAR *_dest_buffer,  // pointer to video buffer
  132.                            int mem_pitch,        // bytes per line, 320, 640 etc.
  133.                            UCHAR *zbuffer,       // pointer to z-buffer
  134.                            int zpitch);          // bytes per line of zbuffer
  135. void Draw_Gouraud_TriangleINVZB_16(POLYF4DV2_PTR face,   // ptr to face
  136.                               UCHAR *_dest_buffer, // pointer to video buffer
  137.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  138.                               UCHAR *zbuffer,      // pointer to z-buffer
  139.                               int zpitch);         // bytes per line of zbuffer
  140. void Draw_Textured_Perspective_Triangle_INVZB_16(POLYF4DV2_PTR face,  // ptr to face
  141.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  142.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  143.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  144.                                                    int zpitch);         // bytes per line of zbuffer
  145. void Draw_Textured_Perspective_Triangle_FSINVZB_16(POLYF4DV2_PTR face,// ptr to face
  146.                                                    UCHAR *_dest_buffer,// pointer to video buffer
  147.                                                    int mem_pitch,      // bytes per line, 320, 640 etc.
  148.                                                    UCHAR *_zbuffer,    // pointer to z-buffer
  149.                                                    int zpitch);        // bytes per line of zbuffer
  150. void Draw_Textured_PerspectiveLP_Triangle_FSINVZB_16(POLYF4DV2_PTR face,// ptr to face
  151.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  152.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  153.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  154.                                                    int zpitch);         // bytes per line of zbuffer
  155. void Draw_Textured_PerspectiveLP_Triangle_INVZB_16(POLYF4DV2_PTR face,  // ptr to face
  156.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  157.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  158.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  159.                                                    int zpitch);         // bytes per line of zbuffer
  160. void Draw_RENDERLIST4DV2_SolidINVZB_16(RENDERLIST4DV2_PTR rend_list, 
  161.                                        UCHAR *video_buffer, 
  162.               int lpitch,
  163.                                        UCHAR *zbuffer,
  164.                                        int zpitch);
  165. // testing function
  166. void Draw_RENDERLIST4DV2_Hybrid_Textured_SolidINVZB_16(RENDERLIST4DV2_PTR rend_list, 
  167.                                    UCHAR *video_buffer, 
  168.            int lpitch,
  169.                                    UCHAR *zbuffer,
  170.                                    int zpitch,
  171.                                    float dist1, float dist2);
  172. // z buffered and alpha
  173. void Draw_Textured_TriangleZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  174.                               UCHAR *_dest_buffer, // pointer to video buffer
  175.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  176.                               UCHAR *zbuffer,      // pointer to z-buffer
  177.                               int zpitch,          // bytes per line of zbuffer
  178.                               int alpha);
  179. void Draw_Textured_TriangleFSZB_Alpha16(POLYF4DV2_PTR face, // ptr to face
  180.                                  UCHAR *_dest_buffer, // pointer to video buffer
  181.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  182.                                  UCHAR *zbuffer,      // pointer to z-buffer
  183.                                  int zpitch,          // bytes per line of zbuffer
  184.                                  int alpha);
  185. void Draw_Textured_TriangleGSZB_Alpha16(POLYF4DV2_PTR face,   // ptr to face
  186.                                  UCHAR *_dest_buffer, // pointer to video buffer
  187.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  188.                                  UCHAR *_zbuffer,     // pointer to z-buffer
  189.                                  int zpitch,          // bytes per line of zbuffer
  190.                                  int alpha);
  191. void Draw_Triangle_2DZB_Alpha16(POLYF4DV2_PTR face, // ptr to face
  192.                            UCHAR *_dest_buffer, // pointer to video buffer
  193.                            int mem_pitch,       // bytes per line, 320, 640 etc.
  194.                            UCHAR *zbuffer,      // pointer to z-buffer
  195.                            int zpitch,          // bytes per line of zbuffer
  196.                            int alpha);
  197. void Draw_Gouraud_TriangleZB_Alpha16(POLYF4DV2_PTR face,   // ptr to face
  198.                               UCHAR *_dest_buffer, // pointer to video buffer
  199.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  200.                               UCHAR *zbuffer,      // pointer to z-buffer
  201.                               int zpitch,          // bytes per line of zbuffer
  202.                               int alpha);
  203. void Draw_RENDERLIST4DV2_SolidZB_Alpha16(RENDERLIST4DV2_PTR rend_list, 
  204.                                    UCHAR *video_buffer, 
  205.            int lpitch,
  206.                                    UCHAR *zbuffer,
  207.                                    int zpitch,
  208.                                    int alpha_override);
  209.                                   
  210. // 1/z buffered and alpha
  211. void Draw_Textured_TriangleINVZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  212.                               UCHAR *_dest_buffer, // pointer to video buffer
  213.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  214.                               UCHAR *zbuffer,      // pointer to z-buffer
  215.                               int zpitch,          // bytes per line of zbuffer
  216.                               int alpha);
  217. void Draw_Textured_TriangleFSINVZB_Alpha16(POLYF4DV2_PTR face, // ptr to face
  218.                                  UCHAR *_dest_buffer, // pointer to video buffer
  219.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  220.                                  UCHAR *zbuffer,      // pointer to z-buffer
  221.                                  int zpitch,          // bytes per line of zbuffer
  222.                                  int alpha);
  223. void Draw_Textured_TriangleGSINVZB_Alpha16(POLYF4DV2_PTR face,   // ptr to face
  224.                                  UCHAR *_dest_buffer, // pointer to video buffer
  225.                                  int mem_pitch,       // bytes per line, 320, 640 etc.
  226.                                  UCHAR *_zbuffer,     // pointer to z-buffer
  227.                                  int zpitch,          // bytes per line of zbuffer
  228.                                  int alpha);
  229. void Draw_Triangle_2DINVZB_Alpha16(POLYF4DV2_PTR face, // ptr to face
  230.                            UCHAR *_dest_buffer, // pointer to video buffer
  231.                            int mem_pitch,       // bytes per line, 320, 640 etc.
  232.                            UCHAR *zbuffer,      // pointer to z-buffer
  233.                            int zpitch,          // bytes per line of zbuffer
  234.                            int alpha);
  235. void Draw_Gouraud_TriangleINVZB_Alpha16(POLYF4DV2_PTR face,   // ptr to face
  236.                               UCHAR *_dest_buffer, // pointer to video buffer
  237.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  238.                               UCHAR *zbuffer,      // pointer to z-buffer
  239.                               int zpitch,          // bytes per line of zbuffer
  240.                               int alpha);
  241. void Draw_Textured_Perspective_Triangle_INVZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  242.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  243.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  244.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  245.                                                    int zpitch,          // bytes per line of zbuffer
  246.                                                    int alpha);
  247. void Draw_Textured_PerspectiveLP_Triangle_INVZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  248.                                                         UCHAR *_dest_buffer, // pointer to video buffer
  249.                                                         int mem_pitch,       // bytes per line, 320, 640 etc.
  250.                                                         UCHAR *_zbuffer,     // pointer to z-buffer
  251.                                                         int zpitch,          // bytes per line of zbuffer
  252.                                                         int alpha);
  253. void Draw_Textured_Perspective_Triangle_FSINVZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  254.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  255.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  256.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  257.                                                    int zpitch,          // bytes per line of zbuffer
  258.                                                    int alpha);
  259. void Draw_Textured_PerspectiveLP_Triangle_FSINVZB_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  260.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  261.                                                    int mem_pitch,       // bytes per line, 320, 640 etc.
  262.                                                    UCHAR *_zbuffer,     // pointer to z-buffer
  263.                                                    int zpitch,          // bytes per line of zbuffer
  264.                                                    int alpha);
  265. void Draw_RENDERLIST4DV2_SolidINVZB_Alpha16(RENDERLIST4DV2_PTR rend_list, 
  266.                                    UCHAR *video_buffer, 
  267.            int lpitch,
  268.                                    UCHAR *zbuffer,
  269.                                    int zpitch,
  270.                                    int alpha_override);
  271. // non zbuffered versions
  272. void Draw_Textured_Triangle2_16(POLYF4DV2_PTR face, // ptr to face
  273.                               UCHAR *_dest_buffer,  // pointer to video buffer
  274.                               int mem_pitch);       // bytes per line, 320, 640 etc.
  275. void Draw_Textured_Bilerp_Triangle_16(POLYF4DV2_PTR face, // ptr to face
  276.                                       UCHAR *_dest_buffer,  // pointer to video buffer
  277.                                       int mem_pitch);       // bytes per line, 320, 640 etc.
  278. void Draw_Textured_TriangleFS2_16(POLYF4DV2_PTR face, // ptr to face
  279.                                  UCHAR *_dest_buffer, // pointer to video buffer
  280.                                  int mem_pitch);      // bytes per line, 320, 640 etc.
  281. void Draw_Triangle_2D3_16(POLYF4DV2_PTR face,  // ptr to face
  282.                            UCHAR *_dest_buffer,// pointer to video buffer
  283.                            int mem_pitch);     // bytes per line, 320, 640 etc.
  284. void Draw_Gouraud_Triangle2_16(POLYF4DV2_PTR face, // ptr to face
  285.                               UCHAR *_dest_buffer, // pointer to video buffer
  286.                               int mem_pitch);      // bytes per line, 320, 640 etc.
  287. void Draw_Textured_TriangleGS_16(POLYF4DV2_PTR face,  // ptr to face
  288.                                  UCHAR *_dest_buffer, // pointer to video buffer
  289.                                  int mem_pitch);      // bytes per line, 320, 640 etc.
  290. void Draw_Textured_Perspective_Triangle_16(POLYF4DV2_PTR face,  // ptr to face
  291.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  292.                                                    int mem_pitch);      // bytes per line, 320, 640 etc.
  293. void Draw_Textured_PerspectiveLP_Triangle_16(POLYF4DV2_PTR face,  // ptr to face
  294.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  295.                                                    int mem_pitch);      // bytes per line, 320, 640 etc.
  296. void Draw_Textured_Perspective_Triangle_FS_16(POLYF4DV2_PTR face,  // ptr to face
  297.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  298.                                                    int mem_pitch);      // bytes per line, 320, 640 etc.
  299. void Draw_Textured_PerspectiveLP_Triangle_FS_16(POLYF4DV2_PTR face,  // ptr to face
  300.                                                    UCHAR *_dest_buffer, // pointer to video buffer
  301.                                                    int mem_pitch);      // bytes per line, 320, 640 etc.
  302. void Draw_RENDERLIST4DV2_Solid2_16(RENDERLIST4DV2_PTR rend_list, 
  303.                                    UCHAR *video_buffer, 
  304.            int lpitch);
  305. // alpha versions, non-z buffered
  306. int RGB_Alpha_Table_Builder(int num_alpha_levels,   // number of levels to create
  307.                             USHORT rgb_alpha_table[NUM_ALPHA_LEVELS][65536]); // lookup table
  308. void Draw_Triangle_2D_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  309.                               UCHAR *_dest_buffer, // pointer to video buffer
  310.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  311.                               int alpha);
  312. void Draw_Textured_Triangle_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  313.                               UCHAR *_dest_buffer,  // pointer to video buffer
  314.                               int mem_pitch,        // bytes per line, 320, 640 etc.
  315.                               int alpha);
  316. void Draw_Textured_TriangleFS_Alpha16(POLYF4DV2_PTR face, // ptr to face
  317.                                  UCHAR *_dest_buffer,  // pointer to video buffer
  318.                                  int mem_pitch,        // bytes per line, 320, 640 etc.
  319.                                  int alpha);
  320. void Draw_Textured_TriangleGS_Alpha16(POLYF4DV2_PTR face,  // ptr to face
  321.                                       UCHAR *_dest_buffer, // pointer to video buffer
  322.                                       int mem_pitch,       // bytes per line, 320, 640 etc.
  323.                                       int alpha);
  324. void Draw_Gouraud_Triangle_Alpha16(POLYF4DV2_PTR face,   // ptr to face
  325.                               UCHAR *_dest_buffer, // pointer to video buffer
  326.                               int mem_pitch,       // bytes per line, 320, 640 etc.
  327.                               int alpha);
  328. void Draw_RENDERLIST4DV2_Solid_Alpha16(RENDERLIST4DV2_PTR rend_list, 
  329.                                    UCHAR *video_buffer, 
  330.            int lpitch, 
  331.                                    int alpha_override);
  332. // new rendering function that works for everything!!! yaaa!!!!!
  333. void Draw_RENDERLIST4DV2_RENDERCONTEXTV1_16(RENDERCONTEXTV1_PTR rc);
  334. void Transform_RENDERLIST4DV2(RENDERLIST4DV2_PTR rend_list, // render list to transform
  335.                               MATRIX4X4_PTR mt,   // transformation matrix
  336.                               int coord_select);   // selects coords to transform
  337. // new model functions 
  338. int Load_OBJECT4DV2_COB2(OBJECT4DV2_PTR obj, // pointer to object
  339.                          char *filename,     // filename of Caligari COB file
  340.                          VECTOR4D_PTR scale, // initial scaling factors
  341.                          VECTOR4D_PTR pos,   // initial position
  342.                          VECTOR4D_PTR rot,   // initial rotations
  343.                          int vertex_flags,   // flags to re-order vertices 
  344.                                              // and perform transforms
  345.                          int mipmap=0);      // mipmap enable flag
  346.                                              // 0 means no mipmap, 1 means
  347.                                              // generate mip map
  348. int Generate_Terrain2_OBJECT4DV2(OBJECT4DV2_PTR obj,   // pointer to object
  349.                                 float twidth,          // width in world coords on x-axis
  350.                                 float theight,         // height (length) in world coords on z-axis
  351.                                 float vscale,          // vertical scale of terrain
  352.                                 char *height_map_file, // filename of height bitmap encoded in 256 colors
  353.                                 char *texture_map_file,// filename of texture map
  354.                                 int rgbcolor,          // color of terrain if no texture        
  355.                                 VECTOR4D_PTR pos,      // initial position
  356.                                 VECTOR4D_PTR rot,      // initial rotations
  357.                                 int poly_attr,         // the shading attributes we would like
  358.                                 float sea_level=-1,    // height of sea level
  359.                                 int alpha=-1);         // alpha level for sea polygons 
  360. // new directdraw functions
  361. int DDraw_Init2(int width, int height, int bpp, int windowed, int backbuffer_enable = 1);
  362. int DDraw_Flip2(void);
  363. // mip mapping functions
  364. int Generate_Mipmaps(BITMAP_IMAGE_PTR source, BITMAP_IMAGE_PTR *mipmaps, float gamma = 1.01);
  365. int Delete_Mipmaps(BITMAP_IMAGE_PTR *mipmaps, int leave_level_0);
  366. #endif