MISC.H 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 S T U D I O S **
  20. ***************************************************************************
  21. * *
  22. * Project Name : 32 bit library *
  23. * *
  24. * File Name : MISC.H *
  25. * *
  26. * Programmer : Scott K. Bowen *
  27. * *
  28. * Start Date : August 3, 1994 *
  29. * *
  30. * Last Update : August 3, 1994 [SKB] *
  31. * *
  32. *-------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef MISC_H
  36. #define MISC_H
  37. /*========================= C++ Routines ==================================*/
  38. /*=========================================================================*/
  39. /* The following prototypes are for the file: EXIT.CPP */
  40. /* Prog_End Must be supplied by the user program in startup.cpp */
  41. /*=========================================================================*/
  42. VOID cdecl Prog_End(VOID);
  43. VOID cdecl Exit(INT errorval, const BYTE *message, ...);
  44. /*=========================================================================*/
  45. /* The following prototypes are for the file: DELAY.CPP */
  46. /*=========================================================================*/
  47. void Delay(int duration);
  48. void Vsync(void);
  49. /*=========================================================================*/
  50. /* The following prototypes are for the file: FINDARGV.CPP */
  51. /*=========================================================================*/
  52. BYTE *cdecl Find_Argv(BYTE const *str);
  53. /*=========================================================================*/
  54. /* The following prototypes are for the file: LIB.CPP */
  55. /*=========================================================================*/
  56. char *Find_Argv(char const *str);
  57. void Mono_Mem_Dump(void const *databuf, int bytes, int y);
  58. void Convert_RGB_To_HSV(unsigned int r, unsigned int g, unsigned int b, unsigned int *h, unsigned int *s, unsigned int *v);
  59. void Convert_HSV_To_RGB(unsigned int h, unsigned int s, unsigned int v, unsigned int *r, unsigned int *g, unsigned int *b);
  60. /*=========================================================================*/
  61. /* The following prototypes are for the file: VERSION.CPP */
  62. /*=========================================================================*/
  63. BYTE *cdecl Version(VOID);
  64. /*=========================================================================*/
  65. /* The following prototypes are for the file: IRANDOM.CPP */
  66. /*=========================================================================*/
  67. int IRandom(int minval, int maxval);
  68. /*========================= Assembly Routines ==============================*/
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. /*=========================================================================*/
  73. /* The following prototypes are for the file: PROC.ASM */
  74. /* Prog_End Must be supplied by the user program in startup.cpp */
  75. /*=========================================================================*/
  76. int Get_CPU(VOID);
  77. /*=========================================================================*/
  78. /* The following prototypes are for the file: RANDOM.ASM */
  79. /*=========================================================================*/
  80. UBYTE Random(VOID);
  81. int Get_Random_Mask(int maxval);
  82. /*=========================================================================*/
  83. /* The following prototype is for the file: SHAKESCR.ASM */
  84. /*=========================================================================*/
  85. void Shake_Screen(int shakes);
  86. /*=========================================================================*/
  87. /* The following prototypes are for the file: REVERSE.ASM */
  88. /*=========================================================================*/
  89. LONG Reverse_LONG(LONG number);
  90. WORD Reverse_WORD(WORD number);
  91. LONG Swap_LONG(LONG number);
  92. /*=========================================================================*/
  93. /* The following prototype is for the file: FACING8.ASM */
  94. /*=========================================================================*/
  95. int Desired_Facing8(int x1, int y1, int x2, int y2);
  96. /*=========================================================================*/
  97. /* The following prototype is for the file: FACING16.ASM */
  98. /*=========================================================================*/
  99. int Desired_Facing16(int x1, int y1, int x2, int y2);
  100. /*=========================================================================*/
  101. /* The following prototype is for the file: FACINGFF.ASM */
  102. /*=========================================================================*/
  103. int Desired_Facing256(int x1, int y1, int x2, int y2);
  104. /*=========================================================================*/
  105. /* The following prototype is for the file: FADING.ASM */
  106. /*=========================================================================*/
  107. void *Build_Fading_Table(void const *palette, void const *dest, long int color, long int frac);
  108. /*=========================================================================*/
  109. /* The following prototype is for the file: CRC.ASM */
  110. /*=========================================================================*/
  111. long Calculate_CRC(void *buffer, long length);
  112. /*=========================================================================*/
  113. /* The following prototypes are for the file: DETPROC.ASM */
  114. /*=========================================================================*/
  115. extern WORD Processor(VOID);
  116. extern WORD Operating_System(VOID);
  117. extern ULONG random ( ULONG mod ) ;
  118. extern void randomize ( void ) ;
  119. extern int Clip_Rect ( int * x , int * y , int * dw , int * dh ,
  120. int width , int height ) ;
  121. extern int Confine_Rect ( int * x , int * y , int dw , int dh ,
  122. int width , int height ) ;
  123. /*=========================================================================*/
  124. /* The following prototypes are for the file: OPSYS.ASM */
  125. /*=========================================================================*/
  126. extern WORD OperationgSystem;
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130. /*=========================================================================*/
  131. #endif // MISC_H
  132. 
  133.