diff --git a/source/lib/external_libraries/enet.h b/source/lib/external_libraries/enet.h index a88d7be17c..cf0e2d2cbe 100644 --- a/source/lib/external_libraries/enet.h +++ b/source/lib/external_libraries/enet.h @@ -39,7 +39,9 @@ struct fd_set; #define _WINSOCK2API_ // winsock2.h include guard -#define WIN32 +#ifndef WIN32 +# define WIN32 +#endif #endif // OS_WIN diff --git a/source/pch/engine/precompiled.h b/source/pch/engine/precompiled.h index d8fb31c4f9..6879c2ac25 100644 --- a/source/pch/engine/precompiled.h +++ b/source/pch/engine/precompiled.h @@ -27,7 +27,6 @@ // .. CStr is included very frequently, so a reasonable amount of time is // saved by including it here. (~10% in a full rebuild, as of r2365) #include "ps/CStr.h" -#include "scripting/SpiderMonkey.h" #include #include diff --git a/source/ps/Preprocessor.cpp b/source/ps/Preprocessor.cpp index 38e83ec924..b41b50c216 100644 --- a/source/ps/Preprocessor.cpp +++ b/source/ps/Preprocessor.cpp @@ -763,7 +763,7 @@ CPreprocessor::Token CPreprocessor::GetArgument (Token &oArg, bool iExpand) } } - uint len = oArg.Length; + unsigned int len = oArg.Length; while (true) { Token t = GetToken (iExpand); diff --git a/source/renderer/Renderer.h b/source/renderer/Renderer.h index bce72d9363..a429564ba2 100644 --- a/source/renderer/Renderer.h +++ b/source/renderer/Renderer.h @@ -26,7 +26,6 @@ #include "graphics/Camera.h" #include "graphics/SColor.h" #include "graphics/ShaderProgram.h" -#include "lib/ogl.h" #include "lib/res/handle.h" #include "ps/Singleton.h" #include "scripting/ScriptableObject.h" @@ -234,7 +233,7 @@ public: void SetDisplayTerrainPriorities(bool enabled) { m_DisplayTerrainPriorities = enabled; } // bind a GL texture object to active unit - void BindTexture(int unit,GLuint tex); + void BindTexture(int unit, unsigned int tex); // load the default set of alphamaps. // return a negative error code if anything along the way fails. diff --git a/source/scriptinterface/ScriptTypes.h b/source/scriptinterface/ScriptTypes.h index f4f5e74c7c..0f84ee4969 100644 --- a/source/scriptinterface/ScriptTypes.h +++ b/source/scriptinterface/ScriptTypes.h @@ -20,7 +20,9 @@ #ifdef _WIN32 # define XP_WIN -# define WIN32 // SpiderMonkey expects this +# ifndef WIN32 +# define WIN32 // SpiderMonkey expects this +# endif // The jsval struct type causes crashes due to weird miscompilation // issues in (at least) VC2008, so force it to be the less-type-safe @@ -38,6 +40,13 @@ #include // required by jsutil.h +// SpiderMonkey wants the DEBUG flag +#ifndef NDEBUG +# ifndef DEBUG +# define DEBUG +# endif +#endif + #include "js/jsapi.h" #if JS_VERSION != 185 diff --git a/source/tools/atlas/AtlasScript/ScriptInterface.cpp b/source/tools/atlas/AtlasScript/ScriptInterface.cpp index 4182272489..162a6219bf 100644 --- a/source/tools/atlas/AtlasScript/ScriptInterface.cpp +++ b/source/tools/atlas/AtlasScript/ScriptInterface.cpp @@ -344,10 +344,7 @@ template bool ScriptInterface::FromJSVal(JSContext*, jsval, wxString&) template bool ScriptInterface::FromJSVal(JSContext*, jsval, bool&); template bool ScriptInterface::FromJSVal(JSContext*, jsval, float&); template bool ScriptInterface::FromJSVal(JSContext*, jsval, CScriptVal&); -template bool ScriptInterface::FromJSVal(JSContext*, jsval, AtlasMessage::sObjectSettings&); template jsval ScriptInterface::ToJSVal(JSContext*, wxString const&); -template jsval ScriptInterface::ToJSVal(JSContext*, wxKeyEvent const&); -template jsval ScriptInterface::ToJSVal(JSContext*, wxMouseEvent const&); template jsval ScriptInterface::ToJSVal(JSContext*, int const&); template jsval ScriptInterface::ToJSVal(JSContext*, float const&); template jsval ScriptInterface::ToJSVal >(JSContext*, std::vector const&);