PALETTE.H 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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/palette.h $
  15. * $Revision: 1.11 $
  16. * $Author: john $
  17. * $Date: 1994/11/15 17:55:10 $
  18. *
  19. * Protoypes for palette functions
  20. *
  21. * $Log: palette.h $
  22. * Revision 1.11 1994/11/15 17:55:10 john
  23. * Made text palette fade in when game over.
  24. *
  25. * Revision 1.10 1994/11/07 13:53:42 john
  26. * Added better gamma stufff.
  27. *
  28. * Revision 1.9 1994/11/07 13:38:03 john
  29. * Added gamma correction stuff.
  30. *
  31. * Revision 1.8 1994/11/05 13:05:59 john
  32. * Added back in code to allow keys during fade.
  33. *
  34. * Revision 1.7 1994/11/05 12:46:37 john
  35. * Changed palette stuff a bit.
  36. *
  37. * Revision 1.6 1994/09/22 16:08:37 john
  38. * Fixed some palette stuff.
  39. *
  40. * Revision 1.5 1994/08/09 11:27:04 john
  41. * Add cthru stuff.
  42. *
  43. * Revision 1.4 1994/06/09 10:39:33 john
  44. * In fade out.in functions, returned 1 if key was pressed...
  45. *
  46. * Revision 1.3 1994/05/31 19:04:24 john
  47. * Added key to stop fade if desired.
  48. *
  49. * Revision 1.2 1994/05/06 12:50:42 john
  50. * Added supertransparency; neatend things up; took out warnings.
  51. *
  52. * Revision 1.1 1994/05/04 14:59:57 john
  53. * Initial revision
  54. *
  55. *
  56. */
  57. #ifndef _PALETTE_H
  58. #define _PALETTE_H
  59. extern void gr_palette_set_gamma( int gamma );
  60. extern int gr_palette_get_gamma();
  61. extern ubyte gr_palette_faded_out;
  62. extern void gr_palette_clear();
  63. extern int gr_palette_fade_out(ubyte *pal, int nsteps, int allow_keys );
  64. extern int gr_palette_fade_in(ubyte *pal,int nsteps, int allow_keys );
  65. extern void gr_palette_load( ubyte * pal );
  66. extern void gr_make_cthru_table(ubyte * table, ubyte r, ubyte g, ubyte b );
  67. extern int gr_find_closest_color_current( int r, int g, int b );
  68. extern void gr_palette_read(ubyte * palette);
  69. #endif
  70.