diff --git a/build/premake/extern_libs.lua b/build/premake/extern_libs.lua index e27f1c7ff3..148e2fc0cd 100644 --- a/build/premake/extern_libs.lua +++ b/build/premake/extern_libs.lua @@ -70,6 +70,7 @@ extern_lib_defs = { }, ffmpeg = { win_names = { "avcodec-51", "avformat-51", "avutil-49" }, + unix_names = { "avcodec", "avformat", "avutil" }, dbg_suffix = "", }, libjpg = { diff --git a/source/graphics/scripting/JSInterface_Camera.h b/source/graphics/scripting/JSInterface_Camera.h index a1b29a1107..b9014fdef0 100644 --- a/source/graphics/scripting/JSInterface_Camera.h +++ b/source/graphics/scripting/JSInterface_Camera.h @@ -81,6 +81,6 @@ namespace JSI_Camera JSBool getFocus( JSContext* cx, JSObject* obj, uint argc, jsval* argv, jsval* rval ); void init(); -}; +} #endif diff --git a/source/graphics/scripting/JSInterface_LightEnv.cpp b/source/graphics/scripting/JSInterface_LightEnv.cpp index 517d002a6f..3fbf380b10 100644 --- a/source/graphics/scripting/JSInterface_LightEnv.cpp +++ b/source/graphics/scripting/JSInterface_LightEnv.cpp @@ -195,7 +195,7 @@ JSFunctionSpec JSI_methods[] = { 0 } }; -}; // anonymous namespace +} // anonymous namespace /** * init: called by GameSetup to register the LightEnv class with the JS engine. @@ -234,5 +234,5 @@ JSBool setLightEnv(JSContext* cx, JSObject* UNUSED(obj), jsval UNUSED(id), jsval return JS_TRUE; } -}; // namespace JSI_LightEnv +} // namespace JSI_LightEnv diff --git a/source/graphics/scripting/JSInterface_LightEnv.h b/source/graphics/scripting/JSInterface_LightEnv.h index 61d13c70be..ac0bf6210a 100644 --- a/source/graphics/scripting/JSInterface_LightEnv.h +++ b/source/graphics/scripting/JSInterface_LightEnv.h @@ -18,6 +18,6 @@ namespace JSI_LightEnv void init(); JSBool getLightEnv( JSContext* cx, JSObject* obj, jsval id, jsval* vp ); JSBool setLightEnv( JSContext* cx, JSObject* obj, jsval id, jsval* vp ); -}; +} #endif diff --git a/source/gui/MiniMap.cpp b/source/gui/MiniMap.cpp index 2aa8097569..17b5193e74 100644 --- a/source/gui/MiniMap.cpp +++ b/source/gui/MiniMap.cpp @@ -34,7 +34,6 @@ bool g_GameRestarted = false; // static data instead of a class member. that is no longer the case, // but we leave it because this is slightly more efficient. static float m_scaleX, m_scaleY; -extern bool g_mouse_buttons[1]; static unsigned int ScaleColor(unsigned int color, float x) diff --git a/source/i18n/tests2/StringConvert.cpp b/source/i18n/tests2/StringConvert.cpp index c4f458cb00..3fcf3c49b5 100644 --- a/source/i18n/tests2/StringConvert.cpp +++ b/source/i18n/tests2/StringConvert.cpp @@ -5,7 +5,7 @@ #include #include "jsapi.h" -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN #define ucs2le_to_wchart(ptr) (wchar_t)( (u16) ((u8*)ptr)[0] | (u16) ( ((u8*)ptr)[1] << 8) ) #else #define ucs2le_to_wchart(ptr) (wchar_t)(*ptr); diff --git a/source/i18n/tests2/precompiled.h b/source/i18n/tests2/precompiled.h index 16bd2dddab..1c259aa79b 100644 --- a/source/i18n/tests2/precompiled.h +++ b/source/i18n/tests2/precompiled.h @@ -22,7 +22,7 @@ #define SDL_LIL_ENDIAN 1234 #define SDL_BIG_ENDIAN 4321 -#define SDL_BYTE_ORDER SDL_LIL_ENDIAN +#define SDL_BYTEORDER SDL_LIL_ENDIAN #include #define cassert(x) extern char cassert__##__LINE__ [x] diff --git a/source/lib/byte_order.cpp b/source/lib/byte_order.cpp index 0ae5e1f497..6e760e534c 100644 --- a/source/lib/byte_order.cpp +++ b/source/lib/byte_order.cpp @@ -28,7 +28,7 @@ u16 to_le16(u16 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return SDL_Swap16(x); #else return x; @@ -37,7 +37,7 @@ u16 to_le16(u16 x) u32 to_le32(u32 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return SDL_Swap32(x); #else return x; @@ -46,7 +46,7 @@ u32 to_le32(u32 x) u64 to_le64(u64 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return SDL_Swap64(x); #else return x; @@ -56,7 +56,7 @@ u64 to_le64(u64 x) u16 to_be16(u16 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return x; #else return SDL_Swap16(x); @@ -65,7 +65,7 @@ u16 to_be16(u16 x) u32 to_be32(u32 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return x; #else return SDL_Swap32(x); @@ -74,7 +74,7 @@ u32 to_be32(u32 x) u64 to_be64(u64 x) { -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return x; #else return SDL_Swap64(x); diff --git a/source/lib/lib_errors.cpp b/source/lib/lib_errors.cpp index 09a6943a68..8516fc74cb 100644 --- a/source/lib/lib_errors.cpp +++ b/source/lib/lib_errors.cpp @@ -62,7 +62,7 @@ static LibErrorAssociations& associations() { static LibErrorAssociations associations_; return associations_; -}; +} void error_setDescription(LibError err, const char* description) { diff --git a/source/lib/mmgr.cpp b/source/lib/mmgr.cpp index 6bbd95ec44..f035c30504 100644 --- a/source/lib/mmgr.cpp +++ b/source/lib/mmgr.cpp @@ -1366,12 +1366,12 @@ static void* new_common(size_t size, AllocType type, } -void* operator new(size_t size) +void* operator new(size_t size) throw(std::bad_alloc) { return new_common(size, AT_NEW, 0,0,0); } -void* operator new[](size_t size) +void* operator new[](size_t size) throw(std::bad_alloc) { return new_common(size, AT_NEW_ARRAY, 0,0,0); } diff --git a/source/lib/mmgr.h b/source/lib/mmgr.h index 15b8bf09fa..173a958c2e 100644 --- a/source/lib/mmgr.h +++ b/source/lib/mmgr.h @@ -193,8 +193,8 @@ extern char* mmgr_getcwd_dbg(char*, size_t, const char* file, int lin // .. global operator new (to catch allocs from STL/external libs) -extern void* operator new (size_t size); -extern void* operator new[](size_t size); +extern void* operator new (size_t size) throw(std::bad_alloc); +extern void* operator new[](size_t size) throw(std::bad_alloc); // .. override commonly used global operator new overload (done e.g. by MFC), // in case someone hasn't included this file extern void* operator new (size_t size, const char* file, int line); diff --git a/source/lib/sysdep/sysdep.h b/source/lib/sysdep/sysdep.h index d8c8abc1bd..a4b78ed69c 100644 --- a/source/lib/sysdep/sysdep.h +++ b/source/lib/sysdep/sysdep.h @@ -69,9 +69,9 @@ // try to define _W64, if not already done // (this is useful for catching pointer size bugs) #ifndef _W64 -# if MSC_VER +# if MSC_VERSION # define _W64 __w64 -# elif GCC_VER +# elif GCC_VERSION # define _W64 __attribute__((mode (__pointer__))) # else # define _W64 diff --git a/source/lib/sysdep/win/wsdl.h b/source/lib/sysdep/win/wsdl.h index 9b1abde398..6993113355 100644 --- a/source/lib/sysdep/win/wsdl.h +++ b/source/lib/sysdep/win/wsdl.h @@ -159,7 +159,7 @@ extern u64 SDL_Swap64(u64); #define SDL_LIL_ENDIAN 1234 #define SDL_BIG_ENDIAN 4321 -#define SDL_BYTE_ORDER SDL_LIL_ENDIAN +#define SDL_BYTEORDER SDL_LIL_ENDIAN ////////////////////////////////////////////////////////////////////////////// // diff --git a/source/maths/Noise.cpp b/source/maths/Noise.cpp index fb8d6fdddc..6ce73ec2fc 100644 --- a/source/maths/Noise.cpp +++ b/source/maths/Noise.cpp @@ -86,13 +86,13 @@ Noise3D::Noise3D(int f, int v) : freq(f), vfreq(v) grads[i][j] = new CVector3D[vfreq]; for(int k=0; k 1 || v.LengthSquared() < 0.1); - v.Normalize(); - grads[i][j][k] = CVector3D(v.X, v.Y, v.Z); + while(vec.LengthSquared() > 1 || vec.LengthSquared() < 0.1); + vec.Normalize(); + grads[i][j][k] = CVector3D(vec.X, vec.Y, vec.Z); } } } diff --git a/source/network/Client.cpp b/source/network/Client.cpp index c1a4e0bd36..12b95cfaa2 100644 --- a/source/network/Client.cpp +++ b/source/network/Client.cpp @@ -18,7 +18,6 @@ CNetClient *g_NetClient=NULL; extern int fps; -extern CConsole *g_Console; CNetClient::CServerSession::CServerSession(int sessionID, const CStrW& name): m_SessionID(sessionID), diff --git a/source/network/Server.cpp b/source/network/Server.cpp index 3317fe69c1..ca137d094a 100644 --- a/source/network/Server.cpp +++ b/source/network/Server.cpp @@ -17,8 +17,6 @@ #define LOG_CAT_NET "net" -extern CConsole *g_Console; - CNetServer *g_NetServer=NULL; using namespace std; diff --git a/source/network/ServerSession.cpp b/source/network/ServerSession.cpp index 728693360d..9f6bf3a4b1 100644 --- a/source/network/ServerSession.cpp +++ b/source/network/ServerSession.cpp @@ -5,8 +5,6 @@ #include "ps/CLogger.h" #include "ps/CConsole.h" -extern CConsole *g_Console; - CNetServerSession::CNetServerSession(CNetServer *pServer, CSocketInternal *pInt, MessageHandler *pMsgHandler): CNetSession(pInt, pMsgHandler), diff --git a/source/ps/CConsole.cpp b/source/ps/CConsole.cpp index 7564da133b..f32c1da9be 100644 --- a/source/ps/CConsole.cpp +++ b/source/ps/CConsole.cpp @@ -763,10 +763,6 @@ void CConsole::ReceivedChatMessage(const wchar_t *szSender, const wchar_t *szMes InsertMessage(L"%ls: %ls", szSender, szMessage); } -extern CConsole* g_Console; - -extern void Die(int err, const wchar_t* fmt, ...); - static bool isUnprintableChar(SDL_keysym key) { // U+0000 to U+001F are control characters diff --git a/source/ps/CLogger.cpp b/source/ps/CLogger.cpp index 05358bca3b..16cf32b7d7 100644 --- a/source/ps/CLogger.cpp +++ b/source/ps/CLogger.cpp @@ -11,7 +11,6 @@ CLogger* g_Logger = NULL; #include "CConsole.h" -extern CConsole* g_Console; using namespace std; diff --git a/source/ps/Game.cpp b/source/ps/Game.cpp index c3913b750f..399d512541 100644 --- a/source/ps/Game.cpp +++ b/source/ps/Game.cpp @@ -23,7 +23,6 @@ class CNetServer; extern CNetServer *g_NetServer; -extern CConsole* g_Console; extern bool g_GameRestarted; CGame *g_Game=NULL; diff --git a/source/ps/GameAttributes.h b/source/ps/GameAttributes.h index acbac89c47..485fc81d81 100644 --- a/source/ps/GameAttributes.h +++ b/source/ps/GameAttributes.h @@ -106,7 +106,7 @@ public: namespace PlayerSlotArray_JS { JSBool GetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp ); -}; +} class CGameAttributes: public CSynchedJSObject, diff --git a/source/ps/StringConvert.cpp b/source/ps/StringConvert.cpp index 95f38461a8..2b9f20ac26 100644 --- a/source/ps/StringConvert.cpp +++ b/source/ps/StringConvert.cpp @@ -2,9 +2,10 @@ #include "StringConvert.h" #include "lib/types.h" +#include "lib/sdl.h" #include "scripting/SpiderMonkey.h" -#if SDL_BYTE_ORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN #define ucs2le_to_wchart(ptr) (wchar_t)( (u16) ((u8*)ptr)[0] | (u16) ( ((u8*)ptr)[1] << 8) ) #else #define ucs2le_to_wchart(ptr) (wchar_t)(*ptr); diff --git a/source/ps/scripting/JSInterface_Console.cpp b/source/ps/scripting/JSInterface_Console.cpp index 277aca7584..242d90ca1a 100644 --- a/source/ps/scripting/JSInterface_Console.cpp +++ b/source/ps/scripting/JSInterface_Console.cpp @@ -7,8 +7,6 @@ #include "ps/CConsole.h" #include "scripting/JSConversions.h" -extern CConsole* g_Console; - JSClass JSI_Console::JSI_class = { "Console", 0, diff --git a/source/ps/scripting/JSInterface_Console.h b/source/ps/scripting/JSInterface_Console.h index f9ff6d55a1..fb3dc307f0 100644 --- a/source/ps/scripting/JSInterface_Console.h +++ b/source/ps/scripting/JSInterface_Console.h @@ -25,6 +25,6 @@ namespace JSI_Console void init(); JSBool writeConsole( JSContext* context, JSObject* obj, uint argc, jsval* argv, jsval* rval ); -}; +} #endif diff --git a/source/ps/scripting/JSInterface_Selection.cpp b/source/ps/scripting/JSInterface_Selection.cpp index c0a71f7c47..05e107a416 100644 --- a/source/ps/scripting/JSInterface_Selection.cpp +++ b/source/ps/scripting/JSInterface_Selection.cpp @@ -27,8 +27,7 @@ JSBool JSI_Selection::setSelection( JSContext* cx, JSObject* UNUSED(obj), } JSObject* selectionArray = JSVAL_TO_OBJECT( *vp ); - UNUSED2(selectionArray); - EntityCollection::CJSCollectionData* Info = (EntityCollection::CJSCollectionData*)JS_GetInstancePrivate( cx, JSVAL_TO_OBJECT( *vp ), &EntityCollection::JSI_class, NULL ); + EntityCollection::CJSCollectionData* Info = (EntityCollection::CJSCollectionData*)JS_GetInstancePrivate( cx, selectionArray, &EntityCollection::JSI_class, NULL ); if( !Info ) { diff --git a/source/ps/scripting/JSInterface_Selection.h b/source/ps/scripting/JSInterface_Selection.h index 5565b56e20..ba0c12b8de 100644 --- a/source/ps/scripting/JSInterface_Selection.h +++ b/source/ps/scripting/JSInterface_Selection.h @@ -22,6 +22,6 @@ namespace JSI_Selection JSBool getContextOrder( JSContext* context, JSObject* obj, jsval id, jsval* vp ); JSBool setContextOrder( JSContext* context, JSObject* obj, jsval id, jsval* vp ); -}; +} #endif diff --git a/source/ps/scripting/JSInterface_VFS.h b/source/ps/scripting/JSInterface_VFS.h index 7182a10b48..55fbe59be8 100644 --- a/source/ps/scripting/JSInterface_VFS.h +++ b/source/ps/scripting/JSInterface_VFS.h @@ -53,6 +53,6 @@ namespace JSI_VFS // // archiveBuilderCancel(); JSBool ArchiveBuilderCancel(JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval ); -}; +} #endif diff --git a/source/renderer/HWLightingModelRenderer.cpp b/source/renderer/HWLightingModelRenderer.cpp index 99faeaabdf..073ee27207 100644 --- a/source/renderer/HWLightingModelRenderer.cpp +++ b/source/renderer/HWLightingModelRenderer.cpp @@ -149,8 +149,6 @@ void HWLightingModelRenderer::UpdateModelData(CModel* model, void* data, u32 upd if (updateflags & RENDERDATA_UPDATE_VERTICES) { - CModelDefPtr mdef = model->GetModelDef(); - // build vertices VertexArrayIterator Position = hwlmodel->m_Position.GetIterator(); VertexArrayIterator Normal = hwlmodel->m_Normal.GetIterator(); diff --git a/source/renderer/VertexBuffer.h b/source/renderer/VertexBuffer.h index 021c00cd76..9e2829145c 100644 --- a/source/renderer/VertexBuffer.h +++ b/source/renderer/VertexBuffer.h @@ -69,7 +69,7 @@ public: // return this VBs batch list const std::vector& GetBatches() const { return m_Batches; } - const size_t GetVertexSize() const { return m_VertexSize; } + size_t GetVertexSize() const { return m_VertexSize; } // free memory static void Shutdown(); diff --git a/source/scripting/ScriptGlue.cpp b/source/scripting/ScriptGlue.cpp index e4dc08bd19..caa156b69d 100644 --- a/source/scripting/ScriptGlue.cpp +++ b/source/scripting/ScriptGlue.cpp @@ -51,7 +51,6 @@ # include "gui/scripting/JSInterface_IGUIObject.h" #endif -extern CConsole* g_Console; extern bool g_TerrainModified; diff --git a/source/simulation/EntityScriptInterface.cpp b/source/simulation/EntityScriptInterface.cpp index 0e5cc43d75..c28aee0e91 100644 --- a/source/simulation/EntityScriptInterface.cpp +++ b/source/simulation/EntityScriptInterface.cpp @@ -952,4 +952,4 @@ jsval CEntity::FlattenTerrain( JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* g_Game->GetWorld()->GetTerrain()->FlattenArea(pos.X-xDiff, pos.X+xDiff, pos.Z-yDiff, pos.Z+yDiff); snapToGround(); return JS_TRUE; -} \ No newline at end of file +} diff --git a/source/simulation/Technology.h b/source/simulation/Technology.h index 3254f80ff4..3dc2cb8476 100644 --- a/source/simulation/Technology.h +++ b/source/simulation/Technology.h @@ -18,7 +18,7 @@ class CTechnology : public CJSObject { friend class CTechnologyCollection; - typedef struct Modifier + struct Modifier { CStr attribute; float value; diff --git a/source/tools/atlas/AtlasObject/AtlasObject.h b/source/tools/atlas/AtlasObject/AtlasObject.h index 48f9b78d6f..84a652b2d4 100644 --- a/source/tools/atlas/AtlasObject/AtlasObject.h +++ b/source/tools/atlas/AtlasObject/AtlasObject.h @@ -144,6 +144,6 @@ namespace AtlasObject bool SaveToXML(AtObj& obj, const wchar_t* filename); AtObj TrimEmptyChildren(AtObj& obj); -}; +} #endif // ATLASOBJECT_H__ diff --git a/source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp b/source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp index de4704d0d3..1bb3269e2d 100644 --- a/source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp +++ b/source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp @@ -18,9 +18,9 @@ // mode if that ever happens, instead of just silently ignoring the error.) -ATSMARTPTR_IMPL(AtNode); -ATSMARTPTR_IMPL(const AtNode); -ATSMARTPTR_IMPL(AtIterImpl); +ATSMARTPTR_IMPL(AtNode) +ATSMARTPTR_IMPL(const AtNode) +ATSMARTPTR_IMPL(AtIterImpl) ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/General/AtlasClipboard.cpp b/source/tools/atlas/AtlasUI/General/AtlasClipboard.cpp index 335ba0362c..8d4ffb0375 100644 --- a/source/tools/atlas/AtlasUI/General/AtlasClipboard.cpp +++ b/source/tools/atlas/AtlasUI/General/AtlasClipboard.cpp @@ -17,4 +17,4 @@ bool AtlasClipboard::GetClipboard(AtObj& out) { out = g_Clipboard; return true; -} \ No newline at end of file +} diff --git a/source/tools/atlas/AtlasUI/General/AtlasEventLoop.cpp b/source/tools/atlas/AtlasUI/General/AtlasEventLoop.cpp index 2811b610f0..c4e592b1f2 100644 --- a/source/tools/atlas/AtlasUI/General/AtlasEventLoop.cpp +++ b/source/tools/atlas/AtlasUI/General/AtlasEventLoop.cpp @@ -39,4 +39,4 @@ bool AtlasEventLoop::Dispatch() return wxEventLoop::Dispatch(); } -*/ \ No newline at end of file +*/ diff --git a/source/tools/atlas/AtlasUI/General/Datafile.h b/source/tools/atlas/AtlasUI/General/Datafile.h index 765759394f..8c7c2161d1 100644 --- a/source/tools/atlas/AtlasUI/General/Datafile.h +++ b/source/tools/atlas/AtlasUI/General/Datafile.h @@ -16,4 +16,4 @@ namespace Datafile // Returns a list of files matching the given wildcard (* and ?) filter // inside .../binaries/data/, not recursively. wxArrayString EnumerateDataFiles(const wxString& dir, const wxString& filter); -}; +} diff --git a/source/tools/atlas/AtlasUI/General/VideoRecorder/FFmpeg.cpp b/source/tools/atlas/AtlasUI/General/VideoRecorder/FFmpeg.cpp index 492280710c..1ec681803a 100644 --- a/source/tools/atlas/AtlasUI/General/VideoRecorder/FFmpeg.cpp +++ b/source/tools/atlas/AtlasUI/General/VideoRecorder/FFmpeg.cpp @@ -25,6 +25,7 @@ Please complain if I forget to do those things. #include "ffmpeg/avformat.h" #include "ffmpeg/swscale.h" +// (Have to use a sufficiently recent version to get swscale - it needs the ~x86 keyword on Gentoo) struct VideoEncoderImpl { @@ -334,7 +335,7 @@ VideoEncoder::VideoEncoder(const wxString& filenameStr, int framerate, int bitra /* open the output file, if needed */ if (!(m->fmt->flags & AVFMT_NOFILE)) { if (url_fopen(&m->oc->pb, filename, URL_WRONLY) < 0) { - fprintf(stderr, "Could not open '%s'\n", filename); + fprintf(stderr, "Could not open '%s'\n", filename.data()); exit(1); } } diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/LightControl.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/LightControl.cpp index 9686fc3a17..df4c8dc15e 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/LightControl.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/LightControl.cpp @@ -72,8 +72,8 @@ public: } wxPaintDC dc(this); - #if OS_WIN - dc.DrawBitmap(wxBitmap(img, dc), 0, 0); + #ifdef __WXMSW__ + dc.DrawBitmap(wxBitmap(img, dc), 0, 0); // TODO: is this any better than the version below? #else dc.DrawBitmap(wxBitmap(img), 0, 0); #endif diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp index 739ba3b2c7..3778482600 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp @@ -135,4 +135,4 @@ void ObjectSettings::PostToGame() return; POST_COMMAND(SetObjectSettings, (m_View, m_SelectedObjects[0], GetSettings())); -} \ No newline at end of file +} diff --git a/source/tools/atlas/DatafileIO/Util.cpp b/source/tools/atlas/DatafileIO/Util.cpp index 8eebe660c6..ab41b8004f 100644 --- a/source/tools/atlas/DatafileIO/Util.cpp +++ b/source/tools/atlas/DatafileIO/Util.cpp @@ -24,7 +24,7 @@ void DatafileIO::WriteUString(OutputStream& stream, const utf16string& string) stream.Write((utf16_t*)&string[0], length*2); } -#if !OS_WIN +#ifndef _WIN32 // TODO In reality, these two should be able to de/encode UTF-16 to/from UCS-4 // instead of just treating UTF-16 as UCS-2 diff --git a/source/tools/atlas/DatafileIO/Util.h b/source/tools/atlas/DatafileIO/Util.h index 17cefb3a0d..87fa439219 100644 --- a/source/tools/atlas/DatafileIO/Util.h +++ b/source/tools/atlas/DatafileIO/Util.h @@ -1,11 +1,6 @@ #include #include -#if OS_UNIX -#include "ps/utf16string.h" -#include -#endif - #ifndef C_ASSERT #define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1] #endif @@ -36,7 +31,7 @@ namespace DatafileIO utf16string ReadUString(InputStream& stream); void WriteUString(OutputStream& stream, const utf16string& string); -#if OS_WIN +#ifdef _WIN32 # define utf16tow(_str) _str # define wtoutf16(_str) _str #else diff --git a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp index 6a74742a1e..a8aae11eb8 100644 --- a/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp +++ b/source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp @@ -7,6 +7,8 @@ #include "ps/Util.h" #include "ps/Game.h" +#include "graphics/GameView.h" +#include "graphics/CinemaTrack.h" #include "renderer/Renderer.h" #include "ps/GameSetup/GameSetup.h" #include "../GameLoop.h" diff --git a/source/tools/atlas/GameInterface/Handlers/TriggerHandler.cpp b/source/tools/atlas/GameInterface/Handlers/TriggerHandler.cpp index 0fa677299e..5417c3ed18 100644 --- a/source/tools/atlas/GameInterface/Handlers/TriggerHandler.cpp +++ b/source/tools/atlas/GameInterface/Handlers/TriggerHandler.cpp @@ -6,7 +6,7 @@ #include "simulation/TriggerManager.h" #include "ps/Game.h" -//#include "../CommandProc.h" +#include "graphics/GameView.h" namespace AtlasMessage { @@ -316,6 +316,6 @@ BEGIN_COMMAND(SetAllTriggers) SetCurrentTriggers(m_oldGroups); } }; -END_COMMAND(SetAllTriggers); +END_COMMAND(SetAllTriggers) } diff --git a/source/tools/atlas/GameInterface/MessagesSetup.h b/source/tools/atlas/GameInterface/MessagesSetup.h index 867cba012b..3aeb93665d 100644 --- a/source/tools/atlas/GameInterface/MessagesSetup.h +++ b/source/tools/atlas/GameInterface/MessagesSetup.h @@ -87,7 +87,7 @@ const bool NOMERGE = false; void* CloneData() const { return SHAREABLE_NEW(d##t, (*this)); } \ private: \ const m##t& operator=(const m##t&);\ - }; + } @@ -117,12 +117,12 @@ const bool NOMERGE = false; m##name( BOOST_PP_SEQ_FOR_EACH_I(B_CONSTRUCTORARGS, ~, vals) ) \ : BOOST_PP_SEQ_FOR_EACH_I(B_CONSTRUCTORINIT, ~, vals) {} \ BOOST_PP_SEQ_FOR_EACH_I(B_CONSTMEMBERS, ~, vals) \ - }; + } #define MESSAGE_WITHOUT_INPUTS(name, vals) \ MESSAGESTRUCT(name) \ m##name() {} \ - }; + } #define MESSAGE(name, vals) \ BOOST_PP_IIF( \ @@ -139,7 +139,7 @@ const bool NOMERGE = false; : BOOST_PP_SEQ_FOR_EACH_I(B_CONSTRUCTORINIT, ~, vals) {} \ BOOST_PP_SEQ_FOR_EACH_I(B_CONSTMEMBERS, ~, vals) \ }; \ - COMMANDSTRUCT(name, merge); + COMMANDSTRUCT(name, merge) // Need different syntax depending on whether there are some input values in the query: @@ -148,7 +148,7 @@ const bool NOMERGE = false; QUERYSTRUCT(name) \ q##name() {} \ BOOST_PP_SEQ_FOR_EACH_I(B_MEMBERS, ~, out_vals) /* other members */ \ - }; + } #define QUERY_WITH_INPUTS(name, in_vals, out_vals) \ QUERYSTRUCT(name) \ @@ -156,7 +156,7 @@ const bool NOMERGE = false; : BOOST_PP_SEQ_FOR_EACH_I(B_CONSTRUCTORINIT, ~, in_vals) {} \ BOOST_PP_SEQ_FOR_EACH_I(B_CONSTMEMBERS, ~, in_vals) \ BOOST_PP_SEQ_FOR_EACH_I(B_MEMBERS, ~, out_vals) \ - }; + } #define QUERY(name, in_vals, out_vals) \ BOOST_PP_IIF( \