LOADPAL.CPP 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***************************************************************************
  19. ** 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 **
  20. ***************************************************************************
  21. * *
  22. * Project Name : Load_Palette *
  23. * *
  24. * File Name : LOADPAL.CPP *
  25. * *
  26. * Programmer : Scott K. Bowen *
  27. * *
  28. * Start Date : April 25, 1994 *
  29. * *
  30. * Last Update : April 27, 1994 [BR] *
  31. * *
  32. *-------------------------------------------------------------------------*
  33. * Note: This module contains dependencies upon the file I/O system, *
  34. * specifically Load_Data(). *
  35. *-------------------------------------------------------------------------*
  36. * Functions: *
  37. * Load_Palette -- Loads a palette file into the given palette buffer. *
  38. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  39. /*
  40. ********************************* Includes **********************************
  41. */
  42. #include <wwstd.h>
  43. #include "wwstd.h"
  44. #include "iff.h"
  45. #include "palette.h"
  46. /*
  47. ********************************* Constants *********************************
  48. */
  49. /*
  50. ********************************** Globals **********************************
  51. */
  52. /*
  53. ******************************** Prototypes *********************************
  54. */
  55. /***************************************************************************
  56. * Load_Palette -- Loads a palette file into the given palette buffer. *
  57. * *
  58. * INPUT: *
  59. * BYTE * file_name - name of the file to load. *
  60. * BYTE * palette_pointer - pointer to palette buffer. *
  61. * *
  62. * OUTPUT: *
  63. * none *
  64. * *
  65. * WARNINGS: *
  66. * *
  67. * HISTORY: *
  68. * 06/20/1991 BS : Created. *
  69. * 04/27/1994 BR : Converted to 32-bit *
  70. *=========================================================================*/
  71. void __cdecl Load_Palette(char *palette_file_name, void *palette_pointer)
  72. {
  73. #if(IBM)
  74. Load_Data(palette_file_name, palette_pointer, 768);
  75. #else
  76. Load_Data(palette_file_name, palette_pointer, (ULONG)(2<<BIT_PLANES));
  77. #endif
  78. }
  79. /**************************** End of loadpal.cpp ***************************/