/* This File Automatically Generated by the build system */ 
#include <dev2d.h> 
#ifndef __G2_H 
#define  __G2_H 
#pragma once 
/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/icanvas.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 10:03:08 $
 *
 * Symbolic constants for function table references.
 *
 * This file is part of the g2 library.
 *
 */

/* here are the indices for all the indirected driver functions. */
enum {
   G2C_ULINE,
   G2C_ULINE_EXPOSE,
   G2C_USLINE,
   G2C_USLINE_EXPOSE,
   G2C_UCLINE,
   G2C_UCLINE_EXPOSE,

   G2C_USCALE,
   G2C_USCALE_EXPOSE,
   G2C_SCALE,
   G2C_SCALE_EXPOSE,

   G2C_UPOLY,
   G2C_UPOLY_EXPOSE,
   G2C_USPOLY,
   G2C_USPOLY_EXPOSE,
   G2C_UCPOLY,
   G2C_UCPOLY_EXPOSE,

   G2C_ULMAP,
   G2C_ULMAP_EXPOSE,
   G2C_UWMAP,
   G2C_UWMAP_EXPOSE,
   G2C_UFMAP,
   G2C_UFMAP_EXPOSE,
   G2C_UPMAP,
   G2C_UPMAP_EXPOSE,

   G2C_LIT_ULMAP,
   G2C_LIT_ULMAP_EXPOSE,
   G2C_LIT_UWMAP,
   G2C_LIT_UWMAP_EXPOSE,
   G2C_LIT_UFMAP,
   G2C_LIT_UFMAP_EXPOSE,
   G2C_LIT_UPMAP,
   G2C_LIT_UPMAP_EXPOSE,

   G2C_TYPES
};

/*
 * $Source: x:/prj/tech/libsrc/g2/RCS/plytyp.h $
 * $Revision: 1.2 $
 * $Author: KEVIN $
 * $Date: 1997/10/01 13:37:00 $
 *
 * Polygon-related structures.
 *
 * This file is part of the g2 library.
 *
 */

/* format for vertex buffers. */
typedef struct grs_vertex {
   fix x, y;                  /* screen coordinates */
   fix u, v, w;               /* texture parameters/rgb */
   fix i;                     /* intensity */
} grs_vertex;

// $Header: x:/prj/tech/libsrc/g2/RCS/g2spoint.h 1.2 1997/01/31 13:34:22 KEVIN Exp $
//
// 2d point structure for polygons.

typedef struct g2s_point {
   fix sx, sy;
   float w;
   ulong flags;
   union {
      float coord[32];
      struct {
         float i,u,v,h,d;
      };
   };
} g2s_point; // 140 bytes.  ick.

// $Header: x:/prj/tech/libsrc/g2/RCS/scancvt.h 1.1 1998/03/03 12:13:30 KEVIN Exp $

#define G2C_MAX_HEIGHT 768

extern void g2_reset_scan_buffer(void);
extern void g2_scan_convert(g2s_point *p1, g2s_point *p2);
extern void g2_get_scan_conversion(int *y_min, int *y_max, int (**xdata)[G2C_MAX_HEIGHT][2]);
extern void g2_reset_scan_buffer(void);

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/sftype.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 09:59:51 $
 *
 * This file is part of the g2 library.
 *
 */

typedef void (g2us_func)(grs_bitmap *bm, int x, int y, int w, int h);
typedef g2us_func *g2us_func_p;
typedef g2us_func_p (g2us_expose_func)(grs_bitmap *bm, int x, int y, int w, int h);

typedef int (g2s_func)(grs_bitmap *bm, int x, int y, int w, int h);
typedef g2s_func *g2s_func_p;
typedef g2s_func_p (g2s_expose_func)(grs_bitmap *bm, int x, int y, int w, int h);

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/lftype.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 10:03:47 $
 *
 * Constants for bitmap flags & type fields; prototypes for bitmap
 * functions.
 *
 * This file is part of the g2 library.
 *
 */

typedef void (g2ul_func)(grs_vertex *v0, grs_vertex *v1);
typedef g2ul_func *g2ul_func_p;
typedef g2ul_func_p (g2ul_expose_func)(grs_vertex *v0, grs_vertex *v1);

typedef int (g2l_func)(grs_vertex *v0, grs_vertex *v1);
typedef g2l_func *g2l_func_p;
typedef g2l_func_p (g2l_expose_func)(grs_vertex *v0, grs_vertex *v1);

enum {
   G2C_CLIP_LINE,
   G2C_CLIP_SLINE,
   G2C_CLIP_CLINE,
   G2C_CLIP_LINE_TYPES
};

// $Header: x:/prj/tech/libsrc/g2/RCS/tftype.h 1.2 1997/05/16 09:38:47 KEVIN Exp $

typedef void (tmap_setup_func)(grs_bitmap *bm, void (*)(grs_bitmap *));
typedef tmap_setup_func *ptmap_setup_func;

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/pftype.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 09:57:12 $
 *
 * This file is part of the g2 library.
 *
 */

typedef void (g2up_func)(int c, int n, grs_vertex **vpl);
typedef g2up_func *g2up_func_p;
typedef g2up_func_p (g2up_expose_func)(int c, int n, grs_vertex **vpl);

typedef int (g2p_func)(int c, int n, grs_vertex **vpl);
typedef g2p_func *g2p_func_p;
typedef g2p_func_p (g2p_expose_func)(int c, int n, grs_vertex **vpl);

// $Header: x:/prj/tech/libsrc/g2/RCS/g2d.h 1.4 1998/07/04 13:13:02 PATMAC Exp $

EXTERN bool g2d_error_dither;
EXTERN long g2d_dryness_mask_list[];    // 0 if just a palette, otherwise 0xffffffff
EXTERN uchar *g2d_dryness_table_list[];
EXTERN int g2d_dryness_table_size;     // nuber of rows
EXTERN uchar *g2d_haze_table;
EXTERN int g2d_haze_table_size;        // nuber of rows

EXTERN void (**g2d_canvas_table)();

EXTERN void (**g2d_flat8_canvas_table)();
EXTERN void (**g2d_flat16_canvas_table)();
EXTERN void (**g2d_flat24_canvas_table)();
EXTERN void (**g2d_gen_canvas_table)();

EXTERN void (*g2d_default_flat8_canvas_table[])();
EXTERN void (*g2d_default_flat16_canvas_table[])();
EXTERN void (*g2d_default_flat24_canvas_table[])();
EXTERN void (*g2d_default_gen_canvas_table[])();

#define gr_set_dither(_d) (g2d_error_dither = (_d))

// $Header: x:/prj/tech/libsrc/g2/RCS/g2clip.h 1.4 1997/02/04 11:23:45 KEVIN Exp $

enum {
   G2C_CLIP_NONE,
   G2C_CLIP_I,
   G2C_CLIP_RGB,
   G2C_CLIP_UV,  
   G2C_CLIP_UVI, 
   G2C_CLIP_UVW, 
   G2C_CLIP_UVWI,
   G2C_CLIP_UVWIH,
};

extern void g2_clip_fixup(int n, g2s_point **vpl);
extern int g2_clip_poly(int n, int flags, g2s_point **vpl, g2s_point ***pcvpl);
extern int g2_clip_polygon(int n, int flags, grs_vertex **vpl, grs_vertex ***pcvpl);

/*
 *  $Source: x:/prj/tech/libsrc/g2/RCS/grlin.h $
 *  $Revision: 1.4 $
 *  $Author: PATMAC $
 *  $Date: 1998/07/04 13:14:37 $
 */

#define gr_uline \
   ((g2ul_func *)(g2d_canvas_table[G2C_ULINE]))
#define gr_uline_expose \
   ((g2ul_expose_func *)(g2d_canvas_table[G2C_ULINE_EXPOSE]))
#define gr_usline \
   ((g2ul_func *)(g2d_canvas_table[G2C_USLINE]))
#define gr_usline_expose \
   ((g2ul_expose_func *)(g2d_canvas_table[G2C_USLINE_EXPOSE]))
#define gr_ucline \
   ((g2ul_func *)(g2d_canvas_table[G2C_UCLINE]))
#define gr_ucline_expose \
   ((g2ul_expose_func *)(g2d_canvas_table[G2C_UCLINE_EXPOSE]))

EXTERN int gr_line_opt_type(grs_vertex *v0, grs_vertex *v1, g2ul_func *lfunc, int type);
#define gr_line(_v0, _v1) \
   gr_line_opt_type(_v0, _v1, gr_uline_expose(_v0, _v1), G2C_CLIP_LINE)
#define gr_sline(_v0, _v1) \
   gr_line_opt_type(_v0, _v1, gr_usline_expose(_v0, _v1), G2C_CLIP_SLINE)
#define gr_cline(_v0, _v1) \
   gr_line_opt_type(_v0, _v1, gr_ucline_expose(_v0, _v1), G2C_CLIP_CLINE)

#define gr_fix_line(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_line(&_v0, &_v1);             \
} while (0)

#define gr_fix_uline(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_uline(&_v0, &_v1);            \
} while (0)

#define gr_fix_sline(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_sline(&_v0, &_v1);            \
} while (0)

#define gr_fix_usline(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_usline(&_v0, &_v1);           \
} while (0)

#define gr_fix_cline(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_cline(&_v0, &_v1);            \
} while (0)

#define gr_fix_ucline(_x0,_y0,_x1,_y1) \
do {                                \
   grs_vertex _v0, _v1;             \
   _v0.x = (_x0); _v0.y = (_y0);    \
   _v1.x = (_x1); _v1.y = (_y1);    \
   gr_ucline(&_v0, &_v1);           \
} while (0)

#define gr_int_line(x0, y0, x1, y1) \
   gr_fix_line(fix_make(x0,0), fix_make(y0,0),  \
               fix_make(x1,0), fix_make(y1,0))

#define gr_int_uline(x0, y0, x1, y1) \
   gr_fix_uline(fix_make(x0,0), fix_make(y0,0), \
               fix_make(x1,0), fix_make(y1,0))

#define gr_int_sline(x0, y0, x1, y1) \
   gr_fix_sline(fix_make(x0,0), fix_make(y0,0), \
               fix_make(x1,0), fix_make(y1,0))

#define gr_int_usline(x0, y0, x1, y1) \
   gr_fix_usline(fix_make(x0,0), fix_make(y0,0), \
               fix_make(x1,0), fix_make(y1,0))

#define gr_int_cline(x0, y0, x1, y1) \
   gr_fix_cline(fix_make(x0,0), fix_make(y0,0), \
               fix_make(x1,0), fix_make(y1,0))

#define gr_int_ucline(x0, y0, x1, y1) \
   gr_fix_ucline(fix_make(x0,0), fix_make(y0,0), \
               fix_make(x1,0), fix_make(y1,0))

// $Header: x:/prj/tech/libsrc/g2/RCS/grtm.h 1.5 1997/05/16 10:15:38 KEVIN Exp $

extern int gr_lin_map(grs_bitmap *bm, int n, grs_vertex **vpl);
extern void gr_lin_umap(grs_bitmap *bm, int n, grs_vertex **vpl);
extern int gr_clut_lin_map(grs_bitmap *bm, int n, grs_vertex **vpl, uchar *clut);
extern void gr_clut_lin_umap(grs_bitmap *bm, int n, grs_vertex **vpl, uchar *clut);
extern int gr_lit_lin_map(grs_bitmap *bm, int n, grs_vertex **vpl);
extern void gr_lit_lin_umap(grs_bitmap *bm, int n, grs_vertex **vpl);
extern int gr_per_map(grs_bitmap *bm, int n, grs_vertex **vpl);
extern void gr_per_umap(grs_bitmap *bm, int n, grs_vertex **vpl);
extern int gr_clut_per_map(grs_bitmap *bm, int n, grs_vertex **vpl, uchar *clut);
extern void gr_clut_per_umap(grs_bitmap *bm, int n, grs_vertex **vpl, uchar *clut);
extern int gr_lit_per_map(grs_bitmap *bm, int n, grs_vertex **vpl);
extern void gr_lit_per_umap(grs_bitmap *bm, int n, grs_vertex **vpl);

extern int gr_rotate_bitmap(grs_bitmap *bm, fixang theta, fix x, fix y);
extern int gr_rotate_bitmap_90(grs_bitmap *bm, int x, int y);
extern int gr_rotate_bitmap_180(grs_bitmap *bm, int x, int y);
extern int gr_rotate_bitmap_270(grs_bitmap *bm, int x, int y);

#define gr_flat8_clut_lin_umap gr_clut_lin_umap
#define gr_blend_lin_umap gr_lin_umap
#define gr_blend_lin_map gr_lin_map

#define gr_set_per_detail_level(l)
#define gr_set_clut_lit_tol(l)

/*
 * $Source: x:/prj/tech/libsrc/g2/RCS/grcurv.h $
 * $Revision: 1.2 $
 * $Author: PATMAC $
 * $Date: 1998/07/04 13:14:32 $
 *
 * Dispatch macros for curve functions.
 *
 * This file is part of the g2 library.
 *
 */

/* radii are scaled to FIX_UNIT = full canvas width */

EXTERN int g2_circle(fix x0, fix y0, fix r);
#define gr_circle g2_circle
#define gr_int_circle(x0, y0, r) \
   g2_circle(fix_make(x0,0), fix_make(y0,0), fix_div(r,320))
#define gr_fix_circle(x0, y0, r) \
   g2_circle(x0, y0, (r)/320)

EXTERN int g2_disk(fix x0, fix y0, fix r);
#define gr_disk g2_disk
#define gr_int_disk(x0, y0, r) \
   g2_disk(fix_make(x0,0), fix_make(y0,0), fix_div(r,320))
#define gr_fix_disk(x0, y0, r) \
   g2_disk(x0, y0, (r)/320)

EXTERN int g2_ring(fix x0, fix y0, fix ro, fix ri);
#define gr_ring g2_ring
#define gr_int_ring(x0, y0, ro, ri) \
   g2_ring(fix_make(x0,0), fix_make(y0,0), fix_div(ro,320), fix_div(ri,320))
#define gr_fix_ring(x0, y0, ro, ri) \
   g2_ring(x0, y0, (ro)/320, (ri)/320)

/* a and b are in pixels */
EXTERN int g2_elipse(fix x0, fix y0, fix a, fix b);
#define gr_elipse g2_elipse
#define gr_fix_elipse g2_elipse
#define gr_int_elipse(x0, y0, a, b) \
   g2_elipse(fix_make(x0,0), fix_make(y0,0), fix_make(a,0), fix_make(b,0))

EXTERN int g2_oval(fix x0, fix y0, fix a, fix b);
#define gr_oval g2_oval
#define gr_fix_oval g2_oval
#define gr_int_oval(x0, y0, a, b) \
   g2_oval(fix_make(x0,0), fix_make(y0,0), fix_make(a,0), fix_make(b,0))

#define gr_int_uring gr_int_ring
#define gr_fix_uring gr_fix_ring
#define gr_int_ucircle gr_int_circle
#define gr_fix_ucircle gr_fix_circle
#define gr_int_udisk gr_int_disk
#define gr_fix_udisk gr_fix_disk
#define gr_int_uelipse gr_int_elipse
#define gr_fix_uelipse gr_fix_elipse
#define gr_int_uoval gr_int_oval
#define gr_fix_uoval gr_fix_oval

// $Header: x:/prj/tech/libsrc/g2/RCS/grply.h 1.2 1996/11/07 17:29:30 KEVIN Exp $

extern int g2_poly_area(int n, g2s_point **ppl);

#define gr_upoly \
   ((g2up_func *)(g2d_canvas_table[G2C_UPOLY]))
#define gr_upoly_expose \
   ((g2up_expose_func *)(g2d_canvas_table[G2C_UPOLY_EXPOSE]))

#define gr_uspoly \
   ((g2up_func *)(g2d_canvas_table[G2C_USPOLY]))
#define gr_uspoly_expose \
   ((g2up_expose_func *)(g2d_canvas_table[G2C_USPOLY_EXPOSE]))

#define gr_ucpoly \
   ((g2up_func *)(g2d_canvas_table[G2C_UCPOLY]))
#define gr_ucpoly_expose \
   ((g2up_expose_func *)(g2d_canvas_table[G2C_UCPOLY_EXPOSE]))

extern int gr_poly(int c, int n, grs_vertex **vpl);
extern int gr_spoly(int c, int n, grs_vertex **vpl);
extern int gr_cpoly(int c, int n, grs_vertex **vpl);
#define gr_wire_poly gr_poly
#define gr_wire_upoly gr_upoly
#define gr_tluc8_upoly(c, n, vpl) \
do {                                      \
   if (gr_get_fill_type() == FILL_NORM) { \
      gr_set_fill_type(FILL_BLEND);       \
      gr_upoly(c, n, vpl);                \
      gr_set_fill_type(FILL_NORM);        \
   }                                      \
} while (0)
#define gr_tluc8_poly(c, n, vpl) \
do {                                      \
   if (gr_get_fill_type() == FILL_NORM) { \
      gr_set_fill_type(FILL_BLEND);       \
      gr_poly(c, n, vpl);                 \
      gr_set_fill_type(FILL_NORM);        \
   }                                      \
} while (0)

/*
 * $Source: x:/prj/tech/libsrc/g2/RCS/grscale.h $
 * $Revision: 1.4 $
 * $Author: PATMAC $
 * $Date: 1998/07/04 13:14:39 $
 *
 * Dispatch macros for rendering functions.
 *
 * This file is part of the g2 library.
 *
 */

#define gr_scale_bitmap \
    ((g2s_func *)(g2d_canvas_table[G2C_SCALE]))
#define gr_scale_bitmap_expose \
    ((g2s_expose_func *)(g2d_canvas_table[G2C_SCALE_EXPOSE]))
#define gr_scale_ubitmap \
    ((g2us_func *)(g2d_canvas_table[G2C_USCALE]))
#define gr_scale_ubitmap_expose \
    ((g2us_expose_func *)(g2d_canvas_table[G2C_USCALE_EXPOSE]))

#define gr_clut_scale_bitmap(bm, x, y, w, h, clut) \
do {                                      \
   if (gr_get_fill_type() == FILL_NORM) { \
      int __fp = gr_get_fill_parm();      \
      gr_set_fill_type(FILL_CLUT);        \
      gr_set_fill_parm(clut);             \
      gr_scale_bitmap(bm, x, y, w, h);    \
      gr_set_fill_type(FILL_NORM);        \
      gr_set_fill_parm(__fp);             \
   } else {                               \
      gr_scale_bitmap(bm, x, y, w, h);    \
   }                                      \
} while (0)

#define gr_scale_hflip_ubitmap(bm, x, y, w, h) \
do {                                           \
   int __w = w;                                \
   gr_scale_ubitmap(bm, x+__w, y, -__w, h);    \
} while (0)                                    

#define gr_scale_hflip_bitmap(bm, x, y, w, h) \
do {                                          \
   int __w = w;                               \
   gr_scale_bitmap(bm, x+__w, y, -__w, h);    \
} while (0)                                    

#define gr_hflip_ubitmap(bm, x, y)   \
do {                                 \
   grs_bitmap *__bm=bm;              \
   gr_scale_hflip_ubitmap(__bm, x,   \
      y, __bm->w, __bm->h);          \
} while (0)                                    

#define gr_hflip_bitmap(bm, x, y)    \
do {                                 \
   grs_bitmap *__bm=bm;              \
   gr_scale_hflip_bitmap(__bm, x,    \
      y, __bm->w, __bm->h);          \
} while (0)                                    

EXTERN fix gr_scale_check_occlusion(grs_bitmap *bm, int x, int y, int w, int h);
EXTERN int gr_inv_tluc8_scale_bitmap(grs_bitmap *bm, int x, int y, int w, int h);

// $Header: x:/prj/tech/libsrc/g2/RCS/g2tm.h 1.2 1998/07/04 13:14:02 PATMAC Exp $

EXTERN int g2_map(int n, g2s_point **ppl);
EXTERN int g2_umap(int n, g2s_point **ppl);
EXTERN int g2_per_map(int n, g2s_point **ppl);
EXTERN int g2_per_umap(int n, g2s_point **ppl);
EXTERN int g2_draw_poly_func(int n, g2s_point **ppl);

EXTERN void g2_lin_map_setup(grs_bitmap *bm);
EXTERN void g2_lit_lin_map_setup(grs_bitmap *bm);
EXTERN void g2_lin_umap_setup(grs_bitmap *bm);
EXTERN void g2_lit_lin_umap_setup(grs_bitmap *bm);
EXTERN void g2_per_map_setup(grs_bitmap *bm);
EXTERN void g2_lit_per_map_setup(grs_bitmap *bm);
EXTERN void g2_per_umap_setup(grs_bitmap *bm);
EXTERN void g2_lit_per_umap_setup(grs_bitmap *bm);
EXTERN void g2_poly_setup(grs_bitmap *bm);
EXTERN void g2_spoly_setup(grs_bitmap *bm);
EXTERN void g2_cpoly_setup(grs_bitmap *bm);
EXTERN void g2_upoly_setup(grs_bitmap *bm);
EXTERN void g2_uspoly_setup(grs_bitmap *bm);
EXTERN void g2_ucpoly_setup(grs_bitmap *bm);
EXTERN void g2_poly_setup_null(grs_bitmap *bm);

/*
 * $Source: x:/prj/tech/libsrc/g2/RCS/init.h $
 * $Revision: 1.4 $
 * $Author: KEVIN $
 * $Date: 1996/08/29 11:09:09 $
 *
 * This file is part of the g2 library.
 *
 */

extern int g2_init();
extern int g2_svga_init();

#ifdef __DOS4G
#define gr_init g2_svga_init
#else
#define gr_init g2_init
#endif

extern int g2_close();
#define gr_close g2_close

// obsolete
#define g2_com_init g2_init
#define gr_com_init g2_init
#define gr_tnova_init g2_svga_init
#define gr_flight_init g2_svga_init
#define gr_flat8_init g2_svga_init
#define gr_vga_init g2_svga_init

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/buffer.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 10:01:08 $
 *
 * Prototypes for 2d temporary storage management.
 *
 * This file is part of the g2 library.
 */

#define gr_alloc_temp temp_malloc
#define gr_free_temp temp_free

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/blnfcn.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 10:01:00 $
 *
 * prototypes and for the blend system
 *
 * This file is part of the g2 libarary.
 *
 */

/* prototypes for blend table maintenance, TRUE means success, FALSE not */
extern bool gr_free_blend(void);
/* tab_cnt is how many blend steps, note cnt<=0 is equivalent to calling
   free blend */
extern bool gr_init_blend(int log_blend_levels);
/* returns TRUE if a memory error occured. */
extern int gr_source_blend_enable();
extern void gr_source_blend_disable();
extern bool grd_source_blend_enabled;

#define GRC_NOT_WATER 16

typedef struct {
   int horizon;
   uchar **clut_list;
   int *offset_table;
} grs_water;

extern void gr_water_floor_umap(grs_bitmap *bm, int n, grs_vertex **vpl, grs_water *w);

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/grchkply.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 09:41:29 $
 *
 * Declarations for polygon extent checking routines.
 * Legacy code for tn.
 */

extern int gr_check_poly_y_min(int n,grs_vertex **vpl,long *h_buf);
   
/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/setdrv.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 09:59:36 $
 * 
 * This file is part of the g2 library.
 *
 */

extern void g2_use_default_drivers();
extern void g2_use_generic_drivers();

/*
 * $Source: s:/prj/tech/libsrc/g2/RCS/frame.h $
 * $Revision: 1.1 $
 * $Author: KEVIN $
 * $Date: 1996/04/11 09:55:31 $
 *
 * Dispatch macros for solid polygon routines.
 *
 * This file is part of the g2 library.
 *
 */

extern void gr_start_frame();
extern void gr_end_frame();

// $Header: x:/prj/tech/libsrc/g2/RCS/point.h 1.2 1997/02/07 12:55:11 KEVIN Exp $
extern int gr_draw_point(int c, g2s_point *p);

#endif /* __G2_H */ 
