win.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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:: /Commando/Code/wwlib/win.h $*
  25. * *
  26. * $Author:: Ian_l $*
  27. * *
  28. * $Modtime:: 10/16/01 2:42p $*
  29. * *
  30. * $Revision:: 11 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if _MSC_VER >= 1000
  36. #pragma once
  37. #endif // _MSC_VER >= 1000
  38. #ifndef WIN_H
  39. #define WIN_H
  40. /*
  41. ** This header file includes the Windows headers. If there are any special pragmas that need
  42. ** to occur around this process, they are performed here. Typically, certain warnings will need
  43. ** to be disabled since the Windows headers are repleat with illegal and dangerous constructs.
  44. **
  45. ** Within the windows headers themselves, Microsoft has disabled the warnings 4290, 4514,
  46. ** 4069, 4200, 4237, 4103, 4001, 4035, 4164. Makes you wonder, eh?
  47. */
  48. // When including windows, lets just bump the warning level back to 3...
  49. #if (_MSC_VER >= 1200)
  50. #pragma warning(push, 3)
  51. #endif
  52. // this define should also be in the DSP just in case someone includes windows stuff directly
  53. #ifndef WIN32_LEAN_AND_MEAN
  54. #define WIN32_LEAN_AND_MEAN
  55. #endif
  56. #include <windows.h>
  57. //#include <mmsystem.h>
  58. //#include <windowsx.h>
  59. //#include <winnt.h>
  60. //#include <winuser.h>
  61. #if (_MSC_VER >= 1200)
  62. #pragma warning(pop)
  63. #endif
  64. #ifdef _WINDOWS
  65. extern HINSTANCE ProgramInstance;
  66. extern HWND MainWindow;
  67. extern bool GameInFocus;
  68. #ifdef _DEBUG
  69. void __cdecl Print_Win32Error(unsigned long win32Error);
  70. #else // _DEBUG
  71. #define Print_Win32Error
  72. #endif // _DEBUG
  73. #else // _WINDOWS
  74. //#include <unistd.h>
  75. #endif // _WINDOWS
  76. #endif // WIN_H