PALETTE.H 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /***************************************************************************
  15. ;** C O N F I D E N T I A L --- W E S T W O O D A S S O C I A T E S **
  16. ;***************************************************************************
  17. ;* *
  18. ;* Project Name : Palette 32bit Library. *
  19. ;* *
  20. ;* File Name : PALETTE.H *
  21. ;* *
  22. ;* Programmer : Scott K. Bowen *
  23. ;* *
  24. ;* Start Date : April 25, 1994 *
  25. ;* *
  26. ;* Last Update : April 27, 1994 [BRR] *
  27. ;* *
  28. ;* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  29. #ifndef PALETTE_H
  30. #define PALETTE_H
  31. #include <gbuffer.h>
  32. /*
  33. ********************************* Constants *********************************
  34. */
  35. #define RGB_BYTES 3
  36. #define PALETTE_SIZE 256
  37. #define PALETTE_BYTES 768
  38. /*
  39. ******************************** Prototypes *********************************
  40. */
  41. /*
  42. -------------------------------- Palette.cpp --------------------------------
  43. */
  44. void __cdecl Set_Palette(void *palette);
  45. void __cdecl Set_Palette_Color(void *palette, int color, void *data);
  46. void Fade_Palette_To(void *palette1, unsigned int delay, void (*callback)() );
  47. /*
  48. -------------------------------- loadpal.cpp --------------------------------
  49. */
  50. void __cdecl Load_Palette(char *palette_file_name, void *palette_pointer);
  51. /*
  52. ------------------------------- morphpal.cpp --------------------------------
  53. */
  54. void __cdecl Morph_Palette (void *src_palette, void *dst_palette, unsigned int delay,
  55. void *callback);
  56. /*
  57. ---------------------------------- pal.asm ----------------------------------
  58. */
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif
  62. extern void __cdecl Set_Palette_Range(void *palette);
  63. extern BOOL __cdecl Bump_Color(void *palette, int changable, int target);
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. extern "C" extern unsigned char CurrentPalette[]; /* in pal.asm */
  68. #endif // PALETTE_H
  69. /***************************** End of palette.h ****************************/