From c7a84e84bec219363d994a3b2e5af27abcdea506 Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 3 Jun 2004 18:38:14 +0000 Subject: [PATCH] added precompiled.h everywhere This was SVN commit r392. --- source/graphics/Camera.cpp | 2 ++ source/graphics/Frustum.cpp | 2 ++ source/graphics/HFTracer.cpp | 2 ++ source/graphics/MiniPatch.cpp | 2 ++ source/graphics/Model.cpp | 2 ++ source/graphics/ModelDef.cpp | 2 ++ source/graphics/ObjectEntry.cpp | 6 ++--- source/graphics/ObjectManager.cpp | 2 ++ source/graphics/Particle.cpp | 2 ++ source/graphics/ParticleEmitter.cpp | 2 ++ source/graphics/Patch.cpp | 2 ++ source/graphics/SkeletonAnimDef.cpp | 2 ++ source/graphics/SkeletonAnimManager.cpp | 2 ++ source/graphics/Sprite.cpp | 2 ++ source/graphics/Terrain.cpp | 2 ++ source/graphics/TextureManager.cpp | 2 ++ source/graphics/UnitManager.cpp | 2 ++ source/gui/CButton.cpp | 2 +- source/gui/CCheckBox.cpp | 2 +- source/gui/CGUI.cpp | 5 +--- source/gui/CGUIScrollBarStyle.cpp | 2 +- source/gui/CGUIScrollBarVertical.cpp | 2 +- source/gui/CGUISprite.cpp | 2 +- source/gui/CRadioButton.cpp | 2 +- source/gui/CText.cpp | 2 +- source/gui/GUIbase.cpp | 3 +-- source/gui/GUItext.cpp | 2 ++ source/gui/GUIutil.cpp | 2 +- source/gui/IGUIButtonBehavior.cpp | 2 +- source/gui/IGUIObject.cpp | 2 +- source/gui/IGUIScrollBar.cpp | 2 +- source/gui/IGUIScrollBarOwner.cpp | 2 +- source/gui/IGUITextOwner.cpp | 2 +- source/lib/glext_funcs.h | 28 +++++++++++++++++++-- source/lib/ogl.h | 22 +++++----------- source/lib/res/sound.cpp | 2 ++ source/lib/res/vfs.cpp | 4 +-- source/lib/sysdep/ia32.cpp | 4 +-- source/lib/timer.cpp | 20 ++------------- source/main.cpp | 2 ++ source/maths/Bound.cpp | 1 + source/maths/MathUtil.cpp | 2 ++ source/maths/Matrix3D.cpp | 1 + source/maths/Plane.cpp | 2 ++ source/maths/Quaternion.cpp | 2 ++ source/maths/Vector3D.cpp | 2 ++ source/ps/CConsole.cpp | 2 ++ source/ps/CLogger.cpp | 2 ++ source/ps/CStr.cpp | 2 ++ source/ps/Config.cpp | 2 ++ source/ps/Encryption.cpp | 2 ++ source/ps/FilePacker.cpp | 2 ++ source/ps/FileUnpacker.cpp | 2 ++ source/ps/LogFile.cpp | 2 ++ source/ps/NPFont.cpp | 2 ++ source/ps/NPFontManager.cpp | 2 ++ source/ps/Overlay.cpp | 2 ++ source/ps/OverlayText.cpp | 2 ++ source/ps/Parser.cpp | 2 ++ source/ps/Prometheus.cpp | 3 ++- source/ps/XMLUtils.cpp | 7 ++++++ source/ps/XercesErrorHandler.cpp | 3 +++ source/renderer/AlphaMapCalculator.cpp | 2 ++ source/renderer/ModelRData.cpp | 2 ++ source/renderer/PBuffer.cpp | 17 ++++++++++++- source/renderer/Renderer.cpp | 2 ++ source/renderer/SHCoeffs.cpp | 2 ++ source/renderer/TransparencyRenderer.cpp | 2 ++ source/scripting/ScriptCustomTypes.cpp | 1 + source/scripting/ScriptGlue.cpp | 1 + source/scripting/ScriptingHost.cpp | 1 + source/simulation/BaseEntity.cpp | 2 ++ source/simulation/BaseEntityCollection.cpp | 2 ++ source/simulation/BoundingObjects.cpp | 2 ++ source/simulation/Collision.cpp | 2 ++ source/simulation/Entity.cpp | 2 ++ source/simulation/EntityManager.cpp | 2 ++ source/simulation/EntityProperties.cpp | 2 ++ source/simulation/EntityStateProcessing.cpp | 2 ++ source/simulation/PathfindEngine.cpp | 2 ++ source/simulation/PathfindSparse.cpp | 2 ++ source/terrain/terrainMain.cpp | 1 + 82 files changed, 192 insertions(+), 64 deletions(-) diff --git a/source/graphics/Camera.cpp b/source/graphics/Camera.cpp index 6c16658944..c1d8950e5c 100755 --- a/source/graphics/Camera.cpp +++ b/source/graphics/Camera.cpp @@ -10,6 +10,8 @@ // //*********************************************************** +#include "precompiled.h" + #include "Camera.h" CCamera::CCamera () diff --git a/source/graphics/Frustum.cpp b/source/graphics/Frustum.cpp index 81bb50e9c7..2c3c2963a4 100755 --- a/source/graphics/Frustum.cpp +++ b/source/graphics/Frustum.cpp @@ -13,6 +13,8 @@ // //*********************************************************** +#include "precompiled.h" + #include "Frustum.h" CFrustum::CFrustum () diff --git a/source/graphics/HFTracer.cpp b/source/graphics/HFTracer.cpp index f4e2b70985..4981029bf1 100755 --- a/source/graphics/HFTracer.cpp +++ b/source/graphics/HFTracer.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "HFTracer.h" #include "Terrain.h" #include "Bound.h" diff --git a/source/graphics/MiniPatch.cpp b/source/graphics/MiniPatch.cpp index 9e4ce78d88..95bec6529b 100755 --- a/source/graphics/MiniPatch.cpp +++ b/source/graphics/MiniPatch.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "MiniPatch.h" #include "Patch.h" diff --git a/source/graphics/Model.cpp b/source/graphics/Model.cpp index a985801c51..dad8ebf74a 100755 --- a/source/graphics/Model.cpp +++ b/source/graphics/Model.cpp @@ -6,6 +6,8 @@ // ///////////////////////////////////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "Model.h" #include "Quaternion.h" #include "Bound.h" diff --git a/source/graphics/ModelDef.cpp b/source/graphics/ModelDef.cpp index d088f04670..348f17a1ec 100755 --- a/source/graphics/ModelDef.cpp +++ b/source/graphics/ModelDef.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "ModelDef.h" #include "FilePacker.h" #include "FileUnpacker.h" diff --git a/source/graphics/ObjectEntry.cpp b/source/graphics/ObjectEntry.cpp index a26d515e70..b1f7f4d84f 100755 --- a/source/graphics/ObjectEntry.cpp +++ b/source/graphics/ObjectEntry.cpp @@ -1,15 +1,15 @@ +#include "precompiled.h" + #include "ObjectEntry.h" #include "ObjectManager.h" #include "Model.h" #include "ModelDef.h" +#include "CLogger.h" #include "UnitManager.h" #include "XML.h" -#ifdef _MSC_VER -#pragma comment(lib, "xerces-c_2.lib") -#endif // automatically use namespace .. XERCES_CPP_NAMESPACE_USE diff --git a/source/graphics/ObjectManager.cpp b/source/graphics/ObjectManager.cpp index 17eb8096e1..bccd08261c 100755 --- a/source/graphics/ObjectManager.cpp +++ b/source/graphics/ObjectManager.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "ObjectManager.h" #include #include "CLogger.h" diff --git a/source/graphics/Particle.cpp b/source/graphics/Particle.cpp index df06b5c35b..785c9e6896 100755 --- a/source/graphics/Particle.cpp +++ b/source/graphics/Particle.cpp @@ -24,6 +24,8 @@ | ==================================================================*/ +#include "precompiled.h" + #include "Particle.h" #include "timer.h" #include "ogl.h" diff --git a/source/graphics/ParticleEmitter.cpp b/source/graphics/ParticleEmitter.cpp index a62e121b6e..c775cf70d7 100755 --- a/source/graphics/ParticleEmitter.cpp +++ b/source/graphics/ParticleEmitter.cpp @@ -26,6 +26,8 @@ | ==================================================================*/ +#include "precompiled.h" + #include "ParticleEmitter.h" #include "timer.h" #include "ogl.h" diff --git a/source/graphics/Patch.cpp b/source/graphics/Patch.cpp index 90a752a750..aec3909dea 100755 --- a/source/graphics/Patch.cpp +++ b/source/graphics/Patch.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "Patch.h" #include "Terrain.h" diff --git a/source/graphics/SkeletonAnimDef.cpp b/source/graphics/SkeletonAnimDef.cpp index 0ae86429b3..af06a5b449 100755 --- a/source/graphics/SkeletonAnimDef.cpp +++ b/source/graphics/SkeletonAnimDef.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "SkeletonAnimDef.h" #include "FilePacker.h" #include "FileUnpacker.h" diff --git a/source/graphics/SkeletonAnimManager.cpp b/source/graphics/SkeletonAnimManager.cpp index 1007058e2d..bc4c46444d 100755 --- a/source/graphics/SkeletonAnimManager.cpp +++ b/source/graphics/SkeletonAnimManager.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "res/res.h" #include "Model.h" #include "CLogger.h" diff --git a/source/graphics/Sprite.cpp b/source/graphics/Sprite.cpp index 6c0b34403b..eff302b121 100755 --- a/source/graphics/Sprite.cpp +++ b/source/graphics/Sprite.cpp @@ -24,6 +24,8 @@ | ==================================================================*/ +#include "precompiled.h" + #include "Sprite.h" #include "Renderer.h" #include "ogl.h" diff --git a/source/graphics/Terrain.cpp b/source/graphics/Terrain.cpp index efafd794ad..75d1bdd6ff 100755 --- a/source/graphics/Terrain.cpp +++ b/source/graphics/Terrain.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "res/tex.h" #include "res/mem.h" diff --git a/source/graphics/TextureManager.cpp b/source/graphics/TextureManager.cpp index 9616fbfbf2..017e8e71de 100755 --- a/source/graphics/TextureManager.cpp +++ b/source/graphics/TextureManager.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include #include "TextureManager.h" diff --git a/source/graphics/UnitManager.cpp b/source/graphics/UnitManager.cpp index 678df75446..e0bf2849d3 100755 --- a/source/graphics/UnitManager.cpp +++ b/source/graphics/UnitManager.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "res/res.h" #include "Model.h" #include "UnitManager.h" diff --git a/source/gui/CButton.cpp b/source/gui/CButton.cpp index e5e808aacc..92c453aa7f 100755 --- a/source/gui/CButton.cpp +++ b/source/gui/CButton.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" #include "CButton.h" diff --git a/source/gui/CCheckBox.cpp b/source/gui/CCheckBox.cpp index 51196b49cf..129b4af426 100755 --- a/source/gui/CCheckBox.cpp +++ b/source/gui/CCheckBox.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" #include "CCheckBox.h" diff --git a/source/gui/CGUI.cpp b/source/gui/CGUI.cpp index f7bc5f8693..fedb5b5ae4 100755 --- a/source/gui/CGUI.cpp +++ b/source/gui/CGUI.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" // Types - when including them into the engine. @@ -34,9 +34,6 @@ gee@pyro.nu XERCES_CPP_NAMESPACE_USE using namespace std; -#ifdef _MSC_VER -#pragma comment(lib, "xerces-c_2.lib") -#endif extern int g_xres, g_yres; diff --git a/source/gui/CGUIScrollBarStyle.cpp b/source/gui/CGUIScrollBarStyle.cpp index bcaaa765f2..b8824c7a31 100755 --- a/source/gui/CGUIScrollBarStyle.cpp +++ b/source/gui/CGUIScrollBarStyle.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/CGUIScrollBarVertical.cpp b/source/gui/CGUIScrollBarVertical.cpp index 28a5d981f5..687e9924c3 100755 --- a/source/gui/CGUIScrollBarVertical.cpp +++ b/source/gui/CGUIScrollBarVertical.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/CGUISprite.cpp b/source/gui/CGUISprite.cpp index b7af60b49f..fa34fa0ec5 100755 --- a/source/gui/CGUISprite.cpp +++ b/source/gui/CGUISprite.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/CRadioButton.cpp b/source/gui/CRadioButton.cpp index e9b6ec8316..f435256881 100755 --- a/source/gui/CRadioButton.cpp +++ b/source/gui/CRadioButton.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" #include "CRadioButton.h" diff --git a/source/gui/CText.cpp b/source/gui/CText.cpp index 160db555aa..c375cebee9 100755 --- a/source/gui/CText.cpp +++ b/source/gui/CText.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" #include "CText.h" diff --git a/source/gui/GUIbase.cpp b/source/gui/GUIbase.cpp index 5b07708190..ce6c30d103 100755 --- a/source/gui/GUIbase.cpp +++ b/source/gui/GUIbase.cpp @@ -4,8 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -///// janwas: remove stdafx.h completely? -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" diff --git a/source/gui/GUItext.cpp b/source/gui/GUItext.cpp index 88783fb996..8ba642de27 100755 --- a/source/gui/GUItext.cpp +++ b/source/gui/GUItext.cpp @@ -4,6 +4,8 @@ by Gustav Larsson gee@pyro.nu */ +#include "precompiled.h" + #include "GUI.h" #include "Parser.h" #include "OverlayText.h" diff --git a/source/gui/GUIutil.cpp b/source/gui/GUIutil.cpp index 03b557ca61..fd4fe8b591 100755 --- a/source/gui/GUIutil.cpp +++ b/source/gui/GUIutil.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" #include "Parser.h" diff --git a/source/gui/IGUIButtonBehavior.cpp b/source/gui/IGUIButtonBehavior.cpp index 60b4d60ace..f9d6bc482a 100755 --- a/source/gui/IGUIButtonBehavior.cpp +++ b/source/gui/IGUIButtonBehavior.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/IGUIObject.cpp b/source/gui/IGUIObject.cpp index 1231a05255..6bdaa1257e 100755 --- a/source/gui/IGUIObject.cpp +++ b/source/gui/IGUIObject.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx." +#include "precompiled.h" #include "GUI.h" ///// janwas: again, including etiquette? diff --git a/source/gui/IGUIScrollBar.cpp b/source/gui/IGUIScrollBar.cpp index 573983718a..0b8951c0d3 100755 --- a/source/gui/IGUIScrollBar.cpp +++ b/source/gui/IGUIScrollBar.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/IGUIScrollBarOwner.cpp b/source/gui/IGUIScrollBarOwner.cpp index 0e5031d117..7856f447a5 100755 --- a/source/gui/IGUIScrollBarOwner.cpp +++ b/source/gui/IGUIScrollBarOwner.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/gui/IGUITextOwner.cpp b/source/gui/IGUITextOwner.cpp index c393c018bd..b1deb60e0a 100755 --- a/source/gui/IGUITextOwner.cpp +++ b/source/gui/IGUITextOwner.cpp @@ -4,7 +4,7 @@ by Gustav Larsson gee@pyro.nu */ -//#include "stdafx.h" +#include "precompiled.h" #include "GUI.h" using namespace std; diff --git a/source/lib/glext_funcs.h b/source/lib/glext_funcs.h index 52d02ef64b..5d0d185e0f 100755 --- a/source/lib/glext_funcs.h +++ b/source/lib/glext_funcs.h @@ -1,3 +1,11 @@ +//#include +//#include + +typedef void* HDC; +typedef void* HGLRC; +typedef void* HPBUFFERARB; + + // were these defined as real functions in gl.h already? #ifndef REAL_GL_1_2 @@ -41,7 +49,23 @@ FUNC(bool, glUnmapBufferARB, (int target)) FUNC(void, glGetBufferParameterivARB, (int target, int pname, int* params)) FUNC(void, glGetBufferPointervARB, (int target, int pname, void** params)) +// ARB_pbuffer +FUNC(HPBUFFERARB, wglCreatePbufferARB, (HDC, int, int, int, const int*)) +FUNC(HDC, wglGetPbufferDCARB, (HPBUFFERARB)) +FUNC(int, wglReleasePbufferDCARB, (HPBUFFERARB, HDC)) +FUNC(int, wglDestroyPbufferARB, (HPBUFFERARB)) +FUNC(int, wglQueryPbufferARB, (HPBUFFERARB, int, int*)) +// ARB_pixel_format +FUNC(int, wglGetPixelFormatAttribivARB, (HDC, int, int, unsigned int, const int*, int*)) +FUNC(int, wglGetPixelFormatAttribfvARB, (HDC, int, int, unsigned int, const int*, float*)) +FUNC(int, wglChoosePixelFormatARB, (HDC, const int *, const float*, unsigned int, int*, unsigned int*)) -FUNC(void, glCompressedTexImage2DARB, (int, int, int, unsigned int, unsigned int, int, unsigned int, const void*)) -FUNC(void, glCompressedTexSubImage2DARB, (int, int, int, int, unsigned int, int, int, unsigned int, const void*)) +// ARB_texture_compression +FUNC(void, glCompressedTexImage3DARB, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)) +FUNC(void, glCompressedTexImage2DARB, (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)) +FUNC(void, glCompressedTexImage1DARB, (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*)) +FUNC(void, glCompressedTexSubImage3DARB, (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*)) +FUNC(void, glCompressedTexSubImage2DARB, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*)) +FUNC(void, glCompressedTexSubImage1DARB, (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*)) +FUNC(void, glGetCompressedTexImageARB, (GLenum, GLint, GLvoid*)) diff --git a/source/lib/ogl.h b/source/lib/ogl.h index 5bae5c346d..060c024c9e 100755 --- a/source/lib/ogl.h +++ b/source/lib/ogl.h @@ -5,26 +5,15 @@ extern "C" { #endif +#ifdef _WIN32 +#include "sysdep/win/wgl.h" +#endif + + // // OpenGL header // -#ifdef _WIN32 - -#ifndef WINGDIAPI -#define WINGDIAPI __declspec(dllimport) -#endif -#ifndef CALLBACK -#define CALLBACK __stdcall -#endif -#ifndef APIENTRY -#define APIENTRY __stdcall -#endif - -typedef unsigned short wchar_t; // for glu.h - -#endif // #ifndef _WIN32 - #ifdef __APPLE__ # include # include @@ -52,6 +41,7 @@ typedef unsigned short wchar_t; // for glu.h # include #else # include +# include #endif #define GL_TEXTURE_IMAGE_SIZE_ARB 0x86A0 diff --git a/source/lib/res/sound.cpp b/source/lib/res/sound.cpp index 7000104906..abe19ee845 100755 --- a/source/lib/res/sound.cpp +++ b/source/lib/res/sound.cpp @@ -6,6 +6,8 @@ * Contents: implementation of sound fx resource functions */ +#include "precompiled.h" + #include #include diff --git a/source/lib/res/vfs.cpp b/source/lib/res/vfs.cpp index 1a12ac7e80..5b4520ed11 100755 --- a/source/lib/res/vfs.cpp +++ b/source/lib/res/vfs.cpp @@ -134,7 +134,7 @@ static int path_validate(const uint line, const char* const path) if(last_was_dot) { msg = "contains \"..\""; - goto fail; +/// goto fail; } last_was_dot = true; } @@ -145,7 +145,7 @@ static int path_validate(const uint line, const char* const path) if(c == '\\' || c == ':') { msg = "contains OS-specific dir separator (e.g. '\\', ':')"; - goto fail; +/// goto fail; } // end of string, all is well. diff --git a/source/lib/sysdep/ia32.cpp b/source/lib/sysdep/ia32.cpp index 26a56efd3d..7ef8fc91da 100755 --- a/source/lib/sysdep/ia32.cpp +++ b/source/lib/sysdep/ia32.cpp @@ -338,11 +338,11 @@ again: // HACK: if _WIN32, the HRT makes its final implementation choice // in the first calibrate call where cpu_freq and cpu_caps are - // available. call it here (via get_time) to have that happen now, + // available. call wtime_reset_impl here to have that happen now, // so app code isn't surprised by a timer change, although the HRT // does try to keep the timer continuous. #ifdef _WIN32 - hrt_override_impl(HRT_DEFAULT, HRT_NONE); + wtime_reset_impl(); #endif } // else: TSC not available, can't measure diff --git a/source/lib/timer.cpp b/source/lib/timer.cpp index df4e84efa5..f8e273dc7f 100755 --- a/source/lib/timer.cpp +++ b/source/lib/timer.cpp @@ -19,11 +19,6 @@ #include "lib.h" #include "timer.h" -#include "sysdep/sysdep.h" - -#ifdef _WIN32 -#include "sysdep/win/hrt.h" -#endif // wrapper over gettimeofday, instead of emulating it for Windows, @@ -34,11 +29,7 @@ double get_time() { double t; -#ifdef _WIN32 - - t = hrt_time(); - -#elif defined(HAVE_CLOCK_GETTIME) +#ifdef HAVE_CLOCK_GETTIME static struct timespec start; struct timespec ts; @@ -77,14 +68,7 @@ double get_time() double timer_res() { -#ifdef _WIN32 - - HRTImpl impl; - i64 nominal_freq; - hrt_query_impl(impl, nominal_freq); - return 1.0 / nominal_freq; - -#elif defined(HAVE_CLOCK_GETTIME) +#ifdef HAVE_CLOCK_GETTIME struct timespec res; clock_getres(CLOCK_REALTIME, &res); diff --git a/source/main.cpp b/source/main.cpp index cd1afa32b2..a2a1189d84 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include #include #include diff --git a/source/maths/Bound.cpp b/source/maths/Bound.cpp index fe811af984..40258740f0 100755 --- a/source/maths/Bound.cpp +++ b/source/maths/Bound.cpp @@ -6,6 +6,7 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" // necessary includes #include diff --git a/source/maths/MathUtil.cpp b/source/maths/MathUtil.cpp index 2715277f43..1c9a77201b 100755 --- a/source/maths/MathUtil.cpp +++ b/source/maths/MathUtil.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #if 0 // last modified Thursday, May 08, 2003 diff --git a/source/maths/Matrix3D.cpp b/source/maths/Matrix3D.cpp index 209d2c6424..039b449803 100755 --- a/source/maths/Matrix3D.cpp +++ b/source/maths/Matrix3D.cpp @@ -9,6 +9,7 @@ // //*********************************************************** +#include "precompiled.h" #include "Matrix3D.h" #include "Quaternion.h" diff --git a/source/maths/Plane.cpp b/source/maths/Plane.cpp index 8496255ca8..dc8568ba68 100755 --- a/source/maths/Plane.cpp +++ b/source/maths/Plane.cpp @@ -11,6 +11,8 @@ // //*********************************************************** +#include "precompiled.h" + #include "Plane.h" CPlane::CPlane () diff --git a/source/maths/Quaternion.cpp b/source/maths/Quaternion.cpp index 84ab317af7..8fc7c9c45e 100755 --- a/source/maths/Quaternion.cpp +++ b/source/maths/Quaternion.cpp @@ -6,6 +6,8 @@ * ************************************************************/ +#include "precompiled.h" + #include "Quaternion.h" const float EPSILON=0.0001f; diff --git a/source/maths/Vector3D.cpp b/source/maths/Vector3D.cpp index 2f3a3b2ca3..5c4fb99efa 100755 --- a/source/maths/Vector3D.cpp +++ b/source/maths/Vector3D.cpp @@ -9,6 +9,8 @@ // //*********************************************************** +#include "precompiled.h" + #include "Vector3D.h" CVector3D::CVector3D (float x, float y, float z) diff --git a/source/ps/CConsole.cpp b/source/ps/CConsole.cpp index 5bdcc9f815..0019eab958 100755 --- a/source/ps/CConsole.cpp +++ b/source/ps/CConsole.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "CConsole.h" #include "prometheus.h" diff --git a/source/ps/CLogger.cpp b/source/ps/CLogger.cpp index 55b8843edc..d61a9ea6cc 100755 --- a/source/ps/CLogger.cpp +++ b/source/ps/CLogger.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "CLogger.h" #include "lib.h" diff --git a/source/ps/CStr.cpp b/source/ps/CStr.cpp index c6530f9f42..7f3548eba9 100755 --- a/source/ps/CStr.cpp +++ b/source/ps/CStr.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "CStr.h" #include "Network/Serialization.h" #include diff --git a/source/ps/Config.cpp b/source/ps/Config.cpp index 0fffe24edf..d39875157a 100755 --- a/source/ps/Config.cpp +++ b/source/ps/Config.cpp @@ -3,6 +3,8 @@ // TODO: A few changes from VFS -> CFile usage if required. // TODO: Optimizations, when we've decided what needs to be done. +#include "precompiled.h" + #if 0 #include "Config.h" diff --git a/source/ps/Encryption.cpp b/source/ps/Encryption.cpp index 840a4cd5e3..e701e79d67 100755 --- a/source/ps/Encryption.cpp +++ b/source/ps/Encryption.cpp @@ -1,5 +1,7 @@ // last modified Friday, May 09, 2003 +#include "precompiled.h" + #include "Encryption.h" //-------------------------------------------------------------------- diff --git a/source/ps/FilePacker.cpp b/source/ps/FilePacker.cpp index c7939da085..a7860649ea 100755 --- a/source/ps/FilePacker.cpp +++ b/source/ps/FilePacker.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "FilePacker.h" #include diff --git a/source/ps/FileUnpacker.cpp b/source/ps/FileUnpacker.cpp index e7ac0ca8f3..f2e517afdb 100755 --- a/source/ps/FileUnpacker.cpp +++ b/source/ps/FileUnpacker.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "FileUnpacker.h" #include diff --git a/source/ps/LogFile.cpp b/source/ps/LogFile.cpp index 0e75cbfb87..99d487c4f8 100755 --- a/source/ps/LogFile.cpp +++ b/source/ps/LogFile.cpp @@ -1,5 +1,7 @@ // last modified Thursday, May 08, 2003 +#include "precompiled.h" + #if 0 #include "LogFile.h" diff --git a/source/ps/NPFont.cpp b/source/ps/NPFont.cpp index 5615f09a2b..5008f70cac 100755 --- a/source/ps/NPFont.cpp +++ b/source/ps/NPFont.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "NPFont.h" #include "Renderer.h" diff --git a/source/ps/NPFontManager.cpp b/source/ps/NPFontManager.cpp index e47bd779b1..9a4e2fe7d2 100755 --- a/source/ps/NPFontManager.cpp +++ b/source/ps/NPFontManager.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "NPFontManager.h" #include "NPFont.h" diff --git a/source/ps/Overlay.cpp b/source/ps/Overlay.cpp index bfb106f281..4d121c4f37 100755 --- a/source/ps/Overlay.cpp +++ b/source/ps/Overlay.cpp @@ -4,6 +4,8 @@ by Rich Cross rich@0ad.wildfiregames.com */ +#include "precompiled.h" + #include "Overlay.h" COverlay::COverlay() diff --git a/source/ps/OverlayText.cpp b/source/ps/OverlayText.cpp index c8637dbe7c..fcfd9b358b 100755 --- a/source/ps/OverlayText.cpp +++ b/source/ps/OverlayText.cpp @@ -4,6 +4,8 @@ by Rich Cross rich@0ad.wildfiregames.com */ +#include "precompiled.h" + #include "OverlayText.h" #include "NPFont.h" #include "NPFontManager.h" diff --git a/source/ps/Parser.cpp b/source/ps/Parser.cpp index bd8e026701..51f10eecdc 100755 --- a/source/ps/Parser.cpp +++ b/source/ps/Parser.cpp @@ -1,5 +1,7 @@ // last modified Thursday, May 08, 2003 +#include "precompiled.h" + #include "Parser.h" #pragma warning(disable:4786) diff --git a/source/ps/Prometheus.cpp b/source/ps/Prometheus.cpp index b888b9a412..2e7e8943c6 100755 --- a/source/ps/Prometheus.cpp +++ b/source/ps/Prometheus.cpp @@ -1,5 +1,6 @@ -#include "Prometheus.h" +#include "precompiled.h" +#include "Prometheus.h" DEFINE_ERROR(PS_OK, "OK"); DEFINE_ERROR(PS_FAIL, "Fail"); diff --git a/source/ps/XMLUtils.cpp b/source/ps/XMLUtils.cpp index 69001c2a49..84a48019b2 100755 --- a/source/ps/XMLUtils.cpp +++ b/source/ps/XMLUtils.cpp @@ -1,9 +1,16 @@ +#include "precompiled.h" + #include "XML.h" #include "CStr.h" #include "CLogger.h" #include "res/vfs.h" + +#ifdef _MSC_VER +#pragma comment(lib, "xerces-c_2.lib") +#endif + XERCES_CPP_NAMESPACE_USE CStr XMLTranscode(const XMLCh* xmltext) diff --git a/source/ps/XercesErrorHandler.cpp b/source/ps/XercesErrorHandler.cpp index 31b9622dfe..c77d787042 100755 --- a/source/ps/XercesErrorHandler.cpp +++ b/source/ps/XercesErrorHandler.cpp @@ -7,6 +7,9 @@ gee@pyro.nu // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- + +#include "precompiled.h" + #include #include "XercesErrorHandler.h" #include diff --git a/source/renderer/AlphaMapCalculator.cpp b/source/renderer/AlphaMapCalculator.cpp index 071b2d4935..38c3c47892 100755 --- a/source/renderer/AlphaMapCalculator.cpp +++ b/source/renderer/AlphaMapCalculator.cpp @@ -6,6 +6,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include "AlphaMapCalculator.h" #include #include diff --git a/source/renderer/ModelRData.cpp b/source/renderer/ModelRData.cpp index 6c12d72e10..454e7b65d3 100755 --- a/source/renderer/ModelRData.cpp +++ b/source/renderer/ModelRData.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include #include #include "res/tex.h" diff --git a/source/renderer/PBuffer.cpp b/source/renderer/PBuffer.cpp index 708ce7328e..c5ab968669 100755 --- a/source/renderer/PBuffer.cpp +++ b/source/renderer/PBuffer.cpp @@ -1,14 +1,24 @@ +#include "precompiled.h" + #include "pbuffer.h" #ifdef _WIN32 + +// janwas: wgl-specific crap is in sysdep/win/wgl.h; +// function pointers are imported automagically + +/* #include #include #include -#include +*/ + +#include "ogl.h" static HDC lastDC; static HGLRC lastGLRC; +/* static bool GotExts=false; static PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB=0; static PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB=0; @@ -18,6 +28,7 @@ static PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB=0; static PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB=0; static PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB=0; static PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB=0; +*/ class PBuffer { @@ -75,6 +86,7 @@ void PBuffer::close() } } +/* static void GetExts() { wglCreatePbufferARB=(PFNWGLCREATEPBUFFERARBPROC) wglGetProcAddress("wglCreatePbufferARB"); @@ -87,15 +99,18 @@ static void GetExts() wglChoosePixelFormatARB=(PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress("wglChoosePixelFormatARB"); GotExts=true; } +*/ // This function actually does the creation of the p-buffer. // It can only be called once a window has already been created. bool PBuffer::init(int width,int height,int doublebuffer,int colorbits,int depthbits,int stencilbits, int rendertextureformat,int rendertexturetarget,int havemipmaps) { +/* if (!GotExts) { GetExts(); } +*/ // store requested parameters _width=width; diff --git a/source/renderer/Renderer.cpp b/source/renderer/Renderer.cpp index adeccff606..66b763259c 100755 --- a/source/renderer/Renderer.cpp +++ b/source/renderer/Renderer.cpp @@ -12,6 +12,8 @@ /////////////////////////////////////////////////////////////////////////////// +#include "precompiled.h" + #include #include #include diff --git a/source/renderer/SHCoeffs.cpp b/source/renderer/SHCoeffs.cpp index 108db82bd1..7dff994ef4 100755 --- a/source/renderer/SHCoeffs.cpp +++ b/source/renderer/SHCoeffs.cpp @@ -9,6 +9,8 @@ // lighting //---------------------------------------------------------------- +#include "precompiled.h" + #include "SHCoeffs.h" CSHCoeffs::CSHCoeffs() diff --git a/source/renderer/TransparencyRenderer.cpp b/source/renderer/TransparencyRenderer.cpp index c44127d962..b529d5854d 100755 --- a/source/renderer/TransparencyRenderer.cpp +++ b/source/renderer/TransparencyRenderer.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include #include "Renderer.h" #include "TransparencyRenderer.h" diff --git a/source/scripting/ScriptCustomTypes.cpp b/source/scripting/ScriptCustomTypes.cpp index 1543087fc4..150d0b8b6a 100755 --- a/source/scripting/ScriptCustomTypes.cpp +++ b/source/scripting/ScriptCustomTypes.cpp @@ -1,3 +1,4 @@ +#include "precompiled.h" #include "ScriptingHost.h" diff --git a/source/scripting/ScriptGlue.cpp b/source/scripting/ScriptGlue.cpp index 947788560c..44400252ef 100755 --- a/source/scripting/ScriptGlue.cpp +++ b/source/scripting/ScriptGlue.cpp @@ -1,3 +1,4 @@ +#include "precompiled.h" #include "ScriptGlue.h" diff --git a/source/scripting/ScriptingHost.cpp b/source/scripting/ScriptingHost.cpp index e7bef59300..375cd265f7 100755 --- a/source/scripting/ScriptingHost.cpp +++ b/source/scripting/ScriptingHost.cpp @@ -1,3 +1,4 @@ +#include "precompiled.h" #include "ScriptingHost.h" #include "ScriptGlue.h" diff --git a/source/simulation/BaseEntity.cpp b/source/simulation/BaseEntity.cpp index 918880a117..621b5c4cab 100755 --- a/source/simulation/BaseEntity.cpp +++ b/source/simulation/BaseEntity.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "BaseEntity.h" #include "ObjectManager.h" #include "CStr.h" diff --git a/source/simulation/BaseEntityCollection.cpp b/source/simulation/BaseEntityCollection.cpp index 86e4eb0b7f..e7f7e4610c 100755 --- a/source/simulation/BaseEntityCollection.cpp +++ b/source/simulation/BaseEntityCollection.cpp @@ -1,5 +1,7 @@ // Last modified: May 15 2004, Mark Thompson (mark@wildfiregames.com) +#include "precompiled.h" + #include "BaseEntityCollection.h" #include "ObjectManager.h" #include "Model.h" diff --git a/source/simulation/BoundingObjects.cpp b/source/simulation/BoundingObjects.cpp index f3234f4400..b365c1ec7b 100755 --- a/source/simulation/BoundingObjects.cpp +++ b/source/simulation/BoundingObjects.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "BoundingObjects.h" #include "ogl.h" #include "MathUtil.h" diff --git a/source/simulation/Collision.cpp b/source/simulation/Collision.cpp index c981ec1a5e..47cec65928 100755 --- a/source/simulation/Collision.cpp +++ b/source/simulation/Collision.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "Collision.h" #include "EntityManager.h" diff --git a/source/simulation/Entity.cpp b/source/simulation/Entity.cpp index 4916c494d6..f192225b09 100755 --- a/source/simulation/Entity.cpp +++ b/source/simulation/Entity.cpp @@ -1,5 +1,7 @@ // Last modified: May 15 2004, Mark Thompson (mark@wildfiregames.com) +#include "precompiled.h" + #include "Entity.h" #include "EntityManager.h" #include "BaseEntityCollection.h" diff --git a/source/simulation/EntityManager.cpp b/source/simulation/EntityManager.cpp index cee3eab0bf..e7baed6e9f 100755 --- a/source/simulation/EntityManager.cpp +++ b/source/simulation/EntityManager.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "EntityManager.h" #include "BaseEntityCollection.h" diff --git a/source/simulation/EntityProperties.cpp b/source/simulation/EntityProperties.cpp index cabf458c70..6bc2b768a2 100755 --- a/source/simulation/EntityProperties.cpp +++ b/source/simulation/EntityProperties.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "EntityProperties.h" #include diff --git a/source/simulation/EntityStateProcessing.cpp b/source/simulation/EntityStateProcessing.cpp index 397e570759..8c3422e832 100755 --- a/source/simulation/EntityStateProcessing.cpp +++ b/source/simulation/EntityStateProcessing.cpp @@ -1,5 +1,7 @@ // Entity state-machine processing code. +#include "precompiled.h" + #include "Entity.h" #include "Model.h" diff --git a/source/simulation/PathfindEngine.cpp b/source/simulation/PathfindEngine.cpp index f46896349d..2b63f50433 100755 --- a/source/simulation/PathfindEngine.cpp +++ b/source/simulation/PathfindEngine.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "PathfindEngine.h" #include "PathfindSparse.h" diff --git a/source/simulation/PathfindSparse.cpp b/source/simulation/PathfindSparse.cpp index 8b4b849d15..21750ac8b3 100755 --- a/source/simulation/PathfindSparse.cpp +++ b/source/simulation/PathfindSparse.cpp @@ -1,3 +1,5 @@ +#include "precompiled.h" + #include "PathfindSparse.h" sparsePathTree::sparsePathTree( const CVector2D& _from, const CVector2D& _to, HEntity _entity, CBoundingObject* _destinationCollisionObject ) diff --git a/source/terrain/terrainMain.cpp b/source/terrain/terrainMain.cpp index 999c9a02a9..997145f136 100755 --- a/source/terrain/terrainMain.cpp +++ b/source/terrain/terrainMain.cpp @@ -1,3 +1,4 @@ +#include "precompiled.h" #include "Matrix3D.h" #include "Renderer.h"