2
0

watcom.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. ** Command & Conquer Renegade(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 : Command & Conquer *
  23. * *
  24. * $Archive:: /G/wwlib/WATCOM.H $*
  25. * *
  26. * $Author:: Eric_c $*
  27. * *
  28. * $Modtime:: 4/02/99 11:56a $*
  29. * *
  30. * $Revision:: 3 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if _MSC_VER >= 1000
  36. #pragma once
  37. #endif // _MSC_VER >= 1000
  38. #if !defined(WATCOM_H) && defined(__WATCOMC__)
  39. #define WATCOM_H
  40. /**********************************************************************
  41. ** The "bool" integral type was defined by the C++ comittee in
  42. ** November of '94. Until the compiler supports this, use the following
  43. ** definition.
  44. */
  45. #include "bool.h"
  46. // Turn all warnings into errors.
  47. #pragma warning * 0
  48. // Disables warning when "sizeof" is used on an object with virtual functions.
  49. #pragma warning 549 9
  50. // Disable the "Integral value may be truncated during assignment or initialization".
  51. #pragma warning 389 9
  52. // Allow constructing a temporary to be used as a parameter.
  53. #pragma warning 604 9
  54. // Disable the construct resolved as an expression warning.
  55. #pragma warning 595 9
  56. // Disable the strange "construct resolved as a declaration/type" warning.
  57. #pragma warning 594 9
  58. // Disable the "pre-compiled header file cannot be used" warning.
  59. #pragma warning 698 9
  60. // Disable the "temporary object used to initialize a non-constant reference" warning.
  61. #pragma warning 665 9
  62. // Disable the "pointer or reference truncated by cast. Cast is supposed to REMOVE warnings, not create them.
  63. #pragma warning 579 9
  64. // Disable the warning that suggests a null destructor be placed in class definition.
  65. #pragma warning 656 9
  66. // Disable the warning about moving empty constructors/destructors to the class declaration.
  67. #pragma warning 657 9
  68. // No virtual destructor is not an error in C&C.
  69. #pragma warning 004 9
  70. // Integral constant will be truncated warning is usually ok when dealing with bitfields.
  71. #pragma warning 388 9
  72. // Turns off unreferenced function parameter warning.
  73. //#pragma off(unreferenced)
  74. /*
  75. ** The "bool" integral type was defined by the C++ comittee in
  76. ** November of '94. Until the compiler supports this, use the following
  77. ** definition.
  78. */
  79. #include "bool.h"
  80. #if !defined(__BORLANDC__)
  81. #define M_E 2.71828182845904523536
  82. #define M_LOG2E 1.44269504088896340736
  83. #define M_LOG10E 0.434294481903251827651
  84. #define M_LN2 0.693147180559945309417
  85. #define M_LN10 2.30258509299404568402
  86. #define M_PI 3.14159265358979323846
  87. #define M_PI_2 1.57079632679489661923
  88. #define M_PI_4 0.785398163397448309616
  89. #define M_1_PI 0.318309886183790671538
  90. #define M_2_PI 0.636619772367581343076
  91. #define M_1_SQRTPI 0.564189583547756286948
  92. #define M_2_SQRTPI 1.12837916709551257390
  93. #define M_SQRT2 1.41421356237309504880
  94. #define M_SQRT_2 0.707106781186547524401
  95. #endif
  96. #endif