visualc.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. ** Command & Conquer Generals(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:: /Commando/Code/wwlib/visualc.h $*
  25. * *
  26. * $Author:: Greg_h $*
  27. * *
  28. * $Modtime:: 5/16/01 4:11p $*
  29. * *
  30. * $Revision:: 9 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if _MSC_VER >= 1000
  36. #pragma once
  37. #endif // _MSC_VER >= 1000
  38. #if defined(_MSC_VER)
  39. /**********************************************************************
  40. ** The "bool" integral type was defined by the C++ comittee in
  41. ** November of '94. Until the compiler supports this, use the following
  42. ** definition.
  43. */
  44. #include "bool.h"
  45. /*
  46. ** Make the inline depth 255
  47. */
  48. #pragma inline_depth(255)
  49. /*
  50. ** Turn off some unneeded warnings.
  51. */
  52. // "unreferenced inline function has been removed" Yea, so what?
  53. #pragma warning(disable : 4514)
  54. // "conversion from 'double' to 'float', possible loss of data" Yea, so what?
  55. #pragma warning(disable : 4244)
  56. // "overflow in floating-point constant arithmetic" This warning occurs even if the
  57. // loss of precision is insignificant.
  58. #pragma warning(disable : 4056)
  59. // "function not inlined" This warning is typically useless. The inline keyword
  60. // only serves as a suggestion to the compiler and it may or may not inline a
  61. // function on a case by case basis. No need to be told of this.
  62. #pragma warning(disable : 4710)
  63. // "'this' used in base member initializer list" Using "this" in a base member
  64. // initializer is valid -- no need for this warning.
  65. #pragma warning(disable : 4355)
  66. // "typedef-name used as a synonym for class-name". This is by design and should
  67. // not be a warning.
  68. #pragma warning(disable : 4097)
  69. // Unreferenced local function removed.
  70. #pragma warning(disable : 4505)
  71. // 'function selected for automatic inlining'
  72. #pragma warning(disable : 4711)
  73. // 'copy constructor could not be generated'
  74. #pragma warning(disable : 4511)
  75. // 'assignment operator could not be generated'
  76. #pragma warning(disable : 4512)
  77. // 'unreferenced formal parameter'
  78. #pragma warning(disable : 4100)
  79. // HIDE WARNING 4786 "identifier was truncated to '255' characters in the browser information"
  80. // Tempates create LLLOOONNNGGG identifiers!
  81. #pragma warning(disable : 4786)
  82. // 'function selected for automatic inline expansion'. Cool, but since we're treating
  83. // warnings as errors, don't warn me about this!
  84. #pragma warning(disable : 4711)
  85. #define M_E 2.71828182845904523536
  86. #define M_LOG2E 1.44269504088896340736
  87. #define M_LOG10E 0.434294481903251827651
  88. #define M_LN2 0.693147180559945309417
  89. #define M_LN10 2.30258509299404568402
  90. #define M_PI 3.14159265358979323846
  91. #define M_PI_2 1.57079632679489661923
  92. #define M_PI_4 0.785398163397448309616
  93. #define M_1_PI 0.318309886183790671538
  94. #define M_2_PI 0.636619772367581343076
  95. #define M_1_SQRTPI 0.564189583547756286948
  96. #define M_2_SQRTPI 1.12837916709551257390
  97. #define M_SQRT2 1.41421356237309504880
  98. #define M_SQRT_2 0.707106781186547524401
  99. #endif