MISC.H 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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: RANDOM.ASM */
  74. /*=========================================================================*/
  75. UBYTE Random(VOID);
  76. int Get_Random_Mask(int maxval);
  77. /*=========================================================================*/
  78. /* The following prototype is for the file: SHAKESCR.ASM */
  79. /*=========================================================================*/
  80. void Shake_Screen(int shakes);
  81. /*=========================================================================*/
  82. /* The following prototypes are for the file: REVERSE.ASM */
  83. /*=========================================================================*/
  84. LONG Reverse_LONG(LONG number);
  85. WORD Reverse_WORD(WORD number);
  86. LONG Swap_LONG(LONG number);
  87. /*=========================================================================*/
  88. /* The following prototype is for the file: FACING8.ASM */
  89. /*=========================================================================*/
  90. int Desired_Facing8(int x1, int y1, int x2, int y2);
  91. /*=========================================================================*/
  92. /* The following prototype is for the file: FACING16.ASM */
  93. /*=========================================================================*/
  94. int Desired_Facing16(int x1, int y1, int x2, int y2);
  95. /*=========================================================================*/
  96. /* The following prototype is for the file: FACINGFF.ASM */
  97. /*=========================================================================*/
  98. int Desired_Facing256(int x1, int y1, int x2, int y2);
  99. /*=========================================================================*/
  100. /* The following prototype is for the file: FADING.ASM */
  101. /*=========================================================================*/
  102. void *Build_Fading_Table(void const *palette, void const *dest, long int color, long int frac);
  103. /*=========================================================================*/
  104. /* The following prototype is for the file: CRC.ASM */
  105. /*=========================================================================*/
  106. long Calculate_CRC(void *buffer, long length);
  107. /*=========================================================================*/
  108. /* The following prototypes are for the file: DETPROC.ASM */
  109. /*=========================================================================*/
  110. extern WORD Processor(VOID);
  111. extern WORD Operating_System(VOID);
  112. extern ULONG random ( ULONG mod ) ;
  113. extern void randomize ( void ) ;
  114. extern int Clip_Rect ( int * x , int * y , int * dw , int * dh ,
  115. int width , int height ) ;
  116. extern int Confine_Rect ( int * x , int * y , int dw , int dh ,
  117. int width , int height ) ;
  118. /*=========================================================================*/
  119. /* The following prototypes are for the file: OPSYS.ASM */
  120. /*=========================================================================*/
  121. extern WORD OperationgSystem;
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125. /*=========================================================================*/
  126. #endif // MISC_H
  127. 
  128.