GRDEF.H 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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/2d/rcs/grdef.h $
  15. * $Revision: 1.9 $
  16. * $Author: john $
  17. * $Date: 1995/03/01 12:31:13 $
  18. *
  19. * Internal definitions for graphics lib.
  20. *
  21. * $Log: grdef.h $
  22. * Revision 1.9 1995/03/01 12:31:13 john
  23. * Added wait for retrace thingy in modex setstart.
  24. *
  25. * Revision 1.8 1994/05/06 12:50:09 john
  26. * Added supertransparency; neatend things up; took out warnings.
  27. *
  28. * Revision 1.7 1994/01/25 11:40:29 john
  29. * Added gr_check_mode function.
  30. *
  31. * Revision 1.6 1993/10/15 16:22:53 john
  32. * y
  33. *
  34. * Revision 1.5 1993/09/29 17:31:00 john
  35. * added gr_vesa_pixel
  36. *
  37. * Revision 1.4 1993/09/29 16:14:43 john
  38. * added global canvas descriptors.
  39. *
  40. * Revision 1.3 1993/09/08 17:38:02 john
  41. * Looking for errors
  42. *
  43. * Revision 1.2 1993/09/08 15:54:29 john
  44. * *** empty log message ***
  45. *
  46. * Revision 1.1 1993/09/08 11:37:57 john
  47. * Initial revision
  48. *
  49. *
  50. */
  51. extern int gr_modex_setmode(short mode);
  52. extern void gr_modex_setplane(short plane);
  53. extern void gr_modex_setstart(short x, short y, int wait_for_retrace);
  54. extern void gr_modex_uscanline( short x1, short x2, short y, unsigned char color );
  55. extern void gr_pal_setblock( int start, int n, unsigned char * palette );
  56. extern void gr_pal_getblock( int start, int n, unsigned char * palette );
  57. extern void gr_pal_setone( int index, unsigned char red, unsigned char green, unsigned char blue );
  58. extern int gr_vesa_setmodea(int mode);
  59. extern int gr_vesa_checkmode(int mode);
  60. extern void gr_vesa_setstart(short x, short y );
  61. extern void gr_vesa_setpage(int page);
  62. extern void gr_vesa_incpage();
  63. extern void gr_vesa_scanline(short x1, short x2, short y, unsigned char color );
  64. extern int gr_vesa_setlogical(int pixels_per_scanline);
  65. extern void gr_vesa_bitblt( unsigned char * source_ptr, unsigned int vesa_address, int height, int width );
  66. extern void gr_vesa_pixel( unsigned char color, unsigned int offset );
  67. void gr_linear_movsb( void * source, void * dest, unsigned short nbytes);
  68. void gr_linear_movsw( void * source, void * dest, unsigned short nbytes);
  69. void gr_linear_movsd( void * source, void * dest, unsigned short nbytes);
  70. void gr_linear_stosd( void * source, unsigned char color, unsigned short nbytes);
  71. extern unsigned int gr_var_color;
  72. extern unsigned int gr_var_bwidth;
  73. extern unsigned char * gr_var_bitmap;
  74. void gr_linear_line( int x0, int y0, int x1, int y1);
  75. extern unsigned int Table8to32[256];
  76. extern unsigned char * gr_video_memory;
  77. #define WIDTH grd_curcanv->cv_bitmap.bm_w
  78. #define HEIGHT grd_curcanv->cv_bitmap.bm_h
  79. #define MINX 0
  80. #define MINY 0
  81. #define MAXX (WIDTH-1)
  82. #define MAXY (HEIGHT-1)
  83. #define TYPE grd_curcanv->cv_bitmap.bm_type
  84. #define DATA grd_curcanv->cv_bitmap.bm_data
  85. #define XOFFSET grd_curcanv->cv_bitmap.bm_x
  86. #define YOFFSET grd_curcanv->cv_bitmap.bm_y
  87. #define ROWSIZE grd_curcanv->cv_bitmap.bm_rowsize
  88. #define COLOR grd_curcanv->cv_color
  89. void order( int *x1, int *x2 );
  90.