Ticket #1113: clean-build-mac-r10909.diff
File clean-build-mac-r10909.diff, 15.3 KB (added by , 12 years ago) |
---|
-
source/ps/Util.cpp
33 33 #include "lib/sysdep/smbios.h" 34 34 #include "lib/tex/tex.h" 35 35 36 #include "ps/Pyrogenesis.h" 36 37 #include "ps/GameSetup/Config.h" 37 38 #include "ps/GameSetup/GameSetup.h" 38 39 #include "ps/Game.h" -
source/ps/Profiler2.cpp
28 28 #include "ps/CLogger.h" 29 29 #include "ps/CStr.h" 30 30 #include "ps/Profiler2GPU.h" 31 #include "ps/Pyrogenesis.h" 31 32 #include "third_party/mongoose/mongoose.h" 32 33 33 34 #include <iomanip> -
source/ps/ProfileViewer.cpp
27 27 28 28 #include "ProfileViewer.h" 29 29 30 #include "ps/Pyrogenesis.h" 30 31 #include "ps/CLogger.h" 31 32 #include "ps/Filesystem.h" 32 33 #include "ps/Font.h" -
source/ps/Replay.cpp
24 24 #include "lib/file/file_system.h" 25 25 #include "lib/res/h_mgr.h" 26 26 #include "lib/tex/tex.h" 27 #include "ps/Pyrogenesis.h" 27 28 #include "ps/Game.h" 28 29 #include "ps/Loader.h" 29 30 #include "ps/Profile.h" -
source/ps/GameSetup/Paths.cpp
54 54 m_config = appdata/"config"/""; 55 55 m_cache = appdata/"cache"/""; 56 56 m_logs = appdata/"logs"/""; 57 #elif defined __APPLE__ 58 const char* envHome = getenv("HOME"); 59 ENSURE(envHome); 60 const OsPath home(envHome); 61 m_data = home/"Library/Application Support/0AD/data/"; 62 m_cache = home/"Library/Application Support/0AD/cache/"; 63 m_config = home/"Library/Application Support/0AD/config/"; 64 m_logs = home/"Library/Application Support/0AD/logs/"; 57 65 #else 58 66 const char* envHome = getenv("HOME"); 59 67 ENSURE(envHome); … … 86 94 if(!FileExists(pathname)) 87 95 WARN_IF_ERR(StatusFromErrno()); 88 96 97 #ifndef MAC_NATIVE // when running natively on a mac, i.e. with a proper app bundle our data is inside the app wrapper instead of next to it 89 98 for(size_t i = 0; i < 2; i++) // remove "system/name.exe" 90 99 pathname = pathname.Parent(); 100 #endif 101 102 91 103 return pathname; 92 104 } 93 105 -
source/ps/DllLoader.cpp
89 89 { 90 90 CStr filename = GenerateFilename(name, suffixes[idxSuffix], extensions[idxExtension]); 91 91 92 #ifdef MAC_NATIVE // when running natively on a mac, i.e. with a proper app bundle our dylib is inside the app wrapper instead of next to it 93 filename = "@executable_path/" + filename; 94 #endif 95 92 96 // we don't really care when relocations take place, but one of 93 97 // {RTLD_NOW, RTLD_LAZY} must be specified. go with the former because 94 98 // it is safer and matches the Windows load behavior. -
source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinematic/Cinematic.cpp
490 490 491 491 displayH->Add(m_SplineDisplay, 0); 492 492 displayH->Add(m_RotationDisplay, 0); 493 m_Sizer->Add(displayH, 0, wx Top| wxALIGN_CENTER, 10);493 m_Sizer->Add(displayH, 0, wxALIGN_TOP | wxALIGN_CENTER, 10); 494 494 m_Sizer->Add(m_DrawCurrent, 0); 495 495 m_Sizer->Add( new wxButton(this, Reset_ID, L"Reset Camera"), 0, wxALIGN_CENTER ); 496 496 } -
source/tools/atlas/AtlasUI/Misc/KeyMap.cpp
19 19 20 20 #include "KeyMap.h" 21 21 22 #include "SDL_keysym.h"22 #include <SDL/SDL_keysym.h> 23 23 24 24 int GetSDLKeyFromWxKeyCode(int wxkey) 25 25 { -
source/tools/atlas/AtlasUI/CustomControls/ColourDialog/ColourDialog.h
18 18 #ifndef INCLUDED_COLOURDIALOG 19 19 #define INCLUDED_COLOURDIALOG 20 20 21 #include <wx/colordlg.h>21 #include "wx/colordlg.h" 22 22 23 23 class ColourDialog : public wxColourDialog 24 24 { -
source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h
30 30 #include "wx/wx.h" 31 31 #endif 32 32 33 #include <wx/dynarray.h>34 #include <wx/treectrl.h>35 #include <wx/filesys.h>36 #include <wx/imaglist.h>33 #include "wx/dynarray.h" 34 #include "wx/treectrl.h" 35 #include "wx/filesys.h" 36 #include "wx/imaglist.h" 37 37 38 38 enum 39 39 { -
source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp
32 32 #pragma hdrstop 33 33 #endif 34 34 35 #include <wx/dir.h>36 #include <wx/busyinfo.h>35 #include "wx/dir.h" 36 #include "wx/busyinfo.h" 37 37 #include "virtualdirtreectrl.h" 38 38 39 39 // default images -
source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp
66 66 67 67 s.skyset = g_Renderer.GetSkyManager()->GetSkySet(); 68 68 69 // RGBColor (CVector3D) colours69 // RGBColorVector (CVector3D) colours 70 70 #define COLOUR(A, B) A = Colour((int)(B.X*255), (int)(B.Y*255), (int)(B.Z*255)) 71 71 s.sunoverbrightness = MaxComponent(g_LightEnv.m_SunColor); 72 72 // clamp color to [0..1] before packing into u8 triplet … … 112 112 skySet = L"default"; 113 113 g_Renderer.GetSkyManager()->SetSkySet(skySet); 114 114 115 #define COLOUR(A, B) B = RGBColor (A->r/255.f, A->g/255.f, A->b/255.f)115 #define COLOUR(A, B) B = RGBColorVector(A->r/255.f, A->g/255.f, A->b/255.f) 116 116 COLOUR(s.suncolour, g_LightEnv.m_SunColor); 117 117 g_LightEnv.m_SunColor *= s.sunoverbrightness; 118 118 COLOUR(s.terraincolour, g_LightEnv.m_TerrainAmbientColor); -
source/graphics/ParticleEmitterType.cpp
539 539 540 540 particle.size = m_Variables[VAR_SIZE]->Evaluate(emitter); 541 541 542 RGBColor color;542 RGBColorVector color; 543 543 color.X = m_Variables[VAR_COLOR_R]->Evaluate(emitter); 544 544 color.Y = m_Variables[VAR_COLOR_G]->Evaluate(emitter); 545 545 color.Z = m_Variables[VAR_COLOR_B]->Evaluate(emitter); -
source/graphics/MapReader.cpp
593 593 } 594 594 else if (element_name == el_suncolour) 595 595 { 596 m_MapReader.m_LightEnv.m_SunColor = RGBColor (596 m_MapReader.m_LightEnv.m_SunColor = RGBColorVector( 597 597 attrs.GetNamedItem(at_r).ToFloat(), 598 598 attrs.GetNamedItem(at_g).ToFloat(), 599 599 attrs.GetNamedItem(at_b).ToFloat()); … … 608 608 } 609 609 else if (element_name == el_terrainambientcolour) 610 610 { 611 m_MapReader.m_LightEnv.m_TerrainAmbientColor = RGBColor (611 m_MapReader.m_LightEnv.m_TerrainAmbientColor = RGBColorVector( 612 612 attrs.GetNamedItem(at_r).ToFloat(), 613 613 attrs.GetNamedItem(at_g).ToFloat(), 614 614 attrs.GetNamedItem(at_b).ToFloat()); 615 615 } 616 616 else if (element_name == el_unitsambientcolour) 617 617 { 618 m_MapReader.m_LightEnv.m_UnitsAmbientColor = RGBColor (618 m_MapReader.m_LightEnv.m_UnitsAmbientColor = RGBColorVector( 619 619 attrs.GetNamedItem(at_r).ToFloat(), 620 620 attrs.GetNamedItem(at_g).ToFloat(), 621 621 attrs.GetNamedItem(at_b).ToFloat()); … … 1302 1302 1303 1303 CColor sunColor; 1304 1304 GET_ENVIRONMENT_PROPERTY(envObj.get(), SunColour, sunColor) 1305 m_LightEnv.m_SunColor = RGBColor (sunColor.r, sunColor.g, sunColor.b);1305 m_LightEnv.m_SunColor = RGBColorVector(sunColor.r, sunColor.g, sunColor.b); 1306 1306 1307 1307 GET_ENVIRONMENT_PROPERTY(envObj.get(), SunElevation, m_LightEnv.m_Elevation) 1308 1308 GET_ENVIRONMENT_PROPERTY(envObj.get(), SunRotation, m_LightEnv.m_Rotation) 1309 1309 1310 1310 CColor terrainAmbientColor; 1311 1311 GET_ENVIRONMENT_PROPERTY(envObj.get(), TerrainAmbientColour, terrainAmbientColor) 1312 m_LightEnv.m_TerrainAmbientColor = RGBColor (terrainAmbientColor.r, terrainAmbientColor.g, terrainAmbientColor.b);1312 m_LightEnv.m_TerrainAmbientColor = RGBColorVector(terrainAmbientColor.r, terrainAmbientColor.g, terrainAmbientColor.b); 1313 1313 1314 1314 CColor unitsAmbientColor; 1315 1315 GET_ENVIRONMENT_PROPERTY(envObj.get(), UnitsAmbientColour, unitsAmbientColor) 1316 m_LightEnv.m_UnitsAmbientColor = RGBColor (unitsAmbientColor.r, unitsAmbientColor.g, unitsAmbientColor.b);1316 m_LightEnv.m_UnitsAmbientColor = RGBColorVector(unitsAmbientColor.r, unitsAmbientColor.g, unitsAmbientColor.b); 1317 1317 1318 1318 // Water properties 1319 1319 CScriptValRooted waterObj; -
source/graphics/Color.h
28 28 29 29 // simple defines for 3 and 4 component floating point colors - just map to 30 30 // corresponding vector types 31 typedef CVector3D RGBColor ;32 typedef CVector4D RGBAColor ;31 typedef CVector3D RGBColorVector; 32 typedef CVector4D RGBAColorVector; 33 33 34 34 // exposed as function pointer because it is set at init-time to 35 35 // one of several implementations depending on CPU caps. 36 extern SColor4ub (*ConvertRGBColorTo4ub)(const RGBColor & src);36 extern SColor4ub (*ConvertRGBColorTo4ub)(const RGBColorVector& src); 37 37 38 38 // call once ia32_Init has run; detects CPU caps and activates the best 39 39 // possible codepath. -
source/graphics/tests/test_Color.h
39 39 private: 40 40 void CheckColor(int r, int g, int b, u32 expected) 41 41 { 42 SColor4ub colorStruct = ConvertRGBColorTo4ub(RGBColor (r,g,b));42 SColor4ub colorStruct = ConvertRGBColorTo4ub(RGBColorVector(r,g,b)); 43 43 u32 actual; 44 44 memcpy(&actual, &colorStruct, sizeof(u32)); 45 45 expected |= 0xff000000; // ConvertRGBColorTo4ub sets alpha to opaque -
source/graphics/LightEnv.h
70 70 std::string m_LightingModel; 71 71 72 72 public: 73 RGBColor m_SunColor;74 RGBColor m_TerrainAmbientColor;75 RGBColor m_UnitsAmbientColor;73 RGBColorVector m_SunColor; 74 RGBColorVector m_TerrainAmbientColor; 75 RGBColorVector m_UnitsAmbientColor; 76 76 77 77 public: 78 78 CLightEnv(); … … 98 98 * @param normal normal vector (must have length 1) 99 99 * @param color resulting color 100 100 */ 101 void EvaluateTerrain(const CVector3D& normal, RGBColor & color) const101 void EvaluateTerrain(const CVector3D& normal, RGBColorVector& color) const 102 102 { 103 103 float dot = -normal.Dot(m_SunDir); 104 104 … … 115 115 * @param normal normal vector (must have length 1) 116 116 * @param color resulting color 117 117 */ 118 void EvaluateUnit(const CVector3D& normal, RGBColor & color) const118 void EvaluateUnit(const CVector3D& normal, RGBColorVector& color) const 119 119 { 120 120 float dot = -normal.Dot(m_SunDir); 121 121 … … 131 131 * @param normal normal vector (must have length 1) 132 132 * @param color resulting color 133 133 */ 134 void EvaluateDirect(const CVector3D& normal, RGBColor & color) const134 void EvaluateDirect(const CVector3D& normal, RGBColorVector& color) const 135 135 { 136 136 float dot = -normal.Dot(m_SunDir); 137 137 -
source/graphics/Color.cpp
31 31 # include "lib/sysdep/arch/x86_x64/x86_x64.h" 32 32 #endif 33 33 34 static SColor4ub fallback_ConvertRGBColorTo4ub(const RGBColor & src)34 static SColor4ub fallback_ConvertRGBColorTo4ub(const RGBColorVector& src) 35 35 { 36 36 SColor4ub result; 37 37 result.R=clamp(int(src.X*255),0,255); … … 42 42 } 43 43 44 44 // on IA32, this is replaced by an SSE assembly version in ia32.cpp 45 SColor4ub (*ConvertRGBColorTo4ub)(const RGBColor & src) = fallback_ConvertRGBColorTo4ub;45 SColor4ub (*ConvertRGBColorTo4ub)(const RGBColorVector& src) = fallback_ConvertRGBColorTo4ub; 46 46 47 47 48 48 // Assembler-optimized function for color conversion 49 49 #if ARCH_X86_X64 50 static SColor4ub sse_ConvertRGBColorTo4ub(const RGBColor & src)50 static SColor4ub sse_ConvertRGBColorTo4ub(const RGBColorVector& src) 51 51 { 52 52 const __m128 zero = _mm_setzero_ps(); 53 53 const __m128 _255 = _mm_set_ss(255.0f); -
source/renderer/ModelRenderer.cpp
129 129 size_t numVertices = mdef->GetNumVertices(); 130 130 const CLightEnv& lightEnv = g_Renderer.GetLightEnv(); 131 131 CColor shadingColor = model->GetShadingColor(); 132 RGBColor tempcolor;132 RGBColorVector tempcolor; 133 133 134 134 for (size_t j=0; j<numVertices; j++) 135 135 { -
source/renderer/TerrainRenderer.cpp
297 297 298 298 glBlendFunc(GL_DST_COLOR, GL_ZERO); 299 299 300 // GL_TEXTURE_ENV_COLOR requires four floats, so we shouldn't use the RGBColor directly300 // GL_TEXTURE_ENV_COLOR requires four floats, so we shouldn't use the RGBColorVector directly 301 301 float terrainAmbientColor[4] = { 302 302 lightEnv.m_TerrainAmbientColor.X, 303 303 lightEnv.m_TerrainAmbientColor.Y, -
source/lib/external_libraries/libsdl.h
34 34 # include "lib/sysdep/os/win/wsdl.h" 35 35 #else 36 36 37 # include "SDL .h"38 # include "SDL _thread.h"37 # include "SDL/SDL.h" 38 # include "SDL/SDL_thread.h" 39 39 40 40 // if the compiler doesn't support inlining, this header will pull 41 41 // in static bswap routines. doesn't matter - modern compilers 42 42 // will strip them if unused, and this is more convenient than 43 43 // another header that toggles between wsdl and SDL_endian.h. 44 # include "SDL _endian.h"44 # include "SDL/SDL_endian.h" 45 45 46 46 # if MSC_VERSION 47 47 # pragma comment(lib, "SDL")