From 9c904db1c33cddf7a630afd9aaa344e575a350ea Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 01:22:35 +0000 Subject: [PATCH 01/76] Add UI src project --- openrct2.sln | 86 ++++++++++++++++----------- src/openrct2-ui/libopenrct2ui.vcxproj | 57 ++++++++++++++++++ 2 files changed, 108 insertions(+), 35 deletions(-) create mode 100644 src/openrct2-ui/libopenrct2ui.vcxproj diff --git a/openrct2.sln b/openrct2.sln index 875b2e8825..90e2adc669 100644 --- a/openrct2.sln +++ b/openrct2.sln @@ -1,16 +1,18 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.9 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-dll", "src\openrct2-dll\openrct2-dll.vcxproj", "{7B8DB129-79EF-417E-B372-8A18E009D261}" ProjectSection(ProjectDependencies) = postProject + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-win", "src\openrct2-win\openrct2-win.vcxproj", "{7A9A57D5-7006-4208-A290-5491BA3C8808}" ProjectSection(ProjectDependencies) = postProject {7B8DB129-79EF-417E-B372-8A18E009D261} = {7B8DB129-79EF-417E-B372-8A18E009D261} + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F} EndProjectSection EndProject @@ -27,6 +29,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2202A816-377 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{480B577D-4E4A-4757-9A42-28A9AD33E6B0}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenrct2ui", "src\openrct2-ui\libopenrct2ui.vcxproj", "{8DD8AB7D-2EA6-44E3-8265-BAF08E832951}" + ProjectSection(ProjectDependencies) = postProject + {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -35,35 +42,6 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.Build.0 = Debug|Win32 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.ActiveCfg = Debug|x64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.Build.0 = Debug|x64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.ActiveCfg = Release|Win32 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.Build.0 = Release|Win32 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.ActiveCfg = Release|x64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.Build.0 = Release|x64 - {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|Win32.ActiveCfg = Debug|Win32 - {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|Win32.Build.0 = Debug|Win32 - {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|x64.ActiveCfg = Debug|Win32 - {57E60BA1-FB76-4316-909E-C1449C142327}.Release|Win32.ActiveCfg = Release|Win32 - {57E60BA1-FB76-4316-909E-C1449C142327}.Release|x64.ActiveCfg = Release|Win32 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.ActiveCfg = Debug|Win32 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.Build.0 = Debug|Win32 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.ActiveCfg = Debug|x64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.Build.0 = Debug|x64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.ActiveCfg = Release|Win32 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.Build.0 = Release|Win32 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.ActiveCfg = Release|x64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.Build.0 = Release|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.ActiveCfg = Debug|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.Build.0 = Debug|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.ActiveCfg = Debug|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.Build.0 = Debug|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.ActiveCfg = Release|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.Build.0 = Release|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.ActiveCfg = Release|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.Build.0 = Release|x64 {7B8DB129-79EF-417E-B372-8A18E009D261}.Debug|Win32.ActiveCfg = Debug|Win32 {7B8DB129-79EF-417E-B372-8A18E009D261}.Debug|Win32.Build.0 = Debug|Win32 {7B8DB129-79EF-417E-B372-8A18E009D261}.Debug|x64.ActiveCfg = Debug|x64 @@ -72,15 +50,53 @@ Global {7B8DB129-79EF-417E-B372-8A18E009D261}.Release|Win32.Build.0 = Release|Win32 {7B8DB129-79EF-417E-B372-8A18E009D261}.Release|x64.ActiveCfg = Release|x64 {7B8DB129-79EF-417E-B372-8A18E009D261}.Release|x64.Build.0 = Release|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.Build.0 = Debug|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.ActiveCfg = Debug|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.Build.0 = Debug|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.ActiveCfg = Release|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.Build.0 = Release|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.ActiveCfg = Release|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.Build.0 = Release|x64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.Build.0 = Debug|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.ActiveCfg = Debug|x64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.Build.0 = Debug|x64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.ActiveCfg = Release|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.Build.0 = Release|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.ActiveCfg = Release|x64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.Build.0 = Release|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.ActiveCfg = Debug|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.Build.0 = Debug|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.ActiveCfg = Debug|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.Build.0 = Debug|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.ActiveCfg = Release|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.Build.0 = Release|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.ActiveCfg = Release|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.Build.0 = Release|x64 + {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|Win32.ActiveCfg = Debug|Win32 + {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|Win32.Build.0 = Debug|Win32 + {57E60BA1-FB76-4316-909E-C1449C142327}.Debug|x64.ActiveCfg = Debug|Win32 + {57E60BA1-FB76-4316-909E-C1449C142327}.Release|Win32.ActiveCfg = Release|Win32 + {57E60BA1-FB76-4316-909E-C1449C142327}.Release|x64.ActiveCfg = Release|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|Win32.ActiveCfg = Debug|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|Win32.Build.0 = Debug|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|x64.ActiveCfg = Debug|x64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|x64.Build.0 = Debug|x64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|Win32.ActiveCfg = Release|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|Win32.Build.0 = Release|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.ActiveCfg = Release|x64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D24D94F6-2A74-480C-B512-629C306CE92F} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} - {57E60BA1-FB76-4316-909E-C1449C142327} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} - {62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} - {7A9A57D5-7006-4208-A290-5491BA3C8808} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} {7B8DB129-79EF-417E-B372-8A18E009D261} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} + {7A9A57D5-7006-4208-A290-5491BA3C8808} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} + {D24D94F6-2A74-480C-B512-629C306CE92F} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} + {62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} + {57E60BA1-FB76-4316-909E-C1449C142327} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} EndGlobalSection EndGlobal diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj new file mode 100644 index 0000000000..edb37b08e5 --- /dev/null +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -0,0 +1,57 @@ + + + + ..\..\ + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} + openrct2-ui + libopenrct2ui + + + StaticLibrary + + + + DynamicLibrary + + + + openrct2 + + + + __ENABLE_LIGHTFX__;%(PreprocessorDefinitions) + USE_BREAKPAD;%(PreprocessorDefinitions) + + + + + $(IntDir)\%(RelativeDir) + $(OPENRCT2_CL_ADDITIONALOPTIONS) %(AdditionalOptions) + + + MachineX86 + MachineX64 + + + + \ No newline at end of file From 19aafc4e247ab4472ed29a881f34c21c0061f5d9 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 01:26:40 +0000 Subject: [PATCH 02/76] Move drawing engine implementation code to openrct2-ui --- .../drawing/engines/SoftwareDrawingEngine.cpp | 0 .../engines/opengl/CopyFramebufferShader.cpp | 0 .../engines/opengl/CopyFramebufferShader.h | 0 .../drawing/engines/opengl/DrawCommands.h | 0 .../engines/opengl/DrawImageShader.cpp | 0 .../drawing/engines/opengl/DrawImageShader.h | 0 .../drawing/engines/opengl/DrawLineShader.cpp | 0 .../drawing/engines/opengl/DrawLineShader.h | 0 .../drawing/engines/opengl/FillRectShader.cpp | 0 .../drawing/engines/opengl/FillRectShader.h | 0 .../drawing/engines/opengl/GLSLTypes.h | 0 .../drawing/engines/opengl/OpenGLAPI.cpp | 0 .../drawing/engines/opengl/OpenGLAPI.h | 0 .../engines/opengl/OpenGLDrawingEngine.cpp | 0 .../engines/opengl/OpenGLFramebuffer.cpp | 0 .../engines/opengl/OpenGLFramebuffer.h | 0 .../engines/opengl/OpenGLShaderProgram.cpp | 0 .../engines/opengl/OpenGLShaderProgram.h | 0 .../engines/opengl/SwapFramebuffer.cpp | 0 .../drawing/engines/opengl/SwapFramebuffer.h | 0 .../drawing/engines/opengl/TextureCache.cpp | 0 .../drawing/engines/opengl/TextureCache.h | 0 src/openrct2-ui/libopenrct2ui.vcxproj | 26 +++++++++++++++++++ 23 files changed, 26 insertions(+) rename src/{openrct2 => openrct2-ui}/drawing/engines/SoftwareDrawingEngine.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/CopyFramebufferShader.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/CopyFramebufferShader.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/DrawCommands.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/DrawImageShader.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/DrawImageShader.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/DrawLineShader.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/DrawLineShader.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/FillRectShader.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/FillRectShader.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/GLSLTypes.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLAPI.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLAPI.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLDrawingEngine.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLFramebuffer.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLFramebuffer.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLShaderProgram.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/OpenGLShaderProgram.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/SwapFramebuffer.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/SwapFramebuffer.h (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/TextureCache.cpp (100%) rename src/{openrct2 => openrct2-ui}/drawing/engines/opengl/TextureCache.h (100%) diff --git a/src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp similarity index 100% rename from src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp rename to src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp diff --git a/src/openrct2/drawing/engines/opengl/CopyFramebufferShader.cpp b/src/openrct2-ui/drawing/engines/opengl/CopyFramebufferShader.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/CopyFramebufferShader.cpp rename to src/openrct2-ui/drawing/engines/opengl/CopyFramebufferShader.cpp diff --git a/src/openrct2/drawing/engines/opengl/CopyFramebufferShader.h b/src/openrct2-ui/drawing/engines/opengl/CopyFramebufferShader.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/CopyFramebufferShader.h rename to src/openrct2-ui/drawing/engines/opengl/CopyFramebufferShader.h diff --git a/src/openrct2/drawing/engines/opengl/DrawCommands.h b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/DrawCommands.h rename to src/openrct2-ui/drawing/engines/opengl/DrawCommands.h diff --git a/src/openrct2/drawing/engines/opengl/DrawImageShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawImageShader.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/DrawImageShader.cpp rename to src/openrct2-ui/drawing/engines/opengl/DrawImageShader.cpp diff --git a/src/openrct2/drawing/engines/opengl/DrawImageShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawImageShader.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/DrawImageShader.h rename to src/openrct2-ui/drawing/engines/opengl/DrawImageShader.h diff --git a/src/openrct2/drawing/engines/opengl/DrawLineShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/DrawLineShader.cpp rename to src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp diff --git a/src/openrct2/drawing/engines/opengl/DrawLineShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/DrawLineShader.h rename to src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h diff --git a/src/openrct2/drawing/engines/opengl/FillRectShader.cpp b/src/openrct2-ui/drawing/engines/opengl/FillRectShader.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/FillRectShader.cpp rename to src/openrct2-ui/drawing/engines/opengl/FillRectShader.cpp diff --git a/src/openrct2/drawing/engines/opengl/FillRectShader.h b/src/openrct2-ui/drawing/engines/opengl/FillRectShader.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/FillRectShader.h rename to src/openrct2-ui/drawing/engines/opengl/FillRectShader.h diff --git a/src/openrct2/drawing/engines/opengl/GLSLTypes.h b/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/GLSLTypes.h rename to src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h diff --git a/src/openrct2/drawing/engines/opengl/OpenGLAPI.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLAPI.cpp rename to src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp diff --git a/src/openrct2/drawing/engines/opengl/OpenGLAPI.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLAPI.h rename to src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h diff --git a/src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp rename to src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp diff --git a/src/openrct2/drawing/engines/opengl/OpenGLFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLFramebuffer.cpp rename to src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp diff --git a/src/openrct2/drawing/engines/opengl/OpenGLFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLFramebuffer.h rename to src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h diff --git a/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.cpp rename to src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp diff --git a/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h rename to src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h diff --git a/src/openrct2/drawing/engines/opengl/SwapFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/SwapFramebuffer.cpp rename to src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp diff --git a/src/openrct2/drawing/engines/opengl/SwapFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/SwapFramebuffer.h rename to src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h diff --git a/src/openrct2/drawing/engines/opengl/TextureCache.cpp b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp similarity index 100% rename from src/openrct2/drawing/engines/opengl/TextureCache.cpp rename to src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp diff --git a/src/openrct2/drawing/engines/opengl/TextureCache.h b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h similarity index 100% rename from src/openrct2/drawing/engines/opengl/TextureCache.h rename to src/openrct2-ui/drawing/engines/opengl/TextureCache.h diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index edb37b08e5..6a6d997ccd 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -21,6 +21,32 @@ x64 + + + + + + + + + + + + + + + + + + + + + + + + + + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} openrct2-ui From c7b66ab193e8215b9d31c57c3686730e866a6801 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 01:36:05 +0000 Subject: [PATCH 03/76] Fix includes for moved files --- src/openrct2-dll/openrct2-dll.vcxproj | 2 +- .../drawing/engines/SoftwareDrawingEngine.cpp | 33 ++++++++++--------- .../drawing/engines/opengl/DrawCommands.h | 2 +- .../drawing/engines/opengl/GLSLTypes.h | 2 +- .../drawing/engines/opengl/OpenGLAPI.cpp | 2 +- .../drawing/engines/opengl/OpenGLAPI.h | 2 +- .../engines/opengl/OpenGLDrawingEngine.cpp | 26 +++++++-------- .../engines/opengl/OpenGLFramebuffer.cpp | 4 +-- .../engines/opengl/OpenGLFramebuffer.h | 2 +- .../engines/opengl/OpenGLShaderProgram.cpp | 14 ++++---- .../engines/opengl/OpenGLShaderProgram.h | 2 +- .../drawing/engines/opengl/SwapFramebuffer.h | 2 +- .../drawing/engines/opengl/TextureCache.cpp | 4 +-- .../drawing/engines/opengl/TextureCache.h | 2 +- 14 files changed, 50 insertions(+), 49 deletions(-) diff --git a/src/openrct2-dll/openrct2-dll.vcxproj b/src/openrct2-dll/openrct2-dll.vcxproj index 79367987c9..9ba350c54f 100644 --- a/src/openrct2-dll/openrct2-dll.vcxproj +++ b/src/openrct2-dll/openrct2-dll.vcxproj @@ -45,7 +45,7 @@ $(OPENRCT2_CL_ADDITIONALOPTIONS) %(AdditionalOptions) - libopenrct2.lib;%(AdditionalDependencies) + libopenrct2.lib;libopenrct2ui.lib;%(AdditionalDependencies) $(OutDir)openrct2-dll.pdb diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index e32ff739b0..f54ad0853d 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -14,25 +14,26 @@ *****************************************************************************/ #pragma endregion -#include "../../core/Guard.hpp" -#include "../../core/Math.hpp" -#include "../../core/Memory.hpp" -#include "../IDrawingContext.h" -#include "../IDrawingEngine.h" -#include "../Rain.h" +#include +#include +#include +#include +#include +#include +#include extern "C" { - #include "../../config/Config.h" - #include "../../game.h" - #include "../../interface/screenshot.h" - #include "../../interface/viewport.h" - #include "../../interface/window.h" - #include "../../intro.h" - #include "../../platform/platform.h" - #include "../../rct2.h" - #include "../drawing.h" - #include "../lightfx.h" + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include } class SoftwareDrawingEngine; diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h index 952d5118d6..46833b9e23 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #include "OpenGLAPI.h" #include "GLSLTypes.h" #include "TextureCache.h" diff --git a/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h b/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h index 301bfe5389..ddaa0ddb2d 100644 --- a/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h +++ b/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #pragma pack(push, 1) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp index 09641de1f4..eb6ebb7b82 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp @@ -23,7 +23,7 @@ #include -#include "../../../core/Console.hpp" +#include template static inline bool SetProc(T * func, const char * name) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h index 3bf9324a60..9d112f7897 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #if OPENGL_NO_LINK diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index e870cf540b..8e95f504d8 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -40,22 +40,22 @@ IDrawingEngine * DrawingEngineFactory::CreateOpenGL() #include "TextureCache.h" #include "DrawCommands.h" -#include "../../../core/Console.hpp" -#include "../../../core/Exception.hpp" -#include "../../../core/Math.hpp" -#include "../../../core/Memory.hpp" -#include "../../IDrawingContext.h" -#include "../../IDrawingEngine.h" -#include "../../Rain.h" -#include "../../../config/Config.h" +#include +#include +#include +#include +#include +#include +#include +#include extern "C" { - #include "../../../config/Config.h" - #include "../../../interface/screenshot.h" - #include "../../../interface/window.h" - #include "../../../intro.h" - #include "../../drawing.h" + #include + #include + #include + #include + #include } struct OpenGLVersion diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp index d8bc8502cd..0e7e284247 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp @@ -16,9 +16,9 @@ #ifndef DISABLE_OPENGL -#include "../../../common.h" +#include #include -#include "../../../core/Memory.hpp" +#include #include "OpenGLFramebuffer.h" constexpr GLuint BACKBUFFER_ID = 0; diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h index 9e5c5054d3..855cc57de3 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #include "OpenGLAPI.h" struct SDL_Window; diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp index 575804c76e..7aede03d5a 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp @@ -16,17 +16,17 @@ #ifndef DISABLE_OPENGL -#include "../../../core/Console.hpp" -#include "../../../core/Exception.hpp" -#include "../../../core/FileStream.hpp" -#include "../../../core/Memory.hpp" -#include "../../../core/Path.hpp" -#include "../../../core/String.hpp" +#include +#include +#include +#include +#include +#include #include "OpenGLShaderProgram.h" extern "C" { - #include "../../../platform/platform.h" + #include } OpenGLShader::OpenGLShader(const char * name, GLenum type) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h index 308ef7888d..9c06cab655 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #include "OpenGLAPI.h" class OpenGLShader final diff --git a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h index 53c24d0890..d520689e2f 100644 --- a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h @@ -16,7 +16,7 @@ #pragma once -#include "../../../common.h" +#include #include "OpenGLAPI.h" class CopyFramebufferShader; diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp index b970bbebce..8aba570172 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp @@ -18,12 +18,12 @@ #include #include -#include "../../../core/Memory.hpp" +#include #include "TextureCache.h" extern "C" { - #include "../../drawing.h" + #include } TextureCache::~TextureCache() diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h index b79719f054..6c39fd4b95 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h @@ -20,7 +20,7 @@ #include #include #include -#include "../../../common.h" +#include #include "OpenGLAPI.h" #include "GLSLTypes.h" From bf3749833d8c5039d47cc963215bb055f51fccad Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 02:47:43 +0000 Subject: [PATCH 04/76] Allow drawing engine registration via context interfaces --- src/openrct2-dll/openrct2-dll.cpp | 11 +++- src/openrct2-ui/UiContext.cpp | 49 ++++++++++++++++++ src/openrct2-ui/UiContext.h | 34 +++++++++++++ .../drawing/engines/DrawingEngines.h | 50 +++++++++++++++++++ .../drawing/engines/SoftwareDrawingEngine.cpp | 25 +++++++++- .../engines/opengl/OpenGLDrawingEngine.cpp | 37 +++++++++----- src/openrct2-ui/libopenrct2ui.vcxproj | 3 ++ src/openrct2/Context.cpp | 42 ++++++++++++++++ src/openrct2/Context.h | 33 ++++++++++++ src/openrct2/drawing/IDrawingEngine.h | 12 +++-- src/openrct2/drawing/NewDrawing.cpp | 40 ++++++++++----- 11 files changed, 304 insertions(+), 32 deletions(-) create mode 100644 src/openrct2-ui/UiContext.cpp create mode 100644 src/openrct2-ui/UiContext.h create mode 100644 src/openrct2-ui/drawing/engines/DrawingEngines.h create mode 100644 src/openrct2/Context.cpp create mode 100644 src/openrct2/Context.h diff --git a/src/openrct2-dll/openrct2-dll.cpp b/src/openrct2-dll/openrct2-dll.cpp index 622160bb42..8e08fd6d39 100644 --- a/src/openrct2-dll/openrct2-dll.cpp +++ b/src/openrct2-dll/openrct2-dll.cpp @@ -20,7 +20,9 @@ #include #include #include +#include #include +#include #define DLLEXPORT extern "C" __declspec(dllexport) @@ -37,7 +39,14 @@ DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) return -1; } - int exitCode = RunOpenRCT2(argc, argv); + OpenRCT2::IContext * context = OpenRCT2::CreateContext(); + OpenRCT2::Ui::IUiContext * uiContext = OpenRCT2::Ui::CreateContext(context); + + int exitCode = context->RunOpenRCT2(argc, argv); + + delete uiContext; + delete context; + FreeCommandLineArgs(argc, argv); return exitCode; } diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp new file mode 100644 index 0000000000..007b10a286 --- /dev/null +++ b/src/openrct2-ui/UiContext.cpp @@ -0,0 +1,49 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include "UiContext.h" +#include "drawing\engines\DrawingEngines.h" + +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + +class UiContext : public IUiContext +{ +private: + IContext * const _context; + + // Drawing engines + SoftwareDrawingEngineFactory _softwareDrawingFactory; + HardwareDisplayDrawingEngineFactory _hardwareDrawingFactory; +#ifndef DISABLE_OPENGL + OpenGLDrawingEngineFactory _openglDrawingFactory; +#endif + +public: + UiContext(IContext * context) : + _context(context) + { + } + + ~UiContext() override + { + } +}; + +IUiContext * OpenRCT2::Ui::CreateContext(IContext * context) +{ + return new UiContext(context); +} diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h new file mode 100644 index 0000000000..ff3b7727d9 --- /dev/null +++ b/src/openrct2-ui/UiContext.h @@ -0,0 +1,34 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include + +namespace OpenRCT2 +{ + interface IContext; + + namespace Ui + { + interface IUiContext + { + virtual ~IUiContext() { } + }; + + IUiContext * CreateContext(IContext * context); + } +} diff --git a/src/openrct2-ui/drawing/engines/DrawingEngines.h b/src/openrct2-ui/drawing/engines/DrawingEngines.h new file mode 100644 index 0000000000..f824c203d3 --- /dev/null +++ b/src/openrct2-ui/drawing/engines/DrawingEngines.h @@ -0,0 +1,50 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include +#include + +interface IDrawingEngineFactory; + +class SoftwareDrawingEngineFactory : public IDrawingEngineFactory +{ +public: + SoftwareDrawingEngineFactory(); + ~SoftwareDrawingEngineFactory() override; + IDrawingEngine * Create() override; +}; + +class HardwareDisplayDrawingEngineFactory : public IDrawingEngineFactory +{ +public: + HardwareDisplayDrawingEngineFactory(); + ~HardwareDisplayDrawingEngineFactory() override; + IDrawingEngine * Create() override; +}; + +#ifndef DISABLE_OPENGL + +class OpenGLDrawingEngineFactory : public IDrawingEngineFactory +{ +public: + OpenGLDrawingEngineFactory(); + ~OpenGLDrawingEngineFactory() override; + IDrawingEngine * Create() override; +}; + +#endif // DISABLE_OPENGL diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index f54ad0853d..d31ce3c916 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -21,6 +21,7 @@ #include #include #include +#include "DrawingEngines.h" extern "C" { @@ -827,12 +828,32 @@ private: } }; -IDrawingEngine * DrawingEngineFactory::CreateSoftware() +SoftwareDrawingEngineFactory::SoftwareDrawingEngineFactory() +{ + DrawingEngineFactory::Register(DRAWING_ENGINE_SOFTWARE, this); +} + +SoftwareDrawingEngineFactory::~SoftwareDrawingEngineFactory() +{ + DrawingEngineFactory::Unregister(DRAWING_ENGINE_SOFTWARE); +} + +IDrawingEngine * SoftwareDrawingEngineFactory::Create() { return new SoftwareDrawingEngine(false); } -IDrawingEngine * DrawingEngineFactory::CreateSoftwareWithHardwareDisplay() +HardwareDisplayDrawingEngineFactory::HardwareDisplayDrawingEngineFactory() +{ + DrawingEngineFactory::Register(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY, this); +} + +HardwareDisplayDrawingEngineFactory::~HardwareDisplayDrawingEngineFactory() +{ + DrawingEngineFactory::Unregister(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY); +} + +IDrawingEngine * HardwareDisplayDrawingEngineFactory::Create() { return new SoftwareDrawingEngine(true); } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 8e95f504d8..0d7d431902 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -29,17 +29,7 @@ IDrawingEngine * DrawingEngineFactory::CreateOpenGL() #include #include -#include "GLSLTypes.h" -#include "OpenGLAPI.h" -#include "OpenGLFramebuffer.h" -#include "CopyFramebufferShader.h" -#include "DrawImageShader.h" -#include "DrawLineShader.h" -#include "FillRectShader.h" -#include "SwapFramebuffer.h" -#include "TextureCache.h" -#include "DrawCommands.h" - +#include #include #include #include @@ -51,13 +41,24 @@ IDrawingEngine * DrawingEngineFactory::CreateOpenGL() extern "C" { - #include #include #include #include #include } +#include "../DrawingEngines.h" +#include "GLSLTypes.h" +#include "OpenGLAPI.h" +#include "OpenGLFramebuffer.h" +#include "CopyFramebufferShader.h" +#include "DrawImageShader.h" +#include "DrawLineShader.h" +#include "FillRectShader.h" +#include "SwapFramebuffer.h" +#include "TextureCache.h" +#include "DrawCommands.h" + struct OpenGLVersion { GLint Major; @@ -498,7 +499,17 @@ private: } }; -IDrawingEngine * DrawingEngineFactory::CreateOpenGL() +OpenGLDrawingEngineFactory::OpenGLDrawingEngineFactory() +{ + DrawingEngineFactory::Register(DRAWING_ENGINE_OPENGL, this); +} + +OpenGLDrawingEngineFactory::~OpenGLDrawingEngineFactory() +{ + DrawingEngineFactory::Unregister(DRAWING_ENGINE_OPENGL); +} + +IDrawingEngine * OpenGLDrawingEngineFactory::Create() { return new OpenGLDrawingEngine(); } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 6a6d997ccd..9e3a847bee 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -33,8 +33,10 @@ + + @@ -46,6 +48,7 @@ + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp new file mode 100644 index 0000000000..d8b66ec73d --- /dev/null +++ b/src/openrct2/Context.cpp @@ -0,0 +1,42 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include "Context.h" +#include "OpenRCT2.h" + +using namespace OpenRCT2; + +class Context : public IContext +{ +public: + Context() + { + } + + ~Context() override + { + } + + sint32 RunOpenRCT2(int argc, char * * argv) override + { + return ::RunOpenRCT2(argc, argv); + } +}; + +IContext * OpenRCT2::CreateContext() +{ + return new Context(); +} diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h new file mode 100644 index 0000000000..5557f153f8 --- /dev/null +++ b/src/openrct2/Context.h @@ -0,0 +1,33 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include + +namespace OpenRCT2 +{ + /** + * Represents an instance of OpenRCT2 and can be used to get various services. + */ + interface IContext + { + virtual ~IContext() { } + virtual sint32 RunOpenRCT2(int argc, char * * argv) abstract; + }; + + IContext * CreateContext(); +} diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index a9e7287201..1c3a706f4b 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -26,6 +26,7 @@ enum DRAWING_ENGINE DRAWING_ENGINE_SOFTWARE, DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY, DRAWING_ENGINE_OPENGL, + DRAWING_ENGINE_COUNT, }; enum DRAWING_ENGINE_FLAGS @@ -66,11 +67,16 @@ interface IDrawingEngine virtual void InvalidateImage(uint32 image) abstract; }; +interface IDrawingEngineFactory +{ + virtual ~IDrawingEngineFactory() { } + virtual IDrawingEngine * Create() abstract; +}; + namespace DrawingEngineFactory { - IDrawingEngine * CreateSoftware(); - IDrawingEngine * CreateSoftwareWithHardwareDisplay(); - IDrawingEngine * CreateOpenGL(); + void Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory); + void Unregister(DRAWING_ENGINE type); } interface IRainDrawer diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 5e2b479ad8..9f5360632c 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -29,8 +29,27 @@ extern "C" #include "../rct2.h" } -static sint32 _drawingEngineType = DRAWING_ENGINE_SOFTWARE; -static IDrawingEngine * _drawingEngine = nullptr; +static sint32 _drawingEngineType = DRAWING_ENGINE_SOFTWARE; +static IDrawingEngine * _drawingEngine = nullptr; +static IDrawingEngineFactory * _drawingEngineFactories[DRAWING_ENGINE_COUNT] = { nullptr }; + +void DrawingEngineFactory::Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory) +{ + if (_drawingEngineFactories[type] != nullptr) + { + throw std::invalid_argument("Engine already registered."); + } + _drawingEngineFactories[type] = factory; +} + +void DrawingEngineFactory::Unregister(DRAWING_ENGINE type) +{ + if (_drawingEngineFactories[type] == nullptr) + { + throw std::invalid_argument("Engine not registered."); + } + _drawingEngineFactories[type] = nullptr; +} extern "C" { @@ -69,20 +88,15 @@ extern "C" { assert(_drawingEngine == nullptr); - IDrawingEngine * drawingEngine = nullptr; _drawingEngineType = gConfigGeneral.drawing_engine; - switch (_drawingEngineType) { - case DRAWING_ENGINE_SOFTWARE: - drawingEngine = DrawingEngineFactory::CreateSoftware(); - break; - case DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY: - drawingEngine = DrawingEngineFactory::CreateSoftwareWithHardwareDisplay(); - break; - case DRAWING_ENGINE_OPENGL: - drawingEngine = DrawingEngineFactory::CreateOpenGL(); - break; + IDrawingEngineFactory * deFactory = _drawingEngineFactories[_drawingEngineType]; + if (deFactory == nullptr) + { + log_fatal("Drawing engine not registered."); + exit(-1); } + IDrawingEngine * drawingEngine = deFactory->Create(); if (drawingEngine == nullptr) { if (_drawingEngineType == DRAWING_ENGINE_SOFTWARE) From 006a76c099f502d10290e22dce3477b87efc4735 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 16:26:43 +0000 Subject: [PATCH 05/76] Refactor registration of drawing engines --- src/openrct2-ui/UiContext.cpp | 8 +++ .../drawing/engines/DrawingEngines.h | 43 ++++++------ .../drawing/engines/SoftwareDrawingEngine.cpp | 24 +------ .../engines/opengl/OpenGLDrawingEngine.cpp | 12 +--- src/openrct2/Context.cpp | 6 ++ src/openrct2/Context.h | 10 ++- src/openrct2/core/Registration.hpp | 67 +++++++++++++++++++ src/openrct2/drawing/IDrawingEngine.h | 31 +++++---- src/openrct2/drawing/NewDrawing.cpp | 20 +++--- 9 files changed, 143 insertions(+), 78 deletions(-) create mode 100644 src/openrct2/core/Registration.hpp diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 007b10a286..6863b0a758 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -14,6 +14,10 @@ *****************************************************************************/ #pragma endregion +#include +#include +#include +#include #include "UiContext.h" #include "drawing\engines\DrawingEngines.h" @@ -24,6 +28,7 @@ class UiContext : public IUiContext { private: IContext * const _context; + std::vector> _registrations; // Drawing engines SoftwareDrawingEngineFactory _softwareDrawingFactory; @@ -36,6 +41,9 @@ public: UiContext(IContext * context) : _context(context) { + _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_SOFTWARE, &_softwareDrawingFactory)); + _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY, &_hardwareDrawingFactory)); + _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_OPENGL, &_openglDrawingFactory)); } ~UiContext() override diff --git a/src/openrct2-ui/drawing/engines/DrawingEngines.h b/src/openrct2-ui/drawing/engines/DrawingEngines.h index f824c203d3..08a364425d 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngines.h +++ b/src/openrct2-ui/drawing/engines/DrawingEngines.h @@ -19,32 +19,27 @@ #include #include -interface IDrawingEngineFactory; - -class SoftwareDrawingEngineFactory : public IDrawingEngineFactory +namespace OpenRCT2 { namespace Ui { -public: - SoftwareDrawingEngineFactory(); - ~SoftwareDrawingEngineFactory() override; - IDrawingEngine * Create() override; -}; + class SoftwareDrawingEngineFactory : public Drawing::IDrawingEngineFactory + { + public: + IDrawingEngine * Create() override; + }; -class HardwareDisplayDrawingEngineFactory : public IDrawingEngineFactory -{ -public: - HardwareDisplayDrawingEngineFactory(); - ~HardwareDisplayDrawingEngineFactory() override; - IDrawingEngine * Create() override; -}; + class HardwareDisplayDrawingEngineFactory : public Drawing::IDrawingEngineFactory + { + public: + IDrawingEngine * Create() override; + }; -#ifndef DISABLE_OPENGL + #ifndef DISABLE_OPENGL -class OpenGLDrawingEngineFactory : public IDrawingEngineFactory -{ -public: - OpenGLDrawingEngineFactory(); - ~OpenGLDrawingEngineFactory() override; - IDrawingEngine * Create() override; -}; + class OpenGLDrawingEngineFactory : public Drawing::IDrawingEngineFactory + { + public: + IDrawingEngine * Create() override; + }; -#endif // DISABLE_OPENGL + #endif // DISABLE_OPENGL +} } diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index d31ce3c916..e5da799b3a 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -828,32 +828,12 @@ private: } }; -SoftwareDrawingEngineFactory::SoftwareDrawingEngineFactory() -{ - DrawingEngineFactory::Register(DRAWING_ENGINE_SOFTWARE, this); -} - -SoftwareDrawingEngineFactory::~SoftwareDrawingEngineFactory() -{ - DrawingEngineFactory::Unregister(DRAWING_ENGINE_SOFTWARE); -} - -IDrawingEngine * SoftwareDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::SoftwareDrawingEngineFactory::Create() { return new SoftwareDrawingEngine(false); } -HardwareDisplayDrawingEngineFactory::HardwareDisplayDrawingEngineFactory() -{ - DrawingEngineFactory::Register(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY, this); -} - -HardwareDisplayDrawingEngineFactory::~HardwareDisplayDrawingEngineFactory() -{ - DrawingEngineFactory::Unregister(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY); -} - -IDrawingEngine * HardwareDisplayDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::HardwareDisplayDrawingEngineFactory::Create() { return new SoftwareDrawingEngine(true); } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 0d7d431902..185641bb21 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -499,17 +499,7 @@ private: } }; -OpenGLDrawingEngineFactory::OpenGLDrawingEngineFactory() -{ - DrawingEngineFactory::Register(DRAWING_ENGINE_OPENGL, this); -} - -OpenGLDrawingEngineFactory::~OpenGLDrawingEngineFactory() -{ - DrawingEngineFactory::Unregister(DRAWING_ENGINE_OPENGL); -} - -IDrawingEngine * OpenGLDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::OpenGLDrawingEngineFactory::Create() { return new OpenGLDrawingEngine(); } diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index d8b66ec73d..3a5e02796e 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "drawing/IDrawingEngine.h" #include "Context.h" #include "OpenRCT2.h" @@ -30,6 +31,11 @@ public: { } + IRegistration * RegisterDrawingEngine(sint32 type, Drawing::IDrawingEngineFactory * factory) override + { + return Drawing::DrawingEngineFactory::Register((DRAWING_ENGINE)type, factory); + } + sint32 RunOpenRCT2(int argc, char * * argv) override { return ::RunOpenRCT2(argc, argv); diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 5557f153f8..05bca70078 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -20,12 +20,20 @@ namespace OpenRCT2 { + interface IRegistration; + + namespace Drawing + { + interface IDrawingEngineFactory; + } + /** * Represents an instance of OpenRCT2 and can be used to get various services. */ interface IContext { - virtual ~IContext() { } + virtual ~IContext() = default; + virtual IRegistration * RegisterDrawingEngine(sint32 type, Drawing::IDrawingEngineFactory * factory) abstract; virtual sint32 RunOpenRCT2(int argc, char * * argv) abstract; }; diff --git a/src/openrct2/core/Registration.hpp b/src/openrct2/core/Registration.hpp new file mode 100644 index 0000000000..de8ac29ea1 --- /dev/null +++ b/src/openrct2/core/Registration.hpp @@ -0,0 +1,67 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include "../common.h" + +namespace OpenRCT2 +{ + /** + * Represents a registration of some service which when deleted will be + * unregistered. + */ + interface IRegistration + { + virtual ~IRegistration() = default; + }; + + class Registration + { + private: + /** + * Class which can wrap a function in an IRegistration. + */ + template + struct CallbackRegistration : public IRegistration + { + private: + T _callback; + + public: + CallbackRegistration(T callback) : + _callback(callback) + { + } + + virtual ~CallbackRegistration() override + { + _callback(); + } + }; + + public: + /** + * Creates a new IRegistration which when deleted, calls the given + * function. + */ + template + static IRegistration * Create(T unregisterCallback) + { + return new CallbackRegistration(unregisterCallback); + } + }; +} diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index 1c3a706f4b..574913cde7 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -67,18 +67,6 @@ interface IDrawingEngine virtual void InvalidateImage(uint32 image) abstract; }; -interface IDrawingEngineFactory -{ - virtual ~IDrawingEngineFactory() { } - virtual IDrawingEngine * Create() abstract; -}; - -namespace DrawingEngineFactory -{ - void Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory); - void Unregister(DRAWING_ENGINE type); -} - interface IRainDrawer { virtual ~IRainDrawer() { } @@ -90,4 +78,23 @@ interface IRainDrawer sint32 yStart) abstract; }; +namespace OpenRCT2 +{ + interface IRegistration; + + namespace Drawing + { + interface IDrawingEngineFactory + { + virtual ~IDrawingEngineFactory() { } + virtual IDrawingEngine * Create() abstract; + }; + + namespace DrawingEngineFactory + { + IRegistration * Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory); + } + } +} + #endif diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 9f5360632c..0f29b4f016 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -15,6 +15,7 @@ #pragma endregion #include "../core/Exception.hpp" +#include "../core/Registration.hpp" #include "IDrawingContext.h" #include "IDrawingEngine.h" #include "NewDrawing.h" @@ -29,26 +30,29 @@ extern "C" #include "../rct2.h" } +using namespace OpenRCT2; +using namespace OpenRCT2::Drawing; + static sint32 _drawingEngineType = DRAWING_ENGINE_SOFTWARE; static IDrawingEngine * _drawingEngine = nullptr; static IDrawingEngineFactory * _drawingEngineFactories[DRAWING_ENGINE_COUNT] = { nullptr }; -void DrawingEngineFactory::Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory) +IRegistration * DrawingEngineFactory::Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory) { if (_drawingEngineFactories[type] != nullptr) { throw std::invalid_argument("Engine already registered."); } _drawingEngineFactories[type] = factory; -} -void DrawingEngineFactory::Unregister(DRAWING_ENGINE type) -{ - if (_drawingEngineFactories[type] == nullptr) + return Registration::Create([type, factory]() -> void { - throw std::invalid_argument("Engine not registered."); - } - _drawingEngineFactories[type] = nullptr; + if (_drawingEngineFactories[type] != factory) + { + throw std::invalid_argument("Engine not registered."); + } + _drawingEngineFactories[type] = nullptr; + }); } extern "C" From 5c59b743fd624385b9ce92fd3fb1e569c2adef0e Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 17:29:45 +0000 Subject: [PATCH 06/76] Add new CLI and UI builds for non Windows platforms --- src/openrct2-cli/CMakeLists.txt | 26 ++++++++++++++++++ src/openrct2-cli/Cli.cpp | 34 +++++++++++++++++++++++ src/openrct2-ui/Ui.cpp | 39 +++++++++++++++++++++++++++ src/openrct2-ui/libopenrct2ui.vcxproj | 1 + 4 files changed, 100 insertions(+) create mode 100644 src/openrct2-cli/CMakeLists.txt create mode 100644 src/openrct2-cli/Cli.cpp create mode 100644 src/openrct2-ui/Ui.cpp diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt new file mode 100644 index 0000000000..2ae1565543 --- /dev/null +++ b/src/openrct2-cli/CMakeLists.txt @@ -0,0 +1,26 @@ +# CMAKE project for openrct2-cli (CLI-only build of OpenRCT2) + +cmake_minimum_required(VERSION 2.6) + +if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) + message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") +endif() + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") + +INCLUDE_DIRECTORIES(SYSTEM ${OPENRCT2_CORE}) + +set (PROJECT openrct2) +project(${PROJECT}) + +file(GLOB_RECURSE OPENRCT2_CLI_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/*.c" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") + +# install into ${CMAKE_INSTALL_PREFIX}/bin/ +#install (TARGETS ${PROJECT} DESTINATION bin) diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp new file mode 100644 index 0000000000..02755a1cc7 --- /dev/null +++ b/src/openrct2-cli/Cli.cpp @@ -0,0 +1,34 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#ifndef _MSC_VER + +#include + +using namespace OpenRCT2; + +/** +* Main entry point for non-Windows sytems. Windows instead uses its own DLL proxy. +*/ +int main(int argc, char * * argv) +{ + IContext * context = CreateContext(); + int exitCode = context->RunOpenRCT2(argc, argv); + delete context; + return exitCode; +} + +#endif diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp new file mode 100644 index 0000000000..4475594fb4 --- /dev/null +++ b/src/openrct2-ui/Ui.cpp @@ -0,0 +1,39 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#ifndef _MSC_VER + +#include +#include "UiContext.h" + +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + +/** + * Main entry point for non-Windows sytems. Windows instead uses its own DLL proxy. + */ +int main(int argc, char * * argv) +{ + // Run OpenRCT2 with a UI context + IContext * context = CreateContext(); + IUiContext * uiContext = CreateContext(context); + int exitCode = context->RunOpenRCT2(argc, argv); + delete uiContext; + delete context; + return exitCode; +} + +#endif diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 9e3a847bee..3e86ba50d6 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -33,6 +33,7 @@ + From fedb8917c72d6b4c275495a1ace232f42923efd1 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 19:02:23 +0000 Subject: [PATCH 07/76] Create new CMake project for libopenrct2 --- src/openrct2-cli/CMakeLists.txt | 26 ++++++------- src/openrct2/CMakeLists.txt | 57 +++++++++++++++++++++++++++++ src/openrct2/Context.cpp | 8 +++- src/openrct2/Context.h | 2 +- src/openrct2/OpenRCT2.h | 4 -- src/openrct2/drawing/NewDrawing.cpp | 1 + src/openrct2/platform/windows.c | 26 ++++--------- 7 files changed, 87 insertions(+), 37 deletions(-) create mode 100644 src/openrct2/CMakeLists.txt diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 2ae1565543..3fc825d478 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -1,26 +1,26 @@ # CMAKE project for openrct2-cli (CLI-only build of OpenRCT2) - cmake_minimum_required(VERSION 2.6) - if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") - -INCLUDE_DIRECTORIES(SYSTEM ${OPENRCT2_CORE}) - -set (PROJECT openrct2) -project(${PROJECT}) +# Includes +INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/..") +# Sources file(GLOB_RECURSE OPENRCT2_CLI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") -# install into ${CMAKE_INSTALL_PREFIX}/bin/ -#install (TARGETS ${PROJECT} DESTINATION bin) +# Compiler flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") + +# Outputs +set (PROJECT openrct2) +project(${PROJECT}) +add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt new file mode 100644 index 0000000000..61951b00e7 --- /dev/null +++ b/src/openrct2/CMakeLists.txt @@ -0,0 +1,57 @@ +# CMAKE project for libopenrct2 (core OpenRCT2 component) +cmake_minimum_required(VERSION 2.6) +if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) + message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") +endif() + +# CMake dependencies +INCLUDE(FindPkgConfig) + +# Third party libraries +PKG_CHECK_MODULES(JANSSON REQUIRED jansson>=2.5) +PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) +PKG_CHECK_MODULES(LIBZIP REQUIRED libzip>=1.0) +PKG_CHECK_MODULES(SSL REQUIRED openssl>=1.0.0) +PKG_CHECK_MODULES(PNG libpng>=1.6) +PKG_CHECK_MODULES(ZLIB REQUIRED zlib) + +# Third party libraries (which we want to eventually remove from libopenrct2) +PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) +PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) +PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) +PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) +PKG_CHECK_MODULES(GL REQUIRED gl) + +message(STATUS "SDL: ${SDL2_INCLUDE_DIRS}") +message(STATUS "SSL: ${SSL_INCLUDE_DIRS}") +message(STATUS "TTF: ${SDL2_TTF_INCLUDE_DIRS}") + +# Includes +INCLUDE_DIRECTORIES(SYSTEM ${LIBZIP_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} + ${LIBCURL_INCLUDE_DIRS} + ${JANSSON_INCLUDE_DIRS} + ${SPEEX_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIRS} + ${BREAKPAD_INCLUDE_DIR} + ${SSL_INCLUDE_DIRS} + ${FONTCONFIG_INCLUDE_DIRS}) + +# Sources +file(GLOB_RECURSE OPENRCT2_CORE_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/*.c" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") + +# Compiler flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") + +# Outputs +set (PROJECT openrct2) +project(${PROJECT}) +add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES}) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 3a5e02796e..ba9060a53f 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -38,7 +38,13 @@ public: sint32 RunOpenRCT2(int argc, char * * argv) override { - return ::RunOpenRCT2(argc, argv); + core_init(); + int runGame = cmdline_run((const char * *)argv, argc); + if (runGame == 1) + { + openrct2_launch(); + } + return gExitCode; } }; diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 05bca70078..59b424b037 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -16,7 +16,7 @@ #pragma once -#include +#include "common.h" namespace OpenRCT2 { diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index ecfc7fb6e6..ba45e17730 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -87,10 +87,6 @@ extern "C" sint32 cmdline_run(const char * * argv, sint32 argc); -#ifdef __WINDOWS__ - int RunOpenRCT2(int argc, char * * argv); -#endif - #ifdef __cplusplus } #endif diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 0f29b4f016..67f5668572 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include #include "../core/Exception.hpp" #include "../core/Registration.hpp" #include "IDrawingContext.h" diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index 6e8e6f4f52..0d8878860b 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -57,23 +57,12 @@ utf8 **windows_get_command_line_args(sint32 *outNumArgs); static HMODULE _dllModule = NULL; -/** - * Windows entry point to OpenRCT2 with a console window using a traditional C main function. - */ -sint32 RunOpenRCT2(int argc, char * * argv) +static HMODULE plaform_get_dll_module() { - HINSTANCE hInstance = GetModuleHandle(NULL); - _dllModule = hInstance; - - core_init(); - - sint32 exitCode = cmdline_run((const char **)argv, argc); - if (exitCode == 1) { - openrct2_launch(); - exitCode = gExitCode; + if (_dllModule == NULL) { + _dllModule = GetModuleHandle(NULL); } - - return exitCode; + return _dllModule; } #ifdef NO_RCT2 @@ -817,8 +806,9 @@ HWND windows_get_window_handle() void platform_init_window_icon() { - if (_dllModule != NULL) { - HICON icon = LoadIcon(_dllModule, MAKEINTRESOURCE(IDI_ICON)); + HMODULE module = plaform_get_dll_module(); + if (module != NULL) { + HICON icon = LoadIcon(module, MAKEINTRESOURCE(IDI_ICON)); if (icon != NULL) { HWND hwnd = windows_get_window_handle(); SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); @@ -1134,7 +1124,7 @@ static bool windows_setup_file_association( sint32 printResult; GetModuleFileNameW(NULL, exePathW, sizeof(exePathW)); - GetModuleFileNameW(_dllModule, dllPathW, sizeof(dllPathW)); + GetModuleFileNameW(plaform_get_dll_module(), dllPathW, sizeof(dllPathW)); wchar_t *extensionW = utf8_to_widechar(extension); wchar_t *fileTypeTextW = utf8_to_widechar(fileTypeText); From 644634220a02333ef8e842c18781d97470c696c4 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 20:52:07 +0000 Subject: [PATCH 08/76] Update cmakelists for lib and cli --- src/CMakeLists.txt | 8 ++++++ src/openrct2-cli/CMakeLists.txt | 31 +++++++++++++-------- src/openrct2/CMakeLists.txt | 48 +++++++++++++++------------------ 3 files changed, 50 insertions(+), 37 deletions(-) create mode 100644 src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000000..db1b669ee5 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,8 @@ +# CMAKE project for openrct2 +cmake_minimum_required(VERSION 2.6) +if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) + message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") +endif() + +include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) +include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 3fc825d478..1ba811b718 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -4,23 +4,32 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() -# Includes -INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/..") +# CMake dependencies +include(FindPkgConfig) + +# Third party libraries (which we want to eventually remove from openrct2-cli) +PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) # Sources file(GLOB_RECURSE OPENRCT2_CLI_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/*.h" - "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") + "${CMAKE_CURRENT_LIST_DIR}/*.c" + "${CMAKE_CURRENT_LIST_DIR}/*.cpp" + "${CMAKE_CURRENT_LIST_DIR}/*.h" + "${CMAKE_CURRENT_LIST_DIR}/*.hpp") + +# Outputs +set (PROJECT openrct2) +project(${PROJECT}) +add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) + +target_link_libraries(${PROJECT} "libopenrct2") + +# Includes +target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} + "${CMAKE_CURRENT_LIST_DIR}/..") # Compiler flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") - -# Outputs -set (PROJECT openrct2) -project(${PROJECT}) -add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 61951b00e7..ea6a30bb9e 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -5,7 +5,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) endif() # CMake dependencies -INCLUDE(FindPkgConfig) +include(FindPkgConfig) # Third party libraries PKG_CHECK_MODULES(JANSSON REQUIRED jansson>=2.5) @@ -22,36 +22,32 @@ PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) PKG_CHECK_MODULES(GL REQUIRED gl) -message(STATUS "SDL: ${SDL2_INCLUDE_DIRS}") -message(STATUS "SSL: ${SSL_INCLUDE_DIRS}") -message(STATUS "TTF: ${SDL2_TTF_INCLUDE_DIRS}") +# Sources +file(GLOB_RECURSE OPENRCT2_CORE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.c" + "${CMAKE_CURRENT_LIST_DIR}/*.cpp" + "${CMAKE_CURRENT_LIST_DIR}/*.h" + "${CMAKE_CURRENT_LIST_DIR}/*.hpp") + +# Outputs +set(PROJECT libopenrct2) +project(${PROJECT}) +add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES}) +set_target_properties(${PROJECT} PROPERTIES PREFIX "") # Includes -INCLUDE_DIRECTORIES(SYSTEM ${LIBZIP_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} - ${LIBCURL_INCLUDE_DIRS} - ${JANSSON_INCLUDE_DIRS} - ${SPEEX_INCLUDE_DIRS} - ${PNG_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS} - ${BREAKPAD_INCLUDE_DIR} - ${SSL_INCLUDE_DIRS} - ${FONTCONFIG_INCLUDE_DIRS}) - -# Sources -file(GLOB_RECURSE OPENRCT2_CORE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/*.h" - "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") +target_include_directories(${PROJECT} SYSTEM PRIVATE ${LIBZIP_INCLUDE_DIRS}) +target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} + ${LIBCURL_INCLUDE_DIRS} + ${JANSSON_INCLUDE_DIRS} + ${SPEEX_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIRS} + ${BREAKPAD_INCLUDE_DIR} + ${SSL_INCLUDE_DIRS} + ${FONTCONFIG_INCLUDE_DIRS}) # Compiler flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") - -# Outputs -set (PROJECT openrct2) -project(${PROJECT}) -add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES}) From f856510a159a02d7bdacf76f357c9719bd66d758 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 23:11:29 +0000 Subject: [PATCH 09/76] Get openrct2-cli linking successfully --- src/openrct2-cli/CMakeLists.txt | 4 +++- src/openrct2/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 1ba811b718..28e1240a57 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -22,7 +22,9 @@ set (PROJECT openrct2) project(${PROJECT}) add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) -target_link_libraries(${PROJECT} "libopenrct2") +target_link_libraries(${PROJECT} "libopenrct2" + ${SDL2_LIBRARIES} + ${SDL2_TTF_LIBRARIES}) # Includes target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index ea6a30bb9e..4a4578393a 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -34,6 +34,32 @@ project(${PROJECT}) add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES}) set_target_properties(${PROJECT} PROPERTIES PREFIX "") +# Libraries +if (UNIX AND NOT APPLE AND NOT DISABLE_TTF) + # FontConfig for TrueType fonts. + PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) + include_directories(${FONTCONFIG_INCLUDE_DIRS}) + target_link_libraries(${PROJECT} ${FONTCONFIG_LIBRARIES}) +endif() + +target_link_libraries(${PROJECT} ${GL_LIBRARIES}) +target_link_libraries(${PROJECT} ${SDL2_LIBRARIES} + ${SDL2_TTF_LIBRARIES} + ${LIBCURL_LIBRARIES} + ${JANSSON_LIBRARIES} + ${SPEEX_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${BREAKPAD_LIBS} + ${SSL_LIBRARIES} + dl + ${LIBZIP_LIBRARIES}) + +if (APPLE OR STATIC OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD") + find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + target_link_libraries(${PROJECT} ${ICONV_LIBRARIES}) +endif() + # Includes target_include_directories(${PROJECT} SYSTEM PRIVATE ${LIBZIP_INCLUDE_DIRS}) target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} From 89780363eed75d88c3e8038dfb3e7815405101c3 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 24 Mar 2017 23:40:17 +0000 Subject: [PATCH 10/76] Add openrct2-ui cmake project --- src/CMakeLists.txt | 8 ++++++- src/openrct2-cli/CMakeLists.txt | 8 +++---- src/openrct2-ui/CMakeLists.txt | 42 +++++++++++++++++++++++++++++++++ src/openrct2-ui/UiContext.cpp | 2 +- src/openrct2/CMakeLists.txt | 2 -- 5 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 src/openrct2-ui/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index db1b669ee5..1c39aa498a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,5 +4,11 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() +option (CLI_ONLY "CLI only build of OpenRCT2") + include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) -include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) +if (CLI_ONLY) + include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) +else () + include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) +endif () diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 28e1240a57..8ef2c3e4fa 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -22,13 +22,11 @@ set (PROJECT openrct2) project(${PROJECT}) add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) -target_link_libraries(${PROJECT} "libopenrct2" - ${SDL2_LIBRARIES} - ${SDL2_TTF_LIBRARIES}) +target_link_libraries(${PROJECT} "libopenrct2") # Includes -target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} - "${CMAKE_CURRENT_LIST_DIR}/..") +target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." + ${SDL2_INCLUDE_DIRS}) # Compiler flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt new file mode 100644 index 0000000000..293cfd25cb --- /dev/null +++ b/src/openrct2-ui/CMakeLists.txt @@ -0,0 +1,42 @@ +# CMAKE project for openrct2-cli (UI build of OpenRCT2) +cmake_minimum_required(VERSION 2.6) +if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) + message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") +endif() + +# CMake dependencies +include(FindPkgConfig) + +# Third party libraries +PKG_CHECK_MODULES(GL REQUIRED gl) +PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) + +# Sources +file(GLOB_RECURSE OPENRCT2_CLI_SOURCES + "${CMAKE_CURRENT_LIST_DIR}/*.c" + "${CMAKE_CURRENT_LIST_DIR}/*.cpp" + "${CMAKE_CURRENT_LIST_DIR}/*.h" + "${CMAKE_CURRENT_LIST_DIR}/*.hpp") + +# Outputs +set (PROJECT openrct2) +project(${PROJECT}) +add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) + +target_link_libraries(${PROJECT} "libopenrct2" + ${GL_LIBRARIES} + ${SDL2_LIBRARIES} + ${SDL2_TTF_LIBRARIES}) + +# Includes +target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." + ${OPENGL_INCLUDE_DIRS} + ${SDL2_INCLUDE_DIRS}) + +# Compiler flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") + +add_definitions(-DOPENGL_NO_LINK) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 6863b0a758..c9ae28c1ed 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -18,8 +18,8 @@ #include #include #include +#include "drawing/engines/DrawingEngines.h" #include "UiContext.h" -#include "drawing\engines\DrawingEngines.h" using namespace OpenRCT2; using namespace OpenRCT2::Ui; diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 4a4578393a..1ef1b68c76 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -20,7 +20,6 @@ PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) -PKG_CHECK_MODULES(GL REQUIRED gl) # Sources file(GLOB_RECURSE OPENRCT2_CORE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.c" @@ -42,7 +41,6 @@ if (UNIX AND NOT APPLE AND NOT DISABLE_TTF) target_link_libraries(${PROJECT} ${FONTCONFIG_LIBRARIES}) endif() -target_link_libraries(${PROJECT} ${GL_LIBRARIES}) target_link_libraries(${PROJECT} ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${LIBCURL_LIBRARIES} From c7b1feea077ccb3efafbc2cce17a0a978e491df7 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 01:40:16 +0000 Subject: [PATCH 11/76] Add back most of the cmake options --- src/CMakeLists.txt | 44 +++++ src/openrct2-cli/CMakeLists.txt | 10 +- src/openrct2-ui/CMakeLists.txt | 51 ++++-- src/openrct2/CMakeLists.txt | 304 ++++++++++++++++++++++++++++---- 4 files changed, 362 insertions(+), 47 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1c39aa498a..c268db0ef9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,12 +3,56 @@ cmake_minimum_required(VERSION 2.6) if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() +set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/..") option (CLI_ONLY "CLI only build of OpenRCT2") +# Define current git branch +execute_process( + COMMAND git rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${ROOT_DIR} + OUTPUT_VARIABLE OPENRCT2_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) +add_definitions(-DOPENRCT2_BRANCH="${OPENRCT2_BRANCH}") + +# Define commit hash +execute_process( + COMMAND git rev-parse HEAD + WORKING_DIRECTORY ${ROOT_DIR} + OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1 + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) +add_definitions(-DOPENRCT2_COMMIT_SHA1="${OPENRCT2_COMMIT_SHA1}") + +# Define short commit hash +execute_process( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${ROOT_DIR} + OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET +) + +# Tagged builds are not meant to display commit info +if (NOT OPENRCT2_COMMIT_SHA1_SHORT STREQUAL "HEAD") + add_definitions(-DOPENRCT2_COMMIT_SHA1_SHORT="${OPENRCT2_COMMIT_SHA1_SHORT}") +endif() + +# Include sub-projects include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) if (CLI_ONLY) include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) else () include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) endif () + +# g2 +add_custom_command( + OUTPUT g2.dat + COMMAND ./openrct2 sprite build ${CMAKE_BINARY_DIR}/g2.dat ${ROOT_DIR}/resources/g2/ + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) +add_custom_target(g2 DEPENDS ${PROJECT} g2.dat) diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 8ef2c3e4fa..9c1c24a5e4 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") -endif() +endif () # CMake dependencies include(FindPkgConfig) @@ -29,7 +29,7 @@ target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." ${SDL2_INCLUDE_DIRS}) # Compiler flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 293cfd25cb..712b996057 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 2.6) if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") -endif() +endif () + +# Options +option(DISABLE_OPENGL "Disable OpenGL support.") # CMake dependencies include(FindPkgConfig) @@ -10,9 +13,17 @@ include(FindPkgConfig) # Third party libraries PKG_CHECK_MODULES(GL REQUIRED gl) PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) +if (NOT DISABLE_OPENGL) + # GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu. + if (APPLE) + find_package(OpenGL REQUIRED) + elseif (NOT WIN32) + PKG_CHECK_MODULES(GL REQUIRED gl) + endif () +endif () # Sources -file(GLOB_RECURSE OPENRCT2_CLI_SOURCES +file(GLOB_RECURSE OPENRCT2_UI_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.c" "${CMAKE_CURRENT_LIST_DIR}/*.cpp" "${CMAKE_CURRENT_LIST_DIR}/*.h" @@ -21,22 +32,42 @@ file(GLOB_RECURSE OPENRCT2_CLI_SOURCES # Outputs set (PROJECT openrct2) project(${PROJECT}) -add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) +add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES}) target_link_libraries(${PROJECT} "libopenrct2" - ${GL_LIBRARIES} ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARIES}) +if (NOT DISABLE_OPENGL) + if (WIN32) + target_link_libraries(${PROJECT} opengl32) + elseif (APPLE) + target_link_libraries(${PROJECT} ${OPENGL_LIBRARY}) + else () + target_link_libraries(${PROJECT} ${GL_LIBRARIES}) + endif () +endif () + # Includes target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." - ${OPENGL_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}) # Compiler flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") +if (WIN32) + # mingw complains about "%zu" not being a valid format specifier for printf, unless we + # tell it that it is + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") +endif () -add_definitions(-DOPENGL_NO_LINK) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") + +# Defines +if (DISABLE_OPENGL) + add_definitions(-DDISABLE_OPENGL) +else () + # Makes OpenGL function get queried in run-time rather than linked-in + add_definitions(-DOPENGL_NO_LINK) +endif () diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 1ef1b68c76..1ea3b27514 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -2,76 +2,316 @@ cmake_minimum_required(VERSION 2.6) if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") -endif() +endif () # CMake dependencies +include(CheckCCompilerFlag) +include(CheckCXXCompilerFlag) include(FindPkgConfig) +# Options +option(STATIC "Create a static build.") +option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") +option(USE_MMAP "Use mmap to try loading rct2's data segment into memory.") +option(DISABLE_RCT2 "Build a standalone version, without using code and data segments from vanilla. On by default." ON) + +option(DISABLE_HTTP_TWITCH "Disable HTTP and Twitch support.") +option(DISABLE_NETWORK "Disable multiplayer functionality. Mainly for testing.") +option(DISABLE_TTF "Disable support for TTF provided by SDL2_ttf.") +option(ENABLE_LIGHTFX "Enable lighting effects." ON) + +if (NOT DISABLE_RCT2) + if (WIN32) + message(FATAL_ERROR "DISABLE_RCT2 not supported for Windows") + endif () + if (NOT FORCE32) + set(FORCE32 ON) + message("DISABLE_RCT2 implies FORCE32") + endif () +endif () + +# Needed for linking with non-broken OpenSSL on Apple platforms +if (APPLE) + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl/lib/pkgconfig") +endif () + # Third party libraries PKG_CHECK_MODULES(JANSSON REQUIRED jansson>=2.5) -PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) PKG_CHECK_MODULES(LIBZIP REQUIRED libzip>=1.0) -PKG_CHECK_MODULES(SSL REQUIRED openssl>=1.0.0) -PKG_CHECK_MODULES(PNG libpng>=1.6) PKG_CHECK_MODULES(ZLIB REQUIRED zlib) +PKG_CHECK_MODULES(PNG libpng>=1.6) +if (NOT PNG_FOUND) + PKG_CHECK_MODULES(PNG libpng16) + if (NOT PNG_FOUND) + PKG_CHECK_MODULES(PNG libpng>=1.2) + if (NOT PNG_FOUND) + PKG_CHECK_MODULES(PNG REQUIRED libpng12) + endif () + endif () +endif () + +# Third party libraries (optional) +if (NOT DISABLE_HTTP_TWITCH OR NOT DISABLE_NETWORK) + PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) +endif () +if (NOT DISABLE_NETWORK) + PKG_CHECK_MODULES(SSL REQUIRED openssl>=1.0.0) +endif () + # Third party libraries (which we want to eventually remove from libopenrct2) -PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) -PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) +if (NOT DISABLE_TTF) + if (STATIC) + # FreeType is required by SDL2_ttf, but not wired up properly in package + PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2) + endif () + PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) + PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) +endif () # Sources file(GLOB_RECURSE OPENRCT2_CORE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.c" "${CMAKE_CURRENT_LIST_DIR}/*.cpp" "${CMAKE_CURRENT_LIST_DIR}/*.h" "${CMAKE_CURRENT_LIST_DIR}/*.hpp") +if (APPLE) + file(GLOB_RECURSE OPENRCT2_CORE_MM_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.m") + set_source_files_properties(${OPENRCT2_CORE_MM_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c -fmodules") +endif () + +# Handle creating the rct2 text and data files on macOS and Linux +# See details in src/openrct2/rct2/interop.c:rct2_interop_setup_segment for how the values +# were derived. +if (NOT DISABLE_RCT2 AND UNIX) + set(OPENRCT2_EXE "${ROOT_DIR}/openrct2.exe") + add_custom_command( + OUTPUT openrct2_text + COMMAND dd if="${OPENRCT2_EXE}" of="${CMAKE_BINARY_DIR}/openrct2_text" bs=4096 skip=1 count=1187 + DEPENDS ${OPENRCT2_EXE} + ) + add_custom_command( + OUTPUT openrct2_data + COMMAND dd if="${OPENRCT2_EXE}" of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 skip=1188 count=318 + COMMAND dd if=/dev/zero of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 seek=318 count=2630 conv=notrunc + COMMAND dd if="${OPENRCT2_EXE}" of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 skip=1506 seek=2948 count=1 conv=notrunc + DEPENDS ${OPENRCT2_EXE} + ) + add_custom_target(segfiles DEPENDS openrct2_text openrct2_data) + if (NOT USE_MMAP) + if (APPLE) + set(RCT2_SEGMENT_LINKER_FLAGS "-sectcreate rct2_text __text ${CMAKE_BINARY_DIR}/openrct2_text -sectcreate rct2_data __data ${CMAKE_BINARY_DIR}/openrct2_data -segaddr rct2_data 0x8a4000 -segprot rct2_data rwx rwx -segaddr rct2_text 0x401000 -segprot rct2_text rwx rwx -segaddr __TEXT 0x2000000 -read_only_relocs suppress") + else () + # For Linux we have to use objcopy to wrap regular binaries into a linkable + # format. We use specific section names which are then referenced in a + # bespoke linker script so they can be placed at predefined VMAs. + add_custom_command( + OUTPUT openrct2_text_section.o + COMMAND objcopy --input binary --output ${OBJ_FORMAT} --binary-architecture i386 openrct2_text openrct2_text_section.o --rename-section .data=.rct2_text,contents,alloc,load,readonly,code + DEPENDS segfiles + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + add_custom_command( + OUTPUT openrct2_data_section.o + COMMAND objcopy --input binary --output ${OBJ_FORMAT} --binary-architecture i386 openrct2_data openrct2_data_section.o --rename-section .data=.rct2_data,contents,alloc,load,readonly,data + DEPENDS segfiles + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + add_custom_target(linkable_sections DEPENDS openrct2_text_section.o openrct2_data_section.o) + set_source_files_properties( + openrct2_text_section.o openrct2_data_section.o + PROPERTIES + EXTERNAL_OBJECT true + GENERATED true + ) + # can't use GLOB here, as the files don't exist yet at cmake-time + set(RCT2_SECTIONS "${CMAKE_BINARY_DIR}/openrct2_data_section.o" "${CMAKE_BINARY_DIR}/openrct2_text_section.o") + set(RCT2_SEGMENT_LINKER_FLAGS "-Wl,-T,\"${ROOT_DIR}/distribution/linux/${LINKER_SCRIPT}\"") + endif () + endif () +elseif (USE_MMAP) + # No dd here, can't extract data segment + message(WARNING "Sorry, your platform is not supported, you have to extract data segment manually") +endif () # Outputs set(PROJECT libopenrct2) project(${PROJECT}) -add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES}) +add_library(${PROJECT} SHARED ${OPENRCT2_CORE_SOURCES} ${OPENRCT2_CORE_MM_SOURCES} ${RCT2_SECTIONS}) set_target_properties(${PROJECT} PROPERTIES PREFIX "") +set_target_properties(${PROJECT} PROPERTIES COMPILE_FLAGS "-Wundef") + +if (NOT DISABLE_RCT2) + add_dependencies(${PROJECT} segfiles) + if (NOT APPLE AND NOT USE_MMAP) + add_dependencies(${PROJECT} linkable_sections) + endif () + set_target_properties(${PROJECT} PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) +endif () # Libraries -if (UNIX AND NOT APPLE AND NOT DISABLE_TTF) - # FontConfig for TrueType fonts. - PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) - include_directories(${FONTCONFIG_INCLUDE_DIRS}) - target_link_libraries(${PROJECT} ${FONTCONFIG_LIBRARIES}) -endif() +if (STATIC) + target_link_libraries(${PROJECT} ${SDL2_STATIC_LIBRARIES} + ${JANSSON_STATIC_LIBRARIES} + ${SPEEX_STATIC_LIBRARIES} + ${PNG_STATIC_LIBRARIES} + ${ZLIB_STATIC_LIBRARIES} + ${LIBZIP_STATIC_LIBRARIES}) +else () + target_link_libraries(${PROJECT} ${SDL2_LIBRARIES} + ${JANSSON_LIBRARIES} + ${SPEEX_LIBRARIES} + ${PNG_LIBRARIES} + ${ZLIB_LIBRARIES} + ${LIBZIP_LIBRARIES}) +endif () -target_link_libraries(${PROJECT} ${SDL2_LIBRARIES} - ${SDL2_TTF_LIBRARIES} - ${LIBCURL_LIBRARIES} - ${JANSSON_LIBRARIES} - ${SPEEX_LIBRARIES} - ${PNG_LIBRARIES} - ${ZLIB_LIBRARIES} - ${BREAKPAD_LIBS} - ${SSL_LIBRARIES} - dl - ${LIBZIP_LIBRARIES}) +if (UNIX AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD") + # Include libdl for dlopen + target_link_libraries(${PROJECT} dl) +endif () + +if (NOT DISABLE_NETWORK) + if (WIN32) + target_link_libraries(${PROJECT} ws2_32) + endif () + if (STATIC) + target_link_libraries(${PROJECT} ${LIBCURL_STATIC_LIBRARIES} + ${SSL_STATIC_LIBRARIES}) + else () + target_link_libraries(${PROJECT} ${LIBCURL_LIBRARIES} + ${SSL_LIBRARIES}) + endif () +endif () + +if (NOT DISABLE_TTF) + if (STATIC) + target_link_libraries(${PROJECT} ${FREETYPE_STATIC_LIBRARIES} + ${SDL2_TTF_STATIC_LIBRARIES}) + if (UNIX AND NOT APPLE) + target_link_libraries(${PROJECT} ${FONTCONFIG_STATIC_LIBRARIES}) + endif () + else () + target_link_libraries(${PROJECT} ${SDL2_TTF_LIBRARIES}) + if (UNIX AND NOT APPLE) + target_link_libraries(${PROJECT} ${FONTCONFIG_LIBRARIES}) + endif () + endif () +endif () if (APPLE OR STATIC OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD") - find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + find_library(ICONV_LIBRARIES NAMES c iconv libiconv libiconv-2) target_link_libraries(${PROJECT} ${ICONV_LIBRARIES}) endif() # Includes target_include_directories(${PROJECT} SYSTEM PRIVATE ${LIBZIP_INCLUDE_DIRS}) target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS} - ${LIBCURL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS} ${SPEEX_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS} - ${BREAKPAD_INCLUDE_DIR} - ${SSL_INCLUDE_DIRS} - ${FONTCONFIG_INCLUDE_DIRS}) + ${ZLIB_INCLUDE_DIRS}) +if (NOT DISABLE_HTTP_TWITCH OR NOT DISABLE_NETWORK) + target_include_directories(${PROJECT} PRIVATE ${LIBCURL_INCLUDE_DIRS}) +endif () +if (NOT DISABLE_NETWORK) + target_include_directories(${PROJECT} PRIVATE ${SSL_INCLUDE_DIRS}) +endif () +if (NOT DISABLE_TTF AND UNIX AND NOT APPLE) + target_include_directories(${PROJECT} PRIVATE ${FONTCONFIG_INCLUDE_DIRS}) +endif () # Compiler flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS}") +set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-aliasing -Werror -Wundef -Wmissing-declarations -Winit-self -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-missing-braces ") +set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -Wno-comment -Wshadow -Wmissing-declarations -Wnonnull") + +# On mingw all code is already PIC, this will avoid compiler error on redefining this option +if (NOT MINGW) + set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fPIC") +endif () + +if (APPLE AND NOT USE_MMAP) + set(PIE_FLAG "-fno-pie") +else () + set(PIE_FLAG "-fpie") +endif () + +set(DEBUG_LEVEL 0 CACHE STRING "Select debug level for compilation. Use value in range 0–3.") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG=${DEBUG_LEVEL}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG=${DEBUG_LEVEL}") + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${COMMON_COMPILE_OPTIONS} ${TARGET_M} -Wimplicit") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${COMMON_COMPILE_OPTIONS} ${TARGET_M}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") + +function (ADD_CHECK_C_COMPILER_FLAG _CFLAGS _CACHE_VAR _FLAG) + CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") + if (${_CACHE_VAR}) + set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE) + else () + message(STATUS "Unsupported CFLAG: ${_FLAG}") + endif () +endfunction () + +function (ADD_CHECK_CXX_COMPILER_FLAG _CXXFLAGS _CACHE_VAR _FLAG) + CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") + if (${_CACHE_VAR}) + set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE) + else () + message(STATUS "Unsupported CXXFLAG: ${_FLAG}") + endif () +endfunction () + +# Launchpad turns on -Wdate-time for compilers that support it, this shouldn't break our build +ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_WRITE_STRINGS -Wno-error=date-time) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_WRITE_STRINGS -Wno-error=date-time) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_TYPES -Wsuggest-final-types) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_METHODS -Wsuggest-final-methods) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wsuggest-override) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DUPLICATED_COND -Wduplicated-cond) + +# Items below are not supported by ICC +ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_REDUNDANT_DECLS -Wredundant-decls) +ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_IGNORED_QUALIFIERS -Wignored-qualifiers) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_IGNORED_QUALIFIERS -Wignored-qualifiers) + +# -Wstrict-overflow is only active when -fstrict-overflow is enabled, but -fstrict-overflow +# is enabled on -O2, -O3, -Os. This should help catch bugs locally before they reach Travis +# As of 2a435bf -Wstrict-overflow=1 passes, but higher values do not. +set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-overflow") +ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) + +if (FORCE32) + set(TARGET_M "-m32") + set(OBJ_FORMAT "elf32-i386") + set(LINKER_SCRIPT "ld_script_i386.xc") +endif () + +# Defines +if (USE_MMAP) + add_definitions(-DUSE_MMAP) +endif () +if (DISABLE_NETWORK) + add_definitions(-DDISABLE_NETWORK) +endif () +if (DISABLE_HTTP_TWITCH) + add_definitions(-DDISABLE_HTTP) + add_definitions(-DDISABLE_TWITCH) +endif () +if (DISABLE_TTF) + add_definitions(-DNO_TTF) +endif () +if (ENABLE_LIGHTFX) + add_definitions(-D__ENABLE_LIGHTFX__) +endif () + +if (NOT DISABLE_RCT2) + # Disable optimizations for addresses.c for all compilers, to allow optimized + # builds without need for -fno-omit-frame-pointer + set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/rct2/addresses.c PROPERTIES COMPILE_FLAGS -O0) +endif () From 06bba09b43a373198998cefd67e7ab2f7dd09785 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 02:03:35 +0000 Subject: [PATCH 12/76] Fix various issues with the cmake projects --- src/CMakeLists.txt | 3 ++- src/openrct2-cli/CMakeLists.txt | 10 ++++++---- src/openrct2-ui/CMakeLists.txt | 11 ++++++----- src/openrct2/CMakeLists.txt | 29 +++++++++++++---------------- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c268db0ef9..af92abf923 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,8 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) endif() set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/..") -option (CLI_ONLY "CLI only build of OpenRCT2") +option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") +option(CLI_ONLY "CLI only build of OpenRCT2") # Define current git branch execute_process( diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 9c1c24a5e4..3966b7f05b 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -29,7 +29,9 @@ target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." ${SDL2_INCLUDE_DIRS}) # Compiler flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") +if (FORCE32) + set(TARGET_M "-m32") +endif () +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${TARGET_M}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_M}") diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 712b996057..1d514db2ab 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -53,16 +53,17 @@ target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." ${SDL2_INCLUDE_DIRS}) # Compiler flags +if (FORCE32) + set(TARGET_M "-m32") +endif () if (WIN32) # mingw complains about "%zu" not being a valid format specifier for printf, unless we # tell it that it is set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") endif () - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${TARGET_M}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${TARGET_M}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_M}") # Defines if (DISABLE_OPENGL) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 1ea3b27514..3fa355600e 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -11,7 +11,6 @@ include(FindPkgConfig) # Options option(STATIC "Create a static build.") -option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") option(USE_MMAP "Use mmap to try loading rct2's data segment into memory.") option(DISABLE_RCT2 "Build a standalone version, without using code and data segments from vanilla. On by default." ON) @@ -25,8 +24,7 @@ if (NOT DISABLE_RCT2) message(FATAL_ERROR "DISABLE_RCT2 not supported for Windows") endif () if (NOT FORCE32) - set(FORCE32 ON) - message("DISABLE_RCT2 implies FORCE32") + message(FATAL_ERROR "DISABLE_RCT2 requires FORCE32") endif () endif () @@ -100,6 +98,8 @@ if (NOT DISABLE_RCT2 AND UNIX) ) add_custom_target(segfiles DEPENDS openrct2_text openrct2_data) if (NOT USE_MMAP) + set(OBJ_FORMAT "elf32-i386") + set(LINKER_SCRIPT "ld_script_i386.xc") if (APPLE) set(RCT2_SEGMENT_LINKER_FLAGS "-sectcreate rct2_text __text ${CMAKE_BINARY_DIR}/openrct2_text -sectcreate rct2_data __data ${CMAKE_BINARY_DIR}/openrct2_data -segaddr rct2_data 0x8a4000 -segprot rct2_data rwx rwx -segaddr rct2_text 0x401000 -segprot rct2_text rwx rwx -segaddr __TEXT 0x2000000 -read_only_relocs suppress") else () @@ -144,10 +144,12 @@ set_target_properties(${PROJECT} PROPERTIES COMPILE_FLAGS "-Wundef") if (NOT DISABLE_RCT2) add_dependencies(${PROJECT} segfiles) - if (NOT APPLE AND NOT USE_MMAP) - add_dependencies(${PROJECT} linkable_sections) + if (NOT USE_MMAP) + if (NOT APPLE) + add_dependencies(${PROJECT} linkable_sections) + endif () + set_target_properties(${PROJECT} PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) endif () - set_target_properties(${PROJECT} PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) endif () # Libraries @@ -223,8 +225,10 @@ if (NOT DISABLE_TTF AND UNIX AND NOT APPLE) endif () # Compiler flags +set(DEBUG_LEVEL 0 CACHE STRING "Select debug level for compilation. Use value in range 0–3.") set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-aliasing -Werror -Wundef -Wmissing-declarations -Winit-self -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-missing-braces ") set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -Wno-comment -Wshadow -Wmissing-declarations -Wnonnull") +set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -DDEBUG=${DEBUG_LEVEL}") # On mingw all code is already PIC, this will avoid compiler error on redefining this option if (NOT MINGW) @@ -237,14 +241,13 @@ else () set(PIE_FLAG "-fpie") endif () -set(DEBUG_LEVEL 0 CACHE STRING "Select debug level for compilation. Use value in range 0–3.") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG=${DEBUG_LEVEL}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG=${DEBUG_LEVEL}") +if (FORCE32) + set(TARGET_M "-m32") +endif () set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${COMMON_COMPILE_OPTIONS} ${TARGET_M} -Wimplicit") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${COMMON_COMPILE_OPTIONS} ${TARGET_M}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") function (ADD_CHECK_C_COMPILER_FLAG _CFLAGS _CACHE_VAR _FLAG) CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") @@ -286,12 +289,6 @@ set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-overflow") ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) -if (FORCE32) - set(TARGET_M "-m32") - set(OBJ_FORMAT "elf32-i386") - set(LINKER_SCRIPT "ld_script_i386.xc") -endif () - # Defines if (USE_MMAP) add_definitions(-DUSE_MMAP) From 10182879da50a771f371e5bbf02063a5b5d12629 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 03:16:40 +0000 Subject: [PATCH 13/76] Invert Context and UiContext dependencies --- src/openrct2-dll/openrct2-dll.cpp | 10 ++- src/openrct2-ui/UiContext.cpp | 53 +++++++----- src/openrct2-ui/UiContext.h | 7 +- .../drawing/engines/DrawingEngines.h | 33 +++----- .../drawing/engines/SoftwareDrawingEngine.cpp | 6 +- .../engines/opengl/OpenGLDrawingEngine.cpp | 17 ++-- src/openrct2/Context.cpp | 78 +++++++++++------ src/openrct2/Context.h | 11 +-- src/openrct2/drawing/IDrawingContext.h | 34 ++++---- src/openrct2/drawing/IDrawingEngine.h | 83 ++++++++----------- src/openrct2/drawing/NewDrawing.cpp | 32 ++----- src/openrct2/drawing/Rain.cpp | 2 + src/openrct2/drawing/Rain.h | 7 +- src/openrct2/ui/UiContext.h | 70 ++++++++++++++++ 14 files changed, 260 insertions(+), 183 deletions(-) create mode 100644 src/openrct2/ui/UiContext.h diff --git a/src/openrct2-dll/openrct2-dll.cpp b/src/openrct2-dll/openrct2-dll.cpp index 8e08fd6d39..c15683e233 100644 --- a/src/openrct2-dll/openrct2-dll.cpp +++ b/src/openrct2-dll/openrct2-dll.cpp @@ -22,8 +22,12 @@ #include #include #include +#include #include +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + #define DLLEXPORT extern "C" __declspec(dllexport) static char * * GetCommandLineArgs(int argc, wchar_t * * argvW); @@ -39,13 +43,13 @@ DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) return -1; } - OpenRCT2::IContext * context = OpenRCT2::CreateContext(); - OpenRCT2::Ui::IUiContext * uiContext = OpenRCT2::Ui::CreateContext(context); + IUiContext * uiContext = OpenRCT2::Ui::CreateContext(); + IContext * context = OpenRCT2::CreateContext(uiContext); int exitCode = context->RunOpenRCT2(argc, argv); - delete uiContext; delete context; + delete uiContext; FreeCommandLineArgs(argc, argv); return exitCode; diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index c9ae28c1ed..397a78b9ac 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -17,41 +17,56 @@ #include #include #include -#include +#include +#include #include "drawing/engines/DrawingEngines.h" #include "UiContext.h" using namespace OpenRCT2; +using namespace OpenRCT2::Drawing; using namespace OpenRCT2::Ui; class UiContext : public IUiContext { -private: - IContext * const _context; - std::vector> _registrations; - - // Drawing engines - SoftwareDrawingEngineFactory _softwareDrawingFactory; - HardwareDisplayDrawingEngineFactory _hardwareDrawingFactory; -#ifndef DISABLE_OPENGL - OpenGLDrawingEngineFactory _openglDrawingFactory; -#endif - public: - UiContext(IContext * context) : - _context(context) + UiContext() { - _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_SOFTWARE, &_softwareDrawingFactory)); - _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY, &_hardwareDrawingFactory)); - _registrations.emplace_back(context->RegisterDrawingEngine(DRAWING_ENGINE_OPENGL, &_openglDrawingFactory)); } ~UiContext() override { } + + // Window + void * GetWindow() override { return nullptr; } + sint32 GetWidth() override { return 0; } + sint32 GetHeight() override { return 0; } + void SetFullscreenMode(FULLSCREEN_MODE mode) override { } + + // Drawing + IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override + { + switch ((sint32)type) { + case DRAWING_ENGINE_SOFTWARE: + return CreateSoftwareDrawingEngine(); + case DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY: + return CreateHardwareDisplayDrawingEngine(); +#ifndef DISABLE_OPENGL + case DRAWING_ENGINE_OPENGL: + return CreateOpenGLDrawingEngine(); +#endif + default: + return nullptr; + } + } + + // Text input + bool IsTextInputActive() override { return false; } + const TextInputSession * StartTextInput(utf8 * buffer, sint32 bufferSize) override { return nullptr; } + void StopTextInput() override { } }; -IUiContext * OpenRCT2::Ui::CreateContext(IContext * context) +IUiContext * OpenRCT2::Ui::CreateContext() { - return new UiContext(context); + return new UiContext(); } diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index ff3b7727d9..cfff4c2439 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -24,11 +24,8 @@ namespace OpenRCT2 namespace Ui { - interface IUiContext - { - virtual ~IUiContext() { } - }; + interface IUiContext; - IUiContext * CreateContext(IContext * context); + IUiContext * CreateContext(); } } diff --git a/src/openrct2-ui/drawing/engines/DrawingEngines.h b/src/openrct2-ui/drawing/engines/DrawingEngines.h index 08a364425d..68aa8296bd 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngines.h +++ b/src/openrct2-ui/drawing/engines/DrawingEngines.h @@ -17,29 +17,20 @@ #pragma once #include -#include -namespace OpenRCT2 { namespace Ui +namespace OpenRCT2 { - class SoftwareDrawingEngineFactory : public Drawing::IDrawingEngineFactory + namespace Drawing { - public: - IDrawingEngine * Create() override; - }; + interface IDrawingEngine; + } - class HardwareDisplayDrawingEngineFactory : public Drawing::IDrawingEngineFactory + namespace Ui { - public: - IDrawingEngine * Create() override; - }; - - #ifndef DISABLE_OPENGL - - class OpenGLDrawingEngineFactory : public Drawing::IDrawingEngineFactory - { - public: - IDrawingEngine * Create() override; - }; - - #endif // DISABLE_OPENGL -} } + Drawing::IDrawingEngine * CreateSoftwareDrawingEngine(); + Drawing::IDrawingEngine * CreateHardwareDisplayDrawingEngine(); +#ifndef DISABLE_OPENGL + Drawing::IDrawingEngine * CreateOpenGLDrawingEngine(); +#endif + } +} diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index e5da799b3a..5a044158c7 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -37,6 +37,8 @@ extern "C" #include } +using namespace OpenRCT2::Drawing; + class SoftwareDrawingEngine; struct DirtyGrid @@ -828,12 +830,12 @@ private: } }; -IDrawingEngine * OpenRCT2::Ui::SoftwareDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::CreateSoftwareDrawingEngine() { return new SoftwareDrawingEngine(false); } -IDrawingEngine * OpenRCT2::Ui::HardwareDisplayDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::CreateHardwareDisplayDrawingEngine() { return new SoftwareDrawingEngine(true); } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 185641bb21..7fecda0e9d 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -14,16 +14,7 @@ *****************************************************************************/ #pragma endregion -#ifdef DISABLE_OPENGL - -#include "../../IDrawingEngine.h" - -IDrawingEngine * DrawingEngineFactory::CreateOpenGL() -{ - return nullptr; -} - -#else +#ifndef DISABLE_OPENGL #include #include @@ -59,6 +50,10 @@ extern "C" #include "TextureCache.h" #include "DrawCommands.h" +using namespace OpenRCT2; +using namespace OpenRCT2::Drawing; +using namespace OpenRCT2::Ui; + struct OpenGLVersion { GLint Major; @@ -499,7 +494,7 @@ private: } }; -IDrawingEngine * OpenRCT2::Ui::OpenGLDrawingEngineFactory::Create() +IDrawingEngine * OpenRCT2::Ui::CreateOpenGLDrawingEngine() { return new OpenGLDrawingEngine(); } diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index ba9060a53f..0e659cdb20 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -14,41 +14,69 @@ *****************************************************************************/ #pragma endregion -#include "drawing/IDrawingEngine.h" +#include #include "Context.h" #include "OpenRCT2.h" using namespace OpenRCT2; +using namespace OpenRCT2::Ui; -class Context : public IContext +namespace OpenRCT2 { -public: - Context() + class Context : public IContext { - } + private: + IUiContext * const _uiContext; - ~Context() override - { - } + public: + // Singleton of Context. + // Remove this when GetContext() is no longer called so that + // multiple instances can be created in parallel + static Context * Instance; - IRegistration * RegisterDrawingEngine(sint32 type, Drawing::IDrawingEngineFactory * factory) override - { - return Drawing::DrawingEngineFactory::Register((DRAWING_ENGINE)type, factory); - } - - sint32 RunOpenRCT2(int argc, char * * argv) override - { - core_init(); - int runGame = cmdline_run((const char * *)argv, argc); - if (runGame == 1) + public: + Context(IUiContext * uiContext) + : _uiContext(uiContext) { - openrct2_launch(); + Instance = this; } - return gExitCode; - } -}; -IContext * OpenRCT2::CreateContext() -{ - return new Context(); + ~Context() override + { + Instance = nullptr; + } + + IUiContext * GetUiContext() override + { + return _uiContext; + } + + sint32 RunOpenRCT2(int argc, char * * argv) override + { + core_init(); + int runGame = cmdline_run((const char * *)argv, argc); + if (runGame == 1) + { + openrct2_launch(); + } + return gExitCode; + } + }; + + Context * Context::Instance = nullptr; + + IContext * CreateContext() + { + return new Context(nullptr); + } + + IContext * CreateContext(IUiContext * uiContext) + { + return new Context(uiContext); + } + + IContext * GetContext() + { + return Context::Instance; + } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 59b424b037..b73841d29b 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -20,11 +20,9 @@ namespace OpenRCT2 { - interface IRegistration; - - namespace Drawing + namespace Ui { - interface IDrawingEngineFactory; + interface IUiContext; } /** @@ -33,9 +31,12 @@ namespace OpenRCT2 interface IContext { virtual ~IContext() = default; - virtual IRegistration * RegisterDrawingEngine(sint32 type, Drawing::IDrawingEngineFactory * factory) abstract; + + virtual Ui::IUiContext * GetUiContext() abstract; virtual sint32 RunOpenRCT2(int argc, char * * argv) abstract; }; IContext * CreateContext(); + IContext * CreateContext(Ui::IUiContext * uiContext); + IContext * GetContext(); } diff --git a/src/openrct2/drawing/IDrawingContext.h b/src/openrct2/drawing/IDrawingContext.h index a9c9afb66f..69287c003e 100644 --- a/src/openrct2/drawing/IDrawingContext.h +++ b/src/openrct2/drawing/IDrawingContext.h @@ -18,24 +18,28 @@ #include "../common.h" -extern "C" { +extern "C" +{ #include "drawing.h" } -interface IDrawingEngine; - -interface IDrawingContext +namespace OpenRCT2 { namespace Drawing { - virtual ~IDrawingContext() { } + interface IDrawingEngine; - virtual IDrawingEngine * GetEngine() abstract; + interface IDrawingContext + { + virtual ~IDrawingContext() { } - virtual void Clear(uint8 paletteIndex) abstract; - virtual void FillRect(uint32 colour, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; - virtual void FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; - virtual void DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) abstract; - virtual void DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) abstract; - virtual void DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) abstract; - virtual void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) abstract; - virtual void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) abstract; -}; + virtual OpenRCT2::Drawing::IDrawingEngine * GetEngine() abstract; + + virtual void Clear(uint8 paletteIndex) abstract; + virtual void FillRect(uint32 colour, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; + virtual void FilterRect(FILTER_PALETTE_ID palette, sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; + virtual void DrawLine(uint32 colour, sint32 x1, sint32 y1, sint32 x2, sint32 y2) abstract; + virtual void DrawSprite(uint32 image, sint32 x, sint32 y, uint32 tertiaryColour) abstract; + virtual void DrawSpriteRawMasked(sint32 x, sint32 y, uint32 maskImage, uint32 colourImage) abstract; + virtual void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) abstract; + virtual void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) abstract; + }; +} } diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index 574913cde7..a791acc222 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -42,59 +42,44 @@ enum DRAWING_ENGINE_FLAGS #ifdef __cplusplus struct rct_drawpixelinfo; -interface IDrawingContext; -interface IDrawingEngine +namespace OpenRCT2 { namespace Drawing { - virtual ~IDrawingEngine() { } + interface IDrawingContext; - virtual void Initialise(SDL_Window * window) abstract; - virtual void Resize(uint32 width, uint32 height) abstract; - virtual void SetPalette(SDL_Color * colours) abstract; - - virtual void SetUncappedFrameRate(bool uncapped) abstract; - - virtual void Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; - virtual void Draw() abstract; - virtual void CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) abstract; - virtual sint32 Screenshot() abstract; - - virtual IDrawingContext * GetDrawingContext(rct_drawpixelinfo * dpi) abstract; - virtual rct_drawpixelinfo * GetDrawingPixelInfo() abstract; - - virtual DRAWING_ENGINE_FLAGS GetFlags() abstract; - - virtual void InvalidateImage(uint32 image) abstract; -}; - -interface IRainDrawer -{ - virtual ~IRainDrawer() { } - virtual void Draw(sint32 x, - sint32 y, - sint32 width, - sint32 height, - sint32 xStart, - sint32 yStart) abstract; -}; - -namespace OpenRCT2 -{ - interface IRegistration; - - namespace Drawing + interface IDrawingEngine { - interface IDrawingEngineFactory - { - virtual ~IDrawingEngineFactory() { } - virtual IDrawingEngine * Create() abstract; - }; + virtual ~IDrawingEngine() { } - namespace DrawingEngineFactory - { - IRegistration * Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory); - } - } -} + virtual void Initialise(SDL_Window * window) abstract; + virtual void Resize(uint32 width, uint32 height) abstract; + virtual void SetPalette(SDL_Color * colours) abstract; + + virtual void SetUncappedFrameRate(bool uncapped) abstract; + + virtual void Invalidate(sint32 left, sint32 top, sint32 right, sint32 bottom) abstract; + virtual void Draw() abstract; + virtual void CopyRect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy) abstract; + virtual sint32 Screenshot() abstract; + + virtual IDrawingContext * GetDrawingContext(rct_drawpixelinfo * dpi) abstract; + virtual rct_drawpixelinfo * GetDrawingPixelInfo() abstract; + + virtual DRAWING_ENGINE_FLAGS GetFlags() abstract; + + virtual void InvalidateImage(uint32 image) abstract; + }; + + interface IRainDrawer + { + virtual ~IRainDrawer() { } + virtual void Draw(sint32 x, + sint32 y, + sint32 width, + sint32 height, + sint32 xStart, + sint32 yStart) abstract; + }; +} } #endif diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 67f5668572..0ba3e5148a 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -15,6 +15,8 @@ #pragma endregion #include +#include "../Context.h" +#include "../ui/UiContext.h" #include "../core/Exception.hpp" #include "../core/Registration.hpp" #include "IDrawingContext.h" @@ -33,28 +35,10 @@ extern "C" using namespace OpenRCT2; using namespace OpenRCT2::Drawing; +using namespace OpenRCT2::Ui; static sint32 _drawingEngineType = DRAWING_ENGINE_SOFTWARE; static IDrawingEngine * _drawingEngine = nullptr; -static IDrawingEngineFactory * _drawingEngineFactories[DRAWING_ENGINE_COUNT] = { nullptr }; - -IRegistration * DrawingEngineFactory::Register(DRAWING_ENGINE type, IDrawingEngineFactory * factory) -{ - if (_drawingEngineFactories[type] != nullptr) - { - throw std::invalid_argument("Engine already registered."); - } - _drawingEngineFactories[type] = factory; - - return Registration::Create([type, factory]() -> void - { - if (_drawingEngineFactories[type] != factory) - { - throw std::invalid_argument("Engine not registered."); - } - _drawingEngineFactories[type] = nullptr; - }); -} extern "C" { @@ -94,14 +78,10 @@ extern "C" assert(_drawingEngine == nullptr); _drawingEngineType = gConfigGeneral.drawing_engine; - IDrawingEngineFactory * deFactory = _drawingEngineFactories[_drawingEngineType]; - if (deFactory == nullptr) - { - log_fatal("Drawing engine not registered."); - exit(-1); - } - IDrawingEngine * drawingEngine = deFactory->Create(); + IContext * context = GetContext(); + IUiContext * uiContext = context->GetUiContext(); + IDrawingEngine * drawingEngine = uiContext->CreateDrawingEngine((DRAWING_ENGINE_TYPE)_drawingEngineType); if (drawingEngine == nullptr) { if (_drawingEngineType == DRAWING_ENGINE_SOFTWARE) diff --git a/src/openrct2/drawing/Rain.cpp b/src/openrct2/drawing/Rain.cpp index 9def06379f..b082144bd8 100644 --- a/src/openrct2/drawing/Rain.cpp +++ b/src/openrct2/drawing/Rain.cpp @@ -26,6 +26,8 @@ extern "C" #include "Rain.h" #include "../core/Math.hpp" +using namespace OpenRCT2::Drawing; + typedef void (* DrawRainFunc)(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height); static void DrawLightRain(IRainDrawer * rainDrawer, sint32 left, sint32 top, sint32 width, sint32 height); diff --git a/src/openrct2/drawing/Rain.h b/src/openrct2/drawing/Rain.h index 89d6194bec..6c07fa7f3d 100644 --- a/src/openrct2/drawing/Rain.h +++ b/src/openrct2/drawing/Rain.h @@ -18,6 +18,9 @@ #include "../common.h" -interface IRainDrawer; +namespace OpenRCT2 { namespace Drawing +{ + interface IRainDrawer; +} } -void DrawRain(rct_drawpixelinfo * dpi, IRainDrawer * rainDrawer); +void DrawRain(rct_drawpixelinfo * dpi, OpenRCT2::Drawing::IRainDrawer * rainDrawer); diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h new file mode 100644 index 0000000000..0cbe4be69d --- /dev/null +++ b/src/openrct2/ui/UiContext.h @@ -0,0 +1,70 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include "../common.h" + +namespace OpenRCT2 +{ + namespace Drawing + { + enum class DRAWING_ENGINE_TYPE; + interface IDrawingEngine; + } + + namespace Ui + { + enum class FULLSCREEN_MODE + { + WINDOWED, + FULLSCREEN, + FULLSCREEN_DESKTOP, + }; + + struct TextInputSession + { + const utf8 * Buffer; // UTF-8 stream + size_t BufferSize; // Maximum number of bytes (excluding null terminator) + size_t Size; // Number of bytes (excluding null terminator) + uint32 Length; // Number of codepoints + size_t SelectionStart; // Selection start, in bytes + size_t SelectionSize; // Selection length in bytes + }; + + /** + * Represents the window or screen that OpenRCT2 is presented on. + */ + interface IUiContext + { + virtual ~IUiContext() = default; + + // Window + virtual void * GetWindow() abstract; + virtual sint32 GetWidth() abstract; + virtual sint32 GetHeight() abstract; + virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; + + // Drawing + virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; + + // Text input + virtual bool IsTextInputActive() abstract; + virtual const TextInputSession * StartTextInput(utf8 * buffer, sint32 bufferSize) abstract; + virtual void StopTextInput() abstract; + }; + } +} From 6375e01f3fbb64207acd31a2f04589aa6501365f Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 11:22:56 +0000 Subject: [PATCH 14/76] Add VS project for CLI only build --- openrct2.sln | 14 +++++++ src/openrct2-cli/Cli.cpp | 4 -- src/openrct2-cli/openrct2-cli.vcxproj | 59 +++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 src/openrct2-cli/openrct2-cli.vcxproj diff --git a/openrct2.sln b/openrct2.sln index 90e2adc669..b42ef99c1a 100644 --- a/openrct2.sln +++ b/openrct2.sln @@ -34,6 +34,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenrct2ui", "src\openrc {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-cli", "src\openrct2-cli\openrct2-cli.vcxproj", "{B6808F71-30B4-4499-8FF6-0B1C86391842}" + ProjectSection(ProjectDependencies) = postProject + {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -87,6 +92,14 @@ Global {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|Win32.Build.0 = Release|Win32 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.ActiveCfg = Release|x64 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.Build.0 = Release|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|Win32.Build.0 = Debug|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|x64.ActiveCfg = Debug|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|x64.Build.0 = Debug|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|Win32.ActiveCfg = Release|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|Win32.Build.0 = Release|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|x64.ActiveCfg = Release|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -98,5 +111,6 @@ Global {62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} {57E60BA1-FB76-4316-909E-C1449C142327} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} + {B6808F71-30B4-4499-8FF6-0B1C86391842} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} EndGlobalSection EndGlobal diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp index 02755a1cc7..4c1e52de49 100644 --- a/src/openrct2-cli/Cli.cpp +++ b/src/openrct2-cli/Cli.cpp @@ -14,8 +14,6 @@ *****************************************************************************/ #pragma endregion -#ifndef _MSC_VER - #include using namespace OpenRCT2; @@ -30,5 +28,3 @@ int main(int argc, char * * argv) delete context; return exitCode; } - -#endif diff --git a/src/openrct2-cli/openrct2-cli.vcxproj b/src/openrct2-cli/openrct2-cli.vcxproj new file mode 100644 index 0000000000..5f153bce6e --- /dev/null +++ b/src/openrct2-cli/openrct2-cli.vcxproj @@ -0,0 +1,59 @@ + + + + ..\..\ + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B6808F71-30B4-4499-8FF6-0B1C86391842} + openrct2-cli + openrct2-cli + + + Application + + + + openrct2-cli + $(SolutionDir)bin;$(LibraryPath) + + + + $(IntDir)\%(RelativeDir) + $(OPENRCT2_CL_ADDITIONALOPTIONS) %(AdditionalOptions) + + + libopenrct2.lib;%(AdditionalDependencies) + $(OutDir)openrct2-cli.pdb + Console + + + MachineX86 + MachineX64 + + + + + + + + + + \ No newline at end of file From 5885cb646f3d39e016705259751483982ee4dc8c Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 14:57:02 +0000 Subject: [PATCH 15/76] Start moving window logic to UI project --- .../interface => openrct2-ui}/CursorData.cpp | 9 +- src/openrct2-ui/CursorRepository.cpp | 80 +++++ src/openrct2-ui/CursorRepository.h | 45 +++ src/openrct2-ui/UiContext.Win32.cpp | 99 ++++++ src/openrct2-ui/UiContext.cpp | 281 +++++++++++++++++- src/openrct2-ui/UiContext.h | 10 + src/openrct2-ui/libopenrct2ui.vcxproj | 4 + src/openrct2/Context.cpp | 9 + src/openrct2/Context.h | 13 + src/openrct2/input.c | 3 +- src/openrct2/interface/Cursors.cpp | 116 -------- src/openrct2/interface/Cursors.h | 25 +- src/openrct2/platform/shared.c | 225 -------------- src/openrct2/platform/windows.c | 12 - src/openrct2/ui/UiContext.h | 34 +++ src/openrct2/world/map.c | 3 +- 16 files changed, 580 insertions(+), 388 deletions(-) rename src/{openrct2/interface => openrct2-ui}/CursorData.cpp (99%) create mode 100644 src/openrct2-ui/CursorRepository.cpp create mode 100644 src/openrct2-ui/CursorRepository.h create mode 100644 src/openrct2-ui/UiContext.Win32.cpp delete mode 100644 src/openrct2/interface/Cursors.cpp diff --git a/src/openrct2/interface/CursorData.cpp b/src/openrct2-ui/CursorData.cpp similarity index 99% rename from src/openrct2/interface/CursorData.cpp rename to src/openrct2-ui/CursorData.cpp index 4777b161eb..2015f5d88b 100644 --- a/src/openrct2/interface/CursorData.cpp +++ b/src/openrct2-ui/CursorData.cpp @@ -14,9 +14,10 @@ *****************************************************************************/ #pragma endregion -#include "Cursors.h" +#include +#include "CursorRepository.h" -namespace Cursors +namespace OpenRCT2 { namespace Ui { static const CursorData BlankCursorData = { @@ -654,7 +655,7 @@ namespace Cursors &HandClosedDownCursorData, // CURSOR_HAND_CLOSED }; - const CursorData * GetCursorData(CURSOR_ID cursorId) + const CursorData * CursorRepository::GetCursorData(CURSOR_ID cursorId) { const CursorData * result = nullptr; if (cursorId >= 0 && cursorId < CURSOR_COUNT) @@ -663,4 +664,4 @@ namespace Cursors } return result; } -} +} } diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp new file mode 100644 index 0000000000..61b027c2b2 --- /dev/null +++ b/src/openrct2-ui/CursorRepository.cpp @@ -0,0 +1,80 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include "CursorRepository.h" + +using namespace OpenRCT2::Ui; + +CursorRepository::CursorRepository() +{ + // Using system cursors + _loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); + _loadedCursors[CURSOR_HAND_POINT] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND); + + // Using custom cursors + for (size_t i = 0; i < CURSOR_COUNT; i++) + { + const CursorData * cursorData = GetCursorData((CURSOR_ID)i); + if (cursorData != nullptr) + { + _loadedCursors[i] = Create(cursorData); + } + } + + _currentCursor = CURSOR_UNDEFINED; + SetCurrentCursor(CURSOR_ARROW); +} + +CursorRepository::~CursorRepository() +{ + for (size_t i = 0; i < CURSOR_COUNT; i++) + { + SDL_FreeCursor(_loadedCursors[i]); + _loadedCursors[i] = nullptr; + } + _currentCursor = CURSOR_UNDEFINED; +} + +CURSOR_ID CursorRepository::GetCurrentCursor() +{ + return _currentCursor; +} + +void CursorRepository::SetCurrentCursor(CURSOR_ID cursorId) +{ + if (_currentCursor != cursorId) + { + SDL_Cursor * cursor = _loadedCursors[cursorId]; + SDL_SetCursor(cursor); + _currentCursor = cursorId; + } +} + +SDL_Cursor * CursorRepository::Create(const CursorData * cursorInfo) +{ + SDL_Cursor * cursor = SDL_CreateCursor( + cursorInfo->Data, + cursorInfo->Mask, + CURSOR_WIDTH, + CURSOR_HEIGHT, + cursorInfo->HotSpot.X, + cursorInfo->HotSpot.Y); + return cursor; +} diff --git a/src/openrct2-ui/CursorRepository.h b/src/openrct2-ui/CursorRepository.h new file mode 100644 index 0000000000..c15faf4a95 --- /dev/null +++ b/src/openrct2-ui/CursorRepository.h @@ -0,0 +1,45 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include + +struct SDL_Cursor; + +namespace OpenRCT2 +{ + namespace Ui + { + class CursorRepository + { + private: + constexpr static sint32 CURSOR_WIDTH = 32; + constexpr static sint32 CURSOR_HEIGHT = 32; + + SDL_Cursor * _loadedCursors[CURSOR_COUNT]; + CURSOR_ID _currentCursor = CURSOR_UNDEFINED; + + public: + CursorRepository(); + ~CursorRepository(); + CURSOR_ID GetCurrentCursor(); + void SetCurrentCursor(CURSOR_ID cursorId); + + private: + SDL_Cursor * Create(const CursorData * cursorInfo); + static const CursorData * GetCursorData(CURSOR_ID cursorId); + }; + } +} diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp new file mode 100644 index 0000000000..55d0a6efd7 --- /dev/null +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -0,0 +1,99 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#define WIN32_LEAN_AND_MEAN + +#include +#include +#include +#include +#include "UiContext.h" + +// Native resource IDs +#include "../../../resources/resource.h" + +#ifdef __WINDOWS__ + +namespace OpenRCT2 { namespace Ui +{ + class Win32Context : public IPlatformUiContext + { + private: + HMODULE _win32module; + + public: + Win32Context() + { + _win32module = GetModuleHandleA(nullptr); + } + + void SetWindowIcon(SDL_Window * window) override + { + if (_win32module != nullptr) + { + HICON icon = LoadIconA(_win32module, MAKEINTRESOURCEA(IDI_ICON)); + if (icon != nullptr) + { + HWND hwnd = GetHWND(window); + if (hwnd != nullptr) + { + SendMessageA(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); + } + } + } + } + + bool IsSteamOverlayAttached() override + { + return (GetModuleHandleA("GameOverlayRenderer.dll") != nullptr); + } + + private: + HWND GetHWND(SDL_Window * window) + { + HWND result = nullptr; + if (window != nullptr) + { + SDL_SysWMinfo wmInfo; + SDL_VERSION(&wmInfo.version); + if (SDL_GetWindowWMInfo(window, &wmInfo) != SDL_TRUE) + { + log_error("SDL_GetWindowWMInfo failed %s", SDL_GetError()); + exit(-1); + } + + result = wmInfo.info.win.window; +#ifdef __MINGW32__ + assert(sizeof(HWND) == sizeof(uint32)); + uint8 A = (uint32)result & 0xff000000 >> 24; + uint8 B = (uint32)result & 0xff0000 >> 16; + uint8 C = (uint32)result & 0xff00 >> 8; + uint8 D = (uint32)handle & 0xff; + result = (HWND)(D << 24 | A << 16 | B << 8 | C); + log_warning("twisting bits of handle, a workaround for mingw/sdl bug"); +#endif // __MINGW32__ + } + return result; + } + }; + + IPlatformUiContext * CreatePlatformUiContext() + { + return new Win32Context(); + } +} } + +#endif // __WINDOWS__ diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 397a78b9ac..711c495f7f 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -14,11 +14,17 @@ *****************************************************************************/ #pragma endregion +#include #include #include +#include +#include #include #include +#include #include +#include +#include "CursorRepository.h" #include "drawing/engines/DrawingEngines.h" #include "UiContext.h" @@ -28,20 +34,93 @@ using namespace OpenRCT2::Ui; class UiContext : public IUiContext { +private: + IPlatformUiContext * const _platformUiContext; + + CursorRepository _cursorRepository; + + SDL_Window * _window = nullptr; + sint32 _width = 0; + sint32 _height = 0; + + bool _resolutionsAllowAnyAspectRatio = false; + std::vector _fsResolutions; + + bool _steamOverlayActive = false; + public: - UiContext() + UiContext(IPlatformUiContext * platformUiContext) + : _platformUiContext(platformUiContext) { } ~UiContext() override { + CloseWindow(); } // Window - void * GetWindow() override { return nullptr; } - sint32 GetWidth() override { return 0; } - sint32 GetHeight() override { return 0; } - void SetFullscreenMode(FULLSCREEN_MODE mode) override { } + CURSOR_ID GetCursor() override + { + return _cursorRepository.GetCurrentCursor(); + } + + void SetCursor(CURSOR_ID cursor) override + { + _cursorRepository.SetCurrentCursor(cursor); + } + + void * GetWindow() override + { + return _window; + } + + sint32 GetWidth() override + { + return _width; + } + + sint32 GetHeight() override + { + return _height; + } + + void SetFullscreenMode(FULLSCREEN_MODE mode) override + { + static const sint32 SDLFSFlags[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP }; + uint32 windowFlags = SDLFSFlags[(sint32)mode]; + + // HACK Changing window size when in fullscreen usually has no effect + if (mode == FULLSCREEN_MODE::FULLSCREEN) + { + SDL_SetWindowFullscreen(_window, 0); + } + + // Set window size + if (mode == FULLSCREEN_MODE::FULLSCREEN) + { + UpdateFullscreenResolutions(); + Resolution resolution = GetClosestResolution(gConfigGeneral.fullscreen_width, gConfigGeneral.fullscreen_height); + SDL_SetWindowSize(_window, resolution.Width, resolution.Height); + } + else if (mode == FULLSCREEN_MODE::WINDOWED) + { + SDL_SetWindowSize(_window, gConfigGeneral.window_width, gConfigGeneral.window_height); + } + + if (SDL_SetWindowFullscreen(_window, windowFlags)) + { + log_fatal("SDL_SetWindowFullscreen %s", SDL_GetError()); + exit(1); + + // TODO try another display mode rather than just exiting the game + } + } + + std::vector GetFullscreenResolutions() override + { + return _fsResolutions; + } // Drawing IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override @@ -64,9 +143,199 @@ public: bool IsTextInputActive() override { return false; } const TextInputSession * StartTextInput(utf8 * buffer, sint32 bufferSize) override { return nullptr; } void StopTextInput() override { } + +private: + void CreateWindow() + { + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + log_fatal("SDL_Init %s", SDL_GetError()); + exit(-1); + } + + SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0"); + + // TODO This should probably be called somewhere else. It has nothing to do with window creation and can be done as soon as + // g1.dat is loaded. + sub_68371D(); + + // Get saved window size + sint32 width = gConfigGeneral.window_width; + sint32 height = gConfigGeneral.window_height; + if (width == -1) width = 640; + if (height == -1) height = 480; + + // Create window in window first rather than fullscreen so we have the display the window is on first + uint32 flags = SDL_WINDOW_RESIZABLE; + if (gConfigGeneral.drawing_engine == DRAWING_ENGINE_OPENGL) + { + flags |= SDL_WINDOW_OPENGL; + } + + _window = SDL_CreateWindow(OPENRCT2_NAME, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); + if (_window == nullptr) + { + log_fatal("SDL_CreateWindow failed %s", SDL_GetError()); + exit(-1); + } + + SDL_SetWindowGrab(_window, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE); + SDL_SetWindowMinimumSize(_window, 720, 480); + _platformUiContext->SetWindowIcon(_window); +#ifdef __MACOSX__ + macos_disallow_automatic_window_tabbing(); +#endif + + // Initialise the surface, palette and draw buffer + OnResize(width, height); + + UpdateFullscreenResolutions(); + SetFullscreenMode((FULLSCREEN_MODE)gConfigGeneral.fullscreen_mode); + + // Check if steam overlay renderer is loaded into the process + _steamOverlayActive = _platformUiContext->IsSteamOverlayAttached(); + TriggerResize(); + } + + void CloseWindow() + { + drawing_engine_dispose(); + SDL_DestroyWindow(_window); + SDL_Quit(); + } + + void OnResize(sint32 width, sint32 height) + { + // Scale the native window size to the game's canvas size + _width = (sint32)(width / gConfigGeneral.window_scale); + _height = (sint32)(height / gConfigGeneral.window_scale); + + drawing_engine_resize(); + + uint32 flags = SDL_GetWindowFlags(_window); + if ((flags & SDL_WINDOW_MINIMIZED) == 0) + { + window_resize_gui(_width, _height); + window_relocate_windows(_width, _height); + } + + gfx_invalidate_screen(); + + // Check if the window has been resized in windowed mode and update the config file accordingly + // This is called in rct2_update and is only called after resizing a window has finished + sint32 nonWindowFlags = SDL_WINDOW_MAXIMIZED | + SDL_WINDOW_MINIMIZED | + SDL_WINDOW_FULLSCREEN | + SDL_WINDOW_FULLSCREEN_DESKTOP; + if (!(flags & nonWindowFlags)) + { + if (width != gConfigGeneral.window_width || height != gConfigGeneral.window_height) + { + gConfigGeneral.window_width = width; + gConfigGeneral.window_height = height; + config_save_default(); + } + } + } + + /** + * Helper function to set various render target features. + * Does not get triggered on resize, but rather manually on config changes. + */ + void TriggerResize() + { + char scaleQualityBuffer[4]; + uint8 scaleQuality = gConfigGeneral.scale_quality; + if (gConfigGeneral.use_nn_at_integer_scales && + gConfigGeneral.window_scale == std::floor(gConfigGeneral.window_scale)) + { + scaleQuality = 0; + } + snprintf(scaleQualityBuffer, sizeof(scaleQualityBuffer), "%u", scaleQuality); + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); + + sint32 width, height; + SDL_GetWindowSize(_window, &width, &height); + OnResize(width, height); + } + + void UpdateFullscreenResolutions() + { + // Query number of display modes + sint32 displayIndex = SDL_GetWindowDisplayIndex(_window); + sint32 numDisplayModes = SDL_GetNumDisplayModes(displayIndex); + + // Get desktop aspect ratio + SDL_DisplayMode mode; + SDL_GetDesktopDisplayMode(displayIndex, &mode); + + // Get resolutions + auto resolutions = std::vector(numDisplayModes); + float desktopAspectRatio = (float)mode.w / mode.h; + for (sint32 i = 0; i < numDisplayModes; i++) + { + SDL_GetDisplayMode(displayIndex, i, &mode); + + float aspectRatio = (float)mode.w / mode.h; + if (_resolutionsAllowAnyAspectRatio || std::fabs(desktopAspectRatio - aspectRatio) < 0.0001f) + { + resolutions.push_back({ mode.w, mode.h }); + } + } + + // Sort by area + std::sort(resolutions.begin(), resolutions.end()); + // [](const Resolution &a, const Resolution &b) -> bool + // { + // sint32 areaA = a.Width * a.Height; + // sint32 areaB = b.Width * b.Height; + // return areaA < areaB; + // }); + + // Remove duplicates + auto last = std::unique(resolutions.begin(), resolutions.end()); + // [](const Resolution &a, const Resolution &b) -> bool + // { + // return (a.Width == b.Width && a.Height == b.Height); + // }); + resolutions.erase(last, resolutions.end()); + + // Update config fullscreen resolution if not set + if (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1) + { + gConfigGeneral.fullscreen_width = resolutions.back().Width; + gConfigGeneral.fullscreen_height = resolutions.back().Height; + } + } + + Resolution GetClosestResolution(sint32 inWidth, sint32 inHeight) + { + Resolution result = { 640, 480 }; + sint32 closestAreaDiff = -1; + sint32 destinationArea = inWidth * inHeight; + for (const Resolution &resolution : _fsResolutions) + { + // Check if exact match + if (resolution.Width == inWidth && resolution.Height == inHeight) + { + result = resolution; + break; + } + + // Check if area is closer to best match + sint32 areaDiff = std::abs((resolution.Width * resolution.Height) - destinationArea); + if (closestAreaDiff == -1 || areaDiff < closestAreaDiff) + { + closestAreaDiff = areaDiff; + result = resolution; + } + } + return result; + } }; IUiContext * OpenRCT2::Ui::CreateContext() { - return new UiContext(); + auto platformUiContext = std::unique_ptr(CreatePlatformUiContext()); + return new UiContext(platformUiContext.get()); } diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index cfff4c2439..7712bdf935 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -18,6 +18,8 @@ #include +struct SDL_Window; + namespace OpenRCT2 { interface IContext; @@ -26,6 +28,14 @@ namespace OpenRCT2 { interface IUiContext; + interface IPlatformUiContext + { + virtual ~IPlatformUiContext() = default; + virtual void SetWindowIcon(SDL_Window * window) abstract; + virtual bool IsSteamOverlayAttached() abstract; + }; + IUiContext * CreateContext(); + IPlatformUiContext * CreatePlatformUiContext(); } } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 3e86ba50d6..8424c2c760 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -22,6 +22,8 @@ + + @@ -35,8 +37,10 @@ + + diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 0e659cdb20..8a2b30421f 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -17,6 +17,7 @@ #include #include "Context.h" #include "OpenRCT2.h" +#include "ui/UiContext.h" using namespace OpenRCT2; using namespace OpenRCT2::Ui; @@ -80,3 +81,11 @@ namespace OpenRCT2 return Context::Instance; } } + +extern "C" +{ + void context_setcurrentcursor(sint32 cursor) + { + GetContext()->GetUiContext()->SetCursor((CURSOR_ID)cursor); + } +} diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index b73841d29b..7d82241922 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -18,6 +18,8 @@ #include "common.h" +#ifdef __cplusplus + namespace OpenRCT2 { namespace Ui @@ -40,3 +42,14 @@ namespace OpenRCT2 IContext * CreateContext(Ui::IUiContext * uiContext); IContext * GetContext(); } + +#endif // __cplusplus + +#if __cplusplus +extern "C" +{ +#endif + void context_setcurrentcursor(sint32 cursor); +#if __cplusplus +} +#endif diff --git a/src/openrct2/input.c b/src/openrct2/input.c index ab3579e7e3..5170516f60 100644 --- a/src/openrct2/input.c +++ b/src/openrct2/input.c @@ -17,6 +17,7 @@ #include #include "audio/audio.h" #include "config/Config.h" +#include "Context.h" #include "game.h" #include "input.h" #include "interface/chat.h" @@ -1557,7 +1558,7 @@ void sub_6ED990(uint8 cursor_id) if (_inputState == INPUT_STATE_RESIZING) { cursor_id = CURSOR_DIAGONAL_ARROWS; } - cursors_setcurrentcursor(cursor_id); + context_setcurrentcursor(cursor_id); } diff --git a/src/openrct2/interface/Cursors.cpp b/src/openrct2/interface/Cursors.cpp deleted file mode 100644 index d2e915cd6e..0000000000 --- a/src/openrct2/interface/Cursors.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers -/***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ -#pragma endregion - -#include -#include "../core/Guard.hpp" -#include "Cursors.h" - -namespace Cursors -{ - constexpr sint32 CURSOR_WIDTH = 32; - constexpr sint32 CURSOR_HEIGHT = 32; - - static SDL_Cursor * _loadedCursors[CURSOR_COUNT]; - static bool _initialised = false; - static CURSOR_ID _currentCursor = CURSOR_UNDEFINED; - - static SDL_Cursor * Create(const CursorData * cursorInfo) - { - SDL_Cursor * cursor = SDL_CreateCursor( - cursorInfo->Data, - cursorInfo->Mask, - CURSOR_WIDTH, - CURSOR_HEIGHT, - cursorInfo->HotSpot.X, - cursorInfo->HotSpot.Y); - return cursor; - } - - void Initialise() - { - Guard::Assert(!_initialised, "Cursors have already been initialised."); - _initialised = true; - - // Using system cursors - _loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); - _loadedCursors[CURSOR_HAND_POINT] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND); - - // Using custom cursors - for (size_t i = 0; i < CURSOR_COUNT; i++) - { - const CursorData * cursorData = GetCursorData((CURSOR_ID)i); - if (cursorData != nullptr) - { - _loadedCursors[i] = Create(cursorData); - } - } - - _currentCursor = CURSOR_UNDEFINED; - SetCurrentCursor(CURSOR_ARROW); - } - - void Dispose() - { - if (_initialised) - { - for (size_t i = 0; i < CURSOR_COUNT; i++) - { - SDL_FreeCursor(_loadedCursors[i]); - _loadedCursors[i] = nullptr; - } - _currentCursor = CURSOR_UNDEFINED; - _initialised = false; - } - } - - CURSOR_ID GetCurrentCursor() - { - return _currentCursor; - } - - void SetCurrentCursor(CURSOR_ID cursorId) - { - if (_currentCursor != cursorId) - { - SDL_Cursor * cursor = _loadedCursors[cursorId]; - SDL_SetCursor(cursor); - _currentCursor = cursorId; - } - } -} - -extern "C" -{ - void cursors_initialise() - { - Cursors::Initialise(); - } - - void cursors_dispose() - { - Cursors::Dispose(); - } - - sint32 cursors_getcurrentcursor() - { - return Cursors::GetCurrentCursor(); - } - - void cursors_setcurrentcursor(sint32 cursorId) - { - Cursors::SetCurrentCursor((CURSOR_ID)cursorId); - } -} diff --git a/src/openrct2/interface/Cursors.h b/src/openrct2/interface/Cursors.h index 87ae8b1a4a..125d1d9921 100644 --- a/src/openrct2/interface/Cursors.h +++ b/src/openrct2/interface/Cursors.h @@ -53,7 +53,7 @@ enum CURSOR_ID #ifdef __cplusplus -namespace Cursors +namespace OpenRCT2 { namespace Ui { struct CursorData { @@ -65,27 +65,6 @@ namespace Cursors uint8 Data[32 * 4]; uint8 Mask[32 * 4]; }; - - const CursorData * GetCursorData(CURSOR_ID cursorId); - - void Initialise(); - void Dispose(); - CURSOR_ID GetCurrentCursor(); - void SetCurrentCursor(CURSOR_ID cursorId); -} +} } #endif - -#ifdef __cplusplus -extern "C" -{ -#endif - - void cursors_initialise(); - void cursors_dispose(); - sint32 cursors_getcurrentcursor(); - void cursors_setcurrentcursor(sint32 cursorId); - -#ifdef __cplusplus -} -#endif diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 2f3ee893a9..80aa3fb641 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -77,108 +77,6 @@ static const sint32 _fullscreen_modes[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW static uint32 _lastGestureTimestamp; static float _gestureRadius; -static void platform_create_window(); - -#if defined(__APPLE__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) - mach_timebase_info_data_t _mach_base_info = { 0 }; -#endif - -static sint32 resolution_sort_func(const void *pa, const void *pb) -{ - const resolution_t *a = (resolution_t*)pa; - const resolution_t *b = (resolution_t*)pb; - - sint32 areaA = a->width * a->height; - sint32 areaB = b->width * b->height; - - if (areaA == areaB) return 0; - if (areaA < areaB) return -1; - return 1; -} - -void platform_update_fullscreen_resolutions() -{ - // Query number of display modes - sint32 displayIndex = SDL_GetWindowDisplayIndex(gWindow); - sint32 numDisplayModes = SDL_GetNumDisplayModes(displayIndex); - - // Get desktop aspect ratio - SDL_DisplayMode mode; - SDL_GetDesktopDisplayMode(displayIndex, &mode); - - if (gResolutions != NULL) - free(gResolutions); - - // Get resolutions - gNumResolutions = numDisplayModes; - gResolutions = malloc(gNumResolutions * sizeof(resolution_t)); - gNumResolutions = 0; - - float desktopAspectRatio = (float)mode.w / mode.h; - for (sint32 i = 0; i < numDisplayModes; i++) { - SDL_GetDisplayMode(displayIndex, i, &mode); - - float aspectRatio = (float)mode.w / mode.h; - if (gResolutionsAllowAnyAspectRatio || fabs(desktopAspectRatio - aspectRatio) < 0.0001f) { - gResolutions[gNumResolutions].width = mode.w; - gResolutions[gNumResolutions].height = mode.h; - gNumResolutions++; - } - } - - // Sort by area - qsort(gResolutions, gNumResolutions, sizeof(resolution_t), resolution_sort_func); - - // Remove duplicates - resolution_t *resPlace = &gResolutions[0]; - for (sint32 i = 1; i < gNumResolutions; i++) { - resolution_t *resLook = &gResolutions[i]; - if (resLook->width != resPlace->width || resLook->height != resPlace->height) - *++resPlace = *resLook; - } - - gNumResolutions = (sint32)(resPlace - &gResolutions[0]) + 1; - - // Update config fullscreen resolution if not set - if (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1) { - gConfigGeneral.fullscreen_width = gResolutions[gNumResolutions - 1].width; - gConfigGeneral.fullscreen_height = gResolutions[gNumResolutions - 1].height; - } -} - -void platform_get_closest_resolution(sint32 inWidth, sint32 inHeight, sint32 *outWidth, sint32 *outHeight) -{ - sint32 closestWidth = 640, closestHeight = 480; - - sint32 closestAreaDiff = -1; - sint32 destinationArea = inWidth * inHeight; - for (sint32 i = 0; i < gNumResolutions; i++) { - // Check if exact match - if (gResolutions[i].width == inWidth && gResolutions[i].height == inHeight) { - closestWidth = gResolutions[i].width; - closestHeight = gResolutions[i].height; - closestAreaDiff = 0; - break; - } - - // Check if area is closer to best match - sint32 areaDiff = abs((gResolutions[i].width * gResolutions[i].height) - destinationArea); - if (closestAreaDiff == -1 || areaDiff < closestAreaDiff) { - closestAreaDiff = areaDiff; - closestWidth = gResolutions[i].width; - closestHeight = gResolutions[i].height; - } - } - - if (closestAreaDiff != -1) { - *outWidth = closestWidth; - *outHeight = closestHeight; - } else { - *outWidth = 640; - *outHeight = 480; - } -} - void platform_draw() { if (!gOpenRCT2Headless) { @@ -186,58 +84,6 @@ void platform_draw() } } -static void platform_resize(sint32 width, sint32 height) -{ - uint32 flags; - sint32 dst_w = (sint32)(width / gConfigGeneral.window_scale); - sint32 dst_h = (sint32)(height / gConfigGeneral.window_scale); - - gScreenWidth = dst_w; - gScreenHeight = dst_h; - - drawing_engine_resize(); - - flags = SDL_GetWindowFlags(gWindow); - - if ((flags & SDL_WINDOW_MINIMIZED) == 0) { - window_resize_gui(dst_w, dst_h); - window_relocate_windows(dst_w, dst_h); - } - - gfx_invalidate_screen(); - - // Check if the window has been resized in windowed mode and update the config file accordingly - // This is called in rct2_update and is only called after resizing a window has finished - if (!(flags & platform_get_non_window_flags())) { - if (width != gConfigGeneral.window_width || height != gConfigGeneral.window_height) { - gConfigGeneral.window_width = width; - gConfigGeneral.window_height = height; - config_save_default(); - } - } -} - -/** - * @brief platform_trigger_resize - * Helper function to set various render target features. - * - * Does not get triggered on resize, but rather manually on config changes. - */ -void platform_trigger_resize() -{ - char scale_quality_buffer[4]; // just to make sure we can hold whole uint8 - uint8 scale_quality = gConfigGeneral.scale_quality; - if (gConfigGeneral.use_nn_at_integer_scales && gConfigGeneral.window_scale == floor(gConfigGeneral.window_scale)) { - scale_quality = 0; - } - snprintf(scale_quality_buffer, sizeof(scale_quality_buffer), "%u", scale_quality); - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scale_quality_buffer); - - sint32 w, h; - SDL_GetWindowSize(gWindow, &w, &h); - platform_resize(w, h); -} - static uint8 soft_light(uint8 a, uint8 b) { float fa = a / 255.0f; @@ -572,15 +418,8 @@ void platform_process_messages() gKeysState = SDL_GetKeyboardState(&numKeys); } -static void platform_close_window() -{ - drawing_engine_dispose(); - cursors_dispose(); -} - void platform_init() { - platform_create_window(); gKeysPressed = malloc(sizeof(uint8) * 256); memset(gKeysPressed, 0, sizeof(uint8) * 256); @@ -593,57 +432,6 @@ void platform_init() gPalette[255].b = 255; } -static void platform_create_window() -{ - if (SDL_Init(SDL_INIT_VIDEO) < 0) { - log_fatal("SDL_Init %s", SDL_GetError()); - exit(-1); - } - - SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0"); - - cursors_initialise(); - - // TODO This should probably be called somewhere else. It has nothing to do with window creation and can be done as soon as - // g1.dat is loaded. - sub_68371D(); - - // Get window size - sint32 width = gConfigGeneral.window_width; - sint32 height = gConfigGeneral.window_height; - if (width == -1) width = 640; - if (height == -1) height = 480; - - // Create window in window first rather than fullscreen so we have the display the window is on first - uint32 flags = SDL_WINDOW_RESIZABLE; - if (gConfigGeneral.drawing_engine == DRAWING_ENGINE_OPENGL) { - flags |= SDL_WINDOW_OPENGL; - } - - gWindow = SDL_CreateWindow(OPENRCT2_NAME, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); - if (!gWindow) { - log_fatal("SDL_CreateWindow failed %s", SDL_GetError()); - exit(-1); - } - - SDL_SetWindowGrab(gWindow, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE); - SDL_SetWindowMinimumSize(gWindow, 720, 480); - platform_init_window_icon(); -#ifdef __MACOSX__ - macos_disallow_automatic_window_tabbing(); -#endif - - // Initialise the surface, palette and draw buffer - platform_resize(width, height); - - platform_update_fullscreen_resolutions(); - platform_set_fullscreen_mode(gConfigGeneral.fullscreen_mode); - - // Check if steam overlay renderer is loaded into the process - gSteamOverlayActive = platform_check_steam_overlay_attached(); - platform_trigger_resize(); -} - sint32 platform_scancode_to_rct_keycode(sint32 sdl_key) { char keycode = (char)SDL_GetKeyFromScancode((SDL_Scancode)sdl_key); @@ -660,9 +448,6 @@ sint32 platform_scancode_to_rct_keycode(sint32 sdl_key) void platform_free() { free(gKeysPressed); - - platform_close_window(); - SDL_Quit(); } void platform_start_text_input(utf8* buffer, sint32 max_length) @@ -723,16 +508,6 @@ void platform_toggle_windowed_mode() config_save_default(); } -/** - * This is not quite the same as the below function as we don't want to - * dereference the cursor before the function. - * rct2: 0x0407956 - */ -void platform_set_cursor(uint8 cursor) -{ - cursors_setcurrentcursor(cursor); -} - void platform_refresh_video() { SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0"); diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index 0d8878860b..d139fe59d8 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -804,18 +804,6 @@ HWND windows_get_window_handle() return result; } -void platform_init_window_icon() -{ - HMODULE module = plaform_get_dll_module(); - if (module != NULL) { - HICON icon = LoadIcon(module, MAKEINTRESOURCE(IDI_ICON)); - if (icon != NULL) { - HWND hwnd = windows_get_window_handle(); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); - } - } -} - uint16 platform_get_locale_language() { CHAR langCode[4]; diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 0cbe4be69d..c03ead8342 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -16,7 +16,9 @@ #pragma once +#include #include "../common.h" +#include "../interface/Cursors.h" namespace OpenRCT2 { @@ -45,6 +47,34 @@ namespace OpenRCT2 size_t SelectionSize; // Selection length in bytes }; + struct Resolution + { + sint32 Width; + sint32 Height; + }; + + inline bool operator <(const Resolution& lhs, const Resolution& rhs) + { + sint32 areaA = lhs.Width * lhs.Height; + sint32 areaB = rhs.Width * rhs.Height; + if (areaA == areaB) + { + return lhs.Width < rhs.Width; + } + return areaA < areaB; + } + + inline bool operator ==(const Resolution& lhs, const Resolution& rhs) + { + return lhs.Width == rhs.Width && + lhs.Height == rhs.Height; + } + + inline bool operator !=(const Resolution& lhs, const Resolution& rhs) + { + return !(lhs == rhs); + } + /** * Represents the window or screen that OpenRCT2 is presented on. */ @@ -53,11 +83,15 @@ namespace OpenRCT2 virtual ~IUiContext() = default; // Window + virtual CURSOR_ID GetCursor() abstract; + virtual void SetCursor(CURSOR_ID cursor) abstract; virtual void * GetWindow() abstract; virtual sint32 GetWidth() abstract; virtual sint32 GetHeight() abstract; virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; + virtual std::vector GetFullscreenResolutions() abstract; + // Drawing virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; diff --git a/src/openrct2/world/map.c b/src/openrct2/world/map.c index c102c98bbb..b84478c3ac 100644 --- a/src/openrct2/world/map.c +++ b/src/openrct2/world/map.c @@ -18,6 +18,7 @@ #include "../audio/audio.h" #include "../cheats.h" #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../interface/Cursors.h" #include "../interface/window.h" @@ -3319,7 +3320,7 @@ void map_invalidate_selection_rect() */ void map_reorganise_elements() { - platform_set_cursor(CURSOR_ZZZ); + context_setcurrentcursor(CURSOR_ZZZ); rct_map_element* new_map_elements = malloc(0x30000 * sizeof(rct_map_element)); rct_map_element* new_elements_pointer = new_map_elements; From f736e8ff969923aa1514cb06c8e1fa5da2764458 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 25 Mar 2017 17:42:14 +0000 Subject: [PATCH 16/76] Move more platform code to UiContext --- src/openrct2-ui/TextComposition.cpp | 300 ++++++++++++++ src/openrct2-ui/TextComposition.h | 57 +++ src/openrct2-ui/UiContext.cpp | 294 +++++++++++++- .../drawing/engines/SoftwareDrawingEngine.cpp | 8 +- src/openrct2-ui/libopenrct2ui.vcxproj | 2 + src/openrct2/Context.cpp | 60 +++ src/openrct2/Context.h | 35 +- src/openrct2/OpenRCT2.cpp | 6 +- src/openrct2/audio/AudioMixer.cpp | 16 + src/openrct2/audio/AudioMixer.h | 17 +- src/openrct2/input.c | 75 ++-- src/openrct2/interface/chat.c | 5 +- src/openrct2/interface/console.c | 7 +- src/openrct2/interface/window.c | 20 +- src/openrct2/intro.c | 11 +- src/openrct2/platform/platform.h | 48 --- src/openrct2/platform/shared.c | 365 ------------------ src/openrct2/ui/UiContext.h | 21 +- 18 files changed, 845 insertions(+), 502 deletions(-) create mode 100644 src/openrct2-ui/TextComposition.cpp create mode 100644 src/openrct2-ui/TextComposition.h diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp new file mode 100644 index 0000000000..b8536a2b53 --- /dev/null +++ b/src/openrct2-ui/TextComposition.cpp @@ -0,0 +1,300 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include +#include +#include "TextComposition.h" + +extern "C" +{ + #include + #include +} + +#ifdef __MACOSX__ + // macOS uses COMMAND rather than CTRL for many keyboard shortcuts + #define KEYBOARD_PRIMARY_MODIFIER KMOD_GUI +#else + #define KEYBOARD_PRIMARY_MODIFIER KMOD_CTRL +#endif + +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + +bool TextComposition::IsActive() +{ + return SDL_IsTextInputActive() && _session.Buffer != nullptr; +} + +const TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize) +{ + Guard::ArgumentNotNull(buffer); + + // TODO This doesn't work, and position could be improved to where text entry is + SDL_Rect rect = { 10, 10, 100, 100 }; + SDL_SetTextInputRect(&rect); + SDL_StartTextInput(); + + _session.Buffer = buffer; + _session.BufferSize = bufferSize - 1; + _session.Size = strlen(buffer); + _session.SelectionStart = _session.Size; + _session.SelectionSize = 0; + RecalculateLength(); + return &_session; +} + +void TextComposition::Stop() +{ + SDL_StopTextInput(); + _session.Buffer = nullptr; + _imeActive = false; +} + +void TextComposition::HandleMessage(const SDL_Event * e) +{ + switch (e->type) { + case SDL_TEXTEDITING: + // When inputting Korean characters, `edit.length` is always zero + String::Set(_imeBuffer, sizeof(_imeBuffer), e->edit.text); + _imeStart = e->edit.start; + _imeLength = e->edit.length; + _imeActive = ((e->edit.length != 0 || String::SizeOf(e->edit.text) != 0) && _imeBuffer[0] != '\0'); + break; + case SDL_TEXTINPUT: + // will receive an `SDL_TEXTINPUT` event when a composition is committed + _imeActive = false; + if (_session.Buffer != nullptr) + { + // HACK ` will close console, so don't input any text + if (e->text.text[0] == '`' && gConsoleOpen) { + break; + } + + utf8 * newText = String::Duplicate(e->text.text); + utf8_remove_formatting(newText, false); + Insert(newText); + Memory::Free(newText); + + console_refresh_caret(); + window_update_textbox(); + } + break; + case SDL_KEYDOWN: + { + if (_imeActive) + { + break; + } + + uint16 modifier = e->key.keysym.mod; + SDL_Keycode key = e->key.keysym.sym; + if (key == SDLK_KP_ENTER) + { + // Map Keypad enter to regular enter. + key = SDLK_RETURN; + } + + // _lastKeyPressed = e.key.keysym.sym; + // _keysPressed[e.key.keysym.scancode] = 1; + + // Text input + if (_session.Buffer == nullptr) + { + break; + } + + // Clear the input on Backspace (Windows/Linux) or Backspace (macOS) + if (key == SDLK_BACKSPACE && (modifier & KEYBOARD_PRIMARY_MODIFIER)) + { + Clear(); + console_refresh_caret(); + window_update_textbox(); + } + + switch (key) { + case SDLK_BACKSPACE: + // If backspace and we have input text with a cursor position none zero + if (_session.SelectionStart > 0) + { + size_t endOffset = _session.SelectionStart; + CursorLeft(); + _session.SelectionSize = endOffset - _session.SelectionStart; + Delete(); + + console_refresh_caret(); + window_update_textbox(); + } + break; + case SDLK_HOME: + CursorHome(); + console_refresh_caret(); + break; + case SDLK_END: + CursorEnd(); + console_refresh_caret(); + break; + case SDLK_DELETE: + { + size_t startOffset = _session.SelectionStart; + CursorRight(); + _session.SelectionSize = _session.SelectionStart - startOffset; + _session.SelectionStart = startOffset; + Delete(); + console_refresh_caret(); + window_update_textbox(); + break; + } + case SDLK_RETURN: + window_cancel_textbox(); + break; + case SDLK_LEFT: + CursorLeft(); + console_refresh_caret(); + break; + case SDLK_RIGHT: + CursorRight(); + console_refresh_caret(); + break; + case SDLK_v: + if ((modifier & KEYBOARD_PRIMARY_MODIFIER) && SDL_HasClipboardText()) + { + utf8 * text = SDL_GetClipboardText(); + utf8_remove_formatting(text, false); + Insert(text); + SDL_free(text); + window_update_textbox(); + } + break; + } + } + } +} + +void TextComposition::CursorHome() +{ + _session.SelectionStart = 0; +} + +void TextComposition::CursorEnd() +{ + _session.SelectionStart = _session.SelectionSize; +} + +void TextComposition::CursorLeft() +{ + size_t selectionOffset = _session.SelectionStart; + if (selectionOffset > 0) + { + const utf8 * ch = _session.Buffer + selectionOffset; + do + { + ch--; + selectionOffset--; + } + while (!utf8_is_codepoint_start(ch) && selectionOffset > 0); + + _session.SelectionStart = selectionOffset; + } +} + +void TextComposition::CursorRight() +{ + size_t selectionOffset = _session.SelectionStart; + size_t selectionMaxOffset = _session.Size; + if (selectionOffset < selectionMaxOffset) + { + const utf8 * ch = _session.Buffer + _session.SelectionStart; + do + { + ch++; + selectionOffset++; + } + while (!utf8_is_codepoint_start(ch) && selectionOffset < selectionMaxOffset); + + _session.SelectionSize = Math::Max(0, _session.SelectionSize - (selectionOffset - _session.SelectionStart)); + _session.SelectionStart = selectionOffset; + } +} + +void TextComposition::Insert(const utf8 * text) +{ + const utf8 * ch = text; + uint32 codepoint; + while ((codepoint = utf8_get_next(ch, &ch)) != 0) + { + InsertCodepoint(codepoint); + } +} + +void TextComposition::InsertCodepoint(codepoint_t codepoint) +{ + size_t codepointLength = utf8_get_codepoint_length(codepoint); + size_t remainingSize = _session.BufferSize - _session.Size; + if (codepointLength <= remainingSize) + { + utf8 * buffer = (utf8 *)_session.Buffer; + utf8 * insertPtr = buffer + _session.SelectionStart; + if (_session.SelectionStart < _session.Size) + { + // Shift bytes (including null terminator) right to make room for new codepoint + utf8 * targetShiftPtr = insertPtr + codepointLength; + size_t shiftSize = _session.Size - _session.SelectionStart + 1; + memmove(targetShiftPtr, insertPtr, shiftSize); + } + else + { + // Character is appended onto the end, so set byte after it to null terminator + buffer[_session.Size + codepointLength] = 0; + } + + utf8_write_codepoint(insertPtr, codepoint); + _session.SelectionStart += codepointLength; + _session.Size += codepointLength; + _session.Length++; + } +} + +void TextComposition::Clear() +{ + utf8 * buffer = (utf8 *)_session.Buffer; + buffer[0] = 0; + _session.Size = 0; + _session.Length = 0; + _session.SelectionStart = 0; + _session.SelectionSize = 0; +} + +void TextComposition::Delete() +{ + utf8 * buffer = (utf8 *)_session.Buffer; + utf8 * targetShiftPtr = buffer + _session.SelectionStart; + utf8 * sourceShiftPtr = targetShiftPtr + _session.SelectionSize; + size_t shiftSize = _session.SelectionSize - _session.SelectionStart - _session.SelectionSize + 1; + memmove(targetShiftPtr, sourceShiftPtr, shiftSize); + _session.SelectionSize = 0; + RecalculateLength(); +} + +void TextComposition::RecalculateLength() +{ + _session.Size = String::SizeOf(_session.Buffer); + _session.Length = String::LengthOf(_session.Buffer); +} diff --git a/src/openrct2-ui/TextComposition.h b/src/openrct2-ui/TextComposition.h new file mode 100644 index 0000000000..fe9aeddcd1 --- /dev/null +++ b/src/openrct2-ui/TextComposition.h @@ -0,0 +1,57 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include +#include + +union SDL_Event; + +namespace OpenRCT2 +{ + namespace Ui + { + /** + * Represents a + */ + class TextComposition + { + private: + TextInputSession _session = { 0 }; + + bool _imeActive = false; + sint32 _imeStart = 0; + sint32 _imeLength = 0; + utf8 _imeBuffer[32] = { 0 }; + + public: + bool IsActive(); + const TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize); + void Stop(); + void HandleMessage(const SDL_Event * e); + + private: + void CursorHome(); + void CursorEnd(); + void CursorLeft(); + void CursorRight(); + void Insert(const utf8 * text); + void InsertCodepoint(codepoint_t codepoint); + void Clear(); + void Delete(); + void RecalculateLength(); + }; + } +} diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 711c495f7f..cd7666d4a8 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -26,15 +27,31 @@ #include #include "CursorRepository.h" #include "drawing/engines/DrawingEngines.h" +#include "TextComposition.h" #include "UiContext.h" +extern "C" +{ + #include + #include +} + using namespace OpenRCT2; using namespace OpenRCT2::Drawing; using namespace OpenRCT2::Ui; +#ifdef __MACOSX__ + // macOS uses COMMAND rather than CTRL for many keyboard shortcuts + #define KEYBOARD_PRIMARY_MODIFIER KMOD_GUI +#else + #define KEYBOARD_PRIMARY_MODIFIER KMOD_CTRL +#endif + class UiContext : public IUiContext { private: + constexpr static uint32 TOUCH_DOUBLE_TIMEOUT = 300; + IPlatformUiContext * const _platformUiContext; CursorRepository _cursorRepository; @@ -48,6 +65,15 @@ private: bool _steamOverlayActive = false; + // Input + TextComposition _textComposition; + CursorState _cursorState; + uint32 _lastKeyPressed; + const uint8 * _keysState; + uint8 * _keysPressed; + uint32 _lastGestureTimestamp; + float _gestureRadius; + public: UiContext(IPlatformUiContext * platformUiContext) : _platformUiContext(platformUiContext) @@ -60,16 +86,6 @@ public: } // Window - CURSOR_ID GetCursor() override - { - return _cursorRepository.GetCurrentCursor(); - } - - void SetCursor(CURSOR_ID cursor) override - { - _cursorRepository.SetCurrentCursor(cursor); - } - void * GetWindow() override { return _window; @@ -122,6 +138,52 @@ public: return _fsResolutions; } + bool IsSteamOverlayActive() override + { + return _steamOverlayActive; + } + + // Input + const CursorState * GetCursorState() override + { + return &_cursorState; + } + + const uint8 * GetKeysState() override + { + return _keysState; + } + + const uint8 * GetKeysPressed() override + { + return _keysPressed; + } + + CURSOR_ID GetCursor() override + { + return _cursorRepository.GetCurrentCursor(); + } + + void SetCursor(CURSOR_ID cursor) override + { + _cursorRepository.SetCurrentCursor(cursor); + } + + void SetCursorVisible(bool value) override + { + SDL_ShowCursor(value ? SDL_ENABLE : SDL_DISABLE); + } + + void GetCursorPosition(sint32 * x, sint32 * y) override + { + SDL_GetMouseState(x, y); + } + + void SetCursorPosition(sint32 x, sint32 y) override + { + SDL_WarpMouseInWindow(nullptr, x, y); + } + // Drawing IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override { @@ -140,9 +202,215 @@ public: } // Text input - bool IsTextInputActive() override { return false; } - const TextInputSession * StartTextInput(utf8 * buffer, sint32 bufferSize) override { return nullptr; } - void StopTextInput() override { } + bool IsTextInputActive() override + { + return _textComposition.IsActive(); + } + + const TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) override + { + return _textComposition.Start(buffer, bufferSize); + } + + void StopTextInput() override + { + _textComposition.Stop(); + } + + void ProcessMessages() + { + _lastKeyPressed = 0; + _cursorState.left &= ~CURSOR_CHANGED; + _cursorState.middle &= ~CURSOR_CHANGED; + _cursorState.right &= ~CURSOR_CHANGED; + _cursorState.old = 0; + _cursorState.touch = false; + + SDL_Event e; + while (SDL_PollEvent(&e)) + { + switch (e.type) { + case SDL_QUIT: + rct2_quit(); + break; + case SDL_WINDOWEVENT: + // HACK: Fix #2158, OpenRCT2 does not draw if it does not think that the window is + // visible - due a bug in SDL 2.0.3 this hack is required if the + // window is maximised, minimised and then restored again. + if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) + { + if (SDL_GetWindowFlags(_window) & SDL_WINDOW_MAXIMIZED) + { + SDL_RestoreWindow(_window); + SDL_MaximizeWindow(_window); + } + if ((SDL_GetWindowFlags(_window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) + { + SDL_RestoreWindow(_window); + SDL_SetWindowFullscreen(_window, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + } + + if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) + { + OnResize(e.window.data1, e.window.data2); + } + if (gConfigSound.audio_focus && gConfigSound.sound_enabled) + { + if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) + { + Mixer_SetVolume(1); + } + if (e.window.event == SDL_WINDOWEVENT_FOCUS_LOST) + { + Mixer_SetVolume(0); + } + } + break; + case SDL_MOUSEMOTION: + _cursorState.x = (sint32)(e.motion.x / gConfigGeneral.window_scale); + _cursorState.y = (sint32)(e.motion.y / gConfigGeneral.window_scale); + break; + case SDL_MOUSEWHEEL: + if (gConsoleOpen) + { + console_scroll(e.wheel.y); + break; + } + _cursorState.wheel += e.wheel.y * 128; + break; + case SDL_MOUSEBUTTONDOWN: + { + sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); + sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); + switch (e.button.button) { + case SDL_BUTTON_LEFT: + store_mouse_input(MOUSE_STATE_LEFT_PRESS, x, y); + _cursorState.left = CURSOR_PRESSED; + _cursorState.old = 1; + break; + case SDL_BUTTON_MIDDLE: + _cursorState.middle = CURSOR_PRESSED; + break; + case SDL_BUTTON_RIGHT: + store_mouse_input(MOUSE_STATE_RIGHT_PRESS, x, y); + _cursorState.right = CURSOR_PRESSED; + _cursorState.old = 2; + break; + } + break; + } + case SDL_MOUSEBUTTONUP: + { + sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); + sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); + switch (e.button.button) { + case SDL_BUTTON_LEFT: + store_mouse_input(MOUSE_STATE_LEFT_RELEASE, x, y); + _cursorState.left = CURSOR_RELEASED; + _cursorState.old = 3; + break; + case SDL_BUTTON_MIDDLE: + _cursorState.middle = CURSOR_RELEASED; + break; + case SDL_BUTTON_RIGHT: + store_mouse_input(MOUSE_STATE_RIGHT_RELEASE, x, y); + _cursorState.right = CURSOR_RELEASED; + _cursorState.old = 4; + break; + } + break; + } + // Apple sends touchscreen events for trackpads, so ignore these events on macOS +#ifndef __MACOSX__ + case SDL_FINGERMOTION: + _cursorState.x = (sint32)(e.tfinger.x * gScreenWidth); + _cursorState.y = (sint32)(e.tfinger.y * gScreenHeight); + break; + case SDL_FINGERDOWN: + { + sint32 x = (sint32)(e.tfinger.x * gScreenWidth); + sint32 y = (sint32)(e.tfinger.y * gScreenHeight); + + _cursorState.touchIsDouble = (!_cursorState.touchIsDouble && + e.tfinger.timestamp - _cursorState.touchDownTimestamp < TOUCH_DOUBLE_TIMEOUT); + + if (_cursorState.touchIsDouble) + { + store_mouse_input(MOUSE_STATE_RIGHT_PRESS, x, y); + _cursorState.right = CURSOR_PRESSED; + _cursorState.old = 2; + } + else + { + store_mouse_input(MOUSE_STATE_LEFT_PRESS, x, y); + _cursorState.left = CURSOR_PRESSED; + _cursorState.old = 1; + } + _cursorState.touch = true; + _cursorState.touchDownTimestamp = e.tfinger.timestamp; + break; + } + case SDL_FINGERUP: + { + sint32 x = (sint32)(e.tfinger.x * gScreenWidth); + sint32 y = (sint32)(e.tfinger.y * gScreenHeight); + + if (_cursorState.touchIsDouble) + { + store_mouse_input(MOUSE_STATE_RIGHT_RELEASE, x, y); + _cursorState.left = CURSOR_RELEASED; + _cursorState.old = 4; + } + else { + store_mouse_input(MOUSE_STATE_LEFT_RELEASE, x, y); + _cursorState.left = CURSOR_RELEASED; + _cursorState.old = 3; + } + _cursorState.touch = true; + break; + } +#endif + case SDL_KEYDOWN: + _textComposition.HandleMessage(&e); + break; + case SDL_MULTIGESTURE: + if (e.mgesture.numFingers == 2) + { + if (e.mgesture.timestamp > _lastGestureTimestamp + 1000) + { + _gestureRadius = 0; + } + _lastGestureTimestamp = e.mgesture.timestamp; + _gestureRadius += e.mgesture.dDist; + + // Zoom gesture + constexpr sint32 tolerance = 128; + sint32 gesturePixels = (sint32)(_gestureRadius * gScreenWidth); + if (abs(gesturePixels) > tolerance) + { + _gestureRadius = 0; + main_window_zoom(gesturePixels > 0, true); + } + } + break; + case SDL_TEXTEDITING: + _textComposition.HandleMessage(&e); + break; + case SDL_TEXTINPUT: + _textComposition.HandleMessage(&e); + break; + default: + break; + } + } + + _cursorState.any = _cursorState.left | _cursorState.middle | _cursorState.right; + + // Updates the state of the keys + sint32 numKeys = 256; + _keysState = SDL_GetKeyboardState(&numKeys); + } private: void CreateWindow() diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 5a044158c7..641994f6b4 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -15,6 +15,8 @@ #pragma endregion #include +#include +#include #include #include #include @@ -37,6 +39,7 @@ extern "C" #include } +using namespace OpenRCT2; using namespace OpenRCT2::Drawing; class SoftwareDrawingEngine; @@ -730,14 +733,15 @@ private: } SDL_RenderCopy(_sdlRenderer, _screenTexture, nullptr, nullptr); - if (gSteamOverlayActive && gConfigGeneral.steam_overlay_pause) + bool isSteamOverlayActive = GetContext()->GetUiContext()->IsSteamOverlayActive(); + if (isSteamOverlayActive && gConfigGeneral.steam_overlay_pause) { OverlayPreRenderCheck(); } SDL_RenderPresent(_sdlRenderer); - if (gSteamOverlayActive && gConfigGeneral.steam_overlay_pause) + if (isSteamOverlayActive && gConfigGeneral.steam_overlay_pause) { OverlayPostRenderCheck(); } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 8424c2c760..15bdf61d77 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -35,6 +35,7 @@ + @@ -53,6 +54,7 @@ + diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 8a2b30421f..ed94d722df 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -15,6 +15,7 @@ #pragma endregion #include +#include "config/Config.h" #include "Context.h" #include "OpenRCT2.h" #include "ui/UiContext.h" @@ -88,4 +89,63 @@ extern "C" { GetContext()->GetUiContext()->SetCursor((CURSOR_ID)cursor); } + + void context_hide_cursor() + { + GetContext()->GetUiContext()->SetCursorVisible(false); + } + + void context_show_cursor() + { + GetContext()->GetUiContext()->SetCursorVisible(true); + } + + void context_get_cursor_position(sint32 * x, sint32 * y) + { + GetContext()->GetUiContext()->GetCursorPosition(x, y); + } + + void context_get_cursor_position_scaled(sint32 * x, sint32 * y) + { + context_get_cursor_position(x, y); + + // Compensate for window scaling. + *x = (sint32)ceilf(*x / gConfigGeneral.window_scale); + *y = (sint32)ceilf(*y / gConfigGeneral.window_scale); + } + + void context_set_cursor_position(sint32 x, sint32 y) + { + GetContext()->GetUiContext()->SetCursorPosition(x, y); + } + + const CursorState * context_get_cursor_state() + { + return GetContext()->GetUiContext()->GetCursorState(); + } + + const uint8 * context_get_keys_state() + { + return GetContext()->GetUiContext()->GetKeysState(); + } + + const uint8 * context_get_keys_pressed() + { + return GetContext()->GetUiContext()->GetKeysPressed(); + } + + void context_start_text_input(utf8 * buffer, size_t maxLength) + { + GetContext()->GetUiContext()->StartTextInput(buffer, maxLength); + } + + void context_stop_text_input() + { + GetContext()->GetUiContext()->StopTextInput(); + } + + bool context_is_input_active() + { + return GetContext()->GetUiContext()->IsTextInputActive(); + } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 7d82241922..321c378d79 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -18,6 +18,25 @@ #include "common.h" +typedef struct CursorState +{ + sint32 x, y; + uint8 left, middle, right, any; + sint32 wheel; + sint32 old; + bool touch, touchIsDouble; + uint32 touchDownTimestamp; +} CursorState; + +enum +{ + CURSOR_UP = 0, + CURSOR_DOWN = 1, + CURSOR_CHANGED = 2, + CURSOR_RELEASED = CURSOR_UP | CURSOR_CHANGED, + CURSOR_PRESSED = CURSOR_DOWN | CURSOR_CHANGED, +}; + #ifdef __cplusplus namespace OpenRCT2 @@ -45,11 +64,23 @@ namespace OpenRCT2 #endif // __cplusplus -#if __cplusplus +#ifdef __cplusplus extern "C" { #endif void context_setcurrentcursor(sint32 cursor); -#if __cplusplus + void context_hide_cursor(); + void context_show_cursor(); + void context_get_cursor_position(sint32 * x, sint32 * y); + void context_get_cursor_position_scaled(sint32 * x, sint32 * y); + void context_set_cursor_position(sint32 x, sint32 y); + const CursorState * context_get_cursor_state(); + const uint8 * context_get_keys_state(); + const uint8 * context_get_keys_pressed(); + void context_start_text_input(utf8 * buffer, size_t maxLength); + void context_stop_text_input(); + bool context_is_input_active(); + +#ifdef __cplusplus } #endif diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index db5a198f96..56657be733 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -16,6 +16,8 @@ #include #include +#include "Context.h" +#include "ui/UiContext.h" #include "core/Console.hpp" #include "core/File.h" #include "core/FileStream.hpp" @@ -463,7 +465,7 @@ namespace OpenRCT2 { _lastTick = currentTick; } - platform_process_messages(); + GetContext()->GetUiContext()->ProcessMessages(); rct2_update(); if (!_isWindowMinimised) { @@ -486,7 +488,7 @@ namespace OpenRCT2 _uncapTick = currentTick - UPDATE_TIME_MS - 1; } - platform_process_messages(); + GetContext()->GetUiContext()->ProcessMessages(); while (_uncapTick <= currentTick && currentTick - _uncapTick > UPDATE_TIME_MS) { diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index af0a2e6370..72453547ed 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -690,3 +690,19 @@ void Mixer_SetVolume(float volume) gMixer->SetVolume(volume); } } + +sint32 DStoMixerVolume(sint32 volume) +{ + return (sint32)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); +} + +float DStoMixerPan(sint32 pan) +{ + return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; +} + +double DStoMixerRate(sint32 frequency) +{ + return (double)frequency / 22050; +} + diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index c27e17de22..085e911795 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -19,17 +19,6 @@ #include "../common.h" -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - - #include "../platform/platform.h" - -#ifdef __cplusplus -} -#endif // __cplusplus - #define MIXER_LOOP_NONE 0 #define MIXER_LOOP_INFINITE -1 @@ -89,9 +78,9 @@ void Mixer_Channel_SetGroup(void* channel, sint32 group); void* Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming); void Mixer_SetVolume(float volume); -static inline sint32 DStoMixerVolume(sint32 volume) { return (sint32)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); } -static inline float DStoMixerPan(sint32 pan) { return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; } -static inline double DStoMixerRate(sint32 frequency) { return (double)frequency / 22050; } +sint32 DStoMixerVolume(sint32 volume); +float DStoMixerPan(sint32 pan); +double DStoMixerRate(sint32 frequency); #ifdef __cplusplus } diff --git a/src/openrct2/input.c b/src/openrct2/input.c index 5170516f60..de806bf396 100644 --- a/src/openrct2/input.c +++ b/src/openrct2/input.c @@ -159,8 +159,9 @@ static sint32 game_get_next_input(sint32 *x, sint32 *y) { rct_mouse_data *input = get_mouse_input(); if (input == NULL) { - *x = gCursorState.x; - *y = gCursorState.y; + const CursorState * cursorState = context_get_cursor_state(); + *x = cursorState->x; + *y = cursorState->y; return 0; } else { *x = input->x; @@ -200,7 +201,7 @@ static void input_scroll_drag_begin(sint32 x, sint32 y, rct_window* w, rct_widge _ticksSinceDragStart = 0; _dragScrollIndex = window_get_scroll_data_index(w, widgetIndex); - platform_hide_cursor(); + context_hide_cursor(); } /** @@ -241,7 +242,7 @@ static void input_scroll_drag_continue(sint32 x, sint32 y, rct_window* w) sint32 fixedCursorPositionX = (sint32) ceilf(gInputDragLastX * gConfigGeneral.window_scale); sint32 fixedCursorPositionY = (sint32) ceilf(gInputDragLastY * gConfigGeneral.window_scale); - platform_set_cursor_position(fixedCursorPositionX, fixedCursorPositionY); + context_set_cursor_position(fixedCursorPositionX, fixedCursorPositionY); } /** @@ -252,7 +253,7 @@ static void input_scroll_right(sint32 x, sint32 y, sint32 state) { rct_window* w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); if (w == NULL) { - platform_show_cursor(); + context_show_cursor(); _inputState = INPUT_STATE_RESET; return; } @@ -267,7 +268,7 @@ static void input_scroll_right(sint32 x, sint32 y, sint32 state) break; case MOUSE_STATE_RIGHT_RELEASE: _inputState = INPUT_STATE_RESET; - platform_show_cursor(); + context_show_cursor(); break; } } @@ -502,8 +503,8 @@ static void input_viewport_drag_begin(rct_window *w, sint32 x, sint32 y) _dragWidget.window_classification = w->classification; _dragWidget.window_number = w->number; _ticksSinceDragStart = 0; - platform_get_cursor_position(&gInputDragLastX, &gInputDragLastY); - platform_hide_cursor(); + context_get_cursor_position(&gInputDragLastX, &gInputDragLastY); + context_hide_cursor(); // gInputFlags |= INPUT_FLAG_5; } @@ -514,7 +515,7 @@ static void input_viewport_drag_continue() rct_window *w; rct_viewport *viewport; - platform_get_cursor_position(&newDragX, &newDragY); + context_get_cursor_position(&newDragX, &newDragY); dx = newDragX - gInputDragLastX; dy = newDragY - gInputDragLastY; @@ -530,7 +531,7 @@ static void input_viewport_drag_continue() viewport = w->viewport; _ticksSinceDragStart += gTicksSinceLastUpdate; if (viewport == NULL) { - platform_show_cursor(); + context_show_cursor(); _inputState = INPUT_STATE_RESET; } else if (dx != 0 || dy != 0) { if (!(w->flags & WF_NO_SCROLLING)) { @@ -552,13 +553,13 @@ static void input_viewport_drag_continue() } } - platform_set_cursor_position(gInputDragLastX, gInputDragLastY); + context_set_cursor_position(gInputDragLastX, gInputDragLastY); } static void input_viewport_drag_end() { _inputState = INPUT_STATE_RESET; - platform_show_cursor(); + context_show_cursor(); } #pragma endregion @@ -1411,14 +1412,15 @@ void title_handle_keyboard_input() if (!gConsoleOpen) { // Handle modifier keys and key scrolling gInputPlaceObjectModifier = PLACE_OBJECT_MODIFIER_NONE; - if (gKeysState[SDL_SCANCODE_LSHIFT] || gKeysState[SDL_SCANCODE_RSHIFT]) + const uint8 * keysState = context_get_keys_state(); + if (keysState[SDL_SCANCODE_LSHIFT] || keysState[SDL_SCANCODE_RSHIFT]) gInputPlaceObjectModifier |= PLACE_OBJECT_MODIFIER_SHIFT_Z; - if (gKeysState[SDL_SCANCODE_LCTRL] || gKeysState[SDL_SCANCODE_RCTRL]) + if (keysState[SDL_SCANCODE_LCTRL] || keysState[SDL_SCANCODE_RCTRL]) gInputPlaceObjectModifier |= PLACE_OBJECT_MODIFIER_COPY_Z; - if (gKeysState[SDL_SCANCODE_LALT] || gKeysState[SDL_SCANCODE_RALT]) + if (keysState[SDL_SCANCODE_LALT] || keysState[SDL_SCANCODE_RALT]) gInputPlaceObjectModifier |= 4; #ifdef __MACOSX__ - if (gKeysState[SDL_SCANCODE_LGUI] || gKeysState[SDL_SCANCODE_RGUI]) { + if (keysState[SDL_SCANCODE_LGUI] || keysState[SDL_SCANCODE_RGUI]) { gInputPlaceObjectModifier |= 8; } #endif @@ -1430,7 +1432,7 @@ void title_handle_keyboard_input() // Reserve backtick for console if (key == SDL_SCANCODE_GRAVE) { - if ((gConfigGeneral.debugging_tools && !platform_is_input_active()) || gConsoleOpen) { + if ((gConfigGeneral.debugging_tools && !context_is_input_active()) || gConsoleOpen) { window_cancel_textbox(); console_toggle(); } @@ -1476,17 +1478,18 @@ void game_handle_keyboard_input() // Handle modifier keys and key scrolling gInputPlaceObjectModifier = PLACE_OBJECT_MODIFIER_NONE; - if (gKeysState[SDL_SCANCODE_LSHIFT] || gKeysState[SDL_SCANCODE_RSHIFT]) { + const uint8 * keysState = context_get_keys_state(); + if (keysState[SDL_SCANCODE_LSHIFT] || keysState[SDL_SCANCODE_RSHIFT]) { gInputPlaceObjectModifier |= PLACE_OBJECT_MODIFIER_SHIFT_Z; } - if (gKeysState[SDL_SCANCODE_LCTRL] || gKeysState[SDL_SCANCODE_RCTRL]) { + if (keysState[SDL_SCANCODE_LCTRL] || keysState[SDL_SCANCODE_RCTRL]) { gInputPlaceObjectModifier |= PLACE_OBJECT_MODIFIER_COPY_Z; } - if (gKeysState[SDL_SCANCODE_LALT] || gKeysState[SDL_SCANCODE_RALT]) { + if (keysState[SDL_SCANCODE_LALT] || keysState[SDL_SCANCODE_RALT]) { gInputPlaceObjectModifier |= 4; } #ifdef __MACOSX__ - if (gKeysState[SDL_SCANCODE_LGUI] || gKeysState[SDL_SCANCODE_RGUI]) { + if (keysState[SDL_SCANCODE_LGUI] || keysState[SDL_SCANCODE_RGUI]) { gInputPlaceObjectModifier |= 8; } #endif @@ -1501,7 +1504,7 @@ void game_handle_keyboard_input() // Reserve backtick for console if (key == SDL_SCANCODE_GRAVE) { - if ((gConfigGeneral.debugging_tools && !platform_is_input_active()) || gConsoleOpen) { + if ((gConfigGeneral.debugging_tools && !context_is_input_active()) || gConsoleOpen) { window_cancel_textbox(); console_toggle(); } @@ -1536,10 +1539,10 @@ void game_handle_keyboard_input() */ sint32 get_next_key() { - sint32 i; - for (i = 0; i < 221; i++) { - if (gKeysPressed[i]) { - gKeysPressed[i] = 0; + uint8 * keysPressed = (uint8 *)context_get_keys_pressed(); + for (sint32 i = 0; i < 221; i++) { + if (keysPressed[i]) { + keysPressed[i] = 0; return i; } } @@ -1617,15 +1620,16 @@ void game_handle_edge_scroll() scrollY = 0; // Scroll left / right - if (gCursorState.x == 0) + const CursorState * cursorState = context_get_cursor_state(); + if (cursorState->x == 0) scrollX = -1; - else if (gCursorState.x >= gScreenWidth - 1) + else if (cursorState->x >= gScreenWidth - 1) scrollX = 1; // Scroll up / down - if (gCursorState.y == 0) + if (cursorState->y == 0) scrollY = -1; - else if (gCursorState.y >= gScreenHeight - 1) + else if (cursorState->y >= gScreenHeight - 1) scrollY = 1; // Scroll viewport @@ -1661,25 +1665,26 @@ void game_handle_key_scroll() scrollX = 0; scrollY = 0; + const uint8 * keysState = context_get_keys_state(); for (sint32 shortcutId = SHORTCUT_SCROLL_MAP_UP; shortcutId <= SHORTCUT_SCROLL_MAP_RIGHT; shortcutId++) { uint16 shortcutKey = gShortcutKeys[shortcutId]; uint8 scancode = shortcutKey & 0xFF; if (shortcutKey == 0xFFFF) continue; - if (!gKeysState[scancode]) continue; + if (!keysState[scancode]) continue; if (shortcutKey & SHIFT) { - if (!gKeysState[SDL_SCANCODE_LSHIFT] && !gKeysState[SDL_SCANCODE_RSHIFT]) continue; + if (!keysState[SDL_SCANCODE_LSHIFT] && !keysState[SDL_SCANCODE_RSHIFT]) continue; } if (shortcutKey & CTRL) { - if (!gKeysState[SDL_SCANCODE_LCTRL] && !gKeysState[SDL_SCANCODE_RCTRL]) continue; + if (!keysState[SDL_SCANCODE_LCTRL] && !keysState[SDL_SCANCODE_RCTRL]) continue; } if (shortcutKey & ALT) { - if (!gKeysState[SDL_SCANCODE_LALT] && !gKeysState[SDL_SCANCODE_RALT]) continue; + if (!keysState[SDL_SCANCODE_LALT] && !keysState[SDL_SCANCODE_RALT]) continue; } #ifdef __MACOSX__ if (shortcutKey & CMD) { - if (!gKeysState[SDL_SCANCODE_LGUI] && !gKeysState[SDL_SCANCODE_RGUI]) continue; + if (!keysState[SDL_SCANCODE_LGUI] && !keysState[SDL_SCANCODE_RGUI]) continue; } #endif diff --git a/src/openrct2/interface/chat.c b/src/openrct2/interface/chat.c index 5c5c755011..ec76f4f873 100644 --- a/src/openrct2/interface/chat.c +++ b/src/openrct2/interface/chat.c @@ -16,6 +16,7 @@ #include "../audio/audio.h" #include "../audio/AudioMixer.h" +#include "../Context.h" #include "../interface/themes.h" #include "../localisation/localisation.h" #include "../network/network.h" @@ -44,13 +45,13 @@ static void chat_clear_input(); void chat_open() { gChatOpen = true; - platform_start_text_input(_chatCurrentLine, sizeof(_chatCurrentLine)); + context_start_text_input(_chatCurrentLine, sizeof(_chatCurrentLine)); } void chat_close() { gChatOpen = false; - platform_stop_text_input(); + context_stop_text_input(); } void chat_toggle() diff --git a/src/openrct2/interface/console.c b/src/openrct2/interface/console.c index 6a296a9d4d..65a7f86617 100644 --- a/src/openrct2/interface/console.c +++ b/src/openrct2/interface/console.c @@ -18,6 +18,7 @@ #include #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../game.h" #include "../input.h" @@ -91,14 +92,14 @@ void console_open() _consoleScrollPos = 0; console_refresh_caret(); console_update_scroll(); - platform_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); + context_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); } void console_close() { gConsoleOpen = false; console_invalidate(); - platform_stop_text_input(); + context_stop_text_input(); } void console_toggle() @@ -412,7 +413,7 @@ static void console_clear_input() { _consoleCurrentLine[0] = 0; if (gConsoleOpen) { - platform_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); + context_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); } } diff --git a/src/openrct2/interface/window.c b/src/openrct2/interface/window.c index a675cc5398..08a1adbdfb 100644 --- a/src/openrct2/interface/window.c +++ b/src/openrct2/interface/window.c @@ -15,6 +15,7 @@ #pragma endregion #include "../audio/audio.h" +#include "../Context.h" #include "../core/Guard.hpp" #include "../drawing/drawing.h" #include "../editor.h" @@ -295,7 +296,7 @@ static bool window_other_wheel_input(rct_window *w, rct_widgetindex widgetIndex, static void window_all_wheel_input() { // Get wheel value - sint32 raw = gCursorState.wheel; + sint32 raw = context_get_cursor_state()->wheel; sint32 wheel = 0; while (1) { raw -= 120; @@ -311,14 +312,17 @@ static void window_all_wheel_input() wheel += 17; } raw -= 120; - gCursorState.wheel = raw; + + // TODO do something about this hack + CursorState * cursorState = (CursorState *)context_get_cursor_state(); + cursorState->wheel = raw; if (wheel == 0) return; // Check window cursor is over if (!(input_test_flag(INPUT_FLAG_5))) { - rct_window *w = window_find_from_point(gCursorState.x, gCursorState.y); + rct_window *w = window_find_from_point(cursorState->x, cursorState->y); if (w != NULL) { // Check if main window if (w->classification == WC_MAIN_WINDOW || w->classification == WC_VIEWPORT) { @@ -327,7 +331,7 @@ static void window_all_wheel_input() } // Check scroll view, cursor is over - rct_widgetindex widgetIndex = window_find_widget_from_point(w, gCursorState.x, gCursorState.y); + rct_widgetindex widgetIndex = window_find_widget_from_point(w, cursorState->x, cursorState->y); if (widgetIndex != -1) { rct_widget *widget = &w->widgets[widgetIndex]; if (widget->type == WWT_SCROLL) { @@ -1471,7 +1475,7 @@ void window_viewport_get_map_coords_by_cursor(rct_window *w, sint16 *map_x, sint { // Get mouse position to offset against. sint32 mouse_x, mouse_y; - platform_get_cursor_position_scaled(&mouse_x, &mouse_y); + context_get_cursor_position_scaled(&mouse_x, &mouse_y); // Compute map coordinate by mouse position. get_map_coordinates_from_pos(mouse_x, mouse_y, VIEWPORT_INTERACTION_MASK_NONE, map_x, map_y, NULL, NULL, NULL); @@ -1499,7 +1503,7 @@ void window_viewport_centre_tile_around_cursor(rct_window *w, sint16 map_x, sint // Get mouse position to offset against. sint32 mouse_x, mouse_y; - platform_get_cursor_position_scaled(&mouse_x, &mouse_y); + context_get_cursor_position_scaled(&mouse_x, &mouse_y); // Rebase mouse position onto centre of window, and compensate for zoom level. sint32 rebased_x = ((w->width >> 1) - mouse_x) * (1 << w->viewport->zoom), @@ -2507,7 +2511,7 @@ void window_start_textbox(rct_window *call_w, rct_widgetindex call_widget, rct_s // from crashing the game. gTextBoxInput[maxLength - 1] = '\0'; - platform_start_text_input(gTextBoxInput, maxLength); + context_start_text_input(gTextBoxInput, maxLength); } void window_cancel_textbox() @@ -2520,7 +2524,7 @@ void window_cancel_textbox() window_event_textinput_call(w, gCurrentTextBox.widget_index, NULL); gCurrentTextBox.window.classification = WC_NULL; gCurrentTextBox.window.number = 0; - platform_stop_text_input(); + context_stop_text_input(); gUsingWidgetTextBox = false; widget_invalidate(w, gCurrentTextBox.widget_index); gCurrentTextBox.widget_index = WWT_LAST; diff --git a/src/openrct2/intro.c b/src/openrct2/intro.c index c2740dc8a9..5b3b7fcd07 100644 --- a/src/openrct2/intro.c +++ b/src/openrct2/intro.c @@ -16,6 +16,7 @@ #include "audio/audio.h" #include "audio/AudioMixer.h" +#include "Context.h" #include "drawing/drawing.h" #include "intro.h" #include "rct2.h" @@ -221,7 +222,7 @@ void intro_draw(rct_drawpixelinfo *dpi) static void screen_intro_process_mouse_input() { - if (gCursorState.any == CURSOR_PRESSED) { + if (context_get_cursor_state()->any == CURSOR_PRESSED) { screen_intro_skip_part(); } } @@ -232,8 +233,12 @@ static void screen_intro_process_mouse_input() */ static void screen_intro_process_keyboard_input() { - if (gLastKeyPressed != 0) { - screen_intro_skip_part(); + const uint8 * keys = context_get_keys_state(); + for (int i = 0; i < 256; i++) { + if (keys[i] != 0) { + screen_intro_skip_part(); + break; + } } } diff --git a/src/openrct2/platform/platform.h b/src/openrct2/platform/platform.h index ed48c36a68..3c5516b6e2 100644 --- a/src/openrct2/platform/platform.h +++ b/src/openrct2/platform/platform.h @@ -86,23 +86,6 @@ typedef struct rct2_time { uint8 second; } rct2_time; -typedef struct openrct2_cursor { - sint32 x, y; - uint8 left, middle, right, any; - sint32 wheel; - sint32 old; - bool touch, touchIsDouble; - uint32 touchDownTimestamp; -} openrct2_cursor; - -enum { - CURSOR_UP = 0, - CURSOR_DOWN = 1, - CURSOR_CHANGED = 2, - CURSOR_RELEASED = CURSOR_UP | CURSOR_CHANGED, - CURSOR_PRESSED = CURSOR_DOWN | CURSOR_CHANGED, -}; - typedef enum {FD_OPEN, FD_SAVE} filedialog_type; typedef struct file_dialog_desc { @@ -116,44 +99,18 @@ typedef struct file_dialog_desc { } filters[8]; } file_dialog_desc; -extern openrct2_cursor gCursorState; -extern const uint8 *gKeysState; -extern uint8 *gKeysPressed; -extern uint32 gLastKeyPressed; - -extern textinputbuffer gTextInput; -extern bool gTextInputCompositionActive; -extern utf8 gTextInputComposition[32]; -extern sint32 gTextInputCompositionStart; -extern sint32 gTextInputCompositionLength; - -extern sint32 gResolutionsAllowAnyAspectRatio; -extern sint32 gNumResolutions; -extern resolution_t *gResolutions; extern SDL_Window *gWindow; - extern SDL_Color gPalette[256]; -extern bool gSteamOverlayActive; - // Platform shared definitions -void platform_update_fullscreen_resolutions(); -void platform_get_closest_resolution(sint32 inWidth, sint32 inHeight, sint32 *outWidth, sint32 *outHeight); void platform_init(); void platform_draw(); void platform_draw_require_end(); void platform_free(); -void platform_trigger_resize(); void platform_update_palette(const uint8 *colours, sint32 start_index, sint32 num_colours); -void platform_set_fullscreen_mode(sint32 mode); void platform_toggle_windowed_mode(); -void platform_set_cursor(uint8 cursor); void platform_refresh_video(); -void platform_process_messages(); sint32 platform_scancode_to_rct_keycode(sint32 sdl_key); -void platform_start_text_input(utf8 *buffer, sint32 max_length); -void platform_stop_text_input(); -bool platform_is_input_active(); void platform_get_date_utc(rct2_date *out_date); void platform_get_time_utc(rct2_time *out_time); void platform_get_date_local(rct2_date *out_date); @@ -183,11 +140,6 @@ sint32 platform_get_drives(); bool platform_file_copy(const utf8 *srcPath, const utf8 *dstPath, bool overwrite); bool platform_file_move(const utf8 *srcPath, const utf8 *dstPath); bool platform_file_delete(const utf8 *path); -void platform_hide_cursor(); -void platform_show_cursor(); -void platform_get_cursor_position(sint32 *x, sint32 *y); -void platform_get_cursor_position_scaled(sint32 *x, sint32 *y); -void platform_set_cursor_position(sint32 x, sint32 y); uint32 platform_get_ticks(); void platform_sleep(uint32 ms); void platform_resolve_user_data_path(); diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 80aa3fb641..277c911ed8 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -49,21 +49,6 @@ typedef void(*update_palette_func)(const uint8*, sint32, sint32); -openrct2_cursor gCursorState; -const uint8 *gKeysState; -uint8 *gKeysPressed; -uint32 gLastKeyPressed; -textinputbuffer gTextInput; - -bool gTextInputCompositionActive; -utf8 gTextInputComposition[32]; -sint32 gTextInputCompositionStart; -sint32 gTextInputCompositionLength; - -sint32 gNumResolutions = 0; -resolution_t *gResolutions = NULL; -sint32 gResolutionsAllowAnyAspectRatio = 0; - SDL_Window *gWindow = NULL; SDL_Renderer *gRenderer = NULL; SDL_Texture *gBufferTexture = NULL; @@ -147,277 +132,6 @@ void platform_update_palette(const uint8* colours, sint32 start_index, sint32 nu } } -void platform_process_messages() -{ - SDL_Event e; - - gLastKeyPressed = 0; - // gCursorState.wheel = 0; - gCursorState.left &= ~CURSOR_CHANGED; - gCursorState.middle &= ~CURSOR_CHANGED; - gCursorState.right &= ~CURSOR_CHANGED; - gCursorState.old = 0; - gCursorState.touch = false; - - while (SDL_PollEvent(&e)) { - switch (e.type) { - case SDL_QUIT: -// rct2_finish(); - rct2_quit(); - break; - case SDL_WINDOWEVENT: - // HACK: Fix #2158, OpenRCT2 does not draw if it does not think that the window is - // visible - due a bug in SDL2.0.3 this hack is required if the - // window is maximised, minimised and then restored again. - if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { - if (SDL_GetWindowFlags(gWindow) & SDL_WINDOW_MAXIMIZED) { - SDL_RestoreWindow(gWindow); - SDL_MaximizeWindow(gWindow); - } - if ((SDL_GetWindowFlags(gWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) { - SDL_RestoreWindow(gWindow); - SDL_SetWindowFullscreen(gWindow, SDL_WINDOW_FULLSCREEN_DESKTOP); - } - } - - if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) - platform_resize(e.window.data1, e.window.data2); - if (gConfigSound.audio_focus && gConfigSound.sound_enabled) { - if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { - Mixer_SetVolume(1); - } - if (e.window.event == SDL_WINDOWEVENT_FOCUS_LOST) { - Mixer_SetVolume(0); - } - } - break; - case SDL_MOUSEMOTION: - gCursorState.x = (sint32)(e.motion.x / gConfigGeneral.window_scale); - gCursorState.y = (sint32)(e.motion.y / gConfigGeneral.window_scale); - break; - case SDL_MOUSEWHEEL: - if (gConsoleOpen) { - console_scroll(e.wheel.y); - break; - } - gCursorState.wheel += e.wheel.y * 128; - break; - case SDL_MOUSEBUTTONDOWN: - { - sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); - sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); - switch (e.button.button) { - case SDL_BUTTON_LEFT: - store_mouse_input(MOUSE_STATE_LEFT_PRESS, x, y); - gCursorState.left = CURSOR_PRESSED; - gCursorState.old = 1; - break; - case SDL_BUTTON_MIDDLE: - gCursorState.middle = CURSOR_PRESSED; - break; - case SDL_BUTTON_RIGHT: - store_mouse_input(MOUSE_STATE_RIGHT_PRESS, x, y); - gCursorState.right = CURSOR_PRESSED; - gCursorState.old = 2; - break; - } - break; - } - case SDL_MOUSEBUTTONUP: - { - sint32 x = (sint32)(e.button.x / gConfigGeneral.window_scale); - sint32 y = (sint32)(e.button.y / gConfigGeneral.window_scale); - switch (e.button.button) { - case SDL_BUTTON_LEFT: - store_mouse_input(MOUSE_STATE_LEFT_RELEASE, x, y); - gCursorState.left = CURSOR_RELEASED; - gCursorState.old = 3; - break; - case SDL_BUTTON_MIDDLE: - gCursorState.middle = CURSOR_RELEASED; - break; - case SDL_BUTTON_RIGHT: - store_mouse_input(MOUSE_STATE_RIGHT_RELEASE, x, y); - gCursorState.right = CURSOR_RELEASED; - gCursorState.old = 4; - break; - } - break; - } -// Apple sends touchscreen events for trackpads, so ignore these events on macOS -#ifndef __MACOSX__ - case SDL_FINGERMOTION: - gCursorState.x = (sint32)(e.tfinger.x * gScreenWidth); - gCursorState.y = (sint32)(e.tfinger.y * gScreenHeight); - break; - case SDL_FINGERDOWN: - { - sint32 x = (sint32)(e.tfinger.x * gScreenWidth); - sint32 y = (sint32)(e.tfinger.y * gScreenHeight); - - gCursorState.touchIsDouble = (!gCursorState.touchIsDouble - && e.tfinger.timestamp - gCursorState.touchDownTimestamp < TOUCH_DOUBLE_TIMEOUT); - - if (gCursorState.touchIsDouble) { - store_mouse_input(MOUSE_STATE_RIGHT_PRESS, x, y); - gCursorState.right = CURSOR_PRESSED; - gCursorState.old = 2; - } else { - store_mouse_input(MOUSE_STATE_LEFT_PRESS, x, y); - gCursorState.left = CURSOR_PRESSED; - gCursorState.old = 1; - } - gCursorState.touch = true; - gCursorState.touchDownTimestamp = e.tfinger.timestamp; - break; - } - case SDL_FINGERUP: - { - sint32 x = (sint32)(e.tfinger.x * gScreenWidth); - sint32 y = (sint32)(e.tfinger.y * gScreenHeight); - - if (gCursorState.touchIsDouble) { - store_mouse_input(MOUSE_STATE_RIGHT_RELEASE, x, y); - gCursorState.left = CURSOR_RELEASED; - gCursorState.old = 4; - } else { - store_mouse_input(MOUSE_STATE_LEFT_RELEASE, x, y); - gCursorState.left = CURSOR_RELEASED; - gCursorState.old = 3; - } - gCursorState.touch = true; - break; - } -#endif - case SDL_KEYDOWN: - if (gTextInputCompositionActive) break; - - if (e.key.keysym.sym == SDLK_KP_ENTER){ - // Map Keypad enter to regular enter. - e.key.keysym.scancode = SDL_SCANCODE_RETURN; - } - - gLastKeyPressed = e.key.keysym.sym; - gKeysPressed[e.key.keysym.scancode] = 1; - - // Text input - if (gTextInput.buffer == NULL) break; - - // Clear the input on Backspace (Windows/Linux) or Backspace (macOS) - if (e.key.keysym.sym == SDLK_BACKSPACE && (e.key.keysym.mod & KEYBOARD_PRIMARY_MODIFIER)) { - textinputbuffer_clear(&gTextInput); - console_refresh_caret(); - window_update_textbox(); - } - - // If backspace and we have input text with a cursor position none zero - if (e.key.keysym.sym == SDLK_BACKSPACE) { - if (gTextInput.selection_offset > 0) { - size_t endOffset = gTextInput.selection_offset; - textinputbuffer_cursor_left(&gTextInput); - gTextInput.selection_size = endOffset - gTextInput.selection_offset; - textinputbuffer_remove_selected(&gTextInput); - - console_refresh_caret(); - window_update_textbox(); - } - } - if (e.key.keysym.sym == SDLK_HOME) { - textinputbuffer_cursor_home(&gTextInput); - console_refresh_caret(); - } - if (e.key.keysym.sym == SDLK_END) { - textinputbuffer_cursor_end(&gTextInput); - console_refresh_caret(); - } - if (e.key.keysym.sym == SDLK_DELETE) { - size_t startOffset = gTextInput.selection_offset; - textinputbuffer_cursor_right(&gTextInput); - gTextInput.selection_size = gTextInput.selection_offset - startOffset; - gTextInput.selection_offset = startOffset; - textinputbuffer_remove_selected(&gTextInput); - console_refresh_caret(); - window_update_textbox(); - } - if (e.key.keysym.sym == SDLK_RETURN) { - window_cancel_textbox(); - } - if (e.key.keysym.sym == SDLK_LEFT) { - textinputbuffer_cursor_left(&gTextInput); - console_refresh_caret(); - } - else if (e.key.keysym.sym == SDLK_RIGHT) { - textinputbuffer_cursor_right(&gTextInput); - console_refresh_caret(); - } - else if (e.key.keysym.sym == SDLK_v && (SDL_GetModState() & KEYBOARD_PRIMARY_MODIFIER)) { - if (SDL_HasClipboardText()) { - utf8* text = SDL_GetClipboardText(); - - utf8_remove_formatting(text, false); - textinputbuffer_insert(&gTextInput, text); - - SDL_free(text); - - window_update_textbox(); - } - } - break; - case SDL_MULTIGESTURE: - if (e.mgesture.numFingers == 2) { - if (e.mgesture.timestamp > _lastGestureTimestamp + 1000) - _gestureRadius = 0; - _lastGestureTimestamp = e.mgesture.timestamp; - _gestureRadius += e.mgesture.dDist; - - // Zoom gesture - const sint32 tolerance = 128; - sint32 gesturePixels = (sint32)(_gestureRadius * gScreenWidth); - if (abs(gesturePixels) > tolerance) { - _gestureRadius = 0; - main_window_zoom(gesturePixels > 0, true); - } - } - break; - case SDL_TEXTEDITING: - // When inputting Korean characters, `e.edit.length` is always Zero. - safe_strcpy(gTextInputComposition, e.edit.text, sizeof(gTextInputComposition)); - gTextInputCompositionStart = e.edit.start; - gTextInputCompositionLength = e.edit.length; - gTextInputCompositionActive = ((e.edit.length != 0 || strlen(e.edit.text) != 0) && gTextInputComposition[0] != 0); - break; - case SDL_TEXTINPUT: - // will receive an `SDL_TEXTINPUT` event when a composition is committed. - // so, set gTextInputCompositionActive to false. - gTextInputCompositionActive = false; - - if (gTextInput.buffer == NULL) break; - - // HACK ` will close console, so don't input any text - if (e.text.text[0] == '`' && gConsoleOpen) { - break; - } - - utf8* newText = e.text.text; - - utf8_remove_formatting(newText, false); - textinputbuffer_insert(&gTextInput, newText); - - console_refresh_caret(); - window_update_textbox(); - break; - default: - break; - } - } - - gCursorState.any = gCursorState.left | gCursorState.middle | gCursorState.right; - - // Updates the state of the keys - sint32 numKeys = 256; - gKeysState = SDL_GetKeyboardState(&numKeys); -} - void platform_init() { gKeysPressed = malloc(sizeof(uint8) * 256); @@ -450,56 +164,6 @@ void platform_free() free(gKeysPressed); } -void platform_start_text_input(utf8* buffer, sint32 max_length) -{ - // TODO This doesn't work, and position could be improved to where text entry is - SDL_Rect rect = { 10, 10, 100, 100 }; - SDL_SetTextInputRect(&rect); - - SDL_StartTextInput(); - - textinputbuffer_init(&gTextInput, buffer, max_length); -} - -bool platform_is_input_active() -{ - return SDL_IsTextInputActive() && gTextInput.buffer != NULL; -} - -void platform_stop_text_input() -{ - SDL_StopTextInput(); - gTextInput.buffer = NULL; - gTextInputCompositionActive = false; -} - -void platform_set_fullscreen_mode(sint32 mode) -{ - sint32 width, height; - - mode = _fullscreen_modes[mode]; - - // HACK Changing window size when in fullscreen usually has no effect - if (mode == SDL_WINDOW_FULLSCREEN) - SDL_SetWindowFullscreen(gWindow, 0); - - // Set window size - if (mode == SDL_WINDOW_FULLSCREEN) { - platform_update_fullscreen_resolutions(); - platform_get_closest_resolution(gConfigGeneral.fullscreen_width, gConfigGeneral.fullscreen_height, &width, &height); - SDL_SetWindowSize(gWindow, width, height); - } else if (mode == 0) { - SDL_SetWindowSize(gWindow, gConfigGeneral.window_width, gConfigGeneral.window_height); - } - - if (SDL_SetWindowFullscreen(gWindow, mode)) { - log_fatal("SDL_SetWindowFullscreen %s", SDL_GetError()); - exit(1); - - // TODO try another display mode rather than just exiting the game - } -} - void platform_toggle_windowed_mode() { sint32 targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0; @@ -519,35 +183,6 @@ void platform_refresh_video() gfx_invalidate_screen(); } -void platform_hide_cursor() -{ - SDL_ShowCursor(SDL_DISABLE); -} - -void platform_show_cursor() -{ - SDL_ShowCursor(SDL_ENABLE); -} - -void platform_get_cursor_position(sint32 *x, sint32 *y) -{ - SDL_GetMouseState(x, y); -} - -void platform_get_cursor_position_scaled(sint32 *x, sint32 *y) -{ - platform_get_cursor_position(x, y); - - // Compensate for window scaling. - *x = (sint32) ceilf(*x / gConfigGeneral.window_scale); - *y = (sint32) ceilf(*y / gConfigGeneral.window_scale); -} - -void platform_set_cursor_position(sint32 x, sint32 y) -{ - SDL_WarpMouseInWindow(NULL, x, y); -} - uint32 platform_get_ticks() { #ifdef _WIN32 diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index c03ead8342..2f84db1f00 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -20,6 +20,8 @@ #include "../common.h" #include "../interface/Cursors.h" +struct CursorState; + namespace OpenRCT2 { namespace Drawing @@ -42,7 +44,7 @@ namespace OpenRCT2 const utf8 * Buffer; // UTF-8 stream size_t BufferSize; // Maximum number of bytes (excluding null terminator) size_t Size; // Number of bytes (excluding null terminator) - uint32 Length; // Number of codepoints + size_t Length; // Number of codepoints size_t SelectionStart; // Selection start, in bytes size_t SelectionSize; // Selection length in bytes }; @@ -83,21 +85,30 @@ namespace OpenRCT2 virtual ~IUiContext() = default; // Window - virtual CURSOR_ID GetCursor() abstract; - virtual void SetCursor(CURSOR_ID cursor) abstract; virtual void * GetWindow() abstract; virtual sint32 GetWidth() abstract; virtual sint32 GetHeight() abstract; virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; - virtual std::vector GetFullscreenResolutions() abstract; + virtual bool IsSteamOverlayActive() abstract; + virtual void ProcessMessages() abstract; + + // Input + virtual const CursorState * GetCursorState() abstract; + virtual CURSOR_ID GetCursor() abstract; + virtual void SetCursor(CURSOR_ID cursor) abstract; + virtual void SetCursorVisible(bool value) abstract; + virtual void GetCursorPosition(sint32 * x, sint32 * y) abstract; + virtual void SetCursorPosition(sint32 x, sint32 y) abstract; + virtual const uint8 * GetKeysState() abstract; + virtual const uint8 * GetKeysPressed() abstract; // Drawing virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; // Text input virtual bool IsTextInputActive() abstract; - virtual const TextInputSession * StartTextInput(utf8 * buffer, sint32 bufferSize) abstract; + virtual const TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) abstract; virtual void StopTextInput() abstract; }; } From 9d24e47e6f3210ae2e176b09c44f1516d940765a Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 26 Mar 2017 03:36:22 +0100 Subject: [PATCH 17/76] Fix build --- src/openrct2-ui/TextComposition.cpp | 10 +-- src/openrct2-ui/TextComposition.h | 3 +- src/openrct2-ui/UiContext.cpp | 75 ++++++++++--------- src/openrct2/Context.cpp | 24 +++++- src/openrct2/Context.h | 21 +++++- src/openrct2/interface/chat.c | 29 +++---- src/openrct2/interface/console.c | 19 +++-- src/openrct2/interface/widget.c | 7 +- src/openrct2/interface/window.c | 1 + src/openrct2/interface/window.h | 2 + src/openrct2/platform/shared.c | 9 ++- src/openrct2/ui/UiContext.h | 26 ++----- .../windows/editor_object_selection.c | 4 +- src/openrct2/windows/error.c | 6 +- src/openrct2/windows/map_tooltip.c | 11 ++- src/openrct2/windows/options.c | 47 +++++++----- src/openrct2/windows/ride_construction.c | 6 +- src/openrct2/windows/scenery.c | 10 ++- src/openrct2/windows/text_input.c | 43 +++++------ 19 files changed, 205 insertions(+), 148 deletions(-) diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index b8536a2b53..f211cd7aef 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -19,13 +19,13 @@ #include #include #include -#include #include "TextComposition.h" extern "C" { #include #include + #include } #ifdef __MACOSX__ @@ -43,7 +43,7 @@ bool TextComposition::IsActive() return SDL_IsTextInputActive() && _session.Buffer != nullptr; } -const TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize) +TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize) { Guard::ArgumentNotNull(buffer); @@ -250,7 +250,7 @@ void TextComposition::InsertCodepoint(codepoint_t codepoint) size_t remainingSize = _session.BufferSize - _session.Size; if (codepointLength <= remainingSize) { - utf8 * buffer = (utf8 *)_session.Buffer; + utf8 * buffer = _session.Buffer; utf8 * insertPtr = buffer + _session.SelectionStart; if (_session.SelectionStart < _session.Size) { @@ -274,7 +274,7 @@ void TextComposition::InsertCodepoint(codepoint_t codepoint) void TextComposition::Clear() { - utf8 * buffer = (utf8 *)_session.Buffer; + utf8 * buffer = _session.Buffer; buffer[0] = 0; _session.Size = 0; _session.Length = 0; @@ -284,7 +284,7 @@ void TextComposition::Clear() void TextComposition::Delete() { - utf8 * buffer = (utf8 *)_session.Buffer; + utf8 * buffer = _session.Buffer; utf8 * targetShiftPtr = buffer + _session.SelectionStart; utf8 * sourceShiftPtr = targetShiftPtr + _session.SelectionSize; size_t shiftSize = _session.SelectionSize - _session.SelectionStart - _session.SelectionSize + 1; diff --git a/src/openrct2-ui/TextComposition.h b/src/openrct2-ui/TextComposition.h index fe9aeddcd1..af08a34dc3 100644 --- a/src/openrct2-ui/TextComposition.h +++ b/src/openrct2-ui/TextComposition.h @@ -15,6 +15,7 @@ #pragma endregion #include +#include #include union SDL_Event; @@ -38,7 +39,7 @@ namespace OpenRCT2 public: bool IsActive(); - const TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize); + TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize); void Stop(); void HandleMessage(const SDL_Event * e); diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index cd7666d4a8..37e9b40043 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include "CursorRepository.h" @@ -32,8 +31,9 @@ extern "C" { - #include #include + #include + #include } using namespace OpenRCT2; @@ -135,6 +135,7 @@ public: std::vector GetFullscreenResolutions() override { + UpdateFullscreenResolutions(); return _fsResolutions; } @@ -207,7 +208,7 @@ public: return _textComposition.IsActive(); } - const TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) override + TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) override { return _textComposition.Start(buffer, bufferSize); } @@ -217,7 +218,7 @@ public: _textComposition.Stop(); } - void ProcessMessages() + void ProcessMessages() override { _lastKeyPressed = 0; _cursorState.left &= ~CURSOR_CHANGED; @@ -412,6 +413,27 @@ public: _keysState = SDL_GetKeyboardState(&numKeys); } + /** + * Helper function to set various render target features. + * Does not get triggered on resize, but rather manually on config changes. + */ + void TriggerResize() override + { + char scaleQualityBuffer[4]; + uint8 scaleQuality = gConfigGeneral.scale_quality; + if (gConfigGeneral.use_nn_at_integer_scales && + gConfigGeneral.window_scale == std::floor(gConfigGeneral.window_scale)) + { + scaleQuality = 0; + } + snprintf(scaleQualityBuffer, sizeof(scaleQualityBuffer), "%u", scaleQuality); + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); + + sint32 width, height; + SDL_GetWindowSize(_window, &width, &height); + OnResize(width, height); + } + private: void CreateWindow() { @@ -506,27 +528,6 @@ private: } } - /** - * Helper function to set various render target features. - * Does not get triggered on resize, but rather manually on config changes. - */ - void TriggerResize() - { - char scaleQualityBuffer[4]; - uint8 scaleQuality = gConfigGeneral.scale_quality; - if (gConfigGeneral.use_nn_at_integer_scales && - gConfigGeneral.window_scale == std::floor(gConfigGeneral.window_scale)) - { - scaleQuality = 0; - } - snprintf(scaleQualityBuffer, sizeof(scaleQualityBuffer), "%u", scaleQuality); - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); - - sint32 width, height; - SDL_GetWindowSize(_window, &width, &height); - OnResize(width, height); - } - void UpdateFullscreenResolutions() { // Query number of display modes @@ -552,20 +553,20 @@ private: } // Sort by area - std::sort(resolutions.begin(), resolutions.end()); - // [](const Resolution &a, const Resolution &b) -> bool - // { - // sint32 areaA = a.Width * a.Height; - // sint32 areaB = b.Width * b.Height; - // return areaA < areaB; - // }); + std::sort(resolutions.begin(), resolutions.end(), + [](const Resolution &a, const Resolution &b) -> bool + { + sint32 areaA = a.Width * a.Height; + sint32 areaB = b.Width * b.Height; + return areaA < areaB; + }); // Remove duplicates - auto last = std::unique(resolutions.begin(), resolutions.end()); - // [](const Resolution &a, const Resolution &b) -> bool - // { - // return (a.Width == b.Width && a.Height == b.Height); - // }); + auto last = std::unique(resolutions.begin(), resolutions.end(), + [](const Resolution &a, const Resolution &b) -> bool + { + return (a.Width == b.Width && a.Height == b.Height); + }); resolutions.erase(last, resolutions.end()); // Update config fullscreen resolution if not set diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index ed94d722df..c84d8d2c8f 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -15,6 +15,7 @@ #pragma endregion #include +#include "core/Memory.hpp" #include "config/Config.h" #include "Context.h" #include "OpenRCT2.h" @@ -134,9 +135,9 @@ extern "C" return GetContext()->GetUiContext()->GetKeysPressed(); } - void context_start_text_input(utf8 * buffer, size_t maxLength) + TextInputSession * context_start_text_input(utf8 * buffer, size_t maxLength) { - GetContext()->GetUiContext()->StartTextInput(buffer, maxLength); + return GetContext()->GetUiContext()->StartTextInput(buffer, maxLength); } void context_stop_text_input() @@ -148,4 +149,23 @@ extern "C" { return GetContext()->GetUiContext()->IsTextInputActive(); } + + void context_trigger_resize() + { + return GetContext()->GetUiContext()->TriggerResize(); + } + + void context_set_fullscreen_mode(sint32 mode) + { + return GetContext()->GetUiContext()->SetFullscreenMode((FULLSCREEN_MODE)mode); + } + + sint32 context_get_resolutions(Resolution * * outResolutions) + { + auto resolutions = GetContext()->GetUiContext()->GetFullscreenResolutions(); + sint32 count = (sint32)resolutions.size(); + *outResolutions = Memory::AllocateArray(count); + Memory::CopyArray(*outResolutions, resolutions.data(), count); + return count; + } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 321c378d79..7a4ddb6ea6 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -28,6 +28,22 @@ typedef struct CursorState uint32 touchDownTimestamp; } CursorState; +typedef struct TextInputSession +{ + utf8 * Buffer; // UTF-8 stream + size_t BufferSize; // Maximum number of bytes (excluding null terminator) + size_t Size; // Number of bytes (excluding null terminator) + size_t Length; // Number of codepoints + size_t SelectionStart; // Selection start, in bytes + size_t SelectionSize; // Selection length in bytes +} TextInputSession; + +struct Resolution +{ + sint32 Width; + sint32 Height; +}; + enum { CURSOR_UP = 0, @@ -77,9 +93,12 @@ extern "C" const CursorState * context_get_cursor_state(); const uint8 * context_get_keys_state(); const uint8 * context_get_keys_pressed(); - void context_start_text_input(utf8 * buffer, size_t maxLength); + TextInputSession * context_start_text_input(utf8 * buffer, size_t maxLength); void context_stop_text_input(); bool context_is_input_active(); + void context_trigger_resize(); + void context_set_fullscreen_mode(sint32 mode); + sint32 context_get_resolutions(struct Resolution * * outResolutions); #ifdef __cplusplus } diff --git a/src/openrct2/interface/chat.c b/src/openrct2/interface/chat.c index ec76f4f873..c39afe0f95 100644 --- a/src/openrct2/interface/chat.c +++ b/src/openrct2/interface/chat.c @@ -26,17 +26,18 @@ #include "chat.h" bool gChatOpen = false; -char _chatCurrentLine[CHAT_MAX_MESSAGE_LENGTH]; -char _chatHistory[CHAT_HISTORY_SIZE][CHAT_INPUT_SIZE]; -uint32 _chatHistoryTime[CHAT_HISTORY_SIZE]; -uint32 _chatHistoryIndex = 0; -uint32 _chatCaretTicks = 0; -sint32 _chatLeft; -sint32 _chatTop; -sint32 _chatRight; -sint32 _chatBottom; -sint32 _chatWidth; -sint32 _chatHeight; +static char _chatCurrentLine[CHAT_MAX_MESSAGE_LENGTH]; +static char _chatHistory[CHAT_HISTORY_SIZE][CHAT_INPUT_SIZE]; +static uint32 _chatHistoryTime[CHAT_HISTORY_SIZE]; +static uint32 _chatHistoryIndex = 0; +static uint32 _chatCaretTicks = 0; +static sint32 _chatLeft; +static sint32 _chatTop; +static sint32 _chatRight; +static sint32 _chatBottom; +static sint32 _chatWidth; +static sint32 _chatHeight; +static TextInputSession * _chatTextInputSession; static const char* chat_history_get(uint32 index); static uint32 chat_history_get_time(uint32 index); @@ -45,7 +46,7 @@ static void chat_clear_input(); void chat_open() { gChatOpen = true; - context_start_text_input(_chatCurrentLine, sizeof(_chatCurrentLine)); + _chatTextInputSession = context_start_text_input(_chatCurrentLine, sizeof(_chatCurrentLine)); } void chat_close() @@ -161,8 +162,8 @@ void chat_draw(rct_drawpixelinfo * dpi) // TODO: Show caret if the input text has multiple lines if (_chatCaretTicks < 15 && gfx_get_string_width(lineBuffer) < (_chatWidth - 10)) { - memcpy(lineBuffer, _chatCurrentLine, gTextInput.selection_offset); - lineBuffer[gTextInput.selection_offset] = 0; + memcpy(lineBuffer, _chatCurrentLine, _chatTextInputSession->SelectionStart); + lineBuffer[_chatTextInputSession->SelectionStart] = 0; sint32 caretX = x + gfx_get_string_width(lineBuffer); sint32 caretY = y + 14; diff --git a/src/openrct2/interface/console.c b/src/openrct2/interface/console.c index 65a7f86617..8b1ff0c56f 100644 --- a/src/openrct2/interface/console.c +++ b/src/openrct2/interface/console.c @@ -64,6 +64,7 @@ static sint32 _consoleCaretTicks; static utf8 _consolePrintfBuffer[CONSOLE_BUFFER_2_SIZE]; static utf8 _consoleErrorBuffer[CONSOLE_BUFFER_2_SIZE]; static sint32 _consoleScrollPos = 0; +static TextInputSession * _consoleTextInputSession; static utf8 _consoleHistory[CONSOLE_HISTORY_SIZE][CONSOLE_INPUT_SIZE]; static sint32 _consoleHistoryIndex = 0; @@ -92,7 +93,7 @@ void console_open() _consoleScrollPos = 0; console_refresh_caret(); console_update_scroll(); - context_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); + _consoleTextInputSession = context_start_text_input(_consoleCurrentLine, sizeof(_consoleCurrentLine)); } void console_close() @@ -236,8 +237,8 @@ void console_draw(rct_drawpixelinfo *dpi) // Draw caret if (_consoleCaretTicks < 15) { - memcpy(lineBuffer, _consoleCurrentLine, gTextInput.selection_offset); - lineBuffer[gTextInput.selection_offset] = 0; + memcpy(lineBuffer, _consoleCurrentLine, _consoleTextInputSession->SelectionStart); + lineBuffer[_consoleTextInputSession->SelectionStart] = 0; sint32 caretX = x + gfx_get_string_width(lineBuffer); sint32 caretY = y + lineHeight; @@ -271,15 +272,17 @@ void console_input(sint32 c) _consoleHistoryIndex--; memcpy(_consoleCurrentLine, _consoleHistory[_consoleHistoryIndex], 256); } - textinputbuffer_recalculate_length(&gTextInput); - gTextInput.selection_offset = strlen(_consoleCurrentLine); + _consoleTextInputSession->Size = strlen(_consoleTextInputSession->Buffer); + _consoleTextInputSession->Length = utf8_length(_consoleTextInputSession->Buffer); + _consoleTextInputSession->SelectionStart = strlen(_consoleCurrentLine); break; case SDL_SCANCODE_DOWN: if (_consoleHistoryIndex < _consoleHistoryCount - 1) { _consoleHistoryIndex++; memcpy(_consoleCurrentLine, _consoleHistory[_consoleHistoryIndex], 256); - textinputbuffer_recalculate_length(&gTextInput); - gTextInput.selection_offset = strlen(_consoleCurrentLine); + _consoleTextInputSession->Size = strlen(_consoleTextInputSession->Buffer); + _consoleTextInputSession->Length = utf8_length(_consoleTextInputSession->Buffer); + _consoleTextInputSession->SelectionStart = strlen(_consoleCurrentLine); } else { _consoleHistoryIndex = _consoleHistoryCount; console_clear_input(); @@ -1006,7 +1009,7 @@ static sint32 cc_set(const utf8 **argv, sint32 argc) gConfigGeneral.window_scale = clamp(newScale, 0.5f, 5.0f); config_save_default(); gfx_invalidate_screen(); - platform_trigger_resize(); + context_trigger_resize(); console_execute_silent("get window_scale"); } else if (strcmp(argv[0], "window_limit") == 0 && invalidArguments(&invalidArgs, int_valid[0])) { diff --git a/src/openrct2/interface/widget.c b/src/openrct2/interface/widget.c index 82e158418a..a822fb859b 100644 --- a/src/openrct2/interface/widget.c +++ b/src/openrct2/interface/widget.c @@ -22,6 +22,7 @@ #include "../platform/platform.h" #include "../localisation/localisation.h" #include "../util/util.h" +#include "../Context.h" #include @@ -1104,15 +1105,15 @@ static void widget_text_box_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg // Make a copy of the string for measuring the width. char temp_string[TEXT_INPUT_SIZE] = { 0 }; - memcpy(temp_string, wrapped_string, min(string_length, gTextInput.selection_offset)); + memcpy(temp_string, wrapped_string, min(string_length, gTextInput->SelectionStart)); sint32 cur_x = l + gfx_get_string_width(temp_string) + 3; sint32 width = 6; - if ((uint32)gTextInput.selection_offset < strlen(gTextBoxInput)){ + if ((uint32)gTextInput->SelectionStart < strlen(gTextBoxInput)){ // Make a new 1 character wide string for measuring the width // of the character that the cursor is under. temp_string[1] = '\0'; - temp_string[0] = gTextBoxInput[gTextInput.selection_offset]; + temp_string[0] = gTextBoxInput[gTextInput->SelectionStart]; width = max(gfx_get_string_width(temp_string) - 2, 4); } diff --git a/src/openrct2/interface/window.c b/src/openrct2/interface/window.c index 08a1adbdfb..a153af4e24 100644 --- a/src/openrct2/interface/window.c +++ b/src/openrct2/interface/window.c @@ -48,6 +48,7 @@ char gTextBoxInput[TEXT_INPUT_SIZE] = { 0 }; sint32 gMaxTextBoxInputLength = 0; sint32 gTextBoxFrameNo = 0; bool gUsingWidgetTextBox = 0; +TextInputSession * gTextInput; uint16 gWindowUpdateTicks; uint8 gToolbarDirtyFlags; diff --git a/src/openrct2/interface/window.h b/src/openrct2/interface/window.h index 5b15a8a3da..06d83fb840 100644 --- a/src/openrct2/interface/window.h +++ b/src/openrct2/interface/window.h @@ -33,6 +33,7 @@ struct rct_window; union rct_window_event; struct track_design_file_ref; struct TitleSequence; +struct TextInputSession; #define TEXT_INPUT_SIZE 1024 @@ -41,6 +42,7 @@ extern char gTextBoxInput[TEXT_INPUT_SIZE]; extern sint32 gMaxTextBoxInputLength; extern sint32 gTextBoxFrameNo; extern bool gUsingWidgetTextBox; +extern struct TextInputSession * gTextInput; typedef void wndproc(struct rct_window*, union rct_window_event*); diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 277c911ed8..62ab7fcfb4 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -19,6 +19,7 @@ #include "../audio/audio.h" #include "../audio/AudioMixer.h" #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../drawing/IDrawingEngine.h" #include "../drawing/lightfx.h" @@ -134,8 +135,8 @@ void platform_update_palette(const uint8* colours, sint32 start_index, sint32 nu void platform_init() { - gKeysPressed = malloc(sizeof(uint8) * 256); - memset(gKeysPressed, 0, sizeof(uint8) * 256); + // gKeysPressed = malloc(sizeof(uint8) * 256); + // memset(gKeysPressed, 0, sizeof(uint8) * 256); // Set the highest palette entry to white. // This fixes a bug with the TT:rainbow road due to the @@ -161,13 +162,13 @@ sint32 platform_scancode_to_rct_keycode(sint32 sdl_key) void platform_free() { - free(gKeysPressed); + // free(gKeysPressed); } void platform_toggle_windowed_mode() { sint32 targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0; - platform_set_fullscreen_mode(targetMode); + context_set_fullscreen_mode(targetMode); gConfigGeneral.fullscreen_mode = targetMode; config_save_default(); } diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 2f84db1f00..e762dc2642 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -18,10 +18,9 @@ #include #include "../common.h" +#include "../Context.h" #include "../interface/Cursors.h" -struct CursorState; - namespace OpenRCT2 { namespace Drawing @@ -39,22 +38,6 @@ namespace OpenRCT2 FULLSCREEN_DESKTOP, }; - struct TextInputSession - { - const utf8 * Buffer; // UTF-8 stream - size_t BufferSize; // Maximum number of bytes (excluding null terminator) - size_t Size; // Number of bytes (excluding null terminator) - size_t Length; // Number of codepoints - size_t SelectionStart; // Selection start, in bytes - size_t SelectionSize; // Selection length in bytes - }; - - struct Resolution - { - sint32 Width; - sint32 Height; - }; - inline bool operator <(const Resolution& lhs, const Resolution& rhs) { sint32 areaA = lhs.Width * lhs.Height; @@ -92,6 +75,7 @@ namespace OpenRCT2 virtual std::vector GetFullscreenResolutions() abstract; virtual bool IsSteamOverlayActive() abstract; virtual void ProcessMessages() abstract; + virtual void TriggerResize() abstract; // Input virtual const CursorState * GetCursorState() abstract; @@ -107,9 +91,9 @@ namespace OpenRCT2 virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; // Text input - virtual bool IsTextInputActive() abstract; - virtual const TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) abstract; - virtual void StopTextInput() abstract; + virtual bool IsTextInputActive() abstract; + virtual TextInputSession * StartTextInput(utf8 * buffer, size_t bufferSize) abstract; + virtual void StopTextInput() abstract; }; } } diff --git a/src/openrct2/windows/editor_object_selection.c b/src/openrct2/windows/editor_object_selection.c index 8af147ba87..dee737a89f 100644 --- a/src/openrct2/windows/editor_object_selection.c +++ b/src/openrct2/windows/editor_object_selection.c @@ -18,6 +18,7 @@ #include "../audio/audio.h" #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../editor.h" #include "../interface/widget.h" @@ -1002,7 +1003,8 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint3 window_invalidate(w); - audio_play_sound_panned(SOUND_CLICK_1, gCursorState.x, 0, 0, 0); + const CursorState * state = context_get_cursor_state(); + audio_play_sound_panned(SOUND_CLICK_1, state->x, 0, 0, 0); if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { diff --git a/src/openrct2/windows/error.c b/src/openrct2/windows/error.c index fe72033904..6c05b528d3 100644 --- a/src/openrct2/windows/error.c +++ b/src/openrct2/windows/error.c @@ -15,6 +15,7 @@ #pragma endregion #include "../audio/audio.h" +#include "../Context.h" #include "../interface/widget.h" #include "../interface/window.h" #include "../localisation/localisation.h" @@ -120,10 +121,11 @@ void window_error_open(rct_string_id title, rct_string_id message) window_error_widgets[WIDX_BACKGROUND].right = width; window_error_widgets[WIDX_BACKGROUND].bottom = height; - x = gCursorState.x - (width / 2); + const CursorState * state = context_get_cursor_state(); + x = state->x - (width / 2); x = clamp(0, x, gScreenWidth); - y = gCursorState.y + 26; + y = state->y + 26; y = max(22, y); maxY = gScreenHeight - height; if (y > maxY) { diff --git a/src/openrct2/windows/map_tooltip.c b/src/openrct2/windows/map_tooltip.c index ad7969db56..484b7f2244 100644 --- a/src/openrct2/windows/map_tooltip.c +++ b/src/openrct2/windows/map_tooltip.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -75,8 +76,9 @@ void window_map_tooltip_update_visibility() { sint32 cursorX, cursorY; - cursorX = gCursorState.x; - cursorY = gCursorState.y; + const CursorState * state = context_get_cursor_state(); + cursorX = state->x; + cursorY = state->y; // Check for cursor movement _cursorHoldDuration++; @@ -112,8 +114,9 @@ static void window_map_tooltip_open() width = 200; height = 44; - x = gCursorState.x - (width / 2); - y = gCursorState.y + 15; + const CursorState * state = context_get_cursor_state(); + x = state->x - (width / 2); + y = state->y + 15; w = window_find_by_class(WC_MAP_TOOLTIP); if (w == NULL) { diff --git a/src/openrct2/windows/options.c b/src/openrct2/windows/options.c index c52aeb1499..c55e2dd87e 100644 --- a/src/openrct2/windows/options.c +++ b/src/openrct2/windows/options.c @@ -25,6 +25,7 @@ #include "../audio/audio.h" #include "../audio/AudioMixer.h" #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../drawing/IDrawingEngine.h" #include "../interface/themes.h" @@ -402,6 +403,7 @@ static void window_options_update_height_markers(); #pragma region Events +static void window_options_close(rct_window *w); static void window_options_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_options_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct_widget* widget); static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, sint32 dropdownIndex); @@ -413,7 +415,7 @@ static void window_options_text_input(rct_window *w, rct_widgetindex widgetIndex static void window_options_tooltip(rct_window *w, rct_widgetindex widgetIndex, rct_string_id *stringid); static rct_window_event_list window_options_events = { - NULL, + window_options_close, window_options_mouseup, NULL, window_options_mousedown, @@ -565,6 +567,9 @@ static uint64 window_options_page_enabled_widgets[] = { #pragma endregion +static struct Resolution * _resolutions = NULL; +static sint32 _numResolutions = 0; + /** * * rct2: 0x006BAC5B @@ -586,6 +591,12 @@ void window_options_open() window_init_scroll_widgets(w); } +static void window_options_close(rct_window *w) +{ + free(_resolutions); + _resolutions = NULL; + _numResolutions = 0; +} /** * @@ -637,7 +648,7 @@ static void window_options_mouseup(rct_window *w, rct_widgetindex widgetIndex) gConfigGeneral.use_nn_at_integer_scales ^= 1; config_save_default(); gfx_invalidate_screen(); - platform_trigger_resize(); + context_trigger_resize(); break; } break; @@ -931,24 +942,24 @@ static void window_options_mousedown(rct_widgetindex widgetIndex, rct_window*w, switch (widgetIndex) { case WIDX_RESOLUTION_DROPDOWN: { - platform_update_fullscreen_resolutions(); + _numResolutions = context_get_resolutions(&_resolutions); sint32 selectedResolution = -1; - for (sint32 i = 0; i < gNumResolutions; i++) { - resolution_t *resolution = &gResolutions[i]; + for (sint32 i = 0; i < _numResolutions; i++) { + struct Resolution *resolution = &_resolutions[i]; gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL; uint16 *args = (uint16*)&gDropdownItemsArgs[i]; args[0] = STR_RESOLUTION_X_BY_Y; - args[1] = resolution->width; - args[2] = resolution->height; + args[1] = resolution->Width; + args[2] = resolution->Height; - if (resolution->width == gConfigGeneral.fullscreen_width && resolution->height == gConfigGeneral.fullscreen_height) + if (resolution->Width == gConfigGeneral.fullscreen_width && resolution->Height == gConfigGeneral.fullscreen_height) selectedResolution = i; } - window_options_show_dropdown(w, widget, gNumResolutions); + window_options_show_dropdown(w, widget, _numResolutions); if (selectedResolution != -1 && selectedResolution < 32) { dropdown_set_checked(selectedResolution, true); @@ -987,14 +998,14 @@ static void window_options_mousedown(rct_widgetindex widgetIndex, rct_window*w, gConfigGeneral.window_scale += 0.25f; config_save_default(); gfx_invalidate_screen(); - platform_trigger_resize(); + context_trigger_resize(); break; case WIDX_SCALE_DOWN: gConfigGeneral.window_scale -= 0.25f; gConfigGeneral.window_scale = max(0.5f, gConfigGeneral.window_scale); config_save_default(); gfx_invalidate_screen(); - platform_trigger_resize(); + context_trigger_resize(); break; case WIDX_SCALE_QUALITY_DROPDOWN: gDropdownItemsFormat[0] = STR_DROPDOWN_MENU_LABEL; @@ -1259,13 +1270,13 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, switch (widgetIndex) { case WIDX_RESOLUTION_DROPDOWN: { - resolution_t *resolution = &gResolutions[dropdownIndex]; - if (resolution->width != gConfigGeneral.fullscreen_width || resolution->height != gConfigGeneral.fullscreen_height) { - gConfigGeneral.fullscreen_width = resolution->width; - gConfigGeneral.fullscreen_height = resolution->height; + struct Resolution *resolution = &_resolutions[dropdownIndex]; + if (resolution->Width != gConfigGeneral.fullscreen_width || resolution->Height != gConfigGeneral.fullscreen_height) { + gConfigGeneral.fullscreen_width = resolution->Width; + gConfigGeneral.fullscreen_height = resolution->Height; if (gConfigGeneral.fullscreen_mode == SDL_WINDOW_FULLSCREEN) - platform_set_fullscreen_mode(SDL_WINDOW_FULLSCREEN); + context_set_fullscreen_mode(SDL_WINDOW_FULLSCREEN); config_save_default(); gfx_invalidate_screen(); @@ -1274,7 +1285,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, break; case WIDX_FULLSCREEN_DROPDOWN: if (dropdownIndex != gConfigGeneral.fullscreen_mode){ - platform_set_fullscreen_mode(dropdownIndex); + context_set_fullscreen_mode(dropdownIndex); gConfigGeneral.fullscreen_mode = (uint8)dropdownIndex; config_save_default(); @@ -1301,7 +1312,7 @@ static void window_options_dropdown(rct_window *w, rct_widgetindex widgetIndex, gConfigGeneral.scale_quality = (uint8)dropdownIndex; config_save_default(); gfx_invalidate_screen(); - platform_trigger_resize(); + context_trigger_resize(); } break; } diff --git a/src/openrct2/windows/ride_construction.c b/src/openrct2/windows/ride_construction.c index b9b7f4a9b2..5744c192c9 100644 --- a/src/openrct2/windows/ride_construction.c +++ b/src/openrct2/windows/ride_construction.c @@ -17,6 +17,7 @@ #include "../audio/audio.h" #include "../cheats.h" #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../game.h" #include "../input.h" @@ -3826,6 +3827,7 @@ void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY) */ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) { + const CursorState * state = context_get_cursor_state(); sint32 trackType, trackDirection, rideIndex, edxRS16, x, y, z, properties, highestZ; rct_window *w; @@ -3923,7 +3925,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) zAttempts == 0 || z < 0 ) { - audio_play_sound_panned(SOUND_ERROR, gCursorState.x, x, y, z); + audio_play_sound_panned(SOUND_ERROR, state->x, x, y, z); w = window_find_by_class(WC_RIDE_CONSTRUCTION); if (w != NULL){ tool_set(w, WIDX_CONSTRUCT, TOOL_CROSSHAIR); @@ -3995,7 +3997,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) _currentTrackAlternative = saveCurrentTrackAlternative; _currentTrackLiftHill = saveCurrentTrackLiftHill; - audio_play_sound_panned(SOUND_ERROR, gCursorState.x, x, y, z); + audio_play_sound_panned(SOUND_ERROR, state->x, x, y, z); break; } else if (zAttempts >= 0) { z += 16; diff --git a/src/openrct2/windows/scenery.c b/src/openrct2/windows/scenery.c index 0a5d486a2d..3a8143dc76 100644 --- a/src/openrct2/windows/scenery.c +++ b/src/openrct2/windows/scenery.c @@ -15,6 +15,7 @@ #pragma endregion #include "../audio/audio.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../game.h" #include "../input.h" @@ -728,13 +729,14 @@ static void window_scenery_event_07(rct_window *w) */ static void window_scenery_update(rct_window *w) { - rct_window *other = window_find_from_point(gCursorState.x, gCursorState.y); + const CursorState * state = context_get_cursor_state(); + rct_window *other = window_find_from_point(state->x, state->y); if (other == w) { - sint32 window_x = gCursorState.x - w->x + 26; - sint32 window_y = gCursorState.y - w->y; + sint32 window_x = state->x - w->x + 26; + sint32 window_y = state->y - w->y; if (window_y < 44 || window_x <= w->width) { - rct_widgetindex widgetIndex = window_find_widget_from_point(w, gCursorState.x, gCursorState.y); + rct_widgetindex widgetIndex = window_find_widget_from_point(w, state->x, state->y); if (widgetIndex >= WIDX_SCENERY_TAB_CONTENT_PANEL) { w->scenery.hover_counter++; if (w->scenery.hover_counter < 8) { diff --git a/src/openrct2/windows/text_input.c b/src/openrct2/windows/text_input.c index 118c179ddd..f71621c9a3 100644 --- a/src/openrct2/windows/text_input.c +++ b/src/openrct2/windows/text_input.c @@ -22,6 +22,7 @@ */ #include "../config/Config.h" +#include "../Context.h" #include "../platform/platform.h" #include "../interface/window.h" #include "../interface/widget.h" @@ -147,7 +148,7 @@ void window_text_input_open(rct_window* call_w, rct_widgetindex call_widget, rct calling_number = call_w->number; calling_widget = call_widget; - platform_start_text_input(text_input, maxLength); + gTextInput = context_start_text_input(text_input, maxLength); window_init_scroll_widgets(w); w->colours[0] = call_w->colours[0]; @@ -208,7 +209,7 @@ void window_text_input_raw_open(rct_window* call_w, rct_widgetindex call_widget, calling_number = call_w->number; calling_widget = call_widget; - platform_start_text_input(text_input, maxLength); + gTextInput = context_start_text_input(text_input, maxLength); window_init_scroll_widgets(w); w->colours[0] = call_w->colours[0]; @@ -227,7 +228,7 @@ static void window_text_input_mouseup(rct_window *w, rct_widgetindex widgetIndex switch (widgetIndex){ case WIDX_CANCEL: case WIDX_CLOSE: - platform_stop_text_input(); + context_stop_text_input(); // Pass back the text that has been entered. // ecx when zero means text input failed if (calling_w != NULL) @@ -235,7 +236,7 @@ static void window_text_input_mouseup(rct_window *w, rct_widgetindex widgetIndex window_close(w); break; case WIDX_OKAY: - platform_stop_text_input(); + context_stop_text_input(); // Pass back the text that has been entered. // ecx when none zero means text input success if (calling_w != NULL) @@ -285,19 +286,19 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) size_t string_length = get_string_size(wrap_pointer) - 1; - if (!cur_drawn && (gTextInput.selection_offset <= char_count + string_length)) { + if (!cur_drawn && (gTextInput->SelectionStart <= char_count + string_length)) { // Make a copy of the string for measuring the width. char temp_string[TEXT_INPUT_SIZE] = { 0 }; - memcpy(temp_string, wrap_pointer, gTextInput.selection_offset - char_count); + memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count); cursorX = w->x + 13 + gfx_get_string_width(temp_string); cursorY = y; sint32 width = 6; - if (gTextInput.selection_offset < strlen(text_input)){ + if (gTextInput->SelectionStart < strlen(text_input)){ // Make a 1 utf8-character wide string for measuring the width // of the currently selected character. utf8 tmp[5] = { 0 }; // This is easier than setting temp_string[0..5] - uint32 codepoint = utf8_get_next(text_input + gTextInput.selection_offset, NULL); + uint32 codepoint = utf8_get_next(text_input + gTextInput->SelectionStart, NULL); utf8_write_codepoint(tmp, codepoint); width = max(gfx_get_string_width(tmp) - 2, 4); } @@ -325,9 +326,9 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) } // IME composition - if (gTextInputCompositionActive) { - draw_ime_composition(dpi, cursorX, cursorY); - } + // if (gTextInputCompositionActive) { + // draw_ime_composition(dpi, cursorX, cursorY); + // } } void window_text_input_key(rct_window* w, sint32 key) @@ -336,7 +337,7 @@ void window_text_input_key(rct_window* w, sint32 key) // If the return button is pressed stop text input if (new_char == '\r'){ - platform_stop_text_input(); + context_stop_text_input(); window_close(w); rct_window* calling_w = window_find_by_number(calling_class, calling_number); // Pass back the text that has been entered. @@ -367,7 +368,7 @@ static void window_text_input_close(rct_window *w) { // Make sure that we take it out of the text input // mode otherwise problems may occur. - platform_stop_text_input(); + context_stop_text_input(); } static void window_text_input_invalidate(rct_window *w) @@ -401,13 +402,13 @@ static void window_text_input_invalidate(rct_window *w) static void draw_ime_composition(rct_drawpixelinfo * dpi, int cursorX, int cursorY) { - int compositionWidth = gfx_get_string_width(gTextInputComposition); - int x = cursorX - (compositionWidth / 2); - int y = cursorY + 13; - int width = compositionWidth; - int height = 10; + // int compositionWidth = gfx_get_string_width(gTextInputComposition); + // int x = cursorX - (compositionWidth / 2); + // int y = cursorY + 13; + // int width = compositionWidth; + // int height = 10; - gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, PALETTE_INDEX_12); - gfx_fill_rect(dpi, x, y, x + width, y + height, PALETTE_INDEX_0); - gfx_draw_string(dpi, gTextInputComposition, COLOUR_DARK_GREEN, x, y); + // gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, PALETTE_INDEX_12); + // gfx_fill_rect(dpi, x, y, x + width, y + height, PALETTE_INDEX_0); + // gfx_draw_string(dpi, gTextInputComposition, COLOUR_DARK_GREEN, x, y); } From 7163973bd2dca445ed49cc2e1b4b6849ce50bb29 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 26 Mar 2017 21:04:14 +0100 Subject: [PATCH 18/76] Start moving code from OpenRCT2 to Context --- src/openrct2-ui/SDLException.h | 48 ++ src/openrct2-ui/UiContext.cpp | 38 +- .../drawing/engines/DrawingEngines.h | 6 +- .../drawing/engines/SoftwareDrawingEngine.cpp | 42 +- .../engines/opengl/OpenGLDrawingEngine.cpp | 13 +- src/openrct2-ui/libopenrct2ui.vcxproj | 1 + src/openrct2/Context.cpp | 506 +++++++++++++++++- src/openrct2/Context.h | 1 + src/openrct2/OpenRCT2.cpp | 504 ----------------- src/openrct2/OpenRCT2.h | 15 +- src/openrct2/cmdline/ConvertCommand.cpp | 10 +- src/openrct2/cmdline/RootCommands.cpp | 6 +- src/openrct2/drawing/NewDrawing.cpp | 2 +- src/openrct2/interface/screenshot.c | 6 +- src/openrct2/rct2.c | 2 +- src/openrct2/ui/UiContext.h | 6 +- 16 files changed, 621 insertions(+), 585 deletions(-) create mode 100644 src/openrct2-ui/SDLException.h diff --git a/src/openrct2-ui/SDLException.h b/src/openrct2-ui/SDLException.h new file mode 100644 index 0000000000..9567a106d8 --- /dev/null +++ b/src/openrct2-ui/SDLException.h @@ -0,0 +1,48 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include +#include + +/** + * An exception which wraps an SDL error. + */ +class SDLException : public std::runtime_error +{ +public: + explicit SDLException(const std::string& message) + : runtime_error(message.c_str()) + { + SDL_GetError(); + } + + explicit SDLException(const char * message) + : runtime_error(message) + { + } + + /** + * Throws an SDL exception with a message containing the given call information + * and the message given by SDL_GetError. + */ + static void Throw(const char * call) + { + std::string message = std::string(call) + ": " + std::string(SDL_GetError()); + throw SDLException(message); + } +}; diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 37e9b40043..58c03ef2de 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -26,6 +26,7 @@ #include #include "CursorRepository.h" #include "drawing/engines/DrawingEngines.h" +#include "SDLException.h" #include "TextComposition.h" #include "UiContext.h" @@ -70,7 +71,7 @@ private: CursorState _cursorState; uint32 _lastKeyPressed; const uint8 * _keysState; - uint8 * _keysPressed; + uint8 _keysPressed[256]; uint32 _lastGestureTimestamp; float _gestureRadius; @@ -78,15 +79,20 @@ public: UiContext(IPlatformUiContext * platformUiContext) : _platformUiContext(platformUiContext) { + if (SDL_Init(SDL_INIT_VIDEO) < 0) + { + SDLException::Throw("SDL_Init(SDL_INIT_VIDEO)"); + } } ~UiContext() override { CloseWindow(); + SDL_Quit(); } // Window - void * GetWindow() override + SDL_Window * GetWindow() override { return _window; } @@ -190,12 +196,12 @@ public: { switch ((sint32)type) { case DRAWING_ENGINE_SOFTWARE: - return CreateSoftwareDrawingEngine(); + return CreateSoftwareDrawingEngine(this); case DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY: - return CreateHardwareDisplayDrawingEngine(); + return CreateHardwareDisplayDrawingEngine(this); #ifndef DISABLE_OPENGL case DRAWING_ENGINE_OPENGL: - return CreateOpenGLDrawingEngine(); + return CreateOpenGLDrawingEngine(this); #endif default: return nullptr; @@ -434,26 +440,19 @@ public: OnResize(width, height); } -private: - void CreateWindow() + void CreateWindow() override { - if (SDL_Init(SDL_INIT_VIDEO) < 0) - { - log_fatal("SDL_Init %s", SDL_GetError()); - exit(-1); - } - SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0"); // TODO This should probably be called somewhere else. It has nothing to do with window creation and can be done as soon as // g1.dat is loaded. - sub_68371D(); + // sub_68371D(); // Get saved window size sint32 width = gConfigGeneral.window_width; sint32 height = gConfigGeneral.window_height; - if (width == -1) width = 640; - if (height == -1) height = 480; + if (width <= 0) width = 640; + if (height <= 0) height = 480; // Create window in window first rather than fullscreen so we have the display the window is on first uint32 flags = SDL_WINDOW_RESIZABLE; @@ -465,8 +464,7 @@ private: _window = SDL_CreateWindow(OPENRCT2_NAME, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); if (_window == nullptr) { - log_fatal("SDL_CreateWindow failed %s", SDL_GetError()); - exit(-1); + SDLException::Throw("SDL_CreateWindow(...)"); } SDL_SetWindowGrab(_window, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE); @@ -487,13 +485,13 @@ private: TriggerResize(); } - void CloseWindow() + void CloseWindow() override { drawing_engine_dispose(); SDL_DestroyWindow(_window); - SDL_Quit(); } +private: void OnResize(sint32 width, sint32 height) { // Scale the native window size to the game's canvas size diff --git a/src/openrct2-ui/drawing/engines/DrawingEngines.h b/src/openrct2-ui/drawing/engines/DrawingEngines.h index 68aa8296bd..668ba596e7 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngines.h +++ b/src/openrct2-ui/drawing/engines/DrawingEngines.h @@ -27,10 +27,10 @@ namespace OpenRCT2 namespace Ui { - Drawing::IDrawingEngine * CreateSoftwareDrawingEngine(); - Drawing::IDrawingEngine * CreateHardwareDisplayDrawingEngine(); + Drawing::IDrawingEngine * CreateSoftwareDrawingEngine(IUiContext * uiContext); + Drawing::IDrawingEngine * CreateHardwareDisplayDrawingEngine(IUiContext * uiContext); #ifndef DISABLE_OPENGL - Drawing::IDrawingEngine * CreateOpenGLDrawingEngine(); + Drawing::IDrawingEngine * CreateOpenGLDrawingEngine(IUiContext * uiContext); #endif } } diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 641994f6b4..710c945fec 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -41,6 +41,7 @@ extern "C" using namespace OpenRCT2; using namespace OpenRCT2::Drawing; +using namespace OpenRCT2::Ui; class SoftwareDrawingEngine; @@ -191,8 +192,10 @@ public: class SoftwareDrawingEngine final : public IDrawingEngine { private: - bool _hardwareDisplay; + IUiContext * const _uiContext; + bool const _hardwareDisplay; + SDL_Window * _window = nullptr; SDL_Surface * _surface = nullptr; SDL_Surface * _RGBASurface = nullptr; SDL_Palette * _palette = nullptr; @@ -227,9 +230,10 @@ private: SoftwareDrawingContext * _drawingContext; public: - explicit SoftwareDrawingEngine(bool hardwareDisplay) + explicit SoftwareDrawingEngine(IUiContext * uiContext, bool hardwareDisplay) + : _uiContext(uiContext), + _hardwareDisplay(hardwareDisplay) { - _hardwareDisplay = hardwareDisplay; _drawingContext = new SoftwareDrawingContext(this); #ifdef __ENABLE_LIGHTFX__ _lastLightFXenabled = (gConfigGeneral.enable_light_fx != 0); @@ -251,6 +255,7 @@ public: void Initialise(SDL_Window * window) override { + _window = window; if (_hardwareDisplay) { // Try to create the accelerated renderer. @@ -340,17 +345,14 @@ public: } else { - SDL_Surface * windowSurface = SDL_GetWindowSurface(gWindow); - if (windowSurface == nullptr) + SDL_Surface * windowSurface = SDL_GetWindowSurface(_window); + if (windowSurface != nullptr && _palette != nullptr) { - log_fatal("SDL_GetWindowSurface failed %s", SDL_GetError()); - exit(1); - } - - if (_palette != nullptr && SDL_SetPaletteColors(_palette, palette, 0, 256)) - { - log_fatal("SDL_SetPaletteColors failed %s", SDL_GetError()); - exit(1); + // log_fatal("SDL_GetWindowSurface failed %s", SDL_GetError()); + // exit(1); + // log_fatal("SDL_SetPaletteColors failed %s", SDL_GetError()); + // exit(1); + SDL_SetPaletteColors(_palette, palette, 0, 256); } } } @@ -688,7 +690,7 @@ private: // Copy the surface to the window if (gConfigGeneral.window_scale == 1 || gConfigGeneral.window_scale <= 0) { - SDL_Surface * windowSurface = SDL_GetWindowSurface(gWindow); + SDL_Surface * windowSurface = SDL_GetWindowSurface(_window); if (SDL_BlitSurface(_surface, nullptr, windowSurface, nullptr)) { log_fatal("SDL_BlitSurface %s", SDL_GetError()); @@ -706,13 +708,13 @@ private: // then scale to window size. Without changing to RGBA first, SDL complains // about blit configurations being incompatible. - if (SDL_BlitScaled(_RGBASurface, nullptr, SDL_GetWindowSurface(gWindow), nullptr)) + if (SDL_BlitScaled(_RGBASurface, nullptr, SDL_GetWindowSurface(_window), nullptr)) { log_fatal("SDL_BlitScaled %s", SDL_GetError()); exit(1); } } - if (SDL_UpdateWindowSurface(gWindow)) + if (SDL_UpdateWindowSurface(_window)) { log_fatal("SDL_UpdateWindowSurface %s", SDL_GetError()); exit(1); @@ -834,14 +836,14 @@ private: } }; -IDrawingEngine * OpenRCT2::Ui::CreateSoftwareDrawingEngine() +IDrawingEngine * OpenRCT2::Ui::CreateSoftwareDrawingEngine(IUiContext * uiContext) { - return new SoftwareDrawingEngine(false); + return new SoftwareDrawingEngine(uiContext, false); } -IDrawingEngine * OpenRCT2::Ui::CreateHardwareDisplayDrawingEngine() +IDrawingEngine * OpenRCT2::Ui::CreateHardwareDisplayDrawingEngine(IUiContext * uiContext) { - return new SoftwareDrawingEngine(true); + return new SoftwareDrawingEngine(uiContext, true); } SoftwareDrawingContext::SoftwareDrawingContext(SoftwareDrawingEngine * engine) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 7fecda0e9d..b515015beb 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -29,6 +29,7 @@ #include #include #include +#include extern "C" { @@ -225,8 +226,9 @@ public: class OpenGLDrawingEngine : public IDrawingEngine { private: - SDL_Window * _window = nullptr; - SDL_GLContext _context = nullptr; + IUiContext * const _uiContext = nullptr; + SDL_Window * _window = nullptr; + SDL_GLContext _context = nullptr; uint32 _width = 0; uint32 _height = 0; @@ -246,7 +248,8 @@ public: SDL_Color Palette[256]; vec4f GLPalette[256]; - OpenGLDrawingEngine() + OpenGLDrawingEngine(IUiContext * uiContext) + : _uiContext(uiContext) { _drawingContext = new OpenGLDrawingContext(this); } @@ -494,9 +497,9 @@ private: } }; -IDrawingEngine * OpenRCT2::Ui::CreateOpenGLDrawingEngine() +IDrawingEngine * OpenRCT2::Ui::CreateOpenGLDrawingEngine(IUiContext * uiContext) { - return new OpenGLDrawingEngine(); + return new OpenGLDrawingEngine(uiContext); } OpenGLDrawingContext::OpenGLDrawingContext(OpenGLDrawingEngine * engine) diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 15bdf61d77..ca3247308d 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -54,6 +54,7 @@ + diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index c84d8d2c8f..d64c649b32 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -15,11 +15,44 @@ #pragma endregion #include -#include "core/Memory.hpp" -#include "config/Config.h" +#include +#include #include "Context.h" -#include "OpenRCT2.h" #include "ui/UiContext.h" +#include "core/Console.hpp" +#include "core/File.h" +#include "core/FileStream.hpp" +#include "core/Guard.hpp" +#include "core/String.hpp" +#include "FileClassifier.h" +#include "network/network.h" +#include "object/ObjectRepository.h" +#include "OpenRCT2.h" +#include "ParkImporter.h" +#include "platform/crash.h" +#include "PlatformEnvironment.h" +#include "ride/TrackDesignRepository.h" +#include "scenario/ScenarioRepository.h" +#include "title/TitleScreen.h" +#include "title/TitleSequenceManager.h" +#include "Version.h" + +extern "C" +{ + #include "audio/audio.h" + #include "config/Config.h" + #include "editor.h" + #include "game.h" + #include "interface/chat.h" + #include "interface/themes.h" + #include "intro.h" + #include "localisation/localisation.h" + #include "network/http.h" + #include "object_list.h" + #include "rct1.h" + #include "rct2.h" + #include "rct2/interop.h" +} using namespace OpenRCT2; using namespace OpenRCT2::Ui; @@ -29,7 +62,25 @@ namespace OpenRCT2 class Context : public IContext { private: - IUiContext * const _uiContext; + // The game update inverval in milliseconds, (1000 / 40fps) = 25ms + constexpr static uint32 UPDATE_TIME_MS = 25; + + // Dependencies + IUiContext * const _uiContext = nullptr; + + // Services + IPlatformEnvironment * _env = nullptr; + IObjectRepository * _objectRepository = nullptr; + ITrackDesignRepository * _trackDesignRepository = nullptr; + IScenarioRepository * _scenarioRepository = nullptr; + + bool _isWindowMinimised = false; + uint32 _isWindowMinimisedLastCheckTick = 0; + uint32 _lastTick = 0; + uint32 _uncapTick = 0; + + /** If set, will end the OpenRCT2 game loop. Intentially private to this module so that the flag can not be set back to false. */ + bool _finished = false; public: // Singleton of Context. @@ -46,6 +97,16 @@ namespace OpenRCT2 ~Context() override { + network_close(); + http_dispose(); + language_close_all(); + rct2_dispose(); + config_release(); +#ifndef DISABLE_NETWORK + EVP_MD_CTX_destroy(gHashCTX); +#endif // DISABLE_NETWORK + rct2_interop_dispose(); + platform_free(); Instance = nullptr; } @@ -60,10 +121,435 @@ namespace OpenRCT2 int runGame = cmdline_run((const char * *)argv, argc); if (runGame == 1) { - openrct2_launch(); + Initialise(); + Launch(); } return gExitCode; } + + /** + * Causes the OpenRCT2 game loop to finish. + */ + void Finish() + { + _finished = true; + } + + private: + bool Initialise() + { +#ifndef DISABLE_NETWORK + gHashCTX = EVP_MD_CTX_create(); + Guard::Assert(gHashCTX != nullptr, "EVP_MD_CTX_create failed"); +#endif // DISABLE_NETWORK + + crash_init(); + + // Sets up the environment OpenRCT2 is running in, e.g. directory paths + _env = SetupEnvironment(); + if (_env == nullptr) + { + return false; + } + + if (!rct2_interop_setup_segment()) + { + log_fatal("Unable to load RCT2 data sector"); + return false; + } + + if (gConfigGeneral.last_run_version != nullptr && String::Equals(gConfigGeneral.last_run_version, OPENRCT2_VERSION)) + { + gOpenRCT2ShowChangelog = false; + } + else + { + gOpenRCT2ShowChangelog = true; + gConfigGeneral.last_run_version = String::Duplicate(OPENRCT2_VERSION); + config_save_default(); + } + + if (!gOpenRCT2Headless) + { + GetContext()->GetUiContext()->CreateWindow(); + } + + // TODO add configuration option to allow multiple instances + // if (!gOpenRCT2Headless && !platform_lock_single_instance()) { + // log_fatal("OpenRCT2 is already running."); + // return false; + // } + + _objectRepository = CreateObjectRepository(_env); + _trackDesignRepository = CreateTrackDesignRepository(_env); + _scenarioRepository = CreateScenarioRepository(_env); + + if (!language_open(gConfigGeneral.language)) + { + log_error("Failed to open configured language..."); + if (!language_open(LANGUAGE_ENGLISH_UK)) + { + log_fatal("Failed to open fallback language..."); + return false; + } + } + + // TODO Ideally we want to delay this until we show the title so that we can + // still open the game window and draw a progress screen for the creation + // of the object cache. + _objectRepository->LoadOrConstruct(); + + // TODO Like objects, this can take a while if there are a lot of track designs + // its also really something really we might want to do in the background + // as its not required until the player wants to place a new ride. + _trackDesignRepository->Scan(); + + _scenarioRepository->Scan(); + TitleSequenceManager::Scan(); + + if (!gOpenRCT2Headless) + { + audio_init(); + audio_populate_devices(); + } + + http_init(); + theme_manager_initialise(); + + rct2_interop_setup_hooks(); + + if (!rct2_init()) + { + return false; + } + + chat_init(); + + rct2_copy_original_user_files_over(); + return true; + } + + IPlatformEnvironment * SetupEnvironment() + { + utf8 userPath[MAX_PATH]; + platform_resolve_openrct_data_path(); + platform_resolve_user_data_path(); + platform_get_user_directory(userPath, NULL, sizeof(userPath)); + if (!platform_ensure_directory_exists(userPath)) + { + Console::Error::WriteLine("Could not create user directory (do you have write access to your documents folder?)"); + return nullptr; + } + platform_get_exe_path(gExePath, sizeof(gExePath)); + log_verbose("Setting exe path to %s", gExePath); + + config_set_defaults(); + if (!config_open_default()) + { + if (!config_find_or_browse_install_directory()) + { + gConfigGeneral.last_run_version = String::Duplicate(OPENRCT2_VERSION); + config_save_default(); + utf8 path[MAX_PATH]; + config_get_default_path(path, sizeof(path)); + Console::Error::WriteLine("An RCT2 install directory must be specified! Please edit \"game_path\" in %s.", path); + return nullptr; + } + config_save_default(); + } + + if (!rct2_init_directories()) + { + return nullptr; + } + if (!rct2_startup_checks()) + { + return nullptr; + } + + utf8 path[260]; + std::string basePaths[4]; + basePaths[(size_t)DIRBASE::RCT1] = String::ToStd(gConfigGeneral.rct1_path); + basePaths[(size_t)DIRBASE::RCT2] = String::ToStd(gConfigGeneral.rct2_path); + platform_get_openrct_data_path(path, sizeof(path)); + basePaths[(size_t)DIRBASE::OPENRCT2] = std::string(path); + platform_get_user_directory(path, nullptr, sizeof(path)); + basePaths[(size_t)DIRBASE::USER] = std::string(path); + + IPlatformEnvironment * env = CreatePlatformEnvironment(basePaths); + return env; + } + + /** + * Launches the game, after command line arguments have been parsed and processed. + */ + void Launch() + { + gIntroState = INTRO_STATE_NONE; + if ((gOpenRCT2StartupAction == STARTUP_ACTION_TITLE) && gConfigGeneral.play_intro) + { + gOpenRCT2StartupAction = STARTUP_ACTION_INTRO; + } + + switch (gOpenRCT2StartupAction) { + case STARTUP_ACTION_INTRO: + gIntroState = INTRO_STATE_PUBLISHER_BEGIN; + title_load(); + break; + case STARTUP_ACTION_TITLE: + title_load(); + break; + case STARTUP_ACTION_OPEN: + { + bool parkLoaded = false; + // A path that includes "://" is illegal with all common filesystems, so it is almost certainly a URL + // This way all cURL supported protocols, like http, ftp, scp and smb are automatically handled + if (strstr(gOpenRCT2StartupActionPath, "://") != nullptr) + { +#ifndef DISABLE_HTTP + // Download park and open it using its temporary filename + char tmpPath[MAX_PATH]; + if (!http_download_park(gOpenRCT2StartupActionPath, tmpPath)) + { + title_load(); + break; + } + + parkLoaded = OpenParkAutoDetectFormat(tmpPath); +#endif + } + else + { + parkLoaded = rct2_open_file(gOpenRCT2StartupActionPath); + } + + if (!parkLoaded) + { + Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); + title_load(); + break; + } + + gScreenFlags = SCREEN_FLAGS_PLAYING; + +#ifndef DISABLE_NETWORK + if (gNetworkStart == NETWORK_MODE_SERVER) + { + if (gNetworkStartPort == 0) + { + gNetworkStartPort = gConfigNetwork.default_port; + } + + if (String::IsNullOrEmpty(gCustomPassword)) + { + network_set_password(gConfigNetwork.default_password); + } + else + { + network_set_password(gCustomPassword); + } + network_begin_server(gNetworkStartPort); + } +#endif // DISABLE_NETWORK + break; + } + case STARTUP_ACTION_EDIT: + if (String::SizeOf(gOpenRCT2StartupActionPath) == 0) + { + editor_load(); + } + else if (!editor_load_landscape(gOpenRCT2StartupActionPath)) + { + title_load(); + } + break; + } + +#ifndef DISABLE_NETWORK + if (gNetworkStart == NETWORK_MODE_CLIENT) + { + if (gNetworkStartPort == 0) + { + gNetworkStartPort = gConfigNetwork.default_port; + } + network_begin_client(gNetworkStartHost, gNetworkStartPort); + } +#endif // DISABLE_NETWORK + + RunGameLoop(); + } + + /** + * Run the main game loop until the finished flag is set. + */ + void RunGameLoop() + { + log_verbose("begin openrct2 loop"); + _finished = false; + do + { + if (ShouldRunVariableFrame()) + { + RunVariableFrame(); + } + else + { + RunFixedFrame(); + } + } while (!_finished); + log_verbose("finish openrct2 loop"); + } + + bool IsMinimised() + { + // Don't check if window is minimised too frequently (every second is fine) + if (_lastTick > _isWindowMinimisedLastCheckTick + 1000) + { + uint32 windowFlags = SDL_GetWindowFlags(gWindow); + _isWindowMinimised = (windowFlags & SDL_WINDOW_MINIMIZED) || + (windowFlags & SDL_WINDOW_HIDDEN); + } + return _isWindowMinimised; + } + + bool ShouldRunVariableFrame() + { + if (!gConfigGeneral.uncap_fps) return false; + if (gGameSpeed > 4) return false; + if (gOpenRCT2Headless) return false; + if (IsMinimised()) return false; + return true; + } + + void RunFixedFrame() + { + _uncapTick = 0; + uint32 currentTick = SDL_GetTicks(); + uint32 ticksElapsed = currentTick - _lastTick; + if (ticksElapsed < UPDATE_TIME_MS) + { + SDL_Delay(UPDATE_TIME_MS - ticksElapsed); + _lastTick += UPDATE_TIME_MS; + } + else + { + _lastTick = currentTick; + } + GetContext()->GetUiContext()->ProcessMessages(); + rct2_update(); + if (!_isWindowMinimised) + { + platform_draw(); + } + } + + void RunVariableFrame() + { + uint32 currentTick = SDL_GetTicks(); + if (_uncapTick == 0) + { + _uncapTick = currentTick; + sprite_position_tween_reset(); + } + + // Limit number of updates per loop (any long pauses or debugging can make this update for a very long time) + if (currentTick - _uncapTick > UPDATE_TIME_MS * 60) + { + _uncapTick = currentTick - UPDATE_TIME_MS - 1; + } + + GetContext()->GetUiContext()->ProcessMessages(); + + while (_uncapTick <= currentTick && currentTick - _uncapTick > UPDATE_TIME_MS) + { + // Get the original position of each sprite + sprite_position_tween_store_a(); + + // Update the game so the sprite positions update + rct2_update(); + + // Get the next position of each sprite + sprite_position_tween_store_b(); + + _uncapTick += UPDATE_TIME_MS; + } + + // Tween the position of each sprite from the last position to the new position based on the time between the last + // tick and the next tick. + float nudge = 1 - ((float)(currentTick - _uncapTick) / UPDATE_TIME_MS); + sprite_position_tween_all(nudge); + + platform_draw(); + + sprite_position_tween_restore(); + } + + bool OpenParkAutoDetectFormat(const utf8 * path) + { + ClassifiedFile info; + if (TryClassifyFile(path, &info)) + { + if (info.Type == FILE_TYPE::SAVED_GAME || + info.Type == FILE_TYPE::SCENARIO) + { + std::unique_ptr parkImporter; + if (info.Version <= 2) + { + parkImporter.reset(ParkImporter::CreateS4()); + } + else + { + parkImporter.reset(ParkImporter::CreateS6()); + } + + if (info.Type == FILE_TYPE::SAVED_GAME) + { + try + { + parkImporter->LoadSavedGame(path); + parkImporter->Import(); + game_fix_save_vars(); + sprite_position_tween_reset(); + gScreenAge = 0; + gLastAutoSaveUpdate = AUTOSAVE_PAUSE; + game_load_init(); + return true; + } + catch (const Exception &) + { + Console::Error::WriteLine("Error loading saved game."); + } + } + else + { + try + { + parkImporter->LoadScenario(path); + parkImporter->Import(); + game_fix_save_vars(); + sprite_position_tween_reset(); + gScreenAge = 0; + gLastAutoSaveUpdate = AUTOSAVE_PAUSE; + scenario_begin(); + return true; + } + catch (const Exception &) + { + Console::Error::WriteLine("Error loading scenario."); + } + } + } + else + { + Console::Error::WriteLine("Invalid file type."); + } + } + else + { + Console::Error::WriteLine("Unable to detect file type."); + } + return false; + } }; Context * Context::Instance = nullptr; @@ -86,6 +572,16 @@ namespace OpenRCT2 extern "C" { + void openrct2_write_full_version_info(utf8 * buffer, size_t bufferSize) + { + String::Set(buffer, bufferSize, Version::GetInfo().c_str()); + } + + void openrct2_finish() + { + GetContext()->Finish(); + } + void context_setcurrentcursor(sint32 cursor) { GetContext()->GetUiContext()->SetCursor((CURSOR_ID)cursor); diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 7a4ddb6ea6..02f3d59317 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -71,6 +71,7 @@ namespace OpenRCT2 virtual Ui::IUiContext * GetUiContext() abstract; virtual sint32 RunOpenRCT2(int argc, char * * argv) abstract; + virtual void Finish() abstract; }; IContext * CreateContext(); diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index 56657be733..de4bcc0110 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -14,49 +14,17 @@ *****************************************************************************/ #pragma endregion -#include -#include -#include "Context.h" -#include "ui/UiContext.h" #include "core/Console.hpp" #include "core/File.h" #include "core/FileStream.hpp" -#include "core/Guard.hpp" -#include "core/String.hpp" -#include "FileClassifier.h" -#include "network/network.h" -#include "object/ObjectRepository.h" #include "OpenRCT2.h" -#include "ParkImporter.h" -#include "platform/crash.h" -#include "PlatformEnvironment.h" -#include "ride/TrackDesignRepository.h" -#include "scenario/ScenarioRepository.h" -#include "title/TitleScreen.h" -#include "title/TitleSequenceManager.h" -#include "Version.h" extern "C" { #include "audio/audio.h" - #include "config/Config.h" - #include "editor.h" - #include "game.h" - #include "interface/chat.h" - #include "interface/themes.h" - #include "intro.h" - #include "localisation/localisation.h" - #include "network/http.h" - #include "object_list.h" #include "platform/platform.h" - #include "rct1.h" - #include "rct2.h" - #include "rct2/interop.h" } -// The game update interval in milliseconds, (1000 / 40fps) = 25ms -constexpr uint32 UPDATE_TIME_MS = 25; - extern "C" { sint32 gExitCode; @@ -78,252 +46,6 @@ extern "C" // OpenSSL's message digest context used for calculating sprite checksums EVP_MD_CTX * gHashCTX = nullptr; #endif // DISABLE_NETWORK -} - -namespace OpenRCT2 -{ - static IPlatformEnvironment * _env = nullptr; - static bool _isWindowMinimised; - static uint32 _isWindowMinimisedLastCheckTick; - static uint32 _lastTick; - static uint32 _uncapTick; - - /** If set, will end the OpenRCT2 game loop. Intentionally private to this module so that the flag can not be set back to false. */ - static bool _finished; - - static bool ShouldRunVariableFrame(); - static void RunGameLoop(); - static void RunFixedFrame(); - static void RunVariableFrame(); - - static bool OpenParkAutoDetectFormat(const utf8 * path); -} - -extern "C" -{ - void openrct2_write_full_version_info(utf8 * buffer, size_t bufferSize) - { - String::Set(buffer, bufferSize, gVersionInfoFull); - } - - static void openrct2_set_exe_path() - { - platform_get_exe_path(gExePath, sizeof(gExePath)); - log_verbose("Setting exe path to %s", gExePath); - } - - bool openrct2_initialise() - { -#ifndef DISABLE_NETWORK - gHashCTX = EVP_MD_CTX_create(); - Guard::Assert(gHashCTX != nullptr, "EVP_MD_CTX_create failed"); -#endif // DISABLE_NETWORK - - crash_init(); - - // Sets up the environment OpenRCT2 is running in, e.g. directory paths - OpenRCT2::_env = OpenRCT2::SetupEnvironment(); - if (OpenRCT2::_env == nullptr) - { - return false; - } - - if (!rct2_interop_setup_segment()) - { - log_fatal("Unable to load RCT2 data sector"); - return false; - } - - if (gConfigGeneral.last_run_version != nullptr && String::Equals(gConfigGeneral.last_run_version, OPENRCT2_VERSION)) - { - gOpenRCT2ShowChangelog = false; - } - else - { - gOpenRCT2ShowChangelog = true; - gConfigGeneral.last_run_version = String::Duplicate(OPENRCT2_VERSION); - config_save_default(); - } - - // TODO add configuration option to allow multiple instances - // if (!gOpenRCT2Headless && !platform_lock_single_instance()) { - // log_fatal("OpenRCT2 is already running."); - // return false; - // } - - IObjectRepository * objRepo = CreateObjectRepository(OpenRCT2::_env); - ITrackDesignRepository * tdRepo = CreateTrackDesignRepository(OpenRCT2::_env); - IScenarioRepository * scenarioRepo = CreateScenarioRepository(OpenRCT2::_env); - - if (!language_open(gConfigGeneral.language)) - { - log_error("Failed to open configured language..."); - if (!language_open(LANGUAGE_ENGLISH_UK)) - { - log_fatal("Failed to open fallback language..."); - return false; - } - } - - // TODO Ideally we want to delay this until we show the title so that we can - // still open the game window and draw a progress screen for the creation - // of the object cache. - objRepo->LoadOrConstruct(); - - // TODO Like objects, this can take a while if there are a lot of track designs - // it's also really something we might want to do in the background - // as it's not required until the player wants to place a new ride. - tdRepo->Scan(); - - scenarioRepo->Scan(); - TitleSequenceManager::Scan(); - - if (!gOpenRCT2Headless) - { - audio_init(); - audio_populate_devices(); - } - - http_init(); - theme_manager_initialise(); - - rct2_interop_setup_hooks(); - - if (!rct2_init()) - { - return false; - } - - chat_init(); - - rct2_copy_original_user_files_over(); - return true; - } - - /** - * Launches the game, after command line arguments have been parsed and processed. - */ - void openrct2_launch() - { - if (openrct2_initialise()) - { - gIntroState = INTRO_STATE_NONE; - if ((gOpenRCT2StartupAction == STARTUP_ACTION_TITLE) && gConfigGeneral.play_intro) - { - gOpenRCT2StartupAction = STARTUP_ACTION_INTRO; - } - - switch (gOpenRCT2StartupAction) { - case STARTUP_ACTION_INTRO: - gIntroState = INTRO_STATE_PUBLISHER_BEGIN; - title_load(); - break; - case STARTUP_ACTION_TITLE: - title_load(); - break; - case STARTUP_ACTION_OPEN: - { - bool parkLoaded = false; - // A path that includes "://" is illegal with all common filesystems, so it is almost certainly a URL - // This way all cURL supported protocols, like http, ftp, scp and smb are automatically handled - if (strstr(gOpenRCT2StartupActionPath, "://") != nullptr) - { -#ifndef DISABLE_HTTP - // Download park and open it using its temporary filename - char tmpPath[MAX_PATH]; - if (!http_download_park(gOpenRCT2StartupActionPath, tmpPath)) - { - title_load(); - break; - } - - parkLoaded = OpenRCT2::OpenParkAutoDetectFormat(tmpPath); -#endif - } - else - { - parkLoaded = rct2_open_file(gOpenRCT2StartupActionPath); - } - - if (!parkLoaded) - { - Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); - title_load(); - break; - } - - gScreenFlags = SCREEN_FLAGS_PLAYING; - -#ifndef DISABLE_NETWORK - if (gNetworkStart == NETWORK_MODE_SERVER) - { - if (gNetworkStartPort == 0) - { - gNetworkStartPort = gConfigNetwork.default_port; - } - - if (String::IsNullOrEmpty(gCustomPassword)) - { - network_set_password(gConfigNetwork.default_password); - } - else - { - network_set_password(gCustomPassword); - } - network_begin_server(gNetworkStartPort); - } -#endif // DISABLE_NETWORK - break; - } - case STARTUP_ACTION_EDIT: - if (String::SizeOf(gOpenRCT2StartupActionPath) == 0) - { - editor_load(); - } - else if (!editor_load_landscape(gOpenRCT2StartupActionPath)) - { - title_load(); - } - break; - } - -#ifndef DISABLE_NETWORK - if (gNetworkStart == NETWORK_MODE_CLIENT) - { - if (gNetworkStartPort == 0) - { - gNetworkStartPort = gConfigNetwork.default_port; - } - network_begin_client(gNetworkStartHost, gNetworkStartPort); - } -#endif // DISABLE_NETWORK - - OpenRCT2::RunGameLoop(); - } - openrct2_dispose(); - } - - void openrct2_dispose() - { - network_close(); - http_dispose(); - language_close_all(); - rct2_dispose(); - config_release(); -#ifndef DISABLE_NETWORK - EVP_MD_CTX_destroy(gHashCTX); -#endif // DISABLE_NETWORK - rct2_interop_dispose(); - platform_free(); - } - - /** - * Causes the OpenRCT2 game loop to finish. - */ - void openrct2_finish() - { - OpenRCT2::_finished = true; - } bool check_file_path(sint32 pathId) { @@ -355,229 +77,3 @@ extern "C" return true; } } - -namespace OpenRCT2 -{ - IPlatformEnvironment * SetupEnvironment() - { - utf8 userPath[MAX_PATH]; - platform_resolve_openrct_data_path(); - platform_resolve_user_data_path(); - platform_get_user_directory(userPath, NULL, sizeof(userPath)); - if (!platform_ensure_directory_exists(userPath)) - { - Console::Error::WriteLine("Could not create user directory (do you have write access to your documents folder?)"); - return nullptr; - } - openrct2_set_exe_path(); - - config_set_defaults(); - if (!config_open_default()) - { - if (!config_find_or_browse_install_directory()) - { - gConfigGeneral.last_run_version = String::Duplicate(OPENRCT2_VERSION); - config_save_default(); - utf8 path[MAX_PATH]; - config_get_default_path(path, sizeof(path)); - Console::Error::WriteLine("An RCT2 install directory must be specified! Please edit \"game_path\" in %s.", path); - return nullptr; - } - config_save_default(); - } - - if (!rct2_init_directories()) - { - return nullptr; - } - if (!rct2_startup_checks()) - { - return nullptr; - } - - utf8 path[260]; - std::string basePaths[4]; - basePaths[(size_t)DIRBASE::RCT1] = String::ToStd(gConfigGeneral.rct1_path); - basePaths[(size_t)DIRBASE::RCT2] = String::ToStd(gConfigGeneral.rct2_path); - platform_get_openrct_data_path(path, sizeof(path)); - basePaths[(size_t)DIRBASE::OPENRCT2] = std::string(path); - platform_get_user_directory(path, nullptr, sizeof(path)); - basePaths[(size_t)DIRBASE::USER] = std::string(path); - - IPlatformEnvironment * env = CreatePlatformEnvironment(basePaths); - return env; - } - - /** - * Run the main game loop until the finished flag is set. - */ - static void RunGameLoop() - { - log_verbose("begin openrct2 loop"); - _finished = false; - do - { - if (ShouldRunVariableFrame()) - { - RunVariableFrame(); - } - else - { - RunFixedFrame(); - } - } - while (!_finished); - log_verbose("finish openrct2 loop"); - } - - static bool IsMinimised() - { - // Don't check if window is minimised too frequently (every second is fine) - if (_lastTick > _isWindowMinimisedLastCheckTick + 1000) - { - uint32 windowFlags = SDL_GetWindowFlags(gWindow); - _isWindowMinimised = (windowFlags & SDL_WINDOW_MINIMIZED) || - (windowFlags & SDL_WINDOW_HIDDEN); - } - return _isWindowMinimised; - } - - static bool ShouldRunVariableFrame() - { - if (!gConfigGeneral.uncap_fps) return false; - if (gGameSpeed > 4) return false; - if (gOpenRCT2Headless) return false; - if (IsMinimised()) return false; - return true; - } - - static void RunFixedFrame() - { - _uncapTick = 0; - uint32 currentTick = SDL_GetTicks(); - uint32 ticksElapsed = currentTick - _lastTick; - if (ticksElapsed < UPDATE_TIME_MS) - { - SDL_Delay(UPDATE_TIME_MS - ticksElapsed); - _lastTick += UPDATE_TIME_MS; - } - else - { - _lastTick = currentTick; - } - GetContext()->GetUiContext()->ProcessMessages(); - rct2_update(); - if (!_isWindowMinimised) - { - platform_draw(); - } - } - - static void RunVariableFrame() - { - uint32 currentTick = SDL_GetTicks(); - if (_uncapTick == 0) - { - _uncapTick = currentTick; - sprite_position_tween_reset(); - } - - // Limit number of updates per loop (any long pauses or debugging can make this update for a very long time) - if (currentTick - _uncapTick > UPDATE_TIME_MS * 60) - { - _uncapTick = currentTick - UPDATE_TIME_MS - 1; - } - - GetContext()->GetUiContext()->ProcessMessages(); - - while (_uncapTick <= currentTick && currentTick - _uncapTick > UPDATE_TIME_MS) - { - // Get the original position of each sprite - sprite_position_tween_store_a(); - - // Update the game so the sprite positions update - rct2_update(); - - // Get the next position of each sprite - sprite_position_tween_store_b(); - - _uncapTick += UPDATE_TIME_MS; - } - - // Tween the position of each sprite from the last position to the new position based on the time between the last - // tick and the next tick. - float nudge = 1 - ((float)(currentTick - _uncapTick) / UPDATE_TIME_MS); - sprite_position_tween_all(nudge); - - platform_draw(); - - sprite_position_tween_restore(); - } - - static bool OpenParkAutoDetectFormat(const utf8 * path) - { - ClassifiedFile info; - if (TryClassifyFile(path, &info)) - { - if (info.Type == FILE_TYPE::SAVED_GAME || - info.Type == FILE_TYPE::SCENARIO) - { - std::unique_ptr parkImporter; - if (info.Version <= 2) - { - parkImporter.reset(ParkImporter::CreateS4()); - } - else - { - parkImporter.reset(ParkImporter::CreateS6()); - } - - if (info.Type == FILE_TYPE::SAVED_GAME) - { - try - { - parkImporter->LoadSavedGame(path); - parkImporter->Import(); - game_fix_save_vars(); - sprite_position_tween_reset(); - gScreenAge = 0; - gLastAutoSaveUpdate = AUTOSAVE_PAUSE; - game_load_init(); - return true; - } - catch (const Exception &) - { - Console::Error::WriteLine("Error loading saved game."); - } - } - else - { - try - { - parkImporter->LoadScenario(path); - parkImporter->Import(); - game_fix_save_vars(); - sprite_position_tween_reset(); - gScreenAge = 0; - gLastAutoSaveUpdate = AUTOSAVE_PAUSE; - scenario_begin(); - return true; - } - catch (const Exception &) - { - Console::Error::WriteLine("Error loading scenario."); - } - } - } - else - { - Console::Error::WriteLine("Invalid file type."); - } - } - else - { - Console::Error::WriteLine("Unable to detect file type."); - } - return false; - } -} diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index ba45e17730..f1305c8c40 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -24,6 +24,7 @@ extern "C" { #endif #include "platform/platform.h" + #undef CreateWindow #ifdef __cplusplus } #endif @@ -40,17 +41,6 @@ enum STARTUP_ACTION STARTUP_ACTION_EDIT }; -#ifdef __cplusplus - -interface IPlatformEnvironment; - -namespace OpenRCT2 -{ - IPlatformEnvironment * SetupEnvironment(); -} - -#endif - #ifdef __cplusplus extern "C" { @@ -80,9 +70,6 @@ extern "C" #endif void openrct2_write_full_version_info(utf8 * buffer, size_t bufferSize); - bool openrct2_initialise(); - void openrct2_launch(); - void openrct2_dispose(); void openrct2_finish(); sint32 cmdline_run(const char * * argv, sint32 argc); diff --git a/src/openrct2/cmdline/ConvertCommand.cpp b/src/openrct2/cmdline/ConvertCommand.cpp index 6387a3e10b..c93c723407 100644 --- a/src/openrct2/cmdline/ConvertCommand.cpp +++ b/src/openrct2/cmdline/ConvertCommand.cpp @@ -103,11 +103,11 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator * enumerat WriteConvertFromAndToMessage(sourceFileType, destinationFileType); gOpenRCT2Headless = true; - if (!openrct2_initialise()) - { - Console::Error::WriteLine("Error while initialising OpenRCT2."); - return EXITCODE_FAIL; - } + // if (!openrct2_initialise()) + // { + // Console::Error::WriteLine("Error while initialising OpenRCT2."); + // return EXITCODE_FAIL; + // } try { diff --git a/src/openrct2/cmdline/RootCommands.cpp b/src/openrct2/cmdline/RootCommands.cpp index 1d64d017b8..1eb9bc722d 100644 --- a/src/openrct2/cmdline/RootCommands.cpp +++ b/src/openrct2/cmdline/RootCommands.cpp @@ -389,9 +389,9 @@ static exitcode_t HandleCommandScanObjects(CommandLineArgEnumerator * enumerator return result; } - IPlatformEnvironment * env = OpenRCT2::SetupEnvironment(); - IObjectRepository * objectRepository = CreateObjectRepository(env); - objectRepository->Construct(); + // IPlatformEnvironment * env = OpenRCT2::SetupEnvironment(); + // IObjectRepository * objectRepository = CreateObjectRepository(env); + // objectRepository->Construct(); return EXITCODE_OK; } diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 0ba3e5148a..1ad69e3a22 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -104,7 +104,7 @@ extern "C" { try { - drawingEngine->Initialise(gWindow); + drawingEngine->Initialise(uiContext->GetWindow()); drawingEngine->SetUncappedFrameRate(gConfigGeneral.uncap_fps == 1); _drawingEngine = drawingEngine; } diff --git a/src/openrct2/interface/screenshot.c b/src/openrct2/interface/screenshot.c index 30d517feb5..6661d11b8a 100644 --- a/src/openrct2/interface/screenshot.c +++ b/src/openrct2/interface/screenshot.c @@ -288,7 +288,7 @@ sint32 cmdline_for_screenshot(const char **argv, sint32 argc) } gOpenRCT2Headless = true; - if (openrct2_initialise()) { + // if (openrct2_initialise()) { drawing_engine_init(); rct2_open_file(inputPath); @@ -373,7 +373,7 @@ sint32 cmdline_for_screenshot(const char **argv, sint32 argc) free(dpi.bits); drawing_engine_dispose(); - } - openrct2_dispose(); + // } + // openrct2_dispose(); return 1; } diff --git a/src/openrct2/rct2.c b/src/openrct2/rct2.c index b24d470d6f..2fc34fdfd9 100644 --- a/src/openrct2/rct2.c +++ b/src/openrct2/rct2.c @@ -167,7 +167,7 @@ bool rct2_init() font_sprite_initialise_characters(); if (!gOpenRCT2Headless) { - platform_init(); + // platform_init(); audio_init_ride_sounds_and_info(); } viewport_init_all(); diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index e762dc2642..68678070e0 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -21,6 +21,8 @@ #include "../Context.h" #include "../interface/Cursors.h" +struct SDL_Window; + namespace OpenRCT2 { namespace Drawing @@ -68,7 +70,9 @@ namespace OpenRCT2 virtual ~IUiContext() = default; // Window - virtual void * GetWindow() abstract; + virtual void CreateWindow() abstract; + virtual void CloseWindow() abstract; + virtual SDL_Window * GetWindow() abstract; virtual sint32 GetWidth() abstract; virtual sint32 GetHeight() abstract; virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; From bd9839ff504b6db358ea58e55155ddcaa2923d9e Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 26 Mar 2017 21:42:07 +0100 Subject: [PATCH 19/76] Get the game working Mostly just needed to resolve screen size which is now retrieved via ui context. --- src/openrct2-ui/CursorRepository.cpp | 22 +++++------ src/openrct2-ui/CursorRepository.h | 4 +- src/openrct2-ui/UiContext.cpp | 15 +++---- .../drawing/engines/SoftwareDrawingEngine.cpp | 4 +- src/openrct2/Context.cpp | 10 +++++ src/openrct2/Context.h | 2 + src/openrct2/audio/audio.cpp | 6 ++- src/openrct2/drawing/NewDrawing.cpp | 4 +- src/openrct2/drawing/drawing.c | 3 +- src/openrct2/game.c | 3 +- src/openrct2/input.c | 12 +++--- src/openrct2/interface/chat.c | 4 +- src/openrct2/interface/console.c | 2 +- src/openrct2/interface/screenshot.c | 3 +- src/openrct2/interface/viewport.c | 9 +++-- src/openrct2/interface/window.c | 39 ++++++++++--------- src/openrct2/intro.c | 10 ++--- src/openrct2/management/news_item.c | 3 +- src/openrct2/peep/peep.c | 3 +- src/openrct2/rct2.c | 7 ++-- src/openrct2/rct2.h | 2 - src/openrct2/ride/ride.c | 5 ++- src/openrct2/ride/vehicle.c | 5 ++- src/openrct2/title/TitleScreen.cpp | 3 +- src/openrct2/title/TitleSequencePlayer.cpp | 22 ++++++----- src/openrct2/windows/changelog.c | 10 +++-- src/openrct2/windows/clear_scenery.c | 3 +- src/openrct2/windows/debug_paint.c | 7 ++-- src/openrct2/windows/dropdown.c | 22 +++++++---- src/openrct2/windows/editor_bottom_toolbar.c | 9 ++--- src/openrct2/windows/editor_main.c | 5 ++- src/openrct2/windows/error.c | 6 ++- src/openrct2/windows/game_bottom_toolbar.c | 13 ++++--- src/openrct2/windows/install_track.c | 7 +++- src/openrct2/windows/land.c | 3 +- src/openrct2/windows/land_rights.c | 3 +- src/openrct2/windows/main.c | 9 ++--- src/openrct2/windows/park.c | 5 ++- src/openrct2/windows/scenery.c | 4 +- src/openrct2/windows/title_exit.c | 3 +- src/openrct2/windows/title_menu.c | 5 ++- src/openrct2/windows/title_options.c | 7 ++-- src/openrct2/windows/tooltip.c | 7 +++- src/openrct2/windows/top_toolbar.c | 10 ++--- src/openrct2/windows/track_list.c | 7 +++- src/openrct2/windows/track_manage.c | 11 +++--- src/openrct2/windows/water.c | 3 +- 47 files changed, 208 insertions(+), 153 deletions(-) diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp index 61b027c2b2..fc0a973e84 100644 --- a/src/openrct2-ui/CursorRepository.cpp +++ b/src/openrct2-ui/CursorRepository.cpp @@ -22,7 +22,17 @@ using namespace OpenRCT2::Ui; -CursorRepository::CursorRepository() +CursorRepository::~CursorRepository() +{ + for (size_t i = 0; i < CURSOR_COUNT; i++) + { + SDL_FreeCursor(_loadedCursors[i]); + _loadedCursors[i] = nullptr; + } + _currentCursor = CURSOR_UNDEFINED; +} + +void CursorRepository::LoadCursors() { // Using system cursors _loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); @@ -42,16 +52,6 @@ CursorRepository::CursorRepository() SetCurrentCursor(CURSOR_ARROW); } -CursorRepository::~CursorRepository() -{ - for (size_t i = 0; i < CURSOR_COUNT; i++) - { - SDL_FreeCursor(_loadedCursors[i]); - _loadedCursors[i] = nullptr; - } - _currentCursor = CURSOR_UNDEFINED; -} - CURSOR_ID CursorRepository::GetCurrentCursor() { return _currentCursor; diff --git a/src/openrct2-ui/CursorRepository.h b/src/openrct2-ui/CursorRepository.h index c15faf4a95..9a54c5ad30 100644 --- a/src/openrct2-ui/CursorRepository.h +++ b/src/openrct2-ui/CursorRepository.h @@ -28,12 +28,12 @@ namespace OpenRCT2 constexpr static sint32 CURSOR_WIDTH = 32; constexpr static sint32 CURSOR_HEIGHT = 32; - SDL_Cursor * _loadedCursors[CURSOR_COUNT]; + SDL_Cursor * _loadedCursors[CURSOR_COUNT] = { nullptr }; CURSOR_ID _currentCursor = CURSOR_UNDEFINED; public: - CursorRepository(); ~CursorRepository(); + void LoadCursors(); CURSOR_ID GetCurrentCursor(); void SetCurrentCursor(CURSOR_ID cursorId); diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 58c03ef2de..9126c7eb69 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -83,6 +83,7 @@ public: { SDLException::Throw("SDL_Init(SDL_INIT_VIDEO)"); } + _cursorRepository.LoadCursors(); } ~UiContext() override @@ -331,13 +332,13 @@ public: // Apple sends touchscreen events for trackpads, so ignore these events on macOS #ifndef __MACOSX__ case SDL_FINGERMOTION: - _cursorState.x = (sint32)(e.tfinger.x * gScreenWidth); - _cursorState.y = (sint32)(e.tfinger.y * gScreenHeight); + _cursorState.x = (sint32)(e.tfinger.x * _width); + _cursorState.y = (sint32)(e.tfinger.y * _height); break; case SDL_FINGERDOWN: { - sint32 x = (sint32)(e.tfinger.x * gScreenWidth); - sint32 y = (sint32)(e.tfinger.y * gScreenHeight); + sint32 x = (sint32)(e.tfinger.x * _width); + sint32 y = (sint32)(e.tfinger.y * _height); _cursorState.touchIsDouble = (!_cursorState.touchIsDouble && e.tfinger.timestamp - _cursorState.touchDownTimestamp < TOUCH_DOUBLE_TIMEOUT); @@ -360,8 +361,8 @@ public: } case SDL_FINGERUP: { - sint32 x = (sint32)(e.tfinger.x * gScreenWidth); - sint32 y = (sint32)(e.tfinger.y * gScreenHeight); + sint32 x = (sint32)(e.tfinger.x * _width); + sint32 y = (sint32)(e.tfinger.y * _height); if (_cursorState.touchIsDouble) { @@ -393,7 +394,7 @@ public: // Zoom gesture constexpr sint32 tolerance = 128; - sint32 gesturePixels = (sint32)(_gestureRadius * gScreenWidth); + sint32 gesturePixels = (sint32)(_gestureRadius * _width); if (abs(gesturePixels) > tolerance) { _gestureRadius = 0; diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 710c945fec..934bd751cb 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -655,8 +655,8 @@ private: // Determine region in pixels uint32 left = Math::Max(0, x * _dirtyGrid.BlockWidth); uint32 top = Math::Max(0, y * _dirtyGrid.BlockHeight); - uint32 right = Math::Min((uint32)gScreenWidth, left + (columns * _dirtyGrid.BlockWidth)); - uint32 bottom = Math::Min((uint32)gScreenHeight, top + (rows * _dirtyGrid.BlockHeight)); + uint32 right = Math::Min(_width, left + (columns * _dirtyGrid.BlockWidth)); + uint32 bottom = Math::Min(_height, top + (rows * _dirtyGrid.BlockHeight)); if (right <= left || bottom <= top) { return; diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index d64c649b32..f8065494ba 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -664,4 +664,14 @@ extern "C" Memory::CopyArray(*outResolutions, resolutions.data(), count); return count; } + + sint32 context_get_width() + { + return GetContext()->GetUiContext()->GetWidth(); + } + + sint32 context_get_height() + { + return GetContext()->GetUiContext()->GetHeight(); + } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 02f3d59317..219a52265f 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -100,6 +100,8 @@ extern "C" void context_trigger_resize(); void context_set_fullscreen_mode(sint32 mode); sint32 context_get_resolutions(struct Resolution * * outResolutions); + sint32 context_get_width(); + sint32 context_get_height(); #ifdef __cplusplus } diff --git a/src/openrct2/audio/audio.cpp b/src/openrct2/audio/audio.cpp index 2f88b8e5a9..1717c6fc54 100644 --- a/src/openrct2/audio/audio.cpp +++ b/src/openrct2/audio/audio.cpp @@ -14,17 +14,19 @@ *****************************************************************************/ #pragma endregion +#include "../config/Config.h" +#include "../Context.h" #include "../core/File.h" #include "../core/FileStream.hpp" #include "../core/Memory.hpp" #include "../core/Util.hpp" #include "../localisation/string_ids.h" #include "../OpenRCT2.h" +#include "../ui/UiContext.h" #include "AudioMixer.h" extern "C" { - #include "../config/Config.h" #include "../interface/viewport.h" #include "../intro.h" #include "../localisation/language.h" @@ -255,7 +257,7 @@ sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan) sint32 mixerPan = 0; if (pan != AUDIO_PLAY_AT_CENTRE) { sint32 x2 = pan << 16; - uint16 screenWidth = Math::Max(64, gScreenWidth); + uint16 screenWidth = Math::Max(64, OpenRCT2::GetContext()->GetUiContext()->GetWidth()); mixerPan = ((x2 / screenWidth) - 0x8000) >> 4; } diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 1ad69e3a22..31dc499dc0 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -139,7 +139,9 @@ extern "C" { drawing_engine_init(); } - _drawingEngine->Resize(gScreenWidth, gScreenHeight); + + IUiContext * uiContext = GetContext()->GetUiContext(); + _drawingEngine->Resize(uiContext->GetWidth(), uiContext->GetHeight()); } void drawing_engine_set_palette(SDL_Color * colours) diff --git a/src/openrct2/drawing/drawing.c b/src/openrct2/drawing/drawing.c index 0b9d727850..c5a6b2875b 100644 --- a/src/openrct2/drawing/drawing.c +++ b/src/openrct2/drawing/drawing.c @@ -15,6 +15,7 @@ #pragma endregion #include "../common.h" +#include "../Context.h" #include "../core/Guard.hpp" #include "../interface/window.h" #include "../localisation/localisation.h" @@ -546,7 +547,7 @@ void load_palette(){ */ void gfx_invalidate_screen() { - gfx_set_dirty_blocks(0, 0, gScreenWidth, gScreenHeight); + gfx_set_dirty_blocks(0, 0, context_get_width(), context_get_height()); } /** diff --git a/src/openrct2/game.c b/src/openrct2/game.c index 44884b798b..dcc2e839ee 100644 --- a/src/openrct2/game.c +++ b/src/openrct2/game.c @@ -17,6 +17,7 @@ #include "audio/audio.h" #include "cheats.h" #include "config/Config.h" +#include "Context.h" #include "editor.h" #include "game.h" #include "input.h" @@ -138,7 +139,7 @@ void game_create_windows() window_main_open(); window_top_toolbar_open(); window_game_bottom_toolbar_open(); - window_resize_gui(gScreenWidth, gScreenHeight); + window_resize_gui(context_get_width(), context_get_height()); } enum { diff --git a/src/openrct2/input.c b/src/openrct2/input.c index de806bf396..3a82b54037 100644 --- a/src/openrct2/input.c +++ b/src/openrct2/input.c @@ -138,8 +138,10 @@ void game_handle_input() if (_inputFlags & INPUT_FLAG_5) { game_handle_input_mouse(x, y, state); } else if (x != 0x80000000) { - x = clamp(0, x, gScreenWidth - 1); - y = clamp(0, y, gScreenHeight - 1); + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + x = clamp(0, x, screenWidth - 1); + y = clamp(0, y, screenHeight - 1); game_handle_input_mouse(x, y, state); process_mouse_over(x, y); @@ -470,7 +472,7 @@ static void input_window_resize_begin(rct_window *w, rct_widgetindex widgetIndex static void input_window_resize_continue(rct_window *w, sint32 x, sint32 y) { - if (y < (sint32)gScreenHeight - 2) { + if (y < (sint32)context_get_height() - 2) { sint32 dx, dy, targetWidth, targetHeight; dx = x - gInputDragLastX; dy = y - gInputDragLastY; @@ -1623,13 +1625,13 @@ void game_handle_edge_scroll() const CursorState * cursorState = context_get_cursor_state(); if (cursorState->x == 0) scrollX = -1; - else if (cursorState->x >= gScreenWidth - 1) + else if (cursorState->x >= context_get_width() - 1) scrollX = 1; // Scroll up / down if (cursorState->y == 0) scrollY = -1; - else if (cursorState->y >= gScreenHeight - 1) + else if (cursorState->y >= context_get_height() - 1) scrollY = 1; // Scroll viewport diff --git a/src/openrct2/interface/chat.c b/src/openrct2/interface/chat.c index c39afe0f95..f87b663616 100644 --- a/src/openrct2/interface/chat.c +++ b/src/openrct2/interface/chat.c @@ -84,9 +84,9 @@ void chat_draw(rct_drawpixelinfo * dpi) } _chatLeft = 10; - _chatRight = min((gScreenWidth - 10), CHAT_MAX_WINDOW_WIDTH); + _chatRight = min((context_get_width() - 10), CHAT_MAX_WINDOW_WIDTH); _chatWidth = _chatRight - _chatLeft; - _chatBottom = gScreenHeight - 45; + _chatBottom = context_get_height() - 45; _chatTop = _chatBottom - 10; char lineBuffer[CHAT_INPUT_SIZE + 10]; diff --git a/src/openrct2/interface/console.c b/src/openrct2/interface/console.c index 8b1ff0c56f..3fd9da5bfc 100644 --- a/src/openrct2/interface/console.c +++ b/src/openrct2/interface/console.c @@ -127,7 +127,7 @@ void console_update() _consoleLeft = 0; _consoleTop = 0; - _consoleRight = gScreenWidth; + _consoleRight = context_get_width(); _consoleBottom = 322; if (gConsoleOpen) { diff --git a/src/openrct2/interface/screenshot.c b/src/openrct2/interface/screenshot.c index 6661d11b8a..ee6e677bce 100644 --- a/src/openrct2/interface/screenshot.c +++ b/src/openrct2/interface/screenshot.c @@ -16,6 +16,7 @@ #include "../audio/audio.h" #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../game.h" #include "../Imaging.h" @@ -46,7 +47,7 @@ void screenshot_check() screenshotIndex = screenshot_dump(); if (screenshotIndex != -1) { - audio_play_sound(SOUND_WINDOW_OPEN, 100, gScreenWidth / 2); + audio_play_sound(SOUND_WINDOW_OPEN, 100, context_get_width() / 2); } else { window_error_open(STR_SCREENSHOT_FAILED, STR_NONE); } diff --git a/src/openrct2/interface/viewport.c b/src/openrct2/interface/viewport.c index 58d129e2e3..6227ae75f1 100644 --- a/src/openrct2/interface/viewport.c +++ b/src/openrct2/interface/viewport.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../drawing/drawing.h" #include "../game.h" #include "../input.h" @@ -424,8 +425,8 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp if (w->flags & WF_7){ sint32 left = max(viewport->x, 0); sint32 top = max(viewport->y, 0); - sint32 right = min(viewport->x + viewport->width, gScreenWidth); - sint32 bottom = min(viewport->y + viewport->height, gScreenHeight); + sint32 right = min(viewport->x + viewport->width, context_get_width()); + sint32 bottom = min(viewport->y + viewport->height, context_get_height()); if (left >= right) return; if (top >= bottom) return; @@ -447,7 +448,7 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp viewport->x = 0; } - sint32 eax = viewport->x + viewport->width - gScreenWidth; + sint32 eax = viewport->x + viewport->width - context_get_width(); if (eax > 0){ viewport->width -= eax; viewport->view_width -= eax * zoom; @@ -465,7 +466,7 @@ static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewp viewport->y = 0; } - eax = viewport->y + viewport->height - gScreenHeight; + eax = viewport->y + viewport->height - context_get_height(); if (eax > 0){ viewport->height -= eax; viewport->view_height -= eax * zoom; diff --git a/src/openrct2/interface/window.c b/src/openrct2/interface/window.c index a153af4e24..75dfd10f12 100644 --- a/src/openrct2/interface/window.c +++ b/src/openrct2/interface/window.c @@ -500,8 +500,8 @@ rct_window *window_create(sint32 x, sint32 y, sint32 width, sint32 height, rct_w */ static bool sub_6EA8EC(sint32 x, sint32 y, sint32 width, sint32 height) { - uint16 screenWidth = gScreenWidth; - uint16 screenHeight = gScreenHeight; + uint16 screenWidth = context_get_width(); + uint16 screenHeight = context_get_height(); sint32 unk; unk = -(width / 4); @@ -527,8 +527,8 @@ static bool sub_6EA934(sint32 x, sint32 y, sint32 width, sint32 height) { if (x < 0) return false; if (y < 28) return false; - if (x + width > gScreenWidth) return false; - if (y + height > gScreenHeight) return false; + if (x + width > context_get_width()) return false; + if (y + height > context_get_height()) return false; return sub_6EA95D(x, y, width, height); } @@ -569,8 +569,8 @@ static bool sub_6EA95D(sint32 x, sint32 y, sint32 width, sint32 height) */ rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) { - uint16 screenWidth = gScreenWidth; - uint16 screenHeight = gScreenHeight; + uint16 screenWidth = context_get_width(); + uint16 screenHeight = context_get_height(); // TODO dead code, looks like it is cascading the new window offset from an existing window // we will have to re-implement this in our own way. @@ -579,11 +579,11 @@ rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event // cls &= ~0x80; // rct_window *w = window_find_by_number(0, 0); // if (w != NULL) { - // if (w->x > -60 && w->x < gScreenWidth - 20) { - // if (w->y < gScreenHeight - 20) { + // if (w->x > -60 && w->x < screenWidth - 20) { + // if (w->y < screenHeight - 20) { // sint32 x = w->x; - // if (w->x + width > gScreenWidth) - // x = gScreenWidth - 20 - width; + // if (w->x + width > screenWidth) + // x = screenWidth - 20 - width; // sint32 y = w->y; // return window_create(x + 10, y + 10, width, height, event_handlers, cls, flags); // } @@ -689,12 +689,13 @@ foundSpace: return window_create(x, y, width, height, event_handlers, cls, flags); } -rct_window *window_create_centred(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) +rct_window * window_create_centred(sint32 width, sint32 height, rct_window_event_list *event_handlers, rct_windowclass cls, uint16 flags) { - sint32 x, y; + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); - x = (gScreenWidth - width) / 2; - y = max(28, (gScreenHeight - height) / 2); + sint32 x = (screenWidth - width) / 2; + sint32 y = max(28, (screenHeight - height) / 2); return window_create(x, y, width, height, event_handlers, cls, flags); } @@ -1233,7 +1234,7 @@ void window_push_others_right(rct_window* window) continue; window_invalidate(w); - if (window->x + window->width + 13 >= gScreenWidth) + if (window->x + window->width + 13 >= context_get_width()) continue; uint16 push_amount = window->x + window->width - w->x + 3; w->x += push_amount; @@ -1268,7 +1269,7 @@ void window_push_others_below(rct_window *w1) continue; // Check if there is room to push it down - if (w1->y + w1->height + 80 >= gScreenHeight) + if (w1->y + w1->height + 80 >= context_get_height()) continue; // Invalidate the window's current area @@ -2402,7 +2403,7 @@ static void window_snap_right(rct_window *w, sint32 proximity) leftMost = min(leftMost, w2->x); } - screenWidth = gScreenWidth; + screenWidth = context_get_width(); if (screenWidth >= wLeftProximity && screenWidth <= wRightProximity) leftMost = min(leftMost, screenWidth); @@ -2435,7 +2436,7 @@ static void window_snap_bottom(rct_window *w, sint32 proximity) topMost = min(topMost, w2->y); } - screenHeight = gScreenHeight; + screenHeight = context_get_height(); if (screenHeight >= wTopProximity && screenHeight <= wBottomProximity) topMost = min(topMost, screenHeight); @@ -2448,7 +2449,7 @@ void window_move_and_snap(rct_window *w, sint32 newWindowX, sint32 newWindowY, s sint32 originalX = w->x; sint32 originalY = w->y; - newWindowY = clamp(29, newWindowY, gScreenHeight - 34); + newWindowY = clamp(29, newWindowY, context_get_height() - 34); if (snapProximity > 0) { w->x = newWindowX; diff --git a/src/openrct2/intro.c b/src/openrct2/intro.c index 5b3b7fcd07..abd28d8c1b 100644 --- a/src/openrct2/intro.c +++ b/src/openrct2/intro.c @@ -69,7 +69,7 @@ void intro_update() _introStateCounter += 5; // Check if logo is off the screen...ish - if (_introStateCounter > gScreenHeight - 120) { + if (_introStateCounter > context_get_height() - 120) { _introStateCounter = -116; gIntroState++; } @@ -85,7 +85,7 @@ void intro_update() _introStateCounter += 5; // Check if logo is almost scrolled to the bottom - if (!_chainLiftFinished && _introStateCounter >= gScreenHeight + 40 - 421) { + if (!_chainLiftFinished && _introStateCounter >= context_get_height() + 40 - 421) { _chainLiftFinished = true; // Stop the chain lift sound @@ -99,7 +99,7 @@ void intro_update() } // Check if logo is off the screen...ish - if (_introStateCounter >= gScreenHeight + 40) { + if (_introStateCounter >= context_get_height() + 40) { // Stop the track friction sound if (_soundChannel != NULL) { Mixer_Stop_Channel(_soundChannel); @@ -160,7 +160,7 @@ void intro_update() void intro_draw(rct_drawpixelinfo *dpi) { - sint32 screenWidth = gScreenWidth; + sint32 screenWidth = context_get_width(); switch (gIntroState) { case INTRO_STATE_DISCLAIMER_1: @@ -258,7 +258,7 @@ static void screen_intro_skip_part() static void screen_intro_draw_logo(rct_drawpixelinfo *dpi) { - sint32 screenWidth = gScreenWidth; + sint32 screenWidth = context_get_width(); sint32 imageWidth = 640; sint32 imageX = (screenWidth - imageWidth) / 2; diff --git a/src/openrct2/management/news_item.c b/src/openrct2/management/news_item.c index 121270034c..6726b2821b 100644 --- a/src/openrct2/management/news_item.c +++ b/src/openrct2/management/news_item.c @@ -15,6 +15,7 @@ #pragma endregion #include "../audio/audio.h" +#include "../Context.h" #include "../input.h" #include "../interface/window.h" #include "../localisation/date.h" @@ -97,7 +98,7 @@ static void news_item_tick_current() // Only play news item sound when in normal playing mode if (ticks == 1 && (gScreenFlags == SCREEN_FLAGS_PLAYING)) { // Play sound - audio_play_sound_panned(SOUND_NEWS_ITEM, gScreenWidth / 2, 0, 0, 0); + audio_play_sound_panned(SOUND_NEWS_ITEM, context_get_width() / 2, 0, 0, 0); } } diff --git a/src/openrct2/peep/peep.c b/src/openrct2/peep/peep.c index 1110a81a55..a92c51fe84 100644 --- a/src/openrct2/peep/peep.c +++ b/src/openrct2/peep/peep.c @@ -18,6 +18,7 @@ #include "../audio/AudioMixer.h" #include "../cheats.h" #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../input.h" #include "../interface/window.h" @@ -6997,7 +6998,7 @@ void peep_applause() } // Play applause noise - audio_play_sound_panned(SOUND_APPLAUSE, gScreenWidth / 2, 0, 0, 0); + audio_play_sound_panned(SOUND_APPLAUSE, context_get_width() / 2, 0, 0, 0); } /** diff --git a/src/openrct2/rct2.c b/src/openrct2/rct2.c index 2fc34fdfd9..196f5244bb 100644 --- a/src/openrct2/rct2.c +++ b/src/openrct2/rct2.c @@ -20,6 +20,7 @@ #include "audio/audio.h" #include "audio/AudioMixer.h" #include "config/Config.h" +#include "Context.h" #include "drawing/drawing.h" #include "drawing/lightfx.h" #include "editor.h" @@ -114,8 +115,6 @@ uint32 gCurrentDrawCount = 0; uint8 gScreenFlags; uint32 gScreenAge; uint8 gSavePromptMode; -sint32 gScreenWidth; -sint32 gScreenHeight; char gRCT2AddressAppPath[MAX_PATH]; char gRCT2AddressSavedGamesPath[MAX_PATH]; @@ -273,7 +272,7 @@ void rct2_draw(rct_drawpixelinfo *dpi) console_draw(dpi); if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !gTitleHideVersionInfo) { - DrawOpenRCT2(dpi, 0, gScreenHeight - 20); + DrawOpenRCT2(dpi, 0, context_get_height() - 20); } if (gConfigGeneral.show_fps) { @@ -303,7 +302,7 @@ static void rct2_measure_fps() static void rct2_draw_fps(rct_drawpixelinfo *dpi) { - sint32 x = gScreenWidth / 2; + sint32 x = context_get_width() / 2; sint32 y = 2; // Measure FPS diff --git a/src/openrct2/rct2.h b/src/openrct2/rct2.h index 829fa00771..002ded8c29 100644 --- a/src/openrct2/rct2.h +++ b/src/openrct2/rct2.h @@ -161,8 +161,6 @@ extern uint32 gCurrentDrawCount; extern uint8 gScreenFlags; extern uint32 gScreenAge; extern uint8 gSavePromptMode; -extern sint32 gScreenWidth; -extern sint32 gScreenHeight; extern char gRCT2AddressAppPath[]; extern char gRCT2AddressSavedGamesPath[]; diff --git a/src/openrct2/ride/ride.c b/src/openrct2/ride/ride.c index 8d5b12707b..0ccc6a02f8 100644 --- a/src/openrct2/ride/ride.c +++ b/src/openrct2/ride/ride.c @@ -19,6 +19,7 @@ #include "../cheats.h" #include "../common.h" #include "../config/Config.h" +#include "../Context.h" #include "../editor.h" #include "../game.h" #include "../input.h" @@ -3448,7 +3449,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u } sint32 x2 = viewport->x + ((rotatedCoords.x - viewport->view_x) >> viewport->zoom); x2 *= 0x10000; - uint16 screenwidth = gScreenWidth; + uint16 screenwidth = context_get_width(); if (screenwidth < 64) { screenwidth = 64; } @@ -3456,7 +3457,7 @@ sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, u sint32 y2 = viewport->y + ((rotatedCoords.y - viewport->view_y) >> viewport->zoom); y2 *= 0x10000; - uint16 screenheight = gScreenHeight; + uint16 screenheight = context_get_height(); if (screenheight < 64) { screenheight = 64; } diff --git a/src/openrct2/ride/vehicle.c b/src/openrct2/ride/vehicle.c index aa074353a5..c0b68850ca 100644 --- a/src/openrct2/ride/vehicle.c +++ b/src/openrct2/ride/vehicle.c @@ -17,6 +17,7 @@ #include "../audio/audio.h" #include "../audio/AudioMixer.h" #include "../config/Config.h" +#include "../Context.h" #include "../editor.h" #include "../game.h" #include "../interface/viewport.h" @@ -701,7 +702,7 @@ static void vehicle_update_sound_params(rct_vehicle* vehicle) pan_x >>= g_music_tracking_viewport->zoom; pan_x += g_music_tracking_viewport->x; - uint16 screenwidth = gScreenWidth; + uint16 screenwidth = context_get_width(); if (screenwidth < 64) { screenwidth = 64; } @@ -711,7 +712,7 @@ static void vehicle_update_sound_params(rct_vehicle* vehicle) pan_y >>= g_music_tracking_viewport->zoom; pan_y += g_music_tracking_viewport->y; - uint16 screenheight = gScreenHeight; + uint16 screenheight = context_get_height(); if (screenheight < 64) { screenheight = 64; } diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index 91a58229c0..bee7457ead 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -15,6 +15,7 @@ #pragma endregion #include "../core/Console.hpp" +#include "../Context.h" #include "../network/network.h" #include "../OpenRCT2.h" #include "../scenario/ScenarioRepository.h" @@ -161,7 +162,7 @@ extern "C" window_title_exit_open(); window_title_options_open(); window_title_logo_open(); - window_resize_gui(gScreenWidth, gScreenHeight); + window_resize_gui(context_get_width(), context_get_height()); gTitleHideVersionInfo = false; } diff --git a/src/openrct2/title/TitleSequencePlayer.cpp b/src/openrct2/title/TitleSequencePlayer.cpp index c113fe55ce..29ec5db5fb 100644 --- a/src/openrct2/title/TitleSequencePlayer.cpp +++ b/src/openrct2/title/TitleSequencePlayer.cpp @@ -447,13 +447,13 @@ private: sint32 z = map_element_height(x, y); window_set_location(w, x, y, z); viewport_update_position(w); - } - // Save known tile position in case of window resize - _lastScreenWidth = gScreenWidth; - _lastScreenHeight = gScreenHeight; - _viewCentreLocation.x = x; - _viewCentreLocation.y = y; + // Save known tile position in case of window resize + _lastScreenWidth = w->width; + _lastScreenHeight = w->height; + _viewCentreLocation.x = x; + _viewCentreLocation.y = y; + } } /** @@ -461,10 +461,14 @@ private: */ void FixViewLocation() { - if (gScreenWidth != _lastScreenWidth || - gScreenHeight != _lastScreenHeight) + rct_window * w = window_get_main(); + if (w != nullptr) { - SetViewLocation(_viewCentreLocation.x, _viewCentreLocation.y); + if (w->width != _lastScreenWidth || + w->height != _lastScreenHeight) + { + SetViewLocation(_viewCentreLocation.x, _viewCentreLocation.y); + } } } }; diff --git a/src/openrct2/windows/changelog.c b/src/openrct2/windows/changelog.c index a5a0468180..57b8d0e178 100644 --- a/src/openrct2/windows/changelog.c +++ b/src/openrct2/windows/changelog.c @@ -14,6 +14,8 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" +#include "../interface/themes.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -107,8 +109,8 @@ rct_window *window_changelog_open() if (!window_changelog_read_file()) return NULL; - sint32 screenWidth = gScreenWidth; - sint32 screenHeight = gScreenHeight; + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); window = window_create_centred( screenWidth * 4 / 5, @@ -144,8 +146,8 @@ static void window_changelog_mouseup(rct_window *w, rct_widgetindex widgetIndex) static void window_changelog_resize(rct_window *w) { - sint32 screenWidth = gScreenWidth; - sint32 screenHeight = gScreenHeight; + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); w->max_width = (screenWidth * 4) / 5; w->max_height = (screenHeight * 4) / 5; diff --git a/src/openrct2/windows/clear_scenery.c b/src/openrct2/windows/clear_scenery.c index 65db08efd8..f9b3eb6c19 100644 --- a/src/openrct2/windows/clear_scenery.c +++ b/src/openrct2/windows/clear_scenery.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -104,7 +105,7 @@ void window_clear_scenery_open() if (window_find_by_class(WC_CLEAR_SCENERY) != NULL) return; - window = window_create(gScreenWidth - 98, 29, 98, 94, &window_clear_scenery_events, WC_CLEAR_SCENERY, 0); + window = window_create(context_get_width() - 98, 29, 98, 94, &window_clear_scenery_events, WC_CLEAR_SCENERY, 0); window->widgets = window_clear_scenery_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_INCREMENT) | (1 << WIDX_DECREMENT) | (1 << WIDX_PREVIEW) | (1 << WIDX_SMALL_SCENERY) | (1 << WIDX_LARGE_SCENERY) | (1 << WIDX_FOOTPATH); diff --git a/src/openrct2/windows/debug_paint.c b/src/openrct2/windows/debug_paint.c index ebaf5e867e..7c3d434d0b 100644 --- a/src/openrct2/windows/debug_paint.c +++ b/src/openrct2/windows/debug_paint.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -81,15 +82,13 @@ static rct_window_event_list window_debug_paint_events = { void window_debug_paint_open() { - rct_window * window; - // Check if window is already open if (window_find_by_class(WC_DEBUG_PAINT) != NULL) return; - window = window_create( + rct_window * window = window_create( 16, - gScreenHeight - 16 - 33 - WINDOW_HEIGHT, + context_get_height() - 16 - 33 - WINDOW_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, &window_debug_paint_events, diff --git a/src/openrct2/windows/dropdown.c b/src/openrct2/windows/dropdown.c index 666efb13c7..103218af36 100644 --- a/src/openrct2/windows/dropdown.c +++ b/src/openrct2/windows/dropdown.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -176,10 +177,12 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u width = _dropdown_item_width * _dropdown_num_columns + 3; sint32 height = _dropdown_item_height * _dropdown_num_rows + 3; - if (x + width > gScreenWidth) - x = max(0, gScreenWidth - width); - if (y + height > gScreenHeight) - y = max(0, gScreenHeight - height); + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + if (x + width > screenWidth) + x = max(0, screenWidth - width); + if (y + height > screenHeight) + y = max(0, screenHeight - height); window_dropdown_widgets[WIDX_BACKGROUND].bottom = (sint16)(_dropdown_item_height * num_items + 3); window_dropdown_widgets[WIDX_BACKGROUND].right = (sint16)(_dropdown_item_width + 3); @@ -245,10 +248,13 @@ void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, // Calculate position and size width = _dropdown_item_width * _dropdown_num_columns + 3; height = _dropdown_item_height * _dropdown_num_rows + 3; - if (x + width > gScreenWidth) - x = max(0, gScreenWidth - width); - if (y + height > gScreenHeight) - y = max(0, gScreenHeight - height); + + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + if (x + width > screenWidth) + x = max(0, screenWidth - width); + if (y + height > screenHeight) + y = max(0, screenHeight - height); window_dropdown_widgets[WIDX_BACKGROUND].right = width; window_dropdown_widgets[WIDX_BACKGROUND].bottom = height; diff --git a/src/openrct2/windows/editor_bottom_toolbar.c b/src/openrct2/windows/editor_bottom_toolbar.c index 51f8b79efb..46a75d976e 100644 --- a/src/openrct2/windows/editor_bottom_toolbar.c +++ b/src/openrct2/windows/editor_bottom_toolbar.c @@ -16,6 +16,7 @@ #include "../audio/audio.h" #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../editor.h" #include "../input.h" @@ -135,10 +136,8 @@ static void sub_6DFED0(); */ void window_editor_bottom_toolbar_open() { - rct_window* window; - - window = window_create(0, gScreenHeight - 32, - gScreenWidth, 32, + rct_window * window = window_create(0, context_get_height() - 32, + context_get_width(), 32, &window_editor_bottom_toolbar_events, WC_BOTTOM_TOOLBAR, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); window->widgets = window_editor_bottom_toolbar_widgets; @@ -371,7 +370,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w) { colour_scheme_update_by_class(w, (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR : WC_EDITOR_TRACK_BOTTOM_TOOLBAR); - uint16 screenWidth = gScreenWidth; + uint16 screenWidth = context_get_width(); window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left = screenWidth - 200; window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right = screenWidth - 1; window_editor_bottom_toolbar_widgets[WIDX_NEXT_STEP_BUTTON].left = screenWidth - 198; diff --git a/src/openrct2/windows/editor_main.c b/src/openrct2/windows/editor_main.c index fd585e133c..d8397a43ba 100644 --- a/src/openrct2/windows/editor_main.c +++ b/src/openrct2/windows/editor_main.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -65,8 +66,8 @@ static rct_widget window_editor_main_widgets[] = { */ rct_window * window_editor_main_open() { - window_editor_main_widgets[0].right = gScreenWidth; - window_editor_main_widgets[0].bottom = gScreenHeight; + window_editor_main_widgets[0].right = context_get_width(); + window_editor_main_widgets[0].bottom = context_get_height(); rct_window *window = window_create(0, 0, window_editor_main_widgets[0].right, window_editor_main_widgets[0].bottom, &window_editor_main_events, WC_MAIN_WINDOW, WF_STICK_TO_BACK); window->widgets = window_editor_main_widgets; diff --git a/src/openrct2/windows/error.c b/src/openrct2/windows/error.c index 6c05b528d3..cc874b8693 100644 --- a/src/openrct2/windows/error.c +++ b/src/openrct2/windows/error.c @@ -121,13 +121,15 @@ void window_error_open(rct_string_id title, rct_string_id message) window_error_widgets[WIDX_BACKGROUND].right = width; window_error_widgets[WIDX_BACKGROUND].bottom = height; + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); const CursorState * state = context_get_cursor_state(); x = state->x - (width / 2); - x = clamp(0, x, gScreenWidth); + x = clamp(0, x, screenWidth); y = state->y + 26; y = max(22, y); - maxY = gScreenHeight - height; + maxY = screenHeight - height; if (y > maxY) { y = y - height - 40; y = min(y, maxY); diff --git a/src/openrct2/windows/game_bottom_toolbar.c b/src/openrct2/windows/game_bottom_toolbar.c index 734fb837fd..61ea4d855a 100644 --- a/src/openrct2/windows/game_bottom_toolbar.c +++ b/src/openrct2/windows/game_bottom_toolbar.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../input.h" #include "../interface/widget.h" @@ -127,11 +128,11 @@ static void window_game_bottom_toolbar_invalidate_dirty_widgets(rct_window *w); */ void window_game_bottom_toolbar_open() { - rct_window* window; - - window = window_create( - 0, gScreenHeight - 32, - gScreenWidth, 32, + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + rct_window * window = window_create( + 0, screenHeight - 32, + screenWidth, 32, &window_game_bottom_toolbar_events, WC_BOTTOM_TOOLBAR, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND @@ -242,7 +243,7 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w) NewsItem *newsItem; // Anchor the middle and right panel to the right - x = gScreenWidth; + x = context_get_width(); w->width = x; x--; window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right = x; diff --git a/src/openrct2/windows/install_track.c b/src/openrct2/windows/install_track.c index 7636d4233a..11ac600b76 100644 --- a/src/openrct2/windows/install_track.c +++ b/src/openrct2/windows/install_track.c @@ -15,6 +15,7 @@ #pragma endregion #include "../audio/audio.h" +#include "../Context.h" #include "../editor.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -125,8 +126,10 @@ void window_install_track_open(const utf8 *path) gTrackDesignSceneryToggle = false; _currentTrackPieceDirection = 2; - sint32 x = gScreenWidth / 2 - 201; - sint32 y = max(28, gScreenHeight / 2 - 200); + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + sint32 x = screenWidth / 2 - 201; + sint32 y = max(28, screenHeight / 2 - 200); rct_window *w = window_create(x, y, 402, 400, &window_install_track_events, WC_INSTALL_TRACK, 0); w->widgets = window_install_track_widgets; diff --git a/src/openrct2/windows/land.c b/src/openrct2/windows/land.c index 68acfbf88f..e56d6c614e 100644 --- a/src/openrct2/windows/land.c +++ b/src/openrct2/windows/land.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -126,7 +127,7 @@ void window_land_open() if (window_find_by_class(WC_LAND) != NULL) return; - window = window_create(gScreenWidth - 98, 29, 98, 160, &window_land_events, WC_LAND, 0); + window = window_create(context_get_width() - 98, 29, 98, 160, &window_land_events, WC_LAND, 0); window->widgets = window_land_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | diff --git a/src/openrct2/windows/land_rights.c b/src/openrct2/windows/land_rights.c index b888f1522d..f4ca519236 100644 --- a/src/openrct2/windows/land_rights.c +++ b/src/openrct2/windows/land_rights.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../game.h" #include "../input.h" #include "../interface/viewport.h" @@ -99,7 +100,7 @@ void window_land_rights_open() if (window_find_by_class(WC_LAND_RIGHTS) != NULL) return; - window = window_create(gScreenWidth - 98, 29, 98, 94, &window_land_rights_events, WC_LAND_RIGHTS, 0); + window = window_create(context_get_width() - 98, 29, 98, 94, &window_land_rights_events, WC_LAND_RIGHTS, 0); window->widgets = window_land_rights_widgets; window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_DECREMENT) | (1 << WIDX_INCREMENT) | (1 << WIDX_PREVIEW) | (1 << WIDX_BUY_LAND_RIGHTS) | (1 << WIDX_BUY_CONSTRUCTION_RIGHTS); diff --git a/src/openrct2/windows/main.c b/src/openrct2/windows/main.c index 908fd5b4c0..2f6e7dede1 100644 --- a/src/openrct2/windows/main.c +++ b/src/openrct2/windows/main.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -64,11 +65,9 @@ static rct_window_event_list window_main_events = { */ void window_main_open() { - rct_window* window; - - window_main_widgets[0].right = gScreenWidth; - window_main_widgets[0].bottom = gScreenHeight; - window = window_create( + window_main_widgets[0].right = context_get_width(); + window_main_widgets[0].bottom = context_get_height(); + rct_window * window = window_create( 0, 0, window_main_widgets[0].right, window_main_widgets[0].bottom, &window_main_events, diff --git a/src/openrct2/windows/park.c b/src/openrct2/windows/park.c index d2a5b50ef9..646f643e72 100644 --- a/src/openrct2/windows/park.c +++ b/src/openrct2/windows/park.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../localisation/date.h" #include "../localisation/localisation.h" @@ -1667,8 +1668,8 @@ void window_park_objective_open() window->hold_down_widgets = window_park_page_hold_down_widgets[WINDOW_PARK_PAGE_OBJECTIVE]; window->event_handlers = &window_park_objective_events; window_init_scroll_widgets(window); - window->x = gScreenWidth / 2 - 115; - window->y = gScreenHeight / 2 - 87; + window->x = context_get_width() / 2 - 115; + window->y = context_get_height() / 2 - 87; window_invalidate(window); } diff --git a/src/openrct2/windows/scenery.c b/src/openrct2/windows/scenery.c index 3a8143dc76..4969baa6c2 100644 --- a/src/openrct2/windows/scenery.c +++ b/src/openrct2/windows/scenery.c @@ -424,7 +424,7 @@ void window_scenery_open() init_scenery(); window = window_create( - gScreenWidth - WINDOW_SCENERY_WIDTH, + context_get_width() - WINDOW_SCENERY_WIDTH, 0x1D, WINDOW_SCENERY_WIDTH, WINDOW_SCENERY_HEIGHT, @@ -748,7 +748,7 @@ static void window_scenery_update(rct_window *w) } } else { sint32 windowHeight = min(463, w->scrolls[0].v_bottom + 62); - if (gScreenHeight < 600) + if (context_get_height() < 600) windowHeight = min(374, windowHeight); windowHeight = max(WINDOW_SCENERY_HEIGHT, windowHeight); diff --git a/src/openrct2/windows/title_exit.c b/src/openrct2/windows/title_exit.c index 96b4133482..4ed0482db8 100644 --- a/src/openrct2/windows/title_exit.c +++ b/src/openrct2/windows/title_exit.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../sprites.h" #include "../localisation/localisation.h" @@ -75,7 +76,7 @@ void window_title_exit_open() rct_window* window; window = window_create( - gScreenWidth - 40, gScreenHeight - 64, + context_get_width() - 40, context_get_height() - 64, 40, 64, &window_title_exit_events, WC_TITLE_EXIT, diff --git a/src/openrct2/windows/title_menu.c b/src/openrct2/windows/title_menu.c index ea28d1c791..70eca7bdd8 100644 --- a/src/openrct2/windows/title_menu.c +++ b/src/openrct2/windows/title_menu.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../editor.h" #include "../game.h" #include "../input.h" @@ -88,7 +89,7 @@ void window_title_menu_open() rct_window* window; window = window_create( - 0, gScreenHeight - 142, + 0, context_get_height() - 142, 0, 100, &window_title_menu_events, WC_TITLE_MENU, @@ -120,7 +121,7 @@ void window_title_menu_open() i++; } window->width = x; - window->x = (gScreenWidth - window->width) / 2; + window->x = (context_get_width() - window->width) / 2; window_init_scroll_widgets(window); } diff --git a/src/openrct2/windows/title_options.c b/src/openrct2/windows/title_options.c index 583ec59379..40af320e26 100644 --- a/src/openrct2/windows/title_options.c +++ b/src/openrct2/windows/title_options.c @@ -15,6 +15,7 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../game.h" #include "../intro.h" #include "../localisation/localisation.h" @@ -70,10 +71,8 @@ static rct_window_event_list window_title_options_events = { */ void window_title_options_open() { - rct_window* window; - - window = window_create( - gScreenWidth - 80, 0, + rct_window * window = window_create( + context_get_width() - 80, 0, 80, 12, &window_title_options_events, WC_TITLE_OPTIONS, diff --git a/src/openrct2/windows/tooltip.c b/src/openrct2/windows/tooltip.c index 8cd8f35acc..975c1cb8bc 100644 --- a/src/openrct2/windows/tooltip.c +++ b/src/openrct2/windows/tooltip.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../drawing/drawing.h" #include "../localisation/localisation.h" #include "../input.h" @@ -110,12 +111,14 @@ void window_tooltip_show(rct_string_id id, sint32 x, sint32 y) memcpy(_tooltipText, buffer, sizeof(_tooltipText)); - x = clamp(0, x - (width / 2), gScreenWidth - width); + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + x = clamp(0, x - (width / 2), screenWidth - width); // TODO The cursor size will be relative to the window DPI. // The amount to offset the y should be adjusted. - sint32 max_y = gScreenHeight - height; + sint32 max_y = screenHeight - height; y += 26; // Normally, we'd display the tooltip 26 lower if (y > max_y) // If y is too large, the tooltip could be forced below the cursor if we'd just clamped y, diff --git a/src/openrct2/windows/top_toolbar.c b/src/openrct2/windows/top_toolbar.c index bbb0b8a133..51d7a246e9 100644 --- a/src/openrct2/windows/top_toolbar.c +++ b/src/openrct2/windows/top_toolbar.c @@ -17,6 +17,7 @@ #include "../audio/audio.h" #include "../cheats.h" #include "../config/Config.h" +#include "../Context.h" #include "../editor.h" #include "../game.h" #include "../input.h" @@ -290,11 +291,9 @@ static uint16 _unkF64F15; */ void window_top_toolbar_open() { - rct_window* window; - - window = window_create( + rct_window * window = window_create( 0, 0, - gScreenWidth, 28, + context_get_width(), 28, &window_top_toolbar_events, WC_TOP_TOOLBAR, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND @@ -763,8 +762,9 @@ static void window_top_toolbar_invalidate(rct_window *w) } // Align right hand side toolbar buttons + sint32 screenWidth = context_get_width(); firstAlignment = 1; - x = max(640, gScreenWidth); + x = max(640, screenWidth); for (sint32 i = 0; i < countof(right_aligned_widgets_order); ++i) { widgetIndex = right_aligned_widgets_order[i]; widget = &window_top_toolbar_widgets[widgetIndex]; diff --git a/src/openrct2/windows/track_list.c b/src/openrct2/windows/track_list.c index 574fd0bf0f..4e44db18f0 100644 --- a/src/openrct2/windows/track_list.c +++ b/src/openrct2/windows/track_list.c @@ -16,6 +16,7 @@ #include "../audio/audio.h" #include "../config/Config.h" +#include "../Context.h" #include "../drawing/IDrawingEngine.h" #include "../editor.h" #include "../interface/widget.h" @@ -121,8 +122,10 @@ void window_track_list_open(ride_list_item item) sint32 x, y; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - x = gScreenWidth / 2 - 300; - y = max(28, gScreenHeight / 2 - 200); + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + x = screenWidth / 2 - 300; + y = max(28, screenHeight / 2 - 200); } else { x = 0; y = 29; diff --git a/src/openrct2/windows/track_manage.c b/src/openrct2/windows/track_manage.c index b248a74dc5..ac9599a894 100644 --- a/src/openrct2/windows/track_manage.c +++ b/src/openrct2/windows/track_manage.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../game.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -252,13 +253,13 @@ static void window_track_manage_paint(rct_window *w, rct_drawpixelinfo *dpi) */ static void window_track_delete_prompt_open() { - rct_window *w; - window_close_by_class(WC_TRACK_DELETE_PROMPT); - w = window_create( - max(28, (gScreenWidth - 250) / 2), - (gScreenHeight - 44) / 2, + sint32 screenWidth = context_get_width(); + sint32 screenHeight = context_get_height(); + rct_window *w = window_create( + max(28, (screenWidth - 250) / 2), + (screenHeight - 44) / 2, 250, 74, &window_track_delete_prompt_events, diff --git a/src/openrct2/windows/water.c b/src/openrct2/windows/water.c index a4246ae32b..4871a2c7ca 100644 --- a/src/openrct2/windows/water.c +++ b/src/openrct2/windows/water.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../Context.h" #include "../input.h" #include "../interface/widget.h" #include "../interface/window.h" @@ -98,7 +99,7 @@ void window_water_open() return; window = window_create( - gScreenWidth - 76, + context_get_width() - 76, 29, 76, 77, From 175606ae52505f272de59097a8e3fd85dbc1c3fb Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 26 Mar 2017 23:00:28 +0100 Subject: [PATCH 20/76] Create new audio context interface --- src/openrct2-ui/audio/AudioContext.cpp | 50 +++++++++++++++++++++++++ src/openrct2-ui/libopenrct2ui.vcxproj | 1 + src/openrct2/audio/AudioContext.h | 52 ++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 src/openrct2-ui/audio/AudioContext.cpp create mode 100644 src/openrct2/audio/AudioContext.h diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp new file mode 100644 index 0000000000..bc7d838940 --- /dev/null +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -0,0 +1,50 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#include + +namespace OpenRCT2 { namespace Audio +{ + class AudioContext : public IAudioContext + { + public: + virtual ~AudioContext() + { + } + + void StartTitleMusic() override { } + + IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) override { return nullptr; } + IAudioChannel * PlaySoundAtLocation(sint32 soundId, sint16 x, sint16 y, sint16 z) override { return nullptr; } + IAudioChannel * PlaySoundPanned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z) override { return nullptr; } + + void ToggleAllSounds() override { } + void PauseSounds() override { } + void UnpauseSounds() override { } + + void StopAll() override { } + void StopCrowdSound() override { } + void StopRainSound() override { } + void StopRideMusic() override { } + void StopTitleMusic() override { } + void StopVehicleSounds() override { } + }; + + IAudioContext * CreateAudioContext() + { + return new AudioContext(); + } +} } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index ca3247308d..a537a7195b 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -22,6 +22,7 @@ + diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h new file mode 100644 index 0000000000..3f749baf79 --- /dev/null +++ b/src/openrct2/audio/AudioContext.h @@ -0,0 +1,52 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include "../common.h" + +namespace OpenRCT2 +{ + namespace Audio + { + interface IAudioChannel; + + /** + * Audio services for playing music and sound effects. + */ + interface IAudioContext + { + virtual ~IAudioContext() = default; + + virtual void StartTitleMusic() abstract; + + virtual IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) abstract; + virtual IAudioChannel * PlaySoundAtLocation(sint32 soundId, sint16 x, sint16 y, sint16 z) abstract; + virtual IAudioChannel * PlaySoundPanned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z) abstract; + + virtual void ToggleAllSounds() abstract; + virtual void PauseSounds() abstract; + virtual void UnpauseSounds() abstract; + + virtual void StopAll() abstract; + virtual void StopCrowdSound() abstract; + virtual void StopRainSound() abstract; + virtual void StopRideMusic() abstract; + virtual void StopTitleMusic() abstract; + virtual void StopVehicleSounds() abstract; + }; + } +} From d206d181f272500e59cda733ed66e651920f90aa Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 28 Mar 2017 19:58:15 +0100 Subject: [PATCH 21/76] Move audio code to UI project --- src/openrct2-dll/openrct2-dll.cpp | 8 +- src/openrct2-ui/UiContext.cpp | 2 +- src/openrct2-ui/UiContext.h | 2 +- src/openrct2-ui/audio/AudioChannel.cpp | 297 ++++++++ src/openrct2-ui/audio/AudioContext.cpp | 9 + src/openrct2-ui/audio/AudioContext.h | 44 ++ .../audio/AudioFormat.h | 57 +- src/openrct2-ui/audio/AudioMixer.cpp | 539 ++++++++++++++ src/openrct2-ui/audio/FileAudioSource.cpp | 210 ++++++ src/openrct2-ui/audio/MemoryAudioSource.cpp | 241 +++++++ src/openrct2-ui/libopenrct2ui.vcxproj | 6 + src/openrct2/Context.cpp | 20 +- src/openrct2/Context.h | 11 +- src/openrct2/audio/AudioChannel.cpp | 290 -------- src/openrct2/audio/AudioChannel.h | 96 +-- src/openrct2/audio/AudioContext.h | 12 + src/openrct2/audio/AudioMixer.cpp | 667 ++---------------- src/openrct2/audio/AudioMixer.h | 93 +-- src/openrct2/audio/AudioSource.h | 33 +- src/openrct2/audio/FileAudioSource.cpp | 204 ------ src/openrct2/audio/MemoryAudioSource.cpp | 245 ------- src/openrct2/audio/NullAudioSource.cpp | 40 +- src/openrct2/audio/audio.cpp | 11 +- src/openrct2/audio/audio.h | 16 +- src/openrct2/peep/peep.c | 28 +- src/openrct2/peep/peep.h | 1 + src/openrct2/platform/shared.c | 1 - 27 files changed, 1647 insertions(+), 1536 deletions(-) create mode 100644 src/openrct2-ui/audio/AudioChannel.cpp create mode 100644 src/openrct2-ui/audio/AudioContext.h rename src/{openrct2 => openrct2-ui}/audio/AudioFormat.h (50%) create mode 100644 src/openrct2-ui/audio/AudioMixer.cpp create mode 100644 src/openrct2-ui/audio/FileAudioSource.cpp create mode 100644 src/openrct2-ui/audio/MemoryAudioSource.cpp delete mode 100644 src/openrct2/audio/AudioChannel.cpp delete mode 100644 src/openrct2/audio/FileAudioSource.cpp delete mode 100644 src/openrct2/audio/MemoryAudioSource.cpp diff --git a/src/openrct2-dll/openrct2-dll.cpp b/src/openrct2-dll/openrct2-dll.cpp index c15683e233..83ca557473 100644 --- a/src/openrct2-dll/openrct2-dll.cpp +++ b/src/openrct2-dll/openrct2-dll.cpp @@ -20,12 +20,14 @@ #include #include #include +#include #include #include #include #include using namespace OpenRCT2; +using namespace OpenRCT2::Audio; using namespace OpenRCT2::Ui; #define DLLEXPORT extern "C" __declspec(dllexport) @@ -43,13 +45,15 @@ DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) return -1; } - IUiContext * uiContext = OpenRCT2::Ui::CreateContext(); - IContext * context = OpenRCT2::CreateContext(uiContext); + IAudioContext * audioContext = CreateAudioContext(); + IUiContext * uiContext = CreateUiContext(); + IContext * context = OpenRCT2::CreateContext(audioContext, uiContext); int exitCode = context->RunOpenRCT2(argc, argv); delete context; delete uiContext; + delete audioContext; FreeCommandLineArgs(argc, argv); return exitCode; diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 9126c7eb69..021ccfe29a 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -602,7 +602,7 @@ private: } }; -IUiContext * OpenRCT2::Ui::CreateContext() +IUiContext * OpenRCT2::Ui::CreateUiContext() { auto platformUiContext = std::unique_ptr(CreatePlatformUiContext()); return new UiContext(platformUiContext.get()); diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index 7712bdf935..3d46d201bc 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -35,7 +35,7 @@ namespace OpenRCT2 virtual bool IsSteamOverlayAttached() abstract; }; - IUiContext * CreateContext(); + IUiContext * CreateUiContext(); IPlatformUiContext * CreatePlatformUiContext(); } } diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp new file mode 100644 index 0000000000..ae2037a534 --- /dev/null +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -0,0 +1,297 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include +#include +#include +#include "AudioContext.h" +#include "AudioFormat.h" + +namespace OpenRCT2 { namespace Audio +{ + class AudioChannelImpl : public IAudioChannel + { + private: + IAudioSource * _source = nullptr; + SpeexResamplerState * _resampler = nullptr; + + sint32 _group = MIXER_GROUP_SOUND; + double _rate = 0; + uint64 _offset = 0; + sint32 _loop = 0; + + sint32 _volume = 1; + float _volume_l = 0.f; + float _volume_r = 0.f; + float _oldvolume_l = 0.f; + float _oldvolume_r = 0.f; + sint32 _oldvolume = 0; + float _pan = 0; + + bool _stopping = false; + bool _done = true; + bool _deleteondone = false; + bool _deletesourceondone = false; + + public: + AudioChannelImpl() + { + SetRate(1); + SetVolume(SDL_MIX_MAXVOLUME); + SetPan(0.5f); + } + + ~AudioChannelImpl() override + { + if (_resampler != nullptr) + { + speex_resampler_destroy(_resampler); + _resampler = nullptr; + } + if (_deletesourceondone) + { + delete _source; + } + } + + IAudioSource * GetSource() const override + { + return _source; + } + + SpeexResamplerState * GetResampler() const override + { + return _resampler; + } + + void SetResampler(SpeexResamplerState * value) override + { + _resampler = value; + } + + sint32 GetGroup() const override + { + return _group; + } + + void SetGroup(sint32 group) override + { + _group = group; + } + + double GetRate() const override + { + return _rate; + } + + void SetRate(double rate) override + { + _rate = Math::Max(0.001, rate); + } + + uint64 GetOffset() const override + { + return _offset; + } + + bool SetOffset(uint64 offset) override + { + if (_source != nullptr && offset < _source->GetLength()) + { + AudioFormat format = _source->GetFormat(); + sint32 samplesize = format.channels * format.BytesPerSample(); + _offset = (offset / samplesize) * samplesize; + return true; + } + return false; + } + + virtual sint32 GetLoop() const override + { + return _loop; + } + + virtual void SetLoop(sint32 value) override + { + _loop = value; + } + + sint32 GetVolume() const override + { + return _volume; + } + + float GetVolumeL() const override + { + return _volume_l; + } + + float GetVolumeR() const override + { + return _volume_r; + } + + float GetOldVolumeL() const override + { + return _oldvolume_l; + } + + float GetOldVolumeR() const override + { + return _oldvolume_r; + } + + sint32 GetOldVolume() const override + { + return _oldvolume; + } + + void SetVolume(sint32 volume) override + { + _volume = Math::Clamp(0, volume, SDL_MIX_MAXVOLUME); + } + + float GetPan() const override + { + return _pan; + } + + void SetPan(float pan) override + { + _pan = Math::Clamp(0.0f, pan, 1.0f); + double decibels = (std::abs(_pan - 0.5) * 2.0) * 100.0; + double attenuation = pow(10, decibels / 20.0); + if (_pan <= 0.5) + { + _volume_l = 1.0; + _volume_r = (float)(1.0 / attenuation); + } + else + { + _volume_r = 1.0; + _volume_l = (float)(1.0 / attenuation); + } + } + + bool IsStopping() const override + { + return _stopping; + } + + void SetStopping(bool value) override + { + _stopping = value; + } + + bool IsDone() const override + { + return _done; + } + + void SetDone(bool value) override + { + _done = value; + } + + bool DeleteOnDone() const override + { + return _deleteondone; + } + + void SetDeleteOnDone(bool value) override + { + _deleteondone = value; + } + + void SetDeleteSourceOnDone(bool value) override + { + _deletesourceondone = value; + } + + bool IsPlaying() const override + { + return !_done; + } + + void Play(IAudioSource * source, sint32 loop) override + { + _source = source; + _loop = loop; + _offset = 0; + _done = false; + } + + void UpdateOldVolume() override + { + _oldvolume = _volume; + _oldvolume_l = _volume_l; + _oldvolume_r = _volume_r; + } + + AudioFormat GetFormat() const override + { + AudioFormat result = { 0 }; + if (_source != nullptr) + { + result = _source->GetFormat(); + } + return result; + } + + size_t Read(void * dst, size_t len) override + { + size_t bytesRead = 0; + size_t bytesToRead = len; + while (bytesToRead > 0 && !_done) + { + size_t readLen = _source->Read(dst, _offset, bytesToRead); + if (readLen > 0) + { + dst = (void *)((uintptr_t)dst + readLen); + bytesToRead -= readLen; + bytesRead += readLen; + _offset += readLen; + } + if (_offset >= _source->GetLength()) + { + if (_loop == 0) + { + _done = true; + } + else if (_loop == MIXER_LOOP_INFINITE) + { + _offset = 0; + } + else + { + _loop--; + _offset = 0; + } + } + } + return bytesRead; + } + }; + + IAudioChannel * AudioChannel::Create() + { + return new (std::nothrow) AudioChannelImpl(); + } +} } diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index bc7d838940..bec4079fa6 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -25,6 +25,15 @@ namespace OpenRCT2 { namespace Audio { } + virtual void SetOutputDevice(const char * deviceName) override + { + } + + virtual IAudioSource * CreateStreamFromWAV(const std::string &path) override + { + return nullptr; + } + void StartTitleMusic() override { } IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) override { return nullptr; } diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h new file mode 100644 index 0000000000..b523e06edd --- /dev/null +++ b/src/openrct2-ui/audio/AudioContext.h @@ -0,0 +1,44 @@ + +#pragma once + +#include +#include + +namespace OpenRCT2 { namespace Audio +{ + struct AudioFormat; + interface IAudioSource; + +#pragma pack(push, 1) + struct WaveFormat + { + uint16 encoding; + uint16 channels; + uint32 frequency; + uint32 byterate; + uint16 blockalign; + uint16 bitspersample; + }; + assert_struct_size(WaveFormat, 16); + + struct WaveFormatEx + { + uint16 encoding; + uint16 channels; + uint32 frequency; + uint32 byterate; + uint16 blockalign; + uint16 bitspersample; + uint16 extrasize; + }; + assert_struct_size(WaveFormatEx, 18); +#pragma pack(pop) + + namespace AudioSource + { + IAudioSource * CreateMemoryFromCSS1(const std::string &path, size_t index, const AudioFormat * targetFormat = nullptr); + IAudioSource * CreateMemoryFromWAV(const std::string &path, const AudioFormat * targetFormat = nullptr); + IAudioSource * CreateStreamFromWAV(const std::string &path); + IAudioSource * CreateStreamFromWAV(SDL_RWops * rw); + } +} } diff --git a/src/openrct2/audio/AudioFormat.h b/src/openrct2-ui/audio/AudioFormat.h similarity index 50% rename from src/openrct2/audio/AudioFormat.h rename to src/openrct2-ui/audio/AudioFormat.h index 59f9d8bc08..fb31ab503d 100644 --- a/src/openrct2/audio/AudioFormat.h +++ b/src/openrct2-ui/audio/AudioFormat.h @@ -16,38 +16,41 @@ #pragma once -#include "../common.h" +#include #include -/** - * Represents the size, frequency and number of channels for - * an audio stream or buffer. - */ -struct AudioFormat +namespace OpenRCT2 { namespace Audio { - sint32 freq; - SDL_AudioFormat format; - sint32 channels; - - sint32 BytesPerSample() const + /** + * Represents the size, frequency and number of channels for + * an audio stream or buffer. + */ + struct AudioFormat { - return (SDL_AUDIO_BITSIZE(format)) / 8; + sint32 freq; + SDL_AudioFormat format; + sint32 channels; + + sint32 BytesPerSample() const + { + return (SDL_AUDIO_BITSIZE(format)) / 8; + } + + sint32 GetByteRate() const + { + return BytesPerSample() * channels; + } + }; + + inline bool operator ==(const AudioFormat& lhs, const AudioFormat& rhs) + { + return lhs.freq == rhs.freq && + lhs.format == rhs.format && + lhs.channels == rhs.channels; } - sint32 GetByteRate() const + inline bool operator !=(const AudioFormat& lhs, const AudioFormat& rhs) { - return BytesPerSample() * channels; + return !(lhs == rhs); } -}; - -inline bool operator ==(const AudioFormat& lhs, const AudioFormat& rhs) -{ - return lhs.freq == rhs.freq && - lhs.format == rhs.format && - lhs.channels == rhs.channels; -} - -inline bool operator !=(const AudioFormat& lhs, const AudioFormat& rhs) -{ - return !(lhs == rhs); -} +} } diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp new file mode 100644 index 0000000000..075ac6a7b4 --- /dev/null +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -0,0 +1,539 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "AudioContext.h" +#include "AudioFormat.h" + +extern "C" +{ + #include + #include + #include + #include + #include +} + +namespace OpenRCT2 { namespace Audio +{ + + struct Buffer + { + private: + void * _data = nullptr; + size_t _capacity = 0; + + public: + void * GetData() const { return _data; } + void * GetData() { return _data; } + size_t GetCapacity() const { return _capacity; } + + ~Buffer() + { + Free(); + } + + void Free() + { + Memory::Free(_data); + _data = nullptr; + _capacity = 0; + } + + void EnsureCapacity(size_t capacity) + { + if (_capacity < capacity) + { + _capacity = capacity; + _data = Memory::Reallocate(_data, capacity); + } + } + }; + + class AudioMixer final : public IAudioMixer + { + private: + IAudioSource * _nullSource = nullptr; + + SDL_AudioDeviceID _deviceId = 0; + AudioFormat _format = { 0 }; + std::list _channels; + float _volume = 1.0f; + float _adjustSoundVolume = 0.0f; + float _adjustMusicVolume = 0.0f; + uint8 _settingSoundVolume = 0xFF; + uint8 _settingMusicVolume = 0xFF; + + IAudioSource * _css1Sources[SOUND_MAXID] = { nullptr }; + IAudioSource * _musicSources[PATH_ID_END] = { nullptr }; + + Buffer _channelBuffer; + Buffer _convertBuffer; + Buffer _effectBuffer; + + public: + AudioMixer() + { + _nullSource = AudioSource::CreateNull(); + } + + ~AudioMixer() + { + Close(); + delete _nullSource; + } + + void Init(const char* device) override + { + Close(); + + SDL_AudioSpec want = { 0 }; + want.freq = 44100; + want.format = AUDIO_S16SYS; + want.channels = 2; + want.samples = 1024; + want.callback = [](void * arg, uint8 * dst, sint32 length) -> void + { + auto mixer = static_cast(arg); + mixer->GetNextAudioChunk(dst, (size_t)length); + }; + want.userdata = this; + + SDL_AudioSpec have; + _deviceId = SDL_OpenAudioDevice(device, 0, &want, &have, 0); + _format.format = have.format; + _format.channels = have.channels; + _format.freq = have.freq; + + LoadAllSounds(); + + SDL_PauseAudioDevice(_deviceId, 0); + } + + void Close() override + { + // Free channels + Lock(); + for (IAudioChannel * channel : _channels) + { + delete channel; + } + _channels.clear(); + Unlock(); + + SDL_CloseAudioDevice(_deviceId); + + // Free sources + for (size_t i = 0; i < Util::CountOf(_css1Sources); i++) + { + if (_css1Sources[i] != _nullSource) + { + SafeDelete(_css1Sources[i]); + } + } + for (size_t i = 0; i < Util::CountOf(_musicSources); i++) + { + if (_musicSources[i] != _nullSource) + { + SafeDelete(_musicSources[i]); + } + } + + // Free buffers + _channelBuffer.Free(); + _convertBuffer.Free(); + _effectBuffer.Free(); + } + + void Lock() override + { + SDL_LockAudioDevice(_deviceId); + } + + void Unlock() override + { + SDL_UnlockAudioDevice(_deviceId); + } + + IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) override + { + Lock(); + IAudioChannel * channel = AudioChannel::Create(); + if (channel != nullptr) + { + channel->Play(source, loop); + channel->SetDeleteOnDone(deleteondone); + channel->SetDeleteSourceOnDone(deletesourceondone); + _channels.push_back(channel); + } + Unlock(); + return channel; + } + + void Stop(IAudioChannel * channel) override + { + Lock(); + channel->SetStopping(true); + Unlock(); + } + + bool LoadMusic(size_t pathId) override + { + bool result = false; + if (pathId < Util::CountOf(_musicSources)) + { + IAudioSource * source = _musicSources[pathId]; + if (source == nullptr) + { + const utf8 * path = get_file_path((sint32)pathId); + source = AudioSource::CreateMemoryFromWAV(path, &_format); + if (source == nullptr) + { + source = _nullSource; + } + _musicSources[pathId] = source; + } + result = source != _nullSource; + } + return result; + } + + void SetVolume(float volume) override + { + _volume = volume; + } + + IAudioSource * GetSoundSource(sint32 id) override + { + return _css1Sources[id]; + } + + IAudioSource * GetMusicSource(sint32 id) override + { + return _musicSources[id]; + } + + private: + void LoadAllSounds() + { + const utf8 * css1Path = get_file_path(PATH_ID_CSS1); + for (size_t i = 0; i < Util::CountOf(_css1Sources); i++) + { + auto source = AudioSource::CreateMemoryFromCSS1(css1Path, i, &_format); + if (source == nullptr) + { + source = _nullSource; + } + _css1Sources[i] = source; + } + } + + void GetNextAudioChunk(uint8 * dst, size_t length) + { + UpdateAdjustedSound(); + + // Zero the output buffer + Memory::Set(dst, 0, length); + + // Mix channels onto output buffer + std::list::iterator it = _channels.begin(); + while (it != _channels.end()) + { + IAudioChannel * channel = *it; + + sint32 group = channel->GetGroup(); + if (group != MIXER_GROUP_SOUND || gConfigSound.sound_enabled) + { + MixChannel(channel, dst, length); + } + if ((channel->IsDone() && channel->DeleteOnDone()) || channel->IsStopping()) + { + delete channel; + it = _channels.erase(it); + } + else + { + it++; + } + } + } + + void UpdateAdjustedSound() + { + // Did the volume level get changed? Recalculate level in this case. + if (_settingSoundVolume != gConfigSound.sound_volume) + { + _settingSoundVolume = gConfigSound.sound_volume; + _adjustSoundVolume = powf(_settingSoundVolume / 100.f, 10.f / 6.f); + } + if (_settingMusicVolume != gConfigSound.ride_music_volume) + { + _settingMusicVolume = gConfigSound.ride_music_volume; + _adjustMusicVolume = powf(_settingMusicVolume / 100.f, 10.f / 6.f); + } + } + + void MixChannel(IAudioChannel * channel, uint8 * data, size_t length) + { + sint32 byteRate = _format.GetByteRate(); + sint32 numSamples = (sint32)(length / byteRate); + double rate = 1; + if (_format.format == AUDIO_S16SYS) + { + rate = channel->GetRate(); + } + + bool mustConvert = false; + SDL_AudioCVT cvt; + cvt.len_ratio = 1; + AudioFormat streamformat = channel->GetFormat(); + if (streamformat != _format) + { + if (SDL_BuildAudioCVT(&cvt, streamformat.format, streamformat.channels, streamformat.freq, _format.format, _format.channels, _format.freq) == -1) + { + // Unable to convert channel data + return; + } + mustConvert = true; + } + + // Read raw PCM from channel + sint32 readSamples = (sint32)(numSamples * rate); + size_t readLength = (size_t)(readSamples / cvt.len_ratio) * byteRate; + _channelBuffer.EnsureCapacity(readLength); + size_t bytesRead = channel->Read(_channelBuffer.GetData(), readLength); + + // Convert data to required format if necessary + void * buffer = nullptr; + size_t bufferLen = 0; + if (mustConvert) + { + if (Convert(&cvt, _channelBuffer.GetData(), bytesRead)) + { + buffer = cvt.buf; + bufferLen = cvt.len_cvt; + } + else + { + return; + } + } + else + { + buffer = _channelBuffer.GetData(); + bufferLen = bytesRead; + } + + // Apply effects + if (rate != 1) + { + sint32 srcSamples = (sint32)(bufferLen / byteRate); + sint32 dstSamples = numSamples; + bufferLen = ApplyResample(channel, buffer, srcSamples, dstSamples); + buffer = _effectBuffer.GetData(); + } + + // Apply panning and volume + ApplyPan(channel, buffer, bufferLen, byteRate); + sint32 mixVolume = ApplyVolume(channel, buffer, bufferLen); + + // Finally mix on to destination buffer + size_t dstLength = Math::Min(length, bufferLen); + SDL_MixAudioFormat(data, (const uint8 *)buffer, _format.format, (uint32)dstLength, mixVolume); + + channel->UpdateOldVolume(); + } + + /** + * Resample the given buffer into _effectBuffer. + * Assumes that srcBuffer is the same format as _format. + */ + size_t ApplyResample(IAudioChannel * channel, const void * srcBuffer, sint32 srcSamples, sint32 dstSamples) + { + sint32 byteRate = _format.GetByteRate(); + + // Create resampler + SpeexResamplerState * resampler = channel->GetResampler(); + if (resampler == nullptr) + { + resampler = speex_resampler_init(_format.channels, _format.freq, _format.freq, 0, 0); + channel->SetResampler(resampler); + } + speex_resampler_set_rate(resampler, srcSamples, dstSamples); + + // Ensure destination buffer is large enough + size_t effectBufferReqLen = dstSamples * byteRate; + _effectBuffer.EnsureCapacity(effectBufferReqLen); + + uint32 inLen = srcSamples; + uint32 outLen = dstSamples; + speex_resampler_process_interleaved_int( + resampler, + (const spx_int16_t *)srcBuffer, + &inLen, + (spx_int16_t *)_effectBuffer.GetData(), + &outLen); + + return outLen * byteRate; + } + + void ApplyPan(const IAudioChannel * channel, void * buffer, size_t len, size_t sampleSize) + { + if (channel->GetPan() != 0.5f && _format.channels == 2) + { + switch (_format.format) { + case AUDIO_S16SYS: + EffectPanS16(channel, (sint16 *)buffer, (sint32)(len / sampleSize)); + break; + case AUDIO_U8: + EffectPanU8(channel, (uint8 *)buffer, (sint32)(len / sampleSize)); + break; + } + } + } + + sint32 ApplyVolume(const IAudioChannel * channel, void * buffer, size_t len) + { + float volumeAdjust = _volume; + volumeAdjust *= (gConfigSound.master_volume / 100.0f); + switch (channel->GetGroup()) { + case MIXER_GROUP_SOUND: + volumeAdjust *= _adjustSoundVolume; + + // Cap sound volume on title screen so music is more audible + if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + { + volumeAdjust = Math::Min(volumeAdjust, 0.75f); + } + break; + case MIXER_GROUP_RIDE_MUSIC: + volumeAdjust *= _adjustMusicVolume; + break; + } + + sint32 startVolume = (sint32)(channel->GetOldVolume() * volumeAdjust); + sint32 endVolume = (sint32)(channel->GetVolume() * volumeAdjust); + if (channel->IsStopping()) + { + endVolume = 0; + } + + sint32 mixVolume = (sint32)(channel->GetVolume() * volumeAdjust); + if (startVolume != endVolume) + { + // Set to max since we are adjusting the volume ourselves + mixVolume = SDL_MIX_MAXVOLUME; + + // Fade between volume levels to smooth out sound and minimize clicks from sudden volume changes + sint32 fadeLength = (sint32)len / _format.BytesPerSample(); + switch (_format.format) { + case AUDIO_S16SYS: + EffectFadeS16((sint16 *)buffer, fadeLength, startVolume, endVolume); + break; + case AUDIO_U8: + EffectFadeU8((uint8 *)buffer, fadeLength, startVolume, endVolume); + break; + } + } + return mixVolume; + } + + static void EffectPanS16(const IAudioChannel * channel, sint16 * data, sint32 length) + { + const float dt = 1.0f / (length * 2); + float volumeL = channel->GetOldVolumeL(); + float volumeR = channel->GetOldVolumeR(); + const float d_left = dt * (channel->GetVolumeL() - channel->GetOldVolumeL()); + const float d_right = dt * (channel->GetVolumeR() - channel->GetOldVolumeR()); + + for (sint32 i = 0; i < length * 2; i += 2) + { + data[i] = (sint16)(data[i] * volumeL); + data[i + 1] = (sint16)(data[i + 1] * volumeR); + volumeL += d_left; + volumeR += d_right; + } + } + + static void EffectPanU8(const IAudioChannel * channel, uint8 * data, sint32 length) + { + float volumeL = channel->GetVolumeL(); + float volumeR = channel->GetVolumeR(); + float oldVolumeL = channel->GetOldVolumeL(); + float oldVolumeR = channel->GetOldVolumeR(); + + for (sint32 i = 0; i < length * 2; i += 2) + { + float t = (float)i / (length * 2); + data[i] = (uint8)(data[i] * ((1.0 - t) * oldVolumeL + t * volumeL)); + data[i + 1] = (uint8)(data[i + 1] * ((1.0 - t) * oldVolumeR + t * volumeR)); + } + } + + static void EffectFadeS16(sint16 * data, sint32 length, sint32 startvolume, sint32 endvolume) + { + float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; + float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; + for (sint32 i = 0; i < length; i++) + { + float t = (float)i / length; + data[i] = (sint16)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); + } + } + + static void EffectFadeU8(uint8* data, sint32 length, sint32 startvolume, sint32 endvolume) + { + float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; + float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; + for (sint32 i = 0; i < length; i++) + { + float t = (float)i / length; + data[i] = (uint8)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); + } + } + + bool Convert(SDL_AudioCVT * cvt, const void * src, size_t len) + { + // tofix: there seems to be an issue with converting audio using SDL_ConvertAudio in the callback vs preconverted, can cause pops and static depending on sample rate and channels + bool result = false; + if (len != 0 && cvt->len_mult != 0) + { + size_t reqConvertBufferCapacity = len * cvt->len_mult; + _convertBuffer.EnsureCapacity(reqConvertBufferCapacity); + Memory::Copy(_convertBuffer.GetData(), src, len); + + cvt->len = (sint32)len; + cvt->buf = (uint8 *)_convertBuffer.GetData(); + if (SDL_ConvertAudio(cvt) >= 0) + { + result = true; + } + } + return result; + } + }; +} } diff --git a/src/openrct2-ui/audio/FileAudioSource.cpp b/src/openrct2-ui/audio/FileAudioSource.cpp new file mode 100644 index 0000000000..70ce35f0d1 --- /dev/null +++ b/src/openrct2-ui/audio/FileAudioSource.cpp @@ -0,0 +1,210 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include "AudioContext.h" +#include "AudioFormat.h" + +namespace OpenRCT2 { namespace Audio +{ + /** + * An audio source where raw PCM data is streamed directly from + * a file. + */ + class FileAudioSource final : public IAudioSource + { + private: + AudioFormat _format = { 0 }; + SDL_RWops * _rw = nullptr; + uint64 _dataBegin = 0; + uint64 _dataLength = 0; + + public: + ~FileAudioSource() + { + Unload(); + } + + uint64 GetLength() override + { + return _dataLength; + } + + AudioFormat GetFormat() override + { + return _format; + } + + size_t Read(void * dst, uint64 offset, size_t len) override + { + size_t bytesRead = 0; + sint64 currentPosition = SDL_RWtell(_rw); + if (currentPosition != -1) + { + size_t bytesToRead = (size_t)Math::Min(len, _dataLength - offset); + sint64 dataOffset = _dataBegin + offset; + if (currentPosition != dataOffset) + { + sint64 newPosition = SDL_RWseek(_rw, dataOffset, SEEK_SET); + if (newPosition == -1) + { + return 0; + } + } + bytesRead = SDL_RWread(_rw, dst, 1, bytesToRead); + } + return bytesRead; + } + + bool LoadWAV(SDL_RWops * rw) + { + const uint32 DATA = 0x61746164; + const uint32 FMT = 0x20746D66; + const uint32 RIFF = 0x46464952; + const uint32 WAVE = 0x45564157; + const uint16 pcmformat = 0x0001; + + Unload(); + + if (rw == nullptr) + { + return false; + } + _rw = rw; + + uint32 chunkId = SDL_ReadLE32(rw); + if (chunkId != RIFF) + { + log_verbose("Not a WAV file"); + return false; + } + + // Read and discard chunk size + SDL_ReadLE32(rw); + uint32 chunkFormat = SDL_ReadLE32(rw); + if (chunkFormat != WAVE) + { + log_verbose("Not in WAVE format"); + return false; + } + + uint32 fmtChunkSize = FindChunk(rw, FMT); + if (!fmtChunkSize) + { + log_verbose("Could not find FMT chunk"); + return false; + } + + uint64 chunkStart = SDL_RWtell(rw); + + WaveFormat waveFormat; + SDL_RWread(rw, &waveFormat, sizeof(waveFormat), 1); + SDL_RWseek(rw, chunkStart + fmtChunkSize, RW_SEEK_SET); + if (waveFormat.encoding != pcmformat) { + log_verbose("Not in proper format"); + return false; + } + + _format.freq = waveFormat.frequency; + switch (waveFormat.bitspersample) { + case 8: + _format.format = AUDIO_U8; + break; + case 16: + _format.format = AUDIO_S16LSB; + break; + default: + log_verbose("Invalid bits per sample"); + return false; + break; + } + _format.channels = waveFormat.channels; + + uint32 dataChunkSize = FindChunk(rw, DATA); + if (dataChunkSize == 0) + { + log_verbose("Could not find DATA chunk"); + return false; + } + + _dataLength = dataChunkSize; + _dataBegin = SDL_RWtell(rw); + return true; + } + + private: + uint32 FindChunk(SDL_RWops * rw, uint32 wantedId) + { + uint32 subchunkId = SDL_ReadLE32(rw); + uint32 subchunkSize = SDL_ReadLE32(rw); + if (subchunkId == wantedId) + { + return subchunkSize; + } + const uint32 FACT = 0x74636166; + const uint32 LIST = 0x5453494c; + const uint32 BEXT = 0x74786562; + const uint32 JUNK = 0x4B4E554A; + while (subchunkId == FACT || subchunkId == LIST || subchunkId == BEXT || subchunkId == JUNK) + { + SDL_RWseek(rw, subchunkSize, RW_SEEK_CUR); + subchunkId = SDL_ReadLE32(rw); + subchunkSize = SDL_ReadLE32(rw); + if (subchunkId == wantedId) + { + return subchunkSize; + } + } + return 0; + } + + void Unload() + { + if (_rw != nullptr) + { + SDL_RWclose(_rw); + _rw = nullptr; + } + _dataBegin = 0; + _dataLength = 0; + } + }; + + IAudioSource * AudioSource::CreateStreamFromWAV(const std::string &path) + { + IAudioSource * source = nullptr; + SDL_RWops* rw = SDL_RWFromFile(path.c_str(), "rb"); + if (rw != nullptr) + { + return AudioSource::CreateStreamFromWAV(rw); + } + return source; + } + + IAudioSource * AudioSource::CreateStreamFromWAV(SDL_RWops * rw) + { + auto source = new FileAudioSource(); + if (!source->LoadWAV(rw)) + { + delete source; + source = nullptr; + } + return source; + } +} } diff --git a/src/openrct2-ui/audio/MemoryAudioSource.cpp b/src/openrct2-ui/audio/MemoryAudioSource.cpp new file mode 100644 index 0000000000..efe3d6cc3d --- /dev/null +++ b/src/openrct2-ui/audio/MemoryAudioSource.cpp @@ -0,0 +1,241 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#include +#include +#include +#include +#include +#include +#include "AudioContext.h" +#include "AudioFormat.h" + +namespace OpenRCT2 { namespace Audio +{ + /** + * An audio source where raw PCM data is initially loaded into RAM from + * a file and then streamed. + */ + class MemoryAudioSource final : public IAudioSource + { + private: + AudioFormat _format = { 0 }; + uint8 * _data = nullptr; + size_t _length = 0; + bool _isSDLWav = false; + + public: + ~MemoryAudioSource() + { + Unload(); + } + + uint64 GetLength() override + { + return _length; + } + + AudioFormat GetFormat() override + { + return _format; + } + + size_t Read(void * dst, uint64 offset, size_t len) override + { + size_t bytesToRead = 0; + if (offset < _length) + { + bytesToRead = (size_t)Math::Min(len, _length - offset); + Memory::Copy(dst, _data + offset, bytesToRead); + } + return bytesToRead; + } + + bool LoadWAV(const utf8 * path) + { + log_verbose("MemoryAudioSource::LoadWAV(%s)", path); + + Unload(); + + bool result = false; + SDL_RWops * rw = SDL_RWFromFile(path, "rb"); + if (rw != nullptr) + { + SDL_AudioSpec audiospec = { 0 }; + uint32 audioLen; + SDL_AudioSpec * spec = SDL_LoadWAV_RW(rw, false, &audiospec, &_data, &audioLen); + if (spec != nullptr) + { + _format.freq = spec->freq; + _format.format = spec->format; + _format.channels = spec->channels; + _length = audioLen; + _isSDLWav = true; + result = true; + } + else + { + log_verbose("Error loading %s, unsupported WAV format", path); + } + SDL_RWclose(rw); + } + else + { + log_verbose("Error loading %s", path); + } + return result; + } + + bool LoadCSS1(const utf8 * path, size_t index) + { + log_verbose("MemoryAudioSource::LoadCSS1(%s, %d)", path, index); + + Unload(); + + bool result = false; + SDL_RWops * rw = SDL_RWFromFile(path, "rb"); + if (rw != nullptr) + { + uint32 numSounds; + SDL_RWread(rw, &numSounds, sizeof(numSounds), 1); + if (index < numSounds) + { + SDL_RWseek(rw, index * 4, RW_SEEK_CUR); + + uint32 pcmOffset; + SDL_RWread(rw, &pcmOffset, sizeof(pcmOffset), 1); + SDL_RWseek(rw, pcmOffset, RW_SEEK_SET); + + uint32 pcmSize; + SDL_RWread(rw, &pcmSize, sizeof(pcmSize), 1); + _length = pcmSize; + + WaveFormatEx waveFormat; + SDL_RWread(rw, &waveFormat, sizeof(waveFormat), 1); + _format.freq = waveFormat.frequency; + _format.format = AUDIO_S16LSB; + _format.channels = waveFormat.channels; + + _data = new (std::nothrow) uint8[_length]; + if (_data != nullptr) + { + SDL_RWread(rw, _data, _length, 1); + result = true; + } + else + { + log_verbose("Unable to allocate data"); + } + } + SDL_RWclose(rw); + } + else + { + log_verbose("Unable to load %s", path); + } + return result; + } + + bool Convert(const AudioFormat * format) + { + if (*format != _format) + { + SDL_AudioCVT cvt; + if (SDL_BuildAudioCVT(&cvt, _format.format, _format.channels, _format.freq, format->format, format->channels, format->freq) >= 0) + { + cvt.len = (sint32)_length; + cvt.buf = new uint8[cvt.len * cvt.len_mult]; + Memory::Copy(cvt.buf, _data, _length); + if (SDL_ConvertAudio(&cvt) >= 0) + { + Unload(); + _data = cvt.buf; + _length = cvt.len_cvt; + _format = *format; + return true; + } + else + { + delete[] cvt.buf; + } + } + } + return false; + } + + private: + void Unload() + { + if (_data != nullptr) + { + if (_isSDLWav) + { + SDL_FreeWAV(_data); + } + else + { + delete[] _data; + } + _data = nullptr; + } + _isSDLWav = false; + _length = 0; + } + }; + + IAudioSource * AudioSource::CreateMemoryFromCSS1(const std::string &path, size_t index, const AudioFormat * targetFormat) + { + auto source = new MemoryAudioSource(); + if (source->LoadCSS1(path.c_str(), index)) + { + if (targetFormat != nullptr) + { + if (!source->Convert(targetFormat)) + { + delete source; + source = nullptr; + } + } + } + else + { + delete source; + source = nullptr; + } + return source; + } + + IAudioSource * AudioSource::CreateMemoryFromWAV(const std::string &path, const AudioFormat * targetFormat) + { + auto source = new MemoryAudioSource(); + if (source->LoadWAV(path.c_str())) + { + if (targetFormat != nullptr) + { + if (!source->Convert(targetFormat)) + { + SafeDelete(source); + } + } + } + else + { + delete source; + source = nullptr; + } + return source; + } +} } diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index a537a7195b..709b590cbc 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -22,7 +22,11 @@ + + + + @@ -42,6 +46,8 @@ + + diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index f8065494ba..2670be1938 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -55,6 +55,7 @@ extern "C" } using namespace OpenRCT2; +using namespace OpenRCT2::Audio; using namespace OpenRCT2::Ui; namespace OpenRCT2 @@ -66,7 +67,8 @@ namespace OpenRCT2 constexpr static uint32 UPDATE_TIME_MS = 25; // Dependencies - IUiContext * const _uiContext = nullptr; + IAudioContext * const _audioContext = nullptr; + IUiContext * const _uiContext = nullptr; // Services IPlatformEnvironment * _env = nullptr; @@ -89,8 +91,9 @@ namespace OpenRCT2 static Context * Instance; public: - Context(IUiContext * uiContext) - : _uiContext(uiContext) + Context(IAudioContext * audioContext, IUiContext * uiContext) + : _audioContext(audioContext), + _uiContext(uiContext) { Instance = this; } @@ -110,6 +113,11 @@ namespace OpenRCT2 Instance = nullptr; } + IAudioContext * GetAudioContext() override + { + return _audioContext; + } + IUiContext * GetUiContext() override { return _uiContext; @@ -556,12 +564,12 @@ namespace OpenRCT2 IContext * CreateContext() { - return new Context(nullptr); + return new Context(nullptr, nullptr); } - IContext * CreateContext(IUiContext * uiContext) + IContext * CreateContext(Audio::IAudioContext * audioContext, IUiContext * uiContext) { - return new Context(uiContext); + return new Context(audioContext, uiContext); } IContext * GetContext() diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 219a52265f..a238343370 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -57,6 +57,11 @@ enum namespace OpenRCT2 { + namespace Audio + { + interface IAudioContext; + } + namespace Ui { interface IUiContext; @@ -69,13 +74,15 @@ namespace OpenRCT2 { virtual ~IContext() = default; - virtual Ui::IUiContext * GetUiContext() abstract; + virtual Audio::IAudioContext * GetAudioContext() abstract; + virtual Ui::IUiContext * GetUiContext() abstract; + virtual sint32 RunOpenRCT2(int argc, char * * argv) abstract; virtual void Finish() abstract; }; IContext * CreateContext(); - IContext * CreateContext(Ui::IUiContext * uiContext); + IContext * CreateContext(Audio::IAudioContext * audioContext, Ui::IUiContext * uiContext); IContext * GetContext(); } diff --git a/src/openrct2/audio/AudioChannel.cpp b/src/openrct2/audio/AudioChannel.cpp deleted file mode 100644 index 1faac86448..0000000000 --- a/src/openrct2/audio/AudioChannel.cpp +++ /dev/null @@ -1,290 +0,0 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers -/***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ -#pragma endregion - -#include -#include -#include "../core/Math.hpp" -#include "AudioChannel.h" -#include "AudioSource.h" - -class AudioChannelImpl : public IAudioChannel -{ -private: - IAudioSource * _source = nullptr; - SpeexResamplerState * _resampler = nullptr; - - sint32 _group = MIXER_GROUP_SOUND; - double _rate = 0; - uint64 _offset = 0; - sint32 _loop = 0; - - sint32 _volume = 1; - float _volume_l = 0.f; - float _volume_r = 0.f; - float _oldvolume_l = 0.f; - float _oldvolume_r = 0.f; - sint32 _oldvolume = 0; - float _pan = 0; - - bool _stopping = false; - bool _done = true; - bool _deleteondone = false; - bool _deletesourceondone = false; - -public: - AudioChannelImpl() - { - SetRate(1); - SetVolume(SDL_MIX_MAXVOLUME); - SetPan(0.5f); - } - - ~AudioChannelImpl() override - { - if (_resampler != nullptr) - { - speex_resampler_destroy(_resampler); - _resampler = nullptr; - } - if (_deletesourceondone) - { - delete _source; - } - } - - IAudioSource * GetSource() const override - { - return _source; - } - - SpeexResamplerState * GetResampler() const override - { - return _resampler; - } - - void SetResampler(SpeexResamplerState * value) override - { - _resampler = value; - } - - sint32 GetGroup() const override - { - return _group; - } - - void SetGroup(sint32 group) override - { - _group = group; - } - - double GetRate() const override - { - return _rate; - } - - void SetRate(double rate) override - { - _rate = Math::Max(0.001, rate); - } - - uint64 GetOffset() const override - { - return _offset; - } - - bool SetOffset(uint64 offset) override - { - if (_source != nullptr && offset < _source->GetLength()) - { - AudioFormat format = _source->GetFormat(); - sint32 samplesize = format.channels * format.BytesPerSample(); - _offset = (offset / samplesize) * samplesize; - return true; - } - return false; - } - - virtual sint32 GetLoop() const override - { - return _loop; - } - - virtual void SetLoop(sint32 value) override - { - _loop = value; - } - - sint32 GetVolume() const override - { - return _volume; - } - - float GetVolumeL() const override - { - return _volume_l; - } - - float GetVolumeR() const override - { - return _volume_r; - } - - float GetOldVolumeL() const override - { - return _oldvolume_l; - } - - float GetOldVolumeR() const override - { - return _oldvolume_r; - } - - sint32 GetOldVolume() const override - { - return _oldvolume; - } - - void SetVolume(sint32 volume) override - { - _volume = Math::Clamp(0, volume, SDL_MIX_MAXVOLUME); - } - - float GetPan() const override - { - return _pan; - } - - void SetPan(float pan) override - { - _pan = Math::Clamp(0.0f, pan, 1.0f); - double decibels = (std::abs(_pan - 0.5) * 2.0) * 100.0; - double attenuation = pow(10, decibels / 20.0); - if (_pan <= 0.5) - { - _volume_l = 1.0; - _volume_r = (float)(1.0 / attenuation); - } - else - { - _volume_r = 1.0; - _volume_l = (float)(1.0 / attenuation); - } - } - - bool IsStopping() const override - { - return _stopping; - } - - void SetStopping(bool value) override - { - _stopping = value; - } - - bool IsDone() const override - { - return _done; - } - - void SetDone(bool value) override - { - _done = value; - } - - bool DeleteOnDone() const override - { - return _deleteondone; - } - - void SetDeleteOnDone(bool value) override - { - _deleteondone = value; - } - - void SetDeleteSourceOnDone(bool value) override - { - _deletesourceondone = value; - } - - bool IsPlaying() const override - { - return !_done; - } - - void Play(IAudioSource * source, sint32 loop) override - { - _source = source; - _loop = loop; - _offset = 0; - _done = false; - } - - void UpdateOldVolume() override - { - _oldvolume = _volume; - _oldvolume_l = _volume_l; - _oldvolume_r = _volume_r; - } - - AudioFormat GetFormat() const override - { - AudioFormat result = { 0 }; - if (_source != nullptr) - { - result = _source->GetFormat(); - } - return result; - } - - size_t Read(void * dst, size_t len) override - { - size_t bytesRead = 0; - size_t bytesToRead = len; - while (bytesToRead > 0 && !_done) - { - size_t readLen = _source->Read(dst, _offset, bytesToRead); - if (readLen > 0) - { - dst = (void *)((uintptr_t)dst + readLen); - bytesToRead -= readLen; - bytesRead += readLen; - _offset += readLen; - } - if (_offset >= _source->GetLength()) - { - if (_loop == 0) - { - _done = true; - } - else if (_loop == MIXER_LOOP_INFINITE) - { - _offset = 0; - } - else - { - _loop--; - _offset = 0; - } - } - } - return bytesRead; - } -}; - -IAudioChannel * AudioChannel::Create() -{ - return new (std::nothrow) AudioChannelImpl(); -} diff --git a/src/openrct2/audio/AudioChannel.h b/src/openrct2/audio/AudioChannel.h index b185bf1382..3c1c2ef3df 100644 --- a/src/openrct2/audio/AudioChannel.h +++ b/src/openrct2/audio/AudioChannel.h @@ -16,70 +16,70 @@ #pragma once -#include #include "../common.h" -#include "AudioFormat.h" -#include "AudioMixer.h" -interface IAudioSource; - -/** - * Represents an audio channel that represents an audio source - * and a number of properties such as volume, pan and loop information. - */ -interface IAudioChannel +namespace OpenRCT2 { namespace Audio { - virtual ~IAudioChannel() = default; + interface IAudioSource; - virtual IAudioSource * GetSource() const abstract; + /** + * Represents an audio channel that represents an audio source + * and a number of properties such as volume, pan and loop information. + */ + interface IAudioChannel + { + virtual ~IAudioChannel() = default; - virtual SpeexResamplerState * GetResampler() const abstract; - virtual void SetResampler(SpeexResamplerState * value) abstract; + virtual IAudioSource * GetSource() const abstract; - virtual sint32 GetGroup() const abstract; - virtual void SetGroup(sint32 group) abstract; + // virtual SpeexResamplerState * GetResampler() const abstract; + // virtual void SetResampler(SpeexResamplerState * value) abstract; - virtual double GetRate() const abstract; - virtual void SetRate(double rate) abstract; + virtual sint32 GetGroup() const abstract; + virtual void SetGroup(sint32 group) abstract; - virtual uint64 GetOffset() const abstract; - virtual bool SetOffset(uint64 offset) abstract; + virtual double GetRate() const abstract; + virtual void SetRate(double rate) abstract; - virtual sint32 GetLoop() const abstract; - virtual void SetLoop(sint32 value) abstract; + virtual uint64 GetOffset() const abstract; + virtual bool SetOffset(uint64 offset) abstract; - virtual sint32 GetVolume() const abstract; - virtual float GetVolumeL() const abstract; - virtual float GetVolumeR() const abstract; - virtual float GetOldVolumeL() const abstract; - virtual float GetOldVolumeR() const abstract; - virtual sint32 GetOldVolume() const abstract; - virtual void SetVolume(sint32 volume) abstract; + virtual sint32 GetLoop() const abstract; + virtual void SetLoop(sint32 value) abstract; - virtual float GetPan() const abstract; - virtual void SetPan(float pan) abstract; + virtual sint32 GetVolume() const abstract; + virtual float GetVolumeL() const abstract; + virtual float GetVolumeR() const abstract; + virtual float GetOldVolumeL() const abstract; + virtual float GetOldVolumeR() const abstract; + virtual sint32 GetOldVolume() const abstract; + virtual void SetVolume(sint32 volume) abstract; - virtual bool IsStopping() const abstract; - virtual void SetStopping(bool value) abstract; + virtual float GetPan() const abstract; + virtual void SetPan(float pan) abstract; - virtual bool IsDone() const abstract; - virtual void SetDone(bool value) abstract; + virtual bool IsStopping() const abstract; + virtual void SetStopping(bool value) abstract; - virtual bool DeleteOnDone() const abstract; - virtual void SetDeleteOnDone(bool value) abstract; + virtual bool IsDone() const abstract; + virtual void SetDone(bool value) abstract; - virtual void SetDeleteSourceOnDone(bool value) abstract; + virtual bool DeleteOnDone() const abstract; + virtual void SetDeleteOnDone(bool value) abstract; - virtual bool IsPlaying() const abstract; + virtual void SetDeleteSourceOnDone(bool value) abstract; - virtual void Play(IAudioSource * source, sint32 loop = MIXER_LOOP_NONE) abstract; - virtual void UpdateOldVolume() abstract; + virtual bool IsPlaying() const abstract; - virtual AudioFormat GetFormat() const abstract; - virtual size_t Read(void * dst, size_t len) abstract; -}; + virtual void Play(IAudioSource * source, sint32 loop = 0) abstract; + virtual void UpdateOldVolume() abstract; -namespace AudioChannel -{ - IAudioChannel * Create(); -} + // virtual AudioFormat GetFormat() const abstract; + virtual size_t Read(void * dst, size_t len) abstract; + }; + + namespace AudioChannel + { + IAudioChannel * Create(); + } +} } diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h index 3f749baf79..45f5ad10d7 100644 --- a/src/openrct2/audio/AudioContext.h +++ b/src/openrct2/audio/AudioContext.h @@ -16,6 +16,7 @@ #pragma once +#include #include "../common.h" namespace OpenRCT2 @@ -23,6 +24,8 @@ namespace OpenRCT2 namespace Audio { interface IAudioChannel; + interface IAudioMixer; + interface IAudioSource; /** * Audio services for playing music and sound effects. @@ -31,6 +34,13 @@ namespace OpenRCT2 { virtual ~IAudioContext() = default; + virtual IAudioMixer * GetMixer() abstract; + + virtual void SetOutputDevice(const char * deviceName) abstract; + + virtual IAudioSource * CreateStreamFromWAV(const std::string &path) abstract; + + virtual void StartTitleMusic() abstract; virtual IAudioChannel * PlaySound(sint32 soundId, sint32 volume, sint32 pan) abstract; @@ -48,5 +58,7 @@ namespace OpenRCT2 virtual void StopTitleMusic() abstract; virtual void StopVehicleSounds() abstract; }; + + IAudioContext * CreateAudioContext(); } } diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index 72453547ed..7fcbe7355e 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -1,549 +1,53 @@ #pragma region Copyright (c) 2014-2016 OpenRCT2 Developers /***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ #pragma endregion -#include -#include "../core/Guard.hpp" -#include "../core/Math.hpp" -#include "../core/Memory.hpp" -#include "../core/Util.hpp" +#include "../config/Config.h" +#include "../Context.h" +#include "audio.h" #include "AudioChannel.h" +#include "AudioContext.h" #include "AudioMixer.h" #include "AudioSource.h" extern "C" { - #include "../config/Config.h" - #include "../localisation/localisation.h" - #include "../OpenRCT2.h" - #include "../platform/platform.h" #include "../rct2.h" - #include "audio.h" } -IAudioMixer * gMixer; +#define SDL_MIX_MAXVOLUME 128 -struct Buffer +using namespace OpenRCT2; +using namespace OpenRCT2::Audio; + +static IAudioMixer * GetMixer() { -private: - void * _data = nullptr; - size_t _capacity = 0; - -public: - void * GetData() const { return _data; } - void * GetData() { return _data; } - size_t GetCapacity() const { return _capacity; } - - ~Buffer() - { - Free(); - } - - void Free() - { - Memory::Free(_data); - _data = nullptr; - _capacity = 0; - } - - void EnsureCapacity(size_t capacity) - { - if (_capacity < capacity) - { - _capacity = capacity; - _data = Memory::Reallocate(_data, capacity); - } - } -}; - -class AudioMixer final : public IAudioMixer -{ -private: - IAudioSource * _nullSource = nullptr; - - SDL_AudioDeviceID _deviceId = 0; - AudioFormat _format = { 0 }; - std::list _channels; - float _volume = 1.0f; - float _adjustSoundVolume = 0.0f; - float _adjustMusicVolume = 0.0f; - uint8 _settingSoundVolume = 0xFF; - uint8 _settingMusicVolume = 0xFF; - - IAudioSource * _css1Sources[SOUND_MAXID] = { nullptr }; - IAudioSource * _musicSources[PATH_ID_END] = { nullptr }; - - Buffer _channelBuffer; - Buffer _convertBuffer; - Buffer _effectBuffer; - -public: - AudioMixer() - { - _nullSource = AudioSource::CreateNull(); - } - - ~AudioMixer() - { - Close(); - delete _nullSource; - } - - void Init(const char* device) override - { - Close(); - - SDL_AudioSpec want = { 0 }; - want.freq = 44100; - want.format = AUDIO_S16SYS; - want.channels = 2; - want.samples = 1024; - want.callback = [](void * arg, uint8 * dst, sint32 length) -> void - { - auto mixer = static_cast(arg); - mixer->GetNextAudioChunk(dst, (size_t)length); - }; - want.userdata = this; - - SDL_AudioSpec have; - _deviceId = SDL_OpenAudioDevice(device, 0, &want, &have, 0); - _format.format = have.format; - _format.channels = have.channels; - _format.freq = have.freq; - - LoadAllSounds(); - - SDL_PauseAudioDevice(_deviceId, 0); - } - - void Close() override - { - // Free channels - Lock(); - for (IAudioChannel * channel : _channels) - { - delete channel; - } - _channels.clear(); - Unlock(); - - SDL_CloseAudioDevice(_deviceId); - - // Free sources - for (size_t i = 0; i < Util::CountOf(_css1Sources); i++) - { - if (_css1Sources[i] != _nullSource) - { - SafeDelete(_css1Sources[i]); - } - } - for (size_t i = 0; i < Util::CountOf(_musicSources); i++) - { - if (_musicSources[i] != _nullSource) - { - SafeDelete(_musicSources[i]); - } - } - - // Free buffers - _channelBuffer.Free(); - _convertBuffer.Free(); - _effectBuffer.Free(); - } - - void Lock() override - { - SDL_LockAudioDevice(_deviceId); - } - - void Unlock() override - { - SDL_UnlockAudioDevice(_deviceId); - } - - IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) override - { - Lock(); - IAudioChannel * channel = AudioChannel::Create(); - if (channel != nullptr) - { - channel->Play(source, loop); - channel->SetDeleteOnDone(deleteondone); - channel->SetDeleteSourceOnDone(deletesourceondone); - _channels.push_back(channel); - } - Unlock(); - return channel; - } - - void Stop(IAudioChannel * channel) override - { - Lock(); - channel->SetStopping(true); - Unlock(); - } - - bool LoadMusic(size_t pathId) override - { - bool result = false; - if (pathId < Util::CountOf(_musicSources)) - { - IAudioSource * source = _musicSources[pathId]; - if (source == nullptr) - { - const utf8 * path = get_file_path((sint32)pathId); - source = AudioSource::CreateMemoryFromWAV(path, &_format); - if (source == nullptr) - { - source = _nullSource; - } - _musicSources[pathId] = source; - } - result = source != _nullSource; - } - return result; - } - - void SetVolume(float volume) override - { - _volume = volume; - } - - IAudioSource * GetSoundSource(sint32 id) override - { - return _css1Sources[id]; - } - - IAudioSource * GetMusicSource(sint32 id) override - { - return _musicSources[id]; - } - -private: - void LoadAllSounds() - { - const utf8 * css1Path = get_file_path(PATH_ID_CSS1); - for (size_t i = 0; i < Util::CountOf(_css1Sources); i++) - { - auto source = AudioSource::CreateMemoryFromCSS1(css1Path, i, &_format); - if (source == nullptr) - { - source = _nullSource; - } - _css1Sources[i] = source; - } - } - - void GetNextAudioChunk(uint8 * dst, size_t length) - { - UpdateAdjustedSound(); - - // Zero the output buffer - Memory::Set(dst, 0, length); - - // Mix channels onto output buffer - std::list::iterator it = _channels.begin(); - while (it != _channels.end()) - { - IAudioChannel * channel = *it; - - sint32 group = channel->GetGroup(); - if (group != MIXER_GROUP_SOUND || gConfigSound.sound_enabled) - { - MixChannel(channel, dst, length); - } - if ((channel->IsDone() && channel->DeleteOnDone()) || channel->IsStopping()) - { - delete channel; - it = _channels.erase(it); - } - else - { - it++; - } - } - } - - void UpdateAdjustedSound() - { - // Did the volume level get changed? Recalculate level in this case. - if (_settingSoundVolume != gConfigSound.sound_volume) - { - _settingSoundVolume = gConfigSound.sound_volume; - _adjustSoundVolume = powf(_settingSoundVolume / 100.f, 10.f / 6.f); - } - if (_settingMusicVolume != gConfigSound.ride_music_volume) - { - _settingMusicVolume = gConfigSound.ride_music_volume; - _adjustMusicVolume = powf(_settingMusicVolume / 100.f, 10.f / 6.f); - } - } - - void MixChannel(IAudioChannel * channel, uint8 * data, size_t length) - { - sint32 byteRate = _format.GetByteRate(); - sint32 numSamples = (sint32)(length / byteRate); - double rate = 1; - if (_format.format == AUDIO_S16SYS) - { - rate = channel->GetRate(); - } - - bool mustConvert = false; - SDL_AudioCVT cvt; - cvt.len_ratio = 1; - AudioFormat streamformat = channel->GetFormat(); - if (streamformat != _format) - { - if (SDL_BuildAudioCVT(&cvt, streamformat.format, streamformat.channels, streamformat.freq, _format.format, _format.channels, _format.freq) == -1) - { - // Unable to convert channel data - return; - } - mustConvert = true; - } - - // Read raw PCM from channel - sint32 readSamples = (sint32)(numSamples * rate); - size_t readLength = (size_t)(readSamples / cvt.len_ratio) * byteRate; - _channelBuffer.EnsureCapacity(readLength); - size_t bytesRead = channel->Read(_channelBuffer.GetData(), readLength); - - // Convert data to required format if necessary - void * buffer = nullptr; - size_t bufferLen = 0; - if (mustConvert) - { - if (Convert(&cvt, _channelBuffer.GetData(), bytesRead)) - { - buffer = cvt.buf; - bufferLen = cvt.len_cvt; - } - else - { - return; - } - } - else - { - buffer = _channelBuffer.GetData(); - bufferLen = bytesRead; - } - - // Apply effects - if (rate != 1) - { - sint32 srcSamples = (sint32)(bufferLen / byteRate); - sint32 dstSamples = numSamples; - bufferLen = ApplyResample(channel, buffer, srcSamples, dstSamples); - buffer = _effectBuffer.GetData(); - } - - // Apply panning and volume - ApplyPan(channel, buffer, bufferLen, byteRate); - sint32 mixVolume = ApplyVolume(channel, buffer, bufferLen); - - // Finally mix on to destination buffer - size_t dstLength = Math::Min(length, bufferLen); - SDL_MixAudioFormat(data, (const uint8 *)buffer, _format.format, (uint32)dstLength, mixVolume); - - channel->UpdateOldVolume(); - } - - /** - * Resample the given buffer into _effectBuffer. - * Assumes that srcBuffer is the same format as _format. - */ - size_t ApplyResample(IAudioChannel * channel, const void * srcBuffer, sint32 srcSamples, sint32 dstSamples) - { - sint32 byteRate = _format.GetByteRate(); - - // Create resampler - SpeexResamplerState * resampler = channel->GetResampler(); - if (resampler == nullptr) - { - resampler = speex_resampler_init(_format.channels, _format.freq, _format.freq, 0, 0); - channel->SetResampler(resampler); - } - speex_resampler_set_rate(resampler, srcSamples, dstSamples); - - // Ensure destination buffer is large enough - size_t effectBufferReqLen = dstSamples * byteRate; - _effectBuffer.EnsureCapacity(effectBufferReqLen); - - uint32 inLen = srcSamples; - uint32 outLen = dstSamples; - speex_resampler_process_interleaved_int( - resampler, - (const spx_int16_t *)srcBuffer, - &inLen, - (spx_int16_t *)_effectBuffer.GetData(), - &outLen); - - return outLen * byteRate; - } - - void ApplyPan(const IAudioChannel * channel, void * buffer, size_t len, size_t sampleSize) - { - if (channel->GetPan() != 0.5f && _format.channels == 2) - { - switch (_format.format) { - case AUDIO_S16SYS: - EffectPanS16(channel, (sint16 *)buffer, (sint32)(len / sampleSize)); - break; - case AUDIO_U8: - EffectPanU8(channel, (uint8 *)buffer, (sint32)(len / sampleSize)); - break; - } - } - } - - sint32 ApplyVolume(const IAudioChannel * channel, void * buffer, size_t len) - { - float volumeAdjust = _volume; - volumeAdjust *= (gConfigSound.master_volume / 100.0f); - switch (channel->GetGroup()) { - case MIXER_GROUP_SOUND: - volumeAdjust *= _adjustSoundVolume; - - // Cap sound volume on title screen so music is more audible - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) - { - volumeAdjust = Math::Min(volumeAdjust, 0.75f); - } - break; - case MIXER_GROUP_RIDE_MUSIC: - volumeAdjust *= _adjustMusicVolume; - break; - } - - sint32 startVolume = (sint32)(channel->GetOldVolume() * volumeAdjust); - sint32 endVolume = (sint32)(channel->GetVolume() * volumeAdjust); - if (channel->IsStopping()) - { - endVolume = 0; - } - - sint32 mixVolume = (sint32)(channel->GetVolume() * volumeAdjust); - if (startVolume != endVolume) - { - // Set to max since we are adjusting the volume ourselves - mixVolume = SDL_MIX_MAXVOLUME; - - // Fade between volume levels to smooth out sound and minimize clicks from sudden volume changes - sint32 fadeLength = (sint32)len / _format.BytesPerSample(); - switch (_format.format) { - case AUDIO_S16SYS: - EffectFadeS16((sint16 *)buffer, fadeLength, startVolume, endVolume); - break; - case AUDIO_U8: - EffectFadeU8((uint8 *)buffer, fadeLength, startVolume, endVolume); - break; - } - } - return mixVolume; - } - - static void EffectPanS16(const IAudioChannel * channel, sint16 * data, sint32 length) - { - const float dt = 1.0f / (length * 2); - float volumeL = channel->GetOldVolumeL(); - float volumeR = channel->GetOldVolumeR(); - const float d_left = dt * (channel->GetVolumeL() - channel->GetOldVolumeL()); - const float d_right = dt * (channel->GetVolumeR() - channel->GetOldVolumeR()); - - for (sint32 i = 0; i < length * 2; i += 2) - { - data[i] = (sint16)(data[i] * volumeL); - data[i + 1] = (sint16)(data[i + 1] * volumeR); - volumeL += d_left; - volumeR += d_right; - } - } - - static void EffectPanU8(const IAudioChannel * channel, uint8 * data, sint32 length) - { - float volumeL = channel->GetVolumeL(); - float volumeR = channel->GetVolumeR(); - float oldVolumeL = channel->GetOldVolumeL(); - float oldVolumeR = channel->GetOldVolumeR(); - - for (sint32 i = 0; i < length * 2; i += 2) - { - float t = (float)i / (length * 2); - data[i] = (uint8)(data[i] * ((1.0 - t) * oldVolumeL + t * volumeL)); - data[i + 1] = (uint8)(data[i + 1] * ((1.0 - t) * oldVolumeR + t * volumeR)); - } - } - - static void EffectFadeS16(sint16 * data, sint32 length, sint32 startvolume, sint32 endvolume) - { - float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; - float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; - for (sint32 i = 0; i < length; i++) - { - float t = (float)i / length; - data[i] = (sint16)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); - } - } - - static void EffectFadeU8(uint8* data, sint32 length, sint32 startvolume, sint32 endvolume) - { - float startvolume_f = (float)startvolume / SDL_MIX_MAXVOLUME; - float endvolume_f = (float)endvolume / SDL_MIX_MAXVOLUME; - for (sint32 i = 0; i < length; i++) - { - float t = (float)i / length; - data[i] = (uint8)(data[i] * ((1 - t) * startvolume_f + t * endvolume_f)); - } - } - - bool Convert(SDL_AudioCVT * cvt, const void * src, size_t len) - { - // tofix: there seems to be an issue with converting audio using SDL_ConvertAudio in the callback vs preconverted, can cause pops and static depending on sample rate and channels - bool result = false; - if (len != 0 && cvt->len_mult != 0) - { - size_t reqConvertBufferCapacity = len * cvt->len_mult; - _convertBuffer.EnsureCapacity(reqConvertBufferCapacity); - Memory::Copy(_convertBuffer.GetData(), src, len); - - cvt->len = (sint32)len; - cvt->buf = (uint8 *)_convertBuffer.GetData(); - if (SDL_ConvertAudio(cvt) >= 0) - { - result = true; - } - } - return result; - } -}; + IAudioContext * audioContext = GetContext()->GetAudioContext(); + return audioContext->GetMixer(); +} void Mixer_Init(const char * device) { - if (!gOpenRCT2Headless) - { - gMixer = new AudioMixer(); - gMixer->Init(device); - } + IAudioContext * audioContext = GetContext()->GetAudioContext(); + audioContext->SetOutputDevice(device); } void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone) { IAudioChannel * channel = nullptr; - if (!gOpenRCT2Headless && gConfigSound.sound_enabled) + if (gConfigSound.sound_enabled) { if (id >= SOUND_MAXID) { @@ -551,7 +55,7 @@ void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, doubl } else { - IAudioMixer * mixer = gMixer; + IAudioMixer * mixer = GetMixer(); mixer->Lock(); IAudioSource * source = mixer->GetSoundSource((sint32)id); channel = mixer->Play(source, loop, deleteondone != 0, false); @@ -569,131 +73,95 @@ void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, doubl void Mixer_Stop_Channel(void * channel) { - if (!gOpenRCT2Headless) - { - gMixer->Stop(static_cast(channel)); - } + GetMixer()->Stop(static_cast(channel)); } void Mixer_Channel_Volume(void * channel, sint32 volume) { - if (!gOpenRCT2Headless) - { - gMixer->Lock(); - static_cast(channel)->SetVolume(volume); - gMixer->Unlock(); - } + IAudioMixer * audioMixer = GetMixer(); + audioMixer->Lock(); + static_cast(channel)->SetVolume(volume); + audioMixer->Unlock(); } void Mixer_Channel_Pan(void * channel, float pan) { - if (!gOpenRCT2Headless) - { - gMixer->Lock(); - static_cast(channel)->SetPan(pan); - gMixer->Unlock(); - } + IAudioMixer * audioMixer = GetMixer(); + audioMixer->Lock(); + static_cast(channel)->SetPan(pan); + audioMixer->Unlock(); } void Mixer_Channel_Rate(void* channel, double rate) { - if (!gOpenRCT2Headless) - { - gMixer->Lock(); - static_cast(channel)->SetRate(rate); - gMixer->Unlock(); - } + IAudioMixer * audioMixer = GetMixer(); + audioMixer->Lock(); + static_cast(channel)->SetRate(rate); + audioMixer->Unlock(); } sint32 Mixer_Channel_IsPlaying(void * channel) { - bool isPlaying = false; - if (!gOpenRCT2Headless) - { - isPlaying = static_cast(channel)->IsPlaying(); - } - return isPlaying; + return static_cast(channel)->IsPlaying(); } uint64 Mixer_Channel_GetOffset(void * channel) { - uint64 offset = 0; - if (!gOpenRCT2Headless) - { - offset = static_cast(channel)->GetOffset(); - } - return offset; + return static_cast(channel)->GetOffset(); } sint32 Mixer_Channel_SetOffset(void * channel, uint64 offset) { - sint32 result = 0; - if (!gOpenRCT2Headless) - { - result = static_cast(channel)->SetOffset(offset); - } - return result; + return static_cast(channel)->SetOffset(offset); } void Mixer_Channel_SetGroup(void * channel, sint32 group) { - if (!gOpenRCT2Headless) - { - static_cast(channel)->SetGroup(group); - } + static_cast(channel)->SetGroup(group); } void * Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming) { IAudioChannel * channel = nullptr; - if (!gOpenRCT2Headless) + IAudioMixer * mixer = GetMixer(); + if (streaming) { - IAudioMixer * mixer = gMixer; - if (streaming) - { - const utf8 * filename = get_file_path(pathId); + const utf8 * path = get_file_path(pathId); - SDL_RWops* rw = SDL_RWFromFile(filename, "rb"); - if (rw != nullptr) + IAudioContext * audioContext = GetContext()->GetAudioContext(); + IAudioSource * source = audioContext->CreateStreamFromWAV(path); + if (source != nullptr) + { + channel = mixer->Play(source, loop, false, true); + if (channel == nullptr) { - auto source = AudioSource::CreateStreamFromWAV(rw); - if (source != nullptr) - { - channel = mixer->Play(source, loop, false, true); - if (channel == nullptr) - { - delete source; - } - } + delete source; } } - else + } + else + { + if (mixer->LoadMusic(pathId)) { - if (mixer->LoadMusic(pathId)) - { - IAudioSource * source = mixer->GetMusicSource(pathId); - channel = mixer->Play(source, MIXER_LOOP_INFINITE, false, false); - } - } - if (channel != nullptr) - { - channel->SetGroup(MIXER_GROUP_RIDE_MUSIC); + IAudioSource * source = mixer->GetMusicSource(pathId); + channel = mixer->Play(source, MIXER_LOOP_INFINITE, false, false); } } + if (channel != nullptr) + { + channel->SetGroup(MIXER_GROUP_RIDE_MUSIC); + } return channel; } void Mixer_SetVolume(float volume) { - if (!gOpenRCT2Headless) - { - gMixer->SetVolume(volume); - } + GetMixer()->SetVolume(volume); } sint32 DStoMixerVolume(sint32 volume) { - return (sint32)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); + return (sint32)(SDL_MIX_MAXVOLUME * (std::pow(10.0f, (float)volume / 2000))); } float DStoMixerPan(sint32 pan) @@ -705,4 +173,3 @@ double DStoMixerRate(sint32 frequency) { return (double)frequency / 22050; } - diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index 085e911795..51c65d3db3 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -14,8 +14,7 @@ *****************************************************************************/ #pragma endregion -#ifndef _MIXER_H_ -#define _MIXER_H_ +#pragma once #include "../common.h" @@ -31,59 +30,61 @@ enum MIXER_GROUP #ifdef __cplusplus -interface IAudioSource; -interface IAudioChannel; - -/** - * Provides an audio stream by mixing multiple audio channels together. - */ -interface IAudioMixer +namespace OpenRCT2 { namespace Audio { - virtual ~IAudioMixer() = default; + interface IAudioSource; + interface IAudioChannel; - virtual void Init(const char * device) abstract; - virtual void Close() abstract; - virtual void Lock() abstract; - virtual void Unlock() abstract; - virtual IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) abstract; - virtual void Stop(IAudioChannel * channel) abstract; - virtual bool LoadMusic(size_t pathid) abstract; - virtual void SetVolume(float volume) abstract; + /** + * Provides an audio stream by mixing multiple audio channels together. + */ + interface IAudioMixer + { + virtual ~IAudioMixer() = default; - virtual IAudioSource * GetSoundSource(sint32 id) abstract; - virtual IAudioSource * GetMusicSource(sint32 id) abstract; -}; + virtual void Init(const char * device) abstract; + virtual void Close() abstract; + virtual void Lock() abstract; + virtual void Unlock() abstract; + virtual IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) abstract; + virtual void Stop(IAudioChannel * channel) abstract; + virtual bool LoadMusic(size_t pathid) abstract; + virtual void SetVolume(float volume) abstract; + virtual IAudioSource * GetSoundSource(sint32 id) abstract; + virtual IAudioSource * GetMusicSource(sint32 id) abstract; + }; +} } + +#endif + +#ifdef __cplusplus extern "C" { #endif + #ifndef DSBPAN_LEFT + #define DSBPAN_LEFT -10000 + #endif + #ifndef DSBPAN_RIGHT + #define DSBPAN_RIGHT 10000 + #endif -#ifndef DSBPAN_LEFT -#define DSBPAN_LEFT -10000 -#endif -#ifndef DSBPAN_RIGHT -#define DSBPAN_RIGHT 10000 -#endif - -void Mixer_Init(const char* device); -void* Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone); -void Mixer_Stop_Channel(void* channel); -void Mixer_Channel_Volume(void* channel, sint32 volume); -void Mixer_Channel_Pan(void* channel, float pan); -void Mixer_Channel_Rate(void* channel, double rate); -sint32 Mixer_Channel_IsPlaying(void* channel); -uint64 Mixer_Channel_GetOffset(void* channel); -sint32 Mixer_Channel_SetOffset(void* channel, uint64 offset); -void Mixer_Channel_SetGroup(void* channel, sint32 group); -void* Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming); -void Mixer_SetVolume(float volume); - -sint32 DStoMixerVolume(sint32 volume); -float DStoMixerPan(sint32 pan); -double DStoMixerRate(sint32 frequency); + void Mixer_Init(const char * device); + void* Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone); + void Mixer_Stop_Channel(void* channel); + void Mixer_Channel_Volume(void* channel, sint32 volume); + void Mixer_Channel_Pan(void* channel, float pan); + void Mixer_Channel_Rate(void* channel, double rate); + sint32 Mixer_Channel_IsPlaying(void* channel); + uint64 Mixer_Channel_GetOffset(void* channel); + sint32 Mixer_Channel_SetOffset(void* channel, uint64 offset); + void Mixer_Channel_SetGroup(void* channel, sint32 group); + void* Mixer_Play_Music(sint32 pathId, sint32 loop, sint32 streaming); + void Mixer_SetVolume(float volume); + sint32 DStoMixerVolume(sint32 volume); + float DStoMixerPan(sint32 pan); + double DStoMixerRate(sint32 frequency); #ifdef __cplusplus } #endif - -#endif diff --git a/src/openrct2/audio/AudioSource.h b/src/openrct2/audio/AudioSource.h index 879424507f..3cdcb193df 100644 --- a/src/openrct2/audio/AudioSource.h +++ b/src/openrct2/audio/AudioSource.h @@ -17,25 +17,24 @@ #pragma once #include "../common.h" -#include "AudioFormat.h" #include "AudioMixer.h" -/** - * Represents a readable source of audio PCM data. - */ -interface IAudioSource +namespace OpenRCT2 { namespace Audio { - virtual ~IAudioSource() = default; + /** + * Represents a readable source of audio PCM data. + */ + interface IAudioSource + { + virtual ~IAudioSource() = default; - virtual uint64 GetLength() abstract; - virtual AudioFormat GetFormat() abstract; - virtual size_t Read(void * dst, uint64 offset, size_t len) abstract; -}; + virtual uint64 GetLength() abstract; + // virtual AudioFormat GetFormat() abstract; + virtual size_t Read(void * dst, uint64 offset, size_t len) abstract; + }; -namespace AudioSource -{ - IAudioSource * CreateNull(); - IAudioSource * CreateMemoryFromCSS1(const utf8 * path, size_t index, const AudioFormat * targetFormat = nullptr); - IAudioSource * CreateMemoryFromWAV(const utf8 * path, const AudioFormat * targetFormat = nullptr); - IAudioSource * CreateStreamFromWAV(SDL_RWops * rw); -} + namespace AudioSource + { + IAudioSource * CreateNull(); + } +} } diff --git a/src/openrct2/audio/FileAudioSource.cpp b/src/openrct2/audio/FileAudioSource.cpp deleted file mode 100644 index 5441fe063f..0000000000 --- a/src/openrct2/audio/FileAudioSource.cpp +++ /dev/null @@ -1,204 +0,0 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers -/***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ -#pragma endregion - -#include "../core/Math.hpp" -#include "AudioSource.h" - -#pragma pack(push, 1) - struct WaveFormat - { - uint16 encoding; - uint16 channels; - uint32 frequency; - uint32 byterate; - uint16 blockalign; - uint16 bitspersample; - }; - assert_struct_size(WaveFormat, 16); -#pragma pack(pop) - -/** - * An audio source where raw PCM data is streamed directly from - * a file. - */ -class FileAudioSource final : public IAudioSource -{ -private: - AudioFormat _format = { 0 }; - SDL_RWops * _rw = nullptr; - uint64 _dataBegin = 0; - uint64 _dataLength = 0; - -public: - ~FileAudioSource() - { - Unload(); - } - - uint64 GetLength() override - { - return _dataLength; - } - - AudioFormat GetFormat() override - { - return _format; - } - - size_t Read(void * dst, uint64 offset, size_t len) override - { - size_t bytesRead = 0; - sint64 currentPosition = SDL_RWtell(_rw); - if (currentPosition != -1) - { - size_t bytesToRead = (size_t)Math::Min(len, _dataLength - offset); - sint64 dataOffset = _dataBegin + offset; - if (currentPosition != dataOffset) - { - sint64 newPosition = SDL_RWseek(_rw, dataOffset, SEEK_SET); - if (newPosition == -1) - { - return 0; - } - } - bytesRead = SDL_RWread(_rw, dst, 1, bytesToRead); - } - return bytesRead; - } - - bool LoadWAV(SDL_RWops * rw) - { - const uint32 DATA = 0x61746164; - const uint32 FMT = 0x20746D66; - const uint32 RIFF = 0x46464952; - const uint32 WAVE = 0x45564157; - const uint16 pcmformat = 0x0001; - - Unload(); - - if (rw == nullptr) - { - return false; - } - _rw = rw; - - uint32 chunkId = SDL_ReadLE32(rw); - if (chunkId != RIFF) - { - log_verbose("Not a WAV file"); - return false; - } - - // Read and discard chunk size - SDL_ReadLE32(rw); - uint32 chunkFormat = SDL_ReadLE32(rw); - if (chunkFormat != WAVE) - { - log_verbose("Not in WAVE format"); - return false; - } - - uint32 fmtChunkSize = FindChunk(rw, FMT); - if (!fmtChunkSize) - { - log_verbose("Could not find FMT chunk"); - return false; - } - - uint64 chunkStart = SDL_RWtell(rw); - - WaveFormat waveFormat; - SDL_RWread(rw, &waveFormat, sizeof(waveFormat), 1); - SDL_RWseek(rw, chunkStart + fmtChunkSize, RW_SEEK_SET); - if (waveFormat.encoding != pcmformat) { - log_verbose("Not in proper format"); - return false; - } - - _format.freq = waveFormat.frequency; - switch (waveFormat.bitspersample) { - case 8: - _format.format = AUDIO_U8; - break; - case 16: - _format.format = AUDIO_S16LSB; - break; - default: - log_verbose("Invalid bits per sample"); - return false; - break; - } - _format.channels = waveFormat.channels; - - uint32 dataChunkSize = FindChunk(rw, DATA); - if (dataChunkSize == 0) - { - log_verbose("Could not find DATA chunk"); - return false; - } - - _dataLength = dataChunkSize; - _dataBegin = SDL_RWtell(rw); - return true; - } - -private: - uint32 FindChunk(SDL_RWops * rw, uint32 wantedId) - { - uint32 subchunkId = SDL_ReadLE32(rw); - uint32 subchunkSize = SDL_ReadLE32(rw); - if (subchunkId == wantedId) - { - return subchunkSize; - } - const uint32 FACT = 0x74636166; - const uint32 LIST = 0x5453494c; - const uint32 BEXT = 0x74786562; - const uint32 JUNK = 0x4B4E554A; - while (subchunkId == FACT || subchunkId == LIST || subchunkId == BEXT || subchunkId == JUNK) - { - SDL_RWseek(rw, subchunkSize, RW_SEEK_CUR); - subchunkId = SDL_ReadLE32(rw); - subchunkSize = SDL_ReadLE32(rw); - if (subchunkId == wantedId) - { - return subchunkSize; - } - } - return 0; - } - - void Unload() - { - if (_rw != nullptr) - { - SDL_RWclose(_rw); - _rw = nullptr; - } - _dataBegin = 0; - _dataLength = 0; - } -}; - -IAudioSource * AudioSource::CreateStreamFromWAV(SDL_RWops * rw) -{ - auto source = new FileAudioSource(); - if (!source->LoadWAV(rw)) - { - SafeDelete(source); - } - return source; -} diff --git a/src/openrct2/audio/MemoryAudioSource.cpp b/src/openrct2/audio/MemoryAudioSource.cpp deleted file mode 100644 index 18a2099e18..0000000000 --- a/src/openrct2/audio/MemoryAudioSource.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers -/***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ -#pragma endregion - -#include "../core/Math.hpp" -#include "../core/Memory.hpp" -#include "AudioMixer.h" -#include "AudioSource.h" - -#pragma pack(push, 1) - struct WaveFormatEx - { - uint16 encoding; - uint16 channels; - uint32 frequency; - uint32 byterate; - uint16 blockalign; - uint16 bitspersample; - uint16 extrasize; - }; - assert_struct_size(WaveFormatEx, 18); -#pragma pack(pop) - -/** - * An audio source where raw PCM data is initially loaded into RAM from - * a file and then streamed. - */ -class MemoryAudioSource final : public IAudioSource -{ -private: - AudioFormat _format = { 0 }; - uint8 * _data = nullptr; - size_t _length = 0; - bool _isSDLWav = false; - -public: - ~MemoryAudioSource() - { - Unload(); - } - - uint64 GetLength() override - { - return _length; - } - - AudioFormat GetFormat() override - { - return _format; - } - - size_t Read(void * dst, uint64 offset, size_t len) override - { - size_t bytesToRead = 0; - if (offset < _length) - { - bytesToRead = (size_t)Math::Min(len, _length - offset); - Memory::Copy(dst, _data + offset, bytesToRead); - } - return bytesToRead; - } - - bool LoadWAV(const utf8 * path) - { - log_verbose("MemoryAudioSource::LoadWAV(%s)", path); - - Unload(); - - bool result = false; - SDL_RWops * rw = SDL_RWFromFile(path, "rb"); - if (rw != nullptr) - { - SDL_AudioSpec audiospec = { 0 }; - uint32 audioLen; - SDL_AudioSpec * spec = SDL_LoadWAV_RW(rw, false, &audiospec, &_data, &audioLen); - if (spec != nullptr) - { - _format.freq = spec->freq; - _format.format = spec->format; - _format.channels = spec->channels; - _length = audioLen; - _isSDLWav = true; - result = true; - } - else - { - log_verbose("Error loading %s, unsupported WAV format", path); - } - SDL_RWclose(rw); - } - else - { - log_verbose("Error loading %s", path); - } - return result; - } - - bool LoadCSS1(const utf8 * path, size_t index) - { - log_verbose("MemoryAudioSource::LoadCSS1(%s, %d)", path, index); - - Unload(); - - bool result = false; - SDL_RWops * rw = SDL_RWFromFile(path, "rb"); - if (rw != nullptr) - { - uint32 numSounds; - SDL_RWread(rw, &numSounds, sizeof(numSounds), 1); - if (index < numSounds) - { - SDL_RWseek(rw, index * 4, RW_SEEK_CUR); - - uint32 pcmOffset; - SDL_RWread(rw, &pcmOffset, sizeof(pcmOffset), 1); - SDL_RWseek(rw, pcmOffset, RW_SEEK_SET); - - uint32 pcmSize; - SDL_RWread(rw, &pcmSize, sizeof(pcmSize), 1); - _length = pcmSize; - - WaveFormatEx waveFormat; - SDL_RWread(rw, &waveFormat, sizeof(waveFormat), 1); - _format.freq = waveFormat.frequency; - _format.format = AUDIO_S16LSB; - _format.channels = waveFormat.channels; - - _data = new (std::nothrow) uint8[_length]; - if (_data != nullptr) - { - SDL_RWread(rw, _data, _length, 1); - result = true; - } - else - { - log_verbose("Unable to allocate data"); - } - } - SDL_RWclose(rw); - } - else - { - log_verbose("Unable to load %s", path); - } - return result; - } - - bool Convert(const AudioFormat * format) - { - if (*format != _format) - { - SDL_AudioCVT cvt; - if (SDL_BuildAudioCVT(&cvt, _format.format, _format.channels, _format.freq, format->format, format->channels, format->freq) >= 0) - { - cvt.len = (sint32)_length; - cvt.buf = new uint8[cvt.len * cvt.len_mult]; - Memory::Copy(cvt.buf, _data, _length); - if (SDL_ConvertAudio(&cvt) >= 0) - { - Unload(); - _data = cvt.buf; - _length = cvt.len_cvt; - _format = *format; - return true; - } - else - { - delete[] cvt.buf; - } - } - } - return false; - } - -private: - void Unload() - { - if (_data != nullptr) - { - if (_isSDLWav) - { - SDL_FreeWAV(_data); - } - else - { - delete[] _data; - } - _data = nullptr; - } - _isSDLWav = false; - _length = 0; - } -}; - -IAudioSource * AudioSource::CreateMemoryFromCSS1(const utf8 * path, size_t index, const AudioFormat * targetFormat) -{ - auto source = new MemoryAudioSource(); - if (source->LoadCSS1(path, index)) - { - if (targetFormat != nullptr) - { - if (!source->Convert(targetFormat)) - { - SafeDelete(source); - } - } - } - else - { - SafeDelete(source); - } - return source; -} - -IAudioSource * AudioSource::CreateMemoryFromWAV(const utf8 * path, const AudioFormat * targetFormat) -{ - auto source = new MemoryAudioSource(); - if (source->LoadWAV(path)) - { - if (targetFormat != nullptr) - { - if (!source->Convert(targetFormat)) - { - SafeDelete(source); - } - } - } - else - { - SafeDelete(source); - } - return source; -} diff --git a/src/openrct2/audio/NullAudioSource.cpp b/src/openrct2/audio/NullAudioSource.cpp index 8edd5adbb4..92112459d2 100644 --- a/src/openrct2/audio/NullAudioSource.cpp +++ b/src/openrct2/audio/NullAudioSource.cpp @@ -16,29 +16,27 @@ #include "AudioSource.h" -/** - * An audio source representing silence. - */ -class NullAudioSource : public IAudioSource +namespace OpenRCT2 { namespace Audio { -public: - uint64 GetLength() override + /** + * An audio source representing silence. + */ + class NullAudioSource : public IAudioSource { - return 0; - } + public: + uint64 GetLength() override + { + return 0; + } - AudioFormat GetFormat() override + size_t Read(void * dst, uint64 offset, size_t len) override + { + return 0; + } + }; + + IAudioSource * AudioSource::CreateNull() { - return { 0 }; + return new NullAudioSource(); } - - size_t Read(void * dst, uint64 offset, size_t len) override - { - return 0; - } -}; - -IAudioSource * AudioSource::CreateNull() -{ - return new NullAudioSource(); -} +} } diff --git a/src/openrct2/audio/audio.cpp b/src/openrct2/audio/audio.cpp index 1717c6fc54..8b034aab63 100644 --- a/src/openrct2/audio/audio.cpp +++ b/src/openrct2/audio/audio.cpp @@ -318,15 +318,10 @@ void audio_stop_all_music_and_sounds() audio_stop_title_music(); audio_stop_vehicle_sounds(); audio_stop_ride_music(); - audio_stop_crowd_sound(); + peep_stop_crowd_noise(); audio_stop_rain_sound(); } -void audio_stop_crowd_sound() -{ - audio_stop_channel(&gCrowdSoundChannel); -} - void audio_stop_title_music() { audio_stop_channel(&gTitleMusicChannel); @@ -393,7 +388,7 @@ void audio_init_ride_sounds(sint32 device) void audio_close() { - audio_stop_crowd_sound(); + peep_stop_crowd_noise(); audio_stop_title_music(); audio_stop_ride_music(); audio_stop_rain_sound(); @@ -414,7 +409,7 @@ void audio_pause_sounds() gGameSoundsOff = true; audio_stop_vehicle_sounds(); audio_stop_ride_music(); - audio_stop_crowd_sound(); + peep_stop_crowd_noise(); audio_stop_rain_sound(); } diff --git a/src/openrct2/audio/audio.h b/src/openrct2/audio/audio.h index 86e3c9fcd1..0e96de0265 100644 --- a/src/openrct2/audio/audio.h +++ b/src/openrct2/audio/audio.h @@ -14,12 +14,16 @@ *****************************************************************************/ #pragma endregion -#ifndef _AUDIO_H_ -#define _AUDIO_H_ +#pragma once #include "../common.h" #include "../world/sprite.h" +#ifdef __cplusplus +extern "C" +{ +#endif + #define AUDIO_DEVICE_NAME_SIZE 256 #define AUDIO_MAX_RIDE_MUSIC 2 #define AUDIO_MAX_VEHICLE_SOUNDS 14 @@ -163,7 +167,6 @@ typedef enum RCT2_SOUND { extern audio_device *gAudioDevices; extern sint32 gAudioDeviceCount; extern sint32 gAudioCurrentDevice; -extern void *gCrowdSoundChannel; extern bool gGameSoundsOff; extern void *gRainSoundChannel; extern rct_ride_music gRideMusicList[AUDIO_MAX_RIDE_MUSIC]; @@ -247,11 +250,6 @@ void audio_quit(); */ void audio_start_title_music(); /** -* Stops the crowd sound effect from playing. -* rct2: 0x006BD07F -*/ -void audio_stop_crowd_sound(); -/** * Stops the rain sound effect from playing. */ void audio_stop_rain_sound(); @@ -283,4 +281,6 @@ void audio_unpause_sounds(); void audio_stop_all_music_and_sounds(); +#ifdef __cplusplus +} #endif diff --git a/src/openrct2/peep/peep.c b/src/openrct2/peep/peep.c index a92c51fe84..f4e9bc39a0 100644 --- a/src/openrct2/peep/peep.c +++ b/src/openrct2/peep/peep.c @@ -118,6 +118,8 @@ enum { F1EE18_RIDE_ENTRANCE = 1 << 3, }; +static void * _crowdSoundChannel = NULL; + static void sub_68F41A(rct_peep *peep, sint32 index); static void peep_update(rct_peep *peep); static sint32 peep_has_empty_container(rct_peep* peep); @@ -6888,6 +6890,14 @@ void peep_problem_warnings_update() } } +void peep_stop_crowd_noise() +{ + if (_crowdSoundChannel != NULL) { + Mixer_Stop_Channel(_crowdSoundChannel); + _crowdSoundChannel = NULL; + } +} + /** * * rct2: 0x006BD18A @@ -6938,9 +6948,9 @@ void peep_update_crowd_noise() visiblePeeps = (visiblePeeps / 2) - 6; if (visiblePeeps < 0) { // Mute crowd noise - if (gCrowdSoundChannel) { - Mixer_Stop_Channel(gCrowdSoundChannel); - gCrowdSoundChannel = 0; + if (_crowdSoundChannel != NULL) { + Mixer_Stop_Channel(_crowdSoundChannel); + _crowdSoundChannel = NULL; } } else { sint32 volume; @@ -6952,14 +6962,14 @@ void peep_update_crowd_noise() volume = (((207360000 - volume) >> viewport->zoom) - 207360000) / 65536 - 150; // Load and play crowd noise if needed and set volume - if (!gCrowdSoundChannel) { - gCrowdSoundChannel = Mixer_Play_Music(PATH_ID_CSS2, MIXER_LOOP_INFINITE, false); - if (gCrowdSoundChannel) { - Mixer_Channel_SetGroup(gCrowdSoundChannel, MIXER_GROUP_SOUND); + if (_crowdSoundChannel == NULL) { + _crowdSoundChannel = Mixer_Play_Music(PATH_ID_CSS2, MIXER_LOOP_INFINITE, false); + if (_crowdSoundChannel != NULL) { + Mixer_Channel_SetGroup(_crowdSoundChannel, MIXER_GROUP_SOUND); } } - if (gCrowdSoundChannel) { - Mixer_Channel_Volume(gCrowdSoundChannel, DStoMixerVolume(volume)); + if (_crowdSoundChannel != NULL) { + Mixer_Channel_Volume(_crowdSoundChannel, DStoMixerVolume(volume)); } } } diff --git a/src/openrct2/peep/peep.h b/src/openrct2/peep/peep.h index 44eb172549..280ec6906f 100644 --- a/src/openrct2/peep/peep.h +++ b/src/openrct2/peep/peep.h @@ -717,6 +717,7 @@ sint32 peep_get_staff_count(); sint32 peep_can_be_picked_up(rct_peep* peep); void peep_update_all(); void peep_problem_warnings_update(); +void peep_stop_crowd_noise(); void peep_update_crowd_noise(); void peep_update_days_in_queue(); void peep_applause(); diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 62ab7fcfb4..00cf819890 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -17,7 +17,6 @@ #include #include #include "../audio/audio.h" -#include "../audio/AudioMixer.h" #include "../config/Config.h" #include "../Context.h" #include "../drawing/drawing.h" From e426c70bbcd65cce177ccafe68a69258ece13e1c Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 29 Mar 2017 17:46:02 +0100 Subject: [PATCH 22/76] Get moved audio code linking --- src/openrct2-ui/audio/AudioChannel.cpp | 8 +++--- src/openrct2-ui/audio/AudioContext.cpp | 19 ++++++++++--- src/openrct2-ui/audio/AudioContext.h | 31 +++++++++++++++++++-- src/openrct2-ui/audio/AudioMixer.cpp | 29 ++++++++++--------- src/openrct2-ui/audio/FileAudioSource.cpp | 6 ++-- src/openrct2-ui/audio/MemoryAudioSource.cpp | 6 ++-- src/openrct2/audio/AudioChannel.h | 9 ------ src/openrct2/audio/AudioSource.h | 2 +- src/openrct2/audio/NullAudioSource.cpp | 2 +- 9 files changed, 72 insertions(+), 40 deletions(-) diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp index ae2037a534..f92cfab767 100644 --- a/src/openrct2-ui/audio/AudioChannel.cpp +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -26,10 +26,10 @@ namespace OpenRCT2 { namespace Audio { - class AudioChannelImpl : public IAudioChannel + class AudioChannelImpl : public ISDLAudioChannel { private: - IAudioSource * _source = nullptr; + ISDLAudioSource * _source = nullptr; SpeexResamplerState * _resampler = nullptr; sint32 _group = MIXER_GROUP_SOUND; @@ -232,7 +232,7 @@ namespace OpenRCT2 { namespace Audio void Play(IAudioSource * source, sint32 loop) override { - _source = source; + _source = static_cast(source); _loop = loop; _offset = 0; _done = false; @@ -290,7 +290,7 @@ namespace OpenRCT2 { namespace Audio } }; - IAudioChannel * AudioChannel::Create() + ISDLAudioChannel * AudioChannel::Create() { return new (std::nothrow) AudioChannelImpl(); } diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index bec4079fa6..3487732507 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -15,23 +15,34 @@ #pragma endregion #include +#include "AudioContext.h" namespace OpenRCT2 { namespace Audio { class AudioContext : public IAudioContext { + private: + IAudioMixer * _audioMixer; + public: - virtual ~AudioContext() + AudioContext() { + _audioMixer = AudioMixer::Create(); } - virtual void SetOutputDevice(const char * deviceName) override + IAudioMixer * GetMixer() override { + return _audioMixer; } - virtual IAudioSource * CreateStreamFromWAV(const std::string &path) override + void SetOutputDevice(const char * deviceName) override { - return nullptr; + _audioMixer->Init(deviceName); + } + + IAudioSource * CreateStreamFromWAV(const std::string &path) override + { + return AudioSource::CreateStreamFromWAV(path); } void StartTitleMusic() override { } diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h index b523e06edd..8f5e83bd35 100644 --- a/src/openrct2-ui/audio/AudioContext.h +++ b/src/openrct2-ui/audio/AudioContext.h @@ -3,11 +3,16 @@ #include #include +#include +#include + +struct SDL_RWops; +struct SpeexResamplerState_; +typedef struct SpeexResamplerState_ SpeexResamplerState; namespace OpenRCT2 { namespace Audio { - struct AudioFormat; - interface IAudioSource; + struct AudioFormat; #pragma pack(push, 1) struct WaveFormat @@ -34,6 +39,18 @@ namespace OpenRCT2 { namespace Audio assert_struct_size(WaveFormatEx, 18); #pragma pack(pop) + interface ISDLAudioSource : public IAudioSource + { + virtual AudioFormat GetFormat() const abstract; + }; + + interface ISDLAudioChannel : public IAudioChannel + { + virtual AudioFormat GetFormat() const abstract; + virtual SpeexResamplerState * GetResampler() const abstract; + virtual void SetResampler(SpeexResamplerState * value) abstract; + }; + namespace AudioSource { IAudioSource * CreateMemoryFromCSS1(const std::string &path, size_t index, const AudioFormat * targetFormat = nullptr); @@ -41,4 +58,14 @@ namespace OpenRCT2 { namespace Audio IAudioSource * CreateStreamFromWAV(const std::string &path); IAudioSource * CreateStreamFromWAV(SDL_RWops * rw); } + + namespace AudioChannel + { + ISDLAudioChannel * Create(); + } + + namespace AudioMixer + { + IAudioMixer * Create(); + } } } diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index 075ac6a7b4..897d83a903 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -40,7 +40,6 @@ extern "C" namespace OpenRCT2 { namespace Audio { - struct Buffer { private: @@ -74,14 +73,14 @@ namespace OpenRCT2 { namespace Audio } }; - class AudioMixer final : public IAudioMixer + class AudioMixerImpl final : public IAudioMixer { private: IAudioSource * _nullSource = nullptr; SDL_AudioDeviceID _deviceId = 0; AudioFormat _format = { 0 }; - std::list _channels; + std::list _channels; float _volume = 1.0f; float _adjustSoundVolume = 0.0f; float _adjustMusicVolume = 0.0f; @@ -96,18 +95,18 @@ namespace OpenRCT2 { namespace Audio Buffer _effectBuffer; public: - AudioMixer() + AudioMixerImpl() { _nullSource = AudioSource::CreateNull(); } - ~AudioMixer() + ~AudioMixerImpl() { Close(); delete _nullSource; } - void Init(const char* device) override + void Init(const char * device) override { Close(); @@ -118,7 +117,7 @@ namespace OpenRCT2 { namespace Audio want.samples = 1024; want.callback = [](void * arg, uint8 * dst, sint32 length) -> void { - auto mixer = static_cast(arg); + auto mixer = static_cast(arg); mixer->GetNextAudioChunk(dst, (size_t)length); }; want.userdata = this; @@ -182,7 +181,7 @@ namespace OpenRCT2 { namespace Audio IAudioChannel * Play(IAudioSource * source, sint32 loop, bool deleteondone, bool deletesourceondone) override { Lock(); - IAudioChannel * channel = AudioChannel::Create(); + ISDLAudioChannel * channel = AudioChannel::Create(); if (channel != nullptr) { channel->Play(source, loop); @@ -260,11 +259,10 @@ namespace OpenRCT2 { namespace Audio Memory::Set(dst, 0, length); // Mix channels onto output buffer - std::list::iterator it = _channels.begin(); + auto it = _channels.begin(); while (it != _channels.end()) { - IAudioChannel * channel = *it; - + auto channel = *it; sint32 group = channel->GetGroup(); if (group != MIXER_GROUP_SOUND || gConfigSound.sound_enabled) { @@ -297,7 +295,7 @@ namespace OpenRCT2 { namespace Audio } } - void MixChannel(IAudioChannel * channel, uint8 * data, size_t length) + void MixChannel(ISDLAudioChannel * channel, uint8 * data, size_t length) { sint32 byteRate = _format.GetByteRate(); sint32 numSamples = (sint32)(length / byteRate); @@ -372,7 +370,7 @@ namespace OpenRCT2 { namespace Audio * Resample the given buffer into _effectBuffer. * Assumes that srcBuffer is the same format as _format. */ - size_t ApplyResample(IAudioChannel * channel, const void * srcBuffer, sint32 srcSamples, sint32 dstSamples) + size_t ApplyResample(ISDLAudioChannel * channel, const void * srcBuffer, sint32 srcSamples, sint32 dstSamples) { sint32 byteRate = _format.GetByteRate(); @@ -536,4 +534,9 @@ namespace OpenRCT2 { namespace Audio return result; } }; + + IAudioMixer * AudioMixer::Create() + { + return new AudioMixerImpl(); + } } } diff --git a/src/openrct2-ui/audio/FileAudioSource.cpp b/src/openrct2-ui/audio/FileAudioSource.cpp index 70ce35f0d1..498e26aabd 100644 --- a/src/openrct2-ui/audio/FileAudioSource.cpp +++ b/src/openrct2-ui/audio/FileAudioSource.cpp @@ -27,7 +27,7 @@ namespace OpenRCT2 { namespace Audio * An audio source where raw PCM data is streamed directly from * a file. */ - class FileAudioSource final : public IAudioSource + class FileAudioSource final : public ISDLAudioSource { private: AudioFormat _format = { 0 }; @@ -41,12 +41,12 @@ namespace OpenRCT2 { namespace Audio Unload(); } - uint64 GetLength() override + uint64 GetLength() const override { return _dataLength; } - AudioFormat GetFormat() override + AudioFormat GetFormat() const override { return _format; } diff --git a/src/openrct2-ui/audio/MemoryAudioSource.cpp b/src/openrct2-ui/audio/MemoryAudioSource.cpp index efe3d6cc3d..2fbb152b95 100644 --- a/src/openrct2-ui/audio/MemoryAudioSource.cpp +++ b/src/openrct2-ui/audio/MemoryAudioSource.cpp @@ -29,7 +29,7 @@ namespace OpenRCT2 { namespace Audio * An audio source where raw PCM data is initially loaded into RAM from * a file and then streamed. */ - class MemoryAudioSource final : public IAudioSource + class MemoryAudioSource final : public ISDLAudioSource { private: AudioFormat _format = { 0 }; @@ -43,12 +43,12 @@ namespace OpenRCT2 { namespace Audio Unload(); } - uint64 GetLength() override + uint64 GetLength() const override { return _length; } - AudioFormat GetFormat() override + AudioFormat GetFormat() const override { return _format; } diff --git a/src/openrct2/audio/AudioChannel.h b/src/openrct2/audio/AudioChannel.h index 3c1c2ef3df..f5ed6f3998 100644 --- a/src/openrct2/audio/AudioChannel.h +++ b/src/openrct2/audio/AudioChannel.h @@ -32,9 +32,6 @@ namespace OpenRCT2 { namespace Audio virtual IAudioSource * GetSource() const abstract; - // virtual SpeexResamplerState * GetResampler() const abstract; - // virtual void SetResampler(SpeexResamplerState * value) abstract; - virtual sint32 GetGroup() const abstract; virtual void SetGroup(sint32 group) abstract; @@ -74,12 +71,6 @@ namespace OpenRCT2 { namespace Audio virtual void Play(IAudioSource * source, sint32 loop = 0) abstract; virtual void UpdateOldVolume() abstract; - // virtual AudioFormat GetFormat() const abstract; virtual size_t Read(void * dst, size_t len) abstract; }; - - namespace AudioChannel - { - IAudioChannel * Create(); - } } } diff --git a/src/openrct2/audio/AudioSource.h b/src/openrct2/audio/AudioSource.h index 3cdcb193df..52d067d0a0 100644 --- a/src/openrct2/audio/AudioSource.h +++ b/src/openrct2/audio/AudioSource.h @@ -28,7 +28,7 @@ namespace OpenRCT2 { namespace Audio { virtual ~IAudioSource() = default; - virtual uint64 GetLength() abstract; + virtual uint64 GetLength() const abstract; // virtual AudioFormat GetFormat() abstract; virtual size_t Read(void * dst, uint64 offset, size_t len) abstract; }; diff --git a/src/openrct2/audio/NullAudioSource.cpp b/src/openrct2/audio/NullAudioSource.cpp index 92112459d2..4a615ad05d 100644 --- a/src/openrct2/audio/NullAudioSource.cpp +++ b/src/openrct2/audio/NullAudioSource.cpp @@ -24,7 +24,7 @@ namespace OpenRCT2 { namespace Audio class NullAudioSource : public IAudioSource { public: - uint64 GetLength() override + uint64 GetLength() const override { return 0; } From 0440c3deeae067da54bba0c807cc0588f491d55c Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 29 Mar 2017 18:44:19 +0100 Subject: [PATCH 23/76] Clean up audio.cpp --- src/openrct2-dll/openrct2-dll.cpp | 3 +- src/openrct2-ui/UiContext.cpp | 2 +- src/openrct2-ui/audio/AudioContext.cpp | 34 +- src/openrct2-ui/audio/AudioContext.h | 5 +- src/openrct2/audio/AudioContext.h | 6 +- src/openrct2/audio/AudioMixer.cpp | 6 +- src/openrct2/audio/audio.cpp | 646 +++++++++--------- src/openrct2/audio/audio.h | 296 ++++---- src/openrct2/input.c | 4 +- src/openrct2/interface/window.c | 2 +- src/openrct2/management/news_item.c | 2 +- src/openrct2/peep/peep.c | 2 +- src/openrct2/ride/ride.h | 3 +- .../windows/editor_object_selection.c | 2 +- src/openrct2/windows/error.c | 2 +- src/openrct2/windows/new_ride.c | 2 +- src/openrct2/windows/news.c | 4 +- src/openrct2/windows/ride_construction.c | 4 +- src/openrct2/windows/scenery.c | 2 +- src/openrct2/windows/title_scenarioselect.c | 2 +- src/openrct2/windows/track_list.c | 2 +- 21 files changed, 536 insertions(+), 495 deletions(-) diff --git a/src/openrct2-dll/openrct2-dll.cpp b/src/openrct2-dll/openrct2-dll.cpp index 83ca557473..162e47d9c5 100644 --- a/src/openrct2-dll/openrct2-dll.cpp +++ b/src/openrct2-dll/openrct2-dll.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include using namespace OpenRCT2; @@ -47,7 +48,7 @@ DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) IAudioContext * audioContext = CreateAudioContext(); IUiContext * uiContext = CreateUiContext(); - IContext * context = OpenRCT2::CreateContext(audioContext, uiContext); + IContext * context = CreateContext(audioContext, uiContext); int exitCode = context->RunOpenRCT2(argc, argv); diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 021ccfe29a..caf3c2a2cc 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -89,7 +89,7 @@ public: ~UiContext() override { CloseWindow(); - SDL_Quit(); + SDL_QuitSubSystem(SDL_INIT_VIDEO); } // Window diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index 3487732507..bf66fd90d8 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -14,7 +14,11 @@ *****************************************************************************/ #pragma endregion +#include +#include #include +#include +#include "../SDLException.h" #include "AudioContext.h" namespace OpenRCT2 { namespace Audio @@ -27,17 +31,43 @@ namespace OpenRCT2 { namespace Audio public: AudioContext() { + if (SDL_Init(SDL_INIT_AUDIO) < 0) + { + SDLException::Throw("SDL_Init(SDL_INIT_AUDIO)"); + } _audioMixer = AudioMixer::Create(); } + ~AudioContext() override + { + SDL_QuitSubSystem(SDL_INIT_AUDIO); + } + IAudioMixer * GetMixer() override { return _audioMixer; } - void SetOutputDevice(const char * deviceName) override + std::vector GetOutputDevices() override { - _audioMixer->Init(deviceName); + std::vector devices; + sint32 numDevices = SDL_GetNumAudioDevices(SDL_FALSE); + for (sint32 i = 0; i < numDevices; i++) + { + std::string deviceName = String::ToStd(SDL_GetAudioDeviceName(i, SDL_FALSE)); + devices.push_back(deviceName); + } + return devices; + } + + void SetOutputDevice(const std::string &deviceName) override + { + const char * szDeviceName = nullptr; + if (!deviceName.empty()) + { + szDeviceName = deviceName.c_str(); + } + _audioMixer->Init(szDeviceName); } IAudioSource * CreateStreamFromWAV(const std::string &path) override diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h index 8f5e83bd35..38c2f917c1 100644 --- a/src/openrct2-ui/audio/AudioContext.h +++ b/src/openrct2-ui/audio/AudioContext.h @@ -12,7 +12,8 @@ typedef struct SpeexResamplerState_ SpeexResamplerState; namespace OpenRCT2 { namespace Audio { - struct AudioFormat; + struct AudioFormat; + interface IAudioContext; #pragma pack(push, 1) struct WaveFormat @@ -68,4 +69,6 @@ namespace OpenRCT2 { namespace Audio { IAudioMixer * Create(); } + + IAudioContext * CreateAudioContext(); } } diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h index 45f5ad10d7..bf13391c00 100644 --- a/src/openrct2/audio/AudioContext.h +++ b/src/openrct2/audio/AudioContext.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include "../common.h" namespace OpenRCT2 @@ -36,7 +37,8 @@ namespace OpenRCT2 virtual IAudioMixer * GetMixer() abstract; - virtual void SetOutputDevice(const char * deviceName) abstract; + virtual std::vector GetOutputDevices() abstract; + virtual void SetOutputDevice(const std::string &deviceName) abstract; virtual IAudioSource * CreateStreamFromWAV(const std::string &path) abstract; @@ -58,7 +60,5 @@ namespace OpenRCT2 virtual void StopTitleMusic() abstract; virtual void StopVehicleSounds() abstract; }; - - IAudioContext * CreateAudioContext(); } } diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index 7fcbe7355e..1a5d0b6ee3 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -41,7 +41,11 @@ static IAudioMixer * GetMixer() void Mixer_Init(const char * device) { IAudioContext * audioContext = GetContext()->GetAudioContext(); - audioContext->SetOutputDevice(device); + if (device == nullptr) + { + device = ""; + } + audioContext->SetOutputDevice(std::string(device)); } void * Mixer_Play_Effect(size_t id, sint32 loop, sint32 volume, float pan, double rate, sint32 deleteondone) diff --git a/src/openrct2/audio/audio.cpp b/src/openrct2/audio/audio.cpp index 8b034aab63..fa0f8babee 100644 --- a/src/openrct2/audio/audio.cpp +++ b/src/openrct2/audio/audio.cpp @@ -16,193 +16,197 @@ #include "../config/Config.h" #include "../Context.h" +#include "../core/Collections.hpp" #include "../core/File.h" #include "../core/FileStream.hpp" #include "../core/Memory.hpp" +#include "../core/String.hpp" #include "../core/Util.hpp" #include "../localisation/string_ids.h" #include "../OpenRCT2.h" #include "../ui/UiContext.h" +#include "audio.h" +#include "AudioContext.h" #include "AudioMixer.h" extern "C" { - #include "../interface/viewport.h" - #include "../intro.h" - #include "../localisation/language.h" - #include "../util/util.h" - #include "audio.h" + #include "../interface/viewport.h" + #include "../intro.h" + #include "../localisation/language.h" + #include "../ride/ride.h" + #include "../util/util.h" } -typedef struct rct_audio_params { - bool in_range; - sint32 volume; - sint32 pan; -} rct_audio_params; +using namespace OpenRCT2::Audio; -audio_device *gAudioDevices = NULL; -sint32 gAudioDeviceCount; -sint32 gAudioCurrentDevice = -1; -void *gCrowdSoundChannel = 0; -bool gGameSoundsOff = false; -void *gRainSoundChannel = 0; -rct_ride_music gRideMusicList[AUDIO_MAX_RIDE_MUSIC]; -rct_ride_music_params gRideMusicParamsList[6]; -rct_ride_music_params *gRideMusicParamsListEnd; -void *gTitleMusicChannel = 0; -rct_vehicle_sound gVehicleSoundList[AUDIO_MAX_VEHICLE_SOUNDS]; -rct_vehicle_sound_params gVehicleSoundParamsList[AUDIO_MAX_VEHICLE_SOUNDS]; -rct_vehicle_sound_params *gVehicleSoundParamsListEnd; -sint32 gVolumeAdjustZoom = 0; - -sint32 _volumeAdjust[SOUND_MAXID] = { - 0, // SOUND_LIFT_1 - 0, // SOUND_TRACK_FRICTION_1 - 0, // SOUND_LIFT_2 - 0, // SOUND_SCREAM_1 - 0, // SOUND_CLICK_1 - 0, // SOUND_CLICK_2 - 0, // SOUND_PLACE_ITEM - 0, // SOUND_SCREAM_2 - 0, // SOUND_SCREAM_3 - 0, // SOUND_SCREAM_4 - 0, // SOUND_SCREAM_5 - 0, // SOUND_SCREAM_6 - 0, // SOUND_LIFT_3 - -400, // SOUND_PURCHASE - 0, // SOUND_CRASH - 0, // SOUND_LAYING_OUT_WATER - 0, // SOUND_WATER_1 - 0, // SOUND_WATER_2 - 0, // SOUND_TRAIN_WHISTLE - 0, // SOUND_TRAIN_CHUGGING - -1000, // SOUND_WATER_SPLASH - 0, // SOUND_HAMMERING - -800, // SOUND_RIDE_LAUNCH_1 - -1700, // SOUND_RIDE_LAUNCH_2 - -700, // SOUND_COUGH_1 - -700, // SOUND_COUGH_2 - -700, // SOUND_COUGH_3 - -700, // SOUND_COUGH_4 - 0, // SOUND_RAIN_1 - 0, // SOUND_THUNDER_1 - 0, // SOUND_THUNDER_2 - 0, // SOUND_RAIN_2 - 0, // SOUND_RAIN_3 - 0, // SOUND_BALLOON_POP - -700, // SOUND_MECHANIC_FIX - 0, // SOUND_SCREAM_7 - -2500, // SOUND_TOILET_FLUSH original value: -1000 - 0, // SOUND_CLICK_3 - 0, // SOUND_QUACK - 0, // SOUND_NEWS_ITEM - 0, // SOUND_WINDOW_OPEN - -900, // SOUND_LAUGH_1 - -900, // SOUND_LAUGH_2 - -900, // SOUND_LAUGH_3 - 0, // SOUND_APPLAUSE - -600, // SOUND_HAUNTED_HOUSE_SCARE - -700, // SOUND_HAUNTED_HOUSE_SCREAM_1 - -700, // SOUND_HAUNTED_HOUSE_SCREAM_2 - -2550, // SOUND_48 - -2900, // SOUND_49 - 0, // SOUND_ERROR - -3400, // SOUND_51 - 0, // SOUND_LIFT_4 - 0, // SOUND_LIFT_5 - 0, // SOUND_TRACK_FRICTION_2 - 0, // SOUND_LIFT_6 - 0, // SOUND_LIFT_7 - 0, // SOUND_TRACK_FRICTION_3 - 0, // SOUND_SCREAM_8 - 0, // SOUND_TRAM - -2000, // SOUND_DOOR_OPEN - -2700, // SOUND_DOOR_CLOSE - -700 // SOUND_62 +struct AudioParams +{ + bool in_range; + sint32 volume; + sint32 pan; }; -rct_audio_params audio_get_params_from_location(sint32 soundId, const rct_xyz16 *location); -void audio_stop_channel(void **channel); +audio_device * gAudioDevices = nullptr; +sint32 gAudioDeviceCount; +sint32 gAudioCurrentDevice = -1; + +bool gGameSoundsOff = false; +sint32 gVolumeAdjustZoom = 0; + +void * gTitleMusicChannel = nullptr; +void * gRainSoundChannel = nullptr; + +rct_ride_music gRideMusicList[AUDIO_MAX_RIDE_MUSIC]; +rct_ride_music_params gRideMusicParamsList[6]; +rct_ride_music_params * gRideMusicParamsListEnd; + +rct_vehicle_sound gVehicleSoundList[AUDIO_MAX_VEHICLE_SOUNDS]; +rct_vehicle_sound_params gVehicleSoundParamsList[AUDIO_MAX_VEHICLE_SOUNDS]; +rct_vehicle_sound_params * gVehicleSoundParamsListEnd; + +static sint32 SoundVolumeAdjust[SOUND_MAXID] = +{ + 0, // SOUND_LIFT_1 + 0, // SOUND_TRACK_FRICTION_1 + 0, // SOUND_LIFT_2 + 0, // SOUND_SCREAM_1 + 0, // SOUND_CLICK_1 + 0, // SOUND_CLICK_2 + 0, // SOUND_PLACE_ITEM + 0, // SOUND_SCREAM_2 + 0, // SOUND_SCREAM_3 + 0, // SOUND_SCREAM_4 + 0, // SOUND_SCREAM_5 + 0, // SOUND_SCREAM_6 + 0, // SOUND_LIFT_3 + -400, // SOUND_PURCHASE + 0, // SOUND_CRASH + 0, // SOUND_LAYING_OUT_WATER + 0, // SOUND_WATER_1 + 0, // SOUND_WATER_2 + 0, // SOUND_TRAIN_WHISTLE + 0, // SOUND_TRAIN_CHUGGING + -1000, // SOUND_WATER_SPLASH + 0, // SOUND_HAMMERING + -800, // SOUND_RIDE_LAUNCH_1 + -1700, // SOUND_RIDE_LAUNCH_2 + -700, // SOUND_COUGH_1 + -700, // SOUND_COUGH_2 + -700, // SOUND_COUGH_3 + -700, // SOUND_COUGH_4 + 0, // SOUND_RAIN_1 + 0, // SOUND_THUNDER_1 + 0, // SOUND_THUNDER_2 + 0, // SOUND_RAIN_2 + 0, // SOUND_RAIN_3 + 0, // SOUND_BALLOON_POP + -700, // SOUND_MECHANIC_FIX + 0, // SOUND_SCREAM_7 + -2500, // SOUND_TOILET_FLUSH original value: -1000 + 0, // SOUND_CLICK_3 + 0, // SOUND_QUACK + 0, // SOUND_NEWS_ITEM + 0, // SOUND_WINDOW_OPEN + -900, // SOUND_LAUGH_1 + -900, // SOUND_LAUGH_2 + -900, // SOUND_LAUGH_3 + 0, // SOUND_APPLAUSE + -600, // SOUND_HAUNTED_HOUSE_SCARE + -700, // SOUND_HAUNTED_HOUSE_SCREAM_1 + -700, // SOUND_HAUNTED_HOUSE_SCREAM_2 + -2550, // SOUND_48 + -2900, // SOUND_49 + 0, // SOUND_ERROR + -3400, // SOUND_51 + 0, // SOUND_LIFT_4 + 0, // SOUND_LIFT_5 + 0, // SOUND_TRACK_FRICTION_2 + 0, // SOUND_LIFT_6 + 0, // SOUND_LIFT_7 + 0, // SOUND_TRACK_FRICTION_3 + 0, // SOUND_SCREAM_8 + 0, // SOUND_TRAM + -2000, // SOUND_DOOR_OPEN + -2700, // SOUND_DOOR_CLOSE + -700 // SOUND_62 +}; + +AudioParams audio_get_params_from_location(sint32 soundId, const rct_xyz16 *location); void audio_init() { - sint32 result = SDL_Init(SDL_INIT_AUDIO); - if (result < 0) { - log_error("SDL_Init %s", SDL_GetError()); - return; - } + if (str_is_null_or_empty(gConfigSound.device)) + { + Mixer_Init(NULL); + gAudioCurrentDevice = 0; + } + else + { + Mixer_Init(gConfigSound.device); - if (str_is_null_or_empty(gConfigSound.device)) { - Mixer_Init(NULL); - gAudioCurrentDevice = 0; - } else { - Mixer_Init(gConfigSound.device); - for (sint32 i = 0; i < gAudioDeviceCount; i++) { - if (strcmp(gAudioDevices[i].name, gConfigSound.device) == 0) { - gAudioCurrentDevice = i; - } - } - } -} - -void audio_quit() -{ - SDL_QuitSubSystem(SDL_INIT_AUDIO); + audio_populate_devices(); + for (sint32 i = 0; i < gAudioDeviceCount; i++) + { + if (String::Equals(gAudioDevices[i].name, gConfigSound.device)) + { + gAudioCurrentDevice = i; + } + } + } } void audio_populate_devices() { - if (gAudioDevices != NULL) - free(gAudioDevices); + if (gAudioDevices != nullptr) + { + Memory::Free(gAudioDevices); + gAudioDevices = nullptr; + } - gAudioDeviceCount = SDL_GetNumAudioDevices(SDL_FALSE); - if (gAudioDeviceCount <= 0) - return; + IAudioContext * audioContext = OpenRCT2::GetContext()->GetAudioContext(); + std::vector devices = audioContext->GetOutputDevices(); - audio_device * systemAudioDevices = Memory::AllocateArray(gAudioDeviceCount); - for (sint32 i = 0; i < gAudioDeviceCount; i++) { - const char *utf8Name = SDL_GetAudioDeviceName(i, SDL_FALSE); - if (utf8Name == NULL) - utf8Name = language_get_string(STR_OPTIONS_SOUND_VALUE_UNKNOWN); + // Replace blanks with localised unknown string + for (size_t i = 0; i < devices.size(); i++) + { + if (devices[i].empty()) + { + devices[i] = language_get_string(STR_OPTIONS_SOUND_VALUE_DEFAULT); + } + } - safe_strcpy(systemAudioDevices[i].name, utf8Name, AUDIO_DEVICE_NAME_SIZE); - } #ifndef __LINUX__ - gAudioDeviceCount++; - gAudioDevices = Memory::AllocateArray(gAudioDeviceCount); - safe_strcpy(gAudioDevices[0].name, language_get_string(STR_OPTIONS_SOUND_VALUE_DEFAULT), AUDIO_DEVICE_NAME_SIZE); - Memory::CopyArray(&gAudioDevices[1], systemAudioDevices, gAudioDeviceCount - 1); -#else - gAudioDevices = Memory::AllocateArray(gAudioDeviceCount); - Memory::CopyArray(gAudioDevices, systemAudioDevices, gAudioDeviceCount); -#endif // __LINUX__ + // The first device is always system default on Windows and macOS + std::string defaultDevice = language_get_string(STR_OPTIONS_SOUND_VALUE_DEFAULT); + devices.insert(devices.begin(), defaultDevice); +#endif - free(systemAudioDevices); -} - -sint32 audio_play_sound_panned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z) -{ - if (pan == AUDIO_PLAY_AT_LOCATION) - return audio_play_sound_at_location(soundId, x, y, z); - - return audio_play_sound(soundId, 0, pan); + gAudioDeviceCount = (sint32)devices.size(); + gAudioDevices = Memory::AllocateArray(gAudioDeviceCount); + for (sint32 i = 0; i < gAudioDeviceCount; i++) + { + auto device = &gAudioDevices[i]; + String::Set(device->name, sizeof(device->name), devices[i].c_str()); + } } sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z) { - if (gGameSoundsOff) - return 0; + if (gGameSoundsOff) + return 0; - rct_xyz16 location; - location.x = x; - location.y = y; - location.z = z; + rct_xyz16 location; + location.x = x; + location.y = y; + location.z = z; - rct_audio_params params = audio_get_params_from_location(soundId, &location); - if (!params.in_range) - return soundId; - - return audio_play_sound(soundId, params.volume, params.pan); + AudioParams params = audio_get_params_from_location(soundId, &location); + if (params.in_range) + { + soundId = audio_play_sound(soundId, params.volume, params.pan); + } + return soundId; } /** @@ -211,229 +215,249 @@ sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z * @param location The location at which the sound effect is to be played. * @return The audio parameters to be used when playing this sound effect. */ -rct_audio_params audio_get_params_from_location(sint32 soundId, const rct_xyz16 *location) +AudioParams audio_get_params_from_location(sint32 soundId, const rct_xyz16 *location) { - sint32 volumeDown = 0; - rct_audio_params params; - params.in_range = true; - params.volume = 0; - params.pan = 0; + sint32 volumeDown = 0; + AudioParams params; + params.in_range = true; + params.volume = 0; + params.pan = 0; - rct_map_element *element = map_get_surface_element_at(location->x / 32, location->y / 32); - if (element && (element->base_height * 8) - 5 > location->z) - volumeDown = 10; + rct_map_element * element = map_get_surface_element_at(location->x >> 5, location->y >> 5); + if (element && (element->base_height * 8) - 5 > location->z) + { + volumeDown = 10; + } - uint8 rotation = get_current_rotation(); - rct_xy16 pos2 = coordinate_3d_to_2d(location, rotation); - rct_window *window = gWindowNextSlot; - while (true) { - window--; - if (window < g_window_list) - break; + uint8 rotation = get_current_rotation(); + rct_xy16 pos2 = coordinate_3d_to_2d(location, rotation); + rct_window * window = gWindowNextSlot; + while (true) + { + window--; + if (window < g_window_list) + { + break; + } - rct_viewport *viewport = window->viewport; - if (!viewport || !(viewport->flags & VIEWPORT_FLAG_SOUND_ON)) - continue; + rct_viewport * viewport = window->viewport; + if (viewport != nullptr && (viewport->flags & VIEWPORT_FLAG_SOUND_ON)) + { + sint16 vy = pos2.y - viewport->view_y; + sint16 vx = pos2.x - viewport->view_x; + params.pan = viewport->x + (vx >> viewport->zoom); + params.volume = SoundVolumeAdjust[soundId] + ((-1024 * viewport->zoom - 1) << volumeDown) + 1; - sint16 vy = pos2.y - viewport->view_y; - sint16 vx = pos2.x - viewport->view_x; - params.pan = viewport->x + (vx >> viewport->zoom); - params.volume = _volumeAdjust[soundId] + ((-1024 * viewport->zoom - 1) << volumeDown) + 1; + if (vy < 0 || vy >= viewport->view_height || vx < 0 || vx >= viewport->view_width || params.volume < -10000) + { + params.in_range = false; + return params; + } + } + } - if (vy < 0 || vy >= viewport->view_height || vx < 0 || vx >= viewport->view_width || params.volume < -10000) { - params.in_range = false; - return params; - } - } - - return params; + return params; } sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan) { - if (gGameSoundsOff) - return 0; + if (gGameSoundsOff) + return 0; - sint32 mixerPan = 0; - if (pan != AUDIO_PLAY_AT_CENTRE) { - sint32 x2 = pan << 16; - uint16 screenWidth = Math::Max(64, OpenRCT2::GetContext()->GetUiContext()->GetWidth()); - mixerPan = ((x2 / screenWidth) - 0x8000) >> 4; - } + sint32 mixerPan = 0; + if (pan != AUDIO_PLAY_AT_CENTRE) + { + sint32 x2 = pan << 16; + uint16 screenWidth = Math::Max(64, OpenRCT2::GetContext()->GetUiContext()->GetWidth()); + mixerPan = ((x2 / screenWidth) - 0x8000) >> 4; + } - Mixer_Play_Effect(soundId, MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(mixerPan), 1, 1); - return 0; + Mixer_Play_Effect(soundId, MIXER_LOOP_NONE, DStoMixerVolume(volume), DStoMixerPan(mixerPan), 1, 1); + return 0; } void audio_start_title_music() { - if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != INTRO_STATE_NONE) { - audio_stop_title_music(); - return; - } + if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != INTRO_STATE_NONE) + { + audio_stop_title_music(); + return; + } - if (gTitleMusicChannel) - return; + if (gTitleMusicChannel != nullptr) + { + return; + } - sint32 pathId; - switch (gConfigSound.title_music) { - case 1: - pathId = PATH_ID_CSS50; - break; - case 2: - pathId = PATH_ID_CSS17; - break; - case 3: - if (util_rand() & 1) - pathId = PATH_ID_CSS50; - else - pathId = PATH_ID_CSS17; - break; - default: - return; - } + sint32 pathId; + switch (gConfigSound.title_music) { + case 1: + pathId = PATH_ID_CSS50; + break; + case 2: + pathId = PATH_ID_CSS17; + break; + case 3: + pathId = (util_rand() & 1) ? PATH_ID_CSS50 : + PATH_ID_CSS17; + break; + default: + return; + } - gTitleMusicChannel = Mixer_Play_Music(pathId, MIXER_LOOP_INFINITE, true); - if (gTitleMusicChannel != NULL) { - Mixer_Channel_SetGroup(gTitleMusicChannel, MIXER_GROUP_TITLE_MUSIC); - } + gTitleMusicChannel = Mixer_Play_Music(pathId, MIXER_LOOP_INFINITE, true); + if (gTitleMusicChannel != nullptr) + { + Mixer_Channel_SetGroup(gTitleMusicChannel, MIXER_GROUP_TITLE_MUSIC); + } } void audio_stop_ride_music() { - for (sint32 i = 0; i < AUDIO_MAX_RIDE_MUSIC; i++) { - rct_ride_music *rideMusic = &gRideMusicList[i]; - if (rideMusic->ride_id == (uint8)-1) - continue; - - if (rideMusic->sound_channel) - Mixer_Stop_Channel(rideMusic->sound_channel); - - rideMusic->ride_id = -1; - } + for (sint32 i = 0; i < AUDIO_MAX_RIDE_MUSIC; i++) + { + rct_ride_music * rideMusic = &gRideMusicList[i]; + if (rideMusic->ride_id != RIDE_ID_NULL) + { + rideMusic->ride_id = RIDE_ID_NULL; + if (rideMusic->sound_channel != nullptr) + { + Mixer_Stop_Channel(rideMusic->sound_channel); + } + } + } } void audio_stop_all_music_and_sounds() { - audio_stop_title_music(); - audio_stop_vehicle_sounds(); - audio_stop_ride_music(); - peep_stop_crowd_noise(); - audio_stop_rain_sound(); + audio_stop_title_music(); + audio_stop_vehicle_sounds(); + audio_stop_ride_music(); + peep_stop_crowd_noise(); + audio_stop_rain_sound(); } void audio_stop_title_music() { - audio_stop_channel(&gTitleMusicChannel); + if (gTitleMusicChannel != nullptr) + { + Mixer_Stop_Channel(gTitleMusicChannel); + gTitleMusicChannel = nullptr; + } } void audio_stop_rain_sound() { - audio_stop_channel(&gRainSoundChannel); -} - -/** -* Stops the specified audio channel from playing. -* @param channel The channel to stop. -*/ -void audio_stop_channel(void **channel) -{ - if (!*channel) - return; - - Mixer_Stop_Channel(*channel); - *channel = 0; + if (gRainSoundChannel != nullptr) + { + Mixer_Stop_Channel(gRainSoundChannel); + gRainSoundChannel = nullptr; + } } void audio_init_ride_sounds_and_info() { - sint32 deviceNum = 0; - audio_init_ride_sounds(deviceNum); + sint32 deviceNum = 0; + audio_init_ride_sounds(deviceNum); - for (size_t m = 0; m < Util::CountOf(gRideMusicInfoList); m++) { - rct_ride_music_info *rideMusicInfo = gRideMusicInfoList[m]; - const utf8 *path = get_file_path(rideMusicInfo->path_id); - if (File::Exists(path)) - { - try - { - auto fs = FileStream(path, FILE_MODE_OPEN); - uint32 head = fs.ReadValue(); - if (head == 0x78787878) { - rideMusicInfo->length = 0; - } - } - catch (const Exception &) - { - } - } - } + for (size_t m = 0; m < Util::CountOf(gRideMusicInfoList); m++) + { + rct_ride_music_info *rideMusicInfo = gRideMusicInfoList[m]; + const utf8 *path = get_file_path(rideMusicInfo->path_id); + if (File::Exists(path)) + { + try + { + auto fs = FileStream(path, FILE_MODE_OPEN); + uint32 head = fs.ReadValue(); + if (head == 0x78787878) + { + rideMusicInfo->length = 0; + } + } + catch (const Exception &) + { + } + } + } } void audio_init_ride_sounds(sint32 device) { - audio_close(); - for (sint32 i = 0; i < AUDIO_MAX_VEHICLE_SOUNDS; i++) { - rct_vehicle_sound *vehicleSound = &gVehicleSoundList[i]; - vehicleSound->id = -1; - } + audio_close(); + for (sint32 i = 0; i < AUDIO_MAX_VEHICLE_SOUNDS; i++) + { + rct_vehicle_sound * vehicleSound = &gVehicleSoundList[i]; + vehicleSound->id = 0xFFFF; + } - gAudioCurrentDevice = device; - config_save_default(); - for (sint32 i = 0; i < AUDIO_MAX_RIDE_MUSIC; i++) { - rct_ride_music *rideMusic = &gRideMusicList[i]; - rideMusic->ride_id = -1; - } + gAudioCurrentDevice = device; + config_save_default(); + for (sint32 i = 0; i < AUDIO_MAX_RIDE_MUSIC; i++) + { + rct_ride_music * rideMusic = &gRideMusicList[i]; + rideMusic->ride_id = RIDE_ID_NULL; + } } void audio_close() { - peep_stop_crowd_noise(); - audio_stop_title_music(); - audio_stop_ride_music(); - audio_stop_rain_sound(); - gAudioCurrentDevice = -1; + peep_stop_crowd_noise(); + audio_stop_title_music(); + audio_stop_ride_music(); + audio_stop_rain_sound(); + gAudioCurrentDevice = -1; } void audio_toggle_all_sounds() { - if (gGameSoundsOff) { - audio_unpause_sounds(); - } else { - audio_pause_sounds(); - } + gConfigSound.sound_enabled = !gConfigSound.sound_enabled; + if (gConfigSound.sound_enabled) + { + audio_unpause_sounds(); + } + else + { + audio_stop_title_music(); + audio_pause_sounds(); + } } void audio_pause_sounds() { - gGameSoundsOff = true; - audio_stop_vehicle_sounds(); - audio_stop_ride_music(); - peep_stop_crowd_noise(); - audio_stop_rain_sound(); + gGameSoundsOff = true; + audio_stop_vehicle_sounds(); + audio_stop_ride_music(); + peep_stop_crowd_noise(); + audio_stop_rain_sound(); } void audio_unpause_sounds() { - gGameSoundsOff = false; + gGameSoundsOff = false; } void audio_stop_vehicle_sounds() { - if (gOpenRCT2Headless || gAudioCurrentDevice == -1) - return; + if (gAudioCurrentDevice == -1) + { + return; + } - for (size_t i = 0; i < Util::CountOf(gVehicleSoundList); i++) { - rct_vehicle_sound *vehicleSound = &gVehicleSoundList[i]; - if (vehicleSound->id == 0xFFFF) - continue; - - if (vehicleSound->sound1_id != 0xFFFF) - Mixer_Stop_Channel(vehicleSound->sound1_channel); - - if (vehicleSound->sound2_id != 0xFFFF) - Mixer_Stop_Channel(vehicleSound->sound2_channel); - - vehicleSound->id = 0xFFFF; - } + for (size_t i = 0; i < Util::CountOf(gVehicleSoundList); i++) + { + rct_vehicle_sound * vehicleSound = &gVehicleSoundList[i]; + if (vehicleSound->id != 0xFFFF) + { + vehicleSound->id = 0xFFFF; + if (vehicleSound->sound1_id != 0xFFFF) + { + Mixer_Stop_Channel(vehicleSound->sound1_channel); + } + if (vehicleSound->sound2_id != 0xFFFF) + { + Mixer_Stop_Channel(vehicleSound->sound2_channel); + } + } + } } diff --git a/src/openrct2/audio/audio.h b/src/openrct2/audio/audio.h index 0e96de0265..537b33d324 100644 --- a/src/openrct2/audio/audio.h +++ b/src/openrct2/audio/audio.h @@ -17,167 +17,164 @@ #pragma once #include "../common.h" -#include "../world/sprite.h" #ifdef __cplusplus extern "C" { #endif -#define AUDIO_DEVICE_NAME_SIZE 256 -#define AUDIO_MAX_RIDE_MUSIC 2 -#define AUDIO_MAX_VEHICLE_SOUNDS 14 -#define NUM_DEFAULT_MUSIC_TRACKS 46 -#define AUDIO_PLAY_AT_CENTRE 0x8000 -#define AUDIO_PLAY_AT_LOCATION 0x8001 +#define AUDIO_DEVICE_NAME_SIZE 256 +#define AUDIO_MAX_RIDE_MUSIC 2 +#define AUDIO_MAX_VEHICLE_SOUNDS 14 +#define NUM_DEFAULT_MUSIC_TRACKS 46 +#define AUDIO_PLAY_AT_CENTRE 0x8000 +#define AUDIO_PLAY_AT_LOCATION 0x8001 -typedef struct audio_device { - char name[AUDIO_DEVICE_NAME_SIZE]; +typedef struct audio_device +{ + char name[AUDIO_DEVICE_NAME_SIZE]; } audio_device; -#pragma pack(push, 1) - -typedef struct rct_ride_music { - uint8 ride_id; - uint8 tune_id; - sint16 volume; - sint16 pan; - uint16 frequency; - void* sound_channel; +typedef struct rct_ride_music +{ + uint8 ride_id; + uint8 tune_id; + sint16 volume; + sint16 pan; + uint16 frequency; + void* sound_channel; } rct_ride_music; -#ifdef PLATFORM_32BIT -assert_struct_size(rct_ride_music, 12); -#endif -typedef struct rct_ride_music_info { - uint32 length; - uint32 offset; - uint8 path_id; - uint8 var_9; +typedef struct rct_ride_music_info +{ + uint32 length; + uint32 offset; + uint8 path_id; + uint8 var_9; } rct_ride_music_info; -assert_struct_size(rct_ride_music_info, 10); -typedef struct rct_ride_music_params { - uint8 ride_id; - uint8 tune_id; - sint32 offset; - sint16 volume; - sint16 pan; - uint16 frequency; +typedef struct rct_ride_music_params +{ + uint8 ride_id; + uint8 tune_id; + sint32 offset; + sint16 volume; + sint16 pan; + uint16 frequency; } rct_ride_music_params; -assert_struct_size(rct_ride_music_params, 12); -typedef struct rct_vehicle_sound { - uint16 id; - sint16 volume; - uint16 sound1_id; - sint16 sound1_volume; - sint16 sound1_pan; - uint16 sound1_freq; - uint16 sound2_id; - sint16 sound2_volume; - sint16 sound2_pan; - uint16 sound2_freq; - void* sound1_channel; - void* sound2_channel; +typedef struct rct_vehicle_sound +{ + uint16 id; + sint16 volume; + uint16 sound1_id; + sint16 sound1_volume; + sint16 sound1_pan; + uint16 sound1_freq; + uint16 sound2_id; + sint16 sound2_volume; + sint16 sound2_pan; + uint16 sound2_freq; + void* sound1_channel; + void* sound2_channel; } rct_vehicle_sound; -#ifdef PLATFORM_32BIT -assert_struct_size(rct_vehicle_sound, 28); -#endif -typedef struct rct_vehicle_sound_params { - uint16 id; - sint16 pan_x; - sint16 pan_y; - uint16 frequency; - sint16 volume; - uint16 var_A; +typedef struct rct_vehicle_sound_params +{ + uint16 id; + sint16 pan_x; + sint16 pan_y; + uint16 frequency; + sint16 volume; + uint16 var_A; } rct_vehicle_sound_params; -assert_struct_size(rct_vehicle_sound_params, 12); -#pragma pack(pop) - -typedef enum RCT2_SOUND { - SOUND_LIFT_1 = 0, - SOUND_TRACK_FRICTION_1 = 1, - SOUND_LIFT_2 = 2, - SOUND_SCREAM_1 = 3, - SOUND_CLICK_1 = 4, - SOUND_CLICK_2 = 5, - SOUND_PLACE_ITEM = 6, - SOUND_SCREAM_2 = 7, - SOUND_SCREAM_3 = 8, - SOUND_SCREAM_4 = 9, - SOUND_SCREAM_5 = 10, - SOUND_SCREAM_6 = 11, - SOUND_LIFT_3 = 12, - SOUND_PURCHASE = 13, - SOUND_CRASH = 14, - SOUND_LAYING_OUT_WATER = 15, - SOUND_WATER_1 = 16, - SOUND_WATER_2 = 17, - SOUND_TRAIN_WHISTLE = 18, - SOUND_TRAIN_CHUGGING = 19, - SOUND_WATER_SPLASH = 20, - SOUND_HAMMERING = 21, - SOUND_RIDE_LAUNCH_1 = 22, - SOUND_RIDE_LAUNCH_2 = 23, - SOUND_COUGH_1 = 24, - SOUND_COUGH_2 = 25, - SOUND_COUGH_3 = 26, - SOUND_COUGH_4 = 27, - SOUND_RAIN_1 = 28, - SOUND_THUNDER_1 = 29, - SOUND_THUNDER_2 = 30, - SOUND_RAIN_2 = 31, - SOUND_RAIN_3 = 32, - SOUND_BALLOON_POP = 33, - SOUND_MECHANIC_FIX = 34, - SOUND_SCREAM_7 = 35, - SOUND_TOILET_FLUSH = 36, - SOUND_CLICK_3 = 37, - SOUND_QUACK = 38, - SOUND_NEWS_ITEM = 39, - SOUND_WINDOW_OPEN = 40, - SOUND_LAUGH_1 = 41, - SOUND_LAUGH_2 = 42, - SOUND_LAUGH_3 = 43, - SOUND_APPLAUSE = 44, - SOUND_HAUNTED_HOUSE_SCARE = 45, - SOUND_HAUNTED_HOUSE_SCREAM_1 = 46, - SOUND_HAUNTED_HOUSE_SCREAM_2 = 47, - SOUND_48 = 48, - SOUND_49 = 49, - SOUND_ERROR = 50, - SOUND_51 = 51, - SOUND_LIFT_4 = 52, - SOUND_LIFT_5 = 53, - SOUND_TRACK_FRICTION_2 = 54, - SOUND_LIFT_6 = 55, - SOUND_LIFT_7 = 56, - SOUND_TRACK_FRICTION_3 = 57, - SOUND_SCREAM_8 = 58, - SOUND_TRAM = 59, - SOUND_DOOR_OPEN = 60, - SOUND_DOOR_CLOSE = 61, - SOUND_62 = 62, - SOUND_MAXID +typedef enum RCT2_SOUND +{ + SOUND_LIFT_1, + SOUND_TRACK_FRICTION_1, + SOUND_LIFT_2, + SOUND_SCREAM_1, + SOUND_CLICK_1, + SOUND_CLICK_2, + SOUND_PLACE_ITEM, + SOUND_SCREAM_2, + SOUND_SCREAM_3, + SOUND_SCREAM_4, + SOUND_SCREAM_5, + SOUND_SCREAM_6, + SOUND_LIFT_3, + SOUND_PURCHASE, + SOUND_CRASH, + SOUND_LAYING_OUT_WATER, + SOUND_WATER_1, + SOUND_WATER_2, + SOUND_TRAIN_WHISTLE, + SOUND_TRAIN_CHUGGING, + SOUND_WATER_SPLASH, + SOUND_HAMMERING, + SOUND_RIDE_LAUNCH_1, + SOUND_RIDE_LAUNCH_2, + SOUND_COUGH_1, + SOUND_COUGH_2, + SOUND_COUGH_3, + SOUND_COUGH_4, + SOUND_RAIN_1, + SOUND_THUNDER_1, + SOUND_THUNDER_2, + SOUND_RAIN_2, + SOUND_RAIN_3, + SOUND_BALLOON_POP, + SOUND_MECHANIC_FIX, + SOUND_SCREAM_7, + SOUND_TOILET_FLUSH, + SOUND_CLICK_3, + SOUND_QUACK, + SOUND_NEWS_ITEM, + SOUND_WINDOW_OPEN, + SOUND_LAUGH_1, + SOUND_LAUGH_2, + SOUND_LAUGH_3, + SOUND_APPLAUSE, + SOUND_HAUNTED_HOUSE_SCARE, + SOUND_HAUNTED_HOUSE_SCREAM_1, + SOUND_HAUNTED_HOUSE_SCREAM_2, + SOUND_48, + SOUND_49, + SOUND_ERROR, + SOUND_51, + SOUND_LIFT_4, + SOUND_LIFT_5, + SOUND_TRACK_FRICTION_2, + SOUND_LIFT_6, + SOUND_LIFT_7, + SOUND_TRACK_FRICTION_3, + SOUND_SCREAM_8, + SOUND_TRAM, + SOUND_DOOR_OPEN, + SOUND_DOOR_CLOSE, + SOUND_62, + SOUND_MAXID } RCT2_SOUND; -extern audio_device *gAudioDevices; -extern sint32 gAudioDeviceCount; -extern sint32 gAudioCurrentDevice; -extern bool gGameSoundsOff; -extern void *gRainSoundChannel; -extern rct_ride_music gRideMusicList[AUDIO_MAX_RIDE_MUSIC]; -extern rct_ride_music_info *gRideMusicInfoList[NUM_DEFAULT_MUSIC_TRACKS]; -extern rct_ride_music_params gRideMusicParamsList[6]; -extern rct_ride_music_params *gRideMusicParamsListEnd; -extern void *gTitleMusicChannel; -extern rct_vehicle_sound gVehicleSoundList[AUDIO_MAX_VEHICLE_SOUNDS]; -extern rct_vehicle_sound_params gVehicleSoundParamsList[AUDIO_MAX_VEHICLE_SOUNDS]; -extern rct_vehicle_sound_params *gVehicleSoundParamsListEnd; -extern sint32 gVolumeAdjustZoom; +extern audio_device * gAudioDevices; +extern sint32 gAudioDeviceCount; +extern sint32 gAudioCurrentDevice; + +extern bool gGameSoundsOff; +extern sint32 gVolumeAdjustZoom; + +extern void * gTitleMusicChannel; +extern void * gRainSoundChannel; + +extern rct_ride_music gRideMusicList[AUDIO_MAX_RIDE_MUSIC]; +extern rct_ride_music_info * gRideMusicInfoList[NUM_DEFAULT_MUSIC_TRACKS]; +extern rct_ride_music_params gRideMusicParamsList[6]; +extern rct_ride_music_params * gRideMusicParamsListEnd; + +extern rct_vehicle_sound gVehicleSoundList[AUDIO_MAX_VEHICLE_SOUNDS]; +extern rct_vehicle_sound_params gVehicleSoundParamsList[AUDIO_MAX_VEHICLE_SOUNDS]; +extern rct_vehicle_sound_params * gVehicleSoundParamsListEnd; /** * Deregisters the audio device. @@ -222,29 +219,10 @@ sint32 audio_play_sound(sint32 soundId, sint32 volume, sint32 pan); */ sint32 audio_play_sound_at_location(sint32 soundId, sint16 x, sint16 y, sint16 z); /** -* rct2: 0x006BB76E -* @deprecated Use audio_play_sound_at_location or audio_play_sound instead. -* Plays the specified sound effect at a location specified by the pan parameter. -* @param soundId (eax) The sound effect to play. -* @param pan (ebx) If set to AUDIO_PLAY_AT_LOCATION, play the sound at the specified location; if set to AUDIO_PLAY_AT_CENTRE, -* play the sound at the centre of the viewport; if set to anything else, use the value of pan as a relative position to the -* centre of the viewport. -* @param x (cx) The x coordinate of the location. -* @param y (dx) The y coordinate of the location. -* @param z (bp) The z coordinate of the location. -* @return 0 if the sound was not out of range; otherwise, soundId. -*/ -sint32 audio_play_sound_panned(sint32 soundId, sint32 pan, sint16 x, sint16 y, sint16 z); -/** * Populates the gAudioDevices array with the available audio devices. */ void audio_populate_devices(); /** -* Terminates the audio subsystem. -* This appears to be unused. -*/ -void audio_quit(); -/** * Starts playing the title music. * rct2: 0x006BD0F8 */ diff --git a/src/openrct2/input.c b/src/openrct2/input.c index 3a82b54037..2673b885bc 100644 --- a/src/openrct2/input.c +++ b/src/openrct2/input.c @@ -1017,7 +1017,7 @@ static void input_widget_left(sint32 x, sint32 y, rct_window *w, rct_widgetindex break; default: if (widget_is_enabled(w, widgetIndex) && !widget_is_disabled(w, widgetIndex)) { - audio_play_sound_panned(SOUND_CLICK_1, w->x + (widget->left + widget->right) / 2, 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, w->x + ((widget->left + widget->right) / 2)); // Set new cursor down widget gPressedWidget.window_classification = windowClass; @@ -1271,7 +1271,7 @@ void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetinde break; sint32 mid_point_x = (widget->left + widget->right) / 2 + w->x; - audio_play_sound_panned(5, mid_point_x, 0, 0, 0); + audio_play_sound(SOUND_CLICK_2, 0, mid_point_x); if (cursor_w_class != w->classification || cursor_w_number != w->number || widgetIndex != cursor_widgetIndex) break; diff --git a/src/openrct2/interface/window.c b/src/openrct2/interface/window.c index 75dfd10f12..97824b2a85 100644 --- a/src/openrct2/interface/window.c +++ b/src/openrct2/interface/window.c @@ -456,7 +456,7 @@ rct_window *window_create(sint32 x, sint32 y, sint32 width, sint32 height, rct_w // Play sounds and flash the window if (!(flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))){ w->flags |= WF_WHITE_BORDER_MASK; - audio_play_sound_panned(SOUND_WINDOW_OPEN, x + (width / 2), 0, 0, 0); + audio_play_sound(SOUND_WINDOW_OPEN, 0, x + (width / 2)); } w->number = 0; diff --git a/src/openrct2/management/news_item.c b/src/openrct2/management/news_item.c index 6726b2821b..85ffbec1cd 100644 --- a/src/openrct2/management/news_item.c +++ b/src/openrct2/management/news_item.c @@ -98,7 +98,7 @@ static void news_item_tick_current() // Only play news item sound when in normal playing mode if (ticks == 1 && (gScreenFlags == SCREEN_FLAGS_PLAYING)) { // Play sound - audio_play_sound_panned(SOUND_NEWS_ITEM, context_get_width() / 2, 0, 0, 0); + audio_play_sound(SOUND_NEWS_ITEM, 0, context_get_width() / 2); } } diff --git a/src/openrct2/peep/peep.c b/src/openrct2/peep/peep.c index f4e9bc39a0..22769e79bd 100644 --- a/src/openrct2/peep/peep.c +++ b/src/openrct2/peep/peep.c @@ -7008,7 +7008,7 @@ void peep_applause() } // Play applause noise - audio_play_sound_panned(SOUND_APPLAUSE, context_get_width() / 2, 0, 0, 0); + audio_play_sound(SOUND_APPLAUSE, 0, context_get_width() / 2); } /** diff --git a/src/openrct2/ride/ride.h b/src/openrct2/ride/ride.h index 8909ac1c2c..605ba53df6 100644 --- a/src/openrct2/ride/ride.h +++ b/src/openrct2/ride/ride.h @@ -900,7 +900,8 @@ typedef struct rct_ride_properties { extern const rct_ride_properties RideProperties[RIDE_TYPE_COUNT]; -#define MAX_RIDES 255 +#define MAX_RIDES 255 +#define RIDE_ID_NULL 255 #define RIDE_MODE_COUNT 37 diff --git a/src/openrct2/windows/editor_object_selection.c b/src/openrct2/windows/editor_object_selection.c index dee737a89f..ab6dd26fa3 100644 --- a/src/openrct2/windows/editor_object_selection.c +++ b/src/openrct2/windows/editor_object_selection.c @@ -1004,7 +1004,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, sint3 window_invalidate(w); const CursorState * state = context_get_cursor_state(); - audio_play_sound_panned(SOUND_CLICK_1, state->x, 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, state->x); if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { diff --git a/src/openrct2/windows/error.c b/src/openrct2/windows/error.c index cc874b8693..3c980207db 100644 --- a/src/openrct2/windows/error.c +++ b/src/openrct2/windows/error.c @@ -139,7 +139,7 @@ void window_error_open(rct_string_id title, rct_string_id message) w->widgets = window_error_widgets; w->error.var_480 = 0; if (!gDisableErrorWindowSound) { - audio_play_sound_panned(SOUND_ERROR, 0, w->x + (w->width / 2), 0, 0); + audio_play_sound(SOUND_ERROR, 0, w->x + (w->width / 2)); } } diff --git a/src/openrct2/windows/new_ride.c b/src/openrct2/windows/new_ride.c index 2fdffcd9f6..7859426b9b 100644 --- a/src/openrct2/windows/new_ride.c +++ b/src/openrct2/windows/new_ride.c @@ -695,7 +695,7 @@ static void window_new_ride_scrollmousedown(rct_window *w, sint32 scrollIndex, s _windowNewRideHighlightedItem[_windowNewRideCurrentTab] = item; w->new_ride.selected_ride_id = item.ride_type_and_entry; - audio_play_sound_panned(SOUND_CLICK_1, w->x + (w->width / 2), 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, w->x + (w->width / 2)); w->new_ride.selected_ride_countdown = 8; window_invalidate(w); } diff --git a/src/openrct2/windows/news.c b/src/openrct2/windows/news.c index ac2cd2ad3d..eca56716b5 100644 --- a/src/openrct2/windows/news.c +++ b/src/openrct2/windows/news.c @@ -145,7 +145,7 @@ static void window_news_update(rct_window *w) return; window_invalidate(w); - audio_play_sound_panned(SOUND_CLICK_2, w->x + (w->width / 2), 0, 0, 0); + audio_play_sound(SOUND_CLICK_2, 0, w->x + (w->width / 2)); j = w->news.var_480; w->news.var_480 = -1; @@ -237,7 +237,7 @@ static void window_news_scrollmousedown(rct_window *w, sint32 scrollIndex, sint3 w->news.var_482 = buttonIndex; w->news.var_484 = 4; window_invalidate(w); - audio_play_sound_panned(SOUND_CLICK_1, w->x + (w->width / 2), 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, w->x + (w->width / 2)); } } diff --git a/src/openrct2/windows/ride_construction.c b/src/openrct2/windows/ride_construction.c index 5744c192c9..ed1432499b 100644 --- a/src/openrct2/windows/ride_construction.c +++ b/src/openrct2/windows/ride_construction.c @@ -3925,7 +3925,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) zAttempts == 0 || z < 0 ) { - audio_play_sound_panned(SOUND_ERROR, state->x, x, y, z); + audio_play_sound(SOUND_ERROR, 0, state->x); w = window_find_by_class(WC_RIDE_CONSTRUCTION); if (w != NULL){ tool_set(w, WIDX_CONSTRUCT, TOOL_CROSSHAIR); @@ -3997,7 +3997,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) _currentTrackAlternative = saveCurrentTrackAlternative; _currentTrackLiftHill = saveCurrentTrackLiftHill; - audio_play_sound_panned(SOUND_ERROR, state->x, x, y, z); + audio_play_sound(SOUND_ERROR, 0, state->x); break; } else if (zAttempts >= 0) { z += 16; diff --git a/src/openrct2/windows/scenery.c b/src/openrct2/windows/scenery.c index 4969baa6c2..2e11b4094c 100644 --- a/src/openrct2/windows/scenery.c +++ b/src/openrct2/windows/scenery.c @@ -843,7 +843,7 @@ void window_scenery_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, gWindowSceneryPaintEnabled &= 0xFE; gWindowSceneryEyedropperEnabled = false; - audio_play_sound_panned(4, (w->width >> 1) + w->x, 0, 0, 0); + audio_play_sound(4, 0, w->x + (w->width / 2)); w->scenery.hover_counter = -16; gSceneryPlaceCost = MONEY32_UNDEFINED; window_invalidate(w); diff --git a/src/openrct2/windows/title_scenarioselect.c b/src/openrct2/windows/title_scenarioselect.c index f9eb5c3b48..42b95539ee 100644 --- a/src/openrct2/windows/title_scenarioselect.c +++ b/src/openrct2/windows/title_scenarioselect.c @@ -286,7 +286,7 @@ static void window_scenarioselect_scrollmousedown(rct_window *w, sint32 scrollIn case LIST_ITEM_TYPE_SCENARIO: y -= 24; if (y < 0 && !listItem->scenario.is_locked) { - audio_play_sound_panned(SOUND_CLICK_1, w->width / 2 + w->x, 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, w->x + (w->width / 2)); _callback(listItem->scenario.scenario->path); } break; diff --git a/src/openrct2/windows/track_list.c b/src/openrct2/windows/track_list.c index 4e44db18f0..89bd81afe3 100644 --- a/src/openrct2/windows/track_list.c +++ b/src/openrct2/windows/track_list.c @@ -193,7 +193,7 @@ static void window_track_list_select(rct_window *w, sint32 index) return; } - audio_play_sound_panned(SOUND_CLICK_1, w->x + (w->width / 2), 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, w->x + (w->width / 2)); if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { if (index == 0) { window_close(w); From a020a9fbef9a92674857f8d9716d6f2e6e54d0bb Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 29 Mar 2017 19:37:56 +0100 Subject: [PATCH 24/76] Fix premature deletion of platform context --- src/openrct2-ui/UiContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index caf3c2a2cc..19c9997b14 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -76,8 +76,8 @@ private: float _gestureRadius; public: - UiContext(IPlatformUiContext * platformUiContext) - : _platformUiContext(platformUiContext) + UiContext() + : _platformUiContext(CreatePlatformUiContext()) { if (SDL_Init(SDL_INIT_VIDEO) < 0) { @@ -90,6 +90,7 @@ public: { CloseWindow(); SDL_QuitSubSystem(SDL_INIT_VIDEO); + delete _platformUiContext; } // Window @@ -604,6 +605,5 @@ private: IUiContext * OpenRCT2::Ui::CreateUiContext() { - auto platformUiContext = std::unique_ptr(CreatePlatformUiContext()); - return new UiContext(platformUiContext.get()); + return new UiContext(); } From 3fcd42fe2bf547ea8495020f5786098a1627b9bf Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 1 Apr 2017 13:38:52 +0100 Subject: [PATCH 25/76] Move more window code to UiContext --- src/openrct2-ui/UiContext.Linux.cpp | 179 ++++++++++++++++++++++++++ src/openrct2-ui/UiContext.Win32.cpp | 14 +- src/openrct2-ui/UiContext.cpp | 42 +++++- src/openrct2-ui/UiContext.h | 2 + src/openrct2-ui/libopenrct2ui.vcxproj | 1 + src/openrct2/Context.cpp | 24 ++-- src/openrct2/Context.h | 2 + src/openrct2/config/Config.cpp | 13 +- src/openrct2/core/String.cpp | 24 ++++ src/openrct2/core/String.hpp | 6 +- src/openrct2/drawing/sprite.cpp | 13 +- src/openrct2/input.c | 4 +- src/openrct2/platform/Platform2.cpp | 32 +++++ src/openrct2/platform/Platform2.h | 24 ++++ src/openrct2/platform/linux.c | 92 ------------- src/openrct2/platform/platform.h | 3 - src/openrct2/platform/posix.c | 6 - src/openrct2/platform/shared.c | 1 - src/openrct2/platform/windows.c | 34 +---- src/openrct2/ui/UiContext.h | 4 + src/openrct2/windows/options.c | 2 +- 21 files changed, 357 insertions(+), 165 deletions(-) create mode 100644 src/openrct2-ui/UiContext.Linux.cpp create mode 100644 src/openrct2/platform/Platform2.cpp create mode 100644 src/openrct2/platform/Platform2.h diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp new file mode 100644 index 0000000000..a23cf050ac --- /dev/null +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -0,0 +1,179 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#ifdef __linux__ + +#include +#include +#include +#include "UiContext.h" + +namespace OpenRCT2 { namespace Ui +{ + enum class DIALOG_TYPE + { + NONE, + KDIALOG, + ZENITY, + }; + + class LinuxContext : public IPlatformUiContext + { + private: + + public: + LinuxContext() + { + } + + void SetWindowIcon(SDL_Window * window) override + { + } + + bool IsSteamOverlayAttached() override + { + // See http://syprog.blogspot.ru/2011/12/listing-loaded-shared-objects-in-linux.html + struct lmap + { + void * base_address; + char * path; + void * unused; + lmap * next; + lmap * prev; + }; + + struct dummy + { + void * pointers[3]; + dummy * ptr; + }; + + bool result = false; + void * processHandle = dlopen(nullptr, RTLD_NOW); + if (processHandle != nullptr) + { + dummy * p = ((dummy *)processHandle)->ptr; + lmap * pl = (lmap *)p->ptr; + while (pl != nullptr) + { + if (strstr(pl->path, "gameoverlayrenderer.so") != nullptr) + { + result = true; + break; + } + pl = pl->next; + } + dlclose(processHandle); + } + return result; + } + + void ShowMessageBox(SDL_Window * window, const std::string &message) override + { + log_verbose(message.c_str()); + + std::string executablePath; + DIALOG_TYPE dtype = GetDialogApp(&executablePath); + + switch (dtype) { + case DIALOG_TYPE::KDIALOG: + { + std::string cmd = String::Format("%s --title \"OpenRCT2\" --msgbox \"%s\"", executablePath.c_str(), message.c_str()); + Execute(cmd); + break; + } + case DIALOG_TYPE::ZENITY: + { + std::string cmd = String::Format("%s --title=\"OpenRCT2\" --info --text=\"%s\"", executablePath.c_str(), message.c_str()); + Execute(cmd); + break; + } + default: + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "OpenRCT2", message.c_str(), window); + break; + } + } + + private: + static DIALOG_TYPE GetDialogApp(std::string * executablePath) + { + // Prefer zenity as it offers more required features, e.g., overwrite + // confirmation and selecting only existing files + if (Execute("which zenity", executablePath) == 0) + { + return DIALOG_TYPE::ZENITY; + } + if (Execute("which kdialog", executablePath)) + { + return DIALOG_TYPE::KDIALOG; + } + return DIALOG_TYPE::NONE; + } + + static sint32 Execute(const std::string &command, std::string * output = nullptr) + { + log_verbose("executing \"%s\"...\n", command.c_str()); + FILE * fpipe = popen(command.c_str(), "r"); + if (fpipe == nullptr) + { + return -1; + } + + if (output != nullptr) + { + // Read output into buffer + std::vector outputBuffer; + char buffer[1024]; + size_t readBytes; + while ((readBytes = fread(buffer, 1, sizeof(buffer), fpipe)) > 0) + { + outputBuffer.insert(outputBuffer.begin(), buffer, buffer + readBytes); + } + + // Trim line breaks + size_t outputLength = outputBuffer.size(); + for (size_t i = outputBuffer.size() - 1; i >= 0; i--) + { + if (outputBuffer[i] == '\n') + { + outputLength = i; + } + else + { + break; + } + } + + // Convert to string + *output = std::string(outputBuffer.data(), outputLength); + } + else + { + fflush(fpipe); + } + + // Return exit code + return pclose(fpipe); + } + }; + + IPlatformUiContext * CreatePlatformUiContext() + { + return new LinuxContext(); + } +} } + +#endif // __linux__ diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 55d0a6efd7..e3f8ea942a 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -14,19 +14,20 @@ *****************************************************************************/ #pragma endregion +#ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN #include #include #include #include +#include #include "UiContext.h" // Native resource IDs #include "../../../resources/resource.h" -#ifdef __WINDOWS__ - namespace OpenRCT2 { namespace Ui { class Win32Context : public IPlatformUiContext @@ -61,6 +62,13 @@ namespace OpenRCT2 { namespace Ui return (GetModuleHandleA("GameOverlayRenderer.dll") != nullptr); } + void ShowMessageBox(SDL_Window * window, const std::string &message) override + { + HWND hwnd = GetHWND(window); + std::wstring messageW = String::ToUtf16(message); + MessageBoxW(hwnd, messageW.c_str(), L"OpenRCT2", MB_OK); + } + private: HWND GetHWND(SDL_Window * window) { @@ -96,4 +104,4 @@ namespace OpenRCT2 { namespace Ui } } } -#endif // __WINDOWS__ +#endif // _WIN32 diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 19c9997b14..1adca08a8b 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -15,13 +15,16 @@ #pragma endregion #include +#include #include #include #include #include #include #include +#include #include +#include #include #include #include "CursorRepository.h" @@ -60,6 +63,8 @@ private: SDL_Window * _window = nullptr; sint32 _width = 0; sint32 _height = 0; + uint32 _windowFlags = 0; + uint32 _windowFlagsLastCheckTick = 0; bool _resolutionsAllowAnyAspectRatio = false; std::vector _fsResolutions; @@ -147,6 +152,19 @@ public: return _fsResolutions; } + bool HasFocus() override + { + uint32 windowFlags = GetWindowFlags(); + return (windowFlags & SDL_WINDOW_INPUT_FOCUS); + } + + bool IsMinimised() override + { + uint32 windowFlags = GetWindowFlags(); + return (windowFlags & SDL_WINDOW_MINIMIZED) || + (windowFlags & SDL_WINDOW_HIDDEN); + } + bool IsSteamOverlayActive() override { return _steamOverlayActive; @@ -193,6 +211,11 @@ public: SDL_WarpMouseInWindow(nullptr, x, y); } + void SetCursorTrap(bool value) override + { + SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE); + } + // Drawing IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override { @@ -469,8 +492,8 @@ public: SDLException::Throw("SDL_CreateWindow(...)"); } - SDL_SetWindowGrab(_window, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE); SDL_SetWindowMinimumSize(_window, 720, 480); + SetCursorTrap(gConfigGeneral.trap_cursor); _platformUiContext->SetWindowIcon(_window); #ifdef __MACOSX__ macos_disallow_automatic_window_tabbing(); @@ -493,6 +516,11 @@ public: SDL_DestroyWindow(_window); } + void ShowMessageBox(const std::string &message) override + { + _platformUiContext->ShowMessageBox(_window, message); + } + private: void OnResize(sint32 width, sint32 height) { @@ -601,6 +629,18 @@ private: } return result; } + + uint32 GetWindowFlags() + { + // Don't check if window is minimised too frequently (every second is fine) + uint32 tick = Platform::GetTicks(); + if (tick > _windowFlagsLastCheckTick + 1000) + { + _windowFlags = SDL_GetWindowFlags(_window); + _windowFlagsLastCheckTick = tick; + } + return _windowFlags; + } }; IUiContext * OpenRCT2::Ui::CreateUiContext() diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index 3d46d201bc..7293491e55 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -16,6 +16,7 @@ #pragma once +#include #include struct SDL_Window; @@ -33,6 +34,7 @@ namespace OpenRCT2 virtual ~IPlatformUiContext() = default; virtual void SetWindowIcon(SDL_Window * window) abstract; virtual bool IsSteamOverlayAttached() abstract; + virtual void ShowMessageBox(SDL_Window * window, const std::string &message) abstract; }; IUiContext * CreateUiContext(); diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index 709b590cbc..37bce8edc8 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -43,6 +43,7 @@ + diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 2670be1938..c0db8be37b 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -408,24 +408,12 @@ namespace OpenRCT2 log_verbose("finish openrct2 loop"); } - bool IsMinimised() - { - // Don't check if window is minimised too frequently (every second is fine) - if (_lastTick > _isWindowMinimisedLastCheckTick + 1000) - { - uint32 windowFlags = SDL_GetWindowFlags(gWindow); - _isWindowMinimised = (windowFlags & SDL_WINDOW_MINIMIZED) || - (windowFlags & SDL_WINDOW_HIDDEN); - } - return _isWindowMinimised; - } - bool ShouldRunVariableFrame() { if (!gConfigGeneral.uncap_fps) return false; if (gGameSpeed > 4) return false; if (gOpenRCT2Headless) return false; - if (IsMinimised()) return false; + if (_uiContext->IsMinimised()) return false; return true; } @@ -682,4 +670,14 @@ extern "C" { return GetContext()->GetUiContext()->GetHeight(); } + + bool context_has_focus() + { + return GetContext()->GetUiContext()->HasFocus(); + } + + void context_set_cursor_trap(bool value) + { + GetContext()->GetUiContext()->SetCursorTrap(value); + } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index a238343370..a8baea5968 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -109,6 +109,8 @@ extern "C" sint32 context_get_resolutions(struct Resolution * * outResolutions); sint32 context_get_width(); sint32 context_get_height(); + bool context_has_focus(); + void context_set_cursor_trap(bool value); #ifdef __cplusplus } diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index c1ba09ccc5..ab7c0ba5f8 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -15,6 +15,7 @@ #pragma endregion #include +#include "../Context.h" #include "../core/Console.hpp" #include "../core/Exception.hpp" #include "../core/FileStream.hpp" @@ -25,6 +26,7 @@ #include "../interface/window.h" #include "../network/network.h" #include "../OpenRCT2.h" +#include "../ui/UiContext.h" #include "Config.h" #include "IniReader.hpp" #include "IniWriter.hpp" @@ -38,6 +40,9 @@ extern "C" #include "../scenario/scenario.h" } +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + namespace Config { #pragma region Enums @@ -688,7 +693,8 @@ extern "C" } while (1) { - platform_show_messagebox("OpenRCT2 needs files from the original RollerCoaster Tycoon 2 in order to work. Please select the directory where you installed RollerCoaster Tycoon 2."); + IUiContext * uiContext = GetContext()->GetUiContext(); + uiContext->ShowMessageBox("OpenRCT2 needs files from the original RollerCoaster Tycoon 2 in order to work. Please select the directory where you installed RollerCoaster Tycoon 2."); utf8 * installPath = platform_open_directory_browser("Please select your RCT2 directory"); if (installPath == nullptr) { @@ -703,9 +709,8 @@ extern "C" return true; } - utf8 message[MAX_PATH]; - snprintf(message, MAX_PATH, "Could not find %s" PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat at this path", installPath); - platform_show_messagebox(message); + std::string message = String::StdFormat("Could not find %s" PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat at this path", installPath); + uiContext->ShowMessageBox(message); } } return true; diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index d896b2588b..7976ae1b6f 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -47,6 +47,30 @@ namespace String return returnValue; } + std::string ToUtf8(const std::wstring &s) + { + std::string result; + utf8 * cstr = widechar_to_utf8(s.c_str()); + if (cstr != nullptr) + { + result = std::string(cstr); + } + free(cstr); + return result; + } + + std::wstring ToUtf16(const std::string &s) + { + std::wstring result; + wchar_t * wcstr = utf8_to_widechar(s.c_str()); + if (wcstr != nullptr) + { + result = std::wstring(wcstr); + } + free(wcstr); + return result; + } + bool IsNullOrEmpty(const utf8 * str) { return str == nullptr || str[0] == '\0'; diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index 6261bfa81e..a02423fc32 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -24,8 +24,10 @@ namespace String { constexpr const utf8 * Empty = ""; - std::string ToStd(const utf8 * str); - std::string StdFormat(const utf8 * format, ...); + std::string ToStd(const utf8 * str); + std::string StdFormat(const utf8 * format, ...); + std::string ToUtf8(const std::wstring &s); + std::wstring ToUtf16(const std::string &s); bool IsNullOrEmpty(const utf8 * str); sint32 Compare(const std::string &a, const std::string &b, bool ignoreCase = false); diff --git a/src/openrct2/drawing/sprite.cpp b/src/openrct2/drawing/sprite.cpp index 9add114156..6a19d55121 100644 --- a/src/openrct2/drawing/sprite.cpp +++ b/src/openrct2/drawing/sprite.cpp @@ -16,21 +16,26 @@ #include #include "../common.h" +#include "../config/Config.h" +#include "../Context.h" #include "../core/File.h" #include "../core/FileStream.hpp" #include "../core/Memory.hpp" #include "../core/Util.hpp" #include "../OpenRCT2.h" #include "../sprites.h" +#include "../ui/UiContext.h" extern "C" { - #include "../config/Config.h" #include "../rct2/addresses.h" #include "../util/util.h" #include "drawing.h" } +using namespace OpenRCT2; +using namespace OpenRCT2::Ui; + extern "C" { static void * _g1Buffer = nullptr; @@ -116,7 +121,8 @@ extern "C" log_fatal("Unable to load g1 graphics"); if (!gOpenRCT2Headless) { - platform_show_messagebox("Unable to load g1.dat. Your RollerCoaster Tycoon 2 path may be incorrectly set."); + IUiContext * uiContext = GetContext()->GetUiContext(); + uiContext->ShowMessageBox("Unable to load g1.dat. Your RollerCoaster Tycoon 2 path may be incorrectly set."); } return false; } @@ -174,7 +180,8 @@ extern "C" log_fatal("Unable to load g2 graphics"); if (!gOpenRCT2Headless) { - platform_show_messagebox("Unable to load g2.dat"); + IUiContext * uiContext = GetContext()->GetUiContext(); + uiContext->ShowMessageBox("Unable to load g2.dat"); } } return false; diff --git a/src/openrct2/input.c b/src/openrct2/input.c index 2673b885bc..cf6f483450 100644 --- a/src/openrct2/input.c +++ b/src/openrct2/input.c @@ -1613,9 +1613,7 @@ void game_handle_edge_scroll() return; if (mainWindow->viewport == NULL) return; - - uint32 window_flags = SDL_GetWindowFlags(gWindow); - if ((window_flags & SDL_WINDOW_INPUT_FOCUS) == 0) + if (!context_has_focus()) return; scrollX = 0; diff --git a/src/openrct2/platform/Platform2.cpp b/src/openrct2/platform/Platform2.cpp new file mode 100644 index 0000000000..0be0800034 --- /dev/null +++ b/src/openrct2/platform/Platform2.cpp @@ -0,0 +1,32 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include "Platform2.h" + +extern "C" +{ + #include "platform.h" +} + +namespace Platform +{ + uint32 GetTicks() + { + return platform_get_ticks(); + } +} diff --git a/src/openrct2/platform/Platform2.h b/src/openrct2/platform/Platform2.h new file mode 100644 index 0000000000..41299ea1fe --- /dev/null +++ b/src/openrct2/platform/Platform2.h @@ -0,0 +1,24 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#pragma once + +#include "../common.h" + +namespace Platform +{ + uint32 GetTicks(); +} diff --git a/src/openrct2/platform/linux.c b/src/openrct2/platform/linux.c index 4a3be91bc9..8c28e0a215 100644 --- a/src/openrct2/platform/linux.c +++ b/src/openrct2/platform/linux.c @@ -39,19 +39,6 @@ #include "../util/util.h" #include "platform.h" -// See http://syprog.blogspot.ru/2011/12/listing-loaded-shared-objects-in-linux.html -struct lmap { - void* base_address; - char* path; - void* unused; - struct lmap *next, *prev; -}; - -struct dummy { - void* pointers[3]; - struct dummy* ptr; -}; - typedef enum { DT_NONE, DT_KDIALOG, DT_ZENITY } dialog_type; void platform_get_exe_path(utf8 *outPath, size_t outSize) @@ -86,26 +73,6 @@ void platform_get_exe_path(utf8 *outPath, size_t outSize) safe_strcpy(outPath, exePath, outSize); } -bool platform_check_steam_overlay_attached() { - void* processHandle = dlopen(NULL, RTLD_NOW); - - struct dummy* p = (struct dummy*) processHandle; - p = p->ptr; - - struct lmap* pl = (struct lmap*) p->ptr; - - while (pl != NULL) { - if (strstr(pl->path, "gameoverlayrenderer.so") != NULL) { - dlclose(processHandle); - return true; - } - pl = pl->next; - } - dlclose(processHandle); - - return false; -} - /** * Default directory fallback is: * - (command line argument) @@ -287,38 +254,6 @@ static void execute_cmd(char *command, sint32 *exit_value, char *buf, size_t *bu pclose(f); } -static dialog_type get_dialog_app(char *cmd, size_t *cmd_size) { - sint32 exit_value; - size_t size; - dialog_type dtype; - - /* - * prefer zenity as it offers more required features, e.g., overwrite - * confirmation and selecting only existing files - */ - - dtype = DT_ZENITY; - size = *cmd_size; - execute_cmd("which zenity", &exit_value, cmd, &size); - - if (exit_value != 0) { - dtype = DT_KDIALOG; - size = *cmd_size; - execute_cmd("which kdialog", &exit_value, cmd, &size); - - if (exit_value != 0) { - log_error("no dialog (zenity or kdialog) found\n"); - return DT_NONE; - } - } - - cmd[size-1] = '\0'; - - *cmd_size = size; - - return dtype; -} - bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize) { sint32 exit_value; char executable[MAX_PATH]; @@ -498,33 +433,6 @@ utf8 *platform_open_directory_browser(const utf8 *title) { return return_value; } -void platform_show_messagebox(const char * message) { - size_t size; - dialog_type dtype; - char cmd[OPENRCT2_MAX_COMMAND_LENGTH]; - char executable[MAX_PATH]; - - log_verbose(message); - - size = OPENRCT2_MAX_COMMAND_LENGTH; - dtype = get_dialog_app(executable, &size); - - switch (dtype) { - case DT_KDIALOG: - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --title \"OpenRCT2\" --msgbox \"%s\"", executable, message); - break; - case DT_ZENITY: - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --title=\"OpenRCT2\" --info --text=\"%s\"", executable, message); - break; - default: - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "OpenRCT2", message, gWindow); - return; - } - - size = OPENRCT2_MAX_COMMAND_LENGTH; - execute_cmd(cmd, 0, 0, 0); -} - #ifndef NO_TTF bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size) { diff --git a/src/openrct2/platform/platform.h b/src/openrct2/platform/platform.h index 3c5516b6e2..23007b4cc7 100644 --- a/src/openrct2/platform/platform.h +++ b/src/openrct2/platform/platform.h @@ -99,7 +99,6 @@ typedef struct file_dialog_desc { } filters[8]; } file_dialog_desc; -extern SDL_Window *gWindow; extern SDL_Color gPalette[256]; // Platform shared definitions @@ -147,7 +146,6 @@ void platform_resolve_openrct_data_path(); void platform_get_openrct_data_path(utf8 *outPath, size_t outSize); void platform_get_user_directory(utf8 *outPath, const utf8 *subDirectory, size_t outSize); utf8* platform_get_username(); -void platform_show_messagebox(const utf8 * message); bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize); utf8 *platform_open_directory_browser(const utf8 *title); uint8 platform_get_locale_currency(); @@ -177,7 +175,6 @@ void core_init(); #undef GetMessage sint32 windows_get_registry_install_info(rct2_install_info *installInfo, char *source, char *font, uint8 charset); - HWND windows_get_window_handle(); void platform_setup_file_associations(); void platform_remove_file_associations(); bool platform_setup_uri_protocol(); diff --git a/src/openrct2/platform/posix.c b/src/openrct2/platform/posix.c index 7f41b447fd..18bbc1d0bb 100644 --- a/src/openrct2/platform/posix.c +++ b/src/openrct2/platform/posix.c @@ -858,10 +858,4 @@ utf8* platform_get_username() { } } -void platform_init_window_icon() -{ - // TODO Create a surface with the window icon - // SDL_SetWindowIcon(gWindow, iconSurface) -} - #endif diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 00cf819890..fe722e34ab 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -49,7 +49,6 @@ typedef void(*update_palette_func)(const uint8*, sint32, sint32); -SDL_Window *gWindow = NULL; SDL_Renderer *gRenderer = NULL; SDL_Texture *gBufferTexture = NULL; SDL_PixelFormat *gBufferTextureFormat = NULL; diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index d139fe59d8..79b77baab4 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -584,11 +584,6 @@ void platform_get_user_directory(utf8 *outPath, const utf8 *subDirectory, size_t } } -void platform_show_messagebox(const utf8 * message) -{ - MessageBoxA(windows_get_window_handle(), message, "OpenRCT2", MB_OK); -} - /** * * rct2: 0x004080EA @@ -610,7 +605,7 @@ bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, // Set open file name options memset(&openFileName, 0, sizeof(OPENFILENAMEW)); openFileName.lStructSize = sizeof(OPENFILENAMEW); - openFileName.hwndOwner = windows_get_window_handle(); + openFileName.hwndOwner = NULL; // windows_get_window_handle(); openFileName.nMaxFile = MAX_PATH; openFileName.lpstrTitle = utf8_to_widechar(desc->title); openFileName.lpstrInitialDir = utf8_to_widechar(desc->initial_directory); @@ -777,33 +772,6 @@ sint32 windows_get_registry_install_info(rct2_install_info *installInfo, char *s return 1; } -HWND windows_get_window_handle() -{ - SDL_SysWMinfo wmInfo; - - if (gWindow == NULL) - return NULL; - - SDL_VERSION(&wmInfo.version); - if (SDL_GetWindowWMInfo(gWindow, &wmInfo) != SDL_TRUE) { - log_error("SDL_GetWindowWMInfo failed %s", SDL_GetError()); - exit(-1); - } - HWND handle = wmInfo.info.win.window; - #ifdef __MINGW32__ - assert(sizeof(HWND) == sizeof(uint32)); - uint8 A = (uint32)handle & 0xff000000 >> 24; - uint8 B = (uint32)handle & 0xff0000 >> 16; - uint8 C = (uint32)handle & 0xff00 >> 8; - uint8 D = (uint32)handle & 0xff; - HWND result = (HWND)(D << 24 | A << 16 | B << 8 | C); - log_warning("twisting bits of handle, a workaround for mingw/sdl bug"); - #else - HWND result = handle; - #endif // __MINGW32__ - return result; -} - uint16 platform_get_locale_language() { CHAR langCode[4]; diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 68678070e0..49d7e00c4e 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -77,9 +77,12 @@ namespace OpenRCT2 virtual sint32 GetHeight() abstract; virtual void SetFullscreenMode(FULLSCREEN_MODE mode) abstract; virtual std::vector GetFullscreenResolutions() abstract; + virtual bool HasFocus() abstract; + virtual bool IsMinimised() abstract; virtual bool IsSteamOverlayActive() abstract; virtual void ProcessMessages() abstract; virtual void TriggerResize() abstract; + virtual void ShowMessageBox(const std::string &message) abstract; // Input virtual const CursorState * GetCursorState() abstract; @@ -88,6 +91,7 @@ namespace OpenRCT2 virtual void SetCursorVisible(bool value) abstract; virtual void GetCursorPosition(sint32 * x, sint32 * y) abstract; virtual void SetCursorPosition(sint32 x, sint32 y) abstract; + virtual void SetCursorTrap(bool value) abstract; virtual const uint8 * GetKeysState() abstract; virtual const uint8 * GetKeysPressed() abstract; diff --git a/src/openrct2/windows/options.c b/src/openrct2/windows/options.c index c55e2dd87e..31edbf81e8 100644 --- a/src/openrct2/windows/options.c +++ b/src/openrct2/windows/options.c @@ -740,7 +740,7 @@ static void window_options_mouseup(rct_window *w, rct_widgetindex widgetIndex) case WIDX_TRAP_CURSOR: gConfigGeneral.trap_cursor ^= 1; config_save_default(); - SDL_SetWindowGrab(gWindow, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE); + context_set_cursor_trap(gConfigGeneral.trap_cursor); window_invalidate(w); break; case WIDX_ZOOM_TO_CURSOR: From cf0dcb4753b8e4a4cedf77c35138e939ddab0ab7 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 1 Apr 2017 17:27:39 +0100 Subject: [PATCH 26/76] Refactor file / directory dialogs to UiContext --- src/openrct2-ui/UiContext.Linux.cpp | 159 ++++++++++++++++++++- src/openrct2-ui/UiContext.Win32.cpp | 128 ++++++++++++++++- src/openrct2-ui/UiContext.cpp | 10 ++ src/openrct2-ui/UiContext.h | 8 +- src/openrct2/Context.cpp | 25 ++++ src/openrct2/platform/linux.c | 213 ---------------------------- src/openrct2/platform/windows.c | 145 ------------------- src/openrct2/ui/UiContext.h | 26 +++- 8 files changed, 348 insertions(+), 366 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index a23cf050ac..43febb6b74 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -16,11 +16,14 @@ #ifdef __linux__ +#include #include -#include #include +#include #include "UiContext.h" +#include + namespace OpenRCT2 { namespace Ui { enum class DIALOG_TYPE @@ -107,6 +110,100 @@ namespace OpenRCT2 { namespace Ui } } + std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc &desc) override + { + std::string result; + std::string executablePath; + DIALOG_TYPE dtype = GetDialogApp(&executablePath); + switch (dtype) { + case DIALOG_TYPE::KDIALOG: + { + std::string action = + (desc.Type == FILE_DIALOG_TYPE::OPEN) ? "--getopenfilename" : + "--getsavefilename"; + std::string filter = GetKDialogFilterString(desc.Filters); + std::string cmd = String::StdFormat("%s --title '%s' %s '%s/' ~ '%s'", executablePath, desc.Title, action, desc.InitialDirectory, filter); + std::string output; + if (Execute(cmd, &output) != 0) + { + result = output; + } + break; + } + case DIALOG_TYPE::ZENITY: + { + std::string action = "--file-selection"; + std::string flags; + if (desc.Type == FILE_DIALOG_TYPE::SAVE) + { + flags = "--confirm-overwrite --save"; + } + std::string filters = GetZenityFilterString(desc.Filters); + std::string cmd = String::StdFormat("%s %s --filename='%s/' %s --title='%s' / %s", executablePath, action, desc.InitialDirectory, flags, desc.Title, filters); + std::string output; + if (Execute(cmd, &output) != 0) + { + result = output; + } + break; + } + default: + log_error("KDialog or Zenity not installed."); + break; + } + + log_verbose("filename = %s", result.c_str()); + + if (desc.Type == FILE_DIALOG_TYPE::OPEN && access(result, F_OK) == -1) + { + std::string msg = String::StdFormat("\"%s\" not found: %s, please choose another file\n", result.c_str(), strerror(errno)); + ShowMessageBox(window, msg); + return ShowFileDialog(window, desc); + } + else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result, F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) + { + std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath, result.c_str()); + if (Execute(cmd) != 0) + { + result = std::string(); + } + } + return result; + } + + std::string ShowDirectoryDialog(SDL_Window * window, const std::string &title) override + { + std::string result; + std::string executablePath; + DIALOG_TYPE dtype = GetDialogApp(&executablePath); + switch (dtype) { + case DIALOG_TYPE::KDIALOG: + { + std::string output; + std::string cmd = String::Format("%s --title '%s' --getexistingdirectory /", executablePath.c_str(), title); + if (Execute(cmd, &output) == 0) + { + result = output; + } + break; + } + case DIALOG_TYPE::ZENITY: + { + std::string output; + std::string cmd = String::Format("%s --title='%s' --file-selection --directory /", executablePath.c_str(), title); + if (Execute(cmd, &output) == 0) + { + result = output; + } + break; + } + default: + log_error("KDialog or Zenity not installed."); + break; + } + return result; + } + private: static DIALOG_TYPE GetDialogApp(std::string * executablePath) { @@ -168,6 +265,66 @@ namespace OpenRCT2 { namespace Ui // Return exit code return pclose(fpipe); } + + static std::string GetKDialogFilterString(const std::vector filters) + { + std::stringstream filtersb; + bool first = true; + for (const auto &filter : filters) + { + // KDialog wants filters space-delimited and we don't expect ';' anywhere else + std::string pattern = filter.Pattern; + for (sint32 i = 0; i < pattern.size(); i++) + { + if (pattern[i] == ';') + { + pattern[i] = ' '; + } + } + + if (first) + { + filtersb << String::StdFormat("%s | %s", pattern.c_str(), filter.Name.c_str()); + first = false; + } + else + { + filtersb << String::StdFormat("\\n%s | %s", pattern.c_str(), filter.Name.c_str()); + } + } + return filtersb.str(); + } + + static std::string GetZenityFilterString(const std::vector filters) + { + // Zenity seems to be case sensitive, while KDialog isn't + std::stringstream filtersb; + bool first = true; + for (const auto &filter : filters) + { + filtersb << " --file-filter='" << filter.Name << " | "; + for (char c : filter.Pattern) + { + if (c == ';') + { + filtersb << ' '; + } + else if (isalpha(c)) + { + filtersb << '[' + << toupper(c) + << tolower(c) + << ']'; + } + else + { + filtersb << c; + } + } + filtersb << "'"; + } + return filtersb.str(); + } }; IPlatformUiContext * CreatePlatformUiContext() diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index e3f8ea942a..78f266e8bf 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -16,18 +16,38 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN - +#include #include +#include +#include +#include +#include +#include "UiContext.h" + +#undef interface #include +#include #include #include -#include -#include "UiContext.h" // Native resource IDs #include "../../../resources/resource.h" +static std::wstring SHGetPathFromIDListLongPath(LPCITEMIDLIST pidl) +{ + std::wstring pszPath(MAX_PATH, 0); + while (!SHGetPathFromIDListEx(pidl, &pszPath[0], (DWORD)pszPath.size(), 0)) + { + if (pszPath.size() >= SHRT_MAX) + { + // Clearly not succeeding at all, bail + return std::wstring(); + } + pszPath.resize(pszPath.size() * 2); + } + return pszPath; +} + namespace OpenRCT2 { namespace Ui { class Win32Context : public IPlatformUiContext @@ -69,6 +89,93 @@ namespace OpenRCT2 { namespace Ui MessageBoxW(hwnd, messageW.c_str(), L"OpenRCT2", MB_OK); } + std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc &desc) override + { + std::wstring wcFilename = String::ToUtf16(desc.DefaultFilename); + wcFilename.resize(Math::Max(wcFilename.size(), MAX_PATH)); + + std::wstring wcTitle = String::ToUtf16(desc.Title); + std::wstring wcInitialDirectory = String::ToUtf16(desc.InitialDirectory); + std::wstring wcFilters = GetFilterString(desc.Filters); + + // Set open file name options + OPENFILENAMEW openFileName = { 0 }; + openFileName.lStructSize = sizeof(OPENFILENAMEW); + openFileName.hwndOwner = GetHWND(window); + openFileName.lpstrTitle = wcTitle.c_str(); + openFileName.lpstrInitialDir = wcInitialDirectory.c_str(); + openFileName.lpstrFilter = wcFilters.c_str(); + openFileName.lpstrFile = &wcFilename[0]; + openFileName.nMaxFile = (DWORD)wcFilename.size(); + + // Open dialog + BOOL dialogResult = FALSE; + DWORD commonFlags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + if (desc.Type == FILE_DIALOG_TYPE::OPEN) + { + openFileName.Flags = commonFlags | OFN_NONETWORKBUTTON | OFN_FILEMUSTEXIST; + dialogResult = GetOpenFileNameW(&openFileName); + } + else if (desc.Type == FILE_DIALOG_TYPE::SAVE) + { + openFileName.Flags = commonFlags | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT; + dialogResult = GetSaveFileNameW(&openFileName); + } + + std::string resultFilename; + if (dialogResult) + { + resultFilename = String::ToUtf8(openFileName.lpstrFile); + + // If there is no extension, append the pattern + std::string resultExtension = Path::GetExtension(resultFilename); + if (resultExtension.empty()) + { + sint32 filterIndex = openFileName.nFilterIndex - 1; + + assert(filterIndex >= 0); + assert(filterIndex < desc.Filters.size()); + + std::string pattern = desc.Filters[filterIndex].Pattern; + std::string patternExtension = Path::GetExtension(pattern); + if (!patternExtension.empty()) + { + resultFilename += patternExtension; + } + } + } + return resultFilename; + } + + std::string ShowDirectoryDialog(SDL_Window * window, const std::string &title) override + { + std::string result; + + // Initialize COM and get a pointer to the shell memory allocator + LPMALLOC lpMalloc; + if (SUCCEEDED(CoInitializeEx(0, COINIT_APARTMENTTHREADED)) && + SUCCEEDED(SHGetMalloc(&lpMalloc))) + { + std::wstring titleW = String::ToUtf16(title); + BROWSEINFOW bi = { 0 }; + bi.hwndOwner = GetHWND(window); + bi.lpszTitle = titleW.c_str(); + bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_NONEWFOLDERBUTTON; + + LPITEMIDLIST pidl = SHBrowseForFolderW(&bi); + if (pidl != nullptr) + { + result = String::ToUtf8(SHGetPathFromIDListLongPath(pidl)); + } + } + else + { + log_error("Error opening directory browse window"); + } + CoUninitialize(); + return result; + } + private: HWND GetHWND(SDL_Window * window) { @@ -96,6 +203,19 @@ namespace OpenRCT2 { namespace Ui } return result; } + + static std::wstring GetFilterString(const std::vector filters) + { + std::wstringstream filtersb; + for (auto filter : filters) + { + filtersb << String::ToUtf16(filter.Name) + << '\0' + << String::ToUtf16(filter.Pattern) + << '\0'; + } + return filtersb.str(); + } }; IPlatformUiContext * CreatePlatformUiContext() diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 1adca08a8b..495e5597a3 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -521,6 +521,16 @@ public: _platformUiContext->ShowMessageBox(_window, message); } + std::string ShowFileDialog(const FileDialogDesc &desc) override + { + return _platformUiContext->ShowFileDialog(_window, desc); + } + + std::string ShowDirectoryDialog(const std::string &title) override + { + return _platformUiContext->ShowDirectoryDialog(_window, title); + } + private: void OnResize(sint32 width, sint32 height) { diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index 7293491e55..f713d76596 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -27,14 +27,18 @@ namespace OpenRCT2 namespace Ui { - interface IUiContext; + struct FileDialogDesc; + interface IUiContext; interface IPlatformUiContext { virtual ~IPlatformUiContext() = default; virtual void SetWindowIcon(SDL_Window * window) abstract; virtual bool IsSteamOverlayAttached() abstract; - virtual void ShowMessageBox(SDL_Window * window, const std::string &message) abstract; + + virtual void ShowMessageBox(SDL_Window * window, const std::string &message) abstract; + virtual std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc &desc) abstract; + virtual std::string ShowDirectoryDialog(SDL_Window * window, const std::string &title) abstract; }; IUiContext * CreateUiContext(); diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index c0db8be37b..244749363b 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -680,4 +680,29 @@ extern "C" { GetContext()->GetUiContext()->SetCursorTrap(value); } + + bool platform_open_common_file_dialog(utf8 * outFilename, file_dialog_desc * desc, size_t outSize) + { + FileDialogDesc desc2; + desc2.Type = (FILE_DIALOG_TYPE)desc->type; + desc2.Title = String::ToStd(desc->title); + desc2.InitialDirectory = String::ToStd(desc->initial_directory); + desc2.DefaultFilename = String::ToStd(desc->default_filename); + for (const auto &filter : desc->filters) + { + if (filter.name != nullptr) + { + desc2.Filters.push_back({ String::ToStd(filter.name), String::ToStd(filter.pattern) }); + } + } + std::string result = GetContext()->GetUiContext()->ShowFileDialog(desc2); + String::Set(outFilename, outSize, result.c_str()); + return !result.empty(); + } + + utf8 * platform_open_directory_browser(const utf8 * title) + { + std::string result = GetContext()->GetUiContext()->ShowDirectoryDialog(title); + return String::Duplicate(result.c_str()); + } } diff --git a/src/openrct2/platform/linux.c b/src/openrct2/platform/linux.c index 8c28e0a215..f6da9bf162 100644 --- a/src/openrct2/platform/linux.c +++ b/src/openrct2/platform/linux.c @@ -39,8 +39,6 @@ #include "../util/util.h" #include "platform.h" -typedef enum { DT_NONE, DT_KDIALOG, DT_ZENITY } dialog_type; - void platform_get_exe_path(utf8 *outPath, size_t outSize) { char exePath[MAX_PATH]; @@ -222,217 +220,6 @@ uint8 platform_get_locale_measurement_format(){ return MEASUREMENT_FORMAT_METRIC; } -static void execute_cmd(char *command, sint32 *exit_value, char *buf, size_t *buf_size) { - FILE *f; - size_t n_chars; - - log_verbose("executing \"%s\"...\n", command); - f = popen(command, "r"); - - if (buf && buf_size) { - n_chars = fread(buf, 1, *buf_size, f); - - // some commands may return a new-line terminated result, trim that - if (n_chars > 0 && buf[n_chars - 1] == '\n') { - buf[n_chars - 1] = '\0'; - } - // make sure string is null-terminated - if (n_chars == *buf_size) { - n_chars--; - } - buf[n_chars] = '\0'; - - // account for null terminator - *buf_size = n_chars + 1; - } else { - fflush(f); - } - - if (exit_value) - *exit_value = pclose(f); - else - pclose(f); -} - -bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize) { - sint32 exit_value; - char executable[MAX_PATH]; - char cmd[OPENRCT2_MAX_COMMAND_LENGTH]; - char result[OPENRCT2_MAX_COMMAND_LENGTH]; - size_t size; - dialog_type dtype; - char *action = NULL; - char *flags = NULL; - char filter[OPENRCT2_MAX_COMMAND_LENGTH] = { 0 }; - char filterPatternRegex[64]; - - size = OPENRCT2_MAX_COMMAND_LENGTH; - dtype = get_dialog_app(executable, &size); - - switch (dtype) { - case DT_KDIALOG: - switch (desc->type) { - case FD_OPEN: - action = "--getopenfilename"; - break; - case FD_SAVE: - action = "--getsavefilename"; - break; - } - - { - bool first = true; - for (sint32 j = 0; j < countof(desc->filters); j++) { - if (desc->filters[j].pattern && desc->filters[j].name) { - char filterTemp[100] = { 0 }; - if (first) { - snprintf(filterTemp, countof(filterTemp), "%s | %s", desc->filters[j].pattern, desc->filters[j].name); - first = false; - } else { - snprintf(filterTemp, countof(filterTemp), "\\n%s | %s", desc->filters[j].pattern, desc->filters[j].name); - } - safe_strcat(filter, filterTemp, countof(filter)); - } - } - char filterTemp[100] = { 0 }; - if (first) { - snprintf(filterTemp, countof(filterTemp), "*|%s", (char *)language_get_string(STR_ALL_FILES)); - } else { - snprintf(filterTemp, countof(filterTemp), "\\n*|%s", (char *)language_get_string(STR_ALL_FILES)); - } - safe_strcat(filter, filterTemp, countof(filter)); - - // kdialog wants filters space-delimited and we don't expect ';' anywhere else, - // this is much easier and quicker to do than being overly careful about replacing - // it only where truly needed. - sint32 filterSize = strlen(filter); - for (sint32 i = 0; i < filterSize + 3; i++) { - if (filter[i] == ';') { - filter[i] = ' '; - } - } - } - - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --title '%s' %s '%s/' ~ '%s'", executable, desc->title, action, desc->initial_directory, filter); - break; - case DT_ZENITY: - action = "--file-selection"; - switch (desc->type) { - case FD_SAVE: - flags = "--confirm-overwrite --save"; - break; - case FD_OPEN: - flags = ""; - break; - } - - // Zenity seems to be case sensitive, while Kdialog isn't. - for (sint32 j = 0; j < countof(desc->filters); j++) { - if (desc->filters[j].pattern && desc->filters[j].name) { - sint32 regexIterator = 0; - for(sint32 i = 0; i <= strlen(desc->filters[j].pattern); i++) { - if (isalpha(desc->filters[j].pattern[i])) { - filterPatternRegex[regexIterator+0] = '['; - filterPatternRegex[regexIterator+1] = (char)toupper(desc->filters[j].pattern[i]); - filterPatternRegex[regexIterator+2] = (char)tolower(desc->filters[j].pattern[i]); - filterPatternRegex[regexIterator+3] = ']'; - regexIterator += 3; - } - else if(desc->filters[j].pattern[i] == ';') { - filterPatternRegex[regexIterator] = ' '; - } - else { - filterPatternRegex[regexIterator] = (char)desc->filters[j].pattern[i]; - } - regexIterator++; - } - filterPatternRegex[regexIterator+1] = 0; - - char filterTemp[100] = { 0 }; - snprintf(filterTemp, countof(filterTemp), " --file-filter='%s | %s'", desc->filters[j].name, filterPatternRegex); - safe_strcat(filter, filterTemp, countof(filter)); - } - } - char filterTemp[100] = { 0 }; - snprintf(filterTemp, countof(filterTemp), " --file-filter='%s | *'", (char *)language_get_string(STR_ALL_FILES)); - safe_strcat(filter, filterTemp, countof(filter)); - - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s %s --filename='%s/' %s --title='%s' / %s", executable, action, desc->initial_directory, flags, desc->title, filter); - break; - default: return 0; - } - - size = OPENRCT2_MAX_COMMAND_LENGTH; - execute_cmd(cmd, &exit_value, result, &size); - - if (exit_value != 0) { - return 0; - } - - result[size-1] = '\0'; - log_verbose("filename = %s", result); - - if (desc->type == FD_OPEN && access(result, F_OK) == -1) { - char msg[OPENRCT2_MAX_COMMAND_LENGTH]; - - snprintf(msg, OPENRCT2_MAX_COMMAND_LENGTH, "\"%s\" not found: %s, please choose another file\n", result, strerror(errno)); - platform_show_messagebox(msg); - - return platform_open_common_file_dialog(outFilename, desc, outSize); - } else - if (desc->type == FD_SAVE && access(result, F_OK) != -1 && dtype == DT_KDIALOG) { - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --yesno \"Overwrite %s?\"", executable, result); - - size = OPENRCT2_MAX_COMMAND_LENGTH; - execute_cmd(cmd, &exit_value, 0, 0); - - if (exit_value != 0) { - return 0; - } - } - - safe_strcpy(outFilename, result, outSize); - - return 1; -} - -utf8 *platform_open_directory_browser(const utf8 *title) { - size_t size; - dialog_type dtype; - sint32 exit_value; - char cmd[OPENRCT2_MAX_COMMAND_LENGTH]; - char executable[MAX_PATH]; - char result[OPENRCT2_MAX_COMMAND_LENGTH]; - char *return_value; - - size = MAX_PATH; - dtype = get_dialog_app(executable, &size); - - switch (dtype) { - case DT_KDIALOG: - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --title '%s' --getexistingdirectory /", executable, title); - break; - case DT_ZENITY: - snprintf(cmd, OPENRCT2_MAX_COMMAND_LENGTH, "%s --title='%s' --file-selection --directory /", executable, title); - break; - default: return 0; - } - - size = OPENRCT2_MAX_COMMAND_LENGTH; - execute_cmd(cmd, &exit_value, result, &size); - - if (exit_value != 0) { - return NULL; - } - - assert(size - 1 < countof(result)); - result[size-1] = '\0'; - - return_value = _strdup(result); - - return return_value; -} - #ifndef NO_TTF bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size) { diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index 79b77baab4..4d3a6c32be 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -584,151 +584,6 @@ void platform_get_user_directory(utf8 *outPath, const utf8 *subDirectory, size_t } } -/** - * - * rct2: 0x004080EA - */ -bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize) -{ - OPENFILENAMEW openFileName; - wchar_t wcFilename[MAX_PATH]; - - // Copy default filename to result filename buffer - if (desc->default_filename == NULL) { - wcFilename[0] = 0; - } else { - wchar_t *wcDefaultFilename = utf8_to_widechar(desc->default_filename); - lstrcpyW(wcFilename, wcDefaultFilename); - free(wcDefaultFilename); - } - - // Set open file name options - memset(&openFileName, 0, sizeof(OPENFILENAMEW)); - openFileName.lStructSize = sizeof(OPENFILENAMEW); - openFileName.hwndOwner = NULL; // windows_get_window_handle(); - openFileName.nMaxFile = MAX_PATH; - openFileName.lpstrTitle = utf8_to_widechar(desc->title); - openFileName.lpstrInitialDir = utf8_to_widechar(desc->initial_directory); - openFileName.lpstrFile = wcFilename; - - utf8 filters[256]; - utf8 *ch = filters; - for (sint32 i = 0; i < countof(desc->filters); i++) { - if (desc->filters[i].name != NULL) { - safe_strcpy(ch, desc->filters[i].name, sizeof(filters) - (ch - filters)); - ch = strchr(ch, 0) + 1; - safe_strcpy(ch, desc->filters[i].pattern, sizeof(filters) - (ch - filters)); - ch = strchr(ch, 0) + 1; - } - } - assert(ch != filters); - *ch = 0; - - // HACK: Replace all null terminators with 0x01 so that we convert the entire string - size_t fullLength = (size_t)(ch - filters); - for (size_t i = 0; i < fullLength; i++) { - if (filters[i] == '\0') { - filters[i] = 1; - } - } - wchar_t *wcFilter = utf8_to_widechar(filters); - fullLength = lstrlenW(wcFilter); - for (size_t i = 0; i < fullLength; i++) { - if (wcFilter[i] == 1) { - wcFilter[i] = '\0'; - } - } - - openFileName.lpstrFilter = wcFilter; - - // Open dialog - BOOL result = false; - DWORD commonFlags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR; - if (desc->type == FD_OPEN) { - openFileName.Flags = commonFlags | OFN_NONETWORKBUTTON | OFN_FILEMUSTEXIST; - result = GetOpenFileNameW(&openFileName); - } else if (desc->type == FD_SAVE) { - openFileName.Flags = commonFlags | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT; - result = GetSaveFileNameW(&openFileName); - } - - // Clean up - free((void*)openFileName.lpstrTitle); - free((void*)openFileName.lpstrInitialDir); - free((void*)openFileName.lpstrFilter); - - if (result) { - utf8 *resultFilename = widechar_to_utf8(openFileName.lpstrFile); - safe_strcpy(outFilename, resultFilename, outSize); - free(resultFilename); - - // If there is no extension, append the pattern - const utf8 *outFilenameExtension = path_get_extension(outFilename); - if (str_is_null_or_empty(outFilenameExtension)) { - sint32 filterIndex = openFileName.nFilterIndex - 1; - - assert(filterIndex >= 0); - assert(filterIndex < countof(desc->filters)); - - const utf8 *pattern = desc->filters[filterIndex].pattern; - const utf8 *patternExtension = path_get_extension(pattern); - if (!str_is_null_or_empty(patternExtension)) { - safe_strcat(outFilename, patternExtension, outSize); - } - } - } - - return result; -} - -utf8 *platform_open_directory_browser(const utf8 *title) -{ - BROWSEINFOW bi; - wchar_t pszBuffer[MAX_PATH], wctitle[256]; - LPITEMIDLIST pidl; - LPMALLOC lpMalloc; - - MultiByteToWideChar(CP_UTF8, 0, title, -1, wctitle, countof(wctitle)); - - // Initialize COM - if (FAILED(CoInitializeEx(0, COINIT_APARTMENTTHREADED))) { - CoUninitialize(); - - log_error("Error opening directory browse window"); - return 0; - } - - // Get a pointer to the shell memory allocator - if (FAILED(SHGetMalloc(&lpMalloc))) { - CoUninitialize(); - - log_error("Error opening directory browse window"); - return 0; - } - - bi.hwndOwner = NULL; - bi.pidlRoot = NULL; - bi.pszDisplayName = pszBuffer; - bi.lpszTitle = wctitle; - bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; - bi.lpfn = NULL; - bi.lParam = 0; - - utf8 *outPath = NULL; - - if ((pidl = SHBrowseForFolderW(&bi)) != NULL) { - // Copy the path directory to the buffer - if (SHGetPathFromIDListW(pidl, pszBuffer)) { - // Store pszBuffer (and the path) in the outPath - sint32 outPathCapacity = lstrlenW(pszBuffer) * 4 + 1; - outPath = (utf8*)malloc(outPathCapacity); - WideCharToMultiByte(CP_UTF8, 0, pszBuffer, countof(pszBuffer), outPath, outPathCapacity, NULL, NULL); - } - } - CoUninitialize(); - return outPath; -} - /** * * rct2: 0x00407978 diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 49d7e00c4e..48079a2f92 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -62,6 +62,27 @@ namespace OpenRCT2 return !(lhs == rhs); } + enum class FILE_DIALOG_TYPE + { + OPEN, + SAVE, + }; + + struct FileDialogDesc + { + struct Filter + { + std::string Name; // E.g. "Image Files" + std::string Pattern; // E.g. "*.png;*.jpg;*.gif" + }; + + FILE_DIALOG_TYPE Type = FILE_DIALOG_TYPE::OPEN; + std::string Title; + std::string InitialDirectory; + std::string DefaultFilename; + std::vector Filters; + }; + /** * Represents the window or screen that OpenRCT2 is presented on. */ @@ -82,7 +103,10 @@ namespace OpenRCT2 virtual bool IsSteamOverlayActive() abstract; virtual void ProcessMessages() abstract; virtual void TriggerResize() abstract; - virtual void ShowMessageBox(const std::string &message) abstract; + + virtual void ShowMessageBox(const std::string &message) abstract; + virtual std::string ShowFileDialog(const FileDialogDesc &desc) abstract; + virtual std::string ShowDirectoryDialog(const std::string &title) abstract; // Input virtual const CursorState * GetCursorState() abstract; From 08ae74293d69fe20cf51b98740fdd1d99335e3be Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 1 Apr 2017 19:50:07 +0100 Subject: [PATCH 27/76] Remove a few more SDL calls from core library --- src/openrct2/Context.cpp | 6 +++--- src/openrct2/peep/staff.c | 8 +++++++- src/openrct2/platform/shared.c | 6 ------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 244749363b..be0c330b48 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -420,11 +420,11 @@ namespace OpenRCT2 void RunFixedFrame() { _uncapTick = 0; - uint32 currentTick = SDL_GetTicks(); + uint32 currentTick = platform_get_ticks(); uint32 ticksElapsed = currentTick - _lastTick; if (ticksElapsed < UPDATE_TIME_MS) { - SDL_Delay(UPDATE_TIME_MS - ticksElapsed); + platform_sleep(UPDATE_TIME_MS - ticksElapsed); _lastTick += UPDATE_TIME_MS; } else @@ -441,7 +441,7 @@ namespace OpenRCT2 void RunVariableFrame() { - uint32 currentTick = SDL_GetTicks(); + uint32 currentTick = platform_get_ticks(); if (_uncapTick == 0) { _uncapTick = currentTick; diff --git a/src/openrct2/peep/staff.c b/src/openrct2/peep/staff.c index 1fcc42e2f2..566b699f68 100644 --- a/src/openrct2/peep/staff.c +++ b/src/openrct2/peep/staff.c @@ -15,7 +15,9 @@ #pragma endregion #include "../config/Config.h" +#include "../Context.h" #include "../game.h" +#include "../input.h" #include "../interface/viewport.h" #include "../localisation/date.h" #include "../localisation/localisation.h" @@ -546,7 +548,11 @@ uint16 hire_new_staff_member(uint8 staffType) command_y = command_z = esi = new_sprite_index = ebp = 0; command_x = 0x8000; - sint32 autoposition = gConfigGeneral.auto_staff_placement == ((SDL_GetModState() & KMOD_SHIFT) == 0); + sint32 autoposition = gConfigGeneral.auto_staff_placement; + if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) { + autoposition = autoposition ^ 1; + } + ebx = autoposition << 16 | staffType << 8 | GAME_COMMAND_FLAG_APPLY; game_command_callback = game_command_callback_hire_new_staff_member; diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index fe722e34ab..5fc8094a8e 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -55,12 +55,6 @@ SDL_PixelFormat *gBufferTextureFormat = NULL; SDL_Color gPalette[256]; uint32 gPaletteHWMapped[256]; -bool gSteamOverlayActive = false; - -static const sint32 _fullscreen_modes[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP }; -static uint32 _lastGestureTimestamp; -static float _gestureRadius; - void platform_draw() { if (!gOpenRCT2Headless) { From d45a50274c37b451669dc806870f16fa409eb667 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 1 Apr 2017 19:57:30 +0100 Subject: [PATCH 28/76] Replace SDL with normal fopen in cmdline_sprite.c --- src/openrct2/cmdline_sprite.c | 56 ++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/src/openrct2/cmdline_sprite.c b/src/openrct2/cmdline_sprite.c index 3f8deffef4..9d2588c416 100644 --- a/src/openrct2/cmdline_sprite.c +++ b/src/openrct2/cmdline_sprite.c @@ -20,8 +20,8 @@ #include "cmdline_sprite.h" #include "drawing/drawing.h" #include "Imaging.h" +#include "localisation/localisation.h" #include "OpenRCT2.h" -#include "platform/platform.h" #include "util/util.h" #define MODE_DEFAULT 0 @@ -61,6 +61,22 @@ rct_sprite_file_header spriteFileHeader; rct_g1_element *spriteFileEntries; uint8 *spriteFileData; +#ifdef _WIN32 + +static FILE * fopen_utf8(const char * path, const char * mode) +{ + wchar_t * pathW = utf8_to_widechar(path); + wchar_t * modeW = utf8_to_widechar(mode); + FILE * file = _wfopen(pathW, modeW); + free(pathW); + free(modeW); + return file; +} + +#define fopen fopen_utf8 + +#endif + static void sprite_file_load_palette(sint32 spriteIndex) { rct_g1_element *g1 = &spriteFileEntries[spriteIndex]; @@ -90,14 +106,12 @@ static void sprite_entries_make_relative() static bool sprite_file_open(const utf8 *path) { - SDL_RWops *file; - - file = SDL_RWFromFile(path, "rb"); + FILE * file = fopen(path, "rb"); if (file == NULL) return false; - if (SDL_RWread(file, &spriteFileHeader, sizeof(rct_sprite_file_header), 1) != 1) { - SDL_RWclose(file); + if (fread(&spriteFileHeader, sizeof(rct_sprite_file_header), 1, file) != 1) { + fclose(file); return false; } @@ -105,21 +119,21 @@ static bool sprite_file_open(const utf8 *path) sint32 openEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); rct_g1_element_32bit * openElements = (rct_g1_element_32bit *)malloc(openEntryTableSize); if (openElements == NULL) { - SDL_RWclose(file); + fclose(file); return false; } - if (SDL_RWread(file, openElements, openEntryTableSize, 1) != 1) { + if (fread(openElements, openEntryTableSize, 1, file) != 1) { free(openElements); - SDL_RWclose(file); + fclose(file); return false; } spriteFileData = malloc(spriteFileHeader.total_size); - if (SDL_RWread(file, spriteFileData, spriteFileHeader.total_size, 1) != 1) { + if (fread(spriteFileData, spriteFileHeader.total_size, 1, file) != 1) { free(spriteFileData); free(openElements); - SDL_RWclose(file); + fclose(file); return false; } @@ -141,18 +155,18 @@ static bool sprite_file_open(const utf8 *path) free(openElements); } - SDL_RWclose(file); + fclose(file); return true; } static bool sprite_file_save(const char *path) { - SDL_RWops *file = SDL_RWFromFile(path, "wb"); + FILE * file = fopen(path, "wb"); if (file == NULL) return false; - if (SDL_RWwrite(file, &spriteFileHeader, sizeof(rct_sprite_file_header), 1) != 1) { - SDL_RWclose(file); + if (fwrite(&spriteFileHeader, sizeof(rct_sprite_file_header), 1, file) != 1) { + fclose(file); return false; } @@ -160,7 +174,7 @@ static bool sprite_file_save(const char *path) sint32 saveEntryTableSize = spriteFileHeader.num_entries * sizeof(rct_g1_element_32bit); rct_g1_element_32bit * saveElements = (rct_g1_element_32bit *)malloc(saveEntryTableSize); if (saveElements == NULL) { - SDL_RWclose(file); + fclose(file); return false; } @@ -177,20 +191,20 @@ static bool sprite_file_save(const char *path) outElement->zoomed_offset = inElement->zoomed_offset; } - if (SDL_RWwrite(file, saveElements, saveEntryTableSize, 1) != 1) { + if (fwrite(saveElements, saveEntryTableSize, 1, file) != 1) { free(saveElements); - SDL_RWclose(file); + fclose(file); return false; } free(saveElements); - if (SDL_RWwrite(file, spriteFileData, spriteFileHeader.total_size, 1) != 1) { - SDL_RWclose(file); + if (fwrite(spriteFileData, spriteFileHeader.total_size, 1, file) != 1) { + fclose(file); return false; } } - SDL_RWclose(file); + fclose(file); return true; } From e2a71896634e6221bb22dc7c7304318b966b0de3 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 2 Apr 2017 10:42:43 +0100 Subject: [PATCH 29/76] Do not use SDL_Colour for gPalette --- .../drawing/engines/SoftwareDrawingEngine.cpp | 17 +++++++------ .../engines/opengl/OpenGLDrawingEngine.cpp | 7 ++++-- src/openrct2/drawing/IDrawingEngine.h | 10 ++++---- src/openrct2/drawing/NewDrawing.cpp | 2 +- src/openrct2/drawing/NewDrawing.h | 4 +-- src/openrct2/drawing/drawing.h | 1 + src/openrct2/interface/screenshot.c | 8 +----- src/openrct2/network/NetworkConnection.cpp | 1 - src/openrct2/platform/platform.h | 2 -- src/openrct2/platform/shared.c | 25 +++++++------------ 10 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 934bd751cb..95541b089f 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -320,7 +320,7 @@ public: } } - void SetPalette(SDL_Color * palette) override + void SetPalette(const rct_palette_entry * palette) override { if (_sdlRenderer != nullptr) { @@ -328,7 +328,7 @@ public: { for (sint32 i = 0; i < 256; i++) { - _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].r, palette[i].g, palette[i].b); + _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].red, palette[i].green, palette[i].blue); } #ifdef __ENABLE_LIGHTFX__ @@ -348,11 +348,14 @@ public: SDL_Surface * windowSurface = SDL_GetWindowSurface(_window); if (windowSurface != nullptr && _palette != nullptr) { - // log_fatal("SDL_GetWindowSurface failed %s", SDL_GetError()); - // exit(1); - // log_fatal("SDL_SetPaletteColors failed %s", SDL_GetError()); - // exit(1); - SDL_SetPaletteColors(_palette, palette, 0, 256); + SDL_Colour colours[256]; + for (sint32 i = 0; i < 256; i++) { + colours[i].r = palette[i].red; + colours[i].g = palette[i].green; + colours[i].b = palette[i].blue; + colours[i].a = palette[i].alpha; + } + SDL_SetPaletteColors(_palette, colours, 0, 256); } } } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index b515015beb..aec997f5a4 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -304,11 +304,14 @@ public: _drawingContext->Resize(width, height); } - void SetPalette(SDL_Color * palette) override + void SetPalette(const rct_palette_entry * palette) override { for (sint32 i = 0; i < 256; i++) { - SDL_Color colour = palette[i]; + SDL_Color colour; + colour.r = palette[i].red; + colour.g = palette[i].green; + colour.b = palette[i].blue; colour.a = i == 0 ? 0 : 255; Palette[i] = colour; diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index a791acc222..9ed9d61a7e 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -18,8 +18,6 @@ #include "../common.h" -#include - enum DRAWING_ENGINE { DRAWING_ENGINE_NONE = -1, @@ -42,6 +40,8 @@ enum DRAWING_ENGINE_FLAGS #ifdef __cplusplus struct rct_drawpixelinfo; +struct rct_palette_entry; +struct SDL_Window; namespace OpenRCT2 { namespace Drawing { @@ -51,9 +51,9 @@ namespace OpenRCT2 { namespace Drawing { virtual ~IDrawingEngine() { } - virtual void Initialise(SDL_Window * window) abstract; - virtual void Resize(uint32 width, uint32 height) abstract; - virtual void SetPalette(SDL_Color * colours) abstract; + virtual void Initialise(SDL_Window * window) abstract; + virtual void Resize(uint32 width, uint32 height) abstract; + virtual void SetPalette(const rct_palette_entry * colours) abstract; virtual void SetUncappedFrameRate(bool uncapped) abstract; diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 31dc499dc0..c7d8629f76 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -144,7 +144,7 @@ extern "C" _drawingEngine->Resize(uiContext->GetWidth(), uiContext->GetHeight()); } - void drawing_engine_set_palette(SDL_Color * colours) + void drawing_engine_set_palette(const rct_palette_entry * colours) { if (_drawingEngine != nullptr) { diff --git a/src/openrct2/drawing/NewDrawing.h b/src/openrct2/drawing/NewDrawing.h index 9470026a1d..e37eb2fd5b 100644 --- a/src/openrct2/drawing/NewDrawing.h +++ b/src/openrct2/drawing/NewDrawing.h @@ -16,8 +16,6 @@ #pragma once -#include - #ifdef __cplusplus extern "C" { @@ -32,7 +30,7 @@ sint32 drawing_engine_get_type(); bool drawing_engine_requires_restart(sint32 srcEngine, sint32 dstEngine); void drawing_engine_init(); void drawing_engine_resize(); -void drawing_engine_set_palette(SDL_Color * colours); +void drawing_engine_set_palette(const rct_palette_entry * colours); void drawing_engine_draw(); void drawing_engine_copy_rect(sint32 x, sint32 y, sint32 width, sint32 height, sint32 dx, sint32 dy); void drawing_engine_dispose(); diff --git a/src/openrct2/drawing/drawing.h b/src/openrct2/drawing/drawing.h index 9088238c3c..362584c60d 100644 --- a/src/openrct2/drawing/drawing.h +++ b/src/openrct2/drawing/drawing.h @@ -253,6 +253,7 @@ typedef struct rct_palette { extern sint16 gCurrentFontSpriteBase; extern uint16 gCurrentFontFlags; +extern rct_palette_entry gPalette[256]; extern uint8 gGamePalette[256 * 4]; extern uint32 gPaletteEffectFrame; extern const FILTER_PALETTE_ID GlassPaletteIds[COLOUR_COUNT]; diff --git a/src/openrct2/interface/screenshot.c b/src/openrct2/interface/screenshot.c index ee6e677bce..19f5fd383b 100644 --- a/src/openrct2/interface/screenshot.c +++ b/src/openrct2/interface/screenshot.c @@ -59,13 +59,7 @@ void screenshot_check() static void screenshot_get_rendered_palette(rct_palette* palette) { for (sint32 i = 0; i < 256; i++) { - const SDL_Color *renderedEntry = &gPalette[i]; - rct_palette_entry *entry = &palette->entries[i]; - - entry->red = renderedEntry->r; - entry->green = renderedEntry->g; - entry->blue = renderedEntry->b; - entry->alpha = renderedEntry->a; + palette->entries[i] = gPalette[i]; } } diff --git a/src/openrct2/network/NetworkConnection.cpp b/src/openrct2/network/NetworkConnection.cpp index 54fa4904aa..811d0d139f 100644 --- a/src/openrct2/network/NetworkConnection.cpp +++ b/src/openrct2/network/NetworkConnection.cpp @@ -19,7 +19,6 @@ #include "network.h" #include "NetworkConnection.h" #include "../core/String.hpp" -#include extern "C" { diff --git a/src/openrct2/platform/platform.h b/src/openrct2/platform/platform.h index 23007b4cc7..bbdf1c26b7 100644 --- a/src/openrct2/platform/platform.h +++ b/src/openrct2/platform/platform.h @@ -99,8 +99,6 @@ typedef struct file_dialog_desc { } filters[8]; } file_dialog_desc; -extern SDL_Color gPalette[256]; - // Platform shared definitions void platform_init(); void platform_draw(); diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index 5fc8094a8e..e545285ecb 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -49,11 +49,7 @@ typedef void(*update_palette_func)(const uint8*, sint32, sint32); -SDL_Renderer *gRenderer = NULL; -SDL_Texture *gBufferTexture = NULL; -SDL_PixelFormat *gBufferTextureFormat = NULL; -SDL_Color gPalette[256]; -uint32 gPaletteHWMapped[256]; +rct_palette_entry gPalette[256]; void platform_draw() { @@ -110,14 +106,11 @@ void platform_update_palette(const uint8* colours, sint32 start_index, sint32 nu } } - gPalette[i].r = r; - gPalette[i].g = g; - gPalette[i].b = b; - gPalette[i].a = 0; + gPalette[i].red = r; + gPalette[i].green = g; + gPalette[i].blue = b; + gPalette[i].alpha = 0; colours += 4; - if (gBufferTextureFormat != NULL) { - gPaletteHWMapped[i] = SDL_MapRGB(gBufferTextureFormat, gPalette[i].r, gPalette[i].g, gPalette[i].b); - } } if (!gOpenRCT2Headless) { @@ -133,10 +126,10 @@ void platform_init() // Set the highest palette entry to white. // This fixes a bug with the TT:rainbow road due to the // image not using the correct white palette entry. - gPalette[255].a = 0; - gPalette[255].r = 255; - gPalette[255].g = 255; - gPalette[255].b = 255; + gPalette[255].alpha = 0; + gPalette[255].red = 255; + gPalette[255].green = 255; + gPalette[255].blue = 255; } sint32 platform_scancode_to_rct_keycode(sint32 sdl_key) From fc19b57c0980fcabc05fd602f34ca68352dc6c00 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 6 May 2017 19:17:46 +0100 Subject: [PATCH 30/76] Fix build after rebase --- src/openrct2/Context.cpp | 2 +- src/openrct2/windows/scenery.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index be0c330b48..b6bf62263c 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -570,7 +570,7 @@ extern "C" { void openrct2_write_full_version_info(utf8 * buffer, size_t bufferSize) { - String::Set(buffer, bufferSize, Version::GetInfo().c_str()); + String::Set(buffer, bufferSize, gVersionInfoFull); } void openrct2_finish() diff --git a/src/openrct2/windows/scenery.c b/src/openrct2/windows/scenery.c index 2e11b4094c..fb7a14cd2d 100644 --- a/src/openrct2/windows/scenery.c +++ b/src/openrct2/windows/scenery.c @@ -1257,7 +1257,7 @@ bool window_scenery_set_selected_item(sint32 sceneryId) gWindowSceneryActiveTabIndex = tabIndex; gWindowSceneryTabSelections[tabIndex] = sceneryId; - audio_play_sound_panned(4, (w->width >> 1) + w->x, 0, 0, 0); + audio_play_sound(SOUND_CLICK_1, 0, context_get_width() / 2); w->scenery.hover_counter = -16; gSceneryPlaceCost = MONEY32_UNDEFINED; window_invalidate(w); From 50197f04eda411d1d0b514cfc05326810bd35212 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 6 May 2017 21:33:23 +0100 Subject: [PATCH 31/76] Fix boolean warning --- src/openrct2-ui/UiContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 495e5597a3..3ff009bc37 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -155,7 +155,7 @@ public: bool HasFocus() override { uint32 windowFlags = GetWindowFlags(); - return (windowFlags & SDL_WINDOW_INPUT_FOCUS); + return (windowFlags & SDL_WINDOW_INPUT_FOCUS) != 0; } bool IsMinimised() override From e133585727e17051830ac6a683813777ac85d292 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 6 May 2017 21:44:30 +0100 Subject: [PATCH 32/76] Fix 32-bit build --- src/openrct2-ui/UiContext.Win32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 78f266e8bf..0c4e63519e 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -134,7 +134,7 @@ namespace OpenRCT2 { namespace Ui sint32 filterIndex = openFileName.nFilterIndex - 1; assert(filterIndex >= 0); - assert(filterIndex < desc.Filters.size()); + assert(filterIndex < (sint32)desc.Filters.size()); std::string pattern = desc.Filters[filterIndex].Pattern; std::string patternExtension = Path::GetExtension(pattern); From 423028dac9bc0f6b7b0fa5d19f32ffeb8a740ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 6 May 2017 22:53:51 +0200 Subject: [PATCH 33/76] Fix some warnings with clang and GCC --- src/openrct2/Context.cpp | 3 +-- src/openrct2/platform/Platform2.cpp | 2 -- src/openrct2/windows/text_input.c | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index b6bf62263c..c7f22b6c84 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -77,7 +77,6 @@ namespace OpenRCT2 IScenarioRepository * _scenarioRepository = nullptr; bool _isWindowMinimised = false; - uint32 _isWindowMinimisedLastCheckTick = 0; uint32 _lastTick = 0; uint32 _uncapTick = 0; @@ -138,7 +137,7 @@ namespace OpenRCT2 /** * Causes the OpenRCT2 game loop to finish. */ - void Finish() + void Finish() override { _finished = true; } diff --git a/src/openrct2/platform/Platform2.cpp b/src/openrct2/platform/Platform2.cpp index 0be0800034..da7ae58f59 100644 --- a/src/openrct2/platform/Platform2.cpp +++ b/src/openrct2/platform/Platform2.cpp @@ -14,8 +14,6 @@ *****************************************************************************/ #pragma endregion -#pragma once - #include "Platform2.h" extern "C" diff --git a/src/openrct2/windows/text_input.c b/src/openrct2/windows/text_input.c index f71621c9a3..d5a8804195 100644 --- a/src/openrct2/windows/text_input.c +++ b/src/openrct2/windows/text_input.c @@ -280,7 +280,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) size_t char_count = 0; uint8 cur_drawn = 0; - sint32 cursorX = 0, cursorY = 0; + sint32 cursorX = 0; for (sint32 line = 0; line <= no_lines; line++) { gfx_draw_string(dpi, wrap_pointer, w->colours[1], w->x + 12, y); @@ -291,7 +291,6 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) char temp_string[TEXT_INPUT_SIZE] = { 0 }; memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count); cursorX = w->x + 13 + gfx_get_string_width(temp_string); - cursorY = y; sint32 width = 6; if (gTextInput->SelectionStart < strlen(text_input)){ @@ -322,7 +321,6 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) if (!cur_drawn) { cursorX = gLastDrawStringX; - cursorY = y - 10; } // IME composition From 98d59ccaa341bbe4bb95900d51f4978042c9efa4 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 6 May 2017 22:48:55 +0100 Subject: [PATCH 34/76] Fix Linux build errors --- src/openrct2-ui/TextComposition.h | 2 +- src/openrct2-ui/Ui.cpp | 10 ++++++++-- src/openrct2-ui/UiContext.Linux.cpp | 8 ++++---- src/openrct2/OpenRCT2.cpp | 1 + src/openrct2/platform/posix.c | 17 ----------------- src/openrct2/ui/UiContext.h | 1 + 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/openrct2-ui/TextComposition.h b/src/openrct2-ui/TextComposition.h index af08a34dc3..e342723eca 100644 --- a/src/openrct2-ui/TextComposition.h +++ b/src/openrct2-ui/TextComposition.h @@ -39,7 +39,7 @@ namespace OpenRCT2 public: bool IsActive(); - TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize); + TextInputSession * Start(utf8 * buffer, size_t bufferSize); void Stop(); void HandleMessage(const SDL_Event * e); diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index 4475594fb4..f8939fe0ef 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -16,10 +16,14 @@ #ifndef _MSC_VER +#include #include +#include +#include "audio/AudioContext.h" #include "UiContext.h" using namespace OpenRCT2; +using namespace OpenRCT2::Audio; using namespace OpenRCT2::Ui; /** @@ -28,8 +32,10 @@ using namespace OpenRCT2::Ui; int main(int argc, char * * argv) { // Run OpenRCT2 with a UI context - IContext * context = CreateContext(); - IUiContext * uiContext = CreateContext(context); + + IAudioContext * audioContext = CreateAudioContext(); + IUiContext * uiContext = CreateUiContext(); + IContext * context = CreateContext(audioContext, uiContext); int exitCode = context->RunOpenRCT2(argc, argv); delete uiContext; delete context; diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 43febb6b74..a854fae9a1 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -16,6 +16,7 @@ #ifdef __linux__ +#include #include #include #include @@ -154,13 +155,13 @@ namespace OpenRCT2 { namespace Ui log_verbose("filename = %s", result.c_str()); - if (desc.Type == FILE_DIALOG_TYPE::OPEN && access(result, F_OK) == -1) + if (desc.Type == FILE_DIALOG_TYPE::OPEN && access(result.c_str(), F_OK) == -1) { std::string msg = String::StdFormat("\"%s\" not found: %s, please choose another file\n", result.c_str(), strerror(errno)); ShowMessageBox(window, msg); return ShowFileDialog(window, desc); } - else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result, F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) + else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result.c_str(), F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) { std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath, result.c_str()); if (Execute(cmd) != 0) @@ -274,7 +275,7 @@ namespace OpenRCT2 { namespace Ui { // KDialog wants filters space-delimited and we don't expect ';' anywhere else std::string pattern = filter.Pattern; - for (sint32 i = 0; i < pattern.size(); i++) + for (size_t i = 0; i < pattern.size(); i++) { if (pattern[i] == ';') { @@ -299,7 +300,6 @@ namespace OpenRCT2 { namespace Ui { // Zenity seems to be case sensitive, while KDialog isn't std::stringstream filtersb; - bool first = true; for (const auto &filter : filters) { filtersb << " --file-filter='" << filter.Name << " | "; diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index de4bcc0110..7edbdeb157 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -23,6 +23,7 @@ extern "C" { #include "audio/audio.h" #include "platform/platform.h" + #include "rct2.h" } extern "C" diff --git a/src/openrct2/platform/posix.c b/src/openrct2/platform/posix.c index 18bbc1d0bb..4b8e572c00 100644 --- a/src/openrct2/platform/posix.c +++ b/src/openrct2/platform/posix.c @@ -46,23 +46,6 @@ utf8 _userDataDirectoryPath[MAX_PATH] = { 0 }; utf8 _openrctDataDirectoryPath[MAX_PATH] = { 0 }; -/** - * The main entry point for non-Windows platforms. - */ -sint32 main(sint32 argc, const char **argv) -{ - core_init(); - - sint32 exitCode = cmdline_run(argv, argc); - if (exitCode == 1) - { - openrct2_launch(); - exitCode = gExitCode; - } - - return exitCode; -} - void platform_get_date_utc(rct2_date *out_date) { assert(out_date != NULL); diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 48079a2f92..5a49cad541 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -16,6 +16,7 @@ #pragma once +#include #include #include "../common.h" #include "../Context.h" From e670a386baeedeb52e2deb696b63767f01fc0fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 7 May 2017 08:55:34 +0200 Subject: [PATCH 35/76] Add cmath include to AudioMixer for std::pow --- src/openrct2/audio/AudioMixer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index 1a5d0b6ee3..3594c4a151 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include #include "../config/Config.h" #include "../Context.h" #include "audio.h" From 23a314d4ba66541bfc2076988807a18964c160bf Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 17:28:33 +0100 Subject: [PATCH 36/76] Convert tabs to spaces for test cmakelists --- test/tests/CMakeLists.txt | 94 +++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index 763fa706f7..8c52e76031 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -4,13 +4,13 @@ cmake_minimum_required(VERSION 2.6) INCLUDE(ExternalProject) ExternalProject_Add( - googletest-distribution - URL https://github.com/google/googletest/archive/release-1.8.0.tar.gz - URL_HASH SHA1=e7e646a6204638fe8e87e165292b8dd9cd4c36ed - TIMEOUT 10 - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" + googletest-distribution + URL https://github.com/google/googletest/archive/release-1.8.0.tar.gz + URL_HASH SHA1=e7e646a6204638fe8e87e165292b8dd9cd4c36ed + TIMEOUT 10 + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" ) # Specify include dir @@ -18,19 +18,19 @@ ExternalProject_Get_Property(googletest-distribution SOURCE_DIR) set(GOOGLETEST_DISTRIB_SOURCE_DIR "${SOURCE_DIR}") ExternalProject_Add( - googletest - DEPENDS googletest-distribution - DOWNLOAD_COMMAND "" - SOURCE_DIR "${GOOGLETEST_DISTRIB_SOURCE_DIR}/googletest" - CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${TARGET_M}" - BUILD_BYPRODUCTS "googletest-prefix/src/googletest-build/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}" - BUILD_BYPRODUCTS "googletest-prefix/src/googletest-build/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}" - # Disable install step - INSTALL_COMMAND "" - # Wrap download, configure and build steps in a script to log output - LOG_DOWNLOAD ON - LOG_CONFIGURE ON - LOG_BUILD ON) + googletest + DEPENDS googletest-distribution + DOWNLOAD_COMMAND "" + SOURCE_DIR "${GOOGLETEST_DISTRIB_SOURCE_DIR}/googletest" + CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${TARGET_M}" + BUILD_BYPRODUCTS "googletest-prefix/src/googletest-build/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}" + BUILD_BYPRODUCTS "googletest-prefix/src/googletest-build/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}" + # Disable install step + INSTALL_COMMAND "" + # Wrap download, configure and build steps in a script to log output + LOG_DOWNLOAD ON + LOG_CONFIGURE ON + LOG_BUILD ON) # Specify include dir @@ -57,16 +57,16 @@ set(GTEST_LIBRARIES gtest gtest_main pthread) # Some most common files required in tests set(COMMON_TEST_SOURCES - "../../src/openrct2/core/Console.cpp" - "../../src/openrct2/core/Diagnostics.cpp" - "../../src/openrct2/core/Guard.cpp" - "../../src/openrct2/core/String.cpp" - "../../src/openrct2/diagnostic.c" - "../../src/openrct2/localisation/format_codes.c" - "../../src/openrct2/localisation/utf8.c" - "../../src/openrct2/util/util.c" - "../../src/openrct2/Version.cpp" - ) + "../../src/openrct2/core/Console.cpp" + "../../src/openrct2/core/Diagnostics.cpp" + "../../src/openrct2/core/Guard.cpp" + "../../src/openrct2/core/String.cpp" + "../../src/openrct2/diagnostic.c" + "../../src/openrct2/localisation/format_codes.c" + "../../src/openrct2/localisation/utf8.c" + "../../src/openrct2/util/util.c" + "../../src/openrct2/Version.cpp" + ) # Create a re-usable library to save some compilation time add_library(test-common STATIC ${COMMON_TEST_SOURCES}) @@ -76,41 +76,41 @@ add_library(test-common STATIC ${COMMON_TEST_SOURCES}) # sawyercoding test set(SAWYERCODING_TEST_SOURCES - "sawyercoding_test.cpp" - "../../src/openrct2/diagnostic.c" - "../../src/openrct2/util/sawyercoding.c" - "../../src/openrct2/localisation/utf8.c" - ) + "sawyercoding_test.cpp" + "../../src/openrct2/diagnostic.c" + "../../src/openrct2/util/sawyercoding.c" + "../../src/openrct2/localisation/utf8.c" + ) add_executable(test_sawyercoding ${SAWYERCODING_TEST_SOURCES}) target_link_libraries(test_sawyercoding ${GTEST_LIBRARIES}) add_test(NAME sawyercoding COMMAND test_sawyercoding) # LanguagePack test set(LANGUAGEPACK_TEST_SOURCES - "LanguagePackTest.cpp" - "../../src/openrct2/localisation/LanguagePack.cpp" - ) + "LanguagePackTest.cpp" + "../../src/openrct2/localisation/LanguagePack.cpp" + ) add_executable(test_languagepack ${LANGUAGEPACK_TEST_SOURCES}) target_link_libraries(test_languagepack ${GTEST_LIBRARIES} test-common dl z SDL2) add_test(NAME languagepack COMMAND test_languagepack) # INI test set(INI_TEST_SOURCES - "IniWriterTest.cpp" - "IniReaderTest.cpp" - "../../src/openrct2/config/IniReader.cpp" - "../../src/openrct2/config/IniWriter.cpp" - "../../src/openrct2/core/IStream.cpp" - "../../src/openrct2/core/MemoryStream.cpp" - ) + "IniWriterTest.cpp" + "IniReaderTest.cpp" + "../../src/openrct2/config/IniReader.cpp" + "../../src/openrct2/config/IniWriter.cpp" + "../../src/openrct2/core/IStream.cpp" + "../../src/openrct2/core/MemoryStream.cpp" + ) add_executable(test_ini ${INI_TEST_SOURCES}) target_link_libraries(test_ini ${GTEST_LIBRARIES} test-common dl z) add_test(NAME ini COMMAND test_ini) # String test set(STRING_TEST_SOURCES - "StringTest.cpp" - ) + "StringTest.cpp" + ) add_executable(test_string ${STRING_TEST_SOURCES}) target_link_libraries(test_string ${GTEST_LIBRARIES} test-common dl z) add_test(NAME string COMMAND test_string) From 1f8f354e49b0fa47bd8d1c1e7bca633809acec06 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 17:35:15 +0100 Subject: [PATCH 37/76] Update root cmake and enable tests --- CMakeLists.txt | 473 +++----------------------------------- src/CMakeLists.txt | 59 ----- test/tests/CMakeLists.txt | 46 ++-- 3 files changed, 51 insertions(+), 527 deletions(-) delete mode 100644 src/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f1d03669d..0a906d7931 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,484 +1,67 @@ +# CMAKE project for openrct2 cmake_minimum_required(VERSION 2.6) - -# -# Execute these commands in this directory: -# -# 1. mkdir build/; cd build/ -# -# 2. Choose compiler: -# Build with native toolchain: -# cmake -DCMAKE_BUILD_TYPE=Debug .. -# -# Build with mingw: -# cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Debug .. -# -# 3. make -# - - -# project title -set (PROJECT openrct2) -# OpenRCT2 resource directory -set (ORCT2_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/) - -project(${PROJECT}) - if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() -add_definitions(-DORCT2_RESOURCE_DIR="${ORCT2_RESOURCE_DIR}") -add_definitions(-DHAVE_CONFIG_H) -add_definitions(-DCURL_STATICLIB) +set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}") -# Define current git branch. +option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") +option(CLI_ONLY "CLI only build of OpenRCT2") +option(WITH_TESTS "Build tests") + +# Define current git branch execute_process( COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${ROOT_DIR} OUTPUT_VARIABLE OPENRCT2_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) add_definitions(-DOPENRCT2_BRANCH="${OPENRCT2_BRANCH}") -# Define commit hash. +# Define commit hash execute_process( COMMAND git rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${ROOT_DIR} OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1 OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) add_definitions(-DOPENRCT2_COMMIT_SHA1="${OPENRCT2_COMMIT_SHA1}") -# Define short commit hash. +# Define short commit hash execute_process( COMMAND git rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${ROOT_DIR} OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) + # Tagged builds are not meant to display commit info if (NOT OPENRCT2_COMMIT_SHA1_SHORT STREQUAL "HEAD") add_definitions(-DOPENRCT2_COMMIT_SHA1_SHORT="${OPENRCT2_COMMIT_SHA1_SHORT}") endif() -# Convenience functions to set compiler flags only if available -include(CheckCCompilerFlag) -include(CheckCXXCompilerFlag) - -function(ADD_CHECK_C_COMPILER_FLAG - _CFLAGS - _CACHE_VAR - _FLAG - ) - - CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") - if(${_CACHE_VAR}) - # message(STATUS "Using CFLAG: ${_FLAG}") - set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE) - else() - message(STATUS "Unsupported CFLAG: ${_FLAG}") - endif() -endfunction() - -function(ADD_CHECK_CXX_COMPILER_FLAG - _CXXFLAGS - _CACHE_VAR - _FLAG - ) - - CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") - if(${_CACHE_VAR}) - # message(STATUS "Using CXXFLAG: ${_FLAG}") - set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE) - else() - message(STATUS "Unsupported CXXFLAG: ${_FLAG}") - endif() -endfunction() - -# pkg-config -INCLUDE(FindPkgConfig) - -# Needed for linking with non-broken OpenSSL on Apple platforms -if (APPLE) - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/openssl/lib/pkgconfig") -endif (APPLE) - -# Options - -option(DISABLE_HTTP_TWITCH "Disable HTTP and Twitch support.") -option(DISABLE_NETWORK "Disable multiplayer functionality. Mainly for testing.") -option(STATIC "Create a static build.") -option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags") -option(DISABLE_OPENGL "Disable OpenGL support.") -option(DISABLE_RCT2 "Build a standalone version, without using code and data segments from vanilla. On by default." ON) -option(USE_MMAP "Use mmap to try loading rct2's data segment into memory.") -option(WITH_TESTS "Build tests") -option(DISABLE_TTF "Disable support for TTF provided by SDL2_ttf.") -option(ENABLE_LIGHTFX "Enable lighting effects." ON) - -set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-aliasing -Werror -Wundef -Wmissing-declarations -Winit-self -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-missing-braces ") -set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -Wno-comment -Wshadow -Wmissing-declarations -Wnonnull") - -# macOS builds fail on the use of tmpnam otherwise (#4959) -if(APPLE) - set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -Wno-error=deprecated-declarations -Wno-error=objc-method-access") -endif() - -# On mingw all code is already PIC, this will avoid compiler error on redefining this option -if(NOT MINGW) - set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fPIC") -endif() - -if (NOT DISABLE_RCT2) - set (FORCE32 ON) - message("DISABLE_RCT2 implies FORCE32") -endif() - -if (DISABLE_HTTP_TWITCH) - add_definitions(-DDISABLE_HTTP -DDISABLE_TWITCH) -endif (DISABLE_HTTP_TWITCH) - -if (DISABLE_TTF) - add_definitions(-DNO_TTF) -endif (DISABLE_TTF) - -if (ENABLE_LIGHTFX) - add_definitions(-D__ENABLE_LIGHTFX__) -endif (ENABLE_LIGHTFX) - -# Launchpad turns on -Wdate-time for compilers that support it, this shouldn't break our build -ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_WRITE_STRINGS -Wno-error=date-time) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_WRITE_STRINGS -Wno-error=date-time) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_TYPES -Wsuggest-final-types) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_METHODS -Wsuggest-final-methods) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wsuggest-override) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DUPLICATED_COND -Wduplicated-cond) -if (MINGW) - ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wno-error=redundant-decls) -endif () -# Items below are not supported by ICC -ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_REDUNDANT_DECLS -Wredundant-decls) -ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_IGNORED_QUALIFIERS -Wignored-qualifiers) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_IGNORED_QUALIFIERS -Wignored-qualifiers) - -# -Wstrict-overflow is only active when -fstrict-overflow is enabled, but -fstrict-overflow -# is enabled on -O2, -O3, -Os. This should help catch bugs locally before they reach Travis -# As of 2a435bf -Wstrict-overflow=1 passes, but higher values do not. -set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-overflow") -ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) -ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_STRICT_OVERFLOW -Wstrict-overflow=1) - -if (FORCE32) - set(TARGET_M "-m32") -endif() - -if (FORCE32) - set(OBJ_FORMAT "elf32-i386") - set(LINKER_SCRIPT "ld_script_i386.xc") -endif () - -if (DISABLE_OPENGL) - add_definitions(-DDISABLE_OPENGL) -else (DISABLE_OPENGL) - # Makes OpenGL function get queried in run-time rather than linked-in - add_definitions(-DOPENGL_NO_LINK) -endif (DISABLE_OPENGL) - -if (USE_MMAP) - add_definitions(-DUSE_MMAP) -endif (USE_MMAP) - -if (DISABLE_NETWORK) - add_definitions(-DDISABLE_NETWORK) -else (DISABLE_NETWORK) - if (WIN32) - SET(NETWORKLIBS ${NETWORKLIBS} ws2_32) - endif (WIN32) - # If you are on macOS, CMake might try using system-provided OpenSSL. - # This is too old and will not work. - PKG_CHECK_MODULES(SSL REQUIRED openssl>=1.0.0) -endif (DISABLE_NETWORK) - -if (DISABLE_RCT2) - add_definitions(-DNO_RCT2) -endif (DISABLE_RCT2) - -# Start of library checks - -PKG_CHECK_MODULES(PNG libpng>=1.6) -if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG libpng16) -endif (NOT PNG_FOUND) -if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG libpng>=1.2) -endif (NOT PNG_FOUND) -if (NOT PNG_FOUND) - PKG_CHECK_MODULES(PNG REQUIRED libpng12) -endif (NOT PNG_FOUND) - -PKG_CHECK_MODULES(ZLIB REQUIRED zlib) -PKG_CHECK_MODULES(JANSSON REQUIRED jansson>=2.5) - -# Handle creating the rct2 text and data files on macOS and Linux -# See details in src/openrct2/rct2/interop.c:rct2_interop_setup_segment for how the values -# were derived. -if ((NOT DISABLE_RCT2) AND UNIX) - add_custom_command( - OUTPUT openrct2_text - COMMAND dd if="${CMAKE_CURRENT_SOURCE_DIR}/openrct2.exe" of="${CMAKE_BINARY_DIR}/openrct2_text" bs=4096 skip=1 count=1187 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/openrct2.exe - ) - add_custom_command( - OUTPUT openrct2_data - COMMAND dd if="${CMAKE_CURRENT_SOURCE_DIR}/openrct2.exe" of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 skip=1188 count=318 - COMMAND dd if=/dev/zero of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 seek=318 count=2630 conv=notrunc - COMMAND dd if="${CMAKE_CURRENT_SOURCE_DIR}/openrct2.exe" of="${CMAKE_BINARY_DIR}/openrct2_data" bs=4096 skip=1506 seek=2948 count=1 conv=notrunc - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/openrct2.exe - ) - add_custom_target(segfiles DEPENDS openrct2_text openrct2_data) - if (NOT USE_MMAP) - if (APPLE) - set(RCT2_SEGMENT_LINKER_FLAGS "-sectcreate rct2_text __text ${CMAKE_BINARY_DIR}/openrct2_text -sectcreate rct2_data __data ${CMAKE_BINARY_DIR}/openrct2_data -segaddr rct2_data 0x8a4000 -segprot rct2_data rwx rwx -segaddr rct2_text 0x401000 -segprot rct2_text rwx rwx -segaddr __TEXT 0x2000000 -read_only_relocs suppress") - else (APPLE) - # For Linux we have to use objcopy to wrap regular binaries into a linkable - # format. We use specific section names which are then referenced in a - # bespoke linker script so they can be placed at predefined VMAs. - add_custom_command( - OUTPUT openrct2_text_section.o - COMMAND objcopy --input binary --output ${OBJ_FORMAT} --binary-architecture i386 openrct2_text openrct2_text_section.o --rename-section .data=.rct2_text,contents,alloc,load,readonly,code - DEPENDS segfiles - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - ) - add_custom_command( - OUTPUT openrct2_data_section.o - COMMAND objcopy --input binary --output ${OBJ_FORMAT} --binary-architecture i386 openrct2_data openrct2_data_section.o --rename-section .data=.rct2_data,contents,alloc,load,readonly,data - DEPENDS segfiles - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - ) - add_custom_target(linkable_sections DEPENDS openrct2_text_section.o openrct2_data_section.o) - SET_SOURCE_FILES_PROPERTIES( - openrct2_text_section.o openrct2_data_section.o - PROPERTIES - EXTERNAL_OBJECT true - GENERATED true - ) - # can't use GLOB here, as the files don't exist yet at cmake-time - set(RCT2_SECTIONS "${CMAKE_BINARY_DIR}/openrct2_data_section.o" "${CMAKE_BINARY_DIR}/openrct2_text_section.o") - set(RCT2_SEGMENT_LINKER_FLAGS "-Wl,-T,\"${CMAKE_CURRENT_SOURCE_DIR}/distribution/linux/${LINKER_SCRIPT}\"") - endif (APPLE) - endif (NOT USE_MMAP) -elseif (USE_MMAP) - # No dd here, can't extract data segment - message(WARNING "Sorry, your platform is not supported, you have to extract data segment manually") -endif ((NOT DISABLE_RCT2) AND UNIX) -set(DEBUG_LEVEL 0 CACHE STRING "Select debug level for compilation. Use value in range 0–3.") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG=${DEBUG_LEVEL}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG=${DEBUG_LEVEL}") - -# include lib -include_directories("lib/") -# add source files -file(GLOB_RECURSE ORCT2_SOURCES "src/openrct2/*.c" "src/openrct2/*.cpp" "src/openrct2/*.h" "src/openrct2/*.hpp") -if (APPLE) - file(GLOB_RECURSE ORCT2_MM_SOURCES "src/openrct2/*.m") - set_source_files_properties(${ORCT2_MM_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c -fmodules") -endif (APPLE) - - -if (APPLE AND NOT USE_MMAP) - set(PIE_FLAG "-fno-pie") +# Include sub-projects +include("${ROOT_DIR}/src/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) +if (CLI_ONLY) + include("${ROOT_DIR}/src/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) else () - set(PIE_FLAG "-fpie") + include("${ROOT_DIR}/src/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) endif () -# set necessary flags to compile code as is -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_M} -std=gnu11 ${COMMON_COMPILE_OPTIONS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M} -std=gnu++14 ${COMMON_COMPILE_OPTIONS} -Wnon-virtual-dtor") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${TARGET_M}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${PIE_FLAG}") - -if (MINGW) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++") -endif () - -option(WITH_BREAKPAD "Enable breakpad") -if (WITH_BREAKPAD) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_BREAKPAD") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BREAKPAD") - set(BREAKPAD_DIR "/home/janisozaur/workspace/breakpad/src") - set(BREAKPAD_INCLUDE_DIR "${BREAKPAD_DIR}/src") - set(BREAKPAD_LIBRARY_DIR "${BREAKPAD_DIR}/src/client/linux") - set(BREAKPAD_LIBS breakpad_client pthread) -endif (WITH_BREAKPAD) - -PKG_CHECK_MODULES(LIBZIP REQUIRED libzip>=1.0) -# find and include SDL2 -PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) -if (NOT DISABLE_TTF) - PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) -endif (NOT DISABLE_TTF) - -if (STATIC) - if (NOT DISABLE_TTF) - # FreeType is required by SDL2_ttf, but not wired up properly in package - PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2) - endif (NOT DISABLE_TTF) - SET(SDL2LIBS ${SDL2_STATIC_LIBRARIES} ${SDL2_TTF_STATIC_LIBRARIES} ${FREETYPE_STATIC_LIBRARIES}) -else (STATIC) - SET(SDL2LIBS ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARIES}) -endif (STATIC) - -if (STATIC) - set(STATIC_START "-static") - SET(REQUIREDLIBS ${PNG_STATIC_LIBRARIES} ${JANSSON_STATIC_LIBRARIES} ${ZLIB_STATIC_LIBRARIES} ${SSL_STATIC_LIBRARIES} ${LIBZIP_STATIC_LIBRARIES}) -else (STATIC) - SET(REQUIREDLIBS ${PNG_LIBRARIES} ${JANSSON_LIBRARIES} ${ZLIB_LIBRARIES} ${SSL_LIBRARIES} ${LIBZIP_LIBRARIES}) -endif (STATIC) - -if (NOT DISABLE_OPENGL) - if (WIN32) - # Curl depends on openssl and ws2 in mingw builds, but is not wired up in pkg-config - set(GLLIBS opengl32) - # mingw complains about "%zu" not being a valid format specifier for printf, unless we - # tell it that it is - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") - elseif (APPLE) - # GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu. - find_package(OpenGL REQUIRED) - set(GLLIBS ${OPENGL_LIBRARY}) - else (WIN32) - PKG_CHECK_MODULES(GL REQUIRED gl) - set(GLLIBS ${GL_LIBRARIES}) - endif (WIN32) -endif (NOT DISABLE_OPENGL) - -if (NOT DISABLE_HTTP_TWITCH) - PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) - if (WIN32) - # Curl depends on openssl and ws2 in mingw builds, but is not wired up in pkg-config - set(WSLIBS ws2_32) - endif (WIN32) - if (STATIC) - SET(HTTPLIBS ${LIBCURL_STATIC_LIBRARIES} ${WSLIBS}) - else (STATIC) - SET(HTTPLIBS ${LIBCURL_LIBRARIES} ${WSLIBS}) - endif (STATIC) -endif (NOT DISABLE_HTTP_TWITCH) - -PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) - -if (UNIX AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD") - # Include libdl for dlopen - set(DLLIB dl) -endif () - -# libzip library has issues with some of the enabled warning, include it as system library -INCLUDE_DIRECTORIES(SYSTEM ${LIBZIP_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${LIBCURL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS} ${SPEEX_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${BREAKPAD_INCLUDE_DIR} ${SSL_INCLUDE_DIRS}) - -LINK_DIRECTORIES(${SDL2_LIBRARY_DIRS} ${JANSSON_LIBRARY_DIRS} ${LIBCURL_LIBRARY_DIRS} ${PNG_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${BREAKPAD_LIBRARY_DIR} ${SSL_LIBRARY_DIRS} ${LIBZIP_LIBRARY_DIRS}) - -if (NOT DISABLE_RCT2) - # Disable optimizations for addresses.c for all compilers, to allow optimized - # builds without need for -fno-omit-frame-pointer - set_source_files_properties(src/openrct2/addresses.c PROPERTIES COMPILE_FLAGS -O0) -endif (NOT DISABLE_RCT2) - -if (WIN32) - # build as library for now, replace with add_executable - if (USE_MMAP OR DISABLE_RCT2) - add_executable(${PROJECT} ${ORCT2_SOURCES} ${SPEEX_SOURCES}) - else () - add_library(${PROJECT} SHARED ${ORCT2_SOURCES} ${SPEEX_SOURCES}) - endif () -else (WIN32) - add_executable(${PROJECT} ${ORCT2_SOURCES} ${ORCT2_MM_SOURCES} ${RCT2_SECTIONS}) - if (NOT DISABLE_RCT2) - add_dependencies(${PROJECT} segfiles) - if (NOT APPLE AND NOT USE_MMAP) - add_dependencies(${PROJECT} linkable_sections) - endif () - set_target_properties(${PROJECT} PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) - endif (NOT DISABLE_RCT2) - add_custom_command( - OUTPUT g2.dat - COMMAND ./openrct2 sprite build ${CMAKE_BINARY_DIR}/g2.dat ${CMAKE_CURRENT_SOURCE_DIR}/resources/g2/sprites.json - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - ) - add_custom_target(g2 DEPENDS ${PROJECT} g2.dat) -endif (WIN32) - -if (UNIX AND NOT APPLE AND NOT DISABLE_TTF) - # FontConfig for TrueType fonts. - PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) - INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIRS}) - TARGET_LINK_LIBRARIES(${PROJECT} ${FONTCONFIG_LIBRARIES}) -endif (UNIX AND NOT APPLE AND NOT DISABLE_TTF) - - -# install into ${CMAKE_INSTALL_PREFIX}/bin/ -#install (TARGETS ${PROJECT} DESTINATION bin) - -# libopenrct2.dll -> openrct2.dll -set_target_properties(${PROJECT} PROPERTIES PREFIX "") -set_target_properties(${PROJECT} PROPERTIES COMPILE_FLAGS "-Wundef") - -# Link shared libs first -TARGET_LINK_LIBRARIES(${PROJECT} pthread ${GLLIBS}) -# if creating a static binary, precede libraries with -static, then name all the libs -TARGET_LINK_LIBRARIES(${PROJECT} ${STATIC_START} ${SDL2LIBS} ${HTTPLIBS} ${NETWORKLIBS} ${SPEEX_LIBRARIES} ${DLLIB} ${REQUIREDLIBS} ${BREAKPAD_LIBS}) - -if (APPLE OR STATIC OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD") - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) - TARGET_LINK_LIBRARIES(${PROJECT} ${ICONV_LIBRARIES}) -endif () - -# Don't recurse, grab all *.txt and *.md files -file(GLOB DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/distribution/*.txt") -list(APPEND DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/contributors.md" "${CMAKE_CURRENT_SOURCE_DIR}/licence.txt") - -# CMake does not allow specifying a dependency chain which includes built-in -# targets, like `install`, so we have to trick it and execute dependency ourselves. -install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)") -install(CODE "file(DOWNLOAD https://github.com/OpenRCT2/title-sequences/releases/download/v0.0.5/title-sequence-v0.0.5.zip \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=79ffb2585d12abcbfce205d7696e3472a504b005 SHOW_PROGRESS)") -install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)") -install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)") -install(TARGETS ${PROJECT} RUNTIME DESTINATION bin) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION share/${PROJECT}) -install(DIRECTORY data/ DESTINATION share/${PROJECT}) -install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT}) - -install(FILES resources/logo/icon_x16.png DESTINATION share/icons/hicolor/16x16/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x32.png DESTINATION share/icons/hicolor/32x32/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x64.png DESTINATION share/icons/hicolor/64x64/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x256.png DESTINATION share/icons/hicolor/256x256/apps RENAME openrct2.png) -install(FILES resources/logo/icon_flag.svg DESTINATION share/icons/hicolor/scalable/apps RENAME openrct2.svg) -install(FILES distribution/linux/openrct2.desktop DESTINATION share/applications) +# g2 +add_custom_command( + OUTPUT g2.dat + COMMAND ./openrct2 sprite build ${CMAKE_BINARY_DIR}/g2.dat ${ROOT_DIR}/resources/g2/sprites.json + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) +add_custom_target(g2 DEPENDS ${PROJECT} g2.dat) +# Include tests if (WITH_TESTS) enable_testing() - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/tests/) + # include("${ROOT_DIR}/test/testpaint/CMakeLists.txt" NO_POLICY_SCOPE) + include("${ROOT_DIR}/test/tests/CMakeLists.txt" NO_POLICY_SCOPE) endif () - -if (UNIX AND (NOT USE_MMAP) AND (NOT DISABLE_RCT2) AND (FORCE32)) - set(OPENRCT2_SRCPATH "src/openrct2") - file(GLOB_RECURSE ORCT2_RIDE_SOURCES "${OPENRCT2_SRCPATH}/ride/*/*.c") - file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "${OPENRCT2_SRCPATH}/ride/ride_data.c" "${OPENRCT2_SRCPATH}/ride/track_data.c" "${OPENRCT2_SRCPATH}/ride/track_data_old.c" "${OPENRCT2_SRCPATH}/ride/track_paint.c" "${OPENRCT2_SRCPATH}/rct2/addresses.c" "${OPENRCT2_SRCPATH}/diagnostic.c" "${OPENRCT2_SRCPATH}/rct2/hook.c" "${OPENRCT2_SRCPATH}/paint/map_element/map_element.c" "${OPENRCT2_SRCPATH}/paint/paint_helpers.c") - file(GLOB_RECURSE ORCT2_TESTPAINT_SOURCES "test/testpaint/*.c" "test/testpaint/*.cpp" "test/testpaint/*.h") - - add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_TESTPAINT_SOURCES} ${RCT2_SECTIONS}) - target_include_directories(testpaint PRIVATE "src/") - set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES -D__TESTPAINT__ -Wno-unused") - set_target_properties(testpaint PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) - add_dependencies(testpaint segfiles) -endif () - -set(CPACK_PACKAGE_VERSION_MAJOR 0) -set(CPACK_PACKAGE_VERSION_MINOR 0) -set(CPACK_PACKAGE_VERSION_PATCH 8) -INCLUDE(CPack) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index af92abf923..0000000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -# CMAKE project for openrct2 -cmake_minimum_required(VERSION 2.6) -if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) - message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") -endif() -set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/..") - -option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") -option(CLI_ONLY "CLI only build of OpenRCT2") - -# Define current git branch -execute_process( - COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${ROOT_DIR} - OUTPUT_VARIABLE OPENRCT2_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET -) -add_definitions(-DOPENRCT2_BRANCH="${OPENRCT2_BRANCH}") - -# Define commit hash -execute_process( - COMMAND git rev-parse HEAD - WORKING_DIRECTORY ${ROOT_DIR} - OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1 - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET -) -add_definitions(-DOPENRCT2_COMMIT_SHA1="${OPENRCT2_COMMIT_SHA1}") - -# Define short commit hash -execute_process( - COMMAND git rev-parse --short HEAD - WORKING_DIRECTORY ${ROOT_DIR} - OUTPUT_VARIABLE OPENRCT2_COMMIT_SHA1_SHORT - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET -) - -# Tagged builds are not meant to display commit info -if (NOT OPENRCT2_COMMIT_SHA1_SHORT STREQUAL "HEAD") - add_definitions(-DOPENRCT2_COMMIT_SHA1_SHORT="${OPENRCT2_COMMIT_SHA1_SHORT}") -endif() - -# Include sub-projects -include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) -if (CLI_ONLY) - include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) -else () - include("${CMAKE_CURRENT_SOURCE_DIR}/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) -endif () - -# g2 -add_custom_command( - OUTPUT g2.dat - COMMAND ./openrct2 sprite build ${CMAKE_BINARY_DIR}/g2.dat ${ROOT_DIR}/resources/g2/ - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -) -add_custom_target(g2 DEPENDS ${PROJECT} g2.dat) diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index 8c52e76031..dd583f498f 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -51,21 +51,21 @@ add_dependencies(${GTEST_LIBRARY} googletest) add_dependencies(${GTEST_MAIN_LIBRARY} ${GTEST_LIBRARY}) include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) -include_directories("../../src") +include_directories("${ROOT_DIR}/src") set(GTEST_LIBRARIES gtest gtest_main pthread) # Some most common files required in tests set(COMMON_TEST_SOURCES - "../../src/openrct2/core/Console.cpp" - "../../src/openrct2/core/Diagnostics.cpp" - "../../src/openrct2/core/Guard.cpp" - "../../src/openrct2/core/String.cpp" - "../../src/openrct2/diagnostic.c" - "../../src/openrct2/localisation/format_codes.c" - "../../src/openrct2/localisation/utf8.c" - "../../src/openrct2/util/util.c" - "../../src/openrct2/Version.cpp" + "${ROOT_DIR}/src/openrct2/core/Console.cpp" + "${ROOT_DIR}/src/openrct2/core/Diagnostics.cpp" + "${ROOT_DIR}/src/openrct2/core/Guard.cpp" + "${ROOT_DIR}/src/openrct2/core/String.cpp" + "${ROOT_DIR}/src/openrct2/diagnostic.c" + "${ROOT_DIR}/src/openrct2/localisation/format_codes.c" + "${ROOT_DIR}/src/openrct2/localisation/utf8.c" + "${ROOT_DIR}/src/openrct2/util/util.c" + "${ROOT_DIR}/src/openrct2/Version.cpp" ) # Create a re-usable library to save some compilation time @@ -76,10 +76,10 @@ add_library(test-common STATIC ${COMMON_TEST_SOURCES}) # sawyercoding test set(SAWYERCODING_TEST_SOURCES - "sawyercoding_test.cpp" - "../../src/openrct2/diagnostic.c" - "../../src/openrct2/util/sawyercoding.c" - "../../src/openrct2/localisation/utf8.c" + "${CMAKE_CURRENT_LIST_DIR}/sawyercoding_test.cpp" + "${ROOT_DIR}/src/openrct2/diagnostic.c" + "${ROOT_DIR}/src/openrct2/util/sawyercoding.c" + "${ROOT_DIR}/src/openrct2/localisation/utf8.c" ) add_executable(test_sawyercoding ${SAWYERCODING_TEST_SOURCES}) target_link_libraries(test_sawyercoding ${GTEST_LIBRARIES}) @@ -87,8 +87,8 @@ add_test(NAME sawyercoding COMMAND test_sawyercoding) # LanguagePack test set(LANGUAGEPACK_TEST_SOURCES - "LanguagePackTest.cpp" - "../../src/openrct2/localisation/LanguagePack.cpp" + "${CMAKE_CURRENT_LIST_DIR}/LanguagePackTest.cpp" + "${ROOT_DIR}/src/openrct2/localisation/LanguagePack.cpp" ) add_executable(test_languagepack ${LANGUAGEPACK_TEST_SOURCES}) target_link_libraries(test_languagepack ${GTEST_LIBRARIES} test-common dl z SDL2) @@ -96,12 +96,12 @@ add_test(NAME languagepack COMMAND test_languagepack) # INI test set(INI_TEST_SOURCES - "IniWriterTest.cpp" - "IniReaderTest.cpp" - "../../src/openrct2/config/IniReader.cpp" - "../../src/openrct2/config/IniWriter.cpp" - "../../src/openrct2/core/IStream.cpp" - "../../src/openrct2/core/MemoryStream.cpp" + "${CMAKE_CURRENT_LIST_DIR}/IniWriterTest.cpp" + "${CMAKE_CURRENT_LIST_DIR}/IniReaderTest.cpp" + "${ROOT_DIR}/src/openrct2/config/IniReader.cpp" + "${ROOT_DIR}/src/openrct2/config/IniWriter.cpp" + "${ROOT_DIR}/src/openrct2/core/IStream.cpp" + "${ROOT_DIR}/src/openrct2/core/MemoryStream.cpp" ) add_executable(test_ini ${INI_TEST_SOURCES}) target_link_libraries(test_ini ${GTEST_LIBRARIES} test-common dl z) @@ -109,7 +109,7 @@ add_test(NAME ini COMMAND test_ini) # String test set(STRING_TEST_SOURCES - "StringTest.cpp" + "${CMAKE_CURRENT_LIST_DIR}/StringTest.cpp" ) add_executable(test_string ${STRING_TEST_SOURCES}) target_link_libraries(test_string ${GTEST_LIBRARIES} test-common dl z) From a4c06020f169f8cc676acce9ede8eba9b8200441 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 17:51:04 +0100 Subject: [PATCH 38/76] Add install target to cmake --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a906d7931..5d552bd825 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,9 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) endif() set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}") +set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v0.0.5/title-sequence-v0.0.5.zip") +set(TITLE_SEQUENCE_SHA1 "79ffb2585d12abcbfce205d7696e3472a504b005") + option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") option(CLI_ONLY "CLI only build of OpenRCT2") option(WITH_TESTS "Build tests") @@ -65,3 +68,27 @@ if (WITH_TESTS) # include("${ROOT_DIR}/test/testpaint/CMakeLists.txt" NO_POLICY_SCOPE) include("${ROOT_DIR}/test/tests/CMakeLists.txt" NO_POLICY_SCOPE) endif () + +# Install +# Don't recurse, grab all *.txt and *.md files +file(GLOB DOC_FILES "${ROOT_DIR}/distribution/*.txt") +list(APPEND DOC_FILES "${ROOT_DIR}/contributors.md" + "${ROOT_DIR}/licence.txt") + +# CMake does not allow specifying a dependency chain which includes built-in +# targets, like `install`, so we have to trick it and execute dependency ourselves. +install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)") +install(CODE "file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)") +install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)") +install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)") +install(TARGETS ${PROJECT} RUNTIME DESTINATION bin) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION share/${PROJECT}) +install(DIRECTORY data/ DESTINATION share/${PROJECT}) +install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT}) +install(FILES resources/logo/icon_x16.png DESTINATION share/icons/hicolor/16x16/apps RENAME openrct2.png) +install(FILES resources/logo/icon_x32.png DESTINATION share/icons/hicolor/32x32/apps RENAME openrct2.png) +install(FILES resources/logo/icon_x64.png DESTINATION share/icons/hicolor/64x64/apps RENAME openrct2.png) +install(FILES resources/logo/icon_x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME openrct2.png) +install(FILES resources/logo/icon_x256.png DESTINATION share/icons/hicolor/256x256/apps RENAME openrct2.png) +install(FILES resources/logo/icon_flag.svg DESTINATION share/icons/hicolor/scalable/apps RENAME openrct2.svg) +install(FILES distribution/linux/openrct2.desktop DESTINATION share/applications) From 82288f92e6fcf328d5d441aff5bc5734790d50de Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 17:56:04 +0100 Subject: [PATCH 39/76] Add cmake for testpaint --- CMakeLists.txt | 4 +++- test/testpaint/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 test/testpaint/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d552bd825..8bf19e629a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,9 @@ add_custom_target(g2 DEPENDS ${PROJECT} g2.dat) # Include tests if (WITH_TESTS) enable_testing() - # include("${ROOT_DIR}/test/testpaint/CMakeLists.txt" NO_POLICY_SCOPE) + if (UNIX AND (NOT USE_MMAP) AND (NOT DISABLE_RCT2) AND (FORCE32)) + include("${ROOT_DIR}/test/testpaint/CMakeLists.txt" NO_POLICY_SCOPE) + endif () include("${ROOT_DIR}/test/tests/CMakeLists.txt" NO_POLICY_SCOPE) endif () diff --git a/test/testpaint/CMakeLists.txt b/test/testpaint/CMakeLists.txt new file mode 100644 index 0000000000..6882c5d3ad --- /dev/null +++ b/test/testpaint/CMakeLists.txt @@ -0,0 +1,26 @@ +# CMAKE project for testpaint +cmake_minimum_required(VERSION 2.6) +if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) + message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") +endif () + +set(OPENRCT2_SRCPATH "${ROOT_DIR}/src/openrct2") +file(GLOB_RECURSE ORCT2_RIDE_SOURCES "${OPENRCT2_SRCPATH}/ride/*/*.c") +file(GLOB_RECURSE ORCT2_RIDE_DEP_SOURCES "${OPENRCT2_SRCPATH}/ride/ride_data.c" + "${OPENRCT2_SRCPATH}/ride/track_data.c" + "${OPENRCT2_SRCPATH}/ride/track_data_old.c" + "${OPENRCT2_SRCPATH}/ride/track_paint.c" + "${OPENRCT2_SRCPATH}/rct2/addresses.c" + "${OPENRCT2_SRCPATH}/diagnostic.c" + "${OPENRCT2_SRCPATH}/rct2/hook.c" + "${OPENRCT2_SRCPATH}/paint/map_element/map_element.c" + "${OPENRCT2_SRCPATH}/paint/paint_helpers.c") +file(GLOB_RECURSE ORCT2_TESTPAINT_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.c" + "${CMAKE_CURRENT_LIST_DIR}/*.cpp" + "${CMAKE_CURRENT_LIST_DIR}/*.h") + +add_executable(testpaint EXCLUDE_FROM_ALL ${ORCT2_RIDE_SOURCES} ${ORCT2_RIDE_DEP_SOURCES} ${ORCT2_TESTPAINT_SOURCES} ${RCT2_SECTIONS}) +target_include_directories(testpaint PRIVATE "${ROOT_DIR}/src/") +set_target_properties(testpaint PROPERTIES COMPILE_FLAGS "-DNO_VEHICLES -D__TESTPAINT__ -Wno-unused") +set_target_properties(testpaint PROPERTIES LINK_FLAGS ${RCT2_SEGMENT_LINKER_FLAGS}) +add_dependencies(testpaint segfiles) From 41f376f7aa3f1a8d285e3cc10ecebdfb2f79c17d Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 18:11:42 +0100 Subject: [PATCH 40/76] Add final to implementations --- src/openrct2-ui/UiContext.Linux.cpp | 2 +- src/openrct2-ui/UiContext.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index a854fae9a1..2692a85f8e 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -34,7 +34,7 @@ namespace OpenRCT2 { namespace Ui ZENITY, }; - class LinuxContext : public IPlatformUiContext + class LinuxContext final : public IPlatformUiContext { private: diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 3ff009bc37..8753b7a93f 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -51,7 +51,7 @@ using namespace OpenRCT2::Ui; #define KEYBOARD_PRIMARY_MODIFIER KMOD_CTRL #endif -class UiContext : public IUiContext +class UiContext final : public IUiContext { private: constexpr static uint32 TOUCH_DOUBLE_TIMEOUT = 300; From c394a997c8226ae3f2f691b9d903dba78567a127 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 18:43:40 +0100 Subject: [PATCH 41/76] Update install target and export library so --- CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bf19e629a..82b4d528dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,14 +83,15 @@ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CUR install(CODE "file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)") install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)") install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)") -install(TARGETS ${PROJECT} RUNTIME DESTINATION bin) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION share/${PROJECT}) -install(DIRECTORY data/ DESTINATION share/${PROJECT}) -install(FILES ${DOC_FILES} DESTINATION share/doc/${PROJECT}) -install(FILES resources/logo/icon_x16.png DESTINATION share/icons/hicolor/16x16/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x32.png DESTINATION share/icons/hicolor/32x32/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x64.png DESTINATION share/icons/hicolor/64x64/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x128.png DESTINATION share/icons/hicolor/128x128/apps RENAME openrct2.png) -install(FILES resources/logo/icon_x256.png DESTINATION share/icons/hicolor/256x256/apps RENAME openrct2.png) -install(FILES resources/logo/icon_flag.svg DESTINATION share/icons/hicolor/scalable/apps RENAME openrct2.svg) -install(FILES distribution/linux/openrct2.desktop DESTINATION share/applications) +install(TARGETS "libopenrct2" LIBRARY DESTINATION lib) +install(TARGETS "openrct2" RUNTIME DESTINATION bin) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION "share/openrct2") +install(DIRECTORY "data/" DESTINATION "share/openrct2") +install(FILES ${DOC_FILES} DESTINATION "share/doc/openrct2") +install(FILES "resources/logo/icon_x16.png" DESTINATION "share/icons/hicolor/16x16/apps RENAME openrct2.png") +install(FILES "resources/logo/icon_x32.png" DESTINATION "share/icons/hicolor/32x32/apps RENAME openrct2.png") +install(FILES "resources/logo/icon_x64.png" DESTINATION "share/icons/hicolor/64x64/apps RENAME openrct2.png") +install(FILES "resources/logo/icon_x128.png" DESTINATION "share/icons/hicolor/128x128/apps RENAME openrct2.png") +install(FILES "resources/logo/icon_x256.png" DESTINATION "share/icons/hicolor/256x256/apps RENAME openrct2.png") +install(FILES "resources/logo/icon_flag.svg" DESTINATION "share/icons/hicolor/scalable/apps RENAME openrct2.svg") +install(FILES "distribution/linux/openrct2.desktop" DESTINATION "share/applications") From 00199051c14796957a0fa5aaed450400308dba57 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 21:03:10 +0100 Subject: [PATCH 42/76] Add SDL2 include to test cmake --- test/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index dd583f498f..ba3cc5b49e 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -52,6 +52,7 @@ add_dependencies(${GTEST_MAIN_LIBRARY} ${GTEST_LIBRARY}) include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) include_directories("${ROOT_DIR}/src") +include_directories(${SDL2_INCLUDE_DIRS}) set(GTEST_LIBRARIES gtest gtest_main pthread) From f1a8b32db403853f25b06999bba766c63025e4f8 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 21:36:35 +0100 Subject: [PATCH 43/76] Prevent SDL_INIT when the game does not need to launch --- src/openrct2-dll/openrct2-dll.cpp | 29 ++++++++++++++++++++--------- src/openrct2-ui/Ui.cpp | 26 +++++++++++++++++--------- src/openrct2/Context.cpp | 9 ++------- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/openrct2-dll/openrct2-dll.cpp b/src/openrct2-dll/openrct2-dll.cpp index 162e47d9c5..26d67061ad 100644 --- a/src/openrct2-dll/openrct2-dll.cpp +++ b/src/openrct2-dll/openrct2-dll.cpp @@ -37,6 +37,25 @@ static char * * GetCommandLineArgs(int argc, wchar_t * * argvW); static void FreeCommandLineArgs(int argc, char * * argv); static char * ConvertUTF16toUTF8(const wchar_t * src); +static int NormalisedMain(int argc, char * * argv) +{ + core_init(); + int runGame = cmdline_run((const char * *)argv, argc); + if (runGame == 1) + { + IAudioContext * audioContext = CreateAudioContext(); + IUiContext * uiContext = CreateUiContext(); + IContext * context = CreateContext(audioContext, uiContext); + + context->RunOpenRCT2(argc, argv); + + delete context; + delete uiContext; + delete audioContext; + } + return gExitCode; +} + DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) { char * * argv = GetCommandLineArgs(argc, argvW); @@ -46,15 +65,7 @@ DLLEXPORT int LaunchOpenRCT2(int argc, wchar_t * * argvW) return -1; } - IAudioContext * audioContext = CreateAudioContext(); - IUiContext * uiContext = CreateUiContext(); - IContext * context = CreateContext(audioContext, uiContext); - - int exitCode = context->RunOpenRCT2(argc, argv); - - delete context; - delete uiContext; - delete audioContext; + int exitCode = NormalisedMain(argc, argv); FreeCommandLineArgs(argc, argv); return exitCode; diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index f8939fe0ef..5276f4c04d 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include "audio/AudioContext.h" #include "UiContext.h" @@ -31,15 +32,22 @@ using namespace OpenRCT2::Ui; */ int main(int argc, char * * argv) { - // Run OpenRCT2 with a UI context - - IAudioContext * audioContext = CreateAudioContext(); - IUiContext * uiContext = CreateUiContext(); - IContext * context = CreateContext(audioContext, uiContext); - int exitCode = context->RunOpenRCT2(argc, argv); - delete uiContext; - delete context; - return exitCode; + core_init(); + int runGame = cmdline_run((const char * *)argv, argc); + if (runGame == 1) + { + // Run OpenRCT2 with a UI context + IAudioContext * audioContext = CreateAudioContext(); + IUiContext * uiContext = CreateUiContext(); + IContext * context = CreateContext(audioContext, uiContext); + + context->RunOpenRCT2(argc, argv); + + delete context; + delete uiContext; + delete audioContext; + } + return gExitCode; } #endif diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index c7f22b6c84..a53270e67f 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -124,13 +124,8 @@ namespace OpenRCT2 sint32 RunOpenRCT2(int argc, char * * argv) override { - core_init(); - int runGame = cmdline_run((const char * *)argv, argc); - if (runGame == 1) - { - Initialise(); - Launch(); - } + Initialise(); + Launch(); return gExitCode; } From 3fa764321eb37b62463137e2797c999d1d3fdf7f Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 8 May 2017 22:09:38 +0100 Subject: [PATCH 44/76] Fix string errors and warnings --- src/openrct2-ui/UiContext.Linux.cpp | 23 ++++++++++++++----- .../drawing/engines/SoftwareDrawingEngine.cpp | 1 + .../engines/opengl/OpenGLDrawingEngine.cpp | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 2692a85f8e..95cabdfca9 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -123,7 +123,12 @@ namespace OpenRCT2 { namespace Ui (desc.Type == FILE_DIALOG_TYPE::OPEN) ? "--getopenfilename" : "--getsavefilename"; std::string filter = GetKDialogFilterString(desc.Filters); - std::string cmd = String::StdFormat("%s --title '%s' %s '%s/' ~ '%s'", executablePath, desc.Title, action, desc.InitialDirectory, filter); + std::string cmd = String::StdFormat("%s --title '%s' %s '%s/' ~ '%s'", + executablePath.c_str(), + desc.Title.c_str(), + action.c_str(), + desc.InitialDirectory.c_str(), + filter.c_str()); std::string output; if (Execute(cmd, &output) != 0) { @@ -140,7 +145,13 @@ namespace OpenRCT2 { namespace Ui flags = "--confirm-overwrite --save"; } std::string filters = GetZenityFilterString(desc.Filters); - std::string cmd = String::StdFormat("%s %s --filename='%s/' %s --title='%s' / %s", executablePath, action, desc.InitialDirectory, flags, desc.Title, filters); + std::string cmd = String::StdFormat("%s %s --filename='%s/' %s --title='%s' / %s", + executablePath.c_str(), + action.c_str(), + desc.InitialDirectory.c_str(), + flags.c_str(), + desc.Title.c_str(), + filters.c_str()); std::string output; if (Execute(cmd, &output) != 0) { @@ -163,7 +174,7 @@ namespace OpenRCT2 { namespace Ui } else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result.c_str(), F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) { - std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath, result.c_str()); + std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath.c_str(), result.c_str()); if (Execute(cmd) != 0) { result = std::string(); @@ -181,7 +192,7 @@ namespace OpenRCT2 { namespace Ui case DIALOG_TYPE::KDIALOG: { std::string output; - std::string cmd = String::Format("%s --title '%s' --getexistingdirectory /", executablePath.c_str(), title); + std::string cmd = String::Format("%s --title '%s' --getexistingdirectory /", executablePath.c_str(), title.c_str()); if (Execute(cmd, &output) == 0) { result = output; @@ -191,7 +202,7 @@ namespace OpenRCT2 { namespace Ui case DIALOG_TYPE::ZENITY: { std::string output; - std::string cmd = String::Format("%s --title='%s' --file-selection --directory /", executablePath.c_str(), title); + std::string cmd = String::Format("%s --title='%s' --file-selection --directory /", executablePath.c_str(), title.c_str()); if (Execute(cmd, &output) == 0) { result = output; @@ -243,7 +254,7 @@ namespace OpenRCT2 { namespace Ui // Trim line breaks size_t outputLength = outputBuffer.size(); - for (size_t i = outputBuffer.size() - 1; i >= 0; i--) + for (size_t i = outputLength - 1; i != SIZE_MAX; i--) { if (outputBuffer[i] == '\n') { diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 95541b089f..3f967475b2 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -234,6 +234,7 @@ public: : _uiContext(uiContext), _hardwareDisplay(hardwareDisplay) { + UNUSED(_uiContext); // Will be used in due course to retrieve window information _drawingContext = new SoftwareDrawingContext(this); #ifdef __ENABLE_LIGHTFX__ _lastLightFXenabled = (gConfigGeneral.enable_light_fx != 0); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index aec997f5a4..daff9fa039 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -251,6 +251,7 @@ public: OpenGLDrawingEngine(IUiContext * uiContext) : _uiContext(uiContext) { + UNUSED(_uiContext); // Will be used in due course to retrieve window information _drawingContext = new OpenGLDrawingContext(this); } From e8ec7ee58feadd148e4850440d52ecbe00895c7a Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Fri, 12 May 2017 00:37:00 +0100 Subject: [PATCH 45/76] Implement building of libopenrct2 and OpenRCT-UI for macOS Initial setup of xcode for multiple targets libopenrct2 partially working Restore macOS mach_info init Get macOS OpenRCT2-ui working if hackish Implement UiContext for macOS properly Put tabbing cancellation code back --- OpenRCT2.xcodeproj/project.pbxproj | 3916 ++++++++++++++++++--------- src/openrct2-ui/UiContext.Linux.cpp | 5 +- src/openrct2-ui/UiContext.cpp | 13 +- src/openrct2-ui/UiContext.macOS.mm | 186 ++ src/openrct2/platform/macos.m | 67 - src/openrct2/platform/shared.c | 4 + src/openrct2/windows/options.c | 2 +- 7 files changed, 2848 insertions(+), 1345 deletions(-) create mode 100644 src/openrct2-ui/UiContext.macOS.mm diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index d4cc2594a7..301238a41c 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -7,28 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 007A05CD1CFB2C8B00F419C3 /* NetworkAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 007A05C01CFB2C8B00F419C3 /* NetworkAction.cpp */; }; - 007A05CF1CFB2C8B00F419C3 /* NetworkConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 007A05C41CFB2C8B00F419C3 /* NetworkConnection.cpp */; }; - 007A05D01CFB2C8B00F419C3 /* NetworkGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 007A05C61CFB2C8B00F419C3 /* NetworkGroup.cpp */; }; - 007A05D11CFB2C8B00F419C3 /* NetworkPacket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 007A05C81CFB2C8B00F419C3 /* NetworkPacket.cpp */; }; - 007A05D21CFB2C8B00F419C3 /* NetworkPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 007A05CA1CFB2C8B00F419C3 /* NetworkPlayer.cpp */; }; - 008BF72B1CDAA5C30019A2AD /* track_design_save.c in Sources */ = {isa = PBXBuildFile; fileRef = 008BF7271CDAA5C30019A2AD /* track_design_save.c */; }; - 008BF72C1CDAA5C30019A2AD /* track_design.c in Sources */ = {isa = PBXBuildFile; fileRef = 008BF7281CDAA5C30019A2AD /* track_design.c */; }; - 00EFEE721CF1D80B0035213B /* NetworkKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00EFEE701CF1D80B0035213B /* NetworkKey.cpp */; }; - 652076321E22EFE7000D0C04 /* Imaging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 652076301E22EFE7000D0C04 /* Imaging.cpp */; }; - 652747EC1E41CE1B000F36FD /* SawyerEncoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 652747EA1E41CE1B000F36FD /* SawyerEncoding.cpp */; }; - 656F6C8E1E45BFC200E0F770 /* Version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656F6C8C1E45BFC200E0F770 /* Version.cpp */; }; - 658F3D911E44A6C200388550 /* ParkImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 658F3D8F1E44A6C200388550 /* ParkImporter.cpp */; }; - 6876808CD662C4B16392A9B4 /* Balloon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 437490DBD74ECF60C3363559 /* Balloon.cpp */; }; - 689149B0417A68D6765F09CD /* banner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEAE6E8AC49B6F288E69B40 /* banner.cpp */; }; - 791166FB1D7486EF005912EA /* NetworkServerAdvertiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 791166F91D7486EF005912EA /* NetworkServerAdvertiser.cpp */; }; - 7D02D519C9A56A1FB9854FE7 /* Climate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 242F470FE91956ACA4078F6A /* Climate.cpp */; }; - 85060FD31D8C17CC00DFA2B3 /* track_data_old.c in Sources */ = {isa = PBXBuildFile; fileRef = 8594C05F1D885CF600235E93 /* track_data_old.c */; }; - 8594C0601D885CF600235E93 /* track_data_old.c in Sources */ = {isa = PBXBuildFile; fileRef = 8594C05F1D885CF600235E93 /* track_data_old.c */; }; - 85B468FC1D96822F000F1DB5 /* paint_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = 85B468FB1D96822F000F1DB5 /* paint_helpers.c */; }; - 85B468FD1D96822F000F1DB5 /* paint_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = 85B468FB1D96822F000F1DB5 /* paint_helpers.c */; }; - 8DED2F20E0D63A1DCFCE0197 /* banner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEAE6E8AC49B6F288E69B40 /* banner.cpp */; }; - B94C3C5FC4DBBB864434DE83 /* Duck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5D1DB5BE280897DCDEBFCED /* Duck.cpp */; }; C606CCBE1DB4054000FE4015 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = C606CCAB1DB4054000FE4015 /* compat.c */; }; C606CCBF1DB4054000FE4015 /* data.c in Sources */ = {isa = PBXBuildFile; fileRef = C606CCAC1DB4054000FE4015 /* data.c */; }; C606CCC01DB4054000FE4015 /* FunctionCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C606CCAE1DB4054000FE4015 /* FunctionCall.cpp */; }; @@ -242,188 +220,10 @@ C6E96E321E04072F0076A04F /* TitleSequencePlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E2D1E04072F0076A04F /* TitleSequencePlayer.cpp */; }; C6E96E361E0408B40076A04F /* libzip.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; }; C6E96E371E040E040076A04F /* libzip.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - C6EABCC41E719691008C09AB /* UriHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6EABCC31E719691008C09AB /* UriHandler.cpp */; }; D41B73EF1C2101890080A7B9 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73EE1C2101890080A7B9 /* libcurl.tbd */; }; D41B741D1C210A7A0080A7B9 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B741C1C210A7A0080A7B9 /* libiconv.tbd */; }; D41B74731C2125E50080A7B9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D41B74721C2125E50080A7B9 /* Assets.xcassets */; }; - D41FA8641E5EA1E200215624 /* wall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D41FA8631E5EA1E200215624 /* wall.cpp */; }; - D429FF421E36ABCD009342A6 /* tile_inspector.c in Sources */ = {isa = PBXBuildFile; fileRef = D429FF401E36ABCD009342A6 /* tile_inspector.c */; }; - D42E337D1E5C27D600D630AF /* Config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42E33751E5C27D600D630AF /* Config.cpp */; }; - D42E337E1E5C27D600D630AF /* IniReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42E33781E5C27D600D630AF /* IniReader.cpp */; }; - D42E337F1E5C27D600D630AF /* IniWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42E337A1E5C27D600D630AF /* IniWriter.cpp */; }; - D42E33801E5C27D600D630AF /* KeyboardShortcuts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D42E337C1E5C27D600D630AF /* KeyboardShortcuts.cpp */; }; - D433A5001E4A861F00D9A6DF /* SawyerChunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D433A4FA1E4A861F00D9A6DF /* SawyerChunk.cpp */; }; - D433A5011E4A861F00D9A6DF /* SawyerChunkReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D433A4FC1E4A861F00D9A6DF /* SawyerChunkReader.cpp */; }; - D433A5021E4A861F00D9A6DF /* SawyerChunkWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D433A4FE1E4A861F00D9A6DF /* SawyerChunkWriter.cpp */; }; - D43407D61D0E14BE00C2B3D4 /* CopyFramebufferShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407C01D0E14BE00C2B3D4 /* CopyFramebufferShader.cpp */; }; - D43407D81D0E14BE00C2B3D4 /* DrawImageShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407C41D0E14BE00C2B3D4 /* DrawImageShader.cpp */; }; - D43407D91D0E14BE00C2B3D4 /* DrawLineShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407C61D0E14BE00C2B3D4 /* DrawLineShader.cpp */; }; - D43407DA1D0E14BE00C2B3D4 /* FillRectShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407C81D0E14BE00C2B3D4 /* FillRectShader.cpp */; }; - D43407DB1D0E14BE00C2B3D4 /* OpenGLAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407CB1D0E14BE00C2B3D4 /* OpenGLAPI.cpp */; }; - D43407DC1D0E14BE00C2B3D4 /* OpenGLDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407CD1D0E14BE00C2B3D4 /* OpenGLDrawingEngine.cpp */; }; - D43407DD1D0E14BE00C2B3D4 /* OpenGLFramebuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407CE1D0E14BE00C2B3D4 /* OpenGLFramebuffer.cpp */; }; - D43407DE1D0E14BE00C2B3D4 /* OpenGLShaderProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407D01D0E14BE00C2B3D4 /* OpenGLShaderProgram.cpp */; }; - D43407DF1D0E14BE00C2B3D4 /* SwapFramebuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407D21D0E14BE00C2B3D4 /* SwapFramebuffer.cpp */; }; - D43407E01D0E14BE00C2B3D4 /* TextureCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D43407D41D0E14BE00C2B3D4 /* TextureCache.cpp */; }; D43407E21D0E14CE00C2B3D4 /* shaders in Resources */ = {isa = PBXBuildFile; fileRef = D43407E11D0E14CE00C2B3D4 /* shaders */; }; - D437A26F1DBC2937001CB2CF /* TrackDesignRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D437A26D1DBC2937001CB2CF /* TrackDesignRepository.cpp */; }; - D437A2721DBC29B0001CB2CF /* FileScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D437A2701DBC29B0001CB2CF /* FileScanner.cpp */; }; - D44271F81CC81B3200D84D28 /* cheats.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270D41CC81B3200D84D28 /* cheats.c */; }; - D44271F91CC81B3200D84D28 /* CommandLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270D71CC81B3200D84D28 /* CommandLine.cpp */; }; - D44271FA1CC81B3200D84D28 /* RootCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270D91CC81B3200D84D28 /* RootCommands.cpp */; }; - D44271FB1CC81B3200D84D28 /* ScreenshotCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270DA1CC81B3200D84D28 /* ScreenshotCommands.cpp */; }; - D44271FC1CC81B3200D84D28 /* SpriteCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270DB1CC81B3200D84D28 /* SpriteCommands.cpp */; }; - D44271FD1CC81B3200D84D28 /* cmdline_sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270DC1CC81B3200D84D28 /* cmdline_sprite.c */; }; - D44271FF1CC81B3200D84D28 /* Console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270E11CC81B3200D84D28 /* Console.cpp */; }; - D44272001CC81B3200D84D28 /* Diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270E31CC81B3200D84D28 /* Diagnostics.cpp */; }; - D44272011CC81B3200D84D28 /* Guard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270E71CC81B3200D84D28 /* Guard.cpp */; }; - D44272021CC81B3200D84D28 /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270EB1CC81B3200D84D28 /* Json.cpp */; }; - D44272031CC81B3200D84D28 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270F01CC81B3200D84D28 /* Path.cpp */; }; - D44272051CC81B3200D84D28 /* String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44270F51CC81B3200D84D28 /* String.cpp */; }; - D44272061CC81B3200D84D28 /* textinputbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270F91CC81B3200D84D28 /* textinputbuffer.c */; }; - D44272081CC81B3200D84D28 /* diagnostic.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270FE1CC81B3200D84D28 /* diagnostic.c */; }; - D44272091CC81B3200D84D28 /* drawing.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271011CC81B3200D84D28 /* drawing.c */; }; - D442720A1CC81B3200D84D28 /* drawing_fast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271031CC81B3200D84D28 /* drawing_fast.cpp */; }; - D442720B1CC81B3200D84D28 /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271041CC81B3200D84D28 /* font.c */; }; - D442720C1CC81B3200D84D28 /* line.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271061CC81B3200D84D28 /* line.c */; }; - D442720E1CC81B3200D84D28 /* rect.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271081CC81B3200D84D28 /* rect.c */; }; - D442720F1CC81B3200D84D28 /* scrolling_text.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271091CC81B3200D84D28 /* scrolling_text.c */; }; - D44272111CC81B3200D84D28 /* string.c in Sources */ = {isa = PBXBuildFile; fileRef = D442710B1CC81B3200D84D28 /* string.c */; }; - D44272131CC81B3200D84D28 /* editor.c in Sources */ = {isa = PBXBuildFile; fileRef = D442710E1CC81B3200D84D28 /* editor.c */; }; - D44272141CC81B3200D84D28 /* game.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271101CC81B3200D84D28 /* game.c */; }; - D44272171CC81B3200D84D28 /* input.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271161CC81B3200D84D28 /* input.c */; }; - D44272181CC81B3200D84D28 /* chat.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271191CC81B3200D84D28 /* chat.c */; }; - D44272191CC81B3200D84D28 /* colour.c in Sources */ = {isa = PBXBuildFile; fileRef = D442711B1CC81B3200D84D28 /* colour.c */; }; - D442721A1CC81B3200D84D28 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = D442711D1CC81B3200D84D28 /* console.c */; }; - D442721B1CC81B3200D84D28 /* graph.c in Sources */ = {isa = PBXBuildFile; fileRef = D442711F1CC81B3200D84D28 /* graph.c */; }; - D442721C1CC81B3200D84D28 /* keyboard_shortcut.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271211CC81B3200D84D28 /* keyboard_shortcut.c */; }; - D442721D1CC81B3200D84D28 /* screenshot.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271231CC81B3200D84D28 /* screenshot.c */; }; - D442721E1CC81B3200D84D28 /* Theme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271251CC81B3200D84D28 /* Theme.cpp */; }; - D44272201CC81B3200D84D28 /* viewport.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271291CC81B3200D84D28 /* viewport.c */; }; - D44272211CC81B3200D84D28 /* viewport_interaction.c in Sources */ = {isa = PBXBuildFile; fileRef = D442712B1CC81B3200D84D28 /* viewport_interaction.c */; }; - D44272221CC81B3200D84D28 /* widget.c in Sources */ = {isa = PBXBuildFile; fileRef = D442712C1CC81B3200D84D28 /* widget.c */; }; - D44272231CC81B3200D84D28 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = D442712E1CC81B3200D84D28 /* window.c */; }; - D44272241CC81B3200D84D28 /* intro.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271301CC81B3200D84D28 /* intro.c */; }; - D44272251CC81B3200D84D28 /* convert.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271331CC81B3200D84D28 /* convert.c */; }; - D44272261CC81B3200D84D28 /* currency.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271341CC81B3200D84D28 /* currency.c */; }; - D44272271CC81B3200D84D28 /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271361CC81B3200D84D28 /* date.c */; }; - D44272281CC81B3200D84D28 /* language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271391CC81B3200D84D28 /* language.cpp */; }; - D44272291CC81B3200D84D28 /* LanguagePack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D442713B1CC81B3200D84D28 /* LanguagePack.cpp */; }; - D442722A1CC81B3200D84D28 /* localisation.c in Sources */ = {isa = PBXBuildFile; fileRef = D442713D1CC81B3200D84D28 /* localisation.c */; }; - D442722B1CC81B3200D84D28 /* real_names.c in Sources */ = {isa = PBXBuildFile; fileRef = D442713F1CC81B3200D84D28 /* real_names.c */; }; - D442722C1CC81B3200D84D28 /* user.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271411CC81B3200D84D28 /* user.c */; }; - D442722D1CC81B3200D84D28 /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271431CC81B3200D84D28 /* utf8.c */; }; - D442722E1CC81B3200D84D28 /* award.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271451CC81B3200D84D28 /* award.c */; }; - D442722F1CC81B3200D84D28 /* finance.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271471CC81B3200D84D28 /* finance.c */; }; - D44272301CC81B3200D84D28 /* marketing.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271491CC81B3200D84D28 /* marketing.c */; }; - D44272311CC81B3200D84D28 /* news_item.c in Sources */ = {isa = PBXBuildFile; fileRef = D442714B1CC81B3200D84D28 /* news_item.c */; }; - D44272321CC81B3200D84D28 /* research.c in Sources */ = {isa = PBXBuildFile; fileRef = D442714D1CC81B3200D84D28 /* research.c */; }; - D44272331CC81B3200D84D28 /* http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271501CC81B3200D84D28 /* http.cpp */; }; - D44272341CC81B3200D84D28 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271521CC81B3200D84D28 /* network.cpp */; }; - D44272351CC81B3200D84D28 /* twitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271541CC81B3200D84D28 /* twitch.cpp */; }; - D44272361CC81B3200D84D28 /* object_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271561CC81B3200D84D28 /* object_list.c */; }; - D44272391CC81B3200D84D28 /* peep.c in Sources */ = {isa = PBXBuildFile; fileRef = D442715C1CC81B3200D84D28 /* peep.c */; }; - D442723A1CC81B3200D84D28 /* staff.c in Sources */ = {isa = PBXBuildFile; fileRef = D442715E1CC81B3200D84D28 /* staff.c */; }; - D442723B1CC81B3200D84D28 /* crash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44271611CC81B3200D84D28 /* crash.cpp */; }; - D442723C1CC81B3200D84D28 /* linux.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271631CC81B3200D84D28 /* linux.c */; }; - D442723D1CC81B3200D84D28 /* macos.m in Sources */ = {isa = PBXBuildFile; fileRef = D44271641CC81B3200D84D28 /* macos.m */; }; - D442723E1CC81B3200D84D28 /* posix.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271661CC81B3200D84D28 /* posix.c */; }; - D442723F1CC81B3200D84D28 /* shared.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271671CC81B3200D84D28 /* shared.c */; }; - D44272401CC81B3200D84D28 /* windows.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271681CC81B3200D84D28 /* windows.c */; }; - D44272411CC81B3200D84D28 /* rct1.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271691CC81B3200D84D28 /* rct1.c */; }; - D44272421CC81B3200D84D28 /* rct2.c in Sources */ = {isa = PBXBuildFile; fileRef = D442716B1CC81B3200D84D28 /* rct2.c */; }; - D44272441CC81B3200D84D28 /* cable_lift.c in Sources */ = {isa = PBXBuildFile; fileRef = D442716F1CC81B3200D84D28 /* cable_lift.c */; }; - D44272451CC81B3200D84D28 /* ride.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271711CC81B3200D84D28 /* ride.c */; }; - D44272461CC81B3200D84D28 /* ride_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271731CC81B3200D84D28 /* ride_data.c */; }; - D44272471CC81B3200D84D28 /* ride_ratings.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271751CC81B3200D84D28 /* ride_ratings.c */; }; - D44272481CC81B3200D84D28 /* station.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271771CC81B3200D84D28 /* station.c */; }; - D44272491CC81B3200D84D28 /* track.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271791CC81B3200D84D28 /* track.c */; }; - D442724A1CC81B3200D84D28 /* track_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717B1CC81B3200D84D28 /* track_data.c */; }; - D442724B1CC81B3200D84D28 /* track_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717D1CC81B3200D84D28 /* track_paint.c */; }; - D442724C1CC81B3200D84D28 /* vehicle.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717F1CC81B3200D84D28 /* vehicle.c */; }; - D44272511CC81B3200D84D28 /* sawyercoding.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271891CC81B3200D84D28 /* sawyercoding.c */; }; - D44272521CC81B3200D84D28 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = D442718B1CC81B3200D84D28 /* util.c */; }; - D44272531CC81B3200D84D28 /* about.c in Sources */ = {isa = PBXBuildFile; fileRef = D442718F1CC81B3200D84D28 /* about.c */; }; - D44272541CC81B3200D84D28 /* banner.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271901CC81B3200D84D28 /* banner.c */; }; - D44272551CC81B3200D84D28 /* changelog.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271911CC81B3200D84D28 /* changelog.c */; }; - D44272561CC81B3200D84D28 /* cheats.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271921CC81B3200D84D28 /* cheats.c */; }; - D44272571CC81B3200D84D28 /* clear_scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271931CC81B3200D84D28 /* clear_scenery.c */; }; - D44272581CC81B3200D84D28 /* demolish_ride_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271941CC81B3200D84D28 /* demolish_ride_prompt.c */; }; - D44272591CC81B3200D84D28 /* dropdown.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271951CC81B3200D84D28 /* dropdown.c */; }; - D442725A1CC81B3200D84D28 /* editor_bottom_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271971CC81B3200D84D28 /* editor_bottom_toolbar.c */; }; - D442725B1CC81B3200D84D28 /* editor_inventions_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271981CC81B3200D84D28 /* editor_inventions_list.c */; }; - D442725C1CC81B3200D84D28 /* editor_main.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271991CC81B3200D84D28 /* editor_main.c */; }; - D442725D1CC81B3200D84D28 /* editor_object_selection.c in Sources */ = {isa = PBXBuildFile; fileRef = D442719A1CC81B3200D84D28 /* editor_object_selection.c */; }; - D442725E1CC81B3200D84D28 /* editor_objective_options.c in Sources */ = {isa = PBXBuildFile; fileRef = D442719B1CC81B3200D84D28 /* editor_objective_options.c */; }; - D442725F1CC81B3200D84D28 /* editor_scenario_options.c in Sources */ = {isa = PBXBuildFile; fileRef = D442719C1CC81B3200D84D28 /* editor_scenario_options.c */; }; - D44272601CC81B3200D84D28 /* error.c in Sources */ = {isa = PBXBuildFile; fileRef = D442719D1CC81B3200D84D28 /* error.c */; }; - D44272611CC81B3200D84D28 /* finances.c in Sources */ = {isa = PBXBuildFile; fileRef = D442719F1CC81B3200D84D28 /* finances.c */; }; - D44272621CC81B3200D84D28 /* footpath.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A01CC81B3200D84D28 /* footpath.c */; }; - D44272631CC81B3200D84D28 /* game_bottom_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A11CC81B3200D84D28 /* game_bottom_toolbar.c */; }; - D44272641CC81B3200D84D28 /* guest.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A21CC81B3200D84D28 /* guest.c */; }; - D44272651CC81B3200D84D28 /* guest_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A31CC81B3200D84D28 /* guest_list.c */; }; - D44272661CC81B3200D84D28 /* install_track.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A41CC81B3200D84D28 /* install_track.c */; }; - D44272671CC81B3200D84D28 /* land.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A51CC81B3200D84D28 /* land.c */; }; - D44272681CC81B3200D84D28 /* land_rights.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A61CC81B3200D84D28 /* land_rights.c */; }; - D44272691CC81B3200D84D28 /* loadsave.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A71CC81B3200D84D28 /* loadsave.c */; }; - D442726A1CC81B3200D84D28 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A81CC81B3200D84D28 /* main.c */; }; - D442726B1CC81B3200D84D28 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271A91CC81B3200D84D28 /* map.c */; }; - D442726C1CC81B3200D84D28 /* map_tooltip.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AA1CC81B3200D84D28 /* map_tooltip.c */; }; - D442726D1CC81B3200D84D28 /* mapgen.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AB1CC81B3200D84D28 /* mapgen.c */; }; - D442726E1CC81B3200D84D28 /* maze_construction.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AC1CC81B3200D84D28 /* maze_construction.c */; }; - D442726F1CC81B3200D84D28 /* multiplayer.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AD1CC81B3200D84D28 /* multiplayer.c */; }; - D44272701CC81B3200D84D28 /* music_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AE1CC81B3200D84D28 /* music_credits.c */; }; - D44272711CC81B3200D84D28 /* network_status.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271AF1CC81B3200D84D28 /* network_status.c */; }; - D44272721CC81B3200D84D28 /* new_campaign.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B01CC81B3200D84D28 /* new_campaign.c */; }; - D44272731CC81B3200D84D28 /* new_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B11CC81B3200D84D28 /* new_ride.c */; }; - D44272741CC81B3200D84D28 /* news.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B21CC81B3200D84D28 /* news.c */; }; - D44272751CC81B3200D84D28 /* news_options.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B31CC81B3200D84D28 /* news_options.c */; }; - D44272761CC81B3200D84D28 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B41CC81B3200D84D28 /* options.c */; }; - D44272771CC81B3200D84D28 /* park.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B51CC81B3200D84D28 /* park.c */; }; - D44272781CC81B3200D84D28 /* player.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B61CC81B3200D84D28 /* player.c */; }; - D44272791CC81B3200D84D28 /* publisher_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B71CC81B3200D84D28 /* publisher_credits.c */; }; - D442727A1CC81B3200D84D28 /* research.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B81CC81B3200D84D28 /* research.c */; }; - D442727B1CC81B3200D84D28 /* ride.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271B91CC81B3200D84D28 /* ride.c */; }; - D442727C1CC81B3200D84D28 /* ride_construction.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271BA1CC81B3200D84D28 /* ride_construction.c */; }; - D442727D1CC81B3200D84D28 /* ride_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271BB1CC81B3200D84D28 /* ride_list.c */; }; - D442727E1CC81B3200D84D28 /* save_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271BC1CC81B3200D84D28 /* save_prompt.c */; }; - D442727F1CC81B3200D84D28 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271BD1CC81B3200D84D28 /* scenery.c */; }; - D44272811CC81B3200D84D28 /* server_start.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271BF1CC81B3200D84D28 /* server_start.c */; }; - D44272821CC81B3200D84D28 /* shortcut_key_change.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C01CC81B3200D84D28 /* shortcut_key_change.c */; }; - D44272831CC81B3200D84D28 /* shortcut_keys.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C11CC81B3200D84D28 /* shortcut_keys.c */; }; - D44272841CC81B3200D84D28 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C21CC81B3200D84D28 /* sign.c */; }; - D44272851CC81B3200D84D28 /* staff.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C31CC81B3200D84D28 /* staff.c */; }; - D44272861CC81B3200D84D28 /* staff_fire_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C41CC81B3200D84D28 /* staff_fire_prompt.c */; }; - D44272871CC81B3200D84D28 /* staff_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C51CC81B3200D84D28 /* staff_list.c */; }; - D44272881CC81B3200D84D28 /* text_input.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C61CC81B3200D84D28 /* text_input.c */; }; - D44272891CC81B3200D84D28 /* themes.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C71CC81B3200D84D28 /* themes.c */; }; - D442728A1CC81B3200D84D28 /* tile_inspector.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C81CC81B3200D84D28 /* tile_inspector.c */; }; - D442728B1CC81B3200D84D28 /* title_command_editor.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271C91CC81B3200D84D28 /* title_command_editor.c */; }; - D442728C1CC81B3200D84D28 /* title_editor.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CA1CC81B3200D84D28 /* title_editor.c */; }; - D442728D1CC81B3200D84D28 /* title_exit.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CB1CC81B3200D84D28 /* title_exit.c */; }; - D442728E1CC81B3200D84D28 /* title_logo.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CC1CC81B3200D84D28 /* title_logo.c */; }; - D442728F1CC81B3200D84D28 /* title_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CD1CC81B3200D84D28 /* title_menu.c */; }; - D44272901CC81B3200D84D28 /* title_options.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CE1CC81B3200D84D28 /* title_options.c */; }; - D44272911CC81B3200D84D28 /* title_scenarioselect.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271CF1CC81B3200D84D28 /* title_scenarioselect.c */; }; - D44272921CC81B3200D84D28 /* tooltip.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D01CC81B3200D84D28 /* tooltip.c */; }; - D44272931CC81B3200D84D28 /* top_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D21CC81B3200D84D28 /* top_toolbar.c */; }; - D44272941CC81B3200D84D28 /* track_list.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D31CC81B3200D84D28 /* track_list.c */; }; - D44272951CC81B3200D84D28 /* track_manage.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D41CC81B3200D84D28 /* track_manage.c */; }; - D44272961CC81B3200D84D28 /* track_place.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D51CC81B3200D84D28 /* track_place.c */; }; - D44272971CC81B3200D84D28 /* viewport.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D61CC81B3200D84D28 /* viewport.c */; }; - D44272981CC81B3200D84D28 /* water.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271D71CC81B3200D84D28 /* water.c */; }; - D442729D1CC81B3200D84D28 /* footpath.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271E01CC81B3200D84D28 /* footpath.c */; }; - D442729F1CC81B3200D84D28 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271E41CC81B3200D84D28 /* map.c */; }; - D44272A01CC81B3200D84D28 /* map_animation.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271E61CC81B3200D84D28 /* map_animation.c */; }; - D44272A11CC81B3200D84D28 /* map_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271E81CC81B3200D84D28 /* map_helpers.c */; }; - D44272A21CC81B3200D84D28 /* mapgen.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271EA1CC81B3200D84D28 /* mapgen.c */; }; - D44272A31CC81B3200D84D28 /* money_effect.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271EC1CC81B3200D84D28 /* money_effect.c */; }; - D44272A41CC81B3200D84D28 /* park.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271ED1CC81B3200D84D28 /* park.c */; }; - D44272A51CC81B3200D84D28 /* particle.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271EF1CC81B3200D84D28 /* particle.c */; }; - D44272A61CC81B3200D84D28 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271F01CC81B3200D84D28 /* scenery.c */; }; - D44272A71CC81B3200D84D28 /* sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271F21CC81B3200D84D28 /* sprite.c */; }; - D4469DAD1DEF84480039A779 /* Fonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4469DAB1DEF84480039A779 /* Fonts.cpp */; }; - D44D93AE1E92DD28004D6B77 /* Fountain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D44D93AD1E92DD28004D6B77 /* Fountain.cpp */; }; D45A38BC1CF3006400659A24 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; }; D45A38BE1CF3006400659A24 /* libjansson.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B51CF3006400659A24 /* libjansson.dylib */; }; D45A38C01CF3006400659A24 /* libSDL2_ttf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B71CF3006400659A24 /* libSDL2_ttf.dylib */; }; @@ -435,52 +235,386 @@ D45A395D1CF300AF00659A24 /* libSDL2_ttf.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B71CF3006400659A24 /* libSDL2_ttf.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; D45A395E1CF300AF00659A24 /* libSDL2.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; D45A395F1CF300AF00659A24 /* libspeexdsp.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - D45B202D1D1E92DB00B67CC7 /* custom_currency.c in Sources */ = {isa = PBXBuildFile; fileRef = D45B202C1D1E92DB00B67CC7 /* custom_currency.c */; }; - D460DFD11E01239D007BA2FE /* OpenRCT2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D460DFD01E01239D007BA2FE /* OpenRCT2.cpp */; }; - D460DFD41E0123D1007BA2FE /* PlatformEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D460DFD31E0123D1007BA2FE /* PlatformEnvironment.cpp */; }; - D464B3E01E4FBC850003F3B5 /* ServerList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464B3DE1E4FBC850003F3B5 /* ServerList.cpp */; }; - D464B3E21E4FBCC00003F3B5 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464B3E11E4FBCC00003F3B5 /* audio.cpp */; }; - D464FEBB1D31A65300CBABAC /* IStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEBA1D31A65300CBABAC /* IStream.cpp */; }; - D464FEBE1D31A66E00CBABAC /* MemoryStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEBC1D31A66E00CBABAC /* MemoryStream.cpp */; }; - D464FEC01D31A68800CBABAC /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEBF1D31A68800CBABAC /* Image.cpp */; }; - D464FEE51D31A6AA00CBABAC /* BannerObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEC21D31A6AA00CBABAC /* BannerObject.cpp */; }; - D464FEE61D31A6AA00CBABAC /* EntranceObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEC41D31A6AA00CBABAC /* EntranceObject.cpp */; }; - D464FEE71D31A6AA00CBABAC /* FootpathItemObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEC61D31A6AA00CBABAC /* FootpathItemObject.cpp */; }; - D464FEE81D31A6AA00CBABAC /* FootpathObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEC81D31A6AA00CBABAC /* FootpathObject.cpp */; }; - D464FEE91D31A6AA00CBABAC /* ImageTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FECA1D31A6AA00CBABAC /* ImageTable.cpp */; }; - D464FEEA1D31A6AA00CBABAC /* LargeSceneryObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FECC1D31A6AA00CBABAC /* LargeSceneryObject.cpp */; }; - D464FEEB1D31A6AA00CBABAC /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FECE1D31A6AA00CBABAC /* Object.cpp */; }; - D464FEEC1D31A6AA00CBABAC /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FED01D31A6AA00CBABAC /* ObjectFactory.cpp */; }; - D464FEED1D31A6AA00CBABAC /* ObjectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FED21D31A6AA00CBABAC /* ObjectManager.cpp */; }; - D464FEEE1D31A6AA00CBABAC /* ObjectRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FED41D31A6AA00CBABAC /* ObjectRepository.cpp */; }; - D464FEEF1D31A6AA00CBABAC /* RideObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FED61D31A6AA00CBABAC /* RideObject.cpp */; }; - D464FEF01D31A6AA00CBABAC /* SceneryGroupObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FED81D31A6AA00CBABAC /* SceneryGroupObject.cpp */; }; - D464FEF11D31A6AA00CBABAC /* SmallSceneryObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEDB1D31A6AA00CBABAC /* SmallSceneryObject.cpp */; }; - D464FEF21D31A6AA00CBABAC /* StexObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEDD1D31A6AA00CBABAC /* StexObject.cpp */; }; - D464FEF31D31A6AA00CBABAC /* StringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEDF1D31A6AA00CBABAC /* StringTable.cpp */; }; - D464FEF41D31A6AA00CBABAC /* WallObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEE11D31A6AA00CBABAC /* WallObject.cpp */; }; - D464FEF51D31A6AA00CBABAC /* WaterObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D464FEE31D31A6AA00CBABAC /* WaterObject.cpp */; }; - D46F2A9E1D39A25A00A36AB7 /* peep_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D46F2A9D1D39A25A00A36AB7 /* peep_data.c */; }; D47304D51C4FF8250015C0EA /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D47304D41C4FF8250015C0EA /* libz.tbd */; }; - D48A8D831D00272F00649DA7 /* TcpSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D48A8D811D00272F00649DA7 /* TcpSocket.cpp */; }; - D48ABABA1E71EBD500A3E39C /* entrance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D48ABAB91E71EBD500A3E39C /* entrance.cpp */; }; - D49464781E4DB27B00DC690E /* sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D49464771E4DB27B00DC690E /* sprite.cpp */; }; - D49766831D03B9FE002222CD /* SoftwareDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D49766811D03B9FE002222CD /* SoftwareDrawingEngine.cpp */; }; - D49766861D03BAA5002222CD /* NewDrawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D49766841D03BAA5002222CD /* NewDrawing.cpp */; }; - D49766891D03BABB002222CD /* rain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D49766871D03BABB002222CD /* rain.cpp */; }; D4A8B4B41DB41873007A2F29 /* libpng16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; }; D4A8B4B51DB4188D007A2F29 /* libpng16.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - D4B21B6F1E343AF1004982C7 /* lightfx.c in Sources */ = {isa = PBXBuildFile; fileRef = D4B21B6D1E343AF1004982C7 /* lightfx.c */; }; D4EC48E61C2637710024B507 /* g2.dat in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E31C2637710024B507 /* g2.dat */; }; D4EC48E71C2637710024B507 /* language in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E41C2637710024B507 /* language */; }; D4EC48E81C2637710024B507 /* title in Resources */ = {isa = PBXBuildFile; fileRef = D4EC48E51C2637710024B507 /* title */; }; - D4F5B5EF1DAD8A4300AB6075 /* CursorData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4F5B5EC1DAD8A4300AB6075 /* CursorData.cpp */; }; - D4F5B5F01DAD8A4300AB6075 /* Cursors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4F5B5ED1DAD8A4300AB6075 /* Cursors.cpp */; }; - F2CC500E17C9411FBA859888 /* Climate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 242F470FE91956ACA4078F6A /* Climate.cpp */; }; - F408D5E134FE5B423BE5443F /* Duck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5D1DB5BE280897DCDEBFCED /* Duck.cpp */; }; - F61331C839858250899F1E9B /* Balloon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 437490DBD74ECF60C3363559 /* Balloon.cpp */; }; + F76C85B01EC4E88300FA49E2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83571EC4E7CC00FA49E2 /* audio.cpp */; }; + F76C85B41EC4E88300FA49E2 /* AudioMixer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C835B1EC4E7CC00FA49E2 /* AudioMixer.cpp */; }; + F76C85B71EC4E88300FA49E2 /* NullAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C835E1EC4E7CC00FA49E2 /* NullAudioSource.cpp */; }; + F76C85B81EC4E88300FA49E2 /* cheats.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C835F1EC4E7CC00FA49E2 /* cheats.c */; }; + F76C85BA1EC4E88300FA49E2 /* CommandLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83631EC4E7CC00FA49E2 /* CommandLine.cpp */; }; + F76C85BC1EC4E88300FA49E2 /* ConvertCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83651EC4E7CC00FA49E2 /* ConvertCommand.cpp */; }; + F76C85BD1EC4E88300FA49E2 /* RootCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83661EC4E7CC00FA49E2 /* RootCommands.cpp */; }; + F76C85BE1EC4E88300FA49E2 /* ScreenshotCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83671EC4E7CC00FA49E2 /* ScreenshotCommands.cpp */; }; + F76C85BF1EC4E88300FA49E2 /* SpriteCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83681EC4E7CC00FA49E2 /* SpriteCommands.cpp */; }; + F76C85C01EC4E88300FA49E2 /* UriHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83691EC4E7CC00FA49E2 /* UriHandler.cpp */; }; + F76C85C11EC4E88300FA49E2 /* cmdline_sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C836A1EC4E7CC00FA49E2 /* cmdline_sprite.c */; }; + F76C85C41EC4E88300FA49E2 /* Config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C836E1EC4E7CC00FA49E2 /* Config.cpp */; }; + F76C85C71EC4E88300FA49E2 /* IniReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83711EC4E7CC00FA49E2 /* IniReader.cpp */; }; + F76C85C91EC4E88300FA49E2 /* IniWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83731EC4E7CC00FA49E2 /* IniWriter.cpp */; }; + F76C85CB1EC4E88300FA49E2 /* KeyboardShortcuts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83751EC4E7CC00FA49E2 /* KeyboardShortcuts.cpp */; }; + F76C85CC1EC4E88300FA49E2 /* Context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83761EC4E7CC00FA49E2 /* Context.cpp */; }; + F76C85CF1EC4E88300FA49E2 /* Console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C837A1EC4E7CC00FA49E2 /* Console.cpp */; }; + F76C85D11EC4E88300FA49E2 /* Diagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C837C1EC4E7CC00FA49E2 /* Diagnostics.cpp */; }; + F76C85D41EC4E88300FA49E2 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C837F1EC4E7CC00FA49E2 /* File.cpp */; }; + F76C85D61EC4E88300FA49E2 /* FileScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83811EC4E7CC00FA49E2 /* FileScanner.cpp */; }; + F76C85D91EC4E88300FA49E2 /* Guard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83841EC4E7CC00FA49E2 /* Guard.cpp */; }; + F76C85DB1EC4E88300FA49E2 /* IStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83861EC4E7CC00FA49E2 /* IStream.cpp */; }; + F76C85DD1EC4E88300FA49E2 /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83881EC4E7CC00FA49E2 /* Json.cpp */; }; + F76C85E11EC4E88300FA49E2 /* MemoryStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C838C1EC4E7CC00FA49E2 /* MemoryStream.cpp */; }; + F76C85E41EC4E88300FA49E2 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C838F1EC4E7CC00FA49E2 /* Path.cpp */; }; + F76C85E71EC4E88300FA49E2 /* String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83921EC4E7CC00FA49E2 /* String.cpp */; }; + F76C85EB1EC4E88300FA49E2 /* textinputbuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83961EC4E7CC00FA49E2 /* textinputbuffer.c */; }; + F76C85EE1EC4E88300FA49E2 /* Zip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83991EC4E7CC00FA49E2 /* Zip.cpp */; }; + F76C85F01EC4E88300FA49E2 /* diagnostic.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C839B1EC4E7CC00FA49E2 /* diagnostic.c */; }; + F76C85F21EC4E88300FA49E2 /* drawing.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C839E1EC4E7CC00FA49E2 /* drawing.c */; }; + F76C85F41EC4E88300FA49E2 /* drawing_fast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A01EC4E7CC00FA49E2 /* drawing_fast.cpp */; }; + F76C85F51EC4E88300FA49E2 /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A11EC4E7CC00FA49E2 /* font.c */; }; + F76C85F91EC4E88300FA49E2 /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A51EC4E7CC00FA49E2 /* Image.cpp */; }; + F76C85FA1EC4E88300FA49E2 /* lightfx.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A61EC4E7CC00FA49E2 /* lightfx.c */; }; + F76C85FC1EC4E88300FA49E2 /* line.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A81EC4E7CC00FA49E2 /* line.c */; }; + F76C85FD1EC4E88300FA49E2 /* NewDrawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83A91EC4E7CC00FA49E2 /* NewDrawing.cpp */; }; + F76C85FF1EC4E88300FA49E2 /* Rain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83AB1EC4E7CC00FA49E2 /* Rain.cpp */; }; + F76C86011EC4E88300FA49E2 /* rect.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83AD1EC4E7CC00FA49E2 /* rect.c */; }; + F76C86021EC4E88300FA49E2 /* scrolling_text.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83AE1EC4E7CC00FA49E2 /* scrolling_text.c */; }; + F76C86031EC4E88300FA49E2 /* sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83AF1EC4E7CC00FA49E2 /* sprite.cpp */; }; + F76C86041EC4E88300FA49E2 /* string.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B01EC4E7CC00FA49E2 /* string.c */; }; + F76C86051EC4E88300FA49E2 /* editor.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B11EC4E7CC00FA49E2 /* editor.c */; }; + F76C86071EC4E88300FA49E2 /* FileClassifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B31EC4E7CC00FA49E2 /* FileClassifier.cpp */; }; + F76C86091EC4E88300FA49E2 /* game.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B51EC4E7CC00FA49E2 /* game.c */; }; + F76C860B1EC4E88300FA49E2 /* Imaging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B71EC4E7CC00FA49E2 /* Imaging.cpp */; }; + F76C860D1EC4E88300FA49E2 /* input.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83B91EC4E7CC00FA49E2 /* input.c */; }; + F76C860F1EC4E88300FA49E2 /* chat.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83BC1EC4E7CC00FA49E2 /* chat.c */; }; + F76C86111EC4E88300FA49E2 /* colour.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83BE1EC4E7CC00FA49E2 /* colour.c */; }; + F76C86131EC4E88300FA49E2 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83C01EC4E7CC00FA49E2 /* console.c */; }; + F76C86161EC4E88300FA49E2 /* Fonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83C31EC4E7CC00FA49E2 /* Fonts.cpp */; }; + F76C86181EC4E88300FA49E2 /* graph.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83C51EC4E7CC00FA49E2 /* graph.c */; }; + F76C861A1EC4E88300FA49E2 /* keyboard_shortcut.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83C71EC4E7CC00FA49E2 /* keyboard_shortcut.c */; }; + F76C861C1EC4E88300FA49E2 /* screenshot.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83C91EC4E7CC00FA49E2 /* screenshot.c */; }; + F76C861E1EC4E88300FA49E2 /* Theme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83CB1EC4E7CC00FA49E2 /* Theme.cpp */; }; + F76C86201EC4E88300FA49E2 /* viewport.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83CD1EC4E7CC00FA49E2 /* viewport.c */; }; + F76C86221EC4E88300FA49E2 /* viewport_interaction.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83CF1EC4E7CC00FA49E2 /* viewport_interaction.c */; }; + F76C86231EC4E88300FA49E2 /* widget.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83D01EC4E7CC00FA49E2 /* widget.c */; }; + F76C86251EC4E88300FA49E2 /* window.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83D21EC4E7CC00FA49E2 /* window.c */; }; + F76C86271EC4E88300FA49E2 /* intro.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83D41EC4E7CC00FA49E2 /* intro.c */; }; + F76C86291EC4E88300FA49E2 /* convert.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83D81EC4E7CC00FA49E2 /* convert.c */; }; + F76C862A1EC4E88300FA49E2 /* currency.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83D91EC4E7CC00FA49E2 /* currency.c */; }; + F76C862C1EC4E88300FA49E2 /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83DB1EC4E7CC00FA49E2 /* date.c */; }; + F76C862E1EC4E88300FA49E2 /* format_codes.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83DD1EC4E7CC00FA49E2 /* format_codes.c */; }; + F76C86301EC4E88300FA49E2 /* language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83DF1EC4E7CC00FA49E2 /* language.cpp */; }; + F76C86321EC4E88300FA49E2 /* LanguagePack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83E11EC4E7CC00FA49E2 /* LanguagePack.cpp */; }; + F76C86341EC4E88300FA49E2 /* localisation.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83E31EC4E7CC00FA49E2 /* localisation.c */; }; + F76C86361EC4E88300FA49E2 /* real_names.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83E51EC4E7CC00FA49E2 /* real_names.c */; }; + F76C86381EC4E88300FA49E2 /* user.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83E71EC4E7CC00FA49E2 /* user.c */; }; + F76C863A1EC4E88300FA49E2 /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83E91EC4E7CC00FA49E2 /* utf8.c */; }; + F76C863B1EC4E88300FA49E2 /* award.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83EB1EC4E7CC00FA49E2 /* award.c */; }; + F76C863D1EC4E88300FA49E2 /* finance.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83ED1EC4E7CC00FA49E2 /* finance.c */; }; + F76C863F1EC4E88300FA49E2 /* marketing.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83EF1EC4E7CC00FA49E2 /* marketing.c */; }; + F76C86411EC4E88300FA49E2 /* news_item.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83F11EC4E7CC00FA49E2 /* news_item.c */; }; + F76C86431EC4E88300FA49E2 /* research.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C83F31EC4E7CC00FA49E2 /* research.c */; }; + F76C86451EC4E88300FA49E2 /* http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83F61EC4E7CC00FA49E2 /* http.cpp */; }; + F76C86471EC4E88300FA49E2 /* network.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83F81EC4E7CC00FA49E2 /* network.cpp */; }; + F76C86491EC4E88300FA49E2 /* NetworkAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83FA1EC4E7CC00FA49E2 /* NetworkAction.cpp */; }; + F76C864B1EC4E88300FA49E2 /* NetworkConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83FC1EC4E7CC00FA49E2 /* NetworkConnection.cpp */; }; + F76C864D1EC4E88300FA49E2 /* NetworkGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C83FE1EC4E7CC00FA49E2 /* NetworkGroup.cpp */; }; + F76C864F1EC4E88300FA49E2 /* NetworkKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84001EC4E7CC00FA49E2 /* NetworkKey.cpp */; }; + F76C86511EC4E88300FA49E2 /* NetworkPacket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84021EC4E7CC00FA49E2 /* NetworkPacket.cpp */; }; + F76C86531EC4E88300FA49E2 /* NetworkPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84041EC4E7CC00FA49E2 /* NetworkPlayer.cpp */; }; + F76C86551EC4E88300FA49E2 /* NetworkServerAdvertiser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84061EC4E7CC00FA49E2 /* NetworkServerAdvertiser.cpp */; }; + F76C86581EC4E88300FA49E2 /* NetworkUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84091EC4E7CC00FA49E2 /* NetworkUser.cpp */; }; + F76C865A1EC4E88300FA49E2 /* ServerList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C840B1EC4E7CC00FA49E2 /* ServerList.cpp */; }; + F76C865C1EC4E88300FA49E2 /* TcpSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C840D1EC4E7CC00FA49E2 /* TcpSocket.cpp */; }; + F76C865E1EC4E88300FA49E2 /* twitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C840F1EC4E7CC00FA49E2 /* twitch.cpp */; }; + F76C86601EC4E88300FA49E2 /* BannerObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84121EC4E7CC00FA49E2 /* BannerObject.cpp */; }; + F76C86621EC4E88300FA49E2 /* EntranceObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84141EC4E7CC00FA49E2 /* EntranceObject.cpp */; }; + F76C86641EC4E88300FA49E2 /* FootpathItemObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84161EC4E7CC00FA49E2 /* FootpathItemObject.cpp */; }; + F76C86661EC4E88300FA49E2 /* FootpathObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84181EC4E7CC00FA49E2 /* FootpathObject.cpp */; }; + F76C86681EC4E88300FA49E2 /* ImageTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C841A1EC4E7CC00FA49E2 /* ImageTable.cpp */; }; + F76C866A1EC4E88300FA49E2 /* LargeSceneryObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C841C1EC4E7CC00FA49E2 /* LargeSceneryObject.cpp */; }; + F76C866C1EC4E88400FA49E2 /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C841E1EC4E7CC00FA49E2 /* Object.cpp */; }; + F76C866E1EC4E88400FA49E2 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84201EC4E7CC00FA49E2 /* ObjectFactory.cpp */; }; + F76C86701EC4E88400FA49E2 /* ObjectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84221EC4E7CC00FA49E2 /* ObjectManager.cpp */; }; + F76C86721EC4E88400FA49E2 /* ObjectRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84241EC4E7CC00FA49E2 /* ObjectRepository.cpp */; }; + F76C86741EC4E88400FA49E2 /* RideObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84261EC4E7CC00FA49E2 /* RideObject.cpp */; }; + F76C86761EC4E88400FA49E2 /* SceneryGroupObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84281EC4E7CC00FA49E2 /* SceneryGroupObject.cpp */; }; + F76C86791EC4E88400FA49E2 /* SmallSceneryObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C842B1EC4E7CC00FA49E2 /* SmallSceneryObject.cpp */; }; + F76C867B1EC4E88400FA49E2 /* StexObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C842D1EC4E7CC00FA49E2 /* StexObject.cpp */; }; + F76C867D1EC4E88400FA49E2 /* StringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C842F1EC4E7CC00FA49E2 /* StringTable.cpp */; }; + F76C867F1EC4E88400FA49E2 /* WallObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84311EC4E7CC00FA49E2 /* WallObject.cpp */; }; + F76C86811EC4E88400FA49E2 /* WaterObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84331EC4E7CC00FA49E2 /* WaterObject.cpp */; }; + F76C86841EC4E88400FA49E2 /* object_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84361EC4E7CC00FA49E2 /* object_list.c */; }; + F76C86861EC4E88400FA49E2 /* OpenRCT2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */; }; + F76C86881EC4E88400FA49E2 /* banner.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C843C1EC4E7CC00FA49E2 /* banner.c */; }; + F76C86891EC4E88400FA49E2 /* entrance.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C843D1EC4E7CC00FA49E2 /* entrance.c */; }; + F76C868A1EC4E88400FA49E2 /* fence.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C843E1EC4E7CC00FA49E2 /* fence.c */; }; + F76C868B1EC4E88400FA49E2 /* map_element.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C843F1EC4E7CC00FA49E2 /* map_element.c */; }; + F76C868D1EC4E88400FA49E2 /* path.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84411EC4E7CC00FA49E2 /* path.c */; }; + F76C868E1EC4E88400FA49E2 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84421EC4E7CC00FA49E2 /* scenery.c */; }; + F76C868F1EC4E88400FA49E2 /* scenery_multiple.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84431EC4E7CC00FA49E2 /* scenery_multiple.c */; }; + F76C86901EC4E88400FA49E2 /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84441EC4E7CC00FA49E2 /* surface.c */; }; + F76C86921EC4E88400FA49E2 /* paint.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84461EC4E7CC00FA49E2 /* paint.c */; }; + F76C86941EC4E88400FA49E2 /* paint_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84481EC4E7CC00FA49E2 /* paint_helpers.c */; }; + F76C86951EC4E88400FA49E2 /* litter.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C844A1EC4E7CC00FA49E2 /* litter.c */; }; + F76C86961EC4E88400FA49E2 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C844B1EC4E7CC00FA49E2 /* misc.c */; }; + F76C86971EC4E88400FA49E2 /* peep.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C844C1EC4E7CC00FA49E2 /* peep.c */; }; + F76C86981EC4E88400FA49E2 /* sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C844D1EC4E7CC00FA49E2 /* sprite.c */; }; + F76C869A1EC4E88400FA49E2 /* supports.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C844F1EC4E7CC00FA49E2 /* supports.c */; }; + F76C869C1EC4E88400FA49E2 /* ParkImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */; }; + F76C869E1EC4E88400FA49E2 /* peep.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84541EC4E7CC00FA49E2 /* peep.c */; }; + F76C86A01EC4E88400FA49E2 /* peep_data.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84561EC4E7CC00FA49E2 /* peep_data.c */; }; + F76C86A11EC4E88400FA49E2 /* staff.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84571EC4E7CC00FA49E2 /* staff.c */; }; + F76C86A31EC4E88400FA49E2 /* crash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C845A1EC4E7CC00FA49E2 /* crash.cpp */; }; + F76C86A51EC4E88400FA49E2 /* linux.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C845C1EC4E7CC00FA49E2 /* linux.c */; }; + F76C86A61EC4E88400FA49E2 /* macos.m in Sources */ = {isa = PBXBuildFile; fileRef = F76C845D1EC4E7CC00FA49E2 /* macos.m */; }; + F76C86A81EC4E88400FA49E2 /* Platform2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C845F1EC4E7CC00FA49E2 /* Platform2.cpp */; }; + F76C86AA1EC4E88400FA49E2 /* posix.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84611EC4E7CC00FA49E2 /* posix.c */; }; + F76C86AB1EC4E88400FA49E2 /* shared.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84621EC4E7CC00FA49E2 /* shared.c */; }; + F76C86AC1EC4E88400FA49E2 /* windows.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84631EC4E7CC00FA49E2 /* windows.c */; }; + F76C86AD1EC4E88400FA49E2 /* PlatformEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84641EC4E7CC00FA49E2 /* PlatformEnvironment.cpp */; }; + F76C86AF1EC4E88400FA49E2 /* S4Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84671EC4E7CC00FA49E2 /* S4Importer.cpp */; }; + F76C86B01EC4E88400FA49E2 /* tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84681EC4E7CC00FA49E2 /* tables.cpp */; }; + F76C86B21EC4E88400FA49E2 /* rct1.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C846A1EC4E7CC00FA49E2 /* rct1.c */; }; + F76C86B41EC4E88400FA49E2 /* SawyerChunk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C846D1EC4E7CC00FA49E2 /* SawyerChunk.cpp */; }; + F76C86B61EC4E88400FA49E2 /* SawyerChunkReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C846F1EC4E7CC00FA49E2 /* SawyerChunkReader.cpp */; }; + F76C86B81EC4E88400FA49E2 /* SawyerChunkWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84711EC4E7CC00FA49E2 /* SawyerChunkWriter.cpp */; }; + F76C86BA1EC4E88400FA49E2 /* SawyerEncoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84731EC4E7CC00FA49E2 /* SawyerEncoding.cpp */; }; + F76C86BD1EC4E88400FA49E2 /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84771EC4E7CC00FA49E2 /* addresses.c */; }; + F76C86BF1EC4E88400FA49E2 /* hook.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84791EC4E7CC00FA49E2 /* hook.c */; }; + F76C86C11EC4E88400FA49E2 /* interop.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C847B1EC4E7CC00FA49E2 /* interop.c */; }; + F76C86C31EC4E88400FA49E2 /* S6Exporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C847D1EC4E7CC00FA49E2 /* S6Exporter.cpp */; }; + F76C86C51EC4E88400FA49E2 /* S6Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C847F1EC4E7CC00FA49E2 /* S6Importer.cpp */; }; + F76C86C61EC4E88400FA49E2 /* rct2.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84801EC4E7CC00FA49E2 /* rct2.c */; }; + F76C86C81EC4E88400FA49E2 /* cable_lift.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84841EC4E7CC00FA49E2 /* cable_lift.c */; }; + F76C86CA1EC4E88400FA49E2 /* air_powered_vertical_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84871EC4E7CC00FA49E2 /* air_powered_vertical_coaster.c */; }; + F76C86CB1EC4E88400FA49E2 /* bobsleigh_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84881EC4E7CC00FA49E2 /* bobsleigh_coaster.c */; }; + F76C86CC1EC4E88400FA49E2 /* bolliger_mabillard_track.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84891EC4E7CC00FA49E2 /* bolliger_mabillard_track.c */; }; + F76C86CE1EC4E88400FA49E2 /* compact_inverted_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C848B1EC4E7CC00FA49E2 /* compact_inverted_coaster.c */; }; + F76C86CF1EC4E88400FA49E2 /* corkscrew_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C848C1EC4E7CC00FA49E2 /* corkscrew_roller_coaster.c */; }; + F76C86D01EC4E88400FA49E2 /* flying_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C848D1EC4E7CC00FA49E2 /* flying_roller_coaster.c */; }; + F76C86D11EC4E88400FA49E2 /* giga_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C848E1EC4E7CC00FA49E2 /* giga_coaster.c */; }; + F76C86D21EC4E88400FA49E2 /* heartline_twister_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C848F1EC4E7CC00FA49E2 /* heartline_twister_coaster.c */; }; + F76C86D31EC4E88400FA49E2 /* inverted_hairpin_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84901EC4E7CC00FA49E2 /* inverted_hairpin_coaster.c */; }; + F76C86D41EC4E88400FA49E2 /* inverted_impulse_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84911EC4E7CC00FA49E2 /* inverted_impulse_coaster.c */; }; + F76C86D51EC4E88400FA49E2 /* inverted_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84921EC4E7CC00FA49E2 /* inverted_roller_coaster.c */; }; + F76C86D61EC4E88400FA49E2 /* junior_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84931EC4E7CC00FA49E2 /* junior_roller_coaster.c */; }; + F76C86D91EC4E88400FA49E2 /* lim_launched_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84961EC4E7CC00FA49E2 /* lim_launched_roller_coaster.c */; }; + F76C86DA1EC4E88400FA49E2 /* looping_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84971EC4E7CC00FA49E2 /* looping_roller_coaster.c */; }; + F76C86DB1EC4E88400FA49E2 /* mine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84981EC4E7CC00FA49E2 /* mine_ride.c */; }; + F76C86DC1EC4E88400FA49E2 /* mine_train_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84991EC4E7CC00FA49E2 /* mine_train_coaster.c */; }; + F76C86DD1EC4E88400FA49E2 /* mini_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849A1EC4E7CC00FA49E2 /* mini_roller_coaster.c */; }; + F76C86DE1EC4E88400FA49E2 /* mini_suspended_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849B1EC4E7CC00FA49E2 /* mini_suspended_coaster.c */; }; + F76C86DF1EC4E88400FA49E2 /* multi_dimension_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849C1EC4E7CC00FA49E2 /* multi_dimension_roller_coaster.c */; }; + F76C86E01EC4E88400FA49E2 /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849D1EC4E7CC00FA49E2 /* reverse_freefall_coaster.c */; }; + F76C86E11EC4E88400FA49E2 /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849E1EC4E7CC00FA49E2 /* reverser_roller_coaster.c */; }; + F76C86E21EC4E88400FA49E2 /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C849F1EC4E7CC00FA49E2 /* side_friction_roller_coaster.c */; }; + F76C86E31EC4E88400FA49E2 /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A01EC4E7CC00FA49E2 /* stand_up_roller_coaster.c */; }; + F76C86E41EC4E88400FA49E2 /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A11EC4E7CC00FA49E2 /* steeplechase.c */; }; + F76C86E51EC4E88400FA49E2 /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A21EC4E7CC00FA49E2 /* suspended_swinging_coaster.c */; }; + F76C86E61EC4E88400FA49E2 /* twister_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A31EC4E7CC00FA49E2 /* twister_roller_coaster.c */; }; + F76C86E71EC4E88400FA49E2 /* vertical_drop_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A41EC4E7CC00FA49E2 /* vertical_drop_roller_coaster.c */; }; + F76C86E81EC4E88400FA49E2 /* virginia_reel.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A51EC4E7CC00FA49E2 /* virginia_reel.c */; }; + F76C86E91EC4E88400FA49E2 /* wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A61EC4E7CC00FA49E2 /* wild_mouse.c */; }; + F76C86EA1EC4E88400FA49E2 /* wooden_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A71EC4E7CC00FA49E2 /* wooden_roller_coaster.c */; }; + F76C86EB1EC4E88400FA49E2 /* wooden_wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84A81EC4E7CC00FA49E2 /* wooden_wild_mouse.c */; }; + F76C86EC1EC4E88400FA49E2 /* car_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AA1EC4E7CC00FA49E2 /* car_ride.c */; }; + F76C86ED1EC4E88400FA49E2 /* circus_show.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AB1EC4E7CC00FA49E2 /* circus_show.c */; }; + F76C86EE1EC4E88400FA49E2 /* crooked_house.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AC1EC4E7CC00FA49E2 /* crooked_house.c */; }; + F76C86EF1EC4E88400FA49E2 /* dodgems.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AD1EC4E7CC00FA49E2 /* dodgems.c */; }; + F76C86F01EC4E88400FA49E2 /* ferris_wheel.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AE1EC4E7CC00FA49E2 /* ferris_wheel.c */; }; + F76C86F11EC4E88400FA49E2 /* flying_saucers.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84AF1EC4E7CC00FA49E2 /* flying_saucers.c */; }; + F76C86F21EC4E88400FA49E2 /* ghost_train.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B01EC4E7CC00FA49E2 /* ghost_train.c */; }; + F76C86F31EC4E88400FA49E2 /* haunted_house.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B11EC4E7CC00FA49E2 /* haunted_house.c */; }; + F76C86F41EC4E88400FA49E2 /* maze.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B21EC4E7CC00FA49E2 /* maze.c */; }; + F76C86F51EC4E88400FA49E2 /* merry_go_round.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B31EC4E7CC00FA49E2 /* merry_go_round.c */; }; + F76C86F61EC4E88400FA49E2 /* mini_golf.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B41EC4E7CC00FA49E2 /* mini_golf.c */; }; + F76C86F71EC4E88400FA49E2 /* mini_helicopters.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B51EC4E7CC00FA49E2 /* mini_helicopters.c */; }; + F76C86F81EC4E88400FA49E2 /* monorail_cycles.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B61EC4E7CC00FA49E2 /* monorail_cycles.c */; }; + F76C86F91EC4E88400FA49E2 /* observation_tower.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B71EC4E7CC00FA49E2 /* observation_tower.c */; }; + F76C86FA1EC4E88400FA49E2 /* space_rings.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B81EC4E7CC00FA49E2 /* space_rings.c */; }; + F76C86FB1EC4E88400FA49E2 /* spiral_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84B91EC4E7CC00FA49E2 /* spiral_slide.c */; }; + F76C86FC1EC4E88400FA49E2 /* ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84BA1EC4E7CC00FA49E2 /* ride.c */; }; + F76C86FE1EC4E88400FA49E2 /* ride_data.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84BC1EC4E7CC00FA49E2 /* ride_data.c */; }; + F76C87001EC4E88400FA49E2 /* ride_ratings.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84BE1EC4E7CC00FA49E2 /* ride_ratings.c */; }; + F76C87021EC4E88400FA49E2 /* facility.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C11EC4E7CC00FA49E2 /* facility.c */; }; + F76C87031EC4E88400FA49E2 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C21EC4E7CC00FA49E2 /* misc.c */; }; + F76C87041EC4E88400FA49E2 /* shop.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C31EC4E7CC00FA49E2 /* shop.c */; }; + F76C87051EC4E88400FA49E2 /* station.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C41EC4E7CC00FA49E2 /* station.c */; }; + F76C87071EC4E88400FA49E2 /* 3d_cinema.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C71EC4E7CC00FA49E2 /* 3d_cinema.c */; }; + F76C87081EC4E88400FA49E2 /* enterprise.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C81EC4E7CC00FA49E2 /* enterprise.c */; }; + F76C87091EC4E88400FA49E2 /* go_karts.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C91EC4E7CC00FA49E2 /* go_karts.c */; }; + F76C870A1EC4E88400FA49E2 /* launched_freefall.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CA1EC4E7CC00FA49E2 /* launched_freefall.c */; }; + F76C870B1EC4E88400FA49E2 /* magic_carpet.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CB1EC4E7CC00FA49E2 /* magic_carpet.c */; }; + F76C870C1EC4E88400FA49E2 /* motion_simulator.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CC1EC4E7CC00FA49E2 /* motion_simulator.c */; }; + F76C870D1EC4E88400FA49E2 /* pirate_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CD1EC4E7CC00FA49E2 /* pirate_ship.c */; }; + F76C870E1EC4E88400FA49E2 /* roto_drop.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CE1EC4E7CC00FA49E2 /* roto_drop.c */; }; + F76C870F1EC4E88400FA49E2 /* swinging_inverter_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84CF1EC4E7CC00FA49E2 /* swinging_inverter_ship.c */; }; + F76C87101EC4E88400FA49E2 /* top_spin.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D01EC4E7CC00FA49E2 /* top_spin.c */; }; + F76C87111EC4E88400FA49E2 /* twist.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D11EC4E7CC00FA49E2 /* twist.c */; }; + F76C87121EC4E88400FA49E2 /* track.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D21EC4E7CC00FA49E2 /* track.c */; }; + F76C87141EC4E88400FA49E2 /* track_data.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D41EC4E7CC00FA49E2 /* track_data.c */; }; + F76C87161EC4E88400FA49E2 /* track_data_old.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D61EC4E7CC00FA49E2 /* track_data_old.c */; }; + F76C87171EC4E88400FA49E2 /* track_design.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D71EC4E7CC00FA49E2 /* track_design.c */; }; + F76C87191EC4E88400FA49E2 /* track_design_save.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84D91EC4E7CD00FA49E2 /* track_design_save.c */; }; + F76C871A1EC4E88400FA49E2 /* track_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84DA1EC4E7CD00FA49E2 /* track_paint.c */; }; + F76C871C1EC4E88400FA49E2 /* TrackDesignRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84DC1EC4E7CD00FA49E2 /* TrackDesignRepository.cpp */; }; + F76C871E1EC4E88400FA49E2 /* chairlift.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84DF1EC4E7CD00FA49E2 /* chairlift.c */; }; + F76C871F1EC4E88400FA49E2 /* lift.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E01EC4E7CD00FA49E2 /* lift.c */; }; + F76C87201EC4E88400FA49E2 /* miniature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E11EC4E7CD00FA49E2 /* miniature_railway.c */; }; + F76C87211EC4E88400FA49E2 /* monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E21EC4E7CD00FA49E2 /* monorail.c */; }; + F76C87221EC4E88400FA49E2 /* suspended_monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E31EC4E7CD00FA49E2 /* suspended_monorail.c */; }; + F76C87231EC4E88400FA49E2 /* vehicle.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E41EC4E7CD00FA49E2 /* vehicle.c */; }; + F76C87251EC4E88400FA49E2 /* vehicle_data.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E61EC4E7CD00FA49E2 /* vehicle_data.c */; }; + F76C87271EC4E88400FA49E2 /* vehicle_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84E81EC4E7CD00FA49E2 /* vehicle_paint.c */; }; + F76C87291EC4E88400FA49E2 /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EB1EC4E7CD00FA49E2 /* boat_ride.c */; }; + F76C872A1EC4E88400FA49E2 /* dingy_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EC1EC4E7CD00FA49E2 /* dingy_slide.c */; }; + F76C872B1EC4E88400FA49E2 /* log_flume.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84ED1EC4E7CD00FA49E2 /* log_flume.c */; }; + F76C872C1EC4E88400FA49E2 /* river_rafts.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EE1EC4E7CD00FA49E2 /* river_rafts.c */; }; + F76C872D1EC4E88400FA49E2 /* river_rapids.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EF1EC4E7CD00FA49E2 /* river_rapids.c */; }; + F76C872E1EC4E88400FA49E2 /* splash_boats.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F01EC4E7CD00FA49E2 /* splash_boats.c */; }; + F76C872F1EC4E88400FA49E2 /* submarine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F11EC4E7CD00FA49E2 /* submarine_ride.c */; }; + F76C87301EC4E88400FA49E2 /* water_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F21EC4E7CD00FA49E2 /* water_coaster.c */; }; + F76C87311EC4E88400FA49E2 /* scenario.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F41EC4E7CD00FA49E2 /* scenario.c */; }; + F76C87331EC4E88400FA49E2 /* ScenarioRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F61EC4E7CD00FA49E2 /* ScenarioRepository.cpp */; }; + F76C87351EC4E88400FA49E2 /* ScenarioSources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F81EC4E7CD00FA49E2 /* ScenarioSources.cpp */; }; + F76C87381EC4E88400FA49E2 /* TitleScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84FC1EC4E7CD00FA49E2 /* TitleScreen.cpp */; }; + F76C873A1EC4E88400FA49E2 /* TitleSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C84FE1EC4E7CD00FA49E2 /* TitleSequence.cpp */; }; + F76C873C1EC4E88400FA49E2 /* TitleSequenceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85001EC4E7CD00FA49E2 /* TitleSequenceManager.cpp */; }; + F76C873E1EC4E88400FA49E2 /* TitleSequencePlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85021EC4E7CD00FA49E2 /* TitleSequencePlayer.cpp */; }; + F76C87411EC4E88400FA49E2 /* sawyercoding.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85071EC4E7CD00FA49E2 /* sawyercoding.c */; }; + F76C87431EC4E88400FA49E2 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85091EC4E7CD00FA49E2 /* util.c */; }; + F76C87451EC4E88400FA49E2 /* Version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C850B1EC4E7CD00FA49E2 /* Version.cpp */; }; + F76C87471EC4E88400FA49E2 /* about.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C850E1EC4E7CD00FA49E2 /* about.c */; }; + F76C87481EC4E88400FA49E2 /* banner.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C850F1EC4E7CD00FA49E2 /* banner.c */; }; + F76C87491EC4E88400FA49E2 /* changelog.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85101EC4E7CD00FA49E2 /* changelog.c */; }; + F76C874A1EC4E88400FA49E2 /* cheats.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85111EC4E7CD00FA49E2 /* cheats.c */; }; + F76C874B1EC4E88400FA49E2 /* clear_scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85121EC4E7CD00FA49E2 /* clear_scenery.c */; }; + F76C874C1EC4E88400FA49E2 /* custom_currency.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85131EC4E7CD00FA49E2 /* custom_currency.c */; }; + F76C874D1EC4E88400FA49E2 /* debug_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85141EC4E7CD00FA49E2 /* debug_paint.c */; }; + F76C874E1EC4E88400FA49E2 /* demolish_ride_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85151EC4E7CD00FA49E2 /* demolish_ride_prompt.c */; }; + F76C874F1EC4E88400FA49E2 /* dropdown.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85161EC4E7CD00FA49E2 /* dropdown.c */; }; + F76C87511EC4E88400FA49E2 /* editor_bottom_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85181EC4E7CD00FA49E2 /* editor_bottom_toolbar.c */; }; + F76C87521EC4E88400FA49E2 /* editor_inventions_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85191EC4E7CD00FA49E2 /* editor_inventions_list.c */; }; + F76C87531EC4E88400FA49E2 /* editor_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C851A1EC4E7CD00FA49E2 /* editor_main.c */; }; + F76C87541EC4E88400FA49E2 /* editor_object_selection.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C851B1EC4E7CD00FA49E2 /* editor_object_selection.c */; }; + F76C87551EC4E88400FA49E2 /* editor_objective_options.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C851C1EC4E7CD00FA49E2 /* editor_objective_options.c */; }; + F76C87561EC4E88400FA49E2 /* editor_scenario_options.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C851D1EC4E7CD00FA49E2 /* editor_scenario_options.c */; }; + F76C87571EC4E88400FA49E2 /* error.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C851E1EC4E7CD00FA49E2 /* error.c */; }; + F76C87591EC4E88400FA49E2 /* finances.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85201EC4E7CD00FA49E2 /* finances.c */; }; + F76C875A1EC4E88400FA49E2 /* footpath.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85211EC4E7CD00FA49E2 /* footpath.c */; }; + F76C875B1EC4E88400FA49E2 /* game_bottom_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85221EC4E7CD00FA49E2 /* game_bottom_toolbar.c */; }; + F76C875C1EC4E88400FA49E2 /* guest.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85231EC4E7CD00FA49E2 /* guest.c */; }; + F76C875D1EC4E88400FA49E2 /* guest_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85241EC4E7CD00FA49E2 /* guest_list.c */; }; + F76C875E1EC4E88400FA49E2 /* install_track.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85251EC4E7CD00FA49E2 /* install_track.c */; }; + F76C875F1EC4E88400FA49E2 /* land.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85261EC4E7CD00FA49E2 /* land.c */; }; + F76C87601EC4E88400FA49E2 /* land_rights.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85271EC4E7CD00FA49E2 /* land_rights.c */; }; + F76C87611EC4E88400FA49E2 /* loadsave.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85281EC4E7CD00FA49E2 /* loadsave.c */; }; + F76C87621EC4E88400FA49E2 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85291EC4E7CD00FA49E2 /* main.c */; }; + F76C87631EC4E88400FA49E2 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852A1EC4E7CD00FA49E2 /* map.c */; }; + F76C87641EC4E88400FA49E2 /* map_tooltip.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852B1EC4E7CD00FA49E2 /* map_tooltip.c */; }; + F76C87651EC4E88400FA49E2 /* mapgen.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852C1EC4E7CD00FA49E2 /* mapgen.c */; }; + F76C87661EC4E88400FA49E2 /* maze_construction.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852D1EC4E7CD00FA49E2 /* maze_construction.c */; }; + F76C87671EC4E88400FA49E2 /* multiplayer.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852E1EC4E7CD00FA49E2 /* multiplayer.c */; }; + F76C87681EC4E88400FA49E2 /* music_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C852F1EC4E7CD00FA49E2 /* music_credits.c */; }; + F76C87691EC4E88400FA49E2 /* network_status.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85301EC4E7CD00FA49E2 /* network_status.c */; }; + F76C876A1EC4E88400FA49E2 /* new_campaign.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85311EC4E7CD00FA49E2 /* new_campaign.c */; }; + F76C876B1EC4E88400FA49E2 /* new_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85321EC4E7CD00FA49E2 /* new_ride.c */; }; + F76C876C1EC4E88400FA49E2 /* news.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85331EC4E7CD00FA49E2 /* news.c */; }; + F76C876D1EC4E88400FA49E2 /* news_options.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85341EC4E7CD00FA49E2 /* news_options.c */; }; + F76C876E1EC4E88400FA49E2 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85351EC4E7CD00FA49E2 /* options.c */; }; + F76C876F1EC4E88400FA49E2 /* park.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85361EC4E7CD00FA49E2 /* park.c */; }; + F76C87701EC4E88400FA49E2 /* player.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85371EC4E7CD00FA49E2 /* player.c */; }; + F76C87711EC4E88400FA49E2 /* publisher_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85381EC4E7CD00FA49E2 /* publisher_credits.c */; }; + F76C87721EC4E88400FA49E2 /* research.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85391EC4E7CD00FA49E2 /* research.c */; }; + F76C87731EC4E88400FA49E2 /* ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C853A1EC4E7CD00FA49E2 /* ride.c */; }; + F76C87741EC4E88400FA49E2 /* ride_construction.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C853B1EC4E7CD00FA49E2 /* ride_construction.c */; }; + F76C87751EC4E88400FA49E2 /* ride_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C853C1EC4E7CD00FA49E2 /* ride_list.c */; }; + F76C87761EC4E88400FA49E2 /* save_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C853D1EC4E7CD00FA49E2 /* save_prompt.c */; }; + F76C87771EC4E88400FA49E2 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C853E1EC4E7CD00FA49E2 /* scenery.c */; }; + F76C87781EC4E88400FA49E2 /* server_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C853F1EC4E7CD00FA49E2 /* server_list.cpp */; }; + F76C87791EC4E88400FA49E2 /* server_start.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85401EC4E7CD00FA49E2 /* server_start.c */; }; + F76C877A1EC4E88400FA49E2 /* shortcut_key_change.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85411EC4E7CD00FA49E2 /* shortcut_key_change.c */; }; + F76C877B1EC4E88400FA49E2 /* shortcut_keys.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85421EC4E7CD00FA49E2 /* shortcut_keys.c */; }; + F76C877C1EC4E88400FA49E2 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85431EC4E7CD00FA49E2 /* sign.c */; }; + F76C877D1EC4E88400FA49E2 /* staff.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85441EC4E7CD00FA49E2 /* staff.c */; }; + F76C877E1EC4E88400FA49E2 /* staff_fire_prompt.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85451EC4E7CD00FA49E2 /* staff_fire_prompt.c */; }; + F76C877F1EC4E88400FA49E2 /* staff_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85461EC4E7CD00FA49E2 /* staff_list.c */; }; + F76C87801EC4E88400FA49E2 /* text_input.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85471EC4E7CD00FA49E2 /* text_input.c */; }; + F76C87811EC4E88400FA49E2 /* themes.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85481EC4E7CD00FA49E2 /* themes.c */; }; + F76C87821EC4E88400FA49E2 /* tile_inspector.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85491EC4E7CD00FA49E2 /* tile_inspector.c */; }; + F76C87841EC4E88400FA49E2 /* title_command_editor.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C854B1EC4E7CD00FA49E2 /* title_command_editor.c */; }; + F76C87851EC4E88400FA49E2 /* title_editor.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C854C1EC4E7CD00FA49E2 /* title_editor.c */; }; + F76C87861EC4E88400FA49E2 /* title_exit.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C854D1EC4E7CD00FA49E2 /* title_exit.c */; }; + F76C87871EC4E88400FA49E2 /* title_logo.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C854E1EC4E7CD00FA49E2 /* title_logo.c */; }; + F76C87881EC4E88400FA49E2 /* title_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C854F1EC4E7CD00FA49E2 /* title_menu.c */; }; + F76C87891EC4E88400FA49E2 /* title_options.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85501EC4E7CD00FA49E2 /* title_options.c */; }; + F76C878A1EC4E88400FA49E2 /* title_scenarioselect.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85511EC4E7CD00FA49E2 /* title_scenarioselect.c */; }; + F76C878B1EC4E88400FA49E2 /* tooltip.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85521EC4E7CD00FA49E2 /* tooltip.c */; }; + F76C878D1EC4E88400FA49E2 /* top_toolbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85541EC4E7CD00FA49E2 /* top_toolbar.c */; }; + F76C878E1EC4E88400FA49E2 /* track_list.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85551EC4E7CD00FA49E2 /* track_list.c */; }; + F76C878F1EC4E88400FA49E2 /* track_manage.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85561EC4E7CD00FA49E2 /* track_manage.c */; }; + F76C87901EC4E88400FA49E2 /* track_place.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85571EC4E7CD00FA49E2 /* track_place.c */; }; + F76C87911EC4E88400FA49E2 /* view_clipping.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85581EC4E7CD00FA49E2 /* view_clipping.c */; }; + F76C87921EC4E88400FA49E2 /* viewport.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85591EC4E7CD00FA49E2 /* viewport.c */; }; + F76C87931EC4E88400FA49E2 /* water.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C855A1EC4E7CD00FA49E2 /* water.c */; }; + F76C87941EC4E88400FA49E2 /* Balloon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C855C1EC4E7CD00FA49E2 /* Balloon.cpp */; }; + F76C87951EC4E88400FA49E2 /* banner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C855D1EC4E7CD00FA49E2 /* banner.cpp */; }; + F76C87971EC4E88400FA49E2 /* Climate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C855F1EC4E7CD00FA49E2 /* Climate.cpp */; }; + F76C87991EC4E88400FA49E2 /* Duck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85611EC4E7CD00FA49E2 /* Duck.cpp */; }; + F76C879A1EC4E88400FA49E2 /* entrance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85621EC4E7CD00FA49E2 /* entrance.cpp */; }; + F76C879C1EC4E88400FA49E2 /* footpath.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85641EC4E7CD00FA49E2 /* footpath.c */; }; + F76C879E1EC4E88400FA49E2 /* Fountain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85661EC4E7CD00FA49E2 /* Fountain.cpp */; }; + F76C87A01EC4E88400FA49E2 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85681EC4E7CD00FA49E2 /* map.c */; }; + F76C87A21EC4E88400FA49E2 /* map_animation.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C856A1EC4E7CD00FA49E2 /* map_animation.c */; }; + F76C87A41EC4E88500FA49E2 /* map_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */; }; + F76C87A61EC4E88500FA49E2 /* mapgen.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C856E1EC4E7CD00FA49E2 /* mapgen.c */; }; + F76C87A81EC4E88500FA49E2 /* money_effect.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85701EC4E7CD00FA49E2 /* money_effect.c */; }; + F76C87A91EC4E88500FA49E2 /* park.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85711EC4E7CD00FA49E2 /* park.c */; }; + F76C87AB1EC4E88500FA49E2 /* particle.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85731EC4E7CD00FA49E2 /* particle.c */; }; + F76C87AC1EC4E88500FA49E2 /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85741EC4E7CD00FA49E2 /* scenery.c */; }; + F76C87AE1EC4E88500FA49E2 /* sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85761EC4E7CD00FA49E2 /* sprite.c */; }; + F76C87B01EC4E88500FA49E2 /* tile_inspector.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C85781EC4E7CD00FA49E2 /* tile_inspector.c */; }; + F76C87B21EC4E88500FA49E2 /* wall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C857A1EC4E7CD00FA49E2 /* wall.cpp */; }; + F76C88781EC5324E00FA49E2 /* AudioChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85821EC4E82600FA49E2 /* AudioChannel.cpp */; }; + F76C88791EC5324E00FA49E2 /* AudioContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85831EC4E82600FA49E2 /* AudioContext.cpp */; }; + F76C887A1EC5324E00FA49E2 /* AudioMixer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85861EC4E82600FA49E2 /* AudioMixer.cpp */; }; + F76C887B1EC5324E00FA49E2 /* FileAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85871EC4E82600FA49E2 /* FileAudioSource.cpp */; }; + F76C887C1EC5324E00FA49E2 /* MemoryAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85881EC4E82600FA49E2 /* MemoryAudioSource.cpp */; }; + F76C887D1EC5324E00FA49E2 /* CursorData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C858A1EC4E82600FA49E2 /* CursorData.cpp */; }; + F76C887E1EC5324E00FA49E2 /* CursorRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C858B1EC4E82600FA49E2 /* CursorRepository.cpp */; }; + F76C887F1EC5324E00FA49E2 /* CopyFramebufferShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85911EC4E82600FA49E2 /* CopyFramebufferShader.cpp */; }; + F76C88801EC5324E00FA49E2 /* DrawImageShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85941EC4E82600FA49E2 /* DrawImageShader.cpp */; }; + F76C88811EC5324E00FA49E2 /* DrawLineShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85961EC4E82600FA49E2 /* DrawLineShader.cpp */; }; + F76C88821EC5324E00FA49E2 /* FillRectShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85981EC4E82600FA49E2 /* FillRectShader.cpp */; }; + F76C88831EC5324E00FA49E2 /* OpenGLAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C859B1EC4E82600FA49E2 /* OpenGLAPI.cpp */; }; + F76C88841EC5324E00FA49E2 /* OpenGLDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C859D1EC4E82600FA49E2 /* OpenGLDrawingEngine.cpp */; }; + F76C88851EC5324E00FA49E2 /* OpenGLFramebuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C859E1EC4E82600FA49E2 /* OpenGLFramebuffer.cpp */; }; + F76C88861EC5324E00FA49E2 /* OpenGLShaderProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85A01EC4E82600FA49E2 /* OpenGLShaderProgram.cpp */; }; + F76C88871EC5324E00FA49E2 /* SwapFramebuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85A21EC4E82600FA49E2 /* SwapFramebuffer.cpp */; }; + F76C88881EC5324E00FA49E2 /* TextureCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85A41EC4E82600FA49E2 /* TextureCache.cpp */; }; + F76C88891EC5324E00FA49E2 /* SoftwareDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85A61EC4E82600FA49E2 /* SoftwareDrawingEngine.cpp */; }; + F76C888A1EC5324E00FA49E2 /* TextComposition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85A91EC4E82600FA49E2 /* TextComposition.cpp */; }; + F76C888B1EC5324E00FA49E2 /* Ui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85AB1EC4E82600FA49E2 /* Ui.cpp */; }; + F76C888C1EC5324E00FA49E2 /* UiContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85AC1EC4E82600FA49E2 /* UiContext.cpp */; }; + F76C888D1EC5324E00FA49E2 /* UiContext.Linux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85AE1EC4E82600FA49E2 /* UiContext.Linux.cpp */; }; + F76C888E1EC5324E00FA49E2 /* UiContext.Win32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C85AF1EC4E82600FA49E2 /* UiContext.Win32.cpp */; }; + F76C88921EC539A300FA49E2 /* libopenrct2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */; }; + F7D7747B1EC5EB6D00BE6EBC /* lay_down_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84951EC4E7CC00FA49E2 /* lay_down_roller_coaster.c */; }; + F7D7747F1EC61E5100BE6EBC /* UiContext.macOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + F76C888F1EC5325700FA49E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D497D0701C20FD52002BF46A /* Project object */; + proxyType = 1; + remoteGlobalIDString = F76C80991EC4D9FA00FA49E2; + remoteInfo = libopenrct2; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ C64FDA5B1D6D99F400F259B9 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -512,37 +646,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 007A05C01CFB2C8B00F419C3 /* NetworkAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkAction.cpp; sourceTree = ""; usesTabs = 0; }; - 007A05C11CFB2C8B00F419C3 /* NetworkAction.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkAction.h; sourceTree = ""; usesTabs = 0; }; - 007A05C41CFB2C8B00F419C3 /* NetworkConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkConnection.cpp; sourceTree = ""; usesTabs = 0; }; - 007A05C51CFB2C8B00F419C3 /* NetworkConnection.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkConnection.h; sourceTree = ""; usesTabs = 0; }; - 007A05C61CFB2C8B00F419C3 /* NetworkGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkGroup.cpp; sourceTree = ""; usesTabs = 0; }; - 007A05C71CFB2C8B00F419C3 /* NetworkGroup.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkGroup.h; sourceTree = ""; usesTabs = 0; }; - 007A05C81CFB2C8B00F419C3 /* NetworkPacket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkPacket.cpp; sourceTree = ""; usesTabs = 0; }; - 007A05C91CFB2C8B00F419C3 /* NetworkPacket.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkPacket.h; sourceTree = ""; usesTabs = 0; }; - 007A05CA1CFB2C8B00F419C3 /* NetworkPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkPlayer.cpp; sourceTree = ""; usesTabs = 0; }; - 007A05CB1CFB2C8B00F419C3 /* NetworkPlayer.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkPlayer.h; sourceTree = ""; usesTabs = 0; }; - 007A05CC1CFB2C8B00F419C3 /* NetworkTypes.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkTypes.h; sourceTree = ""; usesTabs = 0; }; - 008BF7271CDAA5C30019A2AD /* track_design_save.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_design_save.c; sourceTree = ""; }; - 008BF7281CDAA5C30019A2AD /* track_design.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_design.c; sourceTree = ""; }; - 008BF7291CDAA5C30019A2AD /* track_design.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track_design.h; sourceTree = ""; }; - 00EFEE701CF1D80B0035213B /* NetworkKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkKey.cpp; sourceTree = ""; usesTabs = 0; }; - 00EFEE711CF1D80B0035213B /* NetworkKey.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkKey.h; sourceTree = ""; usesTabs = 0; }; - 242F470FE91956ACA4078F6A /* Climate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Climate.cpp; sourceTree = ""; }; - 437490DBD74ECF60C3363559 /* Balloon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Balloon.cpp; sourceTree = ""; }; - 652076301E22EFE7000D0C04 /* Imaging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Imaging.cpp; sourceTree = ""; }; - 652076311E22EFE7000D0C04 /* Imaging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Imaging.h; sourceTree = ""; }; - 652747EA1E41CE1B000F36FD /* SawyerEncoding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SawyerEncoding.cpp; path = rct12/SawyerEncoding.cpp; sourceTree = ""; }; - 652747EB1E41CE1B000F36FD /* SawyerEncoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SawyerEncoding.h; path = rct12/SawyerEncoding.h; sourceTree = ""; }; - 656F6C8C1E45BFC200E0F770 /* Version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Version.cpp; sourceTree = ""; }; - 656F6C8D1E45BFC200E0F770 /* Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Version.h; sourceTree = ""; }; - 658F3D8F1E44A6C200388550 /* ParkImporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParkImporter.cpp; sourceTree = ""; }; - 658F3D901E44A6C200388550 /* ParkImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParkImporter.h; sourceTree = ""; }; - 791166F91D7486EF005912EA /* NetworkServerAdvertiser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkServerAdvertiser.cpp; sourceTree = ""; }; - 791166FA1D7486EF005912EA /* NetworkServerAdvertiser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkServerAdvertiser.h; sourceTree = ""; }; - 8594C05F1D885CF600235E93 /* track_data_old.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_data_old.c; sourceTree = ""; }; - 85B468FB1D96822F000F1DB5 /* paint_helpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = paint_helpers.c; sourceTree = ""; }; - A5D1DB5BE280897DCDEBFCED /* Duck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Duck.cpp; sourceTree = ""; }; C606CCAB1DB4054000FE4015 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = compat.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; C606CCAC1DB4054000FE4015 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = data.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; C606CCAD1DB4054000FE4015 /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = data.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -570,14 +673,6 @@ C606CCD61DB4E1CD00FE4015 /* PaintIntercept.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = PaintIntercept.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; C606CD231DB5120900FE4015 /* TestPaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestPaint.cpp; sourceTree = ""; }; C606CD241DB5120900FE4015 /* TestPaint.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TestPaint.hpp; sourceTree = ""; }; - C612A8971D64825300B634CA /* vehicle_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vehicle_data.c; sourceTree = ""; }; - C612A8981D64825300B634CA /* vehicle_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vehicle_data.h; sourceTree = ""; }; - C6136C541E21893500F3ED2B /* view_clipping.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = view_clipping.c; sourceTree = ""; }; - C61FB7221CF86356004CE991 /* NetworkUser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkUser.cpp; sourceTree = ""; usesTabs = 0; }; - C61FB7231CF86356004CE991 /* NetworkUser.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NetworkUser.h; sourceTree = ""; usesTabs = 0; }; - C647C68F1E1D0CA000C7FB21 /* AudioMixer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioMixer.cpp; sourceTree = ""; }; - C647C6901E1D0CA000C7FB21 /* AudioMixer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioMixer.h; sourceTree = ""; }; - C649B3D31DF04ED2008AC826 /* format_codes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = format_codes.c; sourceTree = ""; }; C64FDA5D1D6D99F400F259B9 /* PaintTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PaintTest; sourceTree = BUILT_PRODUCTS_DIR; }; C650B2151CCABBDD00B4D91C /* S4Importer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = S4Importer.cpp; sourceTree = ""; usesTabs = 0; }; C650B2171CCABBDD00B4D91C /* tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tables.cpp; sourceTree = ""; usesTabs = 0; }; @@ -719,298 +814,10 @@ C6E96E331E0408A80076A04F /* zip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; C6E96E341E0408A80076A04F /* zipconf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zipconf.h; sourceTree = ""; }; C6E96E351E0408B40076A04F /* libzip.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.dylib; sourceTree = ""; }; - C6EABCC31E719691008C09AB /* UriHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UriHandler.cpp; sourceTree = ""; }; - C6FF1BAD1DBCE1A10078DCB5 /* junior_roller_coaster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = junior_roller_coaster.h; sourceTree = ""; }; D41B73EE1C2101890080A7B9 /* libcurl.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcurl.tbd; path = usr/lib/libcurl.tbd; sourceTree = SDKROOT; }; D41B741C1C210A7A0080A7B9 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; D41B74721C2125E50080A7B9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = distribution/macos/Assets.xcassets; sourceTree = SOURCE_ROOT; }; - D41FA8631E5EA1E200215624 /* wall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wall.cpp; sourceTree = ""; }; - D429FF3F1E36ABB3009342A6 /* tile_inspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tile_inspector.h; sourceTree = ""; }; - D429FF401E36ABCD009342A6 /* tile_inspector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tile_inspector.c; sourceTree = ""; }; - D429FF411E36ABCD009342A6 /* tile_inspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tile_inspector.h; sourceTree = ""; }; - D42E33751E5C27D600D630AF /* Config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Config.cpp; sourceTree = ""; }; - D42E33761E5C27D600D630AF /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = ""; }; - D42E33771E5C27D600D630AF /* ConfigEnum.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ConfigEnum.hpp; sourceTree = ""; }; - D42E33781E5C27D600D630AF /* IniReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IniReader.cpp; sourceTree = ""; }; - D42E33791E5C27D600D630AF /* IniReader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = IniReader.hpp; sourceTree = ""; }; - D42E337A1E5C27D600D630AF /* IniWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IniWriter.cpp; sourceTree = ""; }; - D42E337B1E5C27D600D630AF /* IniWriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = IniWriter.hpp; sourceTree = ""; }; - D42E337C1E5C27D600D630AF /* KeyboardShortcuts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyboardShortcuts.cpp; sourceTree = ""; }; - D433A4FA1E4A861F00D9A6DF /* SawyerChunk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SawyerChunk.cpp; path = rct12/SawyerChunk.cpp; sourceTree = ""; }; - D433A4FB1E4A861F00D9A6DF /* SawyerChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SawyerChunk.h; path = rct12/SawyerChunk.h; sourceTree = ""; }; - D433A4FC1E4A861F00D9A6DF /* SawyerChunkReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SawyerChunkReader.cpp; path = rct12/SawyerChunkReader.cpp; sourceTree = ""; }; - D433A4FD1E4A861F00D9A6DF /* SawyerChunkReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SawyerChunkReader.h; path = rct12/SawyerChunkReader.h; sourceTree = ""; }; - D433A4FE1E4A861F00D9A6DF /* SawyerChunkWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SawyerChunkWriter.cpp; path = rct12/SawyerChunkWriter.cpp; sourceTree = ""; }; - D433A4FF1E4A861F00D9A6DF /* SawyerChunkWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SawyerChunkWriter.h; path = rct12/SawyerChunkWriter.h; sourceTree = ""; }; - D433A5031E4A862F00D9A6DF /* rct12.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = rct12.h; sourceTree = ""; }; - D43407C01D0E14BE00C2B3D4 /* CopyFramebufferShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CopyFramebufferShader.cpp; sourceTree = ""; }; - D43407C11D0E14BE00C2B3D4 /* CopyFramebufferShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyFramebufferShader.h; sourceTree = ""; }; - D43407C41D0E14BE00C2B3D4 /* DrawImageShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawImageShader.cpp; sourceTree = ""; }; - D43407C51D0E14BE00C2B3D4 /* DrawImageShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawImageShader.h; sourceTree = ""; }; - D43407C61D0E14BE00C2B3D4 /* DrawLineShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawLineShader.cpp; sourceTree = ""; }; - D43407C71D0E14BE00C2B3D4 /* DrawLineShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawLineShader.h; sourceTree = ""; }; - D43407C81D0E14BE00C2B3D4 /* FillRectShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FillRectShader.cpp; sourceTree = ""; }; - D43407C91D0E14BE00C2B3D4 /* FillRectShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FillRectShader.h; sourceTree = ""; }; - D43407CA1D0E14BE00C2B3D4 /* GLSLTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSLTypes.h; sourceTree = ""; }; - D43407CB1D0E14BE00C2B3D4 /* OpenGLAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLAPI.cpp; sourceTree = ""; }; - D43407CC1D0E14BE00C2B3D4 /* OpenGLAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLAPI.h; sourceTree = ""; }; - D43407CD1D0E14BE00C2B3D4 /* OpenGLDrawingEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLDrawingEngine.cpp; sourceTree = ""; }; - D43407CE1D0E14BE00C2B3D4 /* OpenGLFramebuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLFramebuffer.cpp; sourceTree = ""; }; - D43407CF1D0E14BE00C2B3D4 /* OpenGLFramebuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLFramebuffer.h; sourceTree = ""; }; - D43407D01D0E14BE00C2B3D4 /* OpenGLShaderProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLShaderProgram.cpp; sourceTree = ""; }; - D43407D11D0E14BE00C2B3D4 /* OpenGLShaderProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLShaderProgram.h; sourceTree = ""; }; - D43407D21D0E14BE00C2B3D4 /* SwapFramebuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SwapFramebuffer.cpp; sourceTree = ""; }; - D43407D31D0E14BE00C2B3D4 /* SwapFramebuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwapFramebuffer.h; sourceTree = ""; }; - D43407D41D0E14BE00C2B3D4 /* TextureCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureCache.cpp; sourceTree = ""; }; - D43407D51D0E14BE00C2B3D4 /* TextureCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureCache.h; sourceTree = ""; }; D43407E11D0E14CE00C2B3D4 /* shaders */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shaders; path = data/shaders; sourceTree = SOURCE_ROOT; }; - D437A26D1DBC2937001CB2CF /* TrackDesignRepository.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrackDesignRepository.cpp; sourceTree = ""; }; - D437A26E1DBC2937001CB2CF /* TrackDesignRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackDesignRepository.h; sourceTree = ""; }; - D437A2701DBC29B0001CB2CF /* FileScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileScanner.cpp; sourceTree = ""; usesTabs = 0; }; - D437A2711DBC29B0001CB2CF /* FileScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileScanner.h; sourceTree = ""; usesTabs = 0; }; - D44270D11CC81B3200D84D28 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; }; - D44270D41CC81B3200D84D28 /* cheats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cheats.c; sourceTree = ""; }; - D44270D51CC81B3200D84D28 /* cheats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cheats.h; sourceTree = ""; }; - D44270D71CC81B3200D84D28 /* CommandLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLine.cpp; sourceTree = ""; usesTabs = 0; }; - D44270D81CC81B3200D84D28 /* CommandLine.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CommandLine.hpp; sourceTree = ""; usesTabs = 0; }; - D44270D91CC81B3200D84D28 /* RootCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RootCommands.cpp; sourceTree = ""; usesTabs = 0; }; - D44270DA1CC81B3200D84D28 /* ScreenshotCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenshotCommands.cpp; sourceTree = ""; usesTabs = 0; }; - D44270DB1CC81B3200D84D28 /* SpriteCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteCommands.cpp; sourceTree = ""; usesTabs = 0; }; - D44270DC1CC81B3200D84D28 /* cmdline_sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cmdline_sprite.c; sourceTree = ""; }; - D44270DD1CC81B3200D84D28 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; }; - D44270E11CC81B3200D84D28 /* Console.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Console.cpp; sourceTree = ""; usesTabs = 0; }; - D44270E21CC81B3200D84D28 /* Console.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Console.hpp; sourceTree = ""; usesTabs = 0; }; - D44270E31CC81B3200D84D28 /* Diagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Diagnostics.cpp; sourceTree = ""; usesTabs = 0; }; - D44270E41CC81B3200D84D28 /* Diagnostics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Diagnostics.hpp; sourceTree = ""; usesTabs = 0; }; - D44270E51CC81B3200D84D28 /* Exception.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Exception.hpp; sourceTree = ""; usesTabs = 0; }; - D44270E61CC81B3200D84D28 /* FileStream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = FileStream.hpp; sourceTree = ""; usesTabs = 0; }; - D44270E71CC81B3200D84D28 /* Guard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Guard.cpp; sourceTree = ""; usesTabs = 0; }; - D44270E81CC81B3200D84D28 /* Guard.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Guard.hpp; sourceTree = ""; usesTabs = 0; }; - D44270EA1CC81B3200D84D28 /* IStream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = IStream.hpp; sourceTree = ""; usesTabs = 0; }; - D44270EB1CC81B3200D84D28 /* Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Json.cpp; sourceTree = ""; usesTabs = 0; }; - D44270EC1CC81B3200D84D28 /* Json.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Json.hpp; sourceTree = ""; usesTabs = 0; }; - D44270EE1CC81B3200D84D28 /* Math.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Math.hpp; sourceTree = ""; usesTabs = 0; }; - D44270EF1CC81B3200D84D28 /* Memory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Memory.hpp; sourceTree = ""; usesTabs = 0; }; - D44270F01CC81B3200D84D28 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; usesTabs = 0; }; - D44270F11CC81B3200D84D28 /* Path.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Path.hpp; sourceTree = ""; usesTabs = 0; }; - D44270F51CC81B3200D84D28 /* String.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = String.cpp; sourceTree = ""; usesTabs = 0; }; - D44270F61CC81B3200D84D28 /* String.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = String.hpp; sourceTree = ""; usesTabs = 0; }; - D44270F71CC81B3200D84D28 /* StringBuilder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = StringBuilder.hpp; sourceTree = ""; usesTabs = 0; }; - D44270F81CC81B3200D84D28 /* StringReader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = StringReader.hpp; sourceTree = ""; usesTabs = 0; }; - D44270F91CC81B3200D84D28 /* textinputbuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = textinputbuffer.c; sourceTree = ""; }; - D44270FA1CC81B3200D84D28 /* textinputbuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = textinputbuffer.h; sourceTree = ""; }; - D44270FB1CC81B3200D84D28 /* Util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Util.hpp; sourceTree = ""; usesTabs = 1; }; - D44270FE1CC81B3200D84D28 /* diagnostic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = diagnostic.c; sourceTree = ""; }; - D44270FF1CC81B3200D84D28 /* diagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = diagnostic.h; sourceTree = ""; }; - D44271011CC81B3200D84D28 /* drawing.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = drawing.c; sourceTree = ""; }; - D44271021CC81B3200D84D28 /* drawing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = drawing.h; sourceTree = ""; }; - D44271031CC81B3200D84D28 /* drawing_fast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = drawing_fast.cpp; sourceTree = ""; usesTabs = 0; }; - D44271041CC81B3200D84D28 /* font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = font.c; sourceTree = ""; }; - D44271051CC81B3200D84D28 /* font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = font.h; sourceTree = ""; }; - D44271061CC81B3200D84D28 /* line.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = line.c; sourceTree = ""; }; - D44271081CC81B3200D84D28 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; }; - D44271091CC81B3200D84D28 /* scrolling_text.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scrolling_text.c; sourceTree = ""; }; - D442710B1CC81B3200D84D28 /* string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = string.c; sourceTree = ""; }; - D442710E1CC81B3200D84D28 /* editor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor.c; sourceTree = ""; }; - D442710F1CC81B3200D84D28 /* editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = editor.h; sourceTree = ""; }; - D44271101CC81B3200D84D28 /* game.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = game.c; sourceTree = ""; }; - D44271111CC81B3200D84D28 /* game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = ""; }; - D44271161CC81B3200D84D28 /* input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = input.c; sourceTree = ""; }; - D44271171CC81B3200D84D28 /* input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = input.h; sourceTree = ""; }; - D44271191CC81B3200D84D28 /* chat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chat.c; sourceTree = ""; }; - D442711A1CC81B3200D84D28 /* chat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chat.h; sourceTree = ""; }; - D442711B1CC81B3200D84D28 /* colour.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = colour.c; sourceTree = ""; }; - D442711C1CC81B3200D84D28 /* colour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colour.h; sourceTree = ""; }; - D442711D1CC81B3200D84D28 /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = console.c; sourceTree = ""; }; - D442711E1CC81B3200D84D28 /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = console.h; sourceTree = ""; }; - D442711F1CC81B3200D84D28 /* graph.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = graph.c; sourceTree = ""; }; - D44271201CC81B3200D84D28 /* graph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graph.h; sourceTree = ""; }; - D44271211CC81B3200D84D28 /* keyboard_shortcut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keyboard_shortcut.c; sourceTree = ""; }; - D44271221CC81B3200D84D28 /* keyboard_shortcut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keyboard_shortcut.h; sourceTree = ""; }; - D44271231CC81B3200D84D28 /* screenshot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = screenshot.c; sourceTree = ""; }; - D44271241CC81B3200D84D28 /* screenshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screenshot.h; sourceTree = ""; }; - D44271251CC81B3200D84D28 /* Theme.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Theme.cpp; sourceTree = ""; usesTabs = 0; }; - D44271261CC81B3200D84D28 /* themes.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = themes.h; sourceTree = ""; usesTabs = 0; }; - D44271291CC81B3200D84D28 /* viewport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = viewport.c; sourceTree = ""; }; - D442712A1CC81B3200D84D28 /* viewport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = viewport.h; sourceTree = ""; }; - D442712B1CC81B3200D84D28 /* viewport_interaction.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = viewport_interaction.c; sourceTree = ""; }; - D442712C1CC81B3200D84D28 /* widget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = widget.c; sourceTree = ""; }; - D442712D1CC81B3200D84D28 /* widget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = widget.h; sourceTree = ""; }; - D442712E1CC81B3200D84D28 /* window.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = window.c; sourceTree = ""; }; - D442712F1CC81B3200D84D28 /* window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = window.h; sourceTree = ""; }; - D44271301CC81B3200D84D28 /* intro.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = intro.c; sourceTree = ""; }; - D44271311CC81B3200D84D28 /* intro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intro.h; sourceTree = ""; }; - D44271331CC81B3200D84D28 /* convert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = convert.c; sourceTree = ""; }; - D44271341CC81B3200D84D28 /* currency.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = currency.c; sourceTree = ""; }; - D44271351CC81B3200D84D28 /* currency.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = currency.h; sourceTree = ""; }; - D44271361CC81B3200D84D28 /* date.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = date.c; sourceTree = ""; }; - D44271371CC81B3200D84D28 /* date.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = date.h; sourceTree = ""; }; - D44271381CC81B3200D84D28 /* format_codes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = format_codes.h; sourceTree = ""; }; - D44271391CC81B3200D84D28 /* language.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = language.cpp; sourceTree = ""; }; - D442713A1CC81B3200D84D28 /* language.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = language.h; sourceTree = ""; }; - D442713B1CC81B3200D84D28 /* LanguagePack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LanguagePack.cpp; sourceTree = ""; usesTabs = 0; }; - D442713C1CC81B3200D84D28 /* LanguagePack.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = LanguagePack.h; sourceTree = ""; usesTabs = 0; }; - D442713D1CC81B3200D84D28 /* localisation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = localisation.c; sourceTree = ""; }; - D442713E1CC81B3200D84D28 /* localisation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localisation.h; sourceTree = ""; }; - D442713F1CC81B3200D84D28 /* real_names.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = real_names.c; sourceTree = ""; }; - D44271401CC81B3200D84D28 /* string_ids.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = string_ids.h; sourceTree = ""; }; - D44271411CC81B3200D84D28 /* user.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = user.c; sourceTree = ""; }; - D44271421CC81B3200D84D28 /* user.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = user.h; sourceTree = ""; }; - D44271431CC81B3200D84D28 /* utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf8.c; sourceTree = ""; }; - D44271451CC81B3200D84D28 /* award.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = award.c; sourceTree = ""; }; - D44271461CC81B3200D84D28 /* award.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = award.h; sourceTree = ""; }; - D44271471CC81B3200D84D28 /* finance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = finance.c; sourceTree = ""; }; - D44271481CC81B3200D84D28 /* finance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = finance.h; sourceTree = ""; }; - D44271491CC81B3200D84D28 /* marketing.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = marketing.c; sourceTree = ""; }; - D442714A1CC81B3200D84D28 /* marketing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = marketing.h; sourceTree = ""; }; - D442714B1CC81B3200D84D28 /* news_item.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = news_item.c; sourceTree = ""; }; - D442714C1CC81B3200D84D28 /* news_item.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = news_item.h; sourceTree = ""; }; - D442714D1CC81B3200D84D28 /* research.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = research.c; sourceTree = ""; }; - D442714E1CC81B3200D84D28 /* research.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = research.h; sourceTree = ""; }; - D44271501CC81B3200D84D28 /* http.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = http.cpp; sourceTree = ""; usesTabs = 0; }; - D44271511CC81B3200D84D28 /* http.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = http.h; sourceTree = ""; usesTabs = 0; }; - D44271521CC81B3200D84D28 /* network.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = network.cpp; sourceTree = ""; usesTabs = 1; }; - D44271531CC81B3200D84D28 /* network.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = network.h; sourceTree = ""; usesTabs = 1; }; - D44271541CC81B3200D84D28 /* twitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = twitch.cpp; sourceTree = ""; usesTabs = 0; }; - D44271551CC81B3200D84D28 /* twitch.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = twitch.h; sourceTree = ""; usesTabs = 0; }; - D44271561CC81B3200D84D28 /* object_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = object_list.c; sourceTree = ""; }; - D44271581CC81B3200D84D28 /* object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = ""; }; - D442715C1CC81B3200D84D28 /* peep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = peep.c; sourceTree = ""; }; - D442715D1CC81B3200D84D28 /* peep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = peep.h; sourceTree = ""; }; - D442715E1CC81B3200D84D28 /* staff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = staff.c; sourceTree = ""; }; - D442715F1CC81B3200D84D28 /* staff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = staff.h; sourceTree = ""; }; - D44271611CC81B3200D84D28 /* crash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crash.cpp; sourceTree = ""; usesTabs = 0; }; - D44271621CC81B3200D84D28 /* crash.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = crash.h; sourceTree = ""; usesTabs = 0; }; - D44271631CC81B3200D84D28 /* linux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = linux.c; sourceTree = ""; }; - D44271641CC81B3200D84D28 /* macos.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = macos.m; sourceTree = ""; }; - D44271651CC81B3200D84D28 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; }; - D44271661CC81B3200D84D28 /* posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = posix.c; sourceTree = ""; }; - D44271671CC81B3200D84D28 /* shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = shared.c; sourceTree = ""; }; - D44271681CC81B3200D84D28 /* windows.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = windows.c; sourceTree = ""; }; - D44271691CC81B3200D84D28 /* rct1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rct1.c; sourceTree = ""; }; - D442716A1CC81B3200D84D28 /* rct1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rct1.h; sourceTree = ""; }; - D442716B1CC81B3200D84D28 /* rct2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rct2.c; sourceTree = ""; }; - D442716C1CC81B3200D84D28 /* rct2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rct2.h; sourceTree = ""; }; - D442716F1CC81B3200D84D28 /* cable_lift.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cable_lift.c; sourceTree = ""; }; - D44271701CC81B3200D84D28 /* cable_lift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cable_lift.h; sourceTree = ""; }; - D44271711CC81B3200D84D28 /* ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride.c; sourceTree = ""; }; - D44271721CC81B3200D84D28 /* ride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ride.h; sourceTree = ""; }; - D44271731CC81B3200D84D28 /* ride_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride_data.c; sourceTree = ""; }; - D44271741CC81B3200D84D28 /* ride_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ride_data.h; sourceTree = ""; }; - D44271751CC81B3200D84D28 /* ride_ratings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride_ratings.c; sourceTree = ""; }; - D44271761CC81B3200D84D28 /* ride_ratings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ride_ratings.h; sourceTree = ""; }; - D44271771CC81B3200D84D28 /* station.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = station.c; sourceTree = ""; }; - D44271781CC81B3200D84D28 /* station.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = station.h; sourceTree = ""; }; - D44271791CC81B3200D84D28 /* track.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track.c; sourceTree = ""; }; - D442717A1CC81B3200D84D28 /* track.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track.h; sourceTree = ""; }; - D442717B1CC81B3200D84D28 /* track_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_data.c; sourceTree = ""; }; - D442717C1CC81B3200D84D28 /* track_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track_data.h; sourceTree = ""; }; - D442717D1CC81B3200D84D28 /* track_paint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_paint.c; sourceTree = ""; }; - D442717E1CC81B3200D84D28 /* track_paint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = track_paint.h; sourceTree = ""; }; - D442717F1CC81B3200D84D28 /* vehicle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vehicle.c; sourceTree = ""; }; - D44271801CC81B3200D84D28 /* vehicle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vehicle.h; sourceTree = ""; }; - D44271851CC81B3200D84D28 /* sprites.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sprites.h; sourceTree = ""; }; - D44271891CC81B3200D84D28 /* sawyercoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sawyercoding.c; sourceTree = ""; }; - D442718A1CC81B3200D84D28 /* sawyercoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sawyercoding.h; sourceTree = ""; }; - D442718B1CC81B3200D84D28 /* util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = ""; }; - D442718C1CC81B3200D84D28 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; }; - D442718F1CC81B3200D84D28 /* about.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = about.c; sourceTree = ""; }; - D44271901CC81B3200D84D28 /* banner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = banner.c; sourceTree = ""; }; - D44271911CC81B3200D84D28 /* changelog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = changelog.c; sourceTree = ""; }; - D44271921CC81B3200D84D28 /* cheats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cheats.c; sourceTree = ""; }; - D44271931CC81B3200D84D28 /* clear_scenery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = clear_scenery.c; sourceTree = ""; }; - D44271941CC81B3200D84D28 /* demolish_ride_prompt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = demolish_ride_prompt.c; sourceTree = ""; }; - D44271951CC81B3200D84D28 /* dropdown.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dropdown.c; sourceTree = ""; }; - D44271961CC81B3200D84D28 /* dropdown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dropdown.h; sourceTree = ""; }; - D44271971CC81B3200D84D28 /* editor_bottom_toolbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_bottom_toolbar.c; sourceTree = ""; }; - D44271981CC81B3200D84D28 /* editor_inventions_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_inventions_list.c; sourceTree = ""; }; - D44271991CC81B3200D84D28 /* editor_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_main.c; sourceTree = ""; }; - D442719A1CC81B3200D84D28 /* editor_object_selection.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_object_selection.c; sourceTree = ""; }; - D442719B1CC81B3200D84D28 /* editor_objective_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_objective_options.c; sourceTree = ""; }; - D442719C1CC81B3200D84D28 /* editor_scenario_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = editor_scenario_options.c; sourceTree = ""; }; - D442719D1CC81B3200D84D28 /* error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = error.c; sourceTree = ""; }; - D442719E1CC81B3200D84D28 /* error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = error.h; sourceTree = ""; }; - D442719F1CC81B3200D84D28 /* finances.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = finances.c; sourceTree = ""; }; - D44271A01CC81B3200D84D28 /* footpath.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = footpath.c; sourceTree = ""; }; - D44271A11CC81B3200D84D28 /* game_bottom_toolbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = game_bottom_toolbar.c; sourceTree = ""; }; - D44271A21CC81B3200D84D28 /* guest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = guest.c; sourceTree = ""; }; - D44271A31CC81B3200D84D28 /* guest_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = guest_list.c; sourceTree = ""; }; - D44271A41CC81B3200D84D28 /* install_track.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = install_track.c; sourceTree = ""; }; - D44271A51CC81B3200D84D28 /* land.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = land.c; sourceTree = ""; }; - D44271A61CC81B3200D84D28 /* land_rights.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = land_rights.c; sourceTree = ""; }; - D44271A71CC81B3200D84D28 /* loadsave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loadsave.c; sourceTree = ""; }; - D44271A81CC81B3200D84D28 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; - D44271A91CC81B3200D84D28 /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = ""; }; - D44271AA1CC81B3200D84D28 /* map_tooltip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map_tooltip.c; sourceTree = ""; }; - D44271AB1CC81B3200D84D28 /* mapgen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mapgen.c; sourceTree = ""; }; - D44271AC1CC81B3200D84D28 /* maze_construction.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = maze_construction.c; sourceTree = ""; }; - D44271AD1CC81B3200D84D28 /* multiplayer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = multiplayer.c; sourceTree = ""; }; - D44271AE1CC81B3200D84D28 /* music_credits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = music_credits.c; sourceTree = ""; }; - D44271AF1CC81B3200D84D28 /* network_status.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = network_status.c; sourceTree = ""; }; - D44271B01CC81B3200D84D28 /* new_campaign.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = new_campaign.c; sourceTree = ""; }; - D44271B11CC81B3200D84D28 /* new_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = new_ride.c; sourceTree = ""; }; - D44271B21CC81B3200D84D28 /* news.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = news.c; sourceTree = ""; }; - D44271B31CC81B3200D84D28 /* news_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = news_options.c; sourceTree = ""; }; - D44271B41CC81B3200D84D28 /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = ""; }; - D44271B51CC81B3200D84D28 /* park.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = park.c; sourceTree = ""; }; - D44271B61CC81B3200D84D28 /* player.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = player.c; sourceTree = ""; }; - D44271B71CC81B3200D84D28 /* publisher_credits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = publisher_credits.c; sourceTree = ""; }; - D44271B81CC81B3200D84D28 /* research.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = research.c; sourceTree = ""; }; - D44271B91CC81B3200D84D28 /* ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride.c; sourceTree = ""; }; - D44271BA1CC81B3200D84D28 /* ride_construction.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride_construction.c; sourceTree = ""; }; - D44271BB1CC81B3200D84D28 /* ride_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ride_list.c; sourceTree = ""; }; - D44271BC1CC81B3200D84D28 /* save_prompt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = save_prompt.c; sourceTree = ""; }; - D44271BD1CC81B3200D84D28 /* scenery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; - D44271BF1CC81B3200D84D28 /* server_start.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = server_start.c; sourceTree = ""; }; - D44271C01CC81B3200D84D28 /* shortcut_key_change.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = shortcut_key_change.c; sourceTree = ""; }; - D44271C11CC81B3200D84D28 /* shortcut_keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = shortcut_keys.c; sourceTree = ""; }; - D44271C21CC81B3200D84D28 /* sign.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sign.c; sourceTree = ""; }; - D44271C31CC81B3200D84D28 /* staff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = staff.c; sourceTree = ""; }; - D44271C41CC81B3200D84D28 /* staff_fire_prompt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = staff_fire_prompt.c; sourceTree = ""; }; - D44271C51CC81B3200D84D28 /* staff_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = staff_list.c; sourceTree = ""; }; - D44271C61CC81B3200D84D28 /* text_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = text_input.c; sourceTree = ""; }; - D44271C71CC81B3200D84D28 /* themes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = themes.c; sourceTree = ""; }; - D44271C81CC81B3200D84D28 /* tile_inspector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tile_inspector.c; sourceTree = ""; }; - D44271C91CC81B3200D84D28 /* title_command_editor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_command_editor.c; sourceTree = ""; }; - D44271CA1CC81B3200D84D28 /* title_editor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_editor.c; sourceTree = ""; }; - D44271CB1CC81B3200D84D28 /* title_exit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_exit.c; sourceTree = ""; }; - D44271CC1CC81B3200D84D28 /* title_logo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_logo.c; sourceTree = ""; }; - D44271CD1CC81B3200D84D28 /* title_menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_menu.c; sourceTree = ""; }; - D44271CE1CC81B3200D84D28 /* title_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_options.c; sourceTree = ""; }; - D44271CF1CC81B3200D84D28 /* title_scenarioselect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = title_scenarioselect.c; sourceTree = ""; }; - D44271D01CC81B3200D84D28 /* tooltip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tooltip.c; sourceTree = ""; }; - D44271D11CC81B3200D84D28 /* tooltip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tooltip.h; sourceTree = ""; }; - D44271D21CC81B3200D84D28 /* top_toolbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = top_toolbar.c; sourceTree = ""; }; - D44271D31CC81B3200D84D28 /* track_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_list.c; sourceTree = ""; }; - D44271D41CC81B3200D84D28 /* track_manage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_manage.c; sourceTree = ""; }; - D44271D51CC81B3200D84D28 /* track_place.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = track_place.c; sourceTree = ""; }; - D44271D61CC81B3200D84D28 /* viewport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = viewport.c; sourceTree = ""; }; - D44271D71CC81B3200D84D28 /* water.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = water.c; sourceTree = ""; }; - D44271DB1CC81B3200D84D28 /* banner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = banner.h; sourceTree = ""; }; - D44271DF1CC81B3200D84D28 /* entrance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = entrance.h; sourceTree = ""; }; - D44271E01CC81B3200D84D28 /* footpath.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = footpath.c; sourceTree = ""; }; - D44271E11CC81B3200D84D28 /* footpath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = footpath.h; sourceTree = ""; }; - D44271E31CC81B3200D84D28 /* Fountain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fountain.h; sourceTree = ""; }; - D44271E41CC81B3200D84D28 /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = ""; }; - D44271E51CC81B3200D84D28 /* map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = map.h; sourceTree = ""; }; - D44271E61CC81B3200D84D28 /* map_animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map_animation.c; sourceTree = ""; }; - D44271E71CC81B3200D84D28 /* map_animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = map_animation.h; sourceTree = ""; }; - D44271E81CC81B3200D84D28 /* map_helpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map_helpers.c; sourceTree = ""; }; - D44271E91CC81B3200D84D28 /* map_helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = map_helpers.h; sourceTree = ""; }; - D44271EA1CC81B3200D84D28 /* mapgen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mapgen.c; sourceTree = ""; }; - D44271EB1CC81B3200D84D28 /* mapgen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mapgen.h; sourceTree = ""; }; - D44271EC1CC81B3200D84D28 /* money_effect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = money_effect.c; sourceTree = ""; }; - D44271ED1CC81B3200D84D28 /* park.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = park.c; sourceTree = ""; }; - D44271EE1CC81B3200D84D28 /* park.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = park.h; sourceTree = ""; }; - D44271EF1CC81B3200D84D28 /* particle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = particle.c; sourceTree = ""; }; - D44271F01CC81B3200D84D28 /* scenery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; - D44271F11CC81B3200D84D28 /* scenery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scenery.h; sourceTree = ""; }; - D44271F21CC81B3200D84D28 /* sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sprite.c; sourceTree = ""; }; - D44271F31CC81B3200D84D28 /* sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = ""; }; - D44271F41CC81B3200D84D28 /* water.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = water.h; sourceTree = ""; }; - D4469DAB1DEF84480039A779 /* Fonts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Fonts.cpp; sourceTree = ""; }; - D4469DAC1DEF84480039A779 /* Fonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fonts.h; sourceTree = ""; }; - D44D93AD1E92DD28004D6B77 /* Fountain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Fountain.cpp; sourceTree = ""; }; D45A38B31CF3006400659A24 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libcrypto.dylib; sourceTree = ""; }; D45A38B41CF3006400659A24 /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libfreetype.dylib; sourceTree = ""; }; D45A38B51CF3006400659A24 /* libjansson.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libjansson.dylib; sourceTree = ""; }; @@ -1162,79 +969,687 @@ D45A39561CF3007A00659A24 /* speex_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speex_resampler.h; sourceTree = ""; }; D45A39571CF3007A00659A24 /* speexdsp_config_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speexdsp_config_types.h; sourceTree = ""; }; D45A39581CF3007A00659A24 /* speexdsp_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speexdsp_types.h; sourceTree = ""; }; - D45B202C1D1E92DB00B67CC7 /* custom_currency.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = custom_currency.c; sourceTree = ""; }; - D460DFD01E01239D007BA2FE /* OpenRCT2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenRCT2.cpp; sourceTree = ""; }; - D460DFD21E0123B5007BA2FE /* OpenRCT2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenRCT2.h; sourceTree = ""; }; - D460DFD31E0123D1007BA2FE /* PlatformEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformEnvironment.cpp; sourceTree = ""; }; - D460DFD51E0123DB007BA2FE /* PlatformEnvironment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformEnvironment.h; sourceTree = ""; }; - D464B3DE1E4FBC850003F3B5 /* ServerList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServerList.cpp; sourceTree = ""; }; - D464B3DF1E4FBC850003F3B5 /* ServerList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerList.h; sourceTree = ""; }; - D464B3E11E4FBCC00003F3B5 /* audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio.cpp; sourceTree = ""; }; - D464FEBA1D31A65300CBABAC /* IStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IStream.cpp; sourceTree = ""; }; - D464FEBC1D31A66E00CBABAC /* MemoryStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStream.cpp; sourceTree = ""; }; - D464FEBD1D31A66E00CBABAC /* MemoryStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStream.h; sourceTree = ""; }; - D464FEBF1D31A68800CBABAC /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = ""; }; - D464FEC21D31A6AA00CBABAC /* BannerObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BannerObject.cpp; sourceTree = ""; }; - D464FEC31D31A6AA00CBABAC /* BannerObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerObject.h; sourceTree = ""; }; - D464FEC41D31A6AA00CBABAC /* EntranceObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntranceObject.cpp; sourceTree = ""; }; - D464FEC51D31A6AA00CBABAC /* EntranceObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntranceObject.h; sourceTree = ""; }; - D464FEC61D31A6AA00CBABAC /* FootpathItemObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootpathItemObject.cpp; sourceTree = ""; }; - D464FEC71D31A6AA00CBABAC /* FootpathItemObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootpathItemObject.h; sourceTree = ""; }; - D464FEC81D31A6AA00CBABAC /* FootpathObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FootpathObject.cpp; sourceTree = ""; }; - D464FEC91D31A6AA00CBABAC /* FootpathObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootpathObject.h; sourceTree = ""; }; - D464FECA1D31A6AA00CBABAC /* ImageTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageTable.cpp; sourceTree = ""; }; - D464FECB1D31A6AA00CBABAC /* ImageTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTable.h; sourceTree = ""; }; - D464FECC1D31A6AA00CBABAC /* LargeSceneryObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LargeSceneryObject.cpp; sourceTree = ""; }; - D464FECD1D31A6AA00CBABAC /* LargeSceneryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LargeSceneryObject.h; sourceTree = ""; }; - D464FECE1D31A6AA00CBABAC /* Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Object.cpp; sourceTree = ""; }; - D464FECF1D31A6AA00CBABAC /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Object.h; sourceTree = ""; }; - D464FED01D31A6AA00CBABAC /* ObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFactory.cpp; sourceTree = ""; }; - D464FED11D31A6AA00CBABAC /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFactory.h; sourceTree = ""; }; - D464FED21D31A6AA00CBABAC /* ObjectManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectManager.cpp; sourceTree = ""; }; - D464FED31D31A6AA00CBABAC /* ObjectManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectManager.h; sourceTree = ""; }; - D464FED41D31A6AA00CBABAC /* ObjectRepository.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectRepository.cpp; sourceTree = ""; }; - D464FED51D31A6AA00CBABAC /* ObjectRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectRepository.h; sourceTree = ""; }; - D464FED61D31A6AA00CBABAC /* RideObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RideObject.cpp; sourceTree = ""; }; - D464FED71D31A6AA00CBABAC /* RideObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RideObject.h; sourceTree = ""; }; - D464FED81D31A6AA00CBABAC /* SceneryGroupObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneryGroupObject.cpp; sourceTree = ""; }; - D464FED91D31A6AA00CBABAC /* SceneryGroupObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneryGroupObject.h; sourceTree = ""; }; - D464FEDA1D31A6AA00CBABAC /* SceneryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneryObject.h; sourceTree = ""; }; - D464FEDB1D31A6AA00CBABAC /* SmallSceneryObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmallSceneryObject.cpp; sourceTree = ""; }; - D464FEDC1D31A6AA00CBABAC /* SmallSceneryObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallSceneryObject.h; sourceTree = ""; }; - D464FEDD1D31A6AA00CBABAC /* StexObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StexObject.cpp; sourceTree = ""; }; - D464FEDE1D31A6AA00CBABAC /* StexObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StexObject.h; sourceTree = ""; }; - D464FEDF1D31A6AA00CBABAC /* StringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringTable.cpp; sourceTree = ""; }; - D464FEE01D31A6AA00CBABAC /* StringTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringTable.h; sourceTree = ""; }; - D464FEE11D31A6AA00CBABAC /* WallObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WallObject.cpp; sourceTree = ""; }; - D464FEE21D31A6AA00CBABAC /* WallObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WallObject.h; sourceTree = ""; }; - D464FEE31D31A6AA00CBABAC /* WaterObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WaterObject.cpp; sourceTree = ""; }; - D464FEE41D31A6AA00CBABAC /* WaterObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaterObject.h; sourceTree = ""; }; - D46F2A9D1D39A25A00A36AB7 /* peep_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = peep_data.c; sourceTree = ""; }; D47304D41C4FF8250015C0EA /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; D4895D321C23EFDD000CD788 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = distribution/macos/Info.plist; sourceTree = SOURCE_ROOT; }; - D48A8D811D00272F00649DA7 /* TcpSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TcpSocket.cpp; sourceTree = ""; usesTabs = 0; }; - D48A8D821D00272F00649DA7 /* TcpSocket.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = TcpSocket.h; sourceTree = ""; usesTabs = 0; }; - D48ABAB91E71EBD500A3E39C /* entrance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = entrance.cpp; sourceTree = ""; }; - D49464771E4DB27B00DC690E /* sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sprite.cpp; sourceTree = ""; }; - D49766811D03B9FE002222CD /* SoftwareDrawingEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SoftwareDrawingEngine.cpp; sourceTree = ""; }; - D49766841D03BAA5002222CD /* NewDrawing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewDrawing.cpp; sourceTree = ""; usesTabs = 0; }; - D49766851D03BAA5002222CD /* NewDrawing.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = NewDrawing.h; sourceTree = ""; usesTabs = 0; }; - D49766871D03BABB002222CD /* rain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rain.cpp; sourceTree = ""; }; - D49766881D03BABB002222CD /* Rain.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Rain.h; sourceTree = ""; }; - D497668A1D03BAC8002222CD /* IDrawingContext.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = IDrawingContext.h; sourceTree = ""; usesTabs = 0; }; - D497668B1D03BAC8002222CD /* IDrawingEngine.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = IDrawingEngine.h; sourceTree = ""; usesTabs = 0; }; D497D0781C20FD52002BF46A /* OpenRCT2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRCT2.app; sourceTree = BUILT_PRODUCTS_DIR; }; D4A8B4B31DB41873007A2F29 /* libpng16.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng16.dylib; sourceTree = ""; }; - D4B21B6D1E343AF1004982C7 /* lightfx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lightfx.c; sourceTree = ""; }; - D4B21B6E1E343AF1004982C7 /* lightfx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lightfx.h; sourceTree = ""; }; D4EC48E31C2637710024B507 /* g2.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = g2.dat; path = data/g2.dat; sourceTree = SOURCE_ROOT; }; D4EC48E41C2637710024B507 /* language */ = {isa = PBXFileReference; lastKnownFileType = folder; name = language; path = data/language; sourceTree = SOURCE_ROOT; }; D4EC48E51C2637710024B507 /* title */ = {isa = PBXFileReference; lastKnownFileType = folder; name = title; path = data/title; sourceTree = SOURCE_ROOT; }; - D4F5B5EC1DAD8A4300AB6075 /* CursorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CursorData.cpp; sourceTree = ""; }; - D4F5B5ED1DAD8A4300AB6075 /* Cursors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cursors.cpp; sourceTree = ""; }; - D4F5B5EE1DAD8A4300AB6075 /* Cursors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cursors.h; sourceTree = ""; }; - DEEAE6E8AC49B6F288E69B40 /* banner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = banner.cpp; sourceTree = ""; }; - EC3C3FED9FA55B65F65D706F /* Climate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Climate.h; sourceTree = ""; }; + F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenrct2.a; sourceTree = BUILT_PRODUCTS_DIR; }; + F76C80A01EC4DD9400FA49E2 /* shaders */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shaders; path = data/shaders; sourceTree = ""; }; + F76C82A11EC4E50D00FA49E2 /* resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = resource.h; path = resources/resource.h; sourceTree = ""; }; + F76C83571EC4E7CC00FA49E2 /* audio.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = audio.cpp; sourceTree = ""; }; + F76C83581EC4E7CC00FA49E2 /* audio.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; }; + F76C83591EC4E7CC00FA49E2 /* AudioChannel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioChannel.h; sourceTree = ""; }; + F76C835A1EC4E7CC00FA49E2 /* AudioContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioContext.h; sourceTree = ""; }; + F76C835B1EC4E7CC00FA49E2 /* AudioMixer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AudioMixer.cpp; sourceTree = ""; }; + F76C835C1EC4E7CC00FA49E2 /* AudioMixer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioMixer.h; sourceTree = ""; }; + F76C835D1EC4E7CC00FA49E2 /* AudioSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioSource.h; sourceTree = ""; }; + F76C835E1EC4E7CC00FA49E2 /* NullAudioSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NullAudioSource.cpp; sourceTree = ""; }; + F76C835F1EC4E7CC00FA49E2 /* cheats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cheats.c; sourceTree = ""; }; + F76C83601EC4E7CC00FA49E2 /* cheats.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cheats.h; sourceTree = ""; }; + F76C83631EC4E7CC00FA49E2 /* CommandLine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLine.cpp; sourceTree = ""; }; + F76C83641EC4E7CC00FA49E2 /* CommandLine.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CommandLine.hpp; sourceTree = ""; }; + F76C83651EC4E7CC00FA49E2 /* ConvertCommand.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertCommand.cpp; sourceTree = ""; }; + F76C83661EC4E7CC00FA49E2 /* RootCommands.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RootCommands.cpp; sourceTree = ""; }; + F76C83671EC4E7CC00FA49E2 /* ScreenshotCommands.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScreenshotCommands.cpp; sourceTree = ""; }; + F76C83681EC4E7CC00FA49E2 /* SpriteCommands.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteCommands.cpp; sourceTree = ""; }; + F76C83691EC4E7CC00FA49E2 /* UriHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UriHandler.cpp; sourceTree = ""; }; + F76C836A1EC4E7CC00FA49E2 /* cmdline_sprite.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cmdline_sprite.c; sourceTree = ""; }; + F76C836B1EC4E7CC00FA49E2 /* cmdline_sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cmdline_sprite.h; sourceTree = ""; }; + F76C836C1EC4E7CC00FA49E2 /* common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; }; + F76C836E1EC4E7CC00FA49E2 /* Config.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Config.cpp; sourceTree = ""; }; + F76C836F1EC4E7CC00FA49E2 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = ""; }; + F76C83701EC4E7CC00FA49E2 /* ConfigEnum.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = ConfigEnum.hpp; sourceTree = ""; }; + F76C83711EC4E7CC00FA49E2 /* IniReader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IniReader.cpp; sourceTree = ""; }; + F76C83721EC4E7CC00FA49E2 /* IniReader.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = IniReader.hpp; sourceTree = ""; }; + F76C83731EC4E7CC00FA49E2 /* IniWriter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IniWriter.cpp; sourceTree = ""; }; + F76C83741EC4E7CC00FA49E2 /* IniWriter.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = IniWriter.hpp; sourceTree = ""; }; + F76C83751EC4E7CC00FA49E2 /* KeyboardShortcuts.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = KeyboardShortcuts.cpp; sourceTree = ""; }; + F76C83761EC4E7CC00FA49E2 /* Context.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Context.cpp; sourceTree = ""; }; + F76C83771EC4E7CC00FA49E2 /* Context.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Context.h; sourceTree = ""; }; + F76C83791EC4E7CC00FA49E2 /* Collections.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Collections.hpp; sourceTree = ""; }; + F76C837A1EC4E7CC00FA49E2 /* Console.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Console.cpp; sourceTree = ""; }; + F76C837B1EC4E7CC00FA49E2 /* Console.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Console.hpp; sourceTree = ""; }; + F76C837C1EC4E7CC00FA49E2 /* Diagnostics.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Diagnostics.cpp; sourceTree = ""; }; + F76C837D1EC4E7CC00FA49E2 /* Diagnostics.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Diagnostics.hpp; sourceTree = ""; }; + F76C837E1EC4E7CC00FA49E2 /* Exception.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Exception.hpp; sourceTree = ""; }; + F76C837F1EC4E7CC00FA49E2 /* File.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = ""; }; + F76C83801EC4E7CC00FA49E2 /* File.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = ""; }; + F76C83811EC4E7CC00FA49E2 /* FileScanner.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FileScanner.cpp; sourceTree = ""; }; + F76C83821EC4E7CC00FA49E2 /* FileScanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileScanner.h; sourceTree = ""; }; + F76C83831EC4E7CC00FA49E2 /* FileStream.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = FileStream.hpp; sourceTree = ""; }; + F76C83841EC4E7CC00FA49E2 /* Guard.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Guard.cpp; sourceTree = ""; }; + F76C83851EC4E7CC00FA49E2 /* Guard.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Guard.hpp; sourceTree = ""; }; + F76C83861EC4E7CC00FA49E2 /* IStream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IStream.cpp; sourceTree = ""; }; + F76C83871EC4E7CC00FA49E2 /* IStream.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = IStream.hpp; sourceTree = ""; }; + F76C83881EC4E7CC00FA49E2 /* Json.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Json.cpp; sourceTree = ""; }; + F76C83891EC4E7CC00FA49E2 /* Json.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Json.hpp; sourceTree = ""; }; + F76C838A1EC4E7CC00FA49E2 /* Math.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Math.hpp; sourceTree = ""; }; + F76C838B1EC4E7CC00FA49E2 /* Memory.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Memory.hpp; sourceTree = ""; }; + F76C838C1EC4E7CC00FA49E2 /* MemoryStream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStream.cpp; sourceTree = ""; }; + F76C838D1EC4E7CC00FA49E2 /* MemoryStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryStream.h; sourceTree = ""; }; + F76C838E1EC4E7CC00FA49E2 /* Nullable.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Nullable.hpp; sourceTree = ""; }; + F76C838F1EC4E7CC00FA49E2 /* Path.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; }; + F76C83901EC4E7CC00FA49E2 /* Path.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Path.hpp; sourceTree = ""; }; + F76C83911EC4E7CC00FA49E2 /* Registration.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Registration.hpp; sourceTree = ""; }; + F76C83921EC4E7CC00FA49E2 /* String.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = String.cpp; sourceTree = ""; }; + F76C83931EC4E7CC00FA49E2 /* String.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = String.hpp; sourceTree = ""; }; + F76C83941EC4E7CC00FA49E2 /* StringBuilder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = StringBuilder.hpp; sourceTree = ""; }; + F76C83951EC4E7CC00FA49E2 /* StringReader.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = StringReader.hpp; sourceTree = ""; }; + F76C83961EC4E7CC00FA49E2 /* textinputbuffer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = textinputbuffer.c; sourceTree = ""; }; + F76C83971EC4E7CC00FA49E2 /* textinputbuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = textinputbuffer.h; sourceTree = ""; }; + F76C83981EC4E7CC00FA49E2 /* Util.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Util.hpp; sourceTree = ""; }; + F76C83991EC4E7CC00FA49E2 /* Zip.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Zip.cpp; sourceTree = ""; }; + F76C839A1EC4E7CC00FA49E2 /* Zip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Zip.h; sourceTree = ""; }; + F76C839B1EC4E7CC00FA49E2 /* diagnostic.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = diagnostic.c; sourceTree = ""; }; + F76C839C1EC4E7CC00FA49E2 /* diagnostic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = diagnostic.h; sourceTree = ""; }; + F76C839E1EC4E7CC00FA49E2 /* drawing.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = drawing.c; sourceTree = ""; }; + F76C839F1EC4E7CC00FA49E2 /* drawing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = drawing.h; sourceTree = ""; }; + F76C83A01EC4E7CC00FA49E2 /* drawing_fast.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = drawing_fast.cpp; sourceTree = ""; }; + F76C83A11EC4E7CC00FA49E2 /* font.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = font.c; sourceTree = ""; }; + F76C83A21EC4E7CC00FA49E2 /* font.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = font.h; sourceTree = ""; }; + F76C83A31EC4E7CC00FA49E2 /* IDrawingContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDrawingContext.h; sourceTree = ""; }; + F76C83A41EC4E7CC00FA49E2 /* IDrawingEngine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IDrawingEngine.h; sourceTree = ""; }; + F76C83A51EC4E7CC00FA49E2 /* Image.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = ""; }; + F76C83A61EC4E7CC00FA49E2 /* lightfx.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lightfx.c; sourceTree = ""; }; + F76C83A71EC4E7CC00FA49E2 /* lightfx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lightfx.h; sourceTree = ""; }; + F76C83A81EC4E7CC00FA49E2 /* line.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = line.c; sourceTree = ""; }; + F76C83A91EC4E7CC00FA49E2 /* NewDrawing.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NewDrawing.cpp; sourceTree = ""; }; + F76C83AA1EC4E7CC00FA49E2 /* NewDrawing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewDrawing.h; sourceTree = ""; }; + F76C83AB1EC4E7CC00FA49E2 /* Rain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Rain.cpp; sourceTree = ""; }; + F76C83AC1EC4E7CC00FA49E2 /* Rain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Rain.h; sourceTree = ""; }; + F76C83AD1EC4E7CC00FA49E2 /* rect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; }; + F76C83AE1EC4E7CC00FA49E2 /* scrolling_text.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scrolling_text.c; sourceTree = ""; }; + F76C83AF1EC4E7CC00FA49E2 /* sprite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = sprite.cpp; sourceTree = ""; }; + F76C83B01EC4E7CC00FA49E2 /* string.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = string.c; sourceTree = ""; }; + F76C83B11EC4E7CC00FA49E2 /* editor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor.c; sourceTree = ""; }; + F76C83B21EC4E7CC00FA49E2 /* editor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = editor.h; sourceTree = ""; }; + F76C83B31EC4E7CC00FA49E2 /* FileClassifier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FileClassifier.cpp; sourceTree = ""; }; + F76C83B41EC4E7CC00FA49E2 /* FileClassifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileClassifier.h; sourceTree = ""; }; + F76C83B51EC4E7CC00FA49E2 /* game.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = game.c; sourceTree = ""; }; + F76C83B61EC4E7CC00FA49E2 /* game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = game.h; sourceTree = ""; }; + F76C83B71EC4E7CC00FA49E2 /* Imaging.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Imaging.cpp; sourceTree = ""; }; + F76C83B81EC4E7CC00FA49E2 /* Imaging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Imaging.h; sourceTree = ""; }; + F76C83B91EC4E7CC00FA49E2 /* input.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = input.c; sourceTree = ""; }; + F76C83BA1EC4E7CC00FA49E2 /* input.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = input.h; sourceTree = ""; }; + F76C83BC1EC4E7CC00FA49E2 /* chat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = chat.c; sourceTree = ""; }; + F76C83BD1EC4E7CC00FA49E2 /* chat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chat.h; sourceTree = ""; }; + F76C83BE1EC4E7CC00FA49E2 /* colour.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = colour.c; sourceTree = ""; }; + F76C83BF1EC4E7CC00FA49E2 /* colour.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = colour.h; sourceTree = ""; }; + F76C83C01EC4E7CC00FA49E2 /* console.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = console.c; sourceTree = ""; }; + F76C83C11EC4E7CC00FA49E2 /* console.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = console.h; sourceTree = ""; }; + F76C83C21EC4E7CC00FA49E2 /* Cursors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cursors.h; sourceTree = ""; }; + F76C83C31EC4E7CC00FA49E2 /* Fonts.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Fonts.cpp; sourceTree = ""; }; + F76C83C41EC4E7CC00FA49E2 /* Fonts.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fonts.h; sourceTree = ""; }; + F76C83C51EC4E7CC00FA49E2 /* graph.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = graph.c; sourceTree = ""; }; + F76C83C61EC4E7CC00FA49E2 /* graph.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = graph.h; sourceTree = ""; }; + F76C83C71EC4E7CC00FA49E2 /* keyboard_shortcut.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = keyboard_shortcut.c; sourceTree = ""; }; + F76C83C81EC4E7CC00FA49E2 /* keyboard_shortcut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = keyboard_shortcut.h; sourceTree = ""; }; + F76C83C91EC4E7CC00FA49E2 /* screenshot.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = screenshot.c; sourceTree = ""; }; + F76C83CA1EC4E7CC00FA49E2 /* screenshot.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = screenshot.h; sourceTree = ""; }; + F76C83CB1EC4E7CC00FA49E2 /* Theme.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Theme.cpp; sourceTree = ""; }; + F76C83CC1EC4E7CC00FA49E2 /* themes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = themes.h; sourceTree = ""; }; + F76C83CD1EC4E7CC00FA49E2 /* viewport.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = viewport.c; sourceTree = ""; }; + F76C83CE1EC4E7CC00FA49E2 /* viewport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = viewport.h; sourceTree = ""; }; + F76C83CF1EC4E7CC00FA49E2 /* viewport_interaction.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = viewport_interaction.c; sourceTree = ""; }; + F76C83D01EC4E7CC00FA49E2 /* widget.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = widget.c; sourceTree = ""; }; + F76C83D11EC4E7CC00FA49E2 /* widget.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = widget.h; sourceTree = ""; }; + F76C83D21EC4E7CC00FA49E2 /* window.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = window.c; sourceTree = ""; }; + F76C83D31EC4E7CC00FA49E2 /* window.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = window.h; sourceTree = ""; }; + F76C83D41EC4E7CC00FA49E2 /* intro.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = intro.c; sourceTree = ""; }; + F76C83D51EC4E7CC00FA49E2 /* intro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = intro.h; sourceTree = ""; }; + F76C83D81EC4E7CC00FA49E2 /* convert.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = convert.c; sourceTree = ""; }; + F76C83D91EC4E7CC00FA49E2 /* currency.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = currency.c; sourceTree = ""; }; + F76C83DA1EC4E7CC00FA49E2 /* currency.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = currency.h; sourceTree = ""; }; + F76C83DB1EC4E7CC00FA49E2 /* date.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = date.c; sourceTree = ""; }; + F76C83DC1EC4E7CC00FA49E2 /* date.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = date.h; sourceTree = ""; }; + F76C83DD1EC4E7CC00FA49E2 /* format_codes.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = format_codes.c; sourceTree = ""; }; + F76C83DE1EC4E7CC00FA49E2 /* format_codes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = format_codes.h; sourceTree = ""; }; + F76C83DF1EC4E7CC00FA49E2 /* language.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = language.cpp; sourceTree = ""; }; + F76C83E01EC4E7CC00FA49E2 /* language.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = language.h; sourceTree = ""; }; + F76C83E11EC4E7CC00FA49E2 /* LanguagePack.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LanguagePack.cpp; sourceTree = ""; }; + F76C83E21EC4E7CC00FA49E2 /* LanguagePack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LanguagePack.h; sourceTree = ""; }; + F76C83E31EC4E7CC00FA49E2 /* localisation.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = localisation.c; sourceTree = ""; }; + F76C83E41EC4E7CC00FA49E2 /* localisation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = localisation.h; sourceTree = ""; }; + F76C83E51EC4E7CC00FA49E2 /* real_names.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = real_names.c; sourceTree = ""; }; + F76C83E61EC4E7CC00FA49E2 /* string_ids.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = string_ids.h; sourceTree = ""; }; + F76C83E71EC4E7CC00FA49E2 /* user.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = user.c; sourceTree = ""; }; + F76C83E81EC4E7CC00FA49E2 /* user.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = user.h; sourceTree = ""; }; + F76C83E91EC4E7CC00FA49E2 /* utf8.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = utf8.c; sourceTree = ""; }; + F76C83EB1EC4E7CC00FA49E2 /* award.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = award.c; sourceTree = ""; }; + F76C83EC1EC4E7CC00FA49E2 /* award.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = award.h; sourceTree = ""; }; + F76C83ED1EC4E7CC00FA49E2 /* finance.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = finance.c; sourceTree = ""; }; + F76C83EE1EC4E7CC00FA49E2 /* finance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = finance.h; sourceTree = ""; }; + F76C83EF1EC4E7CC00FA49E2 /* marketing.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = marketing.c; sourceTree = ""; }; + F76C83F01EC4E7CC00FA49E2 /* marketing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = marketing.h; sourceTree = ""; }; + F76C83F11EC4E7CC00FA49E2 /* news_item.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = news_item.c; sourceTree = ""; }; + F76C83F21EC4E7CC00FA49E2 /* news_item.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = news_item.h; sourceTree = ""; }; + F76C83F31EC4E7CC00FA49E2 /* research.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = research.c; sourceTree = ""; }; + F76C83F41EC4E7CC00FA49E2 /* research.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = research.h; sourceTree = ""; }; + F76C83F61EC4E7CC00FA49E2 /* http.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = http.cpp; sourceTree = ""; }; + F76C83F71EC4E7CC00FA49E2 /* http.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = http.h; sourceTree = ""; }; + F76C83F81EC4E7CC00FA49E2 /* network.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = network.cpp; sourceTree = ""; }; + F76C83F91EC4E7CC00FA49E2 /* network.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = network.h; sourceTree = ""; }; + F76C83FA1EC4E7CC00FA49E2 /* NetworkAction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkAction.cpp; sourceTree = ""; }; + F76C83FB1EC4E7CC00FA49E2 /* NetworkAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkAction.h; sourceTree = ""; }; + F76C83FC1EC4E7CC00FA49E2 /* NetworkConnection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkConnection.cpp; sourceTree = ""; }; + F76C83FD1EC4E7CC00FA49E2 /* NetworkConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkConnection.h; sourceTree = ""; }; + F76C83FE1EC4E7CC00FA49E2 /* NetworkGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkGroup.cpp; sourceTree = ""; }; + F76C83FF1EC4E7CC00FA49E2 /* NetworkGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkGroup.h; sourceTree = ""; }; + F76C84001EC4E7CC00FA49E2 /* NetworkKey.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkKey.cpp; sourceTree = ""; }; + F76C84011EC4E7CC00FA49E2 /* NetworkKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkKey.h; sourceTree = ""; }; + F76C84021EC4E7CC00FA49E2 /* NetworkPacket.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkPacket.cpp; sourceTree = ""; }; + F76C84031EC4E7CC00FA49E2 /* NetworkPacket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkPacket.h; sourceTree = ""; }; + F76C84041EC4E7CC00FA49E2 /* NetworkPlayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkPlayer.cpp; sourceTree = ""; }; + F76C84051EC4E7CC00FA49E2 /* NetworkPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkPlayer.h; sourceTree = ""; }; + F76C84061EC4E7CC00FA49E2 /* NetworkServerAdvertiser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkServerAdvertiser.cpp; sourceTree = ""; }; + F76C84071EC4E7CC00FA49E2 /* NetworkServerAdvertiser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkServerAdvertiser.h; sourceTree = ""; }; + F76C84081EC4E7CC00FA49E2 /* NetworkTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkTypes.h; sourceTree = ""; }; + F76C84091EC4E7CC00FA49E2 /* NetworkUser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkUser.cpp; sourceTree = ""; }; + F76C840A1EC4E7CC00FA49E2 /* NetworkUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkUser.h; sourceTree = ""; }; + F76C840B1EC4E7CC00FA49E2 /* ServerList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServerList.cpp; sourceTree = ""; }; + F76C840C1EC4E7CC00FA49E2 /* ServerList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServerList.h; sourceTree = ""; }; + F76C840D1EC4E7CC00FA49E2 /* TcpSocket.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TcpSocket.cpp; sourceTree = ""; }; + F76C840E1EC4E7CC00FA49E2 /* TcpSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TcpSocket.h; sourceTree = ""; }; + F76C840F1EC4E7CC00FA49E2 /* twitch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = twitch.cpp; sourceTree = ""; }; + F76C84101EC4E7CC00FA49E2 /* twitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = twitch.h; sourceTree = ""; }; + F76C84121EC4E7CC00FA49E2 /* BannerObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BannerObject.cpp; sourceTree = ""; }; + F76C84131EC4E7CC00FA49E2 /* BannerObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BannerObject.h; sourceTree = ""; }; + F76C84141EC4E7CC00FA49E2 /* EntranceObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = EntranceObject.cpp; sourceTree = ""; }; + F76C84151EC4E7CC00FA49E2 /* EntranceObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EntranceObject.h; sourceTree = ""; }; + F76C84161EC4E7CC00FA49E2 /* FootpathItemObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FootpathItemObject.cpp; sourceTree = ""; }; + F76C84171EC4E7CC00FA49E2 /* FootpathItemObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FootpathItemObject.h; sourceTree = ""; }; + F76C84181EC4E7CC00FA49E2 /* FootpathObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FootpathObject.cpp; sourceTree = ""; }; + F76C84191EC4E7CC00FA49E2 /* FootpathObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FootpathObject.h; sourceTree = ""; }; + F76C841A1EC4E7CC00FA49E2 /* ImageTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ImageTable.cpp; sourceTree = ""; }; + F76C841B1EC4E7CC00FA49E2 /* ImageTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageTable.h; sourceTree = ""; }; + F76C841C1EC4E7CC00FA49E2 /* LargeSceneryObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LargeSceneryObject.cpp; sourceTree = ""; }; + F76C841D1EC4E7CC00FA49E2 /* LargeSceneryObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LargeSceneryObject.h; sourceTree = ""; }; + F76C841E1EC4E7CC00FA49E2 /* Object.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Object.cpp; sourceTree = ""; }; + F76C841F1EC4E7CC00FA49E2 /* Object.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Object.h; sourceTree = ""; }; + F76C84201EC4E7CC00FA49E2 /* ObjectFactory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFactory.cpp; sourceTree = ""; }; + F76C84211EC4E7CC00FA49E2 /* ObjectFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectFactory.h; sourceTree = ""; }; + F76C84221EC4E7CC00FA49E2 /* ObjectManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectManager.cpp; sourceTree = ""; }; + F76C84231EC4E7CC00FA49E2 /* ObjectManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectManager.h; sourceTree = ""; }; + F76C84241EC4E7CC00FA49E2 /* ObjectRepository.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectRepository.cpp; sourceTree = ""; }; + F76C84251EC4E7CC00FA49E2 /* ObjectRepository.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectRepository.h; sourceTree = ""; }; + F76C84261EC4E7CC00FA49E2 /* RideObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RideObject.cpp; sourceTree = ""; }; + F76C84271EC4E7CC00FA49E2 /* RideObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RideObject.h; sourceTree = ""; }; + F76C84281EC4E7CC00FA49E2 /* SceneryGroupObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SceneryGroupObject.cpp; sourceTree = ""; }; + F76C84291EC4E7CC00FA49E2 /* SceneryGroupObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneryGroupObject.h; sourceTree = ""; }; + F76C842A1EC4E7CC00FA49E2 /* SceneryObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneryObject.h; sourceTree = ""; }; + F76C842B1EC4E7CC00FA49E2 /* SmallSceneryObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SmallSceneryObject.cpp; sourceTree = ""; }; + F76C842C1EC4E7CC00FA49E2 /* SmallSceneryObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SmallSceneryObject.h; sourceTree = ""; }; + F76C842D1EC4E7CC00FA49E2 /* StexObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = StexObject.cpp; sourceTree = ""; }; + F76C842E1EC4E7CC00FA49E2 /* StexObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StexObject.h; sourceTree = ""; }; + F76C842F1EC4E7CC00FA49E2 /* StringTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = StringTable.cpp; sourceTree = ""; }; + F76C84301EC4E7CC00FA49E2 /* StringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringTable.h; sourceTree = ""; }; + F76C84311EC4E7CC00FA49E2 /* WallObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WallObject.cpp; sourceTree = ""; }; + F76C84321EC4E7CC00FA49E2 /* WallObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WallObject.h; sourceTree = ""; }; + F76C84331EC4E7CC00FA49E2 /* WaterObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WaterObject.cpp; sourceTree = ""; }; + F76C84341EC4E7CC00FA49E2 /* WaterObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WaterObject.h; sourceTree = ""; }; + F76C84351EC4E7CC00FA49E2 /* object.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = ""; }; + F76C84361EC4E7CC00FA49E2 /* object_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = object_list.c; sourceTree = ""; }; + F76C84371EC4E7CC00FA49E2 /* object_list.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = object_list.h; sourceTree = ""; }; + F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenRCT2.cpp; sourceTree = ""; }; + F76C84391EC4E7CC00FA49E2 /* OpenRCT2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenRCT2.h; sourceTree = ""; }; + F76C843C1EC4E7CC00FA49E2 /* banner.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = banner.c; sourceTree = ""; }; + F76C843D1EC4E7CC00FA49E2 /* entrance.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = entrance.c; sourceTree = ""; }; + F76C843E1EC4E7CC00FA49E2 /* fence.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = fence.c; sourceTree = ""; }; + F76C843F1EC4E7CC00FA49E2 /* map_element.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_element.c; sourceTree = ""; }; + F76C84401EC4E7CC00FA49E2 /* map_element.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map_element.h; sourceTree = ""; }; + F76C84411EC4E7CC00FA49E2 /* path.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = path.c; sourceTree = ""; }; + F76C84421EC4E7CC00FA49E2 /* scenery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; + F76C84431EC4E7CC00FA49E2 /* scenery_multiple.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scenery_multiple.c; sourceTree = ""; }; + F76C84441EC4E7CC00FA49E2 /* surface.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; }; + F76C84451EC4E7CC00FA49E2 /* surface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; }; + F76C84461EC4E7CC00FA49E2 /* paint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = paint.c; sourceTree = ""; }; + F76C84471EC4E7CC00FA49E2 /* paint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = paint.h; sourceTree = ""; }; + F76C84481EC4E7CC00FA49E2 /* paint_helpers.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = paint_helpers.c; sourceTree = ""; }; + F76C844A1EC4E7CC00FA49E2 /* litter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = litter.c; sourceTree = ""; }; + F76C844B1EC4E7CC00FA49E2 /* misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = ""; }; + F76C844C1EC4E7CC00FA49E2 /* peep.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = peep.c; sourceTree = ""; }; + F76C844D1EC4E7CC00FA49E2 /* sprite.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sprite.c; sourceTree = ""; }; + F76C844E1EC4E7CC00FA49E2 /* sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = ""; }; + F76C844F1EC4E7CC00FA49E2 /* supports.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = supports.c; sourceTree = ""; }; + F76C84501EC4E7CC00FA49E2 /* supports.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = supports.h; sourceTree = ""; }; + F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ParkImporter.cpp; sourceTree = ""; }; + F76C84521EC4E7CC00FA49E2 /* ParkImporter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ParkImporter.h; sourceTree = ""; }; + F76C84541EC4E7CC00FA49E2 /* peep.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = peep.c; sourceTree = ""; }; + F76C84551EC4E7CC00FA49E2 /* peep.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = peep.h; sourceTree = ""; }; + F76C84561EC4E7CC00FA49E2 /* peep_data.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = peep_data.c; sourceTree = ""; }; + F76C84571EC4E7CC00FA49E2 /* staff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = staff.c; sourceTree = ""; }; + F76C84581EC4E7CC00FA49E2 /* staff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = staff.h; sourceTree = ""; }; + F76C845A1EC4E7CC00FA49E2 /* crash.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = crash.cpp; sourceTree = ""; }; + F76C845B1EC4E7CC00FA49E2 /* crash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = crash.h; sourceTree = ""; }; + F76C845C1EC4E7CC00FA49E2 /* linux.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = linux.c; sourceTree = ""; }; + F76C845D1EC4E7CC00FA49E2 /* macos.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = macos.m; sourceTree = ""; }; + F76C845E1EC4E7CC00FA49E2 /* platform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; }; + F76C845F1EC4E7CC00FA49E2 /* Platform2.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Platform2.cpp; sourceTree = ""; }; + F76C84601EC4E7CC00FA49E2 /* Platform2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Platform2.h; sourceTree = ""; }; + F76C84611EC4E7CC00FA49E2 /* posix.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = posix.c; sourceTree = ""; }; + F76C84621EC4E7CC00FA49E2 /* shared.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = shared.c; sourceTree = ""; }; + F76C84631EC4E7CC00FA49E2 /* windows.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = windows.c; sourceTree = ""; }; + F76C84641EC4E7CC00FA49E2 /* PlatformEnvironment.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformEnvironment.cpp; sourceTree = ""; }; + F76C84651EC4E7CC00FA49E2 /* PlatformEnvironment.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformEnvironment.h; sourceTree = ""; }; + F76C84671EC4E7CC00FA49E2 /* S4Importer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = S4Importer.cpp; sourceTree = ""; }; + F76C84681EC4E7CC00FA49E2 /* tables.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = tables.cpp; sourceTree = ""; }; + F76C84691EC4E7CC00FA49E2 /* Tables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tables.h; sourceTree = ""; }; + F76C846A1EC4E7CC00FA49E2 /* rct1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = rct1.c; sourceTree = ""; }; + F76C846B1EC4E7CC00FA49E2 /* rct1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = rct1.h; sourceTree = ""; }; + F76C846D1EC4E7CC00FA49E2 /* SawyerChunk.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SawyerChunk.cpp; sourceTree = ""; }; + F76C846E1EC4E7CC00FA49E2 /* SawyerChunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SawyerChunk.h; sourceTree = ""; }; + F76C846F1EC4E7CC00FA49E2 /* SawyerChunkReader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SawyerChunkReader.cpp; sourceTree = ""; }; + F76C84701EC4E7CC00FA49E2 /* SawyerChunkReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SawyerChunkReader.h; sourceTree = ""; }; + F76C84711EC4E7CC00FA49E2 /* SawyerChunkWriter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SawyerChunkWriter.cpp; sourceTree = ""; }; + F76C84721EC4E7CC00FA49E2 /* SawyerChunkWriter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SawyerChunkWriter.h; sourceTree = ""; }; + F76C84731EC4E7CC00FA49E2 /* SawyerEncoding.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SawyerEncoding.cpp; sourceTree = ""; }; + F76C84741EC4E7CC00FA49E2 /* SawyerEncoding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SawyerEncoding.h; sourceTree = ""; }; + F76C84751EC4E7CC00FA49E2 /* rct12.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = rct12.h; sourceTree = ""; }; + F76C84771EC4E7CC00FA49E2 /* addresses.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = addresses.c; sourceTree = ""; }; + F76C84781EC4E7CC00FA49E2 /* addresses.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = addresses.h; sourceTree = ""; }; + F76C84791EC4E7CC00FA49E2 /* hook.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = hook.c; sourceTree = ""; }; + F76C847A1EC4E7CC00FA49E2 /* hook.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hook.h; sourceTree = ""; }; + F76C847B1EC4E7CC00FA49E2 /* interop.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = interop.c; sourceTree = ""; }; + F76C847C1EC4E7CC00FA49E2 /* interop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = interop.h; sourceTree = ""; }; + F76C847D1EC4E7CC00FA49E2 /* S6Exporter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = S6Exporter.cpp; sourceTree = ""; }; + F76C847E1EC4E7CC00FA49E2 /* S6Exporter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = S6Exporter.h; sourceTree = ""; }; + F76C847F1EC4E7CC00FA49E2 /* S6Importer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = S6Importer.cpp; sourceTree = ""; }; + F76C84801EC4E7CC00FA49E2 /* rct2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = rct2.c; sourceTree = ""; }; + F76C84811EC4E7CC00FA49E2 /* rct2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = rct2.h; sourceTree = ""; }; + F76C84841EC4E7CC00FA49E2 /* cable_lift.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cable_lift.c; sourceTree = ""; }; + F76C84851EC4E7CC00FA49E2 /* cable_lift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cable_lift.h; sourceTree = ""; }; + F76C84871EC4E7CC00FA49E2 /* air_powered_vertical_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = air_powered_vertical_coaster.c; sourceTree = ""; }; + F76C84881EC4E7CC00FA49E2 /* bobsleigh_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = bobsleigh_coaster.c; sourceTree = ""; }; + F76C84891EC4E7CC00FA49E2 /* bolliger_mabillard_track.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = bolliger_mabillard_track.c; sourceTree = ""; }; + F76C848A1EC4E7CC00FA49E2 /* bolliger_mabillard_track.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bolliger_mabillard_track.h; sourceTree = ""; }; + F76C848B1EC4E7CC00FA49E2 /* compact_inverted_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = compact_inverted_coaster.c; sourceTree = ""; }; + F76C848C1EC4E7CC00FA49E2 /* corkscrew_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = corkscrew_roller_coaster.c; sourceTree = ""; }; + F76C848D1EC4E7CC00FA49E2 /* flying_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = flying_roller_coaster.c; sourceTree = ""; }; + F76C848E1EC4E7CC00FA49E2 /* giga_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = giga_coaster.c; sourceTree = ""; }; + F76C848F1EC4E7CC00FA49E2 /* heartline_twister_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = heartline_twister_coaster.c; sourceTree = ""; }; + F76C84901EC4E7CC00FA49E2 /* inverted_hairpin_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = inverted_hairpin_coaster.c; sourceTree = ""; }; + F76C84911EC4E7CC00FA49E2 /* inverted_impulse_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = inverted_impulse_coaster.c; sourceTree = ""; }; + F76C84921EC4E7CC00FA49E2 /* inverted_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = inverted_roller_coaster.c; sourceTree = ""; }; + F76C84931EC4E7CC00FA49E2 /* junior_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = junior_roller_coaster.c; sourceTree = ""; }; + F76C84941EC4E7CC00FA49E2 /* junior_roller_coaster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = junior_roller_coaster.h; sourceTree = ""; }; + F76C84951EC4E7CC00FA49E2 /* lay_down_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lay_down_roller_coaster.c; sourceTree = ""; }; + F76C84961EC4E7CC00FA49E2 /* lim_launched_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lim_launched_roller_coaster.c; sourceTree = ""; }; + F76C84971EC4E7CC00FA49E2 /* looping_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = looping_roller_coaster.c; sourceTree = ""; }; + F76C84981EC4E7CC00FA49E2 /* mine_ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mine_ride.c; sourceTree = ""; }; + F76C84991EC4E7CC00FA49E2 /* mine_train_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mine_train_coaster.c; sourceTree = ""; }; + F76C849A1EC4E7CC00FA49E2 /* mini_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mini_roller_coaster.c; sourceTree = ""; }; + F76C849B1EC4E7CC00FA49E2 /* mini_suspended_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mini_suspended_coaster.c; sourceTree = ""; }; + F76C849C1EC4E7CC00FA49E2 /* multi_dimension_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = multi_dimension_roller_coaster.c; sourceTree = ""; }; + F76C849D1EC4E7CC00FA49E2 /* reverse_freefall_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = reverse_freefall_coaster.c; sourceTree = ""; }; + F76C849E1EC4E7CC00FA49E2 /* reverser_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = reverser_roller_coaster.c; sourceTree = ""; }; + F76C849F1EC4E7CC00FA49E2 /* side_friction_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = side_friction_roller_coaster.c; sourceTree = ""; }; + F76C84A01EC4E7CC00FA49E2 /* stand_up_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = stand_up_roller_coaster.c; sourceTree = ""; }; + F76C84A11EC4E7CC00FA49E2 /* steeplechase.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = steeplechase.c; sourceTree = ""; }; + F76C84A21EC4E7CC00FA49E2 /* suspended_swinging_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = suspended_swinging_coaster.c; sourceTree = ""; }; + F76C84A31EC4E7CC00FA49E2 /* twister_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = twister_roller_coaster.c; sourceTree = ""; }; + F76C84A41EC4E7CC00FA49E2 /* vertical_drop_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vertical_drop_roller_coaster.c; sourceTree = ""; }; + F76C84A51EC4E7CC00FA49E2 /* virginia_reel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = virginia_reel.c; sourceTree = ""; }; + F76C84A61EC4E7CC00FA49E2 /* wild_mouse.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = wild_mouse.c; sourceTree = ""; }; + F76C84A71EC4E7CC00FA49E2 /* wooden_roller_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = wooden_roller_coaster.c; sourceTree = ""; }; + F76C84A81EC4E7CC00FA49E2 /* wooden_wild_mouse.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = wooden_wild_mouse.c; sourceTree = ""; }; + F76C84AA1EC4E7CC00FA49E2 /* car_ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = car_ride.c; sourceTree = ""; }; + F76C84AB1EC4E7CC00FA49E2 /* circus_show.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = circus_show.c; sourceTree = ""; }; + F76C84AC1EC4E7CC00FA49E2 /* crooked_house.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = crooked_house.c; sourceTree = ""; }; + F76C84AD1EC4E7CC00FA49E2 /* dodgems.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dodgems.c; sourceTree = ""; }; + F76C84AE1EC4E7CC00FA49E2 /* ferris_wheel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ferris_wheel.c; sourceTree = ""; }; + F76C84AF1EC4E7CC00FA49E2 /* flying_saucers.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = flying_saucers.c; sourceTree = ""; }; + F76C84B01EC4E7CC00FA49E2 /* ghost_train.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ghost_train.c; sourceTree = ""; }; + F76C84B11EC4E7CC00FA49E2 /* haunted_house.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = haunted_house.c; sourceTree = ""; }; + F76C84B21EC4E7CC00FA49E2 /* maze.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = maze.c; sourceTree = ""; }; + F76C84B31EC4E7CC00FA49E2 /* merry_go_round.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = merry_go_round.c; sourceTree = ""; }; + F76C84B41EC4E7CC00FA49E2 /* mini_golf.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mini_golf.c; sourceTree = ""; }; + F76C84B51EC4E7CC00FA49E2 /* mini_helicopters.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mini_helicopters.c; sourceTree = ""; }; + F76C84B61EC4E7CC00FA49E2 /* monorail_cycles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = monorail_cycles.c; sourceTree = ""; }; + F76C84B71EC4E7CC00FA49E2 /* observation_tower.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = observation_tower.c; sourceTree = ""; }; + F76C84B81EC4E7CC00FA49E2 /* space_rings.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = space_rings.c; sourceTree = ""; }; + F76C84B91EC4E7CC00FA49E2 /* spiral_slide.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = spiral_slide.c; sourceTree = ""; }; + F76C84BA1EC4E7CC00FA49E2 /* ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride.c; sourceTree = ""; }; + F76C84BB1EC4E7CC00FA49E2 /* ride.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ride.h; sourceTree = ""; }; + F76C84BC1EC4E7CC00FA49E2 /* ride_data.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride_data.c; sourceTree = ""; }; + F76C84BD1EC4E7CC00FA49E2 /* ride_data.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ride_data.h; sourceTree = ""; }; + F76C84BE1EC4E7CC00FA49E2 /* ride_ratings.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride_ratings.c; sourceTree = ""; }; + F76C84BF1EC4E7CC00FA49E2 /* ride_ratings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ride_ratings.h; sourceTree = ""; }; + F76C84C11EC4E7CC00FA49E2 /* facility.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = facility.c; sourceTree = ""; }; + F76C84C21EC4E7CC00FA49E2 /* misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = ""; }; + F76C84C31EC4E7CC00FA49E2 /* shop.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = shop.c; sourceTree = ""; }; + F76C84C41EC4E7CC00FA49E2 /* station.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = station.c; sourceTree = ""; }; + F76C84C51EC4E7CC00FA49E2 /* station.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = station.h; sourceTree = ""; }; + F76C84C71EC4E7CC00FA49E2 /* 3d_cinema.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = 3d_cinema.c; sourceTree = ""; }; + F76C84C81EC4E7CC00FA49E2 /* enterprise.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = enterprise.c; sourceTree = ""; }; + F76C84C91EC4E7CC00FA49E2 /* go_karts.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = go_karts.c; sourceTree = ""; }; + F76C84CA1EC4E7CC00FA49E2 /* launched_freefall.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = launched_freefall.c; sourceTree = ""; }; + F76C84CB1EC4E7CC00FA49E2 /* magic_carpet.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = magic_carpet.c; sourceTree = ""; }; + F76C84CC1EC4E7CC00FA49E2 /* motion_simulator.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = motion_simulator.c; sourceTree = ""; }; + F76C84CD1EC4E7CC00FA49E2 /* pirate_ship.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = pirate_ship.c; sourceTree = ""; }; + F76C84CE1EC4E7CC00FA49E2 /* roto_drop.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = roto_drop.c; sourceTree = ""; }; + F76C84CF1EC4E7CC00FA49E2 /* swinging_inverter_ship.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = swinging_inverter_ship.c; sourceTree = ""; }; + F76C84D01EC4E7CC00FA49E2 /* top_spin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = top_spin.c; sourceTree = ""; }; + F76C84D11EC4E7CC00FA49E2 /* twist.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = twist.c; sourceTree = ""; }; + F76C84D21EC4E7CC00FA49E2 /* track.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track.c; sourceTree = ""; }; + F76C84D31EC4E7CC00FA49E2 /* track.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = track.h; sourceTree = ""; }; + F76C84D41EC4E7CC00FA49E2 /* track_data.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_data.c; sourceTree = ""; }; + F76C84D51EC4E7CC00FA49E2 /* track_data.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = track_data.h; sourceTree = ""; }; + F76C84D61EC4E7CC00FA49E2 /* track_data_old.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_data_old.c; sourceTree = ""; }; + F76C84D71EC4E7CC00FA49E2 /* track_design.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_design.c; sourceTree = ""; }; + F76C84D81EC4E7CC00FA49E2 /* track_design.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = track_design.h; sourceTree = ""; }; + F76C84D91EC4E7CD00FA49E2 /* track_design_save.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_design_save.c; sourceTree = ""; }; + F76C84DA1EC4E7CD00FA49E2 /* track_paint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_paint.c; sourceTree = ""; }; + F76C84DB1EC4E7CD00FA49E2 /* track_paint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = track_paint.h; sourceTree = ""; }; + F76C84DC1EC4E7CD00FA49E2 /* TrackDesignRepository.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TrackDesignRepository.cpp; sourceTree = ""; }; + F76C84DD1EC4E7CD00FA49E2 /* TrackDesignRepository.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TrackDesignRepository.h; sourceTree = ""; }; + F76C84DF1EC4E7CD00FA49E2 /* chairlift.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = chairlift.c; sourceTree = ""; }; + F76C84E01EC4E7CD00FA49E2 /* lift.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = lift.c; sourceTree = ""; }; + F76C84E11EC4E7CD00FA49E2 /* miniature_railway.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = miniature_railway.c; sourceTree = ""; }; + F76C84E21EC4E7CD00FA49E2 /* monorail.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = monorail.c; sourceTree = ""; }; + F76C84E31EC4E7CD00FA49E2 /* suspended_monorail.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = suspended_monorail.c; sourceTree = ""; }; + F76C84E41EC4E7CD00FA49E2 /* vehicle.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vehicle.c; sourceTree = ""; }; + F76C84E51EC4E7CD00FA49E2 /* vehicle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vehicle.h; sourceTree = ""; }; + F76C84E61EC4E7CD00FA49E2 /* vehicle_data.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vehicle_data.c; sourceTree = ""; }; + F76C84E71EC4E7CD00FA49E2 /* vehicle_data.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vehicle_data.h; sourceTree = ""; }; + F76C84E81EC4E7CD00FA49E2 /* vehicle_paint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vehicle_paint.c; sourceTree = ""; }; + F76C84E91EC4E7CD00FA49E2 /* vehicle_paint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vehicle_paint.h; sourceTree = ""; }; + F76C84EB1EC4E7CD00FA49E2 /* boat_ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = boat_ride.c; sourceTree = ""; }; + F76C84EC1EC4E7CD00FA49E2 /* dingy_slide.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dingy_slide.c; sourceTree = ""; }; + F76C84ED1EC4E7CD00FA49E2 /* log_flume.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = log_flume.c; sourceTree = ""; }; + F76C84EE1EC4E7CD00FA49E2 /* river_rafts.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = river_rafts.c; sourceTree = ""; }; + F76C84EF1EC4E7CD00FA49E2 /* river_rapids.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = river_rapids.c; sourceTree = ""; }; + F76C84F01EC4E7CD00FA49E2 /* splash_boats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = splash_boats.c; sourceTree = ""; }; + F76C84F11EC4E7CD00FA49E2 /* submarine_ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = submarine_ride.c; sourceTree = ""; }; + F76C84F21EC4E7CD00FA49E2 /* water_coaster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = water_coaster.c; sourceTree = ""; }; + F76C84F41EC4E7CD00FA49E2 /* scenario.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scenario.c; sourceTree = ""; }; + F76C84F51EC4E7CD00FA49E2 /* scenario.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scenario.h; sourceTree = ""; }; + F76C84F61EC4E7CD00FA49E2 /* ScenarioRepository.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScenarioRepository.cpp; sourceTree = ""; }; + F76C84F71EC4E7CD00FA49E2 /* ScenarioRepository.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScenarioRepository.h; sourceTree = ""; }; + F76C84F81EC4E7CD00FA49E2 /* ScenarioSources.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScenarioSources.cpp; sourceTree = ""; }; + F76C84F91EC4E7CD00FA49E2 /* ScenarioSources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScenarioSources.h; sourceTree = ""; }; + F76C84FA1EC4E7CD00FA49E2 /* sprites.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sprites.h; sourceTree = ""; }; + F76C84FC1EC4E7CD00FA49E2 /* TitleScreen.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TitleScreen.cpp; sourceTree = ""; }; + F76C84FD1EC4E7CD00FA49E2 /* TitleScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TitleScreen.h; sourceTree = ""; }; + F76C84FE1EC4E7CD00FA49E2 /* TitleSequence.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequence.cpp; sourceTree = ""; }; + F76C84FF1EC4E7CD00FA49E2 /* TitleSequence.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TitleSequence.h; sourceTree = ""; }; + F76C85001EC4E7CD00FA49E2 /* TitleSequenceManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequenceManager.cpp; sourceTree = ""; }; + F76C85011EC4E7CD00FA49E2 /* TitleSequenceManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TitleSequenceManager.h; sourceTree = ""; }; + F76C85021EC4E7CD00FA49E2 /* TitleSequencePlayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequencePlayer.cpp; sourceTree = ""; }; + F76C85031EC4E7CD00FA49E2 /* TitleSequencePlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TitleSequencePlayer.h; sourceTree = ""; }; + F76C85051EC4E7CD00FA49E2 /* UiContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UiContext.h; sourceTree = ""; }; + F76C85071EC4E7CD00FA49E2 /* sawyercoding.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sawyercoding.c; sourceTree = ""; }; + F76C85081EC4E7CD00FA49E2 /* sawyercoding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sawyercoding.h; sourceTree = ""; }; + F76C85091EC4E7CD00FA49E2 /* util.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = ""; }; + F76C850A1EC4E7CD00FA49E2 /* util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = ""; }; + F76C850B1EC4E7CD00FA49E2 /* Version.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Version.cpp; sourceTree = ""; }; + F76C850C1EC4E7CD00FA49E2 /* Version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Version.h; sourceTree = ""; }; + F76C850E1EC4E7CD00FA49E2 /* about.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = about.c; sourceTree = ""; }; + F76C850F1EC4E7CD00FA49E2 /* banner.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = banner.c; sourceTree = ""; }; + F76C85101EC4E7CD00FA49E2 /* changelog.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = changelog.c; sourceTree = ""; }; + F76C85111EC4E7CD00FA49E2 /* cheats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cheats.c; sourceTree = ""; }; + F76C85121EC4E7CD00FA49E2 /* clear_scenery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = clear_scenery.c; sourceTree = ""; }; + F76C85131EC4E7CD00FA49E2 /* custom_currency.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = custom_currency.c; sourceTree = ""; }; + F76C85141EC4E7CD00FA49E2 /* debug_paint.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = debug_paint.c; sourceTree = ""; }; + F76C85151EC4E7CD00FA49E2 /* demolish_ride_prompt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = demolish_ride_prompt.c; sourceTree = ""; }; + F76C85161EC4E7CD00FA49E2 /* dropdown.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = dropdown.c; sourceTree = ""; }; + F76C85171EC4E7CD00FA49E2 /* dropdown.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dropdown.h; sourceTree = ""; }; + F76C85181EC4E7CD00FA49E2 /* editor_bottom_toolbar.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_bottom_toolbar.c; sourceTree = ""; }; + F76C85191EC4E7CD00FA49E2 /* editor_inventions_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_inventions_list.c; sourceTree = ""; }; + F76C851A1EC4E7CD00FA49E2 /* editor_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_main.c; sourceTree = ""; }; + F76C851B1EC4E7CD00FA49E2 /* editor_object_selection.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_object_selection.c; sourceTree = ""; }; + F76C851C1EC4E7CD00FA49E2 /* editor_objective_options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_objective_options.c; sourceTree = ""; }; + F76C851D1EC4E7CD00FA49E2 /* editor_scenario_options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = editor_scenario_options.c; sourceTree = ""; }; + F76C851E1EC4E7CD00FA49E2 /* error.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = error.c; sourceTree = ""; }; + F76C851F1EC4E7CD00FA49E2 /* error.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = error.h; sourceTree = ""; }; + F76C85201EC4E7CD00FA49E2 /* finances.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = finances.c; sourceTree = ""; }; + F76C85211EC4E7CD00FA49E2 /* footpath.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = footpath.c; sourceTree = ""; }; + F76C85221EC4E7CD00FA49E2 /* game_bottom_toolbar.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = game_bottom_toolbar.c; sourceTree = ""; }; + F76C85231EC4E7CD00FA49E2 /* guest.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = guest.c; sourceTree = ""; }; + F76C85241EC4E7CD00FA49E2 /* guest_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = guest_list.c; sourceTree = ""; }; + F76C85251EC4E7CD00FA49E2 /* install_track.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = install_track.c; sourceTree = ""; }; + F76C85261EC4E7CD00FA49E2 /* land.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = land.c; sourceTree = ""; }; + F76C85271EC4E7CD00FA49E2 /* land_rights.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = land_rights.c; sourceTree = ""; }; + F76C85281EC4E7CD00FA49E2 /* loadsave.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = loadsave.c; sourceTree = ""; }; + F76C85291EC4E7CD00FA49E2 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + F76C852A1EC4E7CD00FA49E2 /* map.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = ""; }; + F76C852B1EC4E7CD00FA49E2 /* map_tooltip.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_tooltip.c; sourceTree = ""; }; + F76C852C1EC4E7CD00FA49E2 /* mapgen.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mapgen.c; sourceTree = ""; }; + F76C852D1EC4E7CD00FA49E2 /* maze_construction.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = maze_construction.c; sourceTree = ""; }; + F76C852E1EC4E7CD00FA49E2 /* multiplayer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = multiplayer.c; sourceTree = ""; }; + F76C852F1EC4E7CD00FA49E2 /* music_credits.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = music_credits.c; sourceTree = ""; }; + F76C85301EC4E7CD00FA49E2 /* network_status.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = network_status.c; sourceTree = ""; }; + F76C85311EC4E7CD00FA49E2 /* new_campaign.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = new_campaign.c; sourceTree = ""; }; + F76C85321EC4E7CD00FA49E2 /* new_ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = new_ride.c; sourceTree = ""; }; + F76C85331EC4E7CD00FA49E2 /* news.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = news.c; sourceTree = ""; }; + F76C85341EC4E7CD00FA49E2 /* news_options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = news_options.c; sourceTree = ""; }; + F76C85351EC4E7CD00FA49E2 /* options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = ""; }; + F76C85361EC4E7CD00FA49E2 /* park.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = park.c; sourceTree = ""; }; + F76C85371EC4E7CD00FA49E2 /* player.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = player.c; sourceTree = ""; }; + F76C85381EC4E7CD00FA49E2 /* publisher_credits.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = publisher_credits.c; sourceTree = ""; }; + F76C85391EC4E7CD00FA49E2 /* research.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = research.c; sourceTree = ""; }; + F76C853A1EC4E7CD00FA49E2 /* ride.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride.c; sourceTree = ""; }; + F76C853B1EC4E7CD00FA49E2 /* ride_construction.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride_construction.c; sourceTree = ""; }; + F76C853C1EC4E7CD00FA49E2 /* ride_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ride_list.c; sourceTree = ""; }; + F76C853D1EC4E7CD00FA49E2 /* save_prompt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = save_prompt.c; sourceTree = ""; }; + F76C853E1EC4E7CD00FA49E2 /* scenery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; + F76C853F1EC4E7CD00FA49E2 /* server_list.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = server_list.cpp; sourceTree = ""; }; + F76C85401EC4E7CD00FA49E2 /* server_start.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = server_start.c; sourceTree = ""; }; + F76C85411EC4E7CD00FA49E2 /* shortcut_key_change.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = shortcut_key_change.c; sourceTree = ""; }; + F76C85421EC4E7CD00FA49E2 /* shortcut_keys.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = shortcut_keys.c; sourceTree = ""; }; + F76C85431EC4E7CD00FA49E2 /* sign.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sign.c; sourceTree = ""; }; + F76C85441EC4E7CD00FA49E2 /* staff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = staff.c; sourceTree = ""; }; + F76C85451EC4E7CD00FA49E2 /* staff_fire_prompt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = staff_fire_prompt.c; sourceTree = ""; }; + F76C85461EC4E7CD00FA49E2 /* staff_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = staff_list.c; sourceTree = ""; }; + F76C85471EC4E7CD00FA49E2 /* text_input.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = text_input.c; sourceTree = ""; }; + F76C85481EC4E7CD00FA49E2 /* themes.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = themes.c; sourceTree = ""; }; + F76C85491EC4E7CD00FA49E2 /* tile_inspector.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tile_inspector.c; sourceTree = ""; }; + F76C854A1EC4E7CD00FA49E2 /* tile_inspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tile_inspector.h; sourceTree = ""; }; + F76C854B1EC4E7CD00FA49E2 /* title_command_editor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_command_editor.c; sourceTree = ""; }; + F76C854C1EC4E7CD00FA49E2 /* title_editor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_editor.c; sourceTree = ""; }; + F76C854D1EC4E7CD00FA49E2 /* title_exit.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_exit.c; sourceTree = ""; }; + F76C854E1EC4E7CD00FA49E2 /* title_logo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_logo.c; sourceTree = ""; }; + F76C854F1EC4E7CD00FA49E2 /* title_menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_menu.c; sourceTree = ""; }; + F76C85501EC4E7CD00FA49E2 /* title_options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_options.c; sourceTree = ""; }; + F76C85511EC4E7CD00FA49E2 /* title_scenarioselect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = title_scenarioselect.c; sourceTree = ""; }; + F76C85521EC4E7CD00FA49E2 /* tooltip.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tooltip.c; sourceTree = ""; }; + F76C85531EC4E7CD00FA49E2 /* tooltip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tooltip.h; sourceTree = ""; }; + F76C85541EC4E7CD00FA49E2 /* top_toolbar.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = top_toolbar.c; sourceTree = ""; }; + F76C85551EC4E7CD00FA49E2 /* track_list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_list.c; sourceTree = ""; }; + F76C85561EC4E7CD00FA49E2 /* track_manage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_manage.c; sourceTree = ""; }; + F76C85571EC4E7CD00FA49E2 /* track_place.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = track_place.c; sourceTree = ""; }; + F76C85581EC4E7CD00FA49E2 /* view_clipping.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = view_clipping.c; sourceTree = ""; }; + F76C85591EC4E7CD00FA49E2 /* viewport.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = viewport.c; sourceTree = ""; }; + F76C855A1EC4E7CD00FA49E2 /* water.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = water.c; sourceTree = ""; }; + F76C855C1EC4E7CD00FA49E2 /* Balloon.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Balloon.cpp; sourceTree = ""; }; + F76C855D1EC4E7CD00FA49E2 /* banner.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = banner.cpp; sourceTree = ""; }; + F76C855E1EC4E7CD00FA49E2 /* banner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = banner.h; sourceTree = ""; }; + F76C855F1EC4E7CD00FA49E2 /* Climate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Climate.cpp; sourceTree = ""; }; + F76C85601EC4E7CD00FA49E2 /* Climate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Climate.h; sourceTree = ""; }; + F76C85611EC4E7CD00FA49E2 /* Duck.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Duck.cpp; sourceTree = ""; }; + F76C85621EC4E7CD00FA49E2 /* entrance.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = entrance.cpp; sourceTree = ""; }; + F76C85631EC4E7CD00FA49E2 /* entrance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = entrance.h; sourceTree = ""; }; + F76C85641EC4E7CD00FA49E2 /* footpath.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = footpath.c; sourceTree = ""; }; + F76C85651EC4E7CD00FA49E2 /* footpath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = footpath.h; sourceTree = ""; }; + F76C85661EC4E7CD00FA49E2 /* Fountain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Fountain.cpp; sourceTree = ""; }; + F76C85671EC4E7CD00FA49E2 /* Fountain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fountain.h; sourceTree = ""; }; + F76C85681EC4E7CD00FA49E2 /* map.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = ""; }; + F76C85691EC4E7CD00FA49E2 /* map.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map.h; sourceTree = ""; }; + F76C856A1EC4E7CD00FA49E2 /* map_animation.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_animation.c; sourceTree = ""; }; + F76C856B1EC4E7CD00FA49E2 /* map_animation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map_animation.h; sourceTree = ""; }; + F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = map_helpers.c; sourceTree = ""; }; + F76C856D1EC4E7CD00FA49E2 /* map_helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = map_helpers.h; sourceTree = ""; }; + F76C856E1EC4E7CD00FA49E2 /* mapgen.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = mapgen.c; sourceTree = ""; }; + F76C856F1EC4E7CD00FA49E2 /* mapgen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mapgen.h; sourceTree = ""; }; + F76C85701EC4E7CD00FA49E2 /* money_effect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = money_effect.c; sourceTree = ""; }; + F76C85711EC4E7CD00FA49E2 /* park.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = park.c; sourceTree = ""; }; + F76C85721EC4E7CD00FA49E2 /* park.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = park.h; sourceTree = ""; }; + F76C85731EC4E7CD00FA49E2 /* particle.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = particle.c; sourceTree = ""; }; + F76C85741EC4E7CD00FA49E2 /* scenery.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; + F76C85751EC4E7CD00FA49E2 /* scenery.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scenery.h; sourceTree = ""; }; + F76C85761EC4E7CD00FA49E2 /* sprite.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = sprite.c; sourceTree = ""; }; + F76C85771EC4E7CD00FA49E2 /* sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = ""; }; + F76C85781EC4E7CD00FA49E2 /* tile_inspector.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tile_inspector.c; sourceTree = ""; }; + F76C85791EC4E7CD00FA49E2 /* tile_inspector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tile_inspector.h; sourceTree = ""; }; + F76C857A1EC4E7CD00FA49E2 /* wall.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = wall.cpp; sourceTree = ""; }; + F76C857B1EC4E7CD00FA49E2 /* water.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = water.h; sourceTree = ""; }; + F76C857D1EC4E80E00FA49E2 /* Cli.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Cli.cpp; sourceTree = ""; }; + F76C85821EC4E82600FA49E2 /* AudioChannel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AudioChannel.cpp; sourceTree = ""; }; + F76C85831EC4E82600FA49E2 /* AudioContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AudioContext.cpp; sourceTree = ""; }; + F76C85841EC4E82600FA49E2 /* AudioContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioContext.h; sourceTree = ""; }; + F76C85851EC4E82600FA49E2 /* AudioFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioFormat.h; sourceTree = ""; }; + F76C85861EC4E82600FA49E2 /* AudioMixer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AudioMixer.cpp; sourceTree = ""; }; + F76C85871EC4E82600FA49E2 /* FileAudioSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FileAudioSource.cpp; sourceTree = ""; }; + F76C85881EC4E82600FA49E2 /* MemoryAudioSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryAudioSource.cpp; sourceTree = ""; }; + F76C858A1EC4E82600FA49E2 /* CursorData.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CursorData.cpp; sourceTree = ""; }; + F76C858B1EC4E82600FA49E2 /* CursorRepository.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CursorRepository.cpp; sourceTree = ""; }; + F76C858C1EC4E82600FA49E2 /* CursorRepository.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CursorRepository.h; sourceTree = ""; }; + F76C858F1EC4E82600FA49E2 /* DrawingEngines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DrawingEngines.h; sourceTree = ""; }; + F76C85911EC4E82600FA49E2 /* CopyFramebufferShader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CopyFramebufferShader.cpp; sourceTree = ""; }; + F76C85921EC4E82600FA49E2 /* CopyFramebufferShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CopyFramebufferShader.h; sourceTree = ""; }; + F76C85931EC4E82600FA49E2 /* DrawCommands.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DrawCommands.h; sourceTree = ""; }; + F76C85941EC4E82600FA49E2 /* DrawImageShader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DrawImageShader.cpp; sourceTree = ""; }; + F76C85951EC4E82600FA49E2 /* DrawImageShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DrawImageShader.h; sourceTree = ""; }; + F76C85961EC4E82600FA49E2 /* DrawLineShader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DrawLineShader.cpp; sourceTree = ""; }; + F76C85971EC4E82600FA49E2 /* DrawLineShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DrawLineShader.h; sourceTree = ""; }; + F76C85981EC4E82600FA49E2 /* FillRectShader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FillRectShader.cpp; sourceTree = ""; }; + F76C85991EC4E82600FA49E2 /* FillRectShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FillRectShader.h; sourceTree = ""; }; + F76C859A1EC4E82600FA49E2 /* GLSLTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GLSLTypes.h; sourceTree = ""; }; + F76C859B1EC4E82600FA49E2 /* OpenGLAPI.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLAPI.cpp; sourceTree = ""; }; + F76C859C1EC4E82600FA49E2 /* OpenGLAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLAPI.h; sourceTree = ""; }; + F76C859D1EC4E82600FA49E2 /* OpenGLDrawingEngine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLDrawingEngine.cpp; sourceTree = ""; }; + F76C859E1EC4E82600FA49E2 /* OpenGLFramebuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLFramebuffer.cpp; sourceTree = ""; }; + F76C859F1EC4E82600FA49E2 /* OpenGLFramebuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLFramebuffer.h; sourceTree = ""; }; + F76C85A01EC4E82600FA49E2 /* OpenGLShaderProgram.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLShaderProgram.cpp; sourceTree = ""; }; + F76C85A11EC4E82600FA49E2 /* OpenGLShaderProgram.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLShaderProgram.h; sourceTree = ""; }; + F76C85A21EC4E82600FA49E2 /* SwapFramebuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SwapFramebuffer.cpp; sourceTree = ""; }; + F76C85A31EC4E82600FA49E2 /* SwapFramebuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwapFramebuffer.h; sourceTree = ""; }; + F76C85A41EC4E82600FA49E2 /* TextureCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TextureCache.cpp; sourceTree = ""; }; + F76C85A51EC4E82600FA49E2 /* TextureCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextureCache.h; sourceTree = ""; }; + F76C85A61EC4E82600FA49E2 /* SoftwareDrawingEngine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SoftwareDrawingEngine.cpp; sourceTree = ""; }; + F76C85A81EC4E82600FA49E2 /* SDLException.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLException.h; sourceTree = ""; }; + F76C85A91EC4E82600FA49E2 /* TextComposition.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TextComposition.cpp; sourceTree = ""; }; + F76C85AA1EC4E82600FA49E2 /* TextComposition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextComposition.h; sourceTree = ""; }; + F76C85AB1EC4E82600FA49E2 /* Ui.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Ui.cpp; sourceTree = ""; }; + F76C85AC1EC4E82600FA49E2 /* UiContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.cpp; sourceTree = ""; }; + F76C85AD1EC4E82600FA49E2 /* UiContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UiContext.h; sourceTree = ""; }; + F76C85AE1EC4E82600FA49E2 /* UiContext.Linux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Linux.cpp; sourceTree = ""; }; + F76C85AF1EC4E82600FA49E2 /* UiContext.Win32.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Win32.cpp; sourceTree = ""; }; + F76C87B61EC4E91500FA49E2 /* 7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 7.png; sourceTree = ""; }; + F76C87B71EC4E91500FA49E2 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = ""; }; + F76C87B91EC4E91500FA49E2 /* 29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 29.png; sourceTree = ""; }; + F76C87BA1EC4E91500FA49E2 /* 30.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 30.png; sourceTree = ""; }; + F76C87BB1EC4E91500FA49E2 /* 31.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 31.png; sourceTree = ""; }; + F76C87BC1EC4E91500FA49E2 /* 32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 32.png; sourceTree = ""; }; + F76C87BD1EC4E91500FA49E2 /* 58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 58.png; sourceTree = ""; }; + F76C87BE1EC4E91500FA49E2 /* cheats.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cheats.png; sourceTree = ""; }; + F76C87BF1EC4E91500FA49E2 /* copy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copy.png; sourceTree = ""; }; + F76C87C01EC4E91500FA49E2 /* fast_forward.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fast_forward.png; sourceTree = ""; }; + F76C87C11EC4E91500FA49E2 /* game_speed_indicator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = game_speed_indicator.png; sourceTree = ""; }; + F76C87C21EC4E91500FA49E2 /* game_speed_indicator_double.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = game_speed_indicator_double.png; sourceTree = ""; }; + F76C87C31EC4E91500FA49E2 /* large_scenery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = large_scenery.png; sourceTree = ""; }; + F76C87C41EC4E91500FA49E2 /* map_gen_land.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_land.png; sourceTree = ""; }; + F76C87C51EC4E91500FA49E2 /* map_gen_noise.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_noise.png; sourceTree = ""; }; + F76C87C61EC4E91500FA49E2 /* map_gen_trees.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_trees.png; sourceTree = ""; }; + F76C87C71EC4E91500FA49E2 /* multiplayer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = multiplayer.png; sourceTree = ""; }; + F76C87C81EC4E91500FA49E2 /* mute.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mute.png; sourceTree = ""; }; + F76C87C91EC4E91500FA49E2 /* mute_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mute_pressed.png; sourceTree = ""; }; + F76C87CA1EC4E91500FA49E2 /* paste.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paste.png; sourceTree = ""; }; + F76C87CB1EC4E91500FA49E2 /* paths.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paths.png; sourceTree = ""; }; + F76C87CC1EC4E91500FA49E2 /* rct1_close_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_off.png; sourceTree = ""; }; + F76C87CD1EC4E91500FA49E2 /* rct1_close_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_off_pressed.png; sourceTree = ""; }; + F76C87CE1EC4E91500FA49E2 /* rct1_close_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_on.png; sourceTree = ""; }; + F76C87CF1EC4E91500FA49E2 /* rct1_close_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_on_pressed.png; sourceTree = ""; }; + F76C87D01EC4E91500FA49E2 /* rct1_open_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_off.png; sourceTree = ""; }; + F76C87D11EC4E91500FA49E2 /* rct1_open_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_off_pressed.png; sourceTree = ""; }; + F76C87D21EC4E91500FA49E2 /* rct1_open_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_on.png; sourceTree = ""; }; + F76C87D31EC4E91500FA49E2 /* rct1_open_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_on_pressed.png; sourceTree = ""; }; + F76C87D41EC4E91500FA49E2 /* rct1_test_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_off.png; sourceTree = ""; }; + F76C87D51EC4E91500FA49E2 /* rct1_test_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_off_pressed.png; sourceTree = ""; }; + F76C87D61EC4E91500FA49E2 /* rct1_test_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_on.png; sourceTree = ""; }; + F76C87D71EC4E91500FA49E2 /* rct1_test_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_on_pressed.png; sourceTree = ""; }; + F76C87D81EC4E91500FA49E2 /* server_password.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = server_password.png; sourceTree = ""; }; + F76C87D91EC4E91500FA49E2 /* small_scenery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = small_scenery.png; sourceTree = ""; }; + F76C87DA1EC4E91500FA49E2 /* sort.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sort.png; sourceTree = ""; }; + F76C87DB1EC4E91500FA49E2 /* tab_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tab_disabled.png; sourceTree = ""; }; + F76C87DC1EC4E91500FA49E2 /* twitch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = twitch.png; sourceTree = ""; }; + F76C87DD1EC4E91500FA49E2 /* unmute.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unmute.png; sourceTree = ""; }; + F76C87DE1EC4E91500FA49E2 /* unmute_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unmute_pressed.png; sourceTree = ""; }; + F76C87DF1EC4E91500FA49E2 /* zoom_in.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_in.png; sourceTree = ""; }; + F76C87E01EC4E91500FA49E2 /* zoom_in_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_in_background.png; sourceTree = ""; }; + F76C87E11EC4E91500FA49E2 /* zoom_out.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_out.png; sourceTree = ""; }; + F76C87E21EC4E91500FA49E2 /* zoom_out_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_out_background.png; sourceTree = ""; }; + F76C87E31EC4E91500FA49E2 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; + F76C87E41EC4E91500FA49E2 /* logo_text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo_text.png; sourceTree = ""; }; + F76C87E51EC4E91500FA49E2 /* sprites.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = sprites.json; sourceTree = ""; }; + F76C87E81EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; + F76C87E91EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; + F76C87EB1EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; + F76C87EC1EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; + F76C87EE1EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; + F76C87EF1EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; + F76C87F01EC4E91500FA49E2 /* flat_to_steep_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_1.png; sourceTree = ""; }; + F76C87F11EC4E91500FA49E2 /* flat_to_steep_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_2_1.png; sourceTree = ""; }; + F76C87F21EC4E91500FA49E2 /* flat_to_steep_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_2_2.png; sourceTree = ""; }; + F76C87F31EC4E91500FA49E2 /* flat_to_steep_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_3_1.png; sourceTree = ""; }; + F76C87F41EC4E91500FA49E2 /* flat_to_steep_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_3_2.png; sourceTree = ""; }; + F76C87F51EC4E91500FA49E2 /* flat_to_steep_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_4.png; sourceTree = ""; }; + F76C87F61EC4E91500FA49E2 /* flat_to_steep_diagonal_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_1.png; sourceTree = ""; }; + F76C87F71EC4E91500FA49E2 /* flat_to_steep_diagonal_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_2.png; sourceTree = ""; }; + F76C87F81EC4E91500FA49E2 /* flat_to_steep_diagonal_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_3.png; sourceTree = ""; }; + F76C87F91EC4E91500FA49E2 /* flat_to_steep_diagonal_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_4.png; sourceTree = ""; }; + F76C87FA1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_1.png; sourceTree = ""; }; + F76C87FB1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_2.png; sourceTree = ""; }; + F76C87FC1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_3.png; sourceTree = ""; }; + F76C87FD1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_4.png; sourceTree = ""; }; + F76C87FE1EC4E91500FA49E2 /* flat_to_steep_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_1.png; sourceTree = ""; }; + F76C87FF1EC4E91500FA49E2 /* flat_to_steep_lift_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_2_1.png; sourceTree = ""; }; + F76C88001EC4E91500FA49E2 /* flat_to_steep_lift_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_2_2.png; sourceTree = ""; }; + F76C88011EC4E91500FA49E2 /* flat_to_steep_lift_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_3_1.png; sourceTree = ""; }; + F76C88021EC4E91500FA49E2 /* flat_to_steep_lift_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_3_2.png; sourceTree = ""; }; + F76C88031EC4E91500FA49E2 /* flat_to_steep_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_4.png; sourceTree = ""; }; + F76C88041EC4E91500FA49E2 /* steep_to_flat_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_1.png; sourceTree = ""; }; + F76C88051EC4E91600FA49E2 /* steep_to_flat_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_2_1.png; sourceTree = ""; }; + F76C88061EC4E91600FA49E2 /* steep_to_flat_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_2_2.png; sourceTree = ""; }; + F76C88071EC4E91600FA49E2 /* steep_to_flat_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_3_1.png; sourceTree = ""; }; + F76C88081EC4E91600FA49E2 /* steep_to_flat_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_3_2.png; sourceTree = ""; }; + F76C88091EC4E91600FA49E2 /* steep_to_flat_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_4.png; sourceTree = ""; }; + F76C880A1EC4E91600FA49E2 /* steep_to_flat_diagonal_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_1.png; sourceTree = ""; }; + F76C880B1EC4E91600FA49E2 /* steep_to_flat_diagonal_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_2.png; sourceTree = ""; }; + F76C880C1EC4E91600FA49E2 /* steep_to_flat_diagonal_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_3.png; sourceTree = ""; }; + F76C880D1EC4E91600FA49E2 /* steep_to_flat_diagonal_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_4.png; sourceTree = ""; }; + F76C880E1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_1.png; sourceTree = ""; }; + F76C880F1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_2.png; sourceTree = ""; }; + F76C88101EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_3.png; sourceTree = ""; }; + F76C88111EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_4.png; sourceTree = ""; }; + F76C88121EC4E91600FA49E2 /* steep_to_flat_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_1.png; sourceTree = ""; }; + F76C88131EC4E91600FA49E2 /* steep_to_flat_lift_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_2_1.png; sourceTree = ""; }; + F76C88141EC4E91600FA49E2 /* steep_to_flat_lift_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_2_2.png; sourceTree = ""; }; + F76C88151EC4E91600FA49E2 /* steep_to_flat_lift_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_3_1.png; sourceTree = ""; }; + F76C88161EC4E91600FA49E2 /* steep_to_flat_lift_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_3_2.png; sourceTree = ""; }; + F76C88171EC4E91600FA49E2 /* steep_to_flat_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_4.png; sourceTree = ""; }; + F76C88191EC4E91600FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; + F76C881A1EC4E91600FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; + F76C881C1EC4E91600FA49E2 /* icon.ico */ = {isa = PBXFileReference; lastKnownFileType = image.ico; path = icon.ico; sourceTree = ""; }; + F76C881D1EC4E91600FA49E2 /* icon_flag.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = icon_flag.svg; sourceTree = ""; }; + F76C881E1EC4E91600FA49E2 /* icon_noflag.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = icon_noflag.svg; sourceTree = ""; }; + F76C881F1EC4E91600FA49E2 /* icon_x1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x1024.png; sourceTree = ""; }; + F76C88201EC4E91600FA49E2 /* icon_x128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x128.png; sourceTree = ""; }; + F76C88211EC4E91600FA49E2 /* icon_x16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x16.png; sourceTree = ""; }; + F76C88221EC4E91600FA49E2 /* icon_x2048.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x2048.png; sourceTree = ""; }; + F76C88231EC4E91600FA49E2 /* icon_x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x256.png; sourceTree = ""; }; + F76C88241EC4E91600FA49E2 /* icon_x32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x32.png; sourceTree = ""; }; + F76C88251EC4E91600FA49E2 /* icon_x4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x4.png; sourceTree = ""; }; + F76C88261EC4E91600FA49E2 /* icon_x40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x40.png; sourceTree = ""; }; + F76C88271EC4E91600FA49E2 /* icon_x512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x512.png; sourceTree = ""; }; + F76C88281EC4E91600FA49E2 /* icon_x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x64.png; sourceTree = ""; }; + F76C88291EC4E91600FA49E2 /* icon_x8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x8.png; sourceTree = ""; }; + F76C882A1EC4E91600FA49E2 /* makeico.linq */ = {isa = PBXFileReference; lastKnownFileType = text; path = makeico.linq; sourceTree = ""; }; + F76C882B1EC4E91600FA49E2 /* OpenRCT2.rc */ = {isa = PBXFileReference; lastKnownFileType = text; path = OpenRCT2.rc; sourceTree = ""; }; + F76C882C1EC4E91600FA49E2 /* resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = ""; }; + F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UiContext.macOS.mm; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1249,6 +1664,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F76C88921EC539A300FA49E2 /* libopenrct2.a in Frameworks */, D47304D51C4FF8250015C0EA /* libz.tbd in Frameworks */, D41B73EF1C2101890080A7B9 /* libcurl.tbd in Frameworks */, D41B741D1C210A7A0080A7B9 /* libiconv.tbd in Frameworks */, @@ -1265,21 +1681,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 652747E91E41CDFE000F36FD /* rct12 */ = { - isa = PBXGroup; - children = ( - D433A4FA1E4A861F00D9A6DF /* SawyerChunk.cpp */, - D433A4FB1E4A861F00D9A6DF /* SawyerChunk.h */, - D433A4FC1E4A861F00D9A6DF /* SawyerChunkReader.cpp */, - D433A4FD1E4A861F00D9A6DF /* SawyerChunkReader.h */, - D433A4FE1E4A861F00D9A6DF /* SawyerChunkWriter.cpp */, - D433A4FF1E4A861F00D9A6DF /* SawyerChunkWriter.h */, - 652747EA1E41CE1B000F36FD /* SawyerEncoding.cpp */, - 652747EB1E41CE1B000F36FD /* SawyerEncoding.h */, - ); - name = rct12; - sourceTree = ""; - }; 8546F74A1D7E1D220004004C /* Tests */ = { isa = PBXGroup; children = ( @@ -1541,62 +1942,10 @@ D41B72431C21015A0080A7B9 /* Sources */ = { isa = PBXGroup; children = ( - D44270CF1CC81B3200D84D28 /* audio */, - D44270D61CC81B3200D84D28 /* cmdline */, - D42E33741E5C27D600D630AF /* config */, - D44270E01CC81B3200D84D28 /* core */, - D44271001CC81B3200D84D28 /* drawing */, - D44271181CC81B3200D84D28 /* interface */, - D44271321CC81B3200D84D28 /* localisation */, - D44271441CC81B3200D84D28 /* management */, - D442714F1CC81B3200D84D28 /* network */, - D464FEC11D31A6AA00CBABAC /* object */, - C686F8961CDBC37E009F9BFC /* paint */, - D442715B1CC81B3200D84D28 /* peep */, - D44271601CC81B3200D84D28 /* platform */, - C650B2141CCABBDD00B4D91C /* rct1 */, - C6B5A7CF1CDFE4CB00C9C006 /* rct2 */, - 652747E91E41CDFE000F36FD /* rct12 */, - D442716E1CC81B3200D84D28 /* ride */, - C6E96E1C1E04070E0076A04F /* scenario */, - C6E96E261E04072F0076A04F /* title */, - D44271881CC81B3200D84D28 /* util */, - D442718E1CC81B3200D84D28 /* windows */, - D44271D81CC81B3200D84D28 /* world */, - D44270D41CC81B3200D84D28 /* cheats.c */, - D44270D51CC81B3200D84D28 /* cheats.h */, - D44270DC1CC81B3200D84D28 /* cmdline_sprite.c */, - D44270DD1CC81B3200D84D28 /* common.h */, - D44270FE1CC81B3200D84D28 /* diagnostic.c */, - D44270FF1CC81B3200D84D28 /* diagnostic.h */, - D442710E1CC81B3200D84D28 /* editor.c */, - D442710F1CC81B3200D84D28 /* editor.h */, - C6CABA801E1466D600D33A6B /* FileClassifier.cpp */, - C6CABA811E1466D600D33A6B /* FileClassifier.h */, - D44271101CC81B3200D84D28 /* game.c */, - D44271111CC81B3200D84D28 /* game.h */, - 652076301E22EFE7000D0C04 /* Imaging.cpp */, - 652076311E22EFE7000D0C04 /* Imaging.h */, - D44271161CC81B3200D84D28 /* input.c */, - D44271171CC81B3200D84D28 /* input.h */, - D44271301CC81B3200D84D28 /* intro.c */, - D44271311CC81B3200D84D28 /* intro.h */, - D44271561CC81B3200D84D28 /* object_list.c */, - D44271581CC81B3200D84D28 /* object.h */, - D460DFD01E01239D007BA2FE /* OpenRCT2.cpp */, - D460DFD21E0123B5007BA2FE /* OpenRCT2.h */, - 658F3D8F1E44A6C200388550 /* ParkImporter.cpp */, - 658F3D901E44A6C200388550 /* ParkImporter.h */, - D460DFD31E0123D1007BA2FE /* PlatformEnvironment.cpp */, - D460DFD51E0123DB007BA2FE /* PlatformEnvironment.h */, - D44271691CC81B3200D84D28 /* rct1.c */, - D442716A1CC81B3200D84D28 /* rct1.h */, - D442716B1CC81B3200D84D28 /* rct2.c */, - D442716C1CC81B3200D84D28 /* rct2.h */, - D433A5031E4A862F00D9A6DF /* rct12.h */, - D44271851CC81B3200D84D28 /* sprites.h */, - 656F6C8C1E45BFC200E0F770 /* Version.cpp */, - 656F6C8D1E45BFC200E0F770 /* Version.h */, + F76C87B41EC4E91500FA49E2 /* resources */, + F76C85801EC4E82600FA49E2 /* openrct2-ui */, + F76C857C1EC4E80E00FA49E2 /* openrct2-cli */, + F76C83551EC4E7CC00FA49E2 /* libopenrct2 */, ); name = Sources; path = src/openrct2; @@ -1613,456 +1962,6 @@ path = libxc; sourceTree = ""; }; - D42E33741E5C27D600D630AF /* config */ = { - isa = PBXGroup; - children = ( - D42E33751E5C27D600D630AF /* Config.cpp */, - D42E33761E5C27D600D630AF /* Config.h */, - D42E33771E5C27D600D630AF /* ConfigEnum.hpp */, - D42E33781E5C27D600D630AF /* IniReader.cpp */, - D42E33791E5C27D600D630AF /* IniReader.hpp */, - D42E337A1E5C27D600D630AF /* IniWriter.cpp */, - D42E337B1E5C27D600D630AF /* IniWriter.hpp */, - D42E337C1E5C27D600D630AF /* KeyboardShortcuts.cpp */, - ); - path = config; - sourceTree = ""; - }; - D43407BF1D0E14BE00C2B3D4 /* opengl */ = { - isa = PBXGroup; - children = ( - D43407C01D0E14BE00C2B3D4 /* CopyFramebufferShader.cpp */, - D43407C11D0E14BE00C2B3D4 /* CopyFramebufferShader.h */, - D43407C41D0E14BE00C2B3D4 /* DrawImageShader.cpp */, - D43407C51D0E14BE00C2B3D4 /* DrawImageShader.h */, - D43407C61D0E14BE00C2B3D4 /* DrawLineShader.cpp */, - D43407C71D0E14BE00C2B3D4 /* DrawLineShader.h */, - D43407C81D0E14BE00C2B3D4 /* FillRectShader.cpp */, - D43407C91D0E14BE00C2B3D4 /* FillRectShader.h */, - D43407CA1D0E14BE00C2B3D4 /* GLSLTypes.h */, - D43407CB1D0E14BE00C2B3D4 /* OpenGLAPI.cpp */, - D43407CC1D0E14BE00C2B3D4 /* OpenGLAPI.h */, - D43407CD1D0E14BE00C2B3D4 /* OpenGLDrawingEngine.cpp */, - D43407CE1D0E14BE00C2B3D4 /* OpenGLFramebuffer.cpp */, - D43407CF1D0E14BE00C2B3D4 /* OpenGLFramebuffer.h */, - D43407D01D0E14BE00C2B3D4 /* OpenGLShaderProgram.cpp */, - D43407D11D0E14BE00C2B3D4 /* OpenGLShaderProgram.h */, - D43407D21D0E14BE00C2B3D4 /* SwapFramebuffer.cpp */, - D43407D31D0E14BE00C2B3D4 /* SwapFramebuffer.h */, - D43407D41D0E14BE00C2B3D4 /* TextureCache.cpp */, - D43407D51D0E14BE00C2B3D4 /* TextureCache.h */, - ); - path = opengl; - sourceTree = ""; - }; - D44270CF1CC81B3200D84D28 /* audio */ = { - isa = PBXGroup; - children = ( - D464B3E11E4FBCC00003F3B5 /* audio.cpp */, - D44270D11CC81B3200D84D28 /* audio.h */, - C65A888B1E1B1148000368D7 /* AudioChannel.cpp */, - C65A888C1E1B1148000368D7 /* AudioChannel.h */, - C65A888D1E1B1148000368D7 /* AudioFormat.h */, - C647C68F1E1D0CA000C7FB21 /* AudioMixer.cpp */, - C647C6901E1D0CA000C7FB21 /* AudioMixer.h */, - C65A888E1E1B1148000368D7 /* AudioSource.h */, - C65A888F1E1B1148000368D7 /* FileAudioSource.cpp */, - C65A88901E1B1148000368D7 /* MemoryAudioSource.cpp */, - C65A88911E1B1148000368D7 /* NullAudioSource.cpp */, - ); - path = audio; - sourceTree = ""; - }; - D44270D61CC81B3200D84D28 /* cmdline */ = { - isa = PBXGroup; - children = ( - D44270D71CC81B3200D84D28 /* CommandLine.cpp */, - D44270D81CC81B3200D84D28 /* CommandLine.hpp */, - C650B21B1CCABC4400B4D91C /* ConvertCommand.cpp */, - D44270D91CC81B3200D84D28 /* RootCommands.cpp */, - D44270DA1CC81B3200D84D28 /* ScreenshotCommands.cpp */, - D44270DB1CC81B3200D84D28 /* SpriteCommands.cpp */, - C6EABCC31E719691008C09AB /* UriHandler.cpp */, - ); - path = cmdline; - sourceTree = ""; - }; - D44270E01CC81B3200D84D28 /* core */ = { - isa = PBXGroup; - children = ( - D44270E11CC81B3200D84D28 /* Console.cpp */, - D44270E21CC81B3200D84D28 /* Console.hpp */, - D44270E31CC81B3200D84D28 /* Diagnostics.cpp */, - D44270E41CC81B3200D84D28 /* Diagnostics.hpp */, - D44270E51CC81B3200D84D28 /* Exception.hpp */, - C6E96E101E04067A0076A04F /* File.cpp */, - C6E96E111E04067A0076A04F /* File.h */, - D437A2701DBC29B0001CB2CF /* FileScanner.cpp */, - D437A2711DBC29B0001CB2CF /* FileScanner.h */, - D44270E61CC81B3200D84D28 /* FileStream.hpp */, - D44270E71CC81B3200D84D28 /* Guard.cpp */, - D44270E81CC81B3200D84D28 /* Guard.hpp */, - D464FEBA1D31A65300CBABAC /* IStream.cpp */, - D44270EA1CC81B3200D84D28 /* IStream.hpp */, - D44270EB1CC81B3200D84D28 /* Json.cpp */, - D44270EC1CC81B3200D84D28 /* Json.hpp */, - D44270EE1CC81B3200D84D28 /* Math.hpp */, - D44270EF1CC81B3200D84D28 /* Memory.hpp */, - D464FEBC1D31A66E00CBABAC /* MemoryStream.cpp */, - D464FEBD1D31A66E00CBABAC /* MemoryStream.h */, - D44270F01CC81B3200D84D28 /* Path.cpp */, - D44270F11CC81B3200D84D28 /* Path.hpp */, - D44270F51CC81B3200D84D28 /* String.cpp */, - D44270F61CC81B3200D84D28 /* String.hpp */, - D44270F71CC81B3200D84D28 /* StringBuilder.hpp */, - D44270F81CC81B3200D84D28 /* StringReader.hpp */, - D44270F91CC81B3200D84D28 /* textinputbuffer.c */, - D44270FA1CC81B3200D84D28 /* textinputbuffer.h */, - D44270FB1CC81B3200D84D28 /* Util.hpp */, - C6E96E131E04069A0076A04F /* Zip.cpp */, - C6E96E141E04069A0076A04F /* Zip.h */, - ); - path = core; - sourceTree = ""; - }; - D44271001CC81B3200D84D28 /* drawing */ = { - isa = PBXGroup; - children = ( - D497667F1D03B9FE002222CD /* engines */, - D44271031CC81B3200D84D28 /* drawing_fast.cpp */, - D44271011CC81B3200D84D28 /* drawing.c */, - D44271021CC81B3200D84D28 /* drawing.h */, - D44271041CC81B3200D84D28 /* font.c */, - D44271051CC81B3200D84D28 /* font.h */, - D497668A1D03BAC8002222CD /* IDrawingContext.h */, - D497668B1D03BAC8002222CD /* IDrawingEngine.h */, - D464FEBF1D31A68800CBABAC /* Image.cpp */, - D4B21B6D1E343AF1004982C7 /* lightfx.c */, - D4B21B6E1E343AF1004982C7 /* lightfx.h */, - D44271061CC81B3200D84D28 /* line.c */, - D49766841D03BAA5002222CD /* NewDrawing.cpp */, - D49766851D03BAA5002222CD /* NewDrawing.h */, - D49766871D03BABB002222CD /* rain.cpp */, - D49766881D03BABB002222CD /* Rain.h */, - D44271081CC81B3200D84D28 /* rect.c */, - D44271091CC81B3200D84D28 /* scrolling_text.c */, - D49464771E4DB27B00DC690E /* sprite.cpp */, - D442710B1CC81B3200D84D28 /* string.c */, - ); - path = drawing; - sourceTree = ""; - }; - D44271181CC81B3200D84D28 /* interface */ = { - isa = PBXGroup; - children = ( - D44271191CC81B3200D84D28 /* chat.c */, - D442711A1CC81B3200D84D28 /* chat.h */, - D442711B1CC81B3200D84D28 /* colour.c */, - D442711C1CC81B3200D84D28 /* colour.h */, - D442711D1CC81B3200D84D28 /* console.c */, - D442711E1CC81B3200D84D28 /* console.h */, - D4F5B5EC1DAD8A4300AB6075 /* CursorData.cpp */, - D4F5B5ED1DAD8A4300AB6075 /* Cursors.cpp */, - D4F5B5EE1DAD8A4300AB6075 /* Cursors.h */, - D4469DAB1DEF84480039A779 /* Fonts.cpp */, - D4469DAC1DEF84480039A779 /* Fonts.h */, - D442711F1CC81B3200D84D28 /* graph.c */, - D44271201CC81B3200D84D28 /* graph.h */, - D44271211CC81B3200D84D28 /* keyboard_shortcut.c */, - D44271221CC81B3200D84D28 /* keyboard_shortcut.h */, - D44271231CC81B3200D84D28 /* screenshot.c */, - D44271241CC81B3200D84D28 /* screenshot.h */, - D44271251CC81B3200D84D28 /* Theme.cpp */, - D44271261CC81B3200D84D28 /* themes.h */, - D442712B1CC81B3200D84D28 /* viewport_interaction.c */, - D44271291CC81B3200D84D28 /* viewport.c */, - D442712A1CC81B3200D84D28 /* viewport.h */, - D442712C1CC81B3200D84D28 /* widget.c */, - D442712D1CC81B3200D84D28 /* widget.h */, - D442712E1CC81B3200D84D28 /* window.c */, - D442712F1CC81B3200D84D28 /* window.h */, - ); - path = interface; - sourceTree = ""; - }; - D44271321CC81B3200D84D28 /* localisation */ = { - isa = PBXGroup; - children = ( - D44271331CC81B3200D84D28 /* convert.c */, - D44271341CC81B3200D84D28 /* currency.c */, - D44271351CC81B3200D84D28 /* currency.h */, - D44271361CC81B3200D84D28 /* date.c */, - D44271371CC81B3200D84D28 /* date.h */, - C649B3D31DF04ED2008AC826 /* format_codes.c */, - D44271381CC81B3200D84D28 /* format_codes.h */, - D44271391CC81B3200D84D28 /* language.cpp */, - D442713A1CC81B3200D84D28 /* language.h */, - D442713B1CC81B3200D84D28 /* LanguagePack.cpp */, - D442713C1CC81B3200D84D28 /* LanguagePack.h */, - D442713D1CC81B3200D84D28 /* localisation.c */, - D442713E1CC81B3200D84D28 /* localisation.h */, - D442713F1CC81B3200D84D28 /* real_names.c */, - D44271401CC81B3200D84D28 /* string_ids.h */, - D44271411CC81B3200D84D28 /* user.c */, - D44271421CC81B3200D84D28 /* user.h */, - D44271431CC81B3200D84D28 /* utf8.c */, - ); - path = localisation; - sourceTree = ""; - }; - D44271441CC81B3200D84D28 /* management */ = { - isa = PBXGroup; - children = ( - D44271451CC81B3200D84D28 /* award.c */, - D44271461CC81B3200D84D28 /* award.h */, - D44271471CC81B3200D84D28 /* finance.c */, - D44271481CC81B3200D84D28 /* finance.h */, - D44271491CC81B3200D84D28 /* marketing.c */, - D442714A1CC81B3200D84D28 /* marketing.h */, - D442714B1CC81B3200D84D28 /* news_item.c */, - D442714C1CC81B3200D84D28 /* news_item.h */, - D442714D1CC81B3200D84D28 /* research.c */, - D442714E1CC81B3200D84D28 /* research.h */, - ); - path = management; - sourceTree = ""; - }; - D442714F1CC81B3200D84D28 /* network */ = { - isa = PBXGroup; - children = ( - D44271501CC81B3200D84D28 /* http.cpp */, - D44271511CC81B3200D84D28 /* http.h */, - D44271521CC81B3200D84D28 /* network.cpp */, - D44271531CC81B3200D84D28 /* network.h */, - 007A05C01CFB2C8B00F419C3 /* NetworkAction.cpp */, - 007A05C11CFB2C8B00F419C3 /* NetworkAction.h */, - 007A05C41CFB2C8B00F419C3 /* NetworkConnection.cpp */, - 007A05C51CFB2C8B00F419C3 /* NetworkConnection.h */, - 007A05C61CFB2C8B00F419C3 /* NetworkGroup.cpp */, - 007A05C71CFB2C8B00F419C3 /* NetworkGroup.h */, - 00EFEE701CF1D80B0035213B /* NetworkKey.cpp */, - 00EFEE711CF1D80B0035213B /* NetworkKey.h */, - 007A05C81CFB2C8B00F419C3 /* NetworkPacket.cpp */, - 007A05C91CFB2C8B00F419C3 /* NetworkPacket.h */, - 007A05CA1CFB2C8B00F419C3 /* NetworkPlayer.cpp */, - 007A05CB1CFB2C8B00F419C3 /* NetworkPlayer.h */, - 791166F91D7486EF005912EA /* NetworkServerAdvertiser.cpp */, - 791166FA1D7486EF005912EA /* NetworkServerAdvertiser.h */, - 007A05CC1CFB2C8B00F419C3 /* NetworkTypes.h */, - C61FB7221CF86356004CE991 /* NetworkUser.cpp */, - C61FB7231CF86356004CE991 /* NetworkUser.h */, - D464B3DE1E4FBC850003F3B5 /* ServerList.cpp */, - D464B3DF1E4FBC850003F3B5 /* ServerList.h */, - D48A8D811D00272F00649DA7 /* TcpSocket.cpp */, - D48A8D821D00272F00649DA7 /* TcpSocket.h */, - D44271541CC81B3200D84D28 /* twitch.cpp */, - D44271551CC81B3200D84D28 /* twitch.h */, - ); - path = network; - sourceTree = ""; - }; - D442715B1CC81B3200D84D28 /* peep */ = { - isa = PBXGroup; - children = ( - D46F2A9D1D39A25A00A36AB7 /* peep_data.c */, - D442715C1CC81B3200D84D28 /* peep.c */, - D442715D1CC81B3200D84D28 /* peep.h */, - D442715E1CC81B3200D84D28 /* staff.c */, - D442715F1CC81B3200D84D28 /* staff.h */, - ); - path = peep; - sourceTree = ""; - }; - D44271601CC81B3200D84D28 /* platform */ = { - isa = PBXGroup; - children = ( - D44271611CC81B3200D84D28 /* crash.cpp */, - D44271621CC81B3200D84D28 /* crash.h */, - D44271631CC81B3200D84D28 /* linux.c */, - D44271641CC81B3200D84D28 /* macos.m */, - D44271651CC81B3200D84D28 /* platform.h */, - D44271661CC81B3200D84D28 /* posix.c */, - D44271671CC81B3200D84D28 /* shared.c */, - D44271681CC81B3200D84D28 /* windows.c */, - ); - path = platform; - sourceTree = ""; - }; - D442716E1CC81B3200D84D28 /* ride */ = { - isa = PBXGroup; - children = ( - C686F8BA1CDBC3B7009F9BFC /* coaster */, - C686F8DB1CDBC3B7009F9BFC /* gentle */, - C686F8EC1CDBC3B7009F9BFC /* shops */, - C686F8F01CDBC3B7009F9BFC /* thrill */, - C686F8FC1CDBC3B7009F9BFC /* transport */, - C686F9021CDBC3B7009F9BFC /* water */, - D442716F1CC81B3200D84D28 /* cable_lift.c */, - D44271701CC81B3200D84D28 /* cable_lift.h */, - D44271731CC81B3200D84D28 /* ride_data.c */, - D44271741CC81B3200D84D28 /* ride_data.h */, - D44271751CC81B3200D84D28 /* ride_ratings.c */, - D44271761CC81B3200D84D28 /* ride_ratings.h */, - D44271711CC81B3200D84D28 /* ride.c */, - D44271721CC81B3200D84D28 /* ride.h */, - D44271771CC81B3200D84D28 /* station.c */, - D44271781CC81B3200D84D28 /* station.h */, - 8594C05F1D885CF600235E93 /* track_data_old.c */, - D442717B1CC81B3200D84D28 /* track_data.c */, - D442717C1CC81B3200D84D28 /* track_data.h */, - 008BF7271CDAA5C30019A2AD /* track_design_save.c */, - 008BF7281CDAA5C30019A2AD /* track_design.c */, - 008BF7291CDAA5C30019A2AD /* track_design.h */, - D442717D1CC81B3200D84D28 /* track_paint.c */, - D442717E1CC81B3200D84D28 /* track_paint.h */, - D44271791CC81B3200D84D28 /* track.c */, - D442717A1CC81B3200D84D28 /* track.h */, - D437A26D1DBC2937001CB2CF /* TrackDesignRepository.cpp */, - D437A26E1DBC2937001CB2CF /* TrackDesignRepository.h */, - C612A8971D64825300B634CA /* vehicle_data.c */, - C612A8981D64825300B634CA /* vehicle_data.h */, - C686F9561CDBC4C7009F9BFC /* vehicle_paint.c */, - C686F9571CDBC4C7009F9BFC /* vehicle_paint.h */, - D442717F1CC81B3200D84D28 /* vehicle.c */, - D44271801CC81B3200D84D28 /* vehicle.h */, - ); - path = ride; - sourceTree = ""; - }; - D44271881CC81B3200D84D28 /* util */ = { - isa = PBXGroup; - children = ( - D44271891CC81B3200D84D28 /* sawyercoding.c */, - D442718A1CC81B3200D84D28 /* sawyercoding.h */, - D442718B1CC81B3200D84D28 /* util.c */, - D442718C1CC81B3200D84D28 /* util.h */, - ); - path = util; - sourceTree = ""; - }; - D442718E1CC81B3200D84D28 /* windows */ = { - isa = PBXGroup; - children = ( - D442718F1CC81B3200D84D28 /* about.c */, - D44271901CC81B3200D84D28 /* banner.c */, - D44271911CC81B3200D84D28 /* changelog.c */, - D44271921CC81B3200D84D28 /* cheats.c */, - D44271931CC81B3200D84D28 /* clear_scenery.c */, - D45B202C1D1E92DB00B67CC7 /* custom_currency.c */, - C6575A361D46AFBA00C3E79F /* debug_paint.c */, - D44271941CC81B3200D84D28 /* demolish_ride_prompt.c */, - D44271951CC81B3200D84D28 /* dropdown.c */, - D44271961CC81B3200D84D28 /* dropdown.h */, - D44271971CC81B3200D84D28 /* editor_bottom_toolbar.c */, - D44271981CC81B3200D84D28 /* editor_inventions_list.c */, - D44271991CC81B3200D84D28 /* editor_main.c */, - D442719A1CC81B3200D84D28 /* editor_object_selection.c */, - D442719B1CC81B3200D84D28 /* editor_objective_options.c */, - D442719C1CC81B3200D84D28 /* editor_scenario_options.c */, - D442719D1CC81B3200D84D28 /* error.c */, - D442719E1CC81B3200D84D28 /* error.h */, - D442719F1CC81B3200D84D28 /* finances.c */, - D44271A01CC81B3200D84D28 /* footpath.c */, - D44271A11CC81B3200D84D28 /* game_bottom_toolbar.c */, - D44271A31CC81B3200D84D28 /* guest_list.c */, - D44271A21CC81B3200D84D28 /* guest.c */, - D44271A41CC81B3200D84D28 /* install_track.c */, - D44271A61CC81B3200D84D28 /* land_rights.c */, - D44271A51CC81B3200D84D28 /* land.c */, - D44271A71CC81B3200D84D28 /* loadsave.c */, - D44271A81CC81B3200D84D28 /* main.c */, - D44271AA1CC81B3200D84D28 /* map_tooltip.c */, - D44271A91CC81B3200D84D28 /* map.c */, - D44271AB1CC81B3200D84D28 /* mapgen.c */, - D44271AC1CC81B3200D84D28 /* maze_construction.c */, - D44271AD1CC81B3200D84D28 /* multiplayer.c */, - D44271AE1CC81B3200D84D28 /* music_credits.c */, - D44271AF1CC81B3200D84D28 /* network_status.c */, - D44271B01CC81B3200D84D28 /* new_campaign.c */, - D44271B11CC81B3200D84D28 /* new_ride.c */, - D44271B31CC81B3200D84D28 /* news_options.c */, - D44271B21CC81B3200D84D28 /* news.c */, - D44271B41CC81B3200D84D28 /* options.c */, - D44271B51CC81B3200D84D28 /* park.c */, - D44271B61CC81B3200D84D28 /* player.c */, - D44271B71CC81B3200D84D28 /* publisher_credits.c */, - D44271B81CC81B3200D84D28 /* research.c */, - D44271BA1CC81B3200D84D28 /* ride_construction.c */, - D44271BB1CC81B3200D84D28 /* ride_list.c */, - D44271B91CC81B3200D84D28 /* ride.c */, - D44271BC1CC81B3200D84D28 /* save_prompt.c */, - D44271BD1CC81B3200D84D28 /* scenery.c */, - C68B2CB41EB60DDE0020651C /* server_list.cpp */, - D44271BF1CC81B3200D84D28 /* server_start.c */, - D44271C01CC81B3200D84D28 /* shortcut_key_change.c */, - D44271C11CC81B3200D84D28 /* shortcut_keys.c */, - D44271C21CC81B3200D84D28 /* sign.c */, - D44271C41CC81B3200D84D28 /* staff_fire_prompt.c */, - D44271C51CC81B3200D84D28 /* staff_list.c */, - D44271C31CC81B3200D84D28 /* staff.c */, - D44271C61CC81B3200D84D28 /* text_input.c */, - D44271C71CC81B3200D84D28 /* themes.c */, - D44271C81CC81B3200D84D28 /* tile_inspector.c */, - D429FF3F1E36ABB3009342A6 /* tile_inspector.h */, - D44271C91CC81B3200D84D28 /* title_command_editor.c */, - D44271CA1CC81B3200D84D28 /* title_editor.c */, - D44271CB1CC81B3200D84D28 /* title_exit.c */, - D44271CC1CC81B3200D84D28 /* title_logo.c */, - D44271CD1CC81B3200D84D28 /* title_menu.c */, - D44271CE1CC81B3200D84D28 /* title_options.c */, - D44271CF1CC81B3200D84D28 /* title_scenarioselect.c */, - D44271D01CC81B3200D84D28 /* tooltip.c */, - D44271D11CC81B3200D84D28 /* tooltip.h */, - D44271D21CC81B3200D84D28 /* top_toolbar.c */, - D44271D31CC81B3200D84D28 /* track_list.c */, - D44271D41CC81B3200D84D28 /* track_manage.c */, - D44271D51CC81B3200D84D28 /* track_place.c */, - C6136C541E21893500F3ED2B /* view_clipping.c */, - D44271D61CC81B3200D84D28 /* viewport.c */, - D44271D71CC81B3200D84D28 /* water.c */, - ); - path = windows; - sourceTree = ""; - }; - D44271D81CC81B3200D84D28 /* world */ = { - isa = PBXGroup; - children = ( - A5D1DB5BE280897DCDEBFCED /* Duck.cpp */, - EC3C3FED9FA55B65F65D706F /* Climate.h */, - 242F470FE91956ACA4078F6A /* Climate.cpp */, - 437490DBD74ECF60C3363559 /* Balloon.cpp */, - DEEAE6E8AC49B6F288E69B40 /* banner.cpp */, - D44271DB1CC81B3200D84D28 /* banner.h */, - D48ABAB91E71EBD500A3E39C /* entrance.cpp */, - D44271DF1CC81B3200D84D28 /* entrance.h */, - D44271E01CC81B3200D84D28 /* footpath.c */, - D44271E11CC81B3200D84D28 /* footpath.h */, - D44D93AD1E92DD28004D6B77 /* Fountain.cpp */, - D44271E31CC81B3200D84D28 /* Fountain.h */, - D44271E61CC81B3200D84D28 /* map_animation.c */, - D44271E71CC81B3200D84D28 /* map_animation.h */, - D44271E81CC81B3200D84D28 /* map_helpers.c */, - D44271E91CC81B3200D84D28 /* map_helpers.h */, - D44271E41CC81B3200D84D28 /* map.c */, - D44271E51CC81B3200D84D28 /* map.h */, - D44271EA1CC81B3200D84D28 /* mapgen.c */, - D44271EB1CC81B3200D84D28 /* mapgen.h */, - D44271EC1CC81B3200D84D28 /* money_effect.c */, - D44271ED1CC81B3200D84D28 /* park.c */, - D44271EE1CC81B3200D84D28 /* park.h */, - D44271EF1CC81B3200D84D28 /* particle.c */, - D44271F01CC81B3200D84D28 /* scenery.c */, - D44271F11CC81B3200D84D28 /* scenery.h */, - D44271F21CC81B3200D84D28 /* sprite.c */, - D44271F31CC81B3200D84D28 /* sprite.h */, - D429FF401E36ABCD009342A6 /* tile_inspector.c */, - D429FF411E36ABCD009342A6 /* tile_inspector.h */, - D41FA8631E5EA1E200215624 /* wall.cpp */, - D44271F41CC81B3200D84D28 /* water.h */, - ); - path = world; - sourceTree = ""; - }; D45A38C61CF3007A00659A24 /* libpng16 */ = { isa = PBXGroup; children = ( @@ -2234,60 +2133,11 @@ path = speex; sourceTree = ""; }; - D464FEC11D31A6AA00CBABAC /* object */ = { - isa = PBXGroup; - children = ( - D464FEC21D31A6AA00CBABAC /* BannerObject.cpp */, - D464FEC31D31A6AA00CBABAC /* BannerObject.h */, - D464FEC41D31A6AA00CBABAC /* EntranceObject.cpp */, - D464FEC51D31A6AA00CBABAC /* EntranceObject.h */, - D464FEC61D31A6AA00CBABAC /* FootpathItemObject.cpp */, - D464FEC71D31A6AA00CBABAC /* FootpathItemObject.h */, - D464FEC81D31A6AA00CBABAC /* FootpathObject.cpp */, - D464FEC91D31A6AA00CBABAC /* FootpathObject.h */, - D464FECA1D31A6AA00CBABAC /* ImageTable.cpp */, - D464FECB1D31A6AA00CBABAC /* ImageTable.h */, - D464FECC1D31A6AA00CBABAC /* LargeSceneryObject.cpp */, - D464FECD1D31A6AA00CBABAC /* LargeSceneryObject.h */, - D464FECE1D31A6AA00CBABAC /* Object.cpp */, - D464FECF1D31A6AA00CBABAC /* Object.h */, - D464FED01D31A6AA00CBABAC /* ObjectFactory.cpp */, - D464FED11D31A6AA00CBABAC /* ObjectFactory.h */, - D464FED21D31A6AA00CBABAC /* ObjectManager.cpp */, - D464FED31D31A6AA00CBABAC /* ObjectManager.h */, - D464FED41D31A6AA00CBABAC /* ObjectRepository.cpp */, - D464FED51D31A6AA00CBABAC /* ObjectRepository.h */, - D464FED61D31A6AA00CBABAC /* RideObject.cpp */, - D464FED71D31A6AA00CBABAC /* RideObject.h */, - D464FED81D31A6AA00CBABAC /* SceneryGroupObject.cpp */, - D464FED91D31A6AA00CBABAC /* SceneryGroupObject.h */, - D464FEDA1D31A6AA00CBABAC /* SceneryObject.h */, - D464FEDB1D31A6AA00CBABAC /* SmallSceneryObject.cpp */, - D464FEDC1D31A6AA00CBABAC /* SmallSceneryObject.h */, - D464FEDD1D31A6AA00CBABAC /* StexObject.cpp */, - D464FEDE1D31A6AA00CBABAC /* StexObject.h */, - D464FEDF1D31A6AA00CBABAC /* StringTable.cpp */, - D464FEE01D31A6AA00CBABAC /* StringTable.h */, - D464FEE11D31A6AA00CBABAC /* WallObject.cpp */, - D464FEE21D31A6AA00CBABAC /* WallObject.h */, - D464FEE31D31A6AA00CBABAC /* WaterObject.cpp */, - D464FEE41D31A6AA00CBABAC /* WaterObject.h */, - ); - path = object; - sourceTree = ""; - }; - D497667F1D03B9FE002222CD /* engines */ = { - isa = PBXGroup; - children = ( - D43407BF1D0E14BE00C2B3D4 /* opengl */, - D49766811D03B9FE002222CD /* SoftwareDrawingEngine.cpp */, - ); - path = engines; - sourceTree = ""; - }; D497D06F1C20FD52002BF46A = { isa = PBXGroup; children = ( + F76C82A11EC4E50D00FA49E2 /* resource.h */, + F76C80A01EC4DD9400FA49E2 /* shaders */, D41B72431C21015A0080A7B9 /* Sources */, D497D07A1C20FD52002BF46A /* Resources */, 8546F74A1D7E1D220004004C /* Tests */, @@ -2302,6 +2152,7 @@ children = ( D497D0781C20FD52002BF46A /* OpenRCT2.app */, C64FDA5D1D6D99F400F259B9 /* PaintTest */, + F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */, ); name = Products; sourceTree = ""; @@ -2369,8 +2220,1063 @@ name = system; sourceTree = ""; }; + F76C83551EC4E7CC00FA49E2 /* libopenrct2 */ = { + isa = PBXGroup; + children = ( + F76C83561EC4E7CC00FA49E2 /* audio */, + F76C835F1EC4E7CC00FA49E2 /* cheats.c */, + F76C83601EC4E7CC00FA49E2 /* cheats.h */, + F76C83621EC4E7CC00FA49E2 /* cmdline */, + F76C836A1EC4E7CC00FA49E2 /* cmdline_sprite.c */, + F76C836B1EC4E7CC00FA49E2 /* cmdline_sprite.h */, + F76C836C1EC4E7CC00FA49E2 /* common.h */, + F76C836D1EC4E7CC00FA49E2 /* config */, + F76C83761EC4E7CC00FA49E2 /* Context.cpp */, + F76C83771EC4E7CC00FA49E2 /* Context.h */, + F76C83781EC4E7CC00FA49E2 /* core */, + F76C839B1EC4E7CC00FA49E2 /* diagnostic.c */, + F76C839C1EC4E7CC00FA49E2 /* diagnostic.h */, + F76C839D1EC4E7CC00FA49E2 /* drawing */, + F76C83B11EC4E7CC00FA49E2 /* editor.c */, + F76C83B21EC4E7CC00FA49E2 /* editor.h */, + F76C83B31EC4E7CC00FA49E2 /* FileClassifier.cpp */, + F76C83B41EC4E7CC00FA49E2 /* FileClassifier.h */, + F76C83B51EC4E7CC00FA49E2 /* game.c */, + F76C83B61EC4E7CC00FA49E2 /* game.h */, + F76C83B71EC4E7CC00FA49E2 /* Imaging.cpp */, + F76C83B81EC4E7CC00FA49E2 /* Imaging.h */, + F76C83B91EC4E7CC00FA49E2 /* input.c */, + F76C83BA1EC4E7CC00FA49E2 /* input.h */, + F76C83BB1EC4E7CC00FA49E2 /* interface */, + F76C83D41EC4E7CC00FA49E2 /* intro.c */, + F76C83D51EC4E7CC00FA49E2 /* intro.h */, + F76C83D71EC4E7CC00FA49E2 /* localisation */, + F76C83EA1EC4E7CC00FA49E2 /* management */, + F76C83F51EC4E7CC00FA49E2 /* network */, + F76C84111EC4E7CC00FA49E2 /* object */, + F76C84351EC4E7CC00FA49E2 /* object.h */, + F76C84361EC4E7CC00FA49E2 /* object_list.c */, + F76C84371EC4E7CC00FA49E2 /* object_list.h */, + F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */, + F76C84391EC4E7CC00FA49E2 /* OpenRCT2.h */, + F76C843A1EC4E7CC00FA49E2 /* paint */, + F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */, + F76C84521EC4E7CC00FA49E2 /* ParkImporter.h */, + F76C84531EC4E7CC00FA49E2 /* peep */, + F76C84591EC4E7CC00FA49E2 /* platform */, + F76C84641EC4E7CC00FA49E2 /* PlatformEnvironment.cpp */, + F76C84651EC4E7CC00FA49E2 /* PlatformEnvironment.h */, + F76C84661EC4E7CC00FA49E2 /* rct1 */, + F76C846A1EC4E7CC00FA49E2 /* rct1.c */, + F76C846B1EC4E7CC00FA49E2 /* rct1.h */, + F76C846C1EC4E7CC00FA49E2 /* rct12 */, + F76C84751EC4E7CC00FA49E2 /* rct12.h */, + F76C84761EC4E7CC00FA49E2 /* rct2 */, + F76C84801EC4E7CC00FA49E2 /* rct2.c */, + F76C84811EC4E7CC00FA49E2 /* rct2.h */, + F76C84831EC4E7CC00FA49E2 /* ride */, + F76C84F31EC4E7CD00FA49E2 /* scenario */, + F76C84FA1EC4E7CD00FA49E2 /* sprites.h */, + F76C84FB1EC4E7CD00FA49E2 /* title */, + F76C85041EC4E7CD00FA49E2 /* ui */, + F76C85061EC4E7CD00FA49E2 /* util */, + F76C850B1EC4E7CD00FA49E2 /* Version.cpp */, + F76C850C1EC4E7CD00FA49E2 /* Version.h */, + F76C850D1EC4E7CD00FA49E2 /* windows */, + F76C855B1EC4E7CD00FA49E2 /* world */, + ); + name = libopenrct2; + sourceTree = ""; + }; + F76C83561EC4E7CC00FA49E2 /* audio */ = { + isa = PBXGroup; + children = ( + F76C83571EC4E7CC00FA49E2 /* audio.cpp */, + F76C83581EC4E7CC00FA49E2 /* audio.h */, + F76C83591EC4E7CC00FA49E2 /* AudioChannel.h */, + F76C835A1EC4E7CC00FA49E2 /* AudioContext.h */, + F76C835B1EC4E7CC00FA49E2 /* AudioMixer.cpp */, + F76C835C1EC4E7CC00FA49E2 /* AudioMixer.h */, + F76C835D1EC4E7CC00FA49E2 /* AudioSource.h */, + F76C835E1EC4E7CC00FA49E2 /* NullAudioSource.cpp */, + ); + path = audio; + sourceTree = ""; + }; + F76C83621EC4E7CC00FA49E2 /* cmdline */ = { + isa = PBXGroup; + children = ( + F76C83631EC4E7CC00FA49E2 /* CommandLine.cpp */, + F76C83641EC4E7CC00FA49E2 /* CommandLine.hpp */, + F76C83651EC4E7CC00FA49E2 /* ConvertCommand.cpp */, + F76C83661EC4E7CC00FA49E2 /* RootCommands.cpp */, + F76C83671EC4E7CC00FA49E2 /* ScreenshotCommands.cpp */, + F76C83681EC4E7CC00FA49E2 /* SpriteCommands.cpp */, + F76C83691EC4E7CC00FA49E2 /* UriHandler.cpp */, + ); + path = cmdline; + sourceTree = ""; + }; + F76C836D1EC4E7CC00FA49E2 /* config */ = { + isa = PBXGroup; + children = ( + F76C836E1EC4E7CC00FA49E2 /* Config.cpp */, + F76C836F1EC4E7CC00FA49E2 /* Config.h */, + F76C83701EC4E7CC00FA49E2 /* ConfigEnum.hpp */, + F76C83711EC4E7CC00FA49E2 /* IniReader.cpp */, + F76C83721EC4E7CC00FA49E2 /* IniReader.hpp */, + F76C83731EC4E7CC00FA49E2 /* IniWriter.cpp */, + F76C83741EC4E7CC00FA49E2 /* IniWriter.hpp */, + F76C83751EC4E7CC00FA49E2 /* KeyboardShortcuts.cpp */, + ); + path = config; + sourceTree = ""; + }; + F76C83781EC4E7CC00FA49E2 /* core */ = { + isa = PBXGroup; + children = ( + F76C83791EC4E7CC00FA49E2 /* Collections.hpp */, + F76C837A1EC4E7CC00FA49E2 /* Console.cpp */, + F76C837B1EC4E7CC00FA49E2 /* Console.hpp */, + F76C837C1EC4E7CC00FA49E2 /* Diagnostics.cpp */, + F76C837D1EC4E7CC00FA49E2 /* Diagnostics.hpp */, + F76C837E1EC4E7CC00FA49E2 /* Exception.hpp */, + F76C837F1EC4E7CC00FA49E2 /* File.cpp */, + F76C83801EC4E7CC00FA49E2 /* File.h */, + F76C83811EC4E7CC00FA49E2 /* FileScanner.cpp */, + F76C83821EC4E7CC00FA49E2 /* FileScanner.h */, + F76C83831EC4E7CC00FA49E2 /* FileStream.hpp */, + F76C83841EC4E7CC00FA49E2 /* Guard.cpp */, + F76C83851EC4E7CC00FA49E2 /* Guard.hpp */, + F76C83861EC4E7CC00FA49E2 /* IStream.cpp */, + F76C83871EC4E7CC00FA49E2 /* IStream.hpp */, + F76C83881EC4E7CC00FA49E2 /* Json.cpp */, + F76C83891EC4E7CC00FA49E2 /* Json.hpp */, + F76C838A1EC4E7CC00FA49E2 /* Math.hpp */, + F76C838B1EC4E7CC00FA49E2 /* Memory.hpp */, + F76C838C1EC4E7CC00FA49E2 /* MemoryStream.cpp */, + F76C838D1EC4E7CC00FA49E2 /* MemoryStream.h */, + F76C838E1EC4E7CC00FA49E2 /* Nullable.hpp */, + F76C838F1EC4E7CC00FA49E2 /* Path.cpp */, + F76C83901EC4E7CC00FA49E2 /* Path.hpp */, + F76C83911EC4E7CC00FA49E2 /* Registration.hpp */, + F76C83921EC4E7CC00FA49E2 /* String.cpp */, + F76C83931EC4E7CC00FA49E2 /* String.hpp */, + F76C83941EC4E7CC00FA49E2 /* StringBuilder.hpp */, + F76C83951EC4E7CC00FA49E2 /* StringReader.hpp */, + F76C83961EC4E7CC00FA49E2 /* textinputbuffer.c */, + F76C83971EC4E7CC00FA49E2 /* textinputbuffer.h */, + F76C83981EC4E7CC00FA49E2 /* Util.hpp */, + F76C83991EC4E7CC00FA49E2 /* Zip.cpp */, + F76C839A1EC4E7CC00FA49E2 /* Zip.h */, + ); + path = core; + sourceTree = ""; + }; + F76C839D1EC4E7CC00FA49E2 /* drawing */ = { + isa = PBXGroup; + children = ( + F76C839E1EC4E7CC00FA49E2 /* drawing.c */, + F76C839F1EC4E7CC00FA49E2 /* drawing.h */, + F76C83A01EC4E7CC00FA49E2 /* drawing_fast.cpp */, + F76C83A11EC4E7CC00FA49E2 /* font.c */, + F76C83A21EC4E7CC00FA49E2 /* font.h */, + F76C83A31EC4E7CC00FA49E2 /* IDrawingContext.h */, + F76C83A41EC4E7CC00FA49E2 /* IDrawingEngine.h */, + F76C83A51EC4E7CC00FA49E2 /* Image.cpp */, + F76C83A61EC4E7CC00FA49E2 /* lightfx.c */, + F76C83A71EC4E7CC00FA49E2 /* lightfx.h */, + F76C83A81EC4E7CC00FA49E2 /* line.c */, + F76C83A91EC4E7CC00FA49E2 /* NewDrawing.cpp */, + F76C83AA1EC4E7CC00FA49E2 /* NewDrawing.h */, + F76C83AB1EC4E7CC00FA49E2 /* Rain.cpp */, + F76C83AC1EC4E7CC00FA49E2 /* Rain.h */, + F76C83AD1EC4E7CC00FA49E2 /* rect.c */, + F76C83AE1EC4E7CC00FA49E2 /* scrolling_text.c */, + F76C83AF1EC4E7CC00FA49E2 /* sprite.cpp */, + F76C83B01EC4E7CC00FA49E2 /* string.c */, + ); + path = drawing; + sourceTree = ""; + }; + F76C83BB1EC4E7CC00FA49E2 /* interface */ = { + isa = PBXGroup; + children = ( + F76C83BC1EC4E7CC00FA49E2 /* chat.c */, + F76C83BD1EC4E7CC00FA49E2 /* chat.h */, + F76C83BE1EC4E7CC00FA49E2 /* colour.c */, + F76C83BF1EC4E7CC00FA49E2 /* colour.h */, + F76C83C01EC4E7CC00FA49E2 /* console.c */, + F76C83C11EC4E7CC00FA49E2 /* console.h */, + F76C83C21EC4E7CC00FA49E2 /* Cursors.h */, + F76C83C31EC4E7CC00FA49E2 /* Fonts.cpp */, + F76C83C41EC4E7CC00FA49E2 /* Fonts.h */, + F76C83C51EC4E7CC00FA49E2 /* graph.c */, + F76C83C61EC4E7CC00FA49E2 /* graph.h */, + F76C83C71EC4E7CC00FA49E2 /* keyboard_shortcut.c */, + F76C83C81EC4E7CC00FA49E2 /* keyboard_shortcut.h */, + F76C83C91EC4E7CC00FA49E2 /* screenshot.c */, + F76C83CA1EC4E7CC00FA49E2 /* screenshot.h */, + F76C83CB1EC4E7CC00FA49E2 /* Theme.cpp */, + F76C83CC1EC4E7CC00FA49E2 /* themes.h */, + F76C83CD1EC4E7CC00FA49E2 /* viewport.c */, + F76C83CE1EC4E7CC00FA49E2 /* viewport.h */, + F76C83CF1EC4E7CC00FA49E2 /* viewport_interaction.c */, + F76C83D01EC4E7CC00FA49E2 /* widget.c */, + F76C83D11EC4E7CC00FA49E2 /* widget.h */, + F76C83D21EC4E7CC00FA49E2 /* window.c */, + F76C83D31EC4E7CC00FA49E2 /* window.h */, + ); + path = interface; + sourceTree = ""; + }; + F76C83D71EC4E7CC00FA49E2 /* localisation */ = { + isa = PBXGroup; + children = ( + F76C83D81EC4E7CC00FA49E2 /* convert.c */, + F76C83D91EC4E7CC00FA49E2 /* currency.c */, + F76C83DA1EC4E7CC00FA49E2 /* currency.h */, + F76C83DB1EC4E7CC00FA49E2 /* date.c */, + F76C83DC1EC4E7CC00FA49E2 /* date.h */, + F76C83DD1EC4E7CC00FA49E2 /* format_codes.c */, + F76C83DE1EC4E7CC00FA49E2 /* format_codes.h */, + F76C83DF1EC4E7CC00FA49E2 /* language.cpp */, + F76C83E01EC4E7CC00FA49E2 /* language.h */, + F76C83E11EC4E7CC00FA49E2 /* LanguagePack.cpp */, + F76C83E21EC4E7CC00FA49E2 /* LanguagePack.h */, + F76C83E31EC4E7CC00FA49E2 /* localisation.c */, + F76C83E41EC4E7CC00FA49E2 /* localisation.h */, + F76C83E51EC4E7CC00FA49E2 /* real_names.c */, + F76C83E61EC4E7CC00FA49E2 /* string_ids.h */, + F76C83E71EC4E7CC00FA49E2 /* user.c */, + F76C83E81EC4E7CC00FA49E2 /* user.h */, + F76C83E91EC4E7CC00FA49E2 /* utf8.c */, + ); + path = localisation; + sourceTree = ""; + }; + F76C83EA1EC4E7CC00FA49E2 /* management */ = { + isa = PBXGroup; + children = ( + F76C83EB1EC4E7CC00FA49E2 /* award.c */, + F76C83EC1EC4E7CC00FA49E2 /* award.h */, + F76C83ED1EC4E7CC00FA49E2 /* finance.c */, + F76C83EE1EC4E7CC00FA49E2 /* finance.h */, + F76C83EF1EC4E7CC00FA49E2 /* marketing.c */, + F76C83F01EC4E7CC00FA49E2 /* marketing.h */, + F76C83F11EC4E7CC00FA49E2 /* news_item.c */, + F76C83F21EC4E7CC00FA49E2 /* news_item.h */, + F76C83F31EC4E7CC00FA49E2 /* research.c */, + F76C83F41EC4E7CC00FA49E2 /* research.h */, + ); + path = management; + sourceTree = ""; + }; + F76C83F51EC4E7CC00FA49E2 /* network */ = { + isa = PBXGroup; + children = ( + F76C83F61EC4E7CC00FA49E2 /* http.cpp */, + F76C83F71EC4E7CC00FA49E2 /* http.h */, + F76C83F81EC4E7CC00FA49E2 /* network.cpp */, + F76C83F91EC4E7CC00FA49E2 /* network.h */, + F76C83FA1EC4E7CC00FA49E2 /* NetworkAction.cpp */, + F76C83FB1EC4E7CC00FA49E2 /* NetworkAction.h */, + F76C83FC1EC4E7CC00FA49E2 /* NetworkConnection.cpp */, + F76C83FD1EC4E7CC00FA49E2 /* NetworkConnection.h */, + F76C83FE1EC4E7CC00FA49E2 /* NetworkGroup.cpp */, + F76C83FF1EC4E7CC00FA49E2 /* NetworkGroup.h */, + F76C84001EC4E7CC00FA49E2 /* NetworkKey.cpp */, + F76C84011EC4E7CC00FA49E2 /* NetworkKey.h */, + F76C84021EC4E7CC00FA49E2 /* NetworkPacket.cpp */, + F76C84031EC4E7CC00FA49E2 /* NetworkPacket.h */, + F76C84041EC4E7CC00FA49E2 /* NetworkPlayer.cpp */, + F76C84051EC4E7CC00FA49E2 /* NetworkPlayer.h */, + F76C84061EC4E7CC00FA49E2 /* NetworkServerAdvertiser.cpp */, + F76C84071EC4E7CC00FA49E2 /* NetworkServerAdvertiser.h */, + F76C84081EC4E7CC00FA49E2 /* NetworkTypes.h */, + F76C84091EC4E7CC00FA49E2 /* NetworkUser.cpp */, + F76C840A1EC4E7CC00FA49E2 /* NetworkUser.h */, + F76C840B1EC4E7CC00FA49E2 /* ServerList.cpp */, + F76C840C1EC4E7CC00FA49E2 /* ServerList.h */, + F76C840D1EC4E7CC00FA49E2 /* TcpSocket.cpp */, + F76C840E1EC4E7CC00FA49E2 /* TcpSocket.h */, + F76C840F1EC4E7CC00FA49E2 /* twitch.cpp */, + F76C84101EC4E7CC00FA49E2 /* twitch.h */, + ); + path = network; + sourceTree = ""; + }; + F76C84111EC4E7CC00FA49E2 /* object */ = { + isa = PBXGroup; + children = ( + F76C84121EC4E7CC00FA49E2 /* BannerObject.cpp */, + F76C84131EC4E7CC00FA49E2 /* BannerObject.h */, + F76C84141EC4E7CC00FA49E2 /* EntranceObject.cpp */, + F76C84151EC4E7CC00FA49E2 /* EntranceObject.h */, + F76C84161EC4E7CC00FA49E2 /* FootpathItemObject.cpp */, + F76C84171EC4E7CC00FA49E2 /* FootpathItemObject.h */, + F76C84181EC4E7CC00FA49E2 /* FootpathObject.cpp */, + F76C84191EC4E7CC00FA49E2 /* FootpathObject.h */, + F76C841A1EC4E7CC00FA49E2 /* ImageTable.cpp */, + F76C841B1EC4E7CC00FA49E2 /* ImageTable.h */, + F76C841C1EC4E7CC00FA49E2 /* LargeSceneryObject.cpp */, + F76C841D1EC4E7CC00FA49E2 /* LargeSceneryObject.h */, + F76C841E1EC4E7CC00FA49E2 /* Object.cpp */, + F76C841F1EC4E7CC00FA49E2 /* Object.h */, + F76C84201EC4E7CC00FA49E2 /* ObjectFactory.cpp */, + F76C84211EC4E7CC00FA49E2 /* ObjectFactory.h */, + F76C84221EC4E7CC00FA49E2 /* ObjectManager.cpp */, + F76C84231EC4E7CC00FA49E2 /* ObjectManager.h */, + F76C84241EC4E7CC00FA49E2 /* ObjectRepository.cpp */, + F76C84251EC4E7CC00FA49E2 /* ObjectRepository.h */, + F76C84261EC4E7CC00FA49E2 /* RideObject.cpp */, + F76C84271EC4E7CC00FA49E2 /* RideObject.h */, + F76C84281EC4E7CC00FA49E2 /* SceneryGroupObject.cpp */, + F76C84291EC4E7CC00FA49E2 /* SceneryGroupObject.h */, + F76C842A1EC4E7CC00FA49E2 /* SceneryObject.h */, + F76C842B1EC4E7CC00FA49E2 /* SmallSceneryObject.cpp */, + F76C842C1EC4E7CC00FA49E2 /* SmallSceneryObject.h */, + F76C842D1EC4E7CC00FA49E2 /* StexObject.cpp */, + F76C842E1EC4E7CC00FA49E2 /* StexObject.h */, + F76C842F1EC4E7CC00FA49E2 /* StringTable.cpp */, + F76C84301EC4E7CC00FA49E2 /* StringTable.h */, + F76C84311EC4E7CC00FA49E2 /* WallObject.cpp */, + F76C84321EC4E7CC00FA49E2 /* WallObject.h */, + F76C84331EC4E7CC00FA49E2 /* WaterObject.cpp */, + F76C84341EC4E7CC00FA49E2 /* WaterObject.h */, + ); + path = object; + sourceTree = ""; + }; + F76C843A1EC4E7CC00FA49E2 /* paint */ = { + isa = PBXGroup; + children = ( + F76C843B1EC4E7CC00FA49E2 /* map_element */, + F76C84461EC4E7CC00FA49E2 /* paint.c */, + F76C84471EC4E7CC00FA49E2 /* paint.h */, + F76C84481EC4E7CC00FA49E2 /* paint_helpers.c */, + F76C84491EC4E7CC00FA49E2 /* sprite */, + F76C844F1EC4E7CC00FA49E2 /* supports.c */, + F76C84501EC4E7CC00FA49E2 /* supports.h */, + ); + path = paint; + sourceTree = ""; + }; + F76C843B1EC4E7CC00FA49E2 /* map_element */ = { + isa = PBXGroup; + children = ( + F76C843C1EC4E7CC00FA49E2 /* banner.c */, + F76C843D1EC4E7CC00FA49E2 /* entrance.c */, + F76C843E1EC4E7CC00FA49E2 /* fence.c */, + F76C843F1EC4E7CC00FA49E2 /* map_element.c */, + F76C84401EC4E7CC00FA49E2 /* map_element.h */, + F76C84411EC4E7CC00FA49E2 /* path.c */, + F76C84421EC4E7CC00FA49E2 /* scenery.c */, + F76C84431EC4E7CC00FA49E2 /* scenery_multiple.c */, + F76C84441EC4E7CC00FA49E2 /* surface.c */, + F76C84451EC4E7CC00FA49E2 /* surface.h */, + ); + path = map_element; + sourceTree = ""; + }; + F76C84491EC4E7CC00FA49E2 /* sprite */ = { + isa = PBXGroup; + children = ( + F76C844A1EC4E7CC00FA49E2 /* litter.c */, + F76C844B1EC4E7CC00FA49E2 /* misc.c */, + F76C844C1EC4E7CC00FA49E2 /* peep.c */, + F76C844D1EC4E7CC00FA49E2 /* sprite.c */, + F76C844E1EC4E7CC00FA49E2 /* sprite.h */, + ); + path = sprite; + sourceTree = ""; + }; + F76C84531EC4E7CC00FA49E2 /* peep */ = { + isa = PBXGroup; + children = ( + F76C84541EC4E7CC00FA49E2 /* peep.c */, + F76C84551EC4E7CC00FA49E2 /* peep.h */, + F76C84561EC4E7CC00FA49E2 /* peep_data.c */, + F76C84571EC4E7CC00FA49E2 /* staff.c */, + F76C84581EC4E7CC00FA49E2 /* staff.h */, + ); + path = peep; + sourceTree = ""; + }; + F76C84591EC4E7CC00FA49E2 /* platform */ = { + isa = PBXGroup; + children = ( + F76C845A1EC4E7CC00FA49E2 /* crash.cpp */, + F76C845B1EC4E7CC00FA49E2 /* crash.h */, + F76C845C1EC4E7CC00FA49E2 /* linux.c */, + F76C845D1EC4E7CC00FA49E2 /* macos.m */, + F76C845E1EC4E7CC00FA49E2 /* platform.h */, + F76C845F1EC4E7CC00FA49E2 /* Platform2.cpp */, + F76C84601EC4E7CC00FA49E2 /* Platform2.h */, + F76C84611EC4E7CC00FA49E2 /* posix.c */, + F76C84621EC4E7CC00FA49E2 /* shared.c */, + F76C84631EC4E7CC00FA49E2 /* windows.c */, + ); + path = platform; + sourceTree = ""; + }; + F76C84661EC4E7CC00FA49E2 /* rct1 */ = { + isa = PBXGroup; + children = ( + F76C84671EC4E7CC00FA49E2 /* S4Importer.cpp */, + F76C84681EC4E7CC00FA49E2 /* tables.cpp */, + F76C84691EC4E7CC00FA49E2 /* Tables.h */, + ); + path = rct1; + sourceTree = ""; + }; + F76C846C1EC4E7CC00FA49E2 /* rct12 */ = { + isa = PBXGroup; + children = ( + F76C846D1EC4E7CC00FA49E2 /* SawyerChunk.cpp */, + F76C846E1EC4E7CC00FA49E2 /* SawyerChunk.h */, + F76C846F1EC4E7CC00FA49E2 /* SawyerChunkReader.cpp */, + F76C84701EC4E7CC00FA49E2 /* SawyerChunkReader.h */, + F76C84711EC4E7CC00FA49E2 /* SawyerChunkWriter.cpp */, + F76C84721EC4E7CC00FA49E2 /* SawyerChunkWriter.h */, + F76C84731EC4E7CC00FA49E2 /* SawyerEncoding.cpp */, + F76C84741EC4E7CC00FA49E2 /* SawyerEncoding.h */, + ); + path = rct12; + sourceTree = ""; + }; + F76C84761EC4E7CC00FA49E2 /* rct2 */ = { + isa = PBXGroup; + children = ( + F76C84771EC4E7CC00FA49E2 /* addresses.c */, + F76C84781EC4E7CC00FA49E2 /* addresses.h */, + F76C84791EC4E7CC00FA49E2 /* hook.c */, + F76C847A1EC4E7CC00FA49E2 /* hook.h */, + F76C847B1EC4E7CC00FA49E2 /* interop.c */, + F76C847C1EC4E7CC00FA49E2 /* interop.h */, + F76C847D1EC4E7CC00FA49E2 /* S6Exporter.cpp */, + F76C847E1EC4E7CC00FA49E2 /* S6Exporter.h */, + F76C847F1EC4E7CC00FA49E2 /* S6Importer.cpp */, + ); + path = rct2; + sourceTree = ""; + }; + F76C84831EC4E7CC00FA49E2 /* ride */ = { + isa = PBXGroup; + children = ( + F76C84841EC4E7CC00FA49E2 /* cable_lift.c */, + F76C84851EC4E7CC00FA49E2 /* cable_lift.h */, + F76C84861EC4E7CC00FA49E2 /* coaster */, + F76C84A91EC4E7CC00FA49E2 /* gentle */, + F76C84BA1EC4E7CC00FA49E2 /* ride.c */, + F76C84BB1EC4E7CC00FA49E2 /* ride.h */, + F76C84BC1EC4E7CC00FA49E2 /* ride_data.c */, + F76C84BD1EC4E7CC00FA49E2 /* ride_data.h */, + F76C84BE1EC4E7CC00FA49E2 /* ride_ratings.c */, + F76C84BF1EC4E7CC00FA49E2 /* ride_ratings.h */, + F76C84C01EC4E7CC00FA49E2 /* shops */, + F76C84C41EC4E7CC00FA49E2 /* station.c */, + F76C84C51EC4E7CC00FA49E2 /* station.h */, + F76C84C61EC4E7CC00FA49E2 /* thrill */, + F76C84D21EC4E7CC00FA49E2 /* track.c */, + F76C84D31EC4E7CC00FA49E2 /* track.h */, + F76C84D41EC4E7CC00FA49E2 /* track_data.c */, + F76C84D51EC4E7CC00FA49E2 /* track_data.h */, + F76C84D61EC4E7CC00FA49E2 /* track_data_old.c */, + F76C84D71EC4E7CC00FA49E2 /* track_design.c */, + F76C84D81EC4E7CC00FA49E2 /* track_design.h */, + F76C84D91EC4E7CD00FA49E2 /* track_design_save.c */, + F76C84DA1EC4E7CD00FA49E2 /* track_paint.c */, + F76C84DB1EC4E7CD00FA49E2 /* track_paint.h */, + F76C84DC1EC4E7CD00FA49E2 /* TrackDesignRepository.cpp */, + F76C84DD1EC4E7CD00FA49E2 /* TrackDesignRepository.h */, + F76C84DE1EC4E7CD00FA49E2 /* transport */, + F76C84E41EC4E7CD00FA49E2 /* vehicle.c */, + F76C84E51EC4E7CD00FA49E2 /* vehicle.h */, + F76C84E61EC4E7CD00FA49E2 /* vehicle_data.c */, + F76C84E71EC4E7CD00FA49E2 /* vehicle_data.h */, + F76C84E81EC4E7CD00FA49E2 /* vehicle_paint.c */, + F76C84E91EC4E7CD00FA49E2 /* vehicle_paint.h */, + F76C84EA1EC4E7CD00FA49E2 /* water */, + ); + path = ride; + sourceTree = ""; + }; + F76C84861EC4E7CC00FA49E2 /* coaster */ = { + isa = PBXGroup; + children = ( + F76C84871EC4E7CC00FA49E2 /* air_powered_vertical_coaster.c */, + F76C84881EC4E7CC00FA49E2 /* bobsleigh_coaster.c */, + F76C84891EC4E7CC00FA49E2 /* bolliger_mabillard_track.c */, + F76C848A1EC4E7CC00FA49E2 /* bolliger_mabillard_track.h */, + F76C848B1EC4E7CC00FA49E2 /* compact_inverted_coaster.c */, + F76C848C1EC4E7CC00FA49E2 /* corkscrew_roller_coaster.c */, + F76C848D1EC4E7CC00FA49E2 /* flying_roller_coaster.c */, + F76C848E1EC4E7CC00FA49E2 /* giga_coaster.c */, + F76C848F1EC4E7CC00FA49E2 /* heartline_twister_coaster.c */, + F76C84901EC4E7CC00FA49E2 /* inverted_hairpin_coaster.c */, + F76C84911EC4E7CC00FA49E2 /* inverted_impulse_coaster.c */, + F76C84921EC4E7CC00FA49E2 /* inverted_roller_coaster.c */, + F76C84931EC4E7CC00FA49E2 /* junior_roller_coaster.c */, + F76C84941EC4E7CC00FA49E2 /* junior_roller_coaster.h */, + F76C84951EC4E7CC00FA49E2 /* lay_down_roller_coaster.c */, + F76C84961EC4E7CC00FA49E2 /* lim_launched_roller_coaster.c */, + F76C84971EC4E7CC00FA49E2 /* looping_roller_coaster.c */, + F76C84981EC4E7CC00FA49E2 /* mine_ride.c */, + F76C84991EC4E7CC00FA49E2 /* mine_train_coaster.c */, + F76C849A1EC4E7CC00FA49E2 /* mini_roller_coaster.c */, + F76C849B1EC4E7CC00FA49E2 /* mini_suspended_coaster.c */, + F76C849C1EC4E7CC00FA49E2 /* multi_dimension_roller_coaster.c */, + F76C849D1EC4E7CC00FA49E2 /* reverse_freefall_coaster.c */, + F76C849E1EC4E7CC00FA49E2 /* reverser_roller_coaster.c */, + F76C849F1EC4E7CC00FA49E2 /* side_friction_roller_coaster.c */, + F76C84A01EC4E7CC00FA49E2 /* stand_up_roller_coaster.c */, + F76C84A11EC4E7CC00FA49E2 /* steeplechase.c */, + F76C84A21EC4E7CC00FA49E2 /* suspended_swinging_coaster.c */, + F76C84A31EC4E7CC00FA49E2 /* twister_roller_coaster.c */, + F76C84A41EC4E7CC00FA49E2 /* vertical_drop_roller_coaster.c */, + F76C84A51EC4E7CC00FA49E2 /* virginia_reel.c */, + F76C84A61EC4E7CC00FA49E2 /* wild_mouse.c */, + F76C84A71EC4E7CC00FA49E2 /* wooden_roller_coaster.c */, + F76C84A81EC4E7CC00FA49E2 /* wooden_wild_mouse.c */, + ); + path = coaster; + sourceTree = ""; + }; + F76C84A91EC4E7CC00FA49E2 /* gentle */ = { + isa = PBXGroup; + children = ( + F76C84AA1EC4E7CC00FA49E2 /* car_ride.c */, + F76C84AB1EC4E7CC00FA49E2 /* circus_show.c */, + F76C84AC1EC4E7CC00FA49E2 /* crooked_house.c */, + F76C84AD1EC4E7CC00FA49E2 /* dodgems.c */, + F76C84AE1EC4E7CC00FA49E2 /* ferris_wheel.c */, + F76C84AF1EC4E7CC00FA49E2 /* flying_saucers.c */, + F76C84B01EC4E7CC00FA49E2 /* ghost_train.c */, + F76C84B11EC4E7CC00FA49E2 /* haunted_house.c */, + F76C84B21EC4E7CC00FA49E2 /* maze.c */, + F76C84B31EC4E7CC00FA49E2 /* merry_go_round.c */, + F76C84B41EC4E7CC00FA49E2 /* mini_golf.c */, + F76C84B51EC4E7CC00FA49E2 /* mini_helicopters.c */, + F76C84B61EC4E7CC00FA49E2 /* monorail_cycles.c */, + F76C84B71EC4E7CC00FA49E2 /* observation_tower.c */, + F76C84B81EC4E7CC00FA49E2 /* space_rings.c */, + F76C84B91EC4E7CC00FA49E2 /* spiral_slide.c */, + ); + path = gentle; + sourceTree = ""; + }; + F76C84C01EC4E7CC00FA49E2 /* shops */ = { + isa = PBXGroup; + children = ( + F76C84C11EC4E7CC00FA49E2 /* facility.c */, + F76C84C21EC4E7CC00FA49E2 /* misc.c */, + F76C84C31EC4E7CC00FA49E2 /* shop.c */, + ); + path = shops; + sourceTree = ""; + }; + F76C84C61EC4E7CC00FA49E2 /* thrill */ = { + isa = PBXGroup; + children = ( + F76C84C71EC4E7CC00FA49E2 /* 3d_cinema.c */, + F76C84C81EC4E7CC00FA49E2 /* enterprise.c */, + F76C84C91EC4E7CC00FA49E2 /* go_karts.c */, + F76C84CA1EC4E7CC00FA49E2 /* launched_freefall.c */, + F76C84CB1EC4E7CC00FA49E2 /* magic_carpet.c */, + F76C84CC1EC4E7CC00FA49E2 /* motion_simulator.c */, + F76C84CD1EC4E7CC00FA49E2 /* pirate_ship.c */, + F76C84CE1EC4E7CC00FA49E2 /* roto_drop.c */, + F76C84CF1EC4E7CC00FA49E2 /* swinging_inverter_ship.c */, + F76C84D01EC4E7CC00FA49E2 /* top_spin.c */, + F76C84D11EC4E7CC00FA49E2 /* twist.c */, + ); + path = thrill; + sourceTree = ""; + }; + F76C84DE1EC4E7CD00FA49E2 /* transport */ = { + isa = PBXGroup; + children = ( + F76C84DF1EC4E7CD00FA49E2 /* chairlift.c */, + F76C84E01EC4E7CD00FA49E2 /* lift.c */, + F76C84E11EC4E7CD00FA49E2 /* miniature_railway.c */, + F76C84E21EC4E7CD00FA49E2 /* monorail.c */, + F76C84E31EC4E7CD00FA49E2 /* suspended_monorail.c */, + ); + path = transport; + sourceTree = ""; + }; + F76C84EA1EC4E7CD00FA49E2 /* water */ = { + isa = PBXGroup; + children = ( + F76C84EB1EC4E7CD00FA49E2 /* boat_ride.c */, + F76C84EC1EC4E7CD00FA49E2 /* dingy_slide.c */, + F76C84ED1EC4E7CD00FA49E2 /* log_flume.c */, + F76C84EE1EC4E7CD00FA49E2 /* river_rafts.c */, + F76C84EF1EC4E7CD00FA49E2 /* river_rapids.c */, + F76C84F01EC4E7CD00FA49E2 /* splash_boats.c */, + F76C84F11EC4E7CD00FA49E2 /* submarine_ride.c */, + F76C84F21EC4E7CD00FA49E2 /* water_coaster.c */, + ); + path = water; + sourceTree = ""; + }; + F76C84F31EC4E7CD00FA49E2 /* scenario */ = { + isa = PBXGroup; + children = ( + F76C84F41EC4E7CD00FA49E2 /* scenario.c */, + F76C84F51EC4E7CD00FA49E2 /* scenario.h */, + F76C84F61EC4E7CD00FA49E2 /* ScenarioRepository.cpp */, + F76C84F71EC4E7CD00FA49E2 /* ScenarioRepository.h */, + F76C84F81EC4E7CD00FA49E2 /* ScenarioSources.cpp */, + F76C84F91EC4E7CD00FA49E2 /* ScenarioSources.h */, + ); + path = scenario; + sourceTree = ""; + }; + F76C84FB1EC4E7CD00FA49E2 /* title */ = { + isa = PBXGroup; + children = ( + F76C84FC1EC4E7CD00FA49E2 /* TitleScreen.cpp */, + F76C84FD1EC4E7CD00FA49E2 /* TitleScreen.h */, + F76C84FE1EC4E7CD00FA49E2 /* TitleSequence.cpp */, + F76C84FF1EC4E7CD00FA49E2 /* TitleSequence.h */, + F76C85001EC4E7CD00FA49E2 /* TitleSequenceManager.cpp */, + F76C85011EC4E7CD00FA49E2 /* TitleSequenceManager.h */, + F76C85021EC4E7CD00FA49E2 /* TitleSequencePlayer.cpp */, + F76C85031EC4E7CD00FA49E2 /* TitleSequencePlayer.h */, + ); + path = title; + sourceTree = ""; + }; + F76C85041EC4E7CD00FA49E2 /* ui */ = { + isa = PBXGroup; + children = ( + F76C85051EC4E7CD00FA49E2 /* UiContext.h */, + ); + path = ui; + sourceTree = ""; + }; + F76C85061EC4E7CD00FA49E2 /* util */ = { + isa = PBXGroup; + children = ( + F76C85071EC4E7CD00FA49E2 /* sawyercoding.c */, + F76C85081EC4E7CD00FA49E2 /* sawyercoding.h */, + F76C85091EC4E7CD00FA49E2 /* util.c */, + F76C850A1EC4E7CD00FA49E2 /* util.h */, + ); + path = util; + sourceTree = ""; + }; + F76C850D1EC4E7CD00FA49E2 /* windows */ = { + isa = PBXGroup; + children = ( + F76C850E1EC4E7CD00FA49E2 /* about.c */, + F76C850F1EC4E7CD00FA49E2 /* banner.c */, + F76C85101EC4E7CD00FA49E2 /* changelog.c */, + F76C85111EC4E7CD00FA49E2 /* cheats.c */, + F76C85121EC4E7CD00FA49E2 /* clear_scenery.c */, + F76C85131EC4E7CD00FA49E2 /* custom_currency.c */, + F76C85141EC4E7CD00FA49E2 /* debug_paint.c */, + F76C85151EC4E7CD00FA49E2 /* demolish_ride_prompt.c */, + F76C85161EC4E7CD00FA49E2 /* dropdown.c */, + F76C85171EC4E7CD00FA49E2 /* dropdown.h */, + F76C85181EC4E7CD00FA49E2 /* editor_bottom_toolbar.c */, + F76C85191EC4E7CD00FA49E2 /* editor_inventions_list.c */, + F76C851A1EC4E7CD00FA49E2 /* editor_main.c */, + F76C851B1EC4E7CD00FA49E2 /* editor_object_selection.c */, + F76C851C1EC4E7CD00FA49E2 /* editor_objective_options.c */, + F76C851D1EC4E7CD00FA49E2 /* editor_scenario_options.c */, + F76C851E1EC4E7CD00FA49E2 /* error.c */, + F76C851F1EC4E7CD00FA49E2 /* error.h */, + F76C85201EC4E7CD00FA49E2 /* finances.c */, + F76C85211EC4E7CD00FA49E2 /* footpath.c */, + F76C85221EC4E7CD00FA49E2 /* game_bottom_toolbar.c */, + F76C85231EC4E7CD00FA49E2 /* guest.c */, + F76C85241EC4E7CD00FA49E2 /* guest_list.c */, + F76C85251EC4E7CD00FA49E2 /* install_track.c */, + F76C85261EC4E7CD00FA49E2 /* land.c */, + F76C85271EC4E7CD00FA49E2 /* land_rights.c */, + F76C85281EC4E7CD00FA49E2 /* loadsave.c */, + F76C85291EC4E7CD00FA49E2 /* main.c */, + F76C852A1EC4E7CD00FA49E2 /* map.c */, + F76C852B1EC4E7CD00FA49E2 /* map_tooltip.c */, + F76C852C1EC4E7CD00FA49E2 /* mapgen.c */, + F76C852D1EC4E7CD00FA49E2 /* maze_construction.c */, + F76C852E1EC4E7CD00FA49E2 /* multiplayer.c */, + F76C852F1EC4E7CD00FA49E2 /* music_credits.c */, + F76C85301EC4E7CD00FA49E2 /* network_status.c */, + F76C85311EC4E7CD00FA49E2 /* new_campaign.c */, + F76C85321EC4E7CD00FA49E2 /* new_ride.c */, + F76C85331EC4E7CD00FA49E2 /* news.c */, + F76C85341EC4E7CD00FA49E2 /* news_options.c */, + F76C85351EC4E7CD00FA49E2 /* options.c */, + F76C85361EC4E7CD00FA49E2 /* park.c */, + F76C85371EC4E7CD00FA49E2 /* player.c */, + F76C85381EC4E7CD00FA49E2 /* publisher_credits.c */, + F76C85391EC4E7CD00FA49E2 /* research.c */, + F76C853A1EC4E7CD00FA49E2 /* ride.c */, + F76C853B1EC4E7CD00FA49E2 /* ride_construction.c */, + F76C853C1EC4E7CD00FA49E2 /* ride_list.c */, + F76C853D1EC4E7CD00FA49E2 /* save_prompt.c */, + F76C853E1EC4E7CD00FA49E2 /* scenery.c */, + F76C853F1EC4E7CD00FA49E2 /* server_list.cpp */, + F76C85401EC4E7CD00FA49E2 /* server_start.c */, + F76C85411EC4E7CD00FA49E2 /* shortcut_key_change.c */, + F76C85421EC4E7CD00FA49E2 /* shortcut_keys.c */, + F76C85431EC4E7CD00FA49E2 /* sign.c */, + F76C85441EC4E7CD00FA49E2 /* staff.c */, + F76C85451EC4E7CD00FA49E2 /* staff_fire_prompt.c */, + F76C85461EC4E7CD00FA49E2 /* staff_list.c */, + F76C85471EC4E7CD00FA49E2 /* text_input.c */, + F76C85481EC4E7CD00FA49E2 /* themes.c */, + F76C85491EC4E7CD00FA49E2 /* tile_inspector.c */, + F76C854A1EC4E7CD00FA49E2 /* tile_inspector.h */, + F76C854B1EC4E7CD00FA49E2 /* title_command_editor.c */, + F76C854C1EC4E7CD00FA49E2 /* title_editor.c */, + F76C854D1EC4E7CD00FA49E2 /* title_exit.c */, + F76C854E1EC4E7CD00FA49E2 /* title_logo.c */, + F76C854F1EC4E7CD00FA49E2 /* title_menu.c */, + F76C85501EC4E7CD00FA49E2 /* title_options.c */, + F76C85511EC4E7CD00FA49E2 /* title_scenarioselect.c */, + F76C85521EC4E7CD00FA49E2 /* tooltip.c */, + F76C85531EC4E7CD00FA49E2 /* tooltip.h */, + F76C85541EC4E7CD00FA49E2 /* top_toolbar.c */, + F76C85551EC4E7CD00FA49E2 /* track_list.c */, + F76C85561EC4E7CD00FA49E2 /* track_manage.c */, + F76C85571EC4E7CD00FA49E2 /* track_place.c */, + F76C85581EC4E7CD00FA49E2 /* view_clipping.c */, + F76C85591EC4E7CD00FA49E2 /* viewport.c */, + F76C855A1EC4E7CD00FA49E2 /* water.c */, + ); + path = windows; + sourceTree = ""; + }; + F76C855B1EC4E7CD00FA49E2 /* world */ = { + isa = PBXGroup; + children = ( + F76C855C1EC4E7CD00FA49E2 /* Balloon.cpp */, + F76C855D1EC4E7CD00FA49E2 /* banner.cpp */, + F76C855E1EC4E7CD00FA49E2 /* banner.h */, + F76C855F1EC4E7CD00FA49E2 /* Climate.cpp */, + F76C85601EC4E7CD00FA49E2 /* Climate.h */, + F76C85611EC4E7CD00FA49E2 /* Duck.cpp */, + F76C85621EC4E7CD00FA49E2 /* entrance.cpp */, + F76C85631EC4E7CD00FA49E2 /* entrance.h */, + F76C85641EC4E7CD00FA49E2 /* footpath.c */, + F76C85651EC4E7CD00FA49E2 /* footpath.h */, + F76C85661EC4E7CD00FA49E2 /* Fountain.cpp */, + F76C85671EC4E7CD00FA49E2 /* Fountain.h */, + F76C85681EC4E7CD00FA49E2 /* map.c */, + F76C85691EC4E7CD00FA49E2 /* map.h */, + F76C856A1EC4E7CD00FA49E2 /* map_animation.c */, + F76C856B1EC4E7CD00FA49E2 /* map_animation.h */, + F76C856C1EC4E7CD00FA49E2 /* map_helpers.c */, + F76C856D1EC4E7CD00FA49E2 /* map_helpers.h */, + F76C856E1EC4E7CD00FA49E2 /* mapgen.c */, + F76C856F1EC4E7CD00FA49E2 /* mapgen.h */, + F76C85701EC4E7CD00FA49E2 /* money_effect.c */, + F76C85711EC4E7CD00FA49E2 /* park.c */, + F76C85721EC4E7CD00FA49E2 /* park.h */, + F76C85731EC4E7CD00FA49E2 /* particle.c */, + F76C85741EC4E7CD00FA49E2 /* scenery.c */, + F76C85751EC4E7CD00FA49E2 /* scenery.h */, + F76C85761EC4E7CD00FA49E2 /* sprite.c */, + F76C85771EC4E7CD00FA49E2 /* sprite.h */, + F76C85781EC4E7CD00FA49E2 /* tile_inspector.c */, + F76C85791EC4E7CD00FA49E2 /* tile_inspector.h */, + F76C857A1EC4E7CD00FA49E2 /* wall.cpp */, + F76C857B1EC4E7CD00FA49E2 /* water.h */, + ); + path = world; + sourceTree = ""; + }; + F76C857C1EC4E80E00FA49E2 /* openrct2-cli */ = { + isa = PBXGroup; + children = ( + F76C857D1EC4E80E00FA49E2 /* Cli.cpp */, + ); + name = "openrct2-cli"; + path = "src/openrct2-cli"; + sourceTree = SOURCE_ROOT; + }; + F76C85801EC4E82600FA49E2 /* openrct2-ui */ = { + isa = PBXGroup; + children = ( + F76C85811EC4E82600FA49E2 /* audio */, + F76C858A1EC4E82600FA49E2 /* CursorData.cpp */, + F76C858B1EC4E82600FA49E2 /* CursorRepository.cpp */, + F76C858C1EC4E82600FA49E2 /* CursorRepository.h */, + F76C858D1EC4E82600FA49E2 /* drawing */, + F76C85A81EC4E82600FA49E2 /* SDLException.h */, + F76C85A91EC4E82600FA49E2 /* TextComposition.cpp */, + F76C85AA1EC4E82600FA49E2 /* TextComposition.h */, + F76C85AB1EC4E82600FA49E2 /* Ui.cpp */, + F76C85AC1EC4E82600FA49E2 /* UiContext.cpp */, + F76C85AD1EC4E82600FA49E2 /* UiContext.h */, + F76C85AE1EC4E82600FA49E2 /* UiContext.Linux.cpp */, + F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */, + F76C85AF1EC4E82600FA49E2 /* UiContext.Win32.cpp */, + ); + name = "openrct2-ui"; + path = "src/openrct2-ui"; + sourceTree = SOURCE_ROOT; + }; + F76C85811EC4E82600FA49E2 /* audio */ = { + isa = PBXGroup; + children = ( + F76C85821EC4E82600FA49E2 /* AudioChannel.cpp */, + F76C85831EC4E82600FA49E2 /* AudioContext.cpp */, + F76C85841EC4E82600FA49E2 /* AudioContext.h */, + F76C85851EC4E82600FA49E2 /* AudioFormat.h */, + F76C85861EC4E82600FA49E2 /* AudioMixer.cpp */, + F76C85871EC4E82600FA49E2 /* FileAudioSource.cpp */, + F76C85881EC4E82600FA49E2 /* MemoryAudioSource.cpp */, + ); + path = audio; + sourceTree = ""; + }; + F76C858D1EC4E82600FA49E2 /* drawing */ = { + isa = PBXGroup; + children = ( + F76C858E1EC4E82600FA49E2 /* engines */, + ); + path = drawing; + sourceTree = ""; + }; + F76C858E1EC4E82600FA49E2 /* engines */ = { + isa = PBXGroup; + children = ( + F76C858F1EC4E82600FA49E2 /* DrawingEngines.h */, + F76C85901EC4E82600FA49E2 /* opengl */, + F76C85A61EC4E82600FA49E2 /* SoftwareDrawingEngine.cpp */, + ); + path = engines; + sourceTree = ""; + }; + F76C85901EC4E82600FA49E2 /* opengl */ = { + isa = PBXGroup; + children = ( + F76C85911EC4E82600FA49E2 /* CopyFramebufferShader.cpp */, + F76C85921EC4E82600FA49E2 /* CopyFramebufferShader.h */, + F76C85931EC4E82600FA49E2 /* DrawCommands.h */, + F76C85941EC4E82600FA49E2 /* DrawImageShader.cpp */, + F76C85951EC4E82600FA49E2 /* DrawImageShader.h */, + F76C85961EC4E82600FA49E2 /* DrawLineShader.cpp */, + F76C85971EC4E82600FA49E2 /* DrawLineShader.h */, + F76C85981EC4E82600FA49E2 /* FillRectShader.cpp */, + F76C85991EC4E82600FA49E2 /* FillRectShader.h */, + F76C859A1EC4E82600FA49E2 /* GLSLTypes.h */, + F76C859B1EC4E82600FA49E2 /* OpenGLAPI.cpp */, + F76C859C1EC4E82600FA49E2 /* OpenGLAPI.h */, + F76C859D1EC4E82600FA49E2 /* OpenGLDrawingEngine.cpp */, + F76C859E1EC4E82600FA49E2 /* OpenGLFramebuffer.cpp */, + F76C859F1EC4E82600FA49E2 /* OpenGLFramebuffer.h */, + F76C85A01EC4E82600FA49E2 /* OpenGLShaderProgram.cpp */, + F76C85A11EC4E82600FA49E2 /* OpenGLShaderProgram.h */, + F76C85A21EC4E82600FA49E2 /* SwapFramebuffer.cpp */, + F76C85A31EC4E82600FA49E2 /* SwapFramebuffer.h */, + F76C85A41EC4E82600FA49E2 /* TextureCache.cpp */, + F76C85A51EC4E82600FA49E2 /* TextureCache.h */, + ); + path = opengl; + sourceTree = ""; + }; + F76C87B41EC4E91500FA49E2 /* resources */ = { + isa = PBXGroup; + children = ( + F76C87B51EC4E91500FA49E2 /* g2 */, + F76C881B1EC4E91600FA49E2 /* logo */, + F76C882B1EC4E91600FA49E2 /* OpenRCT2.rc */, + F76C882C1EC4E91600FA49E2 /* resource.h */, + ); + path = resources; + sourceTree = SOURCE_ROOT; + }; + F76C87B51EC4E91500FA49E2 /* g2 */ = { + isa = PBXGroup; + children = ( + F76C87B61EC4E91500FA49E2 /* 7.png */, + F76C87B71EC4E91500FA49E2 /* empty.png */, + F76C87B81EC4E91500FA49E2 /* icons */, + F76C87E31EC4E91500FA49E2 /* logo.png */, + F76C87E41EC4E91500FA49E2 /* logo_text.png */, + F76C87E51EC4E91500FA49E2 /* sprites.json */, + F76C87E61EC4E91500FA49E2 /* track */, + ); + path = g2; + sourceTree = ""; + }; + F76C87B81EC4E91500FA49E2 /* icons */ = { + isa = PBXGroup; + children = ( + F76C87B91EC4E91500FA49E2 /* 29.png */, + F76C87BA1EC4E91500FA49E2 /* 30.png */, + F76C87BB1EC4E91500FA49E2 /* 31.png */, + F76C87BC1EC4E91500FA49E2 /* 32.png */, + F76C87BD1EC4E91500FA49E2 /* 58.png */, + F76C87BE1EC4E91500FA49E2 /* cheats.png */, + F76C87BF1EC4E91500FA49E2 /* copy.png */, + F76C87C01EC4E91500FA49E2 /* fast_forward.png */, + F76C87C11EC4E91500FA49E2 /* game_speed_indicator.png */, + F76C87C21EC4E91500FA49E2 /* game_speed_indicator_double.png */, + F76C87C31EC4E91500FA49E2 /* large_scenery.png */, + F76C87C41EC4E91500FA49E2 /* map_gen_land.png */, + F76C87C51EC4E91500FA49E2 /* map_gen_noise.png */, + F76C87C61EC4E91500FA49E2 /* map_gen_trees.png */, + F76C87C71EC4E91500FA49E2 /* multiplayer.png */, + F76C87C81EC4E91500FA49E2 /* mute.png */, + F76C87C91EC4E91500FA49E2 /* mute_pressed.png */, + F76C87CA1EC4E91500FA49E2 /* paste.png */, + F76C87CB1EC4E91500FA49E2 /* paths.png */, + F76C87CC1EC4E91500FA49E2 /* rct1_close_off.png */, + F76C87CD1EC4E91500FA49E2 /* rct1_close_off_pressed.png */, + F76C87CE1EC4E91500FA49E2 /* rct1_close_on.png */, + F76C87CF1EC4E91500FA49E2 /* rct1_close_on_pressed.png */, + F76C87D01EC4E91500FA49E2 /* rct1_open_off.png */, + F76C87D11EC4E91500FA49E2 /* rct1_open_off_pressed.png */, + F76C87D21EC4E91500FA49E2 /* rct1_open_on.png */, + F76C87D31EC4E91500FA49E2 /* rct1_open_on_pressed.png */, + F76C87D41EC4E91500FA49E2 /* rct1_test_off.png */, + F76C87D51EC4E91500FA49E2 /* rct1_test_off_pressed.png */, + F76C87D61EC4E91500FA49E2 /* rct1_test_on.png */, + F76C87D71EC4E91500FA49E2 /* rct1_test_on_pressed.png */, + F76C87D81EC4E91500FA49E2 /* server_password.png */, + F76C87D91EC4E91500FA49E2 /* small_scenery.png */, + F76C87DA1EC4E91500FA49E2 /* sort.png */, + F76C87DB1EC4E91500FA49E2 /* tab_disabled.png */, + F76C87DC1EC4E91500FA49E2 /* twitch.png */, + F76C87DD1EC4E91500FA49E2 /* unmute.png */, + F76C87DE1EC4E91500FA49E2 /* unmute_pressed.png */, + F76C87DF1EC4E91500FA49E2 /* zoom_in.png */, + F76C87E01EC4E91500FA49E2 /* zoom_in_background.png */, + F76C87E11EC4E91500FA49E2 /* zoom_out.png */, + F76C87E21EC4E91500FA49E2 /* zoom_out_background.png */, + ); + path = icons; + sourceTree = ""; + }; + F76C87E61EC4E91500FA49E2 /* track */ = { + isa = PBXGroup; + children = ( + F76C87E71EC4E91500FA49E2 /* bm */, + F76C87EA1EC4E91500FA49E2 /* intamin */, + F76C87ED1EC4E91500FA49E2 /* junior */, + F76C88181EC4E91600FA49E2 /* mini */, + ); + path = track; + sourceTree = ""; + }; + F76C87E71EC4E91500FA49E2 /* bm */ = { + isa = PBXGroup; + children = ( + F76C87E81EC4E91500FA49E2 /* booster_1.png */, + F76C87E91EC4E91500FA49E2 /* booster_2.png */, + ); + path = bm; + sourceTree = ""; + }; + F76C87EA1EC4E91500FA49E2 /* intamin */ = { + isa = PBXGroup; + children = ( + F76C87EB1EC4E91500FA49E2 /* booster_1.png */, + F76C87EC1EC4E91500FA49E2 /* booster_2.png */, + ); + path = intamin; + sourceTree = ""; + }; + F76C87ED1EC4E91500FA49E2 /* junior */ = { + isa = PBXGroup; + children = ( + F76C87EE1EC4E91500FA49E2 /* booster_1.png */, + F76C87EF1EC4E91500FA49E2 /* booster_2.png */, + F76C87F01EC4E91500FA49E2 /* flat_to_steep_1.png */, + F76C87F11EC4E91500FA49E2 /* flat_to_steep_2_1.png */, + F76C87F21EC4E91500FA49E2 /* flat_to_steep_2_2.png */, + F76C87F31EC4E91500FA49E2 /* flat_to_steep_3_1.png */, + F76C87F41EC4E91500FA49E2 /* flat_to_steep_3_2.png */, + F76C87F51EC4E91500FA49E2 /* flat_to_steep_4.png */, + F76C87F61EC4E91500FA49E2 /* flat_to_steep_diagonal_1.png */, + F76C87F71EC4E91500FA49E2 /* flat_to_steep_diagonal_2.png */, + F76C87F81EC4E91500FA49E2 /* flat_to_steep_diagonal_3.png */, + F76C87F91EC4E91500FA49E2 /* flat_to_steep_diagonal_4.png */, + F76C87FA1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_1.png */, + F76C87FB1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_2.png */, + F76C87FC1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_3.png */, + F76C87FD1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_4.png */, + F76C87FE1EC4E91500FA49E2 /* flat_to_steep_lift_1.png */, + F76C87FF1EC4E91500FA49E2 /* flat_to_steep_lift_2_1.png */, + F76C88001EC4E91500FA49E2 /* flat_to_steep_lift_2_2.png */, + F76C88011EC4E91500FA49E2 /* flat_to_steep_lift_3_1.png */, + F76C88021EC4E91500FA49E2 /* flat_to_steep_lift_3_2.png */, + F76C88031EC4E91500FA49E2 /* flat_to_steep_lift_4.png */, + F76C88041EC4E91500FA49E2 /* steep_to_flat_1.png */, + F76C88051EC4E91600FA49E2 /* steep_to_flat_2_1.png */, + F76C88061EC4E91600FA49E2 /* steep_to_flat_2_2.png */, + F76C88071EC4E91600FA49E2 /* steep_to_flat_3_1.png */, + F76C88081EC4E91600FA49E2 /* steep_to_flat_3_2.png */, + F76C88091EC4E91600FA49E2 /* steep_to_flat_4.png */, + F76C880A1EC4E91600FA49E2 /* steep_to_flat_diagonal_1.png */, + F76C880B1EC4E91600FA49E2 /* steep_to_flat_diagonal_2.png */, + F76C880C1EC4E91600FA49E2 /* steep_to_flat_diagonal_3.png */, + F76C880D1EC4E91600FA49E2 /* steep_to_flat_diagonal_4.png */, + F76C880E1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_1.png */, + F76C880F1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_2.png */, + F76C88101EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_3.png */, + F76C88111EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_4.png */, + F76C88121EC4E91600FA49E2 /* steep_to_flat_lift_1.png */, + F76C88131EC4E91600FA49E2 /* steep_to_flat_lift_2_1.png */, + F76C88141EC4E91600FA49E2 /* steep_to_flat_lift_2_2.png */, + F76C88151EC4E91600FA49E2 /* steep_to_flat_lift_3_1.png */, + F76C88161EC4E91600FA49E2 /* steep_to_flat_lift_3_2.png */, + F76C88171EC4E91600FA49E2 /* steep_to_flat_lift_4.png */, + ); + path = junior; + sourceTree = ""; + }; + F76C88181EC4E91600FA49E2 /* mini */ = { + isa = PBXGroup; + children = ( + F76C88191EC4E91600FA49E2 /* booster_1.png */, + F76C881A1EC4E91600FA49E2 /* booster_2.png */, + ); + path = mini; + sourceTree = ""; + }; + F76C881B1EC4E91600FA49E2 /* logo */ = { + isa = PBXGroup; + children = ( + F76C881C1EC4E91600FA49E2 /* icon.ico */, + F76C881D1EC4E91600FA49E2 /* icon_flag.svg */, + F76C881E1EC4E91600FA49E2 /* icon_noflag.svg */, + F76C881F1EC4E91600FA49E2 /* icon_x1024.png */, + F76C88201EC4E91600FA49E2 /* icon_x128.png */, + F76C88211EC4E91600FA49E2 /* icon_x16.png */, + F76C88221EC4E91600FA49E2 /* icon_x2048.png */, + F76C88231EC4E91600FA49E2 /* icon_x256.png */, + F76C88241EC4E91600FA49E2 /* icon_x32.png */, + F76C88251EC4E91600FA49E2 /* icon_x4.png */, + F76C88261EC4E91600FA49E2 /* icon_x40.png */, + F76C88271EC4E91600FA49E2 /* icon_x512.png */, + F76C88281EC4E91600FA49E2 /* icon_x64.png */, + F76C88291EC4E91600FA49E2 /* icon_x8.png */, + F76C882A1EC4E91600FA49E2 /* makeico.linq */, + ); + path = logo; + sourceTree = ""; + }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + F76C80981EC4D9FA00FA49E2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ C64FDA5C1D6D99F400F259B9 /* PaintTest */ = { isa = PBXNativeTarget; @@ -2407,12 +3313,32 @@ buildRules = ( ); dependencies = ( + F76C88901EC5325700FA49E2 /* PBXTargetDependency */, ); name = OpenRCT2; productName = OpenRCT2; productReference = D497D0781C20FD52002BF46A /* OpenRCT2.app */; productType = "com.apple.product-type.application"; }; + F76C80991EC4D9FA00FA49E2 /* libopenrct2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = F76C809D1EC4D9FA00FA49E2 /* Build configuration list for PBXNativeTarget "libopenrct2" */; + buildPhases = ( + F76C809E1EC4DAAB00FA49E2 /* Download Libraries */, + F76C809F1EC4DB0300FA49E2 /* Get Git Variables */, + F76C80961EC4D9FA00FA49E2 /* Sources */, + F76C88381EC4EB5900FA49E2 /* Resources */, + F76C80981EC4D9FA00FA49E2 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libopenrct2; + productName = libopenrct2; + productReference = F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */; + productType = "com.apple.product-type.library.static"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -2428,6 +3354,10 @@ D497D0771C20FD52002BF46A = { CreatedOnToolsVersion = 7.2; }; + F76C80991EC4D9FA00FA49E2 = { + CreatedOnToolsVersion = 8.3.2; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = D497D0731C20FD52002BF46A /* Build configuration list for PBXProject "OpenRCT2" */; @@ -2445,6 +3375,7 @@ targets = ( D497D0771C20FD52002BF46A /* OpenRCT2 */, C64FDA5C1D6D99F400F259B9 /* PaintTest */, + F76C80991EC4D9FA00FA49E2 /* libopenrct2 */, ); }; /* End PBXProject section */ @@ -2462,6 +3393,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F76C88381EC4EB5900FA49E2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -2573,6 +3511,36 @@ shellPath = /bin/sh; shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\n if [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\n mkdir \"${SRCROOT}/libxc\"\n\n curl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\n unzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\n rm \"${SRCROOT}/libxc/$zipname\"\n\n echo $version > \"${SRCROOT}/libversion\"\nfi"; }; + F76C809E1EC4DAAB00FA49E2 /* Download Libraries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Download Libraries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi"; + }; + F76C809F1EC4DB0300FA49E2 /* Get Git Variables */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Get Git Variables"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/gitversion.h", + "$(DERIVED_FILE_DIR)/Info.plist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"#define\" OPENRCT2_BRANCH \\\"$(git rev-parse --abbrev-ref HEAD)\\\" > \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1 \\\"$(git rev-parse HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1_SHORT \\\"$(git rev-parse --short HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\ncp \"${SRCROOT}/distribution/macos/Info.plist\" \"${DERIVED_FILE_DIR}/Info.plist\"\nplutil -replace CFBundleVersion -string \"$(git rev-parse --short HEAD)\" \"${DERIVED_FILE_DIR}/Info.plist\""; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -2580,68 +3548,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C6CABA7F1E13F14F00D33A6B /* addresses.c in Sources */, - C6CABA7E1E13F11C00D33A6B /* hook.c in Sources */, - C64FDAC31D6DA41000F259B9 /* track_paint.c in Sources */, - C64FDAC21D6DA0B800F259B9 /* diagnostic.c in Sources */, - C64FDAC01D6D9E3B00F259B9 /* track_data.c in Sources */, - C64FDABF1D6D9CEA00F259B9 /* map_element.c in Sources */, - C64FDABE1D6D9CD900F259B9 /* ride_data.c in Sources */, C606CCD21DB4D7C800FE4015 /* SideTunnelCall.cpp in Sources */, - C64FDA641D6D9A2100F259B9 /* air_powered_vertical_coaster.c in Sources */, C606CCD51DB4DD6C00FE4015 /* VerticalTunnelCall.cpp in Sources */, - C64FDA651D6D9A2100F259B9 /* bobsleigh_coaster.c in Sources */, - C64FDA661D6D9A2100F259B9 /* compact_inverted_coaster.c in Sources */, - C64FDA671D6D9A2100F259B9 /* corkscrew_roller_coaster.c in Sources */, - C64FDA681D6D9A2100F259B9 /* flying_roller_coaster.c in Sources */, - C64FDA691D6D9A2100F259B9 /* giga_coaster.c in Sources */, - C64FDA6A1D6D9A2100F259B9 /* heartline_twister_coaster.c in Sources */, - C64FDA6B1D6D9A2100F259B9 /* inverted_hairpin_coaster.c in Sources */, - C64FDA6C1D6D9A2100F259B9 /* inverted_impulse_coaster.c in Sources */, - C64FDA6D1D6D9A2100F259B9 /* inverted_roller_coaster.c in Sources */, - C64FDA6E1D6D9A2100F259B9 /* junior_roller_coaster.c in Sources */, C606CCCF1DB427A000FE4015 /* SegmentSupportHeightCall.cpp in Sources */, - C64FDA6F1D6D9A2100F259B9 /* lay_down_roller_coaster.c in Sources */, - C64FDA701D6D9A2100F259B9 /* lim_launched_roller_coaster.c in Sources */, - C64FDA711D6D9A2100F259B9 /* looping_roller_coaster.c in Sources */, - C64FDA721D6D9A2100F259B9 /* mine_ride.c in Sources */, - C64FDA731D6D9A2100F259B9 /* mine_train_coaster.c in Sources */, - C64FDA741D6D9A2100F259B9 /* mini_roller_coaster.c in Sources */, - C64FDA751D6D9A2100F259B9 /* mini_suspended_coaster.c in Sources */, - C64FDA761D6D9A2100F259B9 /* multi_dimension_roller_coaster.c in Sources */, - C64FDA771D6D9A2100F259B9 /* reverse_freefall_coaster.c in Sources */, C606CCBE1DB4054000FE4015 /* compat.c in Sources */, - C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */, - C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */, - C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */, C606CCC61DB4054000FE4015 /* Printer.cpp in Sources */, - C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */, - C64FDA7D1D6D9A2100F259B9 /* suspended_swinging_coaster.c in Sources */, - C64FDA7E1D6D9A2100F259B9 /* twister_roller_coaster.c in Sources */, - C64FDA7F1D6D9A2100F259B9 /* vertical_drop_roller_coaster.c in Sources */, - C64FDA801D6D9A2100F259B9 /* virginia_reel.c in Sources */, - C64FDA811D6D9A2100F259B9 /* wild_mouse.c in Sources */, C606CCC41DB4054000FE4015 /* main.cpp in Sources */, - C64FDA821D6D9A2100F259B9 /* wooden_roller_coaster.c in Sources */, - C64FDA831D6D9A2100F259B9 /* wooden_wild_mouse.c in Sources */, - C64FDA841D6D9A2100F259B9 /* car_ride.c in Sources */, - C64FDA851D6D9A2100F259B9 /* circus_show.c in Sources */, - C64FDA861D6D9A2100F259B9 /* crooked_house.c in Sources */, - 85060FD31D8C17CC00DFA2B3 /* track_data_old.c in Sources */, - C64FDA871D6D9A2100F259B9 /* dodgems.c in Sources */, - C64FDA881D6D9A2100F259B9 /* ferris_wheel.c in Sources */, - C64FDA891D6D9A2100F259B9 /* flying_saucers.c in Sources */, C606CCC11DB4054000FE4015 /* generate.cpp in Sources */, - C64FDA8A1D6D9A2100F259B9 /* ghost_train.c in Sources */, C606CCBF1DB4054000FE4015 /* data.c in Sources */, - C64FDA8B1D6D9A2100F259B9 /* haunted_house.c in Sources */, - C64FDA8C1D6D9A2100F259B9 /* maze.c in Sources */, - C64FDA8D1D6D9A2100F259B9 /* merry_go_round.c in Sources */, - C64FDA8E1D6D9A2100F259B9 /* mini_golf.c in Sources */, C606CCC81DB4054000FE4015 /* TestTrack.cpp in Sources */, - C64FDA8F1D6D9A2100F259B9 /* mini_helicopters.c in Sources */, C606CCC51DB4054000FE4015 /* PaintIntercept.cpp in Sources */, - C64FDA901D6D9A2100F259B9 /* monorail_cycles.c in Sources */, C606CCCE1DB427A000FE4015 /* GeneralSupportHeightCall.cpp in Sources */, C64FDA911D6D9A2100F259B9 /* observation_tower.c in Sources */, C64FDA921D6D9A2100F259B9 /* space_rings.c in Sources */, @@ -2652,16 +3568,7 @@ C64FDA981D6D9A2100F259B9 /* enterprise.c in Sources */, C64FDA991D6D9A2100F259B9 /* go_karts.c in Sources */, C606CCC01DB4054000FE4015 /* FunctionCall.cpp in Sources */, - C64FDA9A1D6D9A2100F259B9 /* launched_freefall.c in Sources */, - C64FDA9B1D6D9A2100F259B9 /* magic_carpet.c in Sources */, - C64FDA9C1D6D9A2100F259B9 /* motion_simulator.c in Sources */, - C64FDA9D1D6D9A2100F259B9 /* pirate_ship.c in Sources */, - C64FDA9E1D6D9A2100F259B9 /* roto_drop.c in Sources */, - C64FDA9F1D6D9A2100F259B9 /* swinging_inverter_ship.c in Sources */, - C64FDAA01D6D9A2100F259B9 /* top_spin.c in Sources */, - C64FDAA11D6D9A2100F259B9 /* twist.c in Sources */, C606CD261DB5120C00FE4015 /* TestPaint.cpp in Sources */, - C64FDAA21D6D9A2100F259B9 /* chairlift.c in Sources */, C606CCC71DB4054000FE4015 /* String.cpp in Sources */, C64FDAA31D6D9A2100F259B9 /* lift.c in Sources */, C64FDAA41D6D9A2100F259B9 /* miniature_railway.c in Sources */, @@ -2672,14 +3579,6 @@ C64FDAA81D6D9A2100F259B9 /* dingy_slide.c in Sources */, C64FDAA91D6D9A2100F259B9 /* log_flume.c in Sources */, C606CCC91DB4054000FE4015 /* Utils.cpp in Sources */, - C64FDAAB1D6D9A2100F259B9 /* river_rapids.c in Sources */, - C64FDAAC1D6D9A2100F259B9 /* splash_boats.c in Sources */, - C64FDAAD1D6D9A2100F259B9 /* submarine_ride.c in Sources */, - C64FDAAE1D6D9A2100F259B9 /* water_coaster.c in Sources */, - 6876808CD662C4B16392A9B4 /* Balloon.cpp in Sources */, - 7D02D519C9A56A1FB9854FE7 /* Climate.cpp in Sources */, - 689149B0417A68D6765F09CD /* banner.cpp in Sources */, - F408D5E134FE5B423BE5443F /* Duck.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3037,11 +3936,387 @@ F2CC500E17C9411FBA859888 /* Climate.cpp in Sources */, 8DED2F20E0D63A1DCFCE0197 /* banner.cpp in Sources */, B94C3C5FC4DBBB864434DE83 /* Duck.cpp in Sources */, + F76C88781EC5324E00FA49E2 /* AudioChannel.cpp in Sources */, + F76C88791EC5324E00FA49E2 /* AudioContext.cpp in Sources */, + F76C887A1EC5324E00FA49E2 /* AudioMixer.cpp in Sources */, + F76C887B1EC5324E00FA49E2 /* FileAudioSource.cpp in Sources */, + F76C887C1EC5324E00FA49E2 /* MemoryAudioSource.cpp in Sources */, + F76C887D1EC5324E00FA49E2 /* CursorData.cpp in Sources */, + F7D7747F1EC61E5100BE6EBC /* UiContext.macOS.mm in Sources */, + F76C887E1EC5324E00FA49E2 /* CursorRepository.cpp in Sources */, + F76C887F1EC5324E00FA49E2 /* CopyFramebufferShader.cpp in Sources */, + F76C88801EC5324E00FA49E2 /* DrawImageShader.cpp in Sources */, + F76C88811EC5324E00FA49E2 /* DrawLineShader.cpp in Sources */, + F76C88821EC5324E00FA49E2 /* FillRectShader.cpp in Sources */, + F76C88831EC5324E00FA49E2 /* OpenGLAPI.cpp in Sources */, + F76C88841EC5324E00FA49E2 /* OpenGLDrawingEngine.cpp in Sources */, + F76C88851EC5324E00FA49E2 /* OpenGLFramebuffer.cpp in Sources */, + F76C88861EC5324E00FA49E2 /* OpenGLShaderProgram.cpp in Sources */, + F76C88871EC5324E00FA49E2 /* SwapFramebuffer.cpp in Sources */, + F76C88881EC5324E00FA49E2 /* TextureCache.cpp in Sources */, + F76C88891EC5324E00FA49E2 /* SoftwareDrawingEngine.cpp in Sources */, + F76C888A1EC5324E00FA49E2 /* TextComposition.cpp in Sources */, + F76C888B1EC5324E00FA49E2 /* Ui.cpp in Sources */, + F76C888C1EC5324E00FA49E2 /* UiContext.cpp in Sources */, + F76C888D1EC5324E00FA49E2 /* UiContext.Linux.cpp in Sources */, + F76C888E1EC5324E00FA49E2 /* UiContext.Win32.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F76C80961EC4D9FA00FA49E2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F7D7747B1EC5EB6D00BE6EBC /* lay_down_roller_coaster.c in Sources */, + F76C85B01EC4E88300FA49E2 /* audio.cpp in Sources */, + F76C85B41EC4E88300FA49E2 /* AudioMixer.cpp in Sources */, + F76C85B71EC4E88300FA49E2 /* NullAudioSource.cpp in Sources */, + F76C85B81EC4E88300FA49E2 /* cheats.c in Sources */, + F76C85BA1EC4E88300FA49E2 /* CommandLine.cpp in Sources */, + F76C85BC1EC4E88300FA49E2 /* ConvertCommand.cpp in Sources */, + F76C85BD1EC4E88300FA49E2 /* RootCommands.cpp in Sources */, + F76C85BE1EC4E88300FA49E2 /* ScreenshotCommands.cpp in Sources */, + F76C85BF1EC4E88300FA49E2 /* SpriteCommands.cpp in Sources */, + F76C85C01EC4E88300FA49E2 /* UriHandler.cpp in Sources */, + F76C85C11EC4E88300FA49E2 /* cmdline_sprite.c in Sources */, + F76C85C41EC4E88300FA49E2 /* Config.cpp in Sources */, + F76C85C71EC4E88300FA49E2 /* IniReader.cpp in Sources */, + F76C85C91EC4E88300FA49E2 /* IniWriter.cpp in Sources */, + F76C85CB1EC4E88300FA49E2 /* KeyboardShortcuts.cpp in Sources */, + F76C85CC1EC4E88300FA49E2 /* Context.cpp in Sources */, + F76C85CF1EC4E88300FA49E2 /* Console.cpp in Sources */, + F76C85D11EC4E88300FA49E2 /* Diagnostics.cpp in Sources */, + F76C85D41EC4E88300FA49E2 /* File.cpp in Sources */, + F76C85D61EC4E88300FA49E2 /* FileScanner.cpp in Sources */, + F76C85D91EC4E88300FA49E2 /* Guard.cpp in Sources */, + F76C85DB1EC4E88300FA49E2 /* IStream.cpp in Sources */, + F76C85DD1EC4E88300FA49E2 /* Json.cpp in Sources */, + F76C85E11EC4E88300FA49E2 /* MemoryStream.cpp in Sources */, + F76C85E41EC4E88300FA49E2 /* Path.cpp in Sources */, + F76C85E71EC4E88300FA49E2 /* String.cpp in Sources */, + F76C85EB1EC4E88300FA49E2 /* textinputbuffer.c in Sources */, + F76C85EE1EC4E88300FA49E2 /* Zip.cpp in Sources */, + F76C85F01EC4E88300FA49E2 /* diagnostic.c in Sources */, + F76C85F21EC4E88300FA49E2 /* drawing.c in Sources */, + F76C85F41EC4E88300FA49E2 /* drawing_fast.cpp in Sources */, + F76C85F51EC4E88300FA49E2 /* font.c in Sources */, + F76C85F91EC4E88300FA49E2 /* Image.cpp in Sources */, + F76C85FA1EC4E88300FA49E2 /* lightfx.c in Sources */, + F76C85FC1EC4E88300FA49E2 /* line.c in Sources */, + F76C85FD1EC4E88300FA49E2 /* NewDrawing.cpp in Sources */, + F76C85FF1EC4E88300FA49E2 /* Rain.cpp in Sources */, + F76C86011EC4E88300FA49E2 /* rect.c in Sources */, + F76C86021EC4E88300FA49E2 /* scrolling_text.c in Sources */, + F76C86031EC4E88300FA49E2 /* sprite.cpp in Sources */, + F76C86041EC4E88300FA49E2 /* string.c in Sources */, + F76C86051EC4E88300FA49E2 /* editor.c in Sources */, + F76C86071EC4E88300FA49E2 /* FileClassifier.cpp in Sources */, + F76C86091EC4E88300FA49E2 /* game.c in Sources */, + F76C860B1EC4E88300FA49E2 /* Imaging.cpp in Sources */, + F76C860D1EC4E88300FA49E2 /* input.c in Sources */, + F76C860F1EC4E88300FA49E2 /* chat.c in Sources */, + F76C86111EC4E88300FA49E2 /* colour.c in Sources */, + F76C86131EC4E88300FA49E2 /* console.c in Sources */, + F76C86161EC4E88300FA49E2 /* Fonts.cpp in Sources */, + F76C86181EC4E88300FA49E2 /* graph.c in Sources */, + F76C861A1EC4E88300FA49E2 /* keyboard_shortcut.c in Sources */, + F76C861C1EC4E88300FA49E2 /* screenshot.c in Sources */, + F76C861E1EC4E88300FA49E2 /* Theme.cpp in Sources */, + F76C86201EC4E88300FA49E2 /* viewport.c in Sources */, + F76C86221EC4E88300FA49E2 /* viewport_interaction.c in Sources */, + F76C86231EC4E88300FA49E2 /* widget.c in Sources */, + F76C86251EC4E88300FA49E2 /* window.c in Sources */, + F76C86271EC4E88300FA49E2 /* intro.c in Sources */, + F76C86291EC4E88300FA49E2 /* convert.c in Sources */, + F76C862A1EC4E88300FA49E2 /* currency.c in Sources */, + F76C862C1EC4E88300FA49E2 /* date.c in Sources */, + F76C862E1EC4E88300FA49E2 /* format_codes.c in Sources */, + F76C86301EC4E88300FA49E2 /* language.cpp in Sources */, + F76C86321EC4E88300FA49E2 /* LanguagePack.cpp in Sources */, + F76C86341EC4E88300FA49E2 /* localisation.c in Sources */, + F76C86361EC4E88300FA49E2 /* real_names.c in Sources */, + F76C86381EC4E88300FA49E2 /* user.c in Sources */, + F76C863A1EC4E88300FA49E2 /* utf8.c in Sources */, + F76C863B1EC4E88300FA49E2 /* award.c in Sources */, + F76C863D1EC4E88300FA49E2 /* finance.c in Sources */, + F76C863F1EC4E88300FA49E2 /* marketing.c in Sources */, + F76C86411EC4E88300FA49E2 /* news_item.c in Sources */, + F76C86431EC4E88300FA49E2 /* research.c in Sources */, + F76C86451EC4E88300FA49E2 /* http.cpp in Sources */, + F76C86471EC4E88300FA49E2 /* network.cpp in Sources */, + F76C86491EC4E88300FA49E2 /* NetworkAction.cpp in Sources */, + F76C864B1EC4E88300FA49E2 /* NetworkConnection.cpp in Sources */, + F76C864D1EC4E88300FA49E2 /* NetworkGroup.cpp in Sources */, + F76C864F1EC4E88300FA49E2 /* NetworkKey.cpp in Sources */, + F76C86511EC4E88300FA49E2 /* NetworkPacket.cpp in Sources */, + F76C86531EC4E88300FA49E2 /* NetworkPlayer.cpp in Sources */, + F76C86551EC4E88300FA49E2 /* NetworkServerAdvertiser.cpp in Sources */, + F76C86581EC4E88300FA49E2 /* NetworkUser.cpp in Sources */, + F76C865A1EC4E88300FA49E2 /* ServerList.cpp in Sources */, + F76C865C1EC4E88300FA49E2 /* TcpSocket.cpp in Sources */, + F76C865E1EC4E88300FA49E2 /* twitch.cpp in Sources */, + F76C86601EC4E88300FA49E2 /* BannerObject.cpp in Sources */, + F76C86621EC4E88300FA49E2 /* EntranceObject.cpp in Sources */, + F76C86641EC4E88300FA49E2 /* FootpathItemObject.cpp in Sources */, + F76C86661EC4E88300FA49E2 /* FootpathObject.cpp in Sources */, + F76C86681EC4E88300FA49E2 /* ImageTable.cpp in Sources */, + F76C866A1EC4E88300FA49E2 /* LargeSceneryObject.cpp in Sources */, + F76C866C1EC4E88400FA49E2 /* Object.cpp in Sources */, + F76C866E1EC4E88400FA49E2 /* ObjectFactory.cpp in Sources */, + F76C86701EC4E88400FA49E2 /* ObjectManager.cpp in Sources */, + F76C86721EC4E88400FA49E2 /* ObjectRepository.cpp in Sources */, + F76C86741EC4E88400FA49E2 /* RideObject.cpp in Sources */, + F76C86761EC4E88400FA49E2 /* SceneryGroupObject.cpp in Sources */, + F76C86791EC4E88400FA49E2 /* SmallSceneryObject.cpp in Sources */, + F76C867B1EC4E88400FA49E2 /* StexObject.cpp in Sources */, + F76C867D1EC4E88400FA49E2 /* StringTable.cpp in Sources */, + F76C867F1EC4E88400FA49E2 /* WallObject.cpp in Sources */, + F76C86811EC4E88400FA49E2 /* WaterObject.cpp in Sources */, + F76C86841EC4E88400FA49E2 /* object_list.c in Sources */, + F76C86861EC4E88400FA49E2 /* OpenRCT2.cpp in Sources */, + F76C86881EC4E88400FA49E2 /* banner.c in Sources */, + F76C86891EC4E88400FA49E2 /* entrance.c in Sources */, + F76C868A1EC4E88400FA49E2 /* fence.c in Sources */, + F76C868B1EC4E88400FA49E2 /* map_element.c in Sources */, + F76C868D1EC4E88400FA49E2 /* path.c in Sources */, + F76C868E1EC4E88400FA49E2 /* scenery.c in Sources */, + F76C868F1EC4E88400FA49E2 /* scenery_multiple.c in Sources */, + F76C86901EC4E88400FA49E2 /* surface.c in Sources */, + F76C86921EC4E88400FA49E2 /* paint.c in Sources */, + F76C86941EC4E88400FA49E2 /* paint_helpers.c in Sources */, + F76C86951EC4E88400FA49E2 /* litter.c in Sources */, + F76C86961EC4E88400FA49E2 /* misc.c in Sources */, + F76C86971EC4E88400FA49E2 /* peep.c in Sources */, + F76C86981EC4E88400FA49E2 /* sprite.c in Sources */, + F76C869A1EC4E88400FA49E2 /* supports.c in Sources */, + F76C869C1EC4E88400FA49E2 /* ParkImporter.cpp in Sources */, + F76C869E1EC4E88400FA49E2 /* peep.c in Sources */, + F76C86A01EC4E88400FA49E2 /* peep_data.c in Sources */, + F76C86A11EC4E88400FA49E2 /* staff.c in Sources */, + F76C86A31EC4E88400FA49E2 /* crash.cpp in Sources */, + F76C86A51EC4E88400FA49E2 /* linux.c in Sources */, + F76C86A61EC4E88400FA49E2 /* macos.m in Sources */, + F76C86A81EC4E88400FA49E2 /* Platform2.cpp in Sources */, + F76C86AA1EC4E88400FA49E2 /* posix.c in Sources */, + F76C86AB1EC4E88400FA49E2 /* shared.c in Sources */, + F76C86AC1EC4E88400FA49E2 /* windows.c in Sources */, + F76C86AD1EC4E88400FA49E2 /* PlatformEnvironment.cpp in Sources */, + F76C86AF1EC4E88400FA49E2 /* S4Importer.cpp in Sources */, + F76C86B01EC4E88400FA49E2 /* tables.cpp in Sources */, + F76C86B21EC4E88400FA49E2 /* rct1.c in Sources */, + F76C86B41EC4E88400FA49E2 /* SawyerChunk.cpp in Sources */, + F76C86B61EC4E88400FA49E2 /* SawyerChunkReader.cpp in Sources */, + F76C86B81EC4E88400FA49E2 /* SawyerChunkWriter.cpp in Sources */, + F76C86BA1EC4E88400FA49E2 /* SawyerEncoding.cpp in Sources */, + F76C86BD1EC4E88400FA49E2 /* addresses.c in Sources */, + F76C86BF1EC4E88400FA49E2 /* hook.c in Sources */, + F76C86C11EC4E88400FA49E2 /* interop.c in Sources */, + F76C86C31EC4E88400FA49E2 /* S6Exporter.cpp in Sources */, + F76C86C51EC4E88400FA49E2 /* S6Importer.cpp in Sources */, + F76C86C61EC4E88400FA49E2 /* rct2.c in Sources */, + F76C86C81EC4E88400FA49E2 /* cable_lift.c in Sources */, + F76C86CA1EC4E88400FA49E2 /* air_powered_vertical_coaster.c in Sources */, + F76C86CB1EC4E88400FA49E2 /* bobsleigh_coaster.c in Sources */, + F76C86CC1EC4E88400FA49E2 /* bolliger_mabillard_track.c in Sources */, + F76C86CE1EC4E88400FA49E2 /* compact_inverted_coaster.c in Sources */, + F76C86CF1EC4E88400FA49E2 /* corkscrew_roller_coaster.c in Sources */, + F76C86D01EC4E88400FA49E2 /* flying_roller_coaster.c in Sources */, + F76C86D11EC4E88400FA49E2 /* giga_coaster.c in Sources */, + F76C86D21EC4E88400FA49E2 /* heartline_twister_coaster.c in Sources */, + F76C86D31EC4E88400FA49E2 /* inverted_hairpin_coaster.c in Sources */, + F76C86D41EC4E88400FA49E2 /* inverted_impulse_coaster.c in Sources */, + F76C86D51EC4E88400FA49E2 /* inverted_roller_coaster.c in Sources */, + F76C86D61EC4E88400FA49E2 /* junior_roller_coaster.c in Sources */, + F76C86D91EC4E88400FA49E2 /* lim_launched_roller_coaster.c in Sources */, + F76C86DA1EC4E88400FA49E2 /* looping_roller_coaster.c in Sources */, + F76C86DB1EC4E88400FA49E2 /* mine_ride.c in Sources */, + F76C86DC1EC4E88400FA49E2 /* mine_train_coaster.c in Sources */, + F76C86DD1EC4E88400FA49E2 /* mini_roller_coaster.c in Sources */, + F76C86DE1EC4E88400FA49E2 /* mini_suspended_coaster.c in Sources */, + F76C86DF1EC4E88400FA49E2 /* multi_dimension_roller_coaster.c in Sources */, + F76C86E01EC4E88400FA49E2 /* reverse_freefall_coaster.c in Sources */, + F76C86E11EC4E88400FA49E2 /* reverser_roller_coaster.c in Sources */, + F76C86E21EC4E88400FA49E2 /* side_friction_roller_coaster.c in Sources */, + F76C86E31EC4E88400FA49E2 /* stand_up_roller_coaster.c in Sources */, + F76C86E41EC4E88400FA49E2 /* steeplechase.c in Sources */, + F76C86E51EC4E88400FA49E2 /* suspended_swinging_coaster.c in Sources */, + F76C86E61EC4E88400FA49E2 /* twister_roller_coaster.c in Sources */, + F76C86E71EC4E88400FA49E2 /* vertical_drop_roller_coaster.c in Sources */, + F76C86E81EC4E88400FA49E2 /* virginia_reel.c in Sources */, + F76C86E91EC4E88400FA49E2 /* wild_mouse.c in Sources */, + F76C86EA1EC4E88400FA49E2 /* wooden_roller_coaster.c in Sources */, + F76C86EB1EC4E88400FA49E2 /* wooden_wild_mouse.c in Sources */, + F76C86EC1EC4E88400FA49E2 /* car_ride.c in Sources */, + F76C86ED1EC4E88400FA49E2 /* circus_show.c in Sources */, + F76C86EE1EC4E88400FA49E2 /* crooked_house.c in Sources */, + F76C86EF1EC4E88400FA49E2 /* dodgems.c in Sources */, + F76C86F01EC4E88400FA49E2 /* ferris_wheel.c in Sources */, + F76C86F11EC4E88400FA49E2 /* flying_saucers.c in Sources */, + F76C86F21EC4E88400FA49E2 /* ghost_train.c in Sources */, + F76C86F31EC4E88400FA49E2 /* haunted_house.c in Sources */, + F76C86F41EC4E88400FA49E2 /* maze.c in Sources */, + F76C86F51EC4E88400FA49E2 /* merry_go_round.c in Sources */, + F76C86F61EC4E88400FA49E2 /* mini_golf.c in Sources */, + F76C86F71EC4E88400FA49E2 /* mini_helicopters.c in Sources */, + F76C86F81EC4E88400FA49E2 /* monorail_cycles.c in Sources */, + F76C86F91EC4E88400FA49E2 /* observation_tower.c in Sources */, + F76C86FA1EC4E88400FA49E2 /* space_rings.c in Sources */, + F76C86FB1EC4E88400FA49E2 /* spiral_slide.c in Sources */, + F76C86FC1EC4E88400FA49E2 /* ride.c in Sources */, + F76C86FE1EC4E88400FA49E2 /* ride_data.c in Sources */, + F76C87001EC4E88400FA49E2 /* ride_ratings.c in Sources */, + F76C87021EC4E88400FA49E2 /* facility.c in Sources */, + F76C87031EC4E88400FA49E2 /* misc.c in Sources */, + F76C87041EC4E88400FA49E2 /* shop.c in Sources */, + F76C87051EC4E88400FA49E2 /* station.c in Sources */, + F76C87071EC4E88400FA49E2 /* 3d_cinema.c in Sources */, + F76C87081EC4E88400FA49E2 /* enterprise.c in Sources */, + F76C87091EC4E88400FA49E2 /* go_karts.c in Sources */, + F76C870A1EC4E88400FA49E2 /* launched_freefall.c in Sources */, + F76C870B1EC4E88400FA49E2 /* magic_carpet.c in Sources */, + F76C870C1EC4E88400FA49E2 /* motion_simulator.c in Sources */, + F76C870D1EC4E88400FA49E2 /* pirate_ship.c in Sources */, + F76C870E1EC4E88400FA49E2 /* roto_drop.c in Sources */, + F76C870F1EC4E88400FA49E2 /* swinging_inverter_ship.c in Sources */, + F76C87101EC4E88400FA49E2 /* top_spin.c in Sources */, + F76C87111EC4E88400FA49E2 /* twist.c in Sources */, + F76C87121EC4E88400FA49E2 /* track.c in Sources */, + F76C87141EC4E88400FA49E2 /* track_data.c in Sources */, + F76C87161EC4E88400FA49E2 /* track_data_old.c in Sources */, + F76C87171EC4E88400FA49E2 /* track_design.c in Sources */, + F76C87191EC4E88400FA49E2 /* track_design_save.c in Sources */, + F76C871A1EC4E88400FA49E2 /* track_paint.c in Sources */, + F76C871C1EC4E88400FA49E2 /* TrackDesignRepository.cpp in Sources */, + F76C871E1EC4E88400FA49E2 /* chairlift.c in Sources */, + F76C871F1EC4E88400FA49E2 /* lift.c in Sources */, + F76C87201EC4E88400FA49E2 /* miniature_railway.c in Sources */, + F76C87211EC4E88400FA49E2 /* monorail.c in Sources */, + F76C87221EC4E88400FA49E2 /* suspended_monorail.c in Sources */, + F76C87231EC4E88400FA49E2 /* vehicle.c in Sources */, + F76C87251EC4E88400FA49E2 /* vehicle_data.c in Sources */, + F76C87271EC4E88400FA49E2 /* vehicle_paint.c in Sources */, + F76C87291EC4E88400FA49E2 /* boat_ride.c in Sources */, + F76C872A1EC4E88400FA49E2 /* dingy_slide.c in Sources */, + F76C872B1EC4E88400FA49E2 /* log_flume.c in Sources */, + F76C872C1EC4E88400FA49E2 /* river_rafts.c in Sources */, + F76C872D1EC4E88400FA49E2 /* river_rapids.c in Sources */, + F76C872E1EC4E88400FA49E2 /* splash_boats.c in Sources */, + F76C872F1EC4E88400FA49E2 /* submarine_ride.c in Sources */, + F76C87301EC4E88400FA49E2 /* water_coaster.c in Sources */, + F76C87311EC4E88400FA49E2 /* scenario.c in Sources */, + F76C87331EC4E88400FA49E2 /* ScenarioRepository.cpp in Sources */, + F76C87351EC4E88400FA49E2 /* ScenarioSources.cpp in Sources */, + F76C87381EC4E88400FA49E2 /* TitleScreen.cpp in Sources */, + F76C873A1EC4E88400FA49E2 /* TitleSequence.cpp in Sources */, + F76C873C1EC4E88400FA49E2 /* TitleSequenceManager.cpp in Sources */, + F76C873E1EC4E88400FA49E2 /* TitleSequencePlayer.cpp in Sources */, + F76C87411EC4E88400FA49E2 /* sawyercoding.c in Sources */, + F76C87431EC4E88400FA49E2 /* util.c in Sources */, + F76C87451EC4E88400FA49E2 /* Version.cpp in Sources */, + F76C87471EC4E88400FA49E2 /* about.c in Sources */, + F76C87481EC4E88400FA49E2 /* banner.c in Sources */, + F76C87491EC4E88400FA49E2 /* changelog.c in Sources */, + F76C874A1EC4E88400FA49E2 /* cheats.c in Sources */, + F76C874B1EC4E88400FA49E2 /* clear_scenery.c in Sources */, + F76C874C1EC4E88400FA49E2 /* custom_currency.c in Sources */, + F76C874D1EC4E88400FA49E2 /* debug_paint.c in Sources */, + F76C874E1EC4E88400FA49E2 /* demolish_ride_prompt.c in Sources */, + F76C874F1EC4E88400FA49E2 /* dropdown.c in Sources */, + F76C87511EC4E88400FA49E2 /* editor_bottom_toolbar.c in Sources */, + F76C87521EC4E88400FA49E2 /* editor_inventions_list.c in Sources */, + F76C87531EC4E88400FA49E2 /* editor_main.c in Sources */, + F76C87541EC4E88400FA49E2 /* editor_object_selection.c in Sources */, + F76C87551EC4E88400FA49E2 /* editor_objective_options.c in Sources */, + F76C87561EC4E88400FA49E2 /* editor_scenario_options.c in Sources */, + F76C87571EC4E88400FA49E2 /* error.c in Sources */, + F76C87591EC4E88400FA49E2 /* finances.c in Sources */, + F76C875A1EC4E88400FA49E2 /* footpath.c in Sources */, + F76C875B1EC4E88400FA49E2 /* game_bottom_toolbar.c in Sources */, + F76C875C1EC4E88400FA49E2 /* guest.c in Sources */, + F76C875D1EC4E88400FA49E2 /* guest_list.c in Sources */, + F76C875E1EC4E88400FA49E2 /* install_track.c in Sources */, + F76C875F1EC4E88400FA49E2 /* land.c in Sources */, + F76C87601EC4E88400FA49E2 /* land_rights.c in Sources */, + F76C87611EC4E88400FA49E2 /* loadsave.c in Sources */, + F76C87621EC4E88400FA49E2 /* main.c in Sources */, + F76C87631EC4E88400FA49E2 /* map.c in Sources */, + F76C87641EC4E88400FA49E2 /* map_tooltip.c in Sources */, + F76C87651EC4E88400FA49E2 /* mapgen.c in Sources */, + F76C87661EC4E88400FA49E2 /* maze_construction.c in Sources */, + F76C87671EC4E88400FA49E2 /* multiplayer.c in Sources */, + F76C87681EC4E88400FA49E2 /* music_credits.c in Sources */, + F76C87691EC4E88400FA49E2 /* network_status.c in Sources */, + F76C876A1EC4E88400FA49E2 /* new_campaign.c in Sources */, + F76C876B1EC4E88400FA49E2 /* new_ride.c in Sources */, + F76C876C1EC4E88400FA49E2 /* news.c in Sources */, + F76C876D1EC4E88400FA49E2 /* news_options.c in Sources */, + F76C876E1EC4E88400FA49E2 /* options.c in Sources */, + F76C876F1EC4E88400FA49E2 /* park.c in Sources */, + F76C87701EC4E88400FA49E2 /* player.c in Sources */, + F76C87711EC4E88400FA49E2 /* publisher_credits.c in Sources */, + F76C87721EC4E88400FA49E2 /* research.c in Sources */, + F76C87731EC4E88400FA49E2 /* ride.c in Sources */, + F76C87741EC4E88400FA49E2 /* ride_construction.c in Sources */, + F76C87751EC4E88400FA49E2 /* ride_list.c in Sources */, + F76C87761EC4E88400FA49E2 /* save_prompt.c in Sources */, + F76C87771EC4E88400FA49E2 /* scenery.c in Sources */, + F76C87781EC4E88400FA49E2 /* server_list.cpp in Sources */, + F76C87791EC4E88400FA49E2 /* server_start.c in Sources */, + F76C877A1EC4E88400FA49E2 /* shortcut_key_change.c in Sources */, + F76C877B1EC4E88400FA49E2 /* shortcut_keys.c in Sources */, + F76C877C1EC4E88400FA49E2 /* sign.c in Sources */, + F76C877D1EC4E88400FA49E2 /* staff.c in Sources */, + F76C877E1EC4E88400FA49E2 /* staff_fire_prompt.c in Sources */, + F76C877F1EC4E88400FA49E2 /* staff_list.c in Sources */, + F76C87801EC4E88400FA49E2 /* text_input.c in Sources */, + F76C87811EC4E88400FA49E2 /* themes.c in Sources */, + F76C87821EC4E88400FA49E2 /* tile_inspector.c in Sources */, + F76C87841EC4E88400FA49E2 /* title_command_editor.c in Sources */, + F76C87851EC4E88400FA49E2 /* title_editor.c in Sources */, + F76C87861EC4E88400FA49E2 /* title_exit.c in Sources */, + F76C87871EC4E88400FA49E2 /* title_logo.c in Sources */, + F76C87881EC4E88400FA49E2 /* title_menu.c in Sources */, + F76C87891EC4E88400FA49E2 /* title_options.c in Sources */, + F76C878A1EC4E88400FA49E2 /* title_scenarioselect.c in Sources */, + F76C878B1EC4E88400FA49E2 /* tooltip.c in Sources */, + F76C878D1EC4E88400FA49E2 /* top_toolbar.c in Sources */, + F76C878E1EC4E88400FA49E2 /* track_list.c in Sources */, + F76C878F1EC4E88400FA49E2 /* track_manage.c in Sources */, + F76C87901EC4E88400FA49E2 /* track_place.c in Sources */, + F76C87911EC4E88400FA49E2 /* view_clipping.c in Sources */, + F76C87921EC4E88400FA49E2 /* viewport.c in Sources */, + F76C87931EC4E88400FA49E2 /* water.c in Sources */, + F76C87941EC4E88400FA49E2 /* Balloon.cpp in Sources */, + F76C87951EC4E88400FA49E2 /* banner.cpp in Sources */, + F76C87971EC4E88400FA49E2 /* Climate.cpp in Sources */, + F76C87991EC4E88400FA49E2 /* Duck.cpp in Sources */, + F76C879A1EC4E88400FA49E2 /* entrance.cpp in Sources */, + F76C879C1EC4E88400FA49E2 /* footpath.c in Sources */, + F76C879E1EC4E88400FA49E2 /* Fountain.cpp in Sources */, + F76C87A01EC4E88400FA49E2 /* map.c in Sources */, + F76C87A21EC4E88400FA49E2 /* map_animation.c in Sources */, + F76C87A41EC4E88500FA49E2 /* map_helpers.c in Sources */, + F76C87A61EC4E88500FA49E2 /* mapgen.c in Sources */, + F76C87A81EC4E88500FA49E2 /* money_effect.c in Sources */, + F76C87A91EC4E88500FA49E2 /* park.c in Sources */, + F76C87AB1EC4E88500FA49E2 /* particle.c in Sources */, + F76C87AC1EC4E88500FA49E2 /* scenery.c in Sources */, + F76C87AE1EC4E88500FA49E2 /* sprite.c in Sources */, + F76C87B01EC4E88500FA49E2 /* tile_inspector.c in Sources */, + F76C87B21EC4E88500FA49E2 /* wall.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + F76C88901EC5325700FA49E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F76C80991EC4D9FA00FA49E2 /* libopenrct2 */; + targetProxy = F76C888F1EC5325700FA49E2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ C64FDA611D6D99F400F259B9 /* Debug */ = { isa = XCBuildConfiguration; @@ -3237,9 +4512,13 @@ D497D08A1C20FD53002BF46A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_UNREACHABLE_CODE = NO; COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NO_RCT2, @@ -3254,6 +4533,7 @@ "$(SRCROOT)/libxc/include/SDL2", "$(SRCROOT)/libxc/include/libpng16", "$(SRCROOT)/libxc/include/openssl", + "$(SRCROOT)/src/", ); INFOPLIST_FILE = "$(DERIVED_FILE_DIR)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -3269,9 +4549,13 @@ D497D08B1C20FD53002BF46A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_UNREACHABLE_CODE = NO; COMBINE_HIDPI_IMAGES = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NO_RCT2, @@ -3286,6 +4570,7 @@ "$(SRCROOT)/libxc/include/SDL2", "$(SRCROOT)/libxc/include/libpng16", "$(SRCROOT)/libxc/include/openssl", + "$(SRCROOT)/src/", ); INFOPLIST_FILE = "$(DERIVED_FILE_DIR)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -3298,6 +4583,84 @@ }; name = Release; }; + F76C809B1EC4D9FA00FA49E2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_UNREACHABLE_CODE = NO; + CODE_SIGN_IDENTITY = "-"; + EXECUTABLE_PREFIX = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + NO_RCT2, + __ENABLE_LIGHTFX__, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + "$(SRCROOT)/libxc/include/libpng16", + "$(SRCROOT)/libxc/include/openssl", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libxc/lib", + ); + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + }; + name = Debug; + }; + F76C809C1EC4D9FA00FA49E2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CLANG_WARN_UNREACHABLE_CODE = NO; + CODE_SIGN_IDENTITY = "-"; + EXECUTABLE_PREFIX = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = ( + OPENGL_NO_LINK, + "OPENRCT2_BUILD_INFO_HEADER=\"\\\"$(DERIVED_FILE_DIR)/gitversion.h\\\"\"", + NO_RCT2, + __ENABLE_LIGHTFX__, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + "$(SRCROOT)/libxc/include/libpng16", + "$(SRCROOT)/libxc/include/openssl", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libxc/lib", + ); + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -3328,6 +4691,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + F76C809D1EC4D9FA00FA49E2 /* Build configuration list for PBXNativeTarget "libopenrct2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F76C809B1EC4D9FA00FA49E2 /* Debug */, + F76C809C1EC4D9FA00FA49E2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = D497D0701C20FD52002BF46A /* Project object */; diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 95cabdfca9..ac1ab17f5f 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -14,7 +14,7 @@ *****************************************************************************/ #pragma endregion -#ifdef __linux__ +#if defined(__linux__) #include #include @@ -49,6 +49,9 @@ namespace OpenRCT2 { namespace Ui bool IsSteamOverlayAttached() override { + #ifdef __APPLE__ + return false; + #endif // See http://syprog.blogspot.ru/2011/12/listing-loaded-shared-objects-in-linux.html struct lmap { diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 8753b7a93f..141c494bbb 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -16,6 +16,8 @@ #include #include +#include +#include #include #include #include @@ -495,10 +497,11 @@ public: SDL_SetWindowMinimumSize(_window, 720, 480); SetCursorTrap(gConfigGeneral.trap_cursor); _platformUiContext->SetWindowIcon(_window); -#ifdef __MACOSX__ - macos_disallow_automatic_window_tabbing(); -#endif - + + #ifdef __MACOSX__ + + #endif + // Initialise the surface, palette and draw buffer OnResize(width, height); @@ -508,6 +511,8 @@ public: // Check if steam overlay renderer is loaded into the process _steamOverlayActive = _platformUiContext->IsSteamOverlayAttached(); TriggerResize(); + + } void CloseWindow() override diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm new file mode 100644 index 0000000000..e73766f0bd --- /dev/null +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -0,0 +1,186 @@ +#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +/***************************************************************************** +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ +#pragma endregion + +#if defined(__APPLE__) && defined(__MACH__) + +#import + +#include +#include +#include +#include +#include +#include "UiContext.h" + +#include + +namespace OpenRCT2 { namespace Ui +{ + class macOSContext final : public IPlatformUiContext + { + private: + + public: + macOSContext() + { + @autoreleasepool { + if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) { + [NSWindow setAllowsAutomaticWindowTabbing:NO]; + } + } + } + + void SetWindowIcon(SDL_Window * window) override + { + } + + bool IsSteamOverlayAttached() override + { + STUB(); + return false; + } + + void ShowMessageBox(SDL_Window * window, const std::string &message) override + { + @autoreleasepool + { + NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + [alert addButtonWithTitle:@"OK"]; + alert.messageText = [NSString stringWithUTF8String:message.c_str()]; + [alert runModal]; + } + } + + std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc &desc) override + { + @autoreleasepool + { + NSMutableArray *extensions = [NSMutableArray new]; + for (const OpenRCT2::Ui::FileDialogDesc::Filter &filter: desc.Filters) { + if (filter.Pattern != "") { + NSString *fp = [NSString stringWithUTF8String:filter.Pattern.c_str()]; + fp = [fp stringByReplacingOccurrencesOfString:@"*." withString:@""]; + [extensions addObjectsFromArray:[fp componentsSeparatedByString:@";"]]; + } + } + + NSString *directory; + NSSavePanel *panel; + if (desc.Type == FILE_DIALOG_TYPE::SAVE) + { + NSString *filePath = [NSString stringWithUTF8String:desc.DefaultFilename.c_str()]; + directory = filePath.stringByDeletingLastPathComponent; + NSString *basename = filePath.lastPathComponent; + panel = [NSSavePanel savePanel]; + panel.nameFieldStringValue = [NSString stringWithFormat:@"%@.%@", basename, extensions.firstObject]; + } + else if (desc.Type == FILE_DIALOG_TYPE::OPEN) + { + directory = [NSString stringWithUTF8String:desc.InitialDirectory.c_str()]; + NSOpenPanel *open = [NSOpenPanel openPanel]; + open.canChooseDirectories = false; + open.canChooseFiles = true; + open.allowsMultipleSelection = false; + panel = open; + } else { + return std::string(); + } + + panel.title = [NSString stringWithUTF8String:desc.Title.c_str()]; + panel.allowedFileTypes = extensions; + panel.directoryURL = [NSURL fileURLWithPath:directory]; + if ([panel runModal] == NSFileHandlingPanelCancelButton){ + return std::string(); + } else { + return panel.URL.path.UTF8String; + } + } + } + + std::string ShowDirectoryDialog(SDL_Window * window, const std::string &title) override + { + @autoreleasepool + { + NSOpenPanel *panel = [NSOpenPanel openPanel]; + panel.canChooseFiles = false; + panel.canChooseDirectories = true; + panel.allowsMultipleSelection = false; + utf8 *url = NULL; + if ([panel runModal] == NSFileHandlingPanelOKButton) + { + NSString *selectedPath = panel.URL.path; + const char *path = selectedPath.UTF8String; + url = _strdup(path); + } + return url; + } + } + + private: + static sint32 Execute(const std::string &command, std::string * output = nullptr) + { + log_verbose("executing \"%s\"...\n", command.c_str()); + FILE * fpipe = popen(command.c_str(), "r"); + if (fpipe == nullptr) + { + return -1; + } + + if (output != nullptr) + { + // Read output into buffer + std::vector outputBuffer; + char buffer[1024]; + size_t readBytes; + while ((readBytes = fread(buffer, 1, sizeof(buffer), fpipe)) > 0) + { + outputBuffer.insert(outputBuffer.begin(), buffer, buffer + readBytes); + } + + // Trim line breaks + size_t outputLength = outputBuffer.size(); + for (size_t i = outputLength - 1; i != SIZE_MAX; i--) + { + if (outputBuffer[i] == '\n') + { + outputLength = i; + } + else + { + break; + } + } + + // Convert to string + *output = std::string(outputBuffer.data(), outputLength); + } + else + { + fflush(fpipe); + } + + // Return exit code + return pclose(fpipe); + } + }; + + IPlatformUiContext * CreatePlatformUiContext() + { + return new macOSContext(); + } +} } + +#endif // __APPLE__ && __MACH__ diff --git a/src/openrct2/platform/macos.m b/src/openrct2/platform/macos.m index 97c1e74a7e..b8cbd08144 100644 --- a/src/openrct2/platform/macos.m +++ b/src/openrct2/platform/macos.m @@ -114,25 +114,6 @@ void platform_show_messagebox(const char * message) } } -utf8 *platform_open_directory_browser(const utf8 *title) -{ - @autoreleasepool - { - NSOpenPanel *panel = [NSOpenPanel openPanel]; - panel.canChooseFiles = false; - panel.canChooseDirectories = true; - panel.allowsMultipleSelection = false; - utf8 *url = NULL; - if ([panel runModal] == NSFileHandlingPanelOKButton) - { - NSString *selectedPath = panel.URL.path; - const char *path = selectedPath.UTF8String; - url = _strdup(path); - } - return url; - } -} - utf8* macos_str_decomp_to_precomp(utf8 *input) { @autoreleasepool @@ -146,54 +127,6 @@ utf8* macos_str_decomp_to_precomp(utf8 *input) } } -bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc, size_t outSize) { - @autoreleasepool - { - NSMutableArray *extensions = [NSMutableArray new]; - for (int i=0; i < countof(desc->filters); ++i) { - if (desc->filters[i].pattern != NULL) { - NSString *fp = [NSString stringWithUTF8String:desc->filters[i].pattern]; - fp = [fp stringByReplacingOccurrencesOfString:@"*." withString:@""]; - [extensions addObjectsFromArray:[fp componentsSeparatedByString:@";"]]; - } - } - - NSString *directory; - NSSavePanel *panel; - if (desc->type == FD_SAVE) - { - NSString *filePath = [NSString stringWithUTF8String:desc->default_filename]; - directory = filePath.stringByDeletingLastPathComponent; - NSString *basename = filePath.lastPathComponent; - panel = [NSSavePanel savePanel]; - panel.nameFieldStringValue = [NSString stringWithFormat:@"%@.%@", basename, extensions.firstObject]; - } - else if (desc->type == FD_OPEN) - { - directory = [NSString stringWithUTF8String:desc->initial_directory]; - NSOpenPanel *open = [NSOpenPanel openPanel]; - open.canChooseDirectories = false; - open.canChooseFiles = true; - open.allowsMultipleSelection = false; - panel = open; - } else { - return false; - } - - panel.title = [NSString stringWithUTF8String:desc->title]; - panel.allowedFileTypes = extensions; - panel.directoryURL = [NSURL fileURLWithPath:directory]; - if ([panel runModal] == NSFileHandlingPanelCancelButton){ - SDL_RaiseWindow(gWindow); - return false; - } else { - safe_strcpy(outFilename, panel.URL.path.UTF8String, outSize); - SDL_RaiseWindow(gWindow); - return true; - } - } -} - bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size) { @autoreleasepool diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index e545285ecb..72e95d7d4a 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -47,6 +47,10 @@ #endif #endif +#if defined(__APPLE__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) + mach_timebase_info_data_t _mach_base_info = { 0 }; +#endif + typedef void(*update_palette_func)(const uint8*, sint32, sint32); rct_palette_entry gPalette[256]; diff --git a/src/openrct2/windows/options.c b/src/openrct2/windows/options.c index 31edbf81e8..6977290e1b 100644 --- a/src/openrct2/windows/options.c +++ b/src/openrct2/windows/options.c @@ -1972,7 +1972,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) w->x + window_options_misc_widgets[WIDX_WINDOW_LIMIT].left + 1, w->y + window_options_misc_widgets[WIDX_WINDOW_LIMIT].top ); - #ifdef __MACOSX__ + #ifdef __APPLE__ set_format_arg(0, uintptr_t, (uintptr_t)macos_str_decomp_to_precomp(gConfigGeneral.rct1_path)); #else set_format_arg(0, uintptr_t, (uintptr_t)gConfigGeneral.rct1_path); From c71fc2b5425fc9ce0fe1f5e2da7e065faea20e07 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Fri, 12 May 2017 23:08:27 +0100 Subject: [PATCH 46/76] Remove test code --- src/openrct2-ui/UiContext.Linux.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index ac1ab17f5f..95cabdfca9 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -14,7 +14,7 @@ *****************************************************************************/ #pragma endregion -#if defined(__linux__) +#ifdef __linux__ #include #include @@ -49,9 +49,6 @@ namespace OpenRCT2 { namespace Ui bool IsSteamOverlayAttached() override { - #ifdef __APPLE__ - return false; - #endif // See http://syprog.blogspot.ru/2011/12/listing-loaded-shared-objects-in-linux.html struct lmap { From 63771389c341993d951c4c9b601d237d17409ea5 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Fri, 12 May 2017 23:10:38 +0100 Subject: [PATCH 47/76] Remove whitespace in UiContext.cpp --- src/openrct2-ui/UiContext.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 141c494bbb..894aa17490 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -498,10 +498,6 @@ public: SetCursorTrap(gConfigGeneral.trap_cursor); _platformUiContext->SetWindowIcon(_window); - #ifdef __MACOSX__ - - #endif - // Initialise the surface, palette and draw buffer OnResize(width, height); @@ -511,8 +507,6 @@ public: // Check if steam overlay renderer is loaded into the process _steamOverlayActive = _platformUiContext->IsSteamOverlayAttached(); TriggerResize(); - - } void CloseWindow() override From f7f5cb754b1212532811ab175eb8fde2153087c8 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Fri, 12 May 2017 23:57:54 +0100 Subject: [PATCH 48/76] Add macOS target for CLI build --- OpenRCT2-cli/main.cpp | 15 ++ OpenRCT2.xcodeproj/project.pbxproj | 212 +++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) create mode 100644 OpenRCT2-cli/main.cpp diff --git a/OpenRCT2-cli/main.cpp b/OpenRCT2-cli/main.cpp new file mode 100644 index 0000000000..bb10b3c50e --- /dev/null +++ b/OpenRCT2-cli/main.cpp @@ -0,0 +1,15 @@ +// +// main.cpp +// OpenRCT2-cli +// +// Created by Richard Jenkins on 12/05/2017. +// Copyright © 2017 OpenRCT2. All rights reserved. +// + +#include + +int main(int argc, const char * argv[]) { + // insert code here... + std::cout << "Hello, World!\n"; + return 0; +} diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 301238a41c..312de21e66 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -603,6 +603,30 @@ F76C88921EC539A300FA49E2 /* libopenrct2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */; }; F7D7747B1EC5EB6D00BE6EBC /* lay_down_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84951EC4E7CC00FA49E2 /* lay_down_roller_coaster.c */; }; F7D7747F1EC61E5100BE6EBC /* UiContext.macOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */; }; + F7D7748D1EC66F8600BE6EBC /* libopenrct2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */; }; + F7D7748E1EC66FA000BE6EBC /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B741C1C210A7A0080A7B9 /* libiconv.tbd */; }; + F7D7748F1EC66FA900BE6EBC /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73EE1C2101890080A7B9 /* libcurl.tbd */; }; + F7D774901EC66FB000BE6EBC /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D47304D41C4FF8250015C0EA /* libz.tbd */; }; + F7D774911EC66FBA00BE6EBC /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; }; + F7D774921EC66FBA00BE6EBC /* libfreetype.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; }; + F7D774931EC66FBA00BE6EBC /* libjansson.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B51CF3006400659A24 /* libjansson.dylib */; }; + F7D774941EC66FBA00BE6EBC /* libpng16.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; }; + F7D774951EC66FBA00BE6EBC /* libspeexdsp.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; }; + F7D774961EC66FBA00BE6EBC /* libzip.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; }; + F7D774971EC6705F00BE6EBC /* libcrypto.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B31CF3006400659A24 /* libcrypto.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D774981EC6705F00BE6EBC /* libfreetype.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B41CF3006400659A24 /* libfreetype.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D774991EC6705F00BE6EBC /* libjansson.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B51CF3006400659A24 /* libjansson.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D7749A1EC6705F00BE6EBC /* libpng16.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D4A8B4B31DB41873007A2F29 /* libpng16.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D7749B1EC6705F00BE6EBC /* libspeexdsp.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B91CF3006400659A24 /* libspeexdsp.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D7749C1EC6705F00BE6EBC /* libzip.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D7749E1EC6713200BE6EBC /* Cli.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76C857D1EC4E80E00FA49E2 /* Cli.cpp */; }; + F7D7749F1EC6714C00BE6EBC /* libSDL2_ttf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B71CF3006400659A24 /* libSDL2_ttf.dylib */; }; + F7D774A01EC6714C00BE6EBC /* libSDL2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; }; + F7D774A11EC6715C00BE6EBC /* libSDL2_ttf.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B71CF3006400659A24 /* libSDL2_ttf.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D774A21EC6715C00BE6EBC /* libSDL2.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D45A38B81CF3006400659A24 /* libSDL2.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + F7D774AC1EC6741D00BE6EBC /* language in CopyFiles */ = {isa = PBXBuildFile; fileRef = D4EC48E41C2637710024B507 /* language */; }; + F7D774AD1EC6741D00BE6EBC /* shaders in CopyFiles */ = {isa = PBXBuildFile; fileRef = D43407E11D0E14CE00C2B3D4 /* shaders */; }; + F7D774AE1EC6741D00BE6EBC /* title in CopyFiles */ = {isa = PBXBuildFile; fileRef = D4EC48E51C2637710024B507 /* title */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -643,6 +667,36 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + F7D774821EC66CD700BE6EBC /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + F7D774A11EC6715C00BE6EBC /* libSDL2_ttf.dylib in Embed Frameworks */, + F7D774A21EC6715C00BE6EBC /* libSDL2.dylib in Embed Frameworks */, + F7D774971EC6705F00BE6EBC /* libcrypto.dylib in Embed Frameworks */, + F7D774981EC6705F00BE6EBC /* libfreetype.dylib in Embed Frameworks */, + F7D774991EC6705F00BE6EBC /* libjansson.dylib in Embed Frameworks */, + F7D7749A1EC6705F00BE6EBC /* libpng16.dylib in Embed Frameworks */, + F7D7749B1EC6705F00BE6EBC /* libspeexdsp.dylib in Embed Frameworks */, + F7D7749C1EC6705F00BE6EBC /* libzip.dylib in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + F7D774AA1EC6740D00BE6EBC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 6; + files = ( + F7D774AC1EC6741D00BE6EBC /* language in CopyFiles */, + F7D774AD1EC6741D00BE6EBC /* shaders in CopyFiles */, + F7D774AE1EC6741D00BE6EBC /* title in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -1650,6 +1704,7 @@ F76C882B1EC4E91600FA49E2 /* OpenRCT2.rc */ = {isa = PBXFileReference; lastKnownFileType = text; path = OpenRCT2.rc; sourceTree = ""; }; F76C882C1EC4E91600FA49E2 /* resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = ""; }; F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UiContext.macOS.mm; sourceTree = ""; }; + F7D774841EC66CD700BE6EBC /* OpenRCT2-cli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "OpenRCT2-cli"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1678,6 +1733,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F7D774811EC66CD700BE6EBC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F7D7748D1EC66F8600BE6EBC /* libopenrct2.a in Frameworks */, + F7D774901EC66FB000BE6EBC /* libz.tbd in Frameworks */, + F7D7748F1EC66FA900BE6EBC /* libcurl.tbd in Frameworks */, + F7D7748E1EC66FA000BE6EBC /* libiconv.tbd in Frameworks */, + F7D774911EC66FBA00BE6EBC /* libcrypto.dylib in Frameworks */, + F7D774921EC66FBA00BE6EBC /* libfreetype.dylib in Frameworks */, + F7D774931EC66FBA00BE6EBC /* libjansson.dylib in Frameworks */, + F7D774941EC66FBA00BE6EBC /* libpng16.dylib in Frameworks */, + F7D774A01EC6714C00BE6EBC /* libSDL2.dylib in Frameworks */, + F7D7749F1EC6714C00BE6EBC /* libSDL2_ttf.dylib in Frameworks */, + F7D774951EC66FBA00BE6EBC /* libspeexdsp.dylib in Frameworks */, + F7D774961EC66FBA00BE6EBC /* libzip.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -2153,6 +2227,7 @@ D497D0781C20FD52002BF46A /* OpenRCT2.app */, C64FDA5D1D6D99F400F259B9 /* PaintTest */, F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */, + F7D774841EC66CD700BE6EBC /* OpenRCT2-cli */, ); name = Products; sourceTree = ""; @@ -3339,6 +3414,26 @@ productReference = F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */; productType = "com.apple.product-type.library.static"; }; + F7D774831EC66CD700BE6EBC /* OpenRCT2-cli */ = { + isa = PBXNativeTarget; + buildConfigurationList = F7D7748A1EC66CD700BE6EBC /* Build configuration list for PBXNativeTarget "OpenRCT2-cli" */; + buildPhases = ( + F7D7748B1EC66E6600BE6EBC /* Download Libraries */, + F7D7748C1EC66E9300BE6EBC /* Get Git Variables */, + F7D774801EC66CD700BE6EBC /* Sources */, + F7D774811EC66CD700BE6EBC /* Frameworks */, + F7D774821EC66CD700BE6EBC /* Embed Frameworks */, + F7D774AA1EC6740D00BE6EBC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "OpenRCT2-cli"; + productName = "OpenRCT2-cli"; + productReference = F7D774841EC66CD700BE6EBC /* OpenRCT2-cli */; + productType = "com.apple.product-type.tool"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -3358,6 +3453,10 @@ CreatedOnToolsVersion = 8.3.2; ProvisioningStyle = Automatic; }; + F7D774831EC66CD700BE6EBC = { + CreatedOnToolsVersion = 8.3.2; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = D497D0731C20FD52002BF46A /* Build configuration list for PBXProject "OpenRCT2" */; @@ -3376,6 +3475,7 @@ D497D0771C20FD52002BF46A /* OpenRCT2 */, C64FDA5C1D6D99F400F259B9 /* PaintTest */, F76C80991EC4D9FA00FA49E2 /* libopenrct2 */, + F7D774831EC66CD700BE6EBC /* OpenRCT2-cli */, ); }; /* End PBXProject section */ @@ -3541,6 +3641,36 @@ shellPath = /bin/sh; shellScript = "echo \"#define\" OPENRCT2_BRANCH \\\"$(git rev-parse --abbrev-ref HEAD)\\\" > \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1 \\\"$(git rev-parse HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1_SHORT \\\"$(git rev-parse --short HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\ncp \"${SRCROOT}/distribution/macos/Info.plist\" \"${DERIVED_FILE_DIR}/Info.plist\"\nplutil -replace CFBundleVersion -string \"$(git rev-parse --short HEAD)\" \"${DERIVED_FILE_DIR}/Info.plist\""; }; + F7D7748B1EC66E6600BE6EBC /* Download Libraries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Download Libraries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi"; + }; + F7D7748C1EC66E9300BE6EBC /* Get Git Variables */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Get Git Variables"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/gitversion.h", + "$(DERIVED_FILE_DIR)/Info.plist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"#define\" OPENRCT2_BRANCH \\\"$(git rev-parse --abbrev-ref HEAD)\\\" > \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1 \\\"$(git rev-parse HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1_SHORT \\\"$(git rev-parse --short HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\ncp \"${SRCROOT}/distribution/macos/Info.plist\" \"${DERIVED_FILE_DIR}/Info.plist\"\nplutil -replace CFBundleVersion -string \"$(git rev-parse --short HEAD)\" \"${DERIVED_FILE_DIR}/Info.plist\""; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -4307,6 +4437,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F7D774801EC66CD700BE6EBC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F7D7749E1EC6713200BE6EBC /* Cli.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -4661,6 +4799,72 @@ }; name = Release; }; + F7D774881EC66CD700BE6EBC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CODE_SIGN_IDENTITY = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + NO_RCT2, + __ENABLE_LIGHTFX__, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + "$(SRCROOT)/libxc/include/libpng16", + "$(SRCROOT)/libxc/include/openssl", + "$(SRCROOT)/src/", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libxc/lib", + ); + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + F7D774891EC66CD700BE6EBC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = NO; + CODE_SIGN_IDENTITY = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_PREPROCESSOR_DEFINITIONS = ( + OPENGL_NO_LINK, + "OPENRCT2_BUILD_INFO_HEADER=\"\\\"$(DERIVED_FILE_DIR)/gitversion.h\\\"\"", + NO_RCT2, + __ENABLE_LIGHTFX__, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/libxc/include", + "$(SRCROOT)/libxc/include/SDL2", + "$(SRCROOT)/libxc/include/libpng16", + "$(SRCROOT)/libxc/include/openssl", + "$(SRCROOT)/src/", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/libxc/lib", + ); + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -4700,6 +4904,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + F7D7748A1EC66CD700BE6EBC /* Build configuration list for PBXNativeTarget "OpenRCT2-cli" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F7D774881EC66CD700BE6EBC /* Debug */, + F7D774891EC66CD700BE6EBC /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = D497D0701C20FD52002BF46A /* Project object */; From ee9aa550831adb83f4bb60053ad68b57e860b760 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 13 May 2017 20:06:46 +0100 Subject: [PATCH 49/76] Fix more warnings --- src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp | 2 +- src/openrct2/audio/AudioMixer.cpp | 2 -- src/openrct2/audio/AudioMixer.h | 2 ++ src/openrct2/common.h | 1 + src/openrct2/localisation/localisation.c | 2 ++ 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index daff9fa039..7cc0657692 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index 3594c4a151..ec4c060dbf 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -28,8 +28,6 @@ extern "C" #include "../rct2.h" } -#define SDL_MIX_MAXVOLUME 128 - using namespace OpenRCT2; using namespace OpenRCT2::Audio; diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index 51c65d3db3..1a9bbd2d3b 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -18,6 +18,8 @@ #include "../common.h" +#define SDL_MIX_MAXVOLUME 128 + #define MIXER_LOOP_NONE 0 #define MIXER_LOOP_INFINITE -1 diff --git a/src/openrct2/common.h b/src/openrct2/common.h index 14209e0ef3..2aae3fbad9 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/src/openrct2/localisation/localisation.c b/src/openrct2/localisation/localisation.c index 61da4a4b13..51211875b1 100644 --- a/src/openrct2/localisation/localisation.c +++ b/src/openrct2/localisation/localisation.c @@ -16,6 +16,8 @@ #include "../common.h" +#include + #ifdef __WINDOWS__ #include #else From 90fbb29d9324cab08d413275099034c12061de48 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 13 May 2017 21:09:21 +0200 Subject: [PATCH 50/76] Tidy up Xcode project --- OpenRCT2.xcodeproj/project.pbxproj | 502 ++++++++--------------------- 1 file changed, 126 insertions(+), 376 deletions(-) diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 312de21e66..237a0ba5db 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -6,6 +6,20 @@ objectVersion = 46; objects = { +/* Begin PBXAggregateTarget section */ + C68B2D431EC790690020651C /* Download Libraries */ = { + isa = PBXAggregateTarget; + buildConfigurationList = C68B2D461EC790690020651C /* Build configuration list for PBXAggregateTarget "Download Libraries" */; + buildPhases = ( + C68B2D471EC790710020651C /* Download Libraries */, + ); + dependencies = ( + ); + name = "Download Libraries"; + productName = "Download Libraries"; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ C606CCBE1DB4054000FE4015 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = C606CCAB1DB4054000FE4015 /* compat.c */; }; C606CCBF1DB4054000FE4015 /* data.c in Sources */ = {isa = PBXBuildFile; fileRef = C606CCAC1DB4054000FE4015 /* data.c */; }; @@ -630,6 +644,27 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + C68B2D481EC790970020651C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D497D0701C20FD52002BF46A /* Project object */; + proxyType = 1; + remoteGlobalIDString = C68B2D431EC790690020651C; + remoteInfo = "Download Libraries"; + }; + C68B2D4A1EC7909B0020651C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D497D0701C20FD52002BF46A /* Project object */; + proxyType = 1; + remoteGlobalIDString = C68B2D431EC790690020651C; + remoteInfo = "Download Libraries"; + }; + C68B2D4C1EC7909E0020651C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D497D0701C20FD52002BF46A /* Project object */; + proxyType = 1; + remoteGlobalIDString = F76C80991EC4D9FA00FA49E2; + remoteInfo = libopenrct2; + }; F76C888F1EC5325700FA49E2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D497D0701C20FD52002BF46A /* Project object */; @@ -1031,8 +1066,6 @@ D4EC48E41C2637710024B507 /* language */ = {isa = PBXFileReference; lastKnownFileType = folder; name = language; path = data/language; sourceTree = SOURCE_ROOT; }; D4EC48E51C2637710024B507 /* title */ = {isa = PBXFileReference; lastKnownFileType = folder; name = title; path = data/title; sourceTree = SOURCE_ROOT; }; F76C809A1EC4D9FA00FA49E2 /* libopenrct2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenrct2.a; sourceTree = BUILT_PRODUCTS_DIR; }; - F76C80A01EC4DD9400FA49E2 /* shaders */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shaders; path = data/shaders; sourceTree = ""; }; - F76C82A11EC4E50D00FA49E2 /* resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = resource.h; path = resources/resource.h; sourceTree = ""; }; F76C83571EC4E7CC00FA49E2 /* audio.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = audio.cpp; sourceTree = ""; }; F76C83581EC4E7CC00FA49E2 /* audio.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; }; F76C83591EC4E7CC00FA49E2 /* AudioChannel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioChannel.h; sourceTree = ""; }; @@ -1591,118 +1624,6 @@ F76C85AD1EC4E82600FA49E2 /* UiContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UiContext.h; sourceTree = ""; }; F76C85AE1EC4E82600FA49E2 /* UiContext.Linux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Linux.cpp; sourceTree = ""; }; F76C85AF1EC4E82600FA49E2 /* UiContext.Win32.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Win32.cpp; sourceTree = ""; }; - F76C87B61EC4E91500FA49E2 /* 7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 7.png; sourceTree = ""; }; - F76C87B71EC4E91500FA49E2 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = ""; }; - F76C87B91EC4E91500FA49E2 /* 29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 29.png; sourceTree = ""; }; - F76C87BA1EC4E91500FA49E2 /* 30.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 30.png; sourceTree = ""; }; - F76C87BB1EC4E91500FA49E2 /* 31.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 31.png; sourceTree = ""; }; - F76C87BC1EC4E91500FA49E2 /* 32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 32.png; sourceTree = ""; }; - F76C87BD1EC4E91500FA49E2 /* 58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 58.png; sourceTree = ""; }; - F76C87BE1EC4E91500FA49E2 /* cheats.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cheats.png; sourceTree = ""; }; - F76C87BF1EC4E91500FA49E2 /* copy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copy.png; sourceTree = ""; }; - F76C87C01EC4E91500FA49E2 /* fast_forward.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fast_forward.png; sourceTree = ""; }; - F76C87C11EC4E91500FA49E2 /* game_speed_indicator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = game_speed_indicator.png; sourceTree = ""; }; - F76C87C21EC4E91500FA49E2 /* game_speed_indicator_double.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = game_speed_indicator_double.png; sourceTree = ""; }; - F76C87C31EC4E91500FA49E2 /* large_scenery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = large_scenery.png; sourceTree = ""; }; - F76C87C41EC4E91500FA49E2 /* map_gen_land.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_land.png; sourceTree = ""; }; - F76C87C51EC4E91500FA49E2 /* map_gen_noise.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_noise.png; sourceTree = ""; }; - F76C87C61EC4E91500FA49E2 /* map_gen_trees.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = map_gen_trees.png; sourceTree = ""; }; - F76C87C71EC4E91500FA49E2 /* multiplayer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = multiplayer.png; sourceTree = ""; }; - F76C87C81EC4E91500FA49E2 /* mute.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mute.png; sourceTree = ""; }; - F76C87C91EC4E91500FA49E2 /* mute_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mute_pressed.png; sourceTree = ""; }; - F76C87CA1EC4E91500FA49E2 /* paste.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paste.png; sourceTree = ""; }; - F76C87CB1EC4E91500FA49E2 /* paths.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paths.png; sourceTree = ""; }; - F76C87CC1EC4E91500FA49E2 /* rct1_close_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_off.png; sourceTree = ""; }; - F76C87CD1EC4E91500FA49E2 /* rct1_close_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_off_pressed.png; sourceTree = ""; }; - F76C87CE1EC4E91500FA49E2 /* rct1_close_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_on.png; sourceTree = ""; }; - F76C87CF1EC4E91500FA49E2 /* rct1_close_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_close_on_pressed.png; sourceTree = ""; }; - F76C87D01EC4E91500FA49E2 /* rct1_open_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_off.png; sourceTree = ""; }; - F76C87D11EC4E91500FA49E2 /* rct1_open_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_off_pressed.png; sourceTree = ""; }; - F76C87D21EC4E91500FA49E2 /* rct1_open_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_on.png; sourceTree = ""; }; - F76C87D31EC4E91500FA49E2 /* rct1_open_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_open_on_pressed.png; sourceTree = ""; }; - F76C87D41EC4E91500FA49E2 /* rct1_test_off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_off.png; sourceTree = ""; }; - F76C87D51EC4E91500FA49E2 /* rct1_test_off_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_off_pressed.png; sourceTree = ""; }; - F76C87D61EC4E91500FA49E2 /* rct1_test_on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_on.png; sourceTree = ""; }; - F76C87D71EC4E91500FA49E2 /* rct1_test_on_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rct1_test_on_pressed.png; sourceTree = ""; }; - F76C87D81EC4E91500FA49E2 /* server_password.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = server_password.png; sourceTree = ""; }; - F76C87D91EC4E91500FA49E2 /* small_scenery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = small_scenery.png; sourceTree = ""; }; - F76C87DA1EC4E91500FA49E2 /* sort.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sort.png; sourceTree = ""; }; - F76C87DB1EC4E91500FA49E2 /* tab_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tab_disabled.png; sourceTree = ""; }; - F76C87DC1EC4E91500FA49E2 /* twitch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = twitch.png; sourceTree = ""; }; - F76C87DD1EC4E91500FA49E2 /* unmute.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unmute.png; sourceTree = ""; }; - F76C87DE1EC4E91500FA49E2 /* unmute_pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unmute_pressed.png; sourceTree = ""; }; - F76C87DF1EC4E91500FA49E2 /* zoom_in.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_in.png; sourceTree = ""; }; - F76C87E01EC4E91500FA49E2 /* zoom_in_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_in_background.png; sourceTree = ""; }; - F76C87E11EC4E91500FA49E2 /* zoom_out.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_out.png; sourceTree = ""; }; - F76C87E21EC4E91500FA49E2 /* zoom_out_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoom_out_background.png; sourceTree = ""; }; - F76C87E31EC4E91500FA49E2 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; - F76C87E41EC4E91500FA49E2 /* logo_text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo_text.png; sourceTree = ""; }; - F76C87E51EC4E91500FA49E2 /* sprites.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = sprites.json; sourceTree = ""; }; - F76C87E81EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; - F76C87E91EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; - F76C87EB1EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; - F76C87EC1EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; - F76C87EE1EC4E91500FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; - F76C87EF1EC4E91500FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; - F76C87F01EC4E91500FA49E2 /* flat_to_steep_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_1.png; sourceTree = ""; }; - F76C87F11EC4E91500FA49E2 /* flat_to_steep_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_2_1.png; sourceTree = ""; }; - F76C87F21EC4E91500FA49E2 /* flat_to_steep_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_2_2.png; sourceTree = ""; }; - F76C87F31EC4E91500FA49E2 /* flat_to_steep_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_3_1.png; sourceTree = ""; }; - F76C87F41EC4E91500FA49E2 /* flat_to_steep_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_3_2.png; sourceTree = ""; }; - F76C87F51EC4E91500FA49E2 /* flat_to_steep_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_4.png; sourceTree = ""; }; - F76C87F61EC4E91500FA49E2 /* flat_to_steep_diagonal_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_1.png; sourceTree = ""; }; - F76C87F71EC4E91500FA49E2 /* flat_to_steep_diagonal_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_2.png; sourceTree = ""; }; - F76C87F81EC4E91500FA49E2 /* flat_to_steep_diagonal_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_3.png; sourceTree = ""; }; - F76C87F91EC4E91500FA49E2 /* flat_to_steep_diagonal_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_4.png; sourceTree = ""; }; - F76C87FA1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_1.png; sourceTree = ""; }; - F76C87FB1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_2.png; sourceTree = ""; }; - F76C87FC1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_3.png; sourceTree = ""; }; - F76C87FD1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_diagonal_lift_4.png; sourceTree = ""; }; - F76C87FE1EC4E91500FA49E2 /* flat_to_steep_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_1.png; sourceTree = ""; }; - F76C87FF1EC4E91500FA49E2 /* flat_to_steep_lift_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_2_1.png; sourceTree = ""; }; - F76C88001EC4E91500FA49E2 /* flat_to_steep_lift_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_2_2.png; sourceTree = ""; }; - F76C88011EC4E91500FA49E2 /* flat_to_steep_lift_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_3_1.png; sourceTree = ""; }; - F76C88021EC4E91500FA49E2 /* flat_to_steep_lift_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_3_2.png; sourceTree = ""; }; - F76C88031EC4E91500FA49E2 /* flat_to_steep_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = flat_to_steep_lift_4.png; sourceTree = ""; }; - F76C88041EC4E91500FA49E2 /* steep_to_flat_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_1.png; sourceTree = ""; }; - F76C88051EC4E91600FA49E2 /* steep_to_flat_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_2_1.png; sourceTree = ""; }; - F76C88061EC4E91600FA49E2 /* steep_to_flat_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_2_2.png; sourceTree = ""; }; - F76C88071EC4E91600FA49E2 /* steep_to_flat_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_3_1.png; sourceTree = ""; }; - F76C88081EC4E91600FA49E2 /* steep_to_flat_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_3_2.png; sourceTree = ""; }; - F76C88091EC4E91600FA49E2 /* steep_to_flat_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_4.png; sourceTree = ""; }; - F76C880A1EC4E91600FA49E2 /* steep_to_flat_diagonal_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_1.png; sourceTree = ""; }; - F76C880B1EC4E91600FA49E2 /* steep_to_flat_diagonal_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_2.png; sourceTree = ""; }; - F76C880C1EC4E91600FA49E2 /* steep_to_flat_diagonal_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_3.png; sourceTree = ""; }; - F76C880D1EC4E91600FA49E2 /* steep_to_flat_diagonal_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_4.png; sourceTree = ""; }; - F76C880E1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_1.png; sourceTree = ""; }; - F76C880F1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_2.png; sourceTree = ""; }; - F76C88101EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_3.png; sourceTree = ""; }; - F76C88111EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_diagonal_lift_4.png; sourceTree = ""; }; - F76C88121EC4E91600FA49E2 /* steep_to_flat_lift_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_1.png; sourceTree = ""; }; - F76C88131EC4E91600FA49E2 /* steep_to_flat_lift_2_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_2_1.png; sourceTree = ""; }; - F76C88141EC4E91600FA49E2 /* steep_to_flat_lift_2_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_2_2.png; sourceTree = ""; }; - F76C88151EC4E91600FA49E2 /* steep_to_flat_lift_3_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_3_1.png; sourceTree = ""; }; - F76C88161EC4E91600FA49E2 /* steep_to_flat_lift_3_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_3_2.png; sourceTree = ""; }; - F76C88171EC4E91600FA49E2 /* steep_to_flat_lift_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = steep_to_flat_lift_4.png; sourceTree = ""; }; - F76C88191EC4E91600FA49E2 /* booster_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_1.png; sourceTree = ""; }; - F76C881A1EC4E91600FA49E2 /* booster_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = booster_2.png; sourceTree = ""; }; - F76C881C1EC4E91600FA49E2 /* icon.ico */ = {isa = PBXFileReference; lastKnownFileType = image.ico; path = icon.ico; sourceTree = ""; }; - F76C881D1EC4E91600FA49E2 /* icon_flag.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = icon_flag.svg; sourceTree = ""; }; - F76C881E1EC4E91600FA49E2 /* icon_noflag.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = icon_noflag.svg; sourceTree = ""; }; - F76C881F1EC4E91600FA49E2 /* icon_x1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x1024.png; sourceTree = ""; }; - F76C88201EC4E91600FA49E2 /* icon_x128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x128.png; sourceTree = ""; }; - F76C88211EC4E91600FA49E2 /* icon_x16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x16.png; sourceTree = ""; }; - F76C88221EC4E91600FA49E2 /* icon_x2048.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x2048.png; sourceTree = ""; }; - F76C88231EC4E91600FA49E2 /* icon_x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x256.png; sourceTree = ""; }; - F76C88241EC4E91600FA49E2 /* icon_x32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x32.png; sourceTree = ""; }; - F76C88251EC4E91600FA49E2 /* icon_x4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x4.png; sourceTree = ""; }; - F76C88261EC4E91600FA49E2 /* icon_x40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x40.png; sourceTree = ""; }; - F76C88271EC4E91600FA49E2 /* icon_x512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x512.png; sourceTree = ""; }; - F76C88281EC4E91600FA49E2 /* icon_x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x64.png; sourceTree = ""; }; - F76C88291EC4E91600FA49E2 /* icon_x8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_x8.png; sourceTree = ""; }; - F76C882A1EC4E91600FA49E2 /* makeico.linq */ = {isa = PBXFileReference; lastKnownFileType = text; path = makeico.linq; sourceTree = ""; }; - F76C882B1EC4E91600FA49E2 /* OpenRCT2.rc */ = {isa = PBXFileReference; lastKnownFileType = text; path = OpenRCT2.rc; sourceTree = ""; }; - F76C882C1EC4E91600FA49E2 /* resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = ""; }; F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UiContext.macOS.mm; sourceTree = ""; }; F7D774841EC66CD700BE6EBC /* OpenRCT2-cli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "OpenRCT2-cli"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -2016,7 +1937,6 @@ D41B72431C21015A0080A7B9 /* Sources */ = { isa = PBXGroup; children = ( - F76C87B41EC4E91500FA49E2 /* resources */, F76C85801EC4E82600FA49E2 /* openrct2-ui */, F76C857C1EC4E80E00FA49E2 /* openrct2-cli */, F76C83551EC4E7CC00FA49E2 /* libopenrct2 */, @@ -2210,8 +2130,6 @@ D497D06F1C20FD52002BF46A = { isa = PBXGroup; children = ( - F76C82A11EC4E50D00FA49E2 /* resource.h */, - F76C80A01EC4DD9400FA49E2 /* shaders */, D41B72431C21015A0080A7B9 /* Sources */, D497D07A1C20FD52002BF46A /* Resources */, 8546F74A1D7E1D220004004C /* Tests */, @@ -2299,19 +2217,37 @@ isa = PBXGroup; children = ( F76C83561EC4E7CC00FA49E2 /* audio */, + F76C83621EC4E7CC00FA49E2 /* cmdline */, + F76C836D1EC4E7CC00FA49E2 /* config */, + F76C83781EC4E7CC00FA49E2 /* core */, + F76C839D1EC4E7CC00FA49E2 /* drawing */, + F76C83BB1EC4E7CC00FA49E2 /* interface */, + F76C83D71EC4E7CC00FA49E2 /* localisation */, + F76C83EA1EC4E7CC00FA49E2 /* management */, + F76C83F51EC4E7CC00FA49E2 /* network */, + F76C84111EC4E7CC00FA49E2 /* object */, + F76C843A1EC4E7CC00FA49E2 /* paint */, + F76C84531EC4E7CC00FA49E2 /* peep */, + F76C84591EC4E7CC00FA49E2 /* platform */, + F76C84661EC4E7CC00FA49E2 /* rct1 */, + F76C846C1EC4E7CC00FA49E2 /* rct12 */, + F76C84761EC4E7CC00FA49E2 /* rct2 */, + F76C84831EC4E7CC00FA49E2 /* ride */, + F76C84F31EC4E7CD00FA49E2 /* scenario */, + F76C84FB1EC4E7CD00FA49E2 /* title */, + F76C85041EC4E7CD00FA49E2 /* ui */, + F76C85061EC4E7CD00FA49E2 /* util */, + F76C850D1EC4E7CD00FA49E2 /* windows */, + F76C855B1EC4E7CD00FA49E2 /* world */, F76C835F1EC4E7CC00FA49E2 /* cheats.c */, F76C83601EC4E7CC00FA49E2 /* cheats.h */, - F76C83621EC4E7CC00FA49E2 /* cmdline */, F76C836A1EC4E7CC00FA49E2 /* cmdline_sprite.c */, F76C836B1EC4E7CC00FA49E2 /* cmdline_sprite.h */, F76C836C1EC4E7CC00FA49E2 /* common.h */, - F76C836D1EC4E7CC00FA49E2 /* config */, F76C83761EC4E7CC00FA49E2 /* Context.cpp */, F76C83771EC4E7CC00FA49E2 /* Context.h */, - F76C83781EC4E7CC00FA49E2 /* core */, F76C839B1EC4E7CC00FA49E2 /* diagnostic.c */, F76C839C1EC4E7CC00FA49E2 /* diagnostic.h */, - F76C839D1EC4E7CC00FA49E2 /* drawing */, F76C83B11EC4E7CC00FA49E2 /* editor.c */, F76C83B21EC4E7CC00FA49E2 /* editor.h */, F76C83B31EC4E7CC00FA49E2 /* FileClassifier.cpp */, @@ -2322,43 +2258,25 @@ F76C83B81EC4E7CC00FA49E2 /* Imaging.h */, F76C83B91EC4E7CC00FA49E2 /* input.c */, F76C83BA1EC4E7CC00FA49E2 /* input.h */, - F76C83BB1EC4E7CC00FA49E2 /* interface */, F76C83D41EC4E7CC00FA49E2 /* intro.c */, F76C83D51EC4E7CC00FA49E2 /* intro.h */, - F76C83D71EC4E7CC00FA49E2 /* localisation */, - F76C83EA1EC4E7CC00FA49E2 /* management */, - F76C83F51EC4E7CC00FA49E2 /* network */, - F76C84111EC4E7CC00FA49E2 /* object */, F76C84351EC4E7CC00FA49E2 /* object.h */, F76C84361EC4E7CC00FA49E2 /* object_list.c */, F76C84371EC4E7CC00FA49E2 /* object_list.h */, F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */, F76C84391EC4E7CC00FA49E2 /* OpenRCT2.h */, - F76C843A1EC4E7CC00FA49E2 /* paint */, F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */, F76C84521EC4E7CC00FA49E2 /* ParkImporter.h */, - F76C84531EC4E7CC00FA49E2 /* peep */, - F76C84591EC4E7CC00FA49E2 /* platform */, F76C84641EC4E7CC00FA49E2 /* PlatformEnvironment.cpp */, F76C84651EC4E7CC00FA49E2 /* PlatformEnvironment.h */, - F76C84661EC4E7CC00FA49E2 /* rct1 */, F76C846A1EC4E7CC00FA49E2 /* rct1.c */, F76C846B1EC4E7CC00FA49E2 /* rct1.h */, - F76C846C1EC4E7CC00FA49E2 /* rct12 */, F76C84751EC4E7CC00FA49E2 /* rct12.h */, - F76C84761EC4E7CC00FA49E2 /* rct2 */, F76C84801EC4E7CC00FA49E2 /* rct2.c */, F76C84811EC4E7CC00FA49E2 /* rct2.h */, - F76C84831EC4E7CC00FA49E2 /* ride */, - F76C84F31EC4E7CD00FA49E2 /* scenario */, F76C84FA1EC4E7CD00FA49E2 /* sprites.h */, - F76C84FB1EC4E7CD00FA49E2 /* title */, - F76C85041EC4E7CD00FA49E2 /* ui */, - F76C85061EC4E7CD00FA49E2 /* util */, F76C850B1EC4E7CD00FA49E2 /* Version.cpp */, F76C850C1EC4E7CD00FA49E2 /* Version.h */, - F76C850D1EC4E7CD00FA49E2 /* windows */, - F76C855B1EC4E7CD00FA49E2 /* world */, ); name = libopenrct2; sourceTree = ""; @@ -2627,10 +2545,10 @@ isa = PBXGroup; children = ( F76C843B1EC4E7CC00FA49E2 /* map_element */, + F76C84491EC4E7CC00FA49E2 /* sprite */, F76C84461EC4E7CC00FA49E2 /* paint.c */, F76C84471EC4E7CC00FA49E2 /* paint.h */, F76C84481EC4E7CC00FA49E2 /* paint_helpers.c */, - F76C84491EC4E7CC00FA49E2 /* sprite */, F76C844F1EC4E7CC00FA49E2 /* supports.c */, F76C84501EC4E7CC00FA49E2 /* supports.h */, ); @@ -2739,20 +2657,22 @@ F76C84831EC4E7CC00FA49E2 /* ride */ = { isa = PBXGroup; children = ( - F76C84841EC4E7CC00FA49E2 /* cable_lift.c */, - F76C84851EC4E7CC00FA49E2 /* cable_lift.h */, F76C84861EC4E7CC00FA49E2 /* coaster */, F76C84A91EC4E7CC00FA49E2 /* gentle */, + F76C84C01EC4E7CC00FA49E2 /* shops */, + F76C84C61EC4E7CC00FA49E2 /* thrill */, + F76C84DE1EC4E7CD00FA49E2 /* transport */, + F76C84EA1EC4E7CD00FA49E2 /* water */, + F76C84841EC4E7CC00FA49E2 /* cable_lift.c */, + F76C84851EC4E7CC00FA49E2 /* cable_lift.h */, F76C84BA1EC4E7CC00FA49E2 /* ride.c */, F76C84BB1EC4E7CC00FA49E2 /* ride.h */, F76C84BC1EC4E7CC00FA49E2 /* ride_data.c */, F76C84BD1EC4E7CC00FA49E2 /* ride_data.h */, F76C84BE1EC4E7CC00FA49E2 /* ride_ratings.c */, F76C84BF1EC4E7CC00FA49E2 /* ride_ratings.h */, - F76C84C01EC4E7CC00FA49E2 /* shops */, F76C84C41EC4E7CC00FA49E2 /* station.c */, F76C84C51EC4E7CC00FA49E2 /* station.h */, - F76C84C61EC4E7CC00FA49E2 /* thrill */, F76C84D21EC4E7CC00FA49E2 /* track.c */, F76C84D31EC4E7CC00FA49E2 /* track.h */, F76C84D41EC4E7CC00FA49E2 /* track_data.c */, @@ -2765,14 +2685,12 @@ F76C84DB1EC4E7CD00FA49E2 /* track_paint.h */, F76C84DC1EC4E7CD00FA49E2 /* TrackDesignRepository.cpp */, F76C84DD1EC4E7CD00FA49E2 /* TrackDesignRepository.h */, - F76C84DE1EC4E7CD00FA49E2 /* transport */, F76C84E41EC4E7CD00FA49E2 /* vehicle.c */, F76C84E51EC4E7CD00FA49E2 /* vehicle.h */, F76C84E61EC4E7CD00FA49E2 /* vehicle_data.c */, F76C84E71EC4E7CD00FA49E2 /* vehicle_data.h */, F76C84E81EC4E7CD00FA49E2 /* vehicle_paint.c */, F76C84E91EC4E7CD00FA49E2 /* vehicle_paint.h */, - F76C84EA1EC4E7CD00FA49E2 /* water */, ); path = ride; sourceTree = ""; @@ -3079,10 +2997,10 @@ isa = PBXGroup; children = ( F76C85811EC4E82600FA49E2 /* audio */, + F76C858D1EC4E82600FA49E2 /* drawing */, F76C858A1EC4E82600FA49E2 /* CursorData.cpp */, F76C858B1EC4E82600FA49E2 /* CursorRepository.cpp */, F76C858C1EC4E82600FA49E2 /* CursorRepository.h */, - F76C858D1EC4E82600FA49E2 /* drawing */, F76C85A81EC4E82600FA49E2 /* SDLException.h */, F76C85A91EC4E82600FA49E2 /* TextComposition.cpp */, F76C85AA1EC4E82600FA49E2 /* TextComposition.h */, @@ -3122,8 +3040,8 @@ F76C858E1EC4E82600FA49E2 /* engines */ = { isa = PBXGroup; children = ( - F76C858F1EC4E82600FA49E2 /* DrawingEngines.h */, F76C85901EC4E82600FA49E2 /* opengl */, + F76C858F1EC4E82600FA49E2 /* DrawingEngines.h */, F76C85A61EC4E82600FA49E2 /* SoftwareDrawingEngine.cpp */, ); path = engines; @@ -3157,189 +3075,6 @@ path = opengl; sourceTree = ""; }; - F76C87B41EC4E91500FA49E2 /* resources */ = { - isa = PBXGroup; - children = ( - F76C87B51EC4E91500FA49E2 /* g2 */, - F76C881B1EC4E91600FA49E2 /* logo */, - F76C882B1EC4E91600FA49E2 /* OpenRCT2.rc */, - F76C882C1EC4E91600FA49E2 /* resource.h */, - ); - path = resources; - sourceTree = SOURCE_ROOT; - }; - F76C87B51EC4E91500FA49E2 /* g2 */ = { - isa = PBXGroup; - children = ( - F76C87B61EC4E91500FA49E2 /* 7.png */, - F76C87B71EC4E91500FA49E2 /* empty.png */, - F76C87B81EC4E91500FA49E2 /* icons */, - F76C87E31EC4E91500FA49E2 /* logo.png */, - F76C87E41EC4E91500FA49E2 /* logo_text.png */, - F76C87E51EC4E91500FA49E2 /* sprites.json */, - F76C87E61EC4E91500FA49E2 /* track */, - ); - path = g2; - sourceTree = ""; - }; - F76C87B81EC4E91500FA49E2 /* icons */ = { - isa = PBXGroup; - children = ( - F76C87B91EC4E91500FA49E2 /* 29.png */, - F76C87BA1EC4E91500FA49E2 /* 30.png */, - F76C87BB1EC4E91500FA49E2 /* 31.png */, - F76C87BC1EC4E91500FA49E2 /* 32.png */, - F76C87BD1EC4E91500FA49E2 /* 58.png */, - F76C87BE1EC4E91500FA49E2 /* cheats.png */, - F76C87BF1EC4E91500FA49E2 /* copy.png */, - F76C87C01EC4E91500FA49E2 /* fast_forward.png */, - F76C87C11EC4E91500FA49E2 /* game_speed_indicator.png */, - F76C87C21EC4E91500FA49E2 /* game_speed_indicator_double.png */, - F76C87C31EC4E91500FA49E2 /* large_scenery.png */, - F76C87C41EC4E91500FA49E2 /* map_gen_land.png */, - F76C87C51EC4E91500FA49E2 /* map_gen_noise.png */, - F76C87C61EC4E91500FA49E2 /* map_gen_trees.png */, - F76C87C71EC4E91500FA49E2 /* multiplayer.png */, - F76C87C81EC4E91500FA49E2 /* mute.png */, - F76C87C91EC4E91500FA49E2 /* mute_pressed.png */, - F76C87CA1EC4E91500FA49E2 /* paste.png */, - F76C87CB1EC4E91500FA49E2 /* paths.png */, - F76C87CC1EC4E91500FA49E2 /* rct1_close_off.png */, - F76C87CD1EC4E91500FA49E2 /* rct1_close_off_pressed.png */, - F76C87CE1EC4E91500FA49E2 /* rct1_close_on.png */, - F76C87CF1EC4E91500FA49E2 /* rct1_close_on_pressed.png */, - F76C87D01EC4E91500FA49E2 /* rct1_open_off.png */, - F76C87D11EC4E91500FA49E2 /* rct1_open_off_pressed.png */, - F76C87D21EC4E91500FA49E2 /* rct1_open_on.png */, - F76C87D31EC4E91500FA49E2 /* rct1_open_on_pressed.png */, - F76C87D41EC4E91500FA49E2 /* rct1_test_off.png */, - F76C87D51EC4E91500FA49E2 /* rct1_test_off_pressed.png */, - F76C87D61EC4E91500FA49E2 /* rct1_test_on.png */, - F76C87D71EC4E91500FA49E2 /* rct1_test_on_pressed.png */, - F76C87D81EC4E91500FA49E2 /* server_password.png */, - F76C87D91EC4E91500FA49E2 /* small_scenery.png */, - F76C87DA1EC4E91500FA49E2 /* sort.png */, - F76C87DB1EC4E91500FA49E2 /* tab_disabled.png */, - F76C87DC1EC4E91500FA49E2 /* twitch.png */, - F76C87DD1EC4E91500FA49E2 /* unmute.png */, - F76C87DE1EC4E91500FA49E2 /* unmute_pressed.png */, - F76C87DF1EC4E91500FA49E2 /* zoom_in.png */, - F76C87E01EC4E91500FA49E2 /* zoom_in_background.png */, - F76C87E11EC4E91500FA49E2 /* zoom_out.png */, - F76C87E21EC4E91500FA49E2 /* zoom_out_background.png */, - ); - path = icons; - sourceTree = ""; - }; - F76C87E61EC4E91500FA49E2 /* track */ = { - isa = PBXGroup; - children = ( - F76C87E71EC4E91500FA49E2 /* bm */, - F76C87EA1EC4E91500FA49E2 /* intamin */, - F76C87ED1EC4E91500FA49E2 /* junior */, - F76C88181EC4E91600FA49E2 /* mini */, - ); - path = track; - sourceTree = ""; - }; - F76C87E71EC4E91500FA49E2 /* bm */ = { - isa = PBXGroup; - children = ( - F76C87E81EC4E91500FA49E2 /* booster_1.png */, - F76C87E91EC4E91500FA49E2 /* booster_2.png */, - ); - path = bm; - sourceTree = ""; - }; - F76C87EA1EC4E91500FA49E2 /* intamin */ = { - isa = PBXGroup; - children = ( - F76C87EB1EC4E91500FA49E2 /* booster_1.png */, - F76C87EC1EC4E91500FA49E2 /* booster_2.png */, - ); - path = intamin; - sourceTree = ""; - }; - F76C87ED1EC4E91500FA49E2 /* junior */ = { - isa = PBXGroup; - children = ( - F76C87EE1EC4E91500FA49E2 /* booster_1.png */, - F76C87EF1EC4E91500FA49E2 /* booster_2.png */, - F76C87F01EC4E91500FA49E2 /* flat_to_steep_1.png */, - F76C87F11EC4E91500FA49E2 /* flat_to_steep_2_1.png */, - F76C87F21EC4E91500FA49E2 /* flat_to_steep_2_2.png */, - F76C87F31EC4E91500FA49E2 /* flat_to_steep_3_1.png */, - F76C87F41EC4E91500FA49E2 /* flat_to_steep_3_2.png */, - F76C87F51EC4E91500FA49E2 /* flat_to_steep_4.png */, - F76C87F61EC4E91500FA49E2 /* flat_to_steep_diagonal_1.png */, - F76C87F71EC4E91500FA49E2 /* flat_to_steep_diagonal_2.png */, - F76C87F81EC4E91500FA49E2 /* flat_to_steep_diagonal_3.png */, - F76C87F91EC4E91500FA49E2 /* flat_to_steep_diagonal_4.png */, - F76C87FA1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_1.png */, - F76C87FB1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_2.png */, - F76C87FC1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_3.png */, - F76C87FD1EC4E91500FA49E2 /* flat_to_steep_diagonal_lift_4.png */, - F76C87FE1EC4E91500FA49E2 /* flat_to_steep_lift_1.png */, - F76C87FF1EC4E91500FA49E2 /* flat_to_steep_lift_2_1.png */, - F76C88001EC4E91500FA49E2 /* flat_to_steep_lift_2_2.png */, - F76C88011EC4E91500FA49E2 /* flat_to_steep_lift_3_1.png */, - F76C88021EC4E91500FA49E2 /* flat_to_steep_lift_3_2.png */, - F76C88031EC4E91500FA49E2 /* flat_to_steep_lift_4.png */, - F76C88041EC4E91500FA49E2 /* steep_to_flat_1.png */, - F76C88051EC4E91600FA49E2 /* steep_to_flat_2_1.png */, - F76C88061EC4E91600FA49E2 /* steep_to_flat_2_2.png */, - F76C88071EC4E91600FA49E2 /* steep_to_flat_3_1.png */, - F76C88081EC4E91600FA49E2 /* steep_to_flat_3_2.png */, - F76C88091EC4E91600FA49E2 /* steep_to_flat_4.png */, - F76C880A1EC4E91600FA49E2 /* steep_to_flat_diagonal_1.png */, - F76C880B1EC4E91600FA49E2 /* steep_to_flat_diagonal_2.png */, - F76C880C1EC4E91600FA49E2 /* steep_to_flat_diagonal_3.png */, - F76C880D1EC4E91600FA49E2 /* steep_to_flat_diagonal_4.png */, - F76C880E1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_1.png */, - F76C880F1EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_2.png */, - F76C88101EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_3.png */, - F76C88111EC4E91600FA49E2 /* steep_to_flat_diagonal_lift_4.png */, - F76C88121EC4E91600FA49E2 /* steep_to_flat_lift_1.png */, - F76C88131EC4E91600FA49E2 /* steep_to_flat_lift_2_1.png */, - F76C88141EC4E91600FA49E2 /* steep_to_flat_lift_2_2.png */, - F76C88151EC4E91600FA49E2 /* steep_to_flat_lift_3_1.png */, - F76C88161EC4E91600FA49E2 /* steep_to_flat_lift_3_2.png */, - F76C88171EC4E91600FA49E2 /* steep_to_flat_lift_4.png */, - ); - path = junior; - sourceTree = ""; - }; - F76C88181EC4E91600FA49E2 /* mini */ = { - isa = PBXGroup; - children = ( - F76C88191EC4E91600FA49E2 /* booster_1.png */, - F76C881A1EC4E91600FA49E2 /* booster_2.png */, - ); - path = mini; - sourceTree = ""; - }; - F76C881B1EC4E91600FA49E2 /* logo */ = { - isa = PBXGroup; - children = ( - F76C881C1EC4E91600FA49E2 /* icon.ico */, - F76C881D1EC4E91600FA49E2 /* icon_flag.svg */, - F76C881E1EC4E91600FA49E2 /* icon_noflag.svg */, - F76C881F1EC4E91600FA49E2 /* icon_x1024.png */, - F76C88201EC4E91600FA49E2 /* icon_x128.png */, - F76C88211EC4E91600FA49E2 /* icon_x16.png */, - F76C88221EC4E91600FA49E2 /* icon_x2048.png */, - F76C88231EC4E91600FA49E2 /* icon_x256.png */, - F76C88241EC4E91600FA49E2 /* icon_x32.png */, - F76C88251EC4E91600FA49E2 /* icon_x4.png */, - F76C88261EC4E91600FA49E2 /* icon_x40.png */, - F76C88271EC4E91600FA49E2 /* icon_x512.png */, - F76C88281EC4E91600FA49E2 /* icon_x64.png */, - F76C88291EC4E91600FA49E2 /* icon_x8.png */, - F76C882A1EC4E91600FA49E2 /* makeico.linq */, - ); - path = logo; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -3375,7 +3110,6 @@ isa = PBXNativeTarget; buildConfigurationList = D497D0891C20FD53002BF46A /* Build configuration list for PBXNativeTarget "OpenRCT2" */; buildPhases = ( - D4EC48E91C264FC20024B507 /* Download Libraries */, D4E09E831E049C0600F53CE3 /* Download Title Sequences */, D4EC012A1C25532B00DAFE69 /* Setup AppIcon */, D4CA88671D4E962100060C11 /* Get Git Variables */, @@ -3389,6 +3123,7 @@ ); dependencies = ( F76C88901EC5325700FA49E2 /* PBXTargetDependency */, + C68B2D491EC790970020651C /* PBXTargetDependency */, ); name = OpenRCT2; productName = OpenRCT2; @@ -3399,7 +3134,6 @@ isa = PBXNativeTarget; buildConfigurationList = F76C809D1EC4D9FA00FA49E2 /* Build configuration list for PBXNativeTarget "libopenrct2" */; buildPhases = ( - F76C809E1EC4DAAB00FA49E2 /* Download Libraries */, F76C809F1EC4DB0300FA49E2 /* Get Git Variables */, F76C80961EC4D9FA00FA49E2 /* Sources */, F76C88381EC4EB5900FA49E2 /* Resources */, @@ -3408,6 +3142,7 @@ buildRules = ( ); dependencies = ( + C68B2D4B1EC7909B0020651C /* PBXTargetDependency */, ); name = libopenrct2; productName = libopenrct2; @@ -3418,7 +3153,6 @@ isa = PBXNativeTarget; buildConfigurationList = F7D7748A1EC66CD700BE6EBC /* Build configuration list for PBXNativeTarget "OpenRCT2-cli" */; buildPhases = ( - F7D7748B1EC66E6600BE6EBC /* Download Libraries */, F7D7748C1EC66E9300BE6EBC /* Get Git Variables */, F7D774801EC66CD700BE6EBC /* Sources */, F7D774811EC66CD700BE6EBC /* Frameworks */, @@ -3428,6 +3162,7 @@ buildRules = ( ); dependencies = ( + C68B2D4D1EC7909E0020651C /* PBXTargetDependency */, ); name = "OpenRCT2-cli"; productName = "OpenRCT2-cli"; @@ -3446,6 +3181,10 @@ C64FDA5C1D6D99F400F259B9 = { CreatedOnToolsVersion = 7.3.1; }; + C68B2D431EC790690020651C = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; D497D0771C20FD52002BF46A = { CreatedOnToolsVersion = 7.2; }; @@ -3476,6 +3215,7 @@ C64FDA5C1D6D99F400F259B9 /* PaintTest */, F76C80991EC4D9FA00FA49E2 /* libopenrct2 */, F7D774831EC66CD700BE6EBC /* OpenRCT2-cli */, + C68B2D431EC790690020651C /* Download Libraries */, ); }; /* End PBXProject section */ @@ -3520,6 +3260,20 @@ shellPath = /bin/sh; shellScript = "dd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_text\" bs=4096 skip=1 count=1187\ndd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 skip=1188 count=318\ndd if=/dev/zero of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 seek=318 count=2630 conv=notrunc\ndd if=\"${SRCROOT}/openrct2.exe\" of=\"${DERIVED_FILE_DIR}/openrct2_data\" bs=4096 skip=1506 seek=2948 count=1 conv=notrunc"; }; + C68B2D471EC790710020651C /* Download Libraries */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Download Libraries"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi"; + }; D42C09D21C254F4E00309751 /* Build g2.dat */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -3597,34 +3351,6 @@ shellPath = /bin/sh; shellScript = "if [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_16x16.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x16.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_16x16.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x32.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_32x32.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x32.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_32x32.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x64.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_128x128.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x128.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_128x128.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x256.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_256x256.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x256.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_256x256.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x512.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_512x512.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x512.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_512x512.png\"; fi\nif [[ ! -e \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png\" ]]; then ln \"${SRCROOT}/resources/logo/icon_x1024.png\" \"${SRCROOT}/distribution/macos/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png\"; fi"; }; - D4EC48E91C264FC20024B507 /* Download Libraries */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Download Libraries"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\n if [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\n mkdir \"${SRCROOT}/libxc\"\n\n curl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\n unzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\n rm \"${SRCROOT}/libxc/$zipname\"\n\n echo $version > \"${SRCROOT}/libversion\"\nfi"; - }; - F76C809E1EC4DAAB00FA49E2 /* Download Libraries */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Download Libraries"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi"; - }; F76C809F1EC4DB0300FA49E2 /* Get Git Variables */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -3641,20 +3367,6 @@ shellPath = /bin/sh; shellScript = "echo \"#define\" OPENRCT2_BRANCH \\\"$(git rev-parse --abbrev-ref HEAD)\\\" > \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1 \\\"$(git rev-parse HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\necho \"#define\" OPENRCT2_COMMIT_SHA1_SHORT \\\"$(git rev-parse --short HEAD)\\\" >> \"${DERIVED_FILE_DIR}/gitversion.h\"\ncp \"${SRCROOT}/distribution/macos/Info.plist\" \"${DERIVED_FILE_DIR}/Info.plist\"\nplutil -replace CFBundleVersion -string \"$(git rev-parse --short HEAD)\" \"${DERIVED_FILE_DIR}/Info.plist\""; }; - F7D7748B1EC66E6600BE6EBC /* Download Libraries */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Download Libraries"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "version=\"11\"\nzipname=\"openrct2-libs-macos.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi"; - }; F7D7748C1EC66E9300BE6EBC /* Get Git Variables */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -4448,6 +4160,21 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + C68B2D491EC790970020651C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C68B2D431EC790690020651C /* Download Libraries */; + targetProxy = C68B2D481EC790970020651C /* PBXContainerItemProxy */; + }; + C68B2D4B1EC7909B0020651C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C68B2D431EC790690020651C /* Download Libraries */; + targetProxy = C68B2D4A1EC7909B0020651C /* PBXContainerItemProxy */; + }; + C68B2D4D1EC7909E0020651C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F76C80991EC4D9FA00FA49E2 /* libopenrct2 */; + targetProxy = C68B2D4C1EC7909E0020651C /* PBXContainerItemProxy */; + }; F76C88901EC5325700FA49E2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = F76C80991EC4D9FA00FA49E2 /* libopenrct2 */; @@ -4554,6 +4281,20 @@ }; name = Release; }; + C68B2D441EC790690020651C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + C68B2D451EC790690020651C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; D497D0871C20FD53002BF46A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4877,6 +4618,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + C68B2D461EC790690020651C /* Build configuration list for PBXAggregateTarget "Download Libraries" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C68B2D441EC790690020651C /* Debug */, + C68B2D451EC790690020651C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; D497D0731C20FD52002BF46A /* Build configuration list for PBXProject "OpenRCT2" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -4911,6 +4660,7 @@ F7D774891EC66CD700BE6EBC /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From 7608f7f189c2bf194bcf4f72802e480cad8a0219 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 14 May 2017 21:07:16 +0200 Subject: [PATCH 51/76] Remove generated main.cpp --- OpenRCT2-cli/main.cpp | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 OpenRCT2-cli/main.cpp diff --git a/OpenRCT2-cli/main.cpp b/OpenRCT2-cli/main.cpp deleted file mode 100644 index bb10b3c50e..0000000000 --- a/OpenRCT2-cli/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// -// main.cpp -// OpenRCT2-cli -// -// Created by Richard Jenkins on 12/05/2017. -// Copyright © 2017 OpenRCT2. All rights reserved. -// - -#include - -int main(int argc, const char * argv[]) { - // insert code here... - std::cout << "Hello, World!\n"; - return 0; -} From 3a194f30dc1f600308b357c362dd7baec2547f9e Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 15 May 2017 00:11:55 +0200 Subject: [PATCH 52/76] Fix macOS compilation of library --- src/openrct2/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 3fa355600e..e9143188c7 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -54,7 +54,7 @@ if (NOT DISABLE_HTTP_TWITCH OR NOT DISABLE_NETWORK) PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) endif () if (NOT DISABLE_NETWORK) - PKG_CHECK_MODULES(SSL REQUIRED openssl>=1.0.0) + find_package(OpenSSL 1.0.0 REQUIRED) endif () # Third party libraries (which we want to eventually remove from libopenrct2) @@ -183,7 +183,7 @@ if (NOT DISABLE_NETWORK) ${SSL_STATIC_LIBRARIES}) else () target_link_libraries(${PROJECT} ${LIBCURL_LIBRARIES} - ${SSL_LIBRARIES}) + ${OPENSSL_LIBRARIES}) endif () endif () @@ -203,7 +203,7 @@ if (NOT DISABLE_TTF) endif () if (APPLE OR STATIC OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD") - find_library(ICONV_LIBRARIES NAMES c iconv libiconv libiconv-2) + find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) target_link_libraries(${PROJECT} ${ICONV_LIBRARIES}) endif() @@ -218,12 +218,17 @@ if (NOT DISABLE_HTTP_TWITCH OR NOT DISABLE_NETWORK) target_include_directories(${PROJECT} PRIVATE ${LIBCURL_INCLUDE_DIRS}) endif () if (NOT DISABLE_NETWORK) - target_include_directories(${PROJECT} PRIVATE ${SSL_INCLUDE_DIRS}) + target_include_directories(${PROJECT} PUBLIC ${OPENSSL_INCLUDE_DIR}) endif () if (NOT DISABLE_TTF AND UNIX AND NOT APPLE) target_include_directories(${PROJECT} PRIVATE ${FONTCONFIG_INCLUDE_DIRS}) endif () +# macOS builds fail on the use of tmpnam otherwise (#4959) +if(APPLE) + set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -Wno-error=deprecated-declarations -Wno-error=objc-method-access") +endif() + # Compiler flags set(DEBUG_LEVEL 0 CACHE STRING "Select debug level for compilation. Use value in range 0–3.") set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-aliasing -Werror -Wundef -Wmissing-declarations -Winit-self -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-missing-braces ") From 52552a9dc4bc55e708a84bdf23d0d664c7e0be3d Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 15 May 2017 00:12:30 +0200 Subject: [PATCH 53/76] Work on fixing openrct2-gui compilation --- src/openrct2-ui/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 1d514db2ab..535fa9f087 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -11,7 +11,6 @@ option(DISABLE_OPENGL "Disable OpenGL support.") include(FindPkgConfig) # Third party libraries -PKG_CHECK_MODULES(GL REQUIRED gl) PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) if (NOT DISABLE_OPENGL) # GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu. @@ -29,10 +28,18 @@ file(GLOB_RECURSE OPENRCT2_UI_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.h" "${CMAKE_CURRENT_LIST_DIR}/*.hpp") +if (APPLE) + file(GLOB_RECURSE OPENRCT2_UI_M_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.m") + set_source_files_properties(${OPENRCT2_UI_M_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c -fmodules") + + file(GLOB_RECURSE OPENRCT2_UI_MM_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.mm") + set_source_files_properties(${OPENRCT2_UI_MM_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++ -fmodules") +endif () + # Outputs set (PROJECT openrct2) project(${PROJECT}) -add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES}) +add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES} ${OPENRCT2_UI_M_SOURCES} ${OPENRCT2_UI_MM_SOURCES}) target_link_libraries(${PROJECT} "libopenrct2" ${SDL2_LIBRARIES} From 898ffdb8e0835ba86b2f47d2ff5e088c4c0cf845 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 17 May 2017 14:42:44 +0100 Subject: [PATCH 54/76] Fix #5487: Crash on deleting text --- src/openrct2-ui/TextComposition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index f211cd7aef..ed4cc1a8f0 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -287,7 +287,7 @@ void TextComposition::Delete() utf8 * buffer = _session.Buffer; utf8 * targetShiftPtr = buffer + _session.SelectionStart; utf8 * sourceShiftPtr = targetShiftPtr + _session.SelectionSize; - size_t shiftSize = _session.SelectionSize - _session.SelectionStart - _session.SelectionSize + 1; + size_t shiftSize = _session.Size - (_session.SelectionStart - _session.SelectionSize + 1); memmove(targetShiftPtr, sourceShiftPtr, shiftSize); _session.SelectionSize = 0; RecalculateLength(); From 999a467b9accee8207506beec1a006a40952c700 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 17 May 2017 16:31:44 +0100 Subject: [PATCH 55/76] Add SetKeysPressed() function to UiContext --- src/openrct2-ui/TextComposition.cpp | 5 ++--- src/openrct2-ui/UiContext.cpp | 6 ++++++ src/openrct2/ui/UiContext.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index ed4cc1a8f0..cf23667291 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -111,9 +111,8 @@ void TextComposition::HandleMessage(const SDL_Event * e) // Map Keypad enter to regular enter. key = SDLK_RETURN; } - - // _lastKeyPressed = e.key.keysym.sym; - // _keysPressed[e.key.keysym.scancode] = 1; + + GetContext()->GetUiContext()->SetKeysPressed(key, e->key.keysym.scancode); // Text input if (_session.Buffer == nullptr) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 894aa17490..492dade135 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -217,6 +217,12 @@ public: { SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE); } + + void SetKeysPressed(uint32 keysym, uint8 scancode) override + { + _lastKeyPressed = keysym; + _keysPressed[scancode] = 1; + } // Drawing IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 5a49cad541..9cb8cb980a 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -119,6 +119,7 @@ namespace OpenRCT2 virtual void SetCursorTrap(bool value) abstract; virtual const uint8 * GetKeysState() abstract; virtual const uint8 * GetKeysPressed() abstract; + virtual void SetKeysPressed(uint32 keysym, uint8 scancode) abstract; // Drawing virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; From aa5151503a780604e21878ea94b00ba3d2317d74 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 17 May 2017 16:36:53 +0100 Subject: [PATCH 56/76] Fix formatting --- src/openrct2-ui/TextComposition.cpp | 2 +- src/openrct2-ui/UiContext.cpp | 10 +++++----- src/openrct2/ui/UiContext.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index cf23667291..3a7b6ec4e3 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -112,7 +112,7 @@ void TextComposition::HandleMessage(const SDL_Event * e) key = SDLK_RETURN; } - GetContext()->GetUiContext()->SetKeysPressed(key, e->key.keysym.scancode); + GetContext()->GetUiContext()->SetKeysPressed(key, e->key.keysym.scancode); // Text input if (_session.Buffer == nullptr) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 492dade135..8782685331 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -218,11 +218,11 @@ public: SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE); } - void SetKeysPressed(uint32 keysym, uint8 scancode) override - { - _lastKeyPressed = keysym; - _keysPressed[scancode] = 1; - } + void SetKeysPressed(uint32 keysym, uint8 scancode) override + { + _lastKeyPressed = keysym; + _keysPressed[scancode] = 1; + } // Drawing IDrawingEngine * CreateDrawingEngine(DRAWING_ENGINE_TYPE type) override diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 9cb8cb980a..1fb00eb0d5 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -119,7 +119,7 @@ namespace OpenRCT2 virtual void SetCursorTrap(bool value) abstract; virtual const uint8 * GetKeysState() abstract; virtual const uint8 * GetKeysPressed() abstract; - virtual void SetKeysPressed(uint32 keysym, uint8 scancode) abstract; + virtual void SetKeysPressed(uint32 keysym, uint8 scancode) abstract; // Drawing virtual Drawing::IDrawingEngine * CreateDrawingEngine(Drawing::DRAWING_ENGINE_TYPE type) abstract; From d4e5514f6bcf8b4d9c536bfb3bc7cf74ac3bbf9d Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 17 May 2017 18:22:25 +0100 Subject: [PATCH 57/76] Tabs-to-spaces on UiContext.macOS.mm --- OpenRCT2.xcodeproj/project.pbxproj | 3 +- src/openrct2-ui/UiContext.macOS.mm | 172 ++++++++++++++--------------- 2 files changed, 88 insertions(+), 87 deletions(-) diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 237a0ba5db..8b58f029d6 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -1624,7 +1624,7 @@ F76C85AD1EC4E82600FA49E2 /* UiContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UiContext.h; sourceTree = ""; }; F76C85AE1EC4E82600FA49E2 /* UiContext.Linux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Linux.cpp; sourceTree = ""; }; F76C85AF1EC4E82600FA49E2 /* UiContext.Win32.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UiContext.Win32.cpp; sourceTree = ""; }; - F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UiContext.macOS.mm; sourceTree = ""; }; + F7D7747E1EC61E5100BE6EBC /* UiContext.macOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UiContext.macOS.mm; sourceTree = ""; usesTabs = 0; }; F7D774841EC66CD700BE6EBC /* OpenRCT2-cli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "OpenRCT2-cli"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -4625,6 +4625,7 @@ C68B2D451EC790690020651C /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; D497D0731C20FD52002BF46A /* Build configuration list for PBXProject "OpenRCT2" */ = { isa = XCConfigurationList; diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm index e73766f0bd..211e2de7b8 100644 --- a/src/openrct2-ui/UiContext.macOS.mm +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -1,17 +1,17 @@ #pragma region Copyright (c) 2014-2016 OpenRCT2 Developers /***************************************************************************** -* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. -* -* OpenRCT2 is the work of many authors, a full list can be found in contributors.md -* For more information, visit https://github.com/OpenRCT2/OpenRCT2 -* -* OpenRCT2 is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* A full copy of the GNU General Public License can be found in licence.txt -*****************************************************************************/ + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ #pragma endregion #if defined(__APPLE__) && defined(__MACH__) @@ -36,11 +36,11 @@ namespace OpenRCT2 { namespace Ui public: macOSContext() { - @autoreleasepool { - if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) { - [NSWindow setAllowsAutomaticWindowTabbing:NO]; - } - } + @autoreleasepool { + if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) { + [NSWindow setAllowsAutomaticWindowTabbing:NO]; + } + } } void SetWindowIcon(SDL_Window * window) override @@ -49,84 +49,84 @@ namespace OpenRCT2 { namespace Ui bool IsSteamOverlayAttached() override { - STUB(); - return false; + STUB(); + return false; } void ShowMessageBox(SDL_Window * window, const std::string &message) override { - @autoreleasepool - { - NSAlert *alert = [[[NSAlert alloc] init] autorelease]; - [alert addButtonWithTitle:@"OK"]; - alert.messageText = [NSString stringWithUTF8String:message.c_str()]; - [alert runModal]; - } + @autoreleasepool + { + NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + [alert addButtonWithTitle:@"OK"]; + alert.messageText = [NSString stringWithUTF8String:message.c_str()]; + [alert runModal]; + } } std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc &desc) override { - @autoreleasepool - { - NSMutableArray *extensions = [NSMutableArray new]; - for (const OpenRCT2::Ui::FileDialogDesc::Filter &filter: desc.Filters) { - if (filter.Pattern != "") { - NSString *fp = [NSString stringWithUTF8String:filter.Pattern.c_str()]; - fp = [fp stringByReplacingOccurrencesOfString:@"*." withString:@""]; - [extensions addObjectsFromArray:[fp componentsSeparatedByString:@";"]]; - } - } - - NSString *directory; - NSSavePanel *panel; - if (desc.Type == FILE_DIALOG_TYPE::SAVE) - { - NSString *filePath = [NSString stringWithUTF8String:desc.DefaultFilename.c_str()]; - directory = filePath.stringByDeletingLastPathComponent; - NSString *basename = filePath.lastPathComponent; - panel = [NSSavePanel savePanel]; - panel.nameFieldStringValue = [NSString stringWithFormat:@"%@.%@", basename, extensions.firstObject]; - } - else if (desc.Type == FILE_DIALOG_TYPE::OPEN) - { - directory = [NSString stringWithUTF8String:desc.InitialDirectory.c_str()]; - NSOpenPanel *open = [NSOpenPanel openPanel]; - open.canChooseDirectories = false; - open.canChooseFiles = true; - open.allowsMultipleSelection = false; - panel = open; - } else { - return std::string(); - } - - panel.title = [NSString stringWithUTF8String:desc.Title.c_str()]; - panel.allowedFileTypes = extensions; - panel.directoryURL = [NSURL fileURLWithPath:directory]; - if ([panel runModal] == NSFileHandlingPanelCancelButton){ - return std::string(); - } else { - return panel.URL.path.UTF8String; - } - } + @autoreleasepool + { + NSMutableArray *extensions = [NSMutableArray new]; + for (const OpenRCT2::Ui::FileDialogDesc::Filter &filter: desc.Filters) { + if (filter.Pattern != "") { + NSString *fp = [NSString stringWithUTF8String:filter.Pattern.c_str()]; + fp = [fp stringByReplacingOccurrencesOfString:@"*." withString:@""]; + [extensions addObjectsFromArray:[fp componentsSeparatedByString:@";"]]; + } + } + + NSString *directory; + NSSavePanel *panel; + if (desc.Type == FILE_DIALOG_TYPE::SAVE) + { + NSString *filePath = [NSString stringWithUTF8String:desc.DefaultFilename.c_str()]; + directory = filePath.stringByDeletingLastPathComponent; + NSString *basename = filePath.lastPathComponent; + panel = [NSSavePanel savePanel]; + panel.nameFieldStringValue = [NSString stringWithFormat:@"%@.%@", basename, extensions.firstObject]; + } + else if (desc.Type == FILE_DIALOG_TYPE::OPEN) + { + directory = [NSString stringWithUTF8String:desc.InitialDirectory.c_str()]; + NSOpenPanel *open = [NSOpenPanel openPanel]; + open.canChooseDirectories = false; + open.canChooseFiles = true; + open.allowsMultipleSelection = false; + panel = open; + } else { + return std::string(); + } + + panel.title = [NSString stringWithUTF8String:desc.Title.c_str()]; + panel.allowedFileTypes = extensions; + panel.directoryURL = [NSURL fileURLWithPath:directory]; + if ([panel runModal] == NSFileHandlingPanelCancelButton){ + return std::string(); + } else { + return panel.URL.path.UTF8String; + } + } } std::string ShowDirectoryDialog(SDL_Window * window, const std::string &title) override { - @autoreleasepool - { - NSOpenPanel *panel = [NSOpenPanel openPanel]; - panel.canChooseFiles = false; - panel.canChooseDirectories = true; - panel.allowsMultipleSelection = false; - utf8 *url = NULL; - if ([panel runModal] == NSFileHandlingPanelOKButton) - { - NSString *selectedPath = panel.URL.path; - const char *path = selectedPath.UTF8String; - url = _strdup(path); - } - return url; - } + @autoreleasepool + { + NSOpenPanel *panel = [NSOpenPanel openPanel]; + panel.canChooseFiles = false; + panel.canChooseDirectories = true; + panel.allowsMultipleSelection = false; + utf8 *url = NULL; + if ([panel runModal] == NSFileHandlingPanelOKButton) + { + NSString *selectedPath = panel.URL.path; + const char *path = selectedPath.UTF8String; + url = _strdup(path); + } + return url; + } } private: @@ -163,7 +163,7 @@ namespace OpenRCT2 { namespace Ui break; } } - + // Convert to string *output = std::string(outputBuffer.data(), outputLength); } @@ -171,12 +171,12 @@ namespace OpenRCT2 { namespace Ui { fflush(fpipe); } - + // Return exit code return pclose(fpipe); } }; - + IPlatformUiContext * CreatePlatformUiContext() { return new macOSContext(); From e54bed73c637f38d89b5fbfdd0c17b5b93030351 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 17 May 2017 18:24:07 +0100 Subject: [PATCH 58/76] Remove stray spaces in header --- src/openrct2-ui/UiContext.macOS.mm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm index 211e2de7b8..4c622775cb 100644 --- a/src/openrct2-ui/UiContext.macOS.mm +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -1,17 +1,17 @@ #pragma region Copyright (c) 2014-2016 OpenRCT2 Developers /***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ +* OpenRCT2, an open source clone of Roller Coaster Tycoon 2. +* +* OpenRCT2 is the work of many authors, a full list can be found in contributors.md +* For more information, visit https://github.com/OpenRCT2/OpenRCT2 +* +* OpenRCT2 is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* A full copy of the GNU General Public License can be found in licence.txt +*****************************************************************************/ #pragma endregion #if defined(__APPLE__) && defined(__MACH__) From 69feeafb3fde23f9d27dc48891160d1d62e3174f Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Sat, 20 May 2017 00:40:54 +0100 Subject: [PATCH 59/76] Clean up Xcode project post-rebase --- OpenRCT2.xcodeproj/project.pbxproj | 873 ----------------------------- 1 file changed, 873 deletions(-) diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 8b58f029d6..f45d1ff61e 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -36,55 +36,6 @@ C606CCD21DB4D7C800FE4015 /* SideTunnelCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C606CCD01DB4D7C800FE4015 /* SideTunnelCall.cpp */; }; C606CCD51DB4DD6C00FE4015 /* VerticalTunnelCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C606CCD31DB4DD6C00FE4015 /* VerticalTunnelCall.cpp */; }; C606CD261DB5120C00FE4015 /* TestPaint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C606CD231DB5120900FE4015 /* TestPaint.cpp */; }; - C612A8991D64825300B634CA /* vehicle_data.c in Sources */ = {isa = PBXBuildFile; fileRef = C612A8971D64825300B634CA /* vehicle_data.c */; }; - C6136C551E21893500F3ED2B /* view_clipping.c in Sources */ = {isa = PBXBuildFile; fileRef = C6136C541E21893500F3ED2B /* view_clipping.c */; }; - C61FB7241CF86356004CE991 /* NetworkUser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C61FB7221CF86356004CE991 /* NetworkUser.cpp */; }; - C647C6911E1D0CA000C7FB21 /* AudioMixer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C647C68F1E1D0CA000C7FB21 /* AudioMixer.cpp */; }; - C649B3D41DF04ED2008AC826 /* format_codes.c in Sources */ = {isa = PBXBuildFile; fileRef = C649B3D31DF04ED2008AC826 /* format_codes.c */; }; - C64FDA641D6D9A2100F259B9 /* air_powered_vertical_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BB1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c */; }; - C64FDA651D6D9A2100F259B9 /* bobsleigh_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BC1CDBC3B7009F9BFC /* bobsleigh_coaster.c */; }; - C64FDA661D6D9A2100F259B9 /* compact_inverted_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BD1CDBC3B7009F9BFC /* compact_inverted_coaster.c */; }; - C64FDA671D6D9A2100F259B9 /* corkscrew_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BE1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c */; }; - C64FDA681D6D9A2100F259B9 /* flying_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BF1CDBC3B7009F9BFC /* flying_roller_coaster.c */; }; - C64FDA691D6D9A2100F259B9 /* giga_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C01CDBC3B7009F9BFC /* giga_coaster.c */; }; - C64FDA6A1D6D9A2100F259B9 /* heartline_twister_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C11CDBC3B7009F9BFC /* heartline_twister_coaster.c */; }; - C64FDA6B1D6D9A2100F259B9 /* inverted_hairpin_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C21CDBC3B7009F9BFC /* inverted_hairpin_coaster.c */; }; - C64FDA6C1D6D9A2100F259B9 /* inverted_impulse_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C31CDBC3B7009F9BFC /* inverted_impulse_coaster.c */; }; - C64FDA6D1D6D9A2100F259B9 /* inverted_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C41CDBC3B7009F9BFC /* inverted_roller_coaster.c */; }; - C64FDA6E1D6D9A2100F259B9 /* junior_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C51CDBC3B7009F9BFC /* junior_roller_coaster.c */; }; - C64FDA6F1D6D9A2100F259B9 /* lay_down_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C61CDBC3B7009F9BFC /* lay_down_roller_coaster.c */; }; - C64FDA701D6D9A2100F259B9 /* lim_launched_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C71CDBC3B7009F9BFC /* lim_launched_roller_coaster.c */; }; - C64FDA711D6D9A2100F259B9 /* looping_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C81CDBC3B7009F9BFC /* looping_roller_coaster.c */; }; - C64FDA721D6D9A2100F259B9 /* mine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C91CDBC3B7009F9BFC /* mine_ride.c */; }; - C64FDA731D6D9A2100F259B9 /* mine_train_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CA1CDBC3B7009F9BFC /* mine_train_coaster.c */; }; - C64FDA741D6D9A2100F259B9 /* mini_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CB1CDBC3B7009F9BFC /* mini_roller_coaster.c */; }; - C64FDA751D6D9A2100F259B9 /* mini_suspended_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CC1CDBC3B7009F9BFC /* mini_suspended_coaster.c */; }; - C64FDA761D6D9A2100F259B9 /* multi_dimension_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CD1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c */; }; - C64FDA771D6D9A2100F259B9 /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */; }; - C64FDA781D6D9A2100F259B9 /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */; }; - C64FDA791D6D9A2100F259B9 /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */; }; - C64FDA7B1D6D9A2100F259B9 /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */; }; - C64FDA7C1D6D9A2100F259B9 /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D31CDBC3B7009F9BFC /* steeplechase.c */; }; - C64FDA7D1D6D9A2100F259B9 /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */; }; - C64FDA7E1D6D9A2100F259B9 /* twister_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D51CDBC3B7009F9BFC /* twister_roller_coaster.c */; }; - C64FDA7F1D6D9A2100F259B9 /* vertical_drop_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D61CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c */; }; - C64FDA801D6D9A2100F259B9 /* virginia_reel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D71CDBC3B7009F9BFC /* virginia_reel.c */; }; - C64FDA811D6D9A2100F259B9 /* wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D81CDBC3B7009F9BFC /* wild_mouse.c */; }; - C64FDA821D6D9A2100F259B9 /* wooden_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D91CDBC3B7009F9BFC /* wooden_roller_coaster.c */; }; - C64FDA831D6D9A2100F259B9 /* wooden_wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DA1CDBC3B7009F9BFC /* wooden_wild_mouse.c */; }; - C64FDA841D6D9A2100F259B9 /* car_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DC1CDBC3B7009F9BFC /* car_ride.c */; }; - C64FDA851D6D9A2100F259B9 /* circus_show.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DD1CDBC3B7009F9BFC /* circus_show.c */; }; - C64FDA861D6D9A2100F259B9 /* crooked_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DE1CDBC3B7009F9BFC /* crooked_house.c */; }; - C64FDA871D6D9A2100F259B9 /* dodgems.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DF1CDBC3B7009F9BFC /* dodgems.c */; }; - C64FDA881D6D9A2100F259B9 /* ferris_wheel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E01CDBC3B7009F9BFC /* ferris_wheel.c */; }; - C64FDA891D6D9A2100F259B9 /* flying_saucers.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E11CDBC3B7009F9BFC /* flying_saucers.c */; }; - C64FDA8A1D6D9A2100F259B9 /* ghost_train.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E21CDBC3B7009F9BFC /* ghost_train.c */; }; - C64FDA8B1D6D9A2100F259B9 /* haunted_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E31CDBC3B7009F9BFC /* haunted_house.c */; }; - C64FDA8C1D6D9A2100F259B9 /* maze.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E41CDBC3B7009F9BFC /* maze.c */; }; - C64FDA8D1D6D9A2100F259B9 /* merry_go_round.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E51CDBC3B7009F9BFC /* merry_go_round.c */; }; - C64FDA8E1D6D9A2100F259B9 /* mini_golf.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E61CDBC3B7009F9BFC /* mini_golf.c */; }; - C64FDA8F1D6D9A2100F259B9 /* mini_helicopters.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E71CDBC3B7009F9BFC /* mini_helicopters.c */; }; - C64FDA901D6D9A2100F259B9 /* monorail_cycles.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E81CDBC3B7009F9BFC /* monorail_cycles.c */; }; C64FDA911D6D9A2100F259B9 /* observation_tower.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E91CDBC3B7009F9BFC /* observation_tower.c */; }; C64FDA921D6D9A2100F259B9 /* space_rings.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EA1CDBC3B7009F9BFC /* space_rings.c */; }; C64FDA931D6D9A2100F259B9 /* spiral_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EB1CDBC3B7009F9BFC /* spiral_slide.c */; }; @@ -93,15 +44,6 @@ C64FDA971D6D9A2100F259B9 /* 3d_cinema.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F11CDBC3B7009F9BFC /* 3d_cinema.c */; }; C64FDA981D6D9A2100F259B9 /* enterprise.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F21CDBC3B7009F9BFC /* enterprise.c */; }; C64FDA991D6D9A2100F259B9 /* go_karts.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F31CDBC3B7009F9BFC /* go_karts.c */; }; - C64FDA9A1D6D9A2100F259B9 /* launched_freefall.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F41CDBC3B7009F9BFC /* launched_freefall.c */; }; - C64FDA9B1D6D9A2100F259B9 /* magic_carpet.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F51CDBC3B7009F9BFC /* magic_carpet.c */; }; - C64FDA9C1D6D9A2100F259B9 /* motion_simulator.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F61CDBC3B7009F9BFC /* motion_simulator.c */; }; - C64FDA9D1D6D9A2100F259B9 /* pirate_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F71CDBC3B7009F9BFC /* pirate_ship.c */; }; - C64FDA9E1D6D9A2100F259B9 /* roto_drop.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F81CDBC3B7009F9BFC /* roto_drop.c */; }; - C64FDA9F1D6D9A2100F259B9 /* swinging_inverter_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F91CDBC3B7009F9BFC /* swinging_inverter_ship.c */; }; - C64FDAA01D6D9A2100F259B9 /* top_spin.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FA1CDBC3B7009F9BFC /* top_spin.c */; }; - C64FDAA11D6D9A2100F259B9 /* twist.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FB1CDBC3B7009F9BFC /* twist.c */; }; - C64FDAA21D6D9A2100F259B9 /* chairlift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FD1CDBC3B7009F9BFC /* chairlift.c */; }; C64FDAA31D6D9A2100F259B9 /* lift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FE1CDBC3B7009F9BFC /* lift.c */; }; C64FDAA41D6D9A2100F259B9 /* miniature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */; }; C64FDAA51D6D9A2100F259B9 /* monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9001CDBC3B7009F9BFC /* monorail.c */; }; @@ -109,129 +51,6 @@ C64FDAA71D6D9A2100F259B9 /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9031CDBC3B7009F9BFC /* boat_ride.c */; }; C64FDAA81D6D9A2100F259B9 /* dingy_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9041CDBC3B7009F9BFC /* dingy_slide.c */; }; C64FDAA91D6D9A2100F259B9 /* log_flume.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9051CDBC3B7009F9BFC /* log_flume.c */; }; - C64FDAAB1D6D9A2100F259B9 /* river_rapids.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9071CDBC3B7009F9BFC /* river_rapids.c */; }; - C64FDAAC1D6D9A2100F259B9 /* splash_boats.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9081CDBC3B7009F9BFC /* splash_boats.c */; }; - C64FDAAD1D6D9A2100F259B9 /* submarine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9091CDBC3B7009F9BFC /* submarine_ride.c */; }; - C64FDAAE1D6D9A2100F259B9 /* water_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F90A1CDBC3B7009F9BFC /* water_coaster.c */; }; - C64FDABE1D6D9CD900F259B9 /* ride_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D44271731CC81B3200D84D28 /* ride_data.c */; }; - C64FDABF1D6D9CEA00F259B9 /* map_element.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89B1CDBC37E009F9BFC /* map_element.c */; }; - C64FDAC01D6D9E3B00F259B9 /* track_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717B1CC81B3200D84D28 /* track_data.c */; }; - C64FDAC21D6DA0B800F259B9 /* diagnostic.c in Sources */ = {isa = PBXBuildFile; fileRef = D44270FE1CC81B3200D84D28 /* diagnostic.c */; }; - C64FDAC31D6DA41000F259B9 /* track_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = D442717D1CC81B3200D84D28 /* track_paint.c */; }; - C650B2191CCABBDD00B4D91C /* S4Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B2151CCABBDD00B4D91C /* S4Importer.cpp */; }; - C650B21A1CCABBDD00B4D91C /* tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B2171CCABBDD00B4D91C /* tables.cpp */; }; - C650B21C1CCABC4400B4D91C /* ConvertCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C650B21B1CCABC4400B4D91C /* ConvertCommand.cpp */; }; - C6575A371D46AFBA00C3E79F /* debug_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = C6575A361D46AFBA00C3E79F /* debug_paint.c */; }; - C65A888A1E16859D000368D7 /* bolliger_mabillard_track.c in Sources */ = {isa = PBXBuildFile; fileRef = C65A88881E16859D000368D7 /* bolliger_mabillard_track.c */; }; - C65A88921E1B1148000368D7 /* AudioChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C65A888B1E1B1148000368D7 /* AudioChannel.cpp */; }; - C65A88931E1B1148000368D7 /* FileAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C65A888F1E1B1148000368D7 /* FileAudioSource.cpp */; }; - C65A88941E1B1148000368D7 /* MemoryAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C65A88901E1B1148000368D7 /* MemoryAudioSource.cpp */; }; - C65A88951E1B1148000368D7 /* NullAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C65A88911E1B1148000368D7 /* NullAudioSource.cpp */; }; - C6834A111DFDE8E300CE933A /* interop.c in Sources */ = {isa = PBXBuildFile; fileRef = C6834A0F1DFDE8E300CE933A /* interop.c */; }; - C686F8AC1CDBC37E009F9BFC /* banner.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8981CDBC37E009F9BFC /* banner.c */; }; - C686F8AD1CDBC37E009F9BFC /* entrance.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8991CDBC37E009F9BFC /* entrance.c */; }; - C686F8AE1CDBC37E009F9BFC /* fence.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89A1CDBC37E009F9BFC /* fence.c */; }; - C686F8AF1CDBC37E009F9BFC /* map_element.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89B1CDBC37E009F9BFC /* map_element.c */; }; - C686F8B01CDBC37E009F9BFC /* path.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89D1CDBC37E009F9BFC /* path.c */; }; - C686F8B11CDBC37E009F9BFC /* scenery.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89E1CDBC37E009F9BFC /* scenery.c */; }; - C686F8B21CDBC37E009F9BFC /* scenery_multiple.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F89F1CDBC37E009F9BFC /* scenery_multiple.c */; }; - C686F8B31CDBC37E009F9BFC /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A01CDBC37E009F9BFC /* surface.c */; }; - C686F8B41CDBC37E009F9BFC /* paint.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A21CDBC37E009F9BFC /* paint.c */; }; - C686F8B51CDBC37E009F9BFC /* litter.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A51CDBC37E009F9BFC /* litter.c */; }; - C686F8B61CDBC37E009F9BFC /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A61CDBC37E009F9BFC /* misc.c */; }; - C686F8B71CDBC37E009F9BFC /* peep.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A71CDBC37E009F9BFC /* peep.c */; }; - C686F8B81CDBC37E009F9BFC /* sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8A81CDBC37E009F9BFC /* sprite.c */; }; - C686F8B91CDBC37E009F9BFC /* supports.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8AA1CDBC37E009F9BFC /* supports.c */; }; - C686F90B1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BB1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c */; }; - C686F90C1CDBC3B7009F9BFC /* bobsleigh_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BC1CDBC3B7009F9BFC /* bobsleigh_coaster.c */; }; - C686F90D1CDBC3B7009F9BFC /* compact_inverted_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BD1CDBC3B7009F9BFC /* compact_inverted_coaster.c */; }; - C686F90E1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BE1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c */; }; - C686F90F1CDBC3B7009F9BFC /* flying_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8BF1CDBC3B7009F9BFC /* flying_roller_coaster.c */; }; - C686F9101CDBC3B7009F9BFC /* giga_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C01CDBC3B7009F9BFC /* giga_coaster.c */; }; - C686F9111CDBC3B7009F9BFC /* heartline_twister_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C11CDBC3B7009F9BFC /* heartline_twister_coaster.c */; }; - C686F9121CDBC3B7009F9BFC /* inverted_hairpin_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C21CDBC3B7009F9BFC /* inverted_hairpin_coaster.c */; }; - C686F9131CDBC3B7009F9BFC /* inverted_impulse_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C31CDBC3B7009F9BFC /* inverted_impulse_coaster.c */; }; - C686F9141CDBC3B7009F9BFC /* inverted_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C41CDBC3B7009F9BFC /* inverted_roller_coaster.c */; }; - C686F9151CDBC3B7009F9BFC /* junior_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C51CDBC3B7009F9BFC /* junior_roller_coaster.c */; }; - C686F9161CDBC3B7009F9BFC /* lay_down_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C61CDBC3B7009F9BFC /* lay_down_roller_coaster.c */; }; - C686F9171CDBC3B7009F9BFC /* lim_launched_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C71CDBC3B7009F9BFC /* lim_launched_roller_coaster.c */; }; - C686F9181CDBC3B7009F9BFC /* looping_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C81CDBC3B7009F9BFC /* looping_roller_coaster.c */; }; - C686F9191CDBC3B7009F9BFC /* mine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8C91CDBC3B7009F9BFC /* mine_ride.c */; }; - C686F91A1CDBC3B7009F9BFC /* mine_train_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CA1CDBC3B7009F9BFC /* mine_train_coaster.c */; }; - C686F91B1CDBC3B7009F9BFC /* mini_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CB1CDBC3B7009F9BFC /* mini_roller_coaster.c */; }; - C686F91C1CDBC3B7009F9BFC /* mini_suspended_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CC1CDBC3B7009F9BFC /* mini_suspended_coaster.c */; }; - C686F91D1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CD1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c */; }; - C686F91E1CDBC3B7009F9BFC /* reverse_freefall_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */; }; - C686F91F1CDBC3B7009F9BFC /* reverser_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */; }; - C686F9201CDBC3B7009F9BFC /* side_friction_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */; }; - C686F9221CDBC3B7009F9BFC /* stand_up_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */; }; - C686F9231CDBC3B7009F9BFC /* steeplechase.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D31CDBC3B7009F9BFC /* steeplechase.c */; }; - C686F9241CDBC3B7009F9BFC /* suspended_swinging_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */; }; - C686F9251CDBC3B7009F9BFC /* twister_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D51CDBC3B7009F9BFC /* twister_roller_coaster.c */; }; - C686F9261CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D61CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c */; }; - C686F9271CDBC3B7009F9BFC /* virginia_reel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D71CDBC3B7009F9BFC /* virginia_reel.c */; }; - C686F9281CDBC3B7009F9BFC /* wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D81CDBC3B7009F9BFC /* wild_mouse.c */; }; - C686F9291CDBC3B7009F9BFC /* wooden_roller_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8D91CDBC3B7009F9BFC /* wooden_roller_coaster.c */; }; - C686F92A1CDBC3B7009F9BFC /* wooden_wild_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DA1CDBC3B7009F9BFC /* wooden_wild_mouse.c */; }; - C686F92B1CDBC3B7009F9BFC /* car_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DC1CDBC3B7009F9BFC /* car_ride.c */; }; - C686F92C1CDBC3B7009F9BFC /* circus_show.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DD1CDBC3B7009F9BFC /* circus_show.c */; }; - C686F92D1CDBC3B7009F9BFC /* crooked_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DE1CDBC3B7009F9BFC /* crooked_house.c */; }; - C686F92E1CDBC3B7009F9BFC /* dodgems.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8DF1CDBC3B7009F9BFC /* dodgems.c */; }; - C686F92F1CDBC3B7009F9BFC /* ferris_wheel.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E01CDBC3B7009F9BFC /* ferris_wheel.c */; }; - C686F9301CDBC3B7009F9BFC /* flying_saucers.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E11CDBC3B7009F9BFC /* flying_saucers.c */; }; - C686F9311CDBC3B7009F9BFC /* ghost_train.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E21CDBC3B7009F9BFC /* ghost_train.c */; }; - C686F9321CDBC3B7009F9BFC /* haunted_house.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E31CDBC3B7009F9BFC /* haunted_house.c */; }; - C686F9331CDBC3B7009F9BFC /* maze.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E41CDBC3B7009F9BFC /* maze.c */; }; - C686F9341CDBC3B7009F9BFC /* merry_go_round.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E51CDBC3B7009F9BFC /* merry_go_round.c */; }; - C686F9351CDBC3B7009F9BFC /* mini_golf.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E61CDBC3B7009F9BFC /* mini_golf.c */; }; - C686F9361CDBC3B7009F9BFC /* mini_helicopters.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E71CDBC3B7009F9BFC /* mini_helicopters.c */; }; - C686F9371CDBC3B7009F9BFC /* monorail_cycles.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E81CDBC3B7009F9BFC /* monorail_cycles.c */; }; - C686F9381CDBC3B7009F9BFC /* observation_tower.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8E91CDBC3B7009F9BFC /* observation_tower.c */; }; - C686F9391CDBC3B7009F9BFC /* space_rings.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EA1CDBC3B7009F9BFC /* space_rings.c */; }; - C686F93A1CDBC3B7009F9BFC /* spiral_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EB1CDBC3B7009F9BFC /* spiral_slide.c */; }; - C686F93B1CDBC3B7009F9BFC /* facility.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8ED1CDBC3B7009F9BFC /* facility.c */; }; - C686F93D1CDBC3B7009F9BFC /* shop.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8EF1CDBC3B7009F9BFC /* shop.c */; }; - C686F93E1CDBC3B7009F9BFC /* 3d_cinema.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F11CDBC3B7009F9BFC /* 3d_cinema.c */; }; - C686F93F1CDBC3B7009F9BFC /* enterprise.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F21CDBC3B7009F9BFC /* enterprise.c */; }; - C686F9401CDBC3B7009F9BFC /* go_karts.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F31CDBC3B7009F9BFC /* go_karts.c */; }; - C686F9411CDBC3B7009F9BFC /* launched_freefall.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F41CDBC3B7009F9BFC /* launched_freefall.c */; }; - C686F9421CDBC3B7009F9BFC /* magic_carpet.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F51CDBC3B7009F9BFC /* magic_carpet.c */; }; - C686F9431CDBC3B7009F9BFC /* motion_simulator.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F61CDBC3B7009F9BFC /* motion_simulator.c */; }; - C686F9441CDBC3B7009F9BFC /* pirate_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F71CDBC3B7009F9BFC /* pirate_ship.c */; }; - C686F9451CDBC3B7009F9BFC /* roto_drop.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F81CDBC3B7009F9BFC /* roto_drop.c */; }; - C686F9461CDBC3B7009F9BFC /* swinging_inverter_ship.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8F91CDBC3B7009F9BFC /* swinging_inverter_ship.c */; }; - C686F9471CDBC3B7009F9BFC /* top_spin.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FA1CDBC3B7009F9BFC /* top_spin.c */; }; - C686F9481CDBC3B7009F9BFC /* twist.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FB1CDBC3B7009F9BFC /* twist.c */; }; - C686F9491CDBC3B7009F9BFC /* chairlift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FD1CDBC3B7009F9BFC /* chairlift.c */; }; - C686F94A1CDBC3B7009F9BFC /* lift.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FE1CDBC3B7009F9BFC /* lift.c */; }; - C686F94B1CDBC3B7009F9BFC /* miniature_railway.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */; }; - C686F94C1CDBC3B7009F9BFC /* monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9001CDBC3B7009F9BFC /* monorail.c */; }; - C686F94D1CDBC3B7009F9BFC /* suspended_monorail.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */; }; - C686F94E1CDBC3B7009F9BFC /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9031CDBC3B7009F9BFC /* boat_ride.c */; }; - C686F94F1CDBC3B7009F9BFC /* dingy_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9041CDBC3B7009F9BFC /* dingy_slide.c */; }; - C686F9501CDBC3B7009F9BFC /* log_flume.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9051CDBC3B7009F9BFC /* log_flume.c */; }; - C686F9521CDBC3B7009F9BFC /* river_rapids.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9071CDBC3B7009F9BFC /* river_rapids.c */; }; - C686F9531CDBC3B7009F9BFC /* splash_boats.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9081CDBC3B7009F9BFC /* splash_boats.c */; }; - C686F9541CDBC3B7009F9BFC /* submarine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9091CDBC3B7009F9BFC /* submarine_ride.c */; }; - C686F9551CDBC3B7009F9BFC /* water_coaster.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F90A1CDBC3B7009F9BFC /* water_coaster.c */; }; - C686F9581CDBC4C7009F9BFC /* vehicle_paint.c in Sources */ = {isa = PBXBuildFile; fileRef = C686F9561CDBC4C7009F9BFC /* vehicle_paint.c */; }; - C68B2CB51EB60DDE0020651C /* server_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C68B2CB41EB60DDE0020651C /* server_list.cpp */; }; - C6B5A7D41CDFE4CB00C9C006 /* S6Exporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6B5A7D01CDFE4CB00C9C006 /* S6Exporter.cpp */; }; - C6B5A7D51CDFE4CB00C9C006 /* S6Importer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6B5A7D21CDFE4CB00C9C006 /* S6Importer.cpp */; }; - C6CABA7E1E13F11C00D33A6B /* hook.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E181E0406F00076A04F /* hook.c */; }; - C6CABA7F1E13F14F00D33A6B /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E161E0406F00076A04F /* addresses.c */; }; - C6CABA821E1466D600D33A6B /* FileClassifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6CABA801E1466D600D33A6B /* FileClassifier.cpp */; }; - C6E96E121E04067A0076A04F /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E101E04067A0076A04F /* File.cpp */; }; - C6E96E151E04069A0076A04F /* Zip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E131E04069A0076A04F /* Zip.cpp */; }; - C6E96E1A1E0406F00076A04F /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E161E0406F00076A04F /* addresses.c */; }; - C6E96E1B1E0406F00076A04F /* hook.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E181E0406F00076A04F /* hook.c */; }; - C6E96E231E04070E0076A04F /* scenario.c in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E1D1E04070E0076A04F /* scenario.c */; }; - C6E96E241E04070E0076A04F /* ScenarioRepository.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E1F1E04070E0076A04F /* ScenarioRepository.cpp */; }; - C6E96E251E04070E0076A04F /* ScenarioSources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E211E04070E0076A04F /* ScenarioSources.cpp */; }; - C6E96E2F1E04072F0076A04F /* TitleScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E271E04072F0076A04F /* TitleScreen.cpp */; }; - C6E96E301E04072F0076A04F /* TitleSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E291E04072F0076A04F /* TitleSequence.cpp */; }; - C6E96E311E04072F0076A04F /* TitleSequenceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E2B1E04072F0076A04F /* TitleSequenceManager.cpp */; }; - C6E96E321E04072F0076A04F /* TitleSequencePlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6E96E2D1E04072F0076A04F /* TitleSequencePlayer.cpp */; }; C6E96E361E0408B40076A04F /* libzip.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; }; C6E96E371E040E040076A04F /* libzip.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6E96E351E0408B40076A04F /* libzip.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; D41B73EF1C2101890080A7B9 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73EE1C2101890080A7B9 /* libcurl.tbd */; }; @@ -453,7 +272,6 @@ F76C86FE1EC4E88400FA49E2 /* ride_data.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84BC1EC4E7CC00FA49E2 /* ride_data.c */; }; F76C87001EC4E88400FA49E2 /* ride_ratings.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84BE1EC4E7CC00FA49E2 /* ride_ratings.c */; }; F76C87021EC4E88400FA49E2 /* facility.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C11EC4E7CC00FA49E2 /* facility.c */; }; - F76C87031EC4E88400FA49E2 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C21EC4E7CC00FA49E2 /* misc.c */; }; F76C87041EC4E88400FA49E2 /* shop.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C31EC4E7CC00FA49E2 /* shop.c */; }; F76C87051EC4E88400FA49E2 /* station.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C41EC4E7CC00FA49E2 /* station.c */; }; F76C87071EC4E88400FA49E2 /* 3d_cinema.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84C71EC4E7CC00FA49E2 /* 3d_cinema.c */; }; @@ -485,7 +303,6 @@ F76C87291EC4E88400FA49E2 /* boat_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EB1EC4E7CD00FA49E2 /* boat_ride.c */; }; F76C872A1EC4E88400FA49E2 /* dingy_slide.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EC1EC4E7CD00FA49E2 /* dingy_slide.c */; }; F76C872B1EC4E88400FA49E2 /* log_flume.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84ED1EC4E7CD00FA49E2 /* log_flume.c */; }; - F76C872C1EC4E88400FA49E2 /* river_rafts.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EE1EC4E7CD00FA49E2 /* river_rafts.c */; }; F76C872D1EC4E88400FA49E2 /* river_rapids.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84EF1EC4E7CD00FA49E2 /* river_rapids.c */; }; F76C872E1EC4E88400FA49E2 /* splash_boats.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F01EC4E7CD00FA49E2 /* splash_boats.c */; }; F76C872F1EC4E88400FA49E2 /* submarine_ride.c in Sources */ = {isa = PBXBuildFile; fileRef = F76C84F11EC4E7CD00FA49E2 /* submarine_ride.c */; }; @@ -763,85 +580,6 @@ C606CD231DB5120900FE4015 /* TestPaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestPaint.cpp; sourceTree = ""; }; C606CD241DB5120900FE4015 /* TestPaint.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TestPaint.hpp; sourceTree = ""; }; C64FDA5D1D6D99F400F259B9 /* PaintTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PaintTest; sourceTree = BUILT_PRODUCTS_DIR; }; - C650B2151CCABBDD00B4D91C /* S4Importer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = S4Importer.cpp; sourceTree = ""; usesTabs = 0; }; - C650B2171CCABBDD00B4D91C /* tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tables.cpp; sourceTree = ""; usesTabs = 0; }; - C650B2181CCABBDD00B4D91C /* Tables.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Tables.h; sourceTree = ""; usesTabs = 0; }; - C650B21B1CCABC4400B4D91C /* ConvertCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertCommand.cpp; sourceTree = ""; usesTabs = 0; }; - C6575A361D46AFBA00C3E79F /* debug_paint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = debug_paint.c; sourceTree = ""; }; - C65A88881E16859D000368D7 /* bolliger_mabillard_track.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bolliger_mabillard_track.c; sourceTree = ""; }; - C65A88891E16859D000368D7 /* bolliger_mabillard_track.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bolliger_mabillard_track.h; sourceTree = ""; }; - C65A888B1E1B1148000368D7 /* AudioChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioChannel.cpp; sourceTree = ""; }; - C65A888C1E1B1148000368D7 /* AudioChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioChannel.h; sourceTree = ""; }; - C65A888D1E1B1148000368D7 /* AudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioFormat.h; sourceTree = ""; }; - C65A888E1E1B1148000368D7 /* AudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSource.h; sourceTree = ""; }; - C65A888F1E1B1148000368D7 /* FileAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileAudioSource.cpp; sourceTree = ""; }; - C65A88901E1B1148000368D7 /* MemoryAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryAudioSource.cpp; sourceTree = ""; }; - C65A88911E1B1148000368D7 /* NullAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NullAudioSource.cpp; sourceTree = ""; }; - C6834A0F1DFDE8E300CE933A /* interop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = interop.c; sourceTree = ""; usesTabs = 1; }; - C6834A101DFDE8E300CE933A /* interop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interop.h; sourceTree = ""; }; - C686F8981CDBC37E009F9BFC /* banner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = banner.c; sourceTree = ""; }; - C686F8991CDBC37E009F9BFC /* entrance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = entrance.c; sourceTree = ""; }; - C686F89A1CDBC37E009F9BFC /* fence.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fence.c; sourceTree = ""; }; - C686F89B1CDBC37E009F9BFC /* map_element.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map_element.c; sourceTree = ""; }; - C686F89C1CDBC37E009F9BFC /* map_element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = map_element.h; sourceTree = ""; }; - C686F89D1CDBC37E009F9BFC /* path.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = path.c; sourceTree = ""; }; - C686F89E1CDBC37E009F9BFC /* scenery.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scenery.c; sourceTree = ""; }; - C686F89F1CDBC37E009F9BFC /* scenery_multiple.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scenery_multiple.c; sourceTree = ""; }; - C686F8A01CDBC37E009F9BFC /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; }; - C686F8A11CDBC37E009F9BFC /* surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; }; - C686F8A21CDBC37E009F9BFC /* paint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = paint.c; sourceTree = ""; }; - C686F8A31CDBC37E009F9BFC /* paint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = paint.h; sourceTree = ""; }; - C686F8A51CDBC37E009F9BFC /* litter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = litter.c; sourceTree = ""; }; - C686F8A61CDBC37E009F9BFC /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = misc.c; sourceTree = ""; }; - C686F8A71CDBC37E009F9BFC /* peep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = peep.c; sourceTree = ""; }; - C686F8A81CDBC37E009F9BFC /* sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sprite.c; sourceTree = ""; }; - C686F8A91CDBC37E009F9BFC /* sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = ""; }; - C686F8AA1CDBC37E009F9BFC /* supports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = supports.c; sourceTree = ""; }; - C686F8AB1CDBC37E009F9BFC /* supports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = supports.h; sourceTree = ""; }; - C686F8BB1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = air_powered_vertical_coaster.c; sourceTree = ""; }; - C686F8BC1CDBC3B7009F9BFC /* bobsleigh_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bobsleigh_coaster.c; sourceTree = ""; }; - C686F8BD1CDBC3B7009F9BFC /* compact_inverted_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compact_inverted_coaster.c; sourceTree = ""; }; - C686F8BE1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = corkscrew_roller_coaster.c; sourceTree = ""; }; - C686F8BF1CDBC3B7009F9BFC /* flying_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = flying_roller_coaster.c; sourceTree = ""; }; - C686F8C01CDBC3B7009F9BFC /* giga_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = giga_coaster.c; sourceTree = ""; }; - C686F8C11CDBC3B7009F9BFC /* heartline_twister_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = heartline_twister_coaster.c; sourceTree = ""; }; - C686F8C21CDBC3B7009F9BFC /* inverted_hairpin_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inverted_hairpin_coaster.c; sourceTree = ""; }; - C686F8C31CDBC3B7009F9BFC /* inverted_impulse_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inverted_impulse_coaster.c; sourceTree = ""; }; - C686F8C41CDBC3B7009F9BFC /* inverted_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inverted_roller_coaster.c; sourceTree = ""; }; - C686F8C51CDBC3B7009F9BFC /* junior_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = junior_roller_coaster.c; sourceTree = ""; }; - C686F8C61CDBC3B7009F9BFC /* lay_down_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lay_down_roller_coaster.c; sourceTree = ""; }; - C686F8C71CDBC3B7009F9BFC /* lim_launched_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lim_launched_roller_coaster.c; sourceTree = ""; }; - C686F8C81CDBC3B7009F9BFC /* looping_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = looping_roller_coaster.c; sourceTree = ""; }; - C686F8C91CDBC3B7009F9BFC /* mine_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mine_ride.c; sourceTree = ""; }; - C686F8CA1CDBC3B7009F9BFC /* mine_train_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mine_train_coaster.c; sourceTree = ""; }; - C686F8CB1CDBC3B7009F9BFC /* mini_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mini_roller_coaster.c; sourceTree = ""; }; - C686F8CC1CDBC3B7009F9BFC /* mini_suspended_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mini_suspended_coaster.c; sourceTree = ""; }; - C686F8CD1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = multi_dimension_roller_coaster.c; sourceTree = ""; }; - C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reverse_freefall_coaster.c; sourceTree = ""; }; - C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reverser_roller_coaster.c; sourceTree = ""; }; - C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = side_friction_roller_coaster.c; sourceTree = ""; }; - C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stand_up_roller_coaster.c; sourceTree = ""; }; - C686F8D31CDBC3B7009F9BFC /* steeplechase.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = steeplechase.c; sourceTree = ""; }; - C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = suspended_swinging_coaster.c; sourceTree = ""; }; - C686F8D51CDBC3B7009F9BFC /* twister_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = twister_roller_coaster.c; sourceTree = ""; }; - C686F8D61CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vertical_drop_roller_coaster.c; sourceTree = ""; }; - C686F8D71CDBC3B7009F9BFC /* virginia_reel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = virginia_reel.c; sourceTree = ""; }; - C686F8D81CDBC3B7009F9BFC /* wild_mouse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wild_mouse.c; sourceTree = ""; }; - C686F8D91CDBC3B7009F9BFC /* wooden_roller_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wooden_roller_coaster.c; sourceTree = ""; }; - C686F8DA1CDBC3B7009F9BFC /* wooden_wild_mouse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wooden_wild_mouse.c; sourceTree = ""; }; - C686F8DC1CDBC3B7009F9BFC /* car_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = car_ride.c; sourceTree = ""; }; - C686F8DD1CDBC3B7009F9BFC /* circus_show.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = circus_show.c; sourceTree = ""; }; - C686F8DE1CDBC3B7009F9BFC /* crooked_house.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crooked_house.c; sourceTree = ""; }; - C686F8DF1CDBC3B7009F9BFC /* dodgems.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dodgems.c; sourceTree = ""; }; - C686F8E01CDBC3B7009F9BFC /* ferris_wheel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ferris_wheel.c; sourceTree = ""; }; - C686F8E11CDBC3B7009F9BFC /* flying_saucers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = flying_saucers.c; sourceTree = ""; }; - C686F8E21CDBC3B7009F9BFC /* ghost_train.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ghost_train.c; sourceTree = ""; }; - C686F8E31CDBC3B7009F9BFC /* haunted_house.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = haunted_house.c; sourceTree = ""; }; - C686F8E41CDBC3B7009F9BFC /* maze.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = maze.c; sourceTree = ""; }; - C686F8E51CDBC3B7009F9BFC /* merry_go_round.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = merry_go_round.c; sourceTree = ""; }; - C686F8E61CDBC3B7009F9BFC /* mini_golf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mini_golf.c; sourceTree = ""; }; - C686F8E71CDBC3B7009F9BFC /* mini_helicopters.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mini_helicopters.c; sourceTree = ""; }; - C686F8E81CDBC3B7009F9BFC /* monorail_cycles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = monorail_cycles.c; sourceTree = ""; }; C686F8E91CDBC3B7009F9BFC /* observation_tower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = observation_tower.c; sourceTree = ""; }; C686F8EA1CDBC3B7009F9BFC /* space_rings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = space_rings.c; sourceTree = ""; }; C686F8EB1CDBC3B7009F9BFC /* spiral_slide.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spiral_slide.c; sourceTree = ""; }; @@ -850,15 +588,6 @@ C686F8F11CDBC3B7009F9BFC /* 3d_cinema.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = 3d_cinema.c; sourceTree = ""; }; C686F8F21CDBC3B7009F9BFC /* enterprise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = enterprise.c; sourceTree = ""; }; C686F8F31CDBC3B7009F9BFC /* go_karts.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = go_karts.c; sourceTree = ""; }; - C686F8F41CDBC3B7009F9BFC /* launched_freefall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = launched_freefall.c; sourceTree = ""; }; - C686F8F51CDBC3B7009F9BFC /* magic_carpet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = magic_carpet.c; sourceTree = ""; }; - C686F8F61CDBC3B7009F9BFC /* motion_simulator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = motion_simulator.c; sourceTree = ""; }; - C686F8F71CDBC3B7009F9BFC /* pirate_ship.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pirate_ship.c; sourceTree = ""; }; - C686F8F81CDBC3B7009F9BFC /* roto_drop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = roto_drop.c; sourceTree = ""; }; - C686F8F91CDBC3B7009F9BFC /* swinging_inverter_ship.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = swinging_inverter_ship.c; sourceTree = ""; }; - C686F8FA1CDBC3B7009F9BFC /* top_spin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = top_spin.c; sourceTree = ""; }; - C686F8FB1CDBC3B7009F9BFC /* twist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = twist.c; sourceTree = ""; }; - C686F8FD1CDBC3B7009F9BFC /* chairlift.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chairlift.c; sourceTree = ""; }; C686F8FE1CDBC3B7009F9BFC /* lift.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lift.c; sourceTree = ""; }; C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = miniature_railway.c; sourceTree = ""; }; C686F9001CDBC3B7009F9BFC /* monorail.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = monorail.c; sourceTree = ""; }; @@ -866,40 +595,6 @@ C686F9031CDBC3B7009F9BFC /* boat_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = boat_ride.c; sourceTree = ""; }; C686F9041CDBC3B7009F9BFC /* dingy_slide.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dingy_slide.c; sourceTree = ""; }; C686F9051CDBC3B7009F9BFC /* log_flume.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = log_flume.c; sourceTree = ""; }; - C686F9071CDBC3B7009F9BFC /* river_rapids.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = river_rapids.c; sourceTree = ""; }; - C686F9081CDBC3B7009F9BFC /* splash_boats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = splash_boats.c; sourceTree = ""; }; - C686F9091CDBC3B7009F9BFC /* submarine_ride.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = submarine_ride.c; sourceTree = ""; }; - C686F90A1CDBC3B7009F9BFC /* water_coaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = water_coaster.c; sourceTree = ""; }; - C686F9561CDBC4C7009F9BFC /* vehicle_paint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vehicle_paint.c; sourceTree = ""; }; - C686F9571CDBC4C7009F9BFC /* vehicle_paint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vehicle_paint.h; sourceTree = ""; }; - C68B2CB41EB60DDE0020651C /* server_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = server_list.cpp; sourceTree = ""; }; - C6B5A7D01CDFE4CB00C9C006 /* S6Exporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = S6Exporter.cpp; sourceTree = ""; }; - C6B5A7D11CDFE4CB00C9C006 /* S6Exporter.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = S6Exporter.h; sourceTree = ""; }; - C6B5A7D21CDFE4CB00C9C006 /* S6Importer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = S6Importer.cpp; sourceTree = ""; }; - C6CABA801E1466D600D33A6B /* FileClassifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileClassifier.cpp; sourceTree = ""; }; - C6CABA811E1466D600D33A6B /* FileClassifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileClassifier.h; sourceTree = ""; }; - C6E96E101E04067A0076A04F /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = ""; }; - C6E96E111E04067A0076A04F /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = ""; }; - C6E96E131E04069A0076A04F /* Zip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Zip.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E141E04069A0076A04F /* Zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Zip.h; sourceTree = ""; usesTabs = 0; }; - C6E96E161E0406F00076A04F /* addresses.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = addresses.c; sourceTree = ""; }; - C6E96E171E0406F00076A04F /* addresses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = addresses.h; sourceTree = ""; }; - C6E96E181E0406F00076A04F /* hook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hook.c; sourceTree = ""; }; - C6E96E191E0406F00076A04F /* hook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hook.h; sourceTree = ""; }; - C6E96E1D1E04070E0076A04F /* scenario.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scenario.c; sourceTree = ""; }; - C6E96E1E1E04070E0076A04F /* scenario.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scenario.h; sourceTree = ""; }; - C6E96E1F1E04070E0076A04F /* ScenarioRepository.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScenarioRepository.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E201E04070E0076A04F /* ScenarioRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScenarioRepository.h; sourceTree = ""; usesTabs = 0; }; - C6E96E211E04070E0076A04F /* ScenarioSources.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScenarioSources.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E221E04070E0076A04F /* ScenarioSources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScenarioSources.h; sourceTree = ""; usesTabs = 0; }; - C6E96E271E04072F0076A04F /* TitleScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TitleScreen.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E281E04072F0076A04F /* TitleScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleScreen.h; sourceTree = ""; usesTabs = 0; }; - C6E96E291E04072F0076A04F /* TitleSequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequence.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E2A1E04072F0076A04F /* TitleSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleSequence.h; sourceTree = ""; usesTabs = 0; }; - C6E96E2B1E04072F0076A04F /* TitleSequenceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequenceManager.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E2C1E04072F0076A04F /* TitleSequenceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleSequenceManager.h; sourceTree = ""; usesTabs = 0; }; - C6E96E2D1E04072F0076A04F /* TitleSequencePlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TitleSequencePlayer.cpp; sourceTree = ""; usesTabs = 0; }; - C6E96E2E1E04072F0076A04F /* TitleSequencePlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleSequencePlayer.h; sourceTree = ""; usesTabs = 0; }; C6E96E331E0408A80076A04F /* zip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; C6E96E341E0408A80076A04F /* zipconf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zipconf.h; sourceTree = ""; }; C6E96E351E0408B40076A04F /* libzip.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libzip.dylib; sourceTree = ""; }; @@ -1719,221 +1414,6 @@ path = test/testpaint; sourceTree = ""; }; - C650B2141CCABBDD00B4D91C /* rct1 */ = { - isa = PBXGroup; - children = ( - C650B2151CCABBDD00B4D91C /* S4Importer.cpp */, - C650B2171CCABBDD00B4D91C /* tables.cpp */, - C650B2181CCABBDD00B4D91C /* Tables.h */, - ); - path = rct1; - sourceTree = ""; - }; - C686F8961CDBC37E009F9BFC /* paint */ = { - isa = PBXGroup; - children = ( - C686F8971CDBC37E009F9BFC /* map_element */, - C686F8A41CDBC37E009F9BFC /* sprite */, - 85B468FB1D96822F000F1DB5 /* paint_helpers.c */, - C686F8A21CDBC37E009F9BFC /* paint.c */, - C686F8AA1CDBC37E009F9BFC /* supports.c */, - C686F8A31CDBC37E009F9BFC /* paint.h */, - C686F8AB1CDBC37E009F9BFC /* supports.h */, - ); - path = paint; - sourceTree = ""; - }; - C686F8971CDBC37E009F9BFC /* map_element */ = { - isa = PBXGroup; - children = ( - C686F8981CDBC37E009F9BFC /* banner.c */, - C686F8991CDBC37E009F9BFC /* entrance.c */, - C686F89A1CDBC37E009F9BFC /* fence.c */, - C686F89B1CDBC37E009F9BFC /* map_element.c */, - C686F89C1CDBC37E009F9BFC /* map_element.h */, - C686F89D1CDBC37E009F9BFC /* path.c */, - C686F89F1CDBC37E009F9BFC /* scenery_multiple.c */, - C686F89E1CDBC37E009F9BFC /* scenery.c */, - C686F8A01CDBC37E009F9BFC /* surface.c */, - C686F8A11CDBC37E009F9BFC /* surface.h */, - ); - path = map_element; - sourceTree = ""; - }; - C686F8A41CDBC37E009F9BFC /* sprite */ = { - isa = PBXGroup; - children = ( - C686F8A51CDBC37E009F9BFC /* litter.c */, - C686F8A61CDBC37E009F9BFC /* misc.c */, - C686F8A71CDBC37E009F9BFC /* peep.c */, - C686F8A81CDBC37E009F9BFC /* sprite.c */, - C686F8A91CDBC37E009F9BFC /* sprite.h */, - ); - path = sprite; - sourceTree = ""; - }; - C686F8BA1CDBC3B7009F9BFC /* coaster */ = { - isa = PBXGroup; - children = ( - C686F8BB1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c */, - C686F8BC1CDBC3B7009F9BFC /* bobsleigh_coaster.c */, - C65A88881E16859D000368D7 /* bolliger_mabillard_track.c */, - C65A88891E16859D000368D7 /* bolliger_mabillard_track.h */, - C686F8BD1CDBC3B7009F9BFC /* compact_inverted_coaster.c */, - C686F8BE1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c */, - C686F8BF1CDBC3B7009F9BFC /* flying_roller_coaster.c */, - C686F8C01CDBC3B7009F9BFC /* giga_coaster.c */, - C686F8C11CDBC3B7009F9BFC /* heartline_twister_coaster.c */, - C686F8C21CDBC3B7009F9BFC /* inverted_hairpin_coaster.c */, - C686F8C31CDBC3B7009F9BFC /* inverted_impulse_coaster.c */, - C686F8C41CDBC3B7009F9BFC /* inverted_roller_coaster.c */, - C686F8C51CDBC3B7009F9BFC /* junior_roller_coaster.c */, - C6FF1BAD1DBCE1A10078DCB5 /* junior_roller_coaster.h */, - C686F8C61CDBC3B7009F9BFC /* lay_down_roller_coaster.c */, - C686F8C71CDBC3B7009F9BFC /* lim_launched_roller_coaster.c */, - C686F8C81CDBC3B7009F9BFC /* looping_roller_coaster.c */, - C686F8C91CDBC3B7009F9BFC /* mine_ride.c */, - C686F8CA1CDBC3B7009F9BFC /* mine_train_coaster.c */, - C686F8CB1CDBC3B7009F9BFC /* mini_roller_coaster.c */, - C686F8CC1CDBC3B7009F9BFC /* mini_suspended_coaster.c */, - C686F8CD1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c */, - C686F8CE1CDBC3B7009F9BFC /* reverse_freefall_coaster.c */, - C686F8CF1CDBC3B7009F9BFC /* reverser_roller_coaster.c */, - C686F8D01CDBC3B7009F9BFC /* side_friction_roller_coaster.c */, - C686F8D21CDBC3B7009F9BFC /* stand_up_roller_coaster.c */, - C686F8D31CDBC3B7009F9BFC /* steeplechase.c */, - C686F8D41CDBC3B7009F9BFC /* suspended_swinging_coaster.c */, - C686F8D51CDBC3B7009F9BFC /* twister_roller_coaster.c */, - C686F8D61CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c */, - C686F8D71CDBC3B7009F9BFC /* virginia_reel.c */, - C686F8D81CDBC3B7009F9BFC /* wild_mouse.c */, - C686F8D91CDBC3B7009F9BFC /* wooden_roller_coaster.c */, - C686F8DA1CDBC3B7009F9BFC /* wooden_wild_mouse.c */, - ); - path = coaster; - sourceTree = ""; - }; - C686F8DB1CDBC3B7009F9BFC /* gentle */ = { - isa = PBXGroup; - children = ( - C686F8DC1CDBC3B7009F9BFC /* car_ride.c */, - C686F8DD1CDBC3B7009F9BFC /* circus_show.c */, - C686F8DE1CDBC3B7009F9BFC /* crooked_house.c */, - C686F8DF1CDBC3B7009F9BFC /* dodgems.c */, - C686F8E01CDBC3B7009F9BFC /* ferris_wheel.c */, - C686F8E11CDBC3B7009F9BFC /* flying_saucers.c */, - C686F8E21CDBC3B7009F9BFC /* ghost_train.c */, - C686F8E31CDBC3B7009F9BFC /* haunted_house.c */, - C686F8E41CDBC3B7009F9BFC /* maze.c */, - C686F8E51CDBC3B7009F9BFC /* merry_go_round.c */, - C686F8E61CDBC3B7009F9BFC /* mini_golf.c */, - C686F8E71CDBC3B7009F9BFC /* mini_helicopters.c */, - C686F8E81CDBC3B7009F9BFC /* monorail_cycles.c */, - C686F8E91CDBC3B7009F9BFC /* observation_tower.c */, - C686F8EA1CDBC3B7009F9BFC /* space_rings.c */, - C686F8EB1CDBC3B7009F9BFC /* spiral_slide.c */, - ); - path = gentle; - sourceTree = ""; - }; - C686F8EC1CDBC3B7009F9BFC /* shops */ = { - isa = PBXGroup; - children = ( - C686F8ED1CDBC3B7009F9BFC /* facility.c */, - C686F8EF1CDBC3B7009F9BFC /* shop.c */, - ); - path = shops; - sourceTree = ""; - }; - C686F8F01CDBC3B7009F9BFC /* thrill */ = { - isa = PBXGroup; - children = ( - C686F8F11CDBC3B7009F9BFC /* 3d_cinema.c */, - C686F8F21CDBC3B7009F9BFC /* enterprise.c */, - C686F8F31CDBC3B7009F9BFC /* go_karts.c */, - C686F8F41CDBC3B7009F9BFC /* launched_freefall.c */, - C686F8F51CDBC3B7009F9BFC /* magic_carpet.c */, - C686F8F61CDBC3B7009F9BFC /* motion_simulator.c */, - C686F8F71CDBC3B7009F9BFC /* pirate_ship.c */, - C686F8F81CDBC3B7009F9BFC /* roto_drop.c */, - C686F8F91CDBC3B7009F9BFC /* swinging_inverter_ship.c */, - C686F8FA1CDBC3B7009F9BFC /* top_spin.c */, - C686F8FB1CDBC3B7009F9BFC /* twist.c */, - ); - path = thrill; - sourceTree = ""; - }; - C686F8FC1CDBC3B7009F9BFC /* transport */ = { - isa = PBXGroup; - children = ( - C686F8FD1CDBC3B7009F9BFC /* chairlift.c */, - C686F8FE1CDBC3B7009F9BFC /* lift.c */, - C686F8FF1CDBC3B7009F9BFC /* miniature_railway.c */, - C686F9001CDBC3B7009F9BFC /* monorail.c */, - C686F9011CDBC3B7009F9BFC /* suspended_monorail.c */, - ); - path = transport; - sourceTree = ""; - }; - C686F9021CDBC3B7009F9BFC /* water */ = { - isa = PBXGroup; - children = ( - C686F9031CDBC3B7009F9BFC /* boat_ride.c */, - C686F9041CDBC3B7009F9BFC /* dingy_slide.c */, - C686F9051CDBC3B7009F9BFC /* log_flume.c */, - C686F9071CDBC3B7009F9BFC /* river_rapids.c */, - C686F9081CDBC3B7009F9BFC /* splash_boats.c */, - C686F9091CDBC3B7009F9BFC /* submarine_ride.c */, - C686F90A1CDBC3B7009F9BFC /* water_coaster.c */, - ); - path = water; - sourceTree = ""; - }; - C6B5A7CF1CDFE4CB00C9C006 /* rct2 */ = { - isa = PBXGroup; - children = ( - C6E96E161E0406F00076A04F /* addresses.c */, - C6E96E171E0406F00076A04F /* addresses.h */, - C6E96E181E0406F00076A04F /* hook.c */, - C6E96E191E0406F00076A04F /* hook.h */, - C6834A0F1DFDE8E300CE933A /* interop.c */, - C6834A101DFDE8E300CE933A /* interop.h */, - C6B5A7D01CDFE4CB00C9C006 /* S6Exporter.cpp */, - C6B5A7D11CDFE4CB00C9C006 /* S6Exporter.h */, - C6B5A7D21CDFE4CB00C9C006 /* S6Importer.cpp */, - ); - path = rct2; - sourceTree = ""; - usesTabs = 0; - }; - C6E96E1C1E04070E0076A04F /* scenario */ = { - isa = PBXGroup; - children = ( - C6E96E1D1E04070E0076A04F /* scenario.c */, - C6E96E1E1E04070E0076A04F /* scenario.h */, - C6E96E1F1E04070E0076A04F /* ScenarioRepository.cpp */, - C6E96E201E04070E0076A04F /* ScenarioRepository.h */, - C6E96E211E04070E0076A04F /* ScenarioSources.cpp */, - C6E96E221E04070E0076A04F /* ScenarioSources.h */, - ); - path = scenario; - sourceTree = ""; - }; - C6E96E261E04072F0076A04F /* title */ = { - isa = PBXGroup; - children = ( - C6E96E271E04072F0076A04F /* TitleScreen.cpp */, - C6E96E281E04072F0076A04F /* TitleScreen.h */, - C6E96E291E04072F0076A04F /* TitleSequence.cpp */, - C6E96E2A1E04072F0076A04F /* TitleSequence.h */, - C6E96E2B1E04072F0076A04F /* TitleSequenceManager.cpp */, - C6E96E2C1E04072F0076A04F /* TitleSequenceManager.h */, - C6E96E2D1E04072F0076A04F /* TitleSequencePlayer.cpp */, - C6E96E2E1E04072F0076A04F /* TitleSequencePlayer.h */, - ); - path = title; - sourceTree = ""; - }; D41B72431C21015A0080A7B9 /* Sources */ = { isa = PBXGroup; children = ( @@ -3416,7 +2896,6 @@ C64FDAA41D6D9A2100F259B9 /* miniature_railway.c in Sources */, C64FDAA51D6D9A2100F259B9 /* monorail.c in Sources */, C64FDAA61D6D9A2100F259B9 /* suspended_monorail.c in Sources */, - 85B468FD1D96822F000F1DB5 /* paint_helpers.c in Sources */, C64FDAA71D6D9A2100F259B9 /* boat_ride.c in Sources */, C64FDAA81D6D9A2100F259B9 /* dingy_slide.c in Sources */, C64FDAA91D6D9A2100F259B9 /* log_flume.c in Sources */, @@ -3428,356 +2907,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 008BF72B1CDAA5C30019A2AD /* track_design_save.c in Sources */, - D44272491CC81B3200D84D28 /* track.c in Sources */, - C686F9201CDBC3B7009F9BFC /* side_friction_roller_coaster.c in Sources */, - D44272561CC81B3200D84D28 /* cheats.c in Sources */, - C65A888A1E16859D000368D7 /* bolliger_mabillard_track.c in Sources */, - D442722B1CC81B3200D84D28 /* real_names.c in Sources */, - D442721C1CC81B3200D84D28 /* keyboard_shortcut.c in Sources */, - D442728F1CC81B3200D84D28 /* title_menu.c in Sources */, - C686F9381CDBC3B7009F9BFC /* observation_tower.c in Sources */, - D44272A41CC81B3200D84D28 /* park.c in Sources */, - C686F9391CDBC3B7009F9BFC /* space_rings.c in Sources */, - D464FEEF1D31A6AA00CBABAC /* RideObject.cpp in Sources */, - D464FEEA1D31A6AA00CBABAC /* LargeSceneryObject.cpp in Sources */, - C686F9371CDBC3B7009F9BFC /* monorail_cycles.c in Sources */, - D49766891D03BABB002222CD /* rain.cpp in Sources */, - 791166FB1D7486EF005912EA /* NetworkServerAdvertiser.cpp in Sources */, - D44272441CC81B3200D84D28 /* cable_lift.c in Sources */, - C647C6911E1D0CA000C7FB21 /* AudioMixer.cpp in Sources */, - C65A88921E1B1148000368D7 /* AudioChannel.cpp in Sources */, - C686F91D1CDBC3B7009F9BFC /* multi_dimension_roller_coaster.c in Sources */, - C686F8B31CDBC37E009F9BFC /* surface.c in Sources */, - C650B21C1CCABC4400B4D91C /* ConvertCommand.cpp in Sources */, - D44272211CC81B3200D84D28 /* viewport_interaction.c in Sources */, - D442721B1CC81B3200D84D28 /* graph.c in Sources */, - C686F9581CDBC4C7009F9BFC /* vehicle_paint.c in Sources */, - 658F3D911E44A6C200388550 /* ParkImporter.cpp in Sources */, - 007A05D11CFB2C8B00F419C3 /* NetworkPacket.cpp in Sources */, - 007A05CD1CFB2C8B00F419C3 /* NetworkAction.cpp in Sources */, - C686F8AE1CDBC37E009F9BFC /* fence.c in Sources */, - C686F8AC1CDBC37E009F9BFC /* banner.c in Sources */, - D44272671CC81B3200D84D28 /* land.c in Sources */, - D442726D1CC81B3200D84D28 /* mapgen.c in Sources */, - C686F9291CDBC3B7009F9BFC /* wooden_roller_coaster.c in Sources */, - D460DFD41E0123D1007BA2FE /* PlatformEnvironment.cpp in Sources */, - D44272A71CC81B3200D84D28 /* sprite.c in Sources */, - D44272941CC81B3200D84D28 /* track_list.c in Sources */, - D44272711CC81B3200D84D28 /* network_status.c in Sources */, - C686F9481CDBC3B7009F9BFC /* twist.c in Sources */, - D44272651CC81B3200D84D28 /* guest_list.c in Sources */, - D442723F1CC81B3200D84D28 /* shared.c in Sources */, - D442727E1CC81B3200D84D28 /* save_prompt.c in Sources */, - D464B3E01E4FBC850003F3B5 /* ServerList.cpp in Sources */, - D442726A1CC81B3200D84D28 /* main.c in Sources */, - 007A05CF1CFB2C8B00F419C3 /* NetworkConnection.cpp in Sources */, - C686F9341CDBC3B7009F9BFC /* merry_go_round.c in Sources */, - C686F8B81CDBC37E009F9BFC /* sprite.c in Sources */, - D45B202D1D1E92DB00B67CC7 /* custom_currency.c in Sources */, - D464FEEB1D31A6AA00CBABAC /* Object.cpp in Sources */, - C686F9221CDBC3B7009F9BFC /* stand_up_roller_coaster.c in Sources */, - D437A26F1DBC2937001CB2CF /* TrackDesignRepository.cpp in Sources */, - C686F94F1CDBC3B7009F9BFC /* dingy_slide.c in Sources */, - D44272341CC81B3200D84D28 /* network.cpp in Sources */, - C686F9151CDBC3B7009F9BFC /* junior_roller_coaster.c in Sources */, - C686F9131CDBC3B7009F9BFC /* inverted_impulse_coaster.c in Sources */, - D44272001CC81B3200D84D28 /* Diagnostics.cpp in Sources */, - D464FEF11D31A6AA00CBABAC /* SmallSceneryObject.cpp in Sources */, - D44272471CC81B3200D84D28 /* ride_ratings.c in Sources */, - D42E337D1E5C27D600D630AF /* Config.cpp in Sources */, - D44272721CC81B3200D84D28 /* new_campaign.c in Sources */, - C686F93A1CDBC3B7009F9BFC /* spiral_slide.c in Sources */, - C686F9421CDBC3B7009F9BFC /* magic_carpet.c in Sources */, - D44272021CC81B3200D84D28 /* Json.cpp in Sources */, - C649B3D41DF04ED2008AC826 /* format_codes.c in Sources */, - D44272591CC81B3200D84D28 /* dropdown.c in Sources */, - D43407DF1D0E14BE00C2B3D4 /* SwapFramebuffer.cpp in Sources */, - C686F8AF1CDBC37E009F9BFC /* map_element.c in Sources */, - D44272081CC81B3200D84D28 /* diagnostic.c in Sources */, - C6E96E1B1E0406F00076A04F /* hook.c in Sources */, - D44272A51CC81B3200D84D28 /* particle.c in Sources */, - D44272811CC81B3200D84D28 /* server_start.c in Sources */, - D44272611CC81B3200D84D28 /* finances.c in Sources */, - C6575A371D46AFBA00C3E79F /* debug_paint.c in Sources */, - D442722D1CC81B3200D84D28 /* utf8.c in Sources */, - C686F9461CDBC3B7009F9BFC /* swinging_inverter_ship.c in Sources */, - D442720B1CC81B3200D84D28 /* font.c in Sources */, - C686F90D1CDBC3B7009F9BFC /* compact_inverted_coaster.c in Sources */, - D464FEF31D31A6AA00CBABAC /* StringTable.cpp in Sources */, - C686F8B01CDBC37E009F9BFC /* path.c in Sources */, - D44272361CC81B3200D84D28 /* object_list.c in Sources */, - D44272581CC81B3200D84D28 /* demolish_ride_prompt.c in Sources */, - D442723E1CC81B3200D84D28 /* posix.c in Sources */, - D44271F91CC81B3200D84D28 /* CommandLine.cpp in Sources */, - 00EFEE721CF1D80B0035213B /* NetworkKey.cpp in Sources */, - C686F90B1CDBC3B7009F9BFC /* air_powered_vertical_coaster.c in Sources */, - D44272051CC81B3200D84D28 /* String.cpp in Sources */, - D442725A1CC81B3200D84D28 /* editor_bottom_toolbar.c in Sources */, - D442729D1CC81B3200D84D28 /* footpath.c in Sources */, - D43407DD1D0E14BE00C2B3D4 /* OpenGLFramebuffer.cpp in Sources */, - D442721D1CC81B3200D84D28 /* screenshot.c in Sources */, - C686F92C1CDBC3B7009F9BFC /* circus_show.c in Sources */, - D44271FD1CC81B3200D84D28 /* cmdline_sprite.c in Sources */, - D464FEEE1D31A6AA00CBABAC /* ObjectRepository.cpp in Sources */, - D464FEF51D31A6AA00CBABAC /* WaterObject.cpp in Sources */, - D442720C1CC81B3200D84D28 /* line.c in Sources */, - C686F9321CDBC3B7009F9BFC /* haunted_house.c in Sources */, - D442720A1CC81B3200D84D28 /* drawing_fast.cpp in Sources */, - C686F9521CDBC3B7009F9BFC /* river_rapids.c in Sources */, - 008BF72C1CDAA5C30019A2AD /* track_design.c in Sources */, - C61FB7241CF86356004CE991 /* NetworkUser.cpp in Sources */, - D44272191CC81B3200D84D28 /* colour.c in Sources */, - D442724C1CC81B3200D84D28 /* vehicle.c in Sources */, - C6136C551E21893500F3ED2B /* view_clipping.c in Sources */, - D464FEED1D31A6AA00CBABAC /* ObjectManager.cpp in Sources */, - D44272261CC81B3200D84D28 /* currency.c in Sources */, - C65A88931E1B1148000368D7 /* FileAudioSource.cpp in Sources */, - C6E96E301E04072F0076A04F /* TitleSequence.cpp in Sources */, - C686F92B1CDBC3B7009F9BFC /* car_ride.c in Sources */, - D44272921CC81B3200D84D28 /* tooltip.c in Sources */, - C686F91C1CDBC3B7009F9BFC /* mini_suspended_coaster.c in Sources */, - D44271FA1CC81B3200D84D28 /* RootCommands.cpp in Sources */, - D442726B1CC81B3200D84D28 /* map.c in Sources */, - 85B468FC1D96822F000F1DB5 /* paint_helpers.c in Sources */, - D464FEE71D31A6AA00CBABAC /* FootpathItemObject.cpp in Sources */, - D442721E1CC81B3200D84D28 /* Theme.cpp in Sources */, - D4F5B5EF1DAD8A4300AB6075 /* CursorData.cpp in Sources */, - C686F9271CDBC3B7009F9BFC /* virginia_reel.c in Sources */, - D44272271CC81B3200D84D28 /* date.c in Sources */, - D44272971CC81B3200D84D28 /* viewport.c in Sources */, - C686F90F1CDBC3B7009F9BFC /* flying_roller_coaster.c in Sources */, - D44272661CC81B3200D84D28 /* install_track.c in Sources */, - D49766831D03B9FE002222CD /* SoftwareDrawingEngine.cpp in Sources */, - C6E96E121E04067A0076A04F /* File.cpp in Sources */, - D464FEF21D31A6AA00CBABAC /* StexObject.cpp in Sources */, - D42E33801E5C27D600D630AF /* KeyboardShortcuts.cpp in Sources */, - C6E96E311E04072F0076A04F /* TitleSequenceManager.cpp in Sources */, - C686F9331CDBC3B7009F9BFC /* maze.c in Sources */, - C686F9241CDBC3B7009F9BFC /* suspended_swinging_coaster.c in Sources */, - C686F92D1CDBC3B7009F9BFC /* crooked_house.c in Sources */, - D442727F1CC81B3200D84D28 /* scenery.c in Sources */, - D429FF421E36ABCD009342A6 /* tile_inspector.c in Sources */, - D460DFD11E01239D007BA2FE /* OpenRCT2.cpp in Sources */, - C686F93C1CDBC3B7009F9BFC /* misc.c in Sources */, - D442723A1CC81B3200D84D28 /* staff.c in Sources */, - D44272931CC81B3200D84D28 /* top_toolbar.c in Sources */, - D43407DA1D0E14BE00C2B3D4 /* FillRectShader.cpp in Sources */, - D464FEBE1D31A66E00CBABAC /* MemoryStream.cpp in Sources */, - D442728A1CC81B3200D84D28 /* tile_inspector.c in Sources */, - D43407D91D0E14BE00C2B3D4 /* DrawLineShader.cpp in Sources */, - C686F9411CDBC3B7009F9BFC /* launched_freefall.c in Sources */, - D44272571CC81B3200D84D28 /* clear_scenery.c in Sources */, - D442727D1CC81B3200D84D28 /* ride_list.c in Sources */, - C686F94E1CDBC3B7009F9BFC /* boat_ride.c in Sources */, - D42E337F1E5C27D600D630AF /* IniWriter.cpp in Sources */, - D44272891CC81B3200D84D28 /* themes.c in Sources */, - C686F9531CDBC3B7009F9BFC /* splash_boats.c in Sources */, - C686F9441CDBC3B7009F9BFC /* pirate_ship.c in Sources */, - 652747EC1E41CE1B000F36FD /* SawyerEncoding.cpp in Sources */, - D44272791CC81B3200D84D28 /* publisher_credits.c in Sources */, - C686F91E1CDBC3B7009F9BFC /* reverse_freefall_coaster.c in Sources */, - D42E337E1E5C27D600D630AF /* IniReader.cpp in Sources */, - D442723B1CC81B3200D84D28 /* crash.cpp in Sources */, - C650B21A1CCABBDD00B4D91C /* tables.cpp in Sources */, - C68B2CB51EB60DDE0020651C /* server_list.cpp in Sources */, - D44272291CC81B3200D84D28 /* LanguagePack.cpp in Sources */, - D44272901CC81B3200D84D28 /* title_options.c in Sources */, - C6CABA821E1466D600D33A6B /* FileClassifier.cpp in Sources */, - C686F94A1CDBC3B7009F9BFC /* lift.c in Sources */, - C6E96E321E04072F0076A04F /* TitleSequencePlayer.cpp in Sources */, - D46F2A9E1D39A25A00A36AB7 /* peep_data.c in Sources */, - D44272A01CC81B3200D84D28 /* map_animation.c in Sources */, - C686F92A1CDBC3B7009F9BFC /* wooden_wild_mouse.c in Sources */, - C686F90C1CDBC3B7009F9BFC /* bobsleigh_coaster.c in Sources */, - C686F9541CDBC3B7009F9BFC /* submarine_ride.c in Sources */, - D44271F81CC81B3200D84D28 /* cheats.c in Sources */, - C686F9181CDBC3B7009F9BFC /* looping_roller_coaster.c in Sources */, - D44271FC1CC81B3200D84D28 /* SpriteCommands.cpp in Sources */, - C686F92E1CDBC3B7009F9BFC /* dodgems.c in Sources */, - D442728B1CC81B3200D84D28 /* title_command_editor.c in Sources */, - C686F9451CDBC3B7009F9BFC /* roto_drop.c in Sources */, - C686F9121CDBC3B7009F9BFC /* inverted_hairpin_coaster.c in Sources */, - D44272231CC81B3200D84D28 /* window.c in Sources */, - D44272451CC81B3200D84D28 /* ride.c in Sources */, - C686F8B91CDBC37E009F9BFC /* supports.c in Sources */, - D442726E1CC81B3200D84D28 /* maze_construction.c in Sources */, - D44272751CC81B3200D84D28 /* news_options.c in Sources */, - C6EABCC41E719691008C09AB /* UriHandler.cpp in Sources */, - D44272551CC81B3200D84D28 /* changelog.c in Sources */, - C686F9471CDBC3B7009F9BFC /* top_spin.c in Sources */, - D442720E1CC81B3200D84D28 /* rect.c in Sources */, - D437A2721DBC29B0001CB2CF /* FileScanner.cpp in Sources */, - C686F9171CDBC3B7009F9BFC /* lim_launched_roller_coaster.c in Sources */, - C686F9101CDBC3B7009F9BFC /* giga_coaster.c in Sources */, - C6B5A7D41CDFE4CB00C9C006 /* S6Exporter.cpp in Sources */, - D44272351CC81B3200D84D28 /* twitch.cpp in Sources */, - D44272691CC81B3200D84D28 /* loadsave.c in Sources */, - C6E96E251E04070E0076A04F /* ScenarioSources.cpp in Sources */, - D44272061CC81B3200D84D28 /* textinputbuffer.c in Sources */, - C686F9191CDBC3B7009F9BFC /* mine_ride.c in Sources */, - C650B2191CCABBDD00B4D91C /* S4Importer.cpp in Sources */, - D44272911CC81B3200D84D28 /* title_scenarioselect.c in Sources */, - C686F8B61CDBC37E009F9BFC /* misc.c in Sources */, - D44272411CC81B3200D84D28 /* rct1.c in Sources */, - D44272621CC81B3200D84D28 /* footpath.c in Sources */, - C65A88951E1B1148000368D7 /* NullAudioSource.cpp in Sources */, - D44272521CC81B3200D84D28 /* util.c in Sources */, - D44272A21CC81B3200D84D28 /* mapgen.c in Sources */, - D44272201CC81B3200D84D28 /* viewport.c in Sources */, - D442722F1CC81B3200D84D28 /* finance.c in Sources */, - D44272831CC81B3200D84D28 /* shortcut_keys.c in Sources */, - C686F9401CDBC3B7009F9BFC /* go_karts.c in Sources */, - 652076321E22EFE7000D0C04 /* Imaging.cpp in Sources */, - C686F8B51CDBC37E009F9BFC /* litter.c in Sources */, - D44272141CC81B3200D84D28 /* game.c in Sources */, - C686F91A1CDBC3B7009F9BFC /* mine_train_coaster.c in Sources */, - D44272A11CC81B3200D84D28 /* map_helpers.c in Sources */, - C686F9431CDBC3B7009F9BFC /* motion_simulator.c in Sources */, - D4469DAD1DEF84480039A779 /* Fonts.cpp in Sources */, - D44272281CC81B3200D84D28 /* language.cpp in Sources */, - D464FEC01D31A68800CBABAC /* Image.cpp in Sources */, - C686F9261CDBC3B7009F9BFC /* vertical_drop_roller_coaster.c in Sources */, - D464FEE91D31A6AA00CBABAC /* ImageTable.cpp in Sources */, - D442726F1CC81B3200D84D28 /* multiplayer.c in Sources */, - 007A05D21CFB2C8B00F419C3 /* NetworkPlayer.cpp in Sources */, - D442725B1CC81B3200D84D28 /* editor_inventions_list.c in Sources */, - D44272311CC81B3200D84D28 /* news_item.c in Sources */, - D464FEF41D31A6AA00CBABAC /* WallObject.cpp in Sources */, - D44272011CC81B3200D84D28 /* Guard.cpp in Sources */, - C6E96E1A1E0406F00076A04F /* addresses.c in Sources */, - D43407E01D0E14BE00C2B3D4 /* TextureCache.cpp in Sources */, - 8594C0601D885CF600235E93 /* track_data_old.c in Sources */, - D44272951CC81B3200D84D28 /* track_manage.c in Sources */, - D44272851CC81B3200D84D28 /* staff.c in Sources */, - C6E96E241E04070E0076A04F /* ScenarioRepository.cpp in Sources */, - D442725F1CC81B3200D84D28 /* editor_scenario_options.c in Sources */, - D44272331CC81B3200D84D28 /* http.cpp in Sources */, - D44272841CC81B3200D84D28 /* sign.c in Sources */, - D44272481CC81B3200D84D28 /* station.c in Sources */, - D44272511CC81B3200D84D28 /* sawyercoding.c in Sources */, - D49464781E4DB27B00DC690E /* sprite.cpp in Sources */, - C686F91F1CDBC3B7009F9BFC /* reverser_roller_coaster.c in Sources */, - D442728C1CC81B3200D84D28 /* title_editor.c in Sources */, - D44272171CC81B3200D84D28 /* input.c in Sources */, - D44272741CC81B3200D84D28 /* news.c in Sources */, - D442723C1CC81B3200D84D28 /* linux.c in Sources */, - D4F5B5F01DAD8A4300AB6075 /* Cursors.cpp in Sources */, - D44272421CC81B3200D84D28 /* rct2.c in Sources */, - C686F8B71CDBC37E009F9BFC /* peep.c in Sources */, - C686F8B11CDBC37E009F9BFC /* scenery.c in Sources */, - C686F9251CDBC3B7009F9BFC /* twister_roller_coaster.c in Sources */, - D44272251CC81B3200D84D28 /* convert.c in Sources */, - D464FEEC1D31A6AA00CBABAC /* ObjectFactory.cpp in Sources */, - D442727B1CC81B3200D84D28 /* ride.c in Sources */, - D44272031CC81B3200D84D28 /* Path.cpp in Sources */, - C686F9301CDBC3B7009F9BFC /* flying_saucers.c in Sources */, - D44272401CC81B3200D84D28 /* windows.c in Sources */, - D44272881CC81B3200D84D28 /* text_input.c in Sources */, - D442720F1CC81B3200D84D28 /* scrolling_text.c in Sources */, - D43407D81D0E14BE00C2B3D4 /* DrawImageShader.cpp in Sources */, - 007A05D01CFB2C8B00F419C3 /* NetworkGroup.cpp in Sources */, - 656F6C8E1E45BFC200E0F770 /* Version.cpp in Sources */, - C686F9491CDBC3B7009F9BFC /* chairlift.c in Sources */, - C686F9501CDBC3B7009F9BFC /* log_flume.c in Sources */, - D464FEE81D31A6AA00CBABAC /* FootpathObject.cpp in Sources */, - D41FA8641E5EA1E200215624 /* wall.cpp in Sources */, - D43407D61D0E14BE00C2B3D4 /* CopyFramebufferShader.cpp in Sources */, - C6E96E231E04070E0076A04F /* scenario.c in Sources */, - D44272241CC81B3200D84D28 /* intro.c in Sources */, - C6E96E151E04069A0076A04F /* Zip.cpp in Sources */, - D44272631CC81B3200D84D28 /* game_bottom_toolbar.c in Sources */, - D44272091CC81B3200D84D28 /* drawing.c in Sources */, - C686F94C1CDBC3B7009F9BFC /* monorail.c in Sources */, - C6E96E2F1E04072F0076A04F /* TitleScreen.cpp in Sources */, - D442728E1CC81B3200D84D28 /* title_logo.c in Sources */, - C686F8B21CDBC37E009F9BFC /* scenery_multiple.c in Sources */, - D433A5011E4A861F00D9A6DF /* SawyerChunkReader.cpp in Sources */, - D442725E1CC81B3200D84D28 /* editor_objective_options.c in Sources */, - D44272531CC81B3200D84D28 /* about.c in Sources */, - C686F9311CDBC3B7009F9BFC /* ghost_train.c in Sources */, - D44272821CC81B3200D84D28 /* shortcut_key_change.c in Sources */, - D442722A1CC81B3200D84D28 /* localisation.c in Sources */, - D44272731CC81B3200D84D28 /* new_ride.c in Sources */, - D442721A1CC81B3200D84D28 /* console.c in Sources */, - C612A8991D64825300B634CA /* vehicle_data.c in Sources */, - D44271FB1CC81B3200D84D28 /* ScreenshotCommands.cpp in Sources */, - D464FEBB1D31A65300CBABAC /* IStream.cpp in Sources */, - C686F94B1CDBC3B7009F9BFC /* miniature_railway.c in Sources */, - C686F94D1CDBC3B7009F9BFC /* suspended_monorail.c in Sources */, - D44272131CC81B3200D84D28 /* editor.c in Sources */, - D442729F1CC81B3200D84D28 /* map.c in Sources */, - D464FEF01D31A6AA00CBABAC /* SceneryGroupObject.cpp in Sources */, - C686F9351CDBC3B7009F9BFC /* mini_golf.c in Sources */, - D44272541CC81B3200D84D28 /* banner.c in Sources */, - D44272A31CC81B3200D84D28 /* money_effect.c in Sources */, - C65A88941E1B1148000368D7 /* MemoryAudioSource.cpp in Sources */, - D464FEE61D31A6AA00CBABAC /* EntranceObject.cpp in Sources */, - D43407DE1D0E14BE00C2B3D4 /* OpenGLShaderProgram.cpp in Sources */, - D4B21B6F1E343AF1004982C7 /* lightfx.c in Sources */, - D43407DC1D0E14BE00C2B3D4 /* OpenGLDrawingEngine.cpp in Sources */, - D44272761CC81B3200D84D28 /* options.c in Sources */, - C686F93D1CDBC3B7009F9BFC /* shop.c in Sources */, - C686F8AD1CDBC37E009F9BFC /* entrance.c in Sources */, - D433A5001E4A861F00D9A6DF /* SawyerChunk.cpp in Sources */, - D44272111CC81B3200D84D28 /* string.c in Sources */, - C686F93E1CDBC3B7009F9BFC /* 3d_cinema.c in Sources */, - D44272771CC81B3200D84D28 /* park.c in Sources */, - C686F9141CDBC3B7009F9BFC /* inverted_roller_coaster.c in Sources */, - C686F9551CDBC3B7009F9BFC /* water_coaster.c in Sources */, - D44272461CC81B3200D84D28 /* ride_data.c in Sources */, - D44272181CC81B3200D84D28 /* chat.c in Sources */, - C686F93B1CDBC3B7009F9BFC /* facility.c in Sources */, - D442724B1CC81B3200D84D28 /* track_paint.c in Sources */, - D44272641CC81B3200D84D28 /* guest.c in Sources */, - D44272961CC81B3200D84D28 /* track_place.c in Sources */, - D442727A1CC81B3200D84D28 /* research.c in Sources */, - D442722E1CC81B3200D84D28 /* award.c in Sources */, - D44272861CC81B3200D84D28 /* staff_fire_prompt.c in Sources */, - D49766861D03BAA5002222CD /* NewDrawing.cpp in Sources */, - C6B5A7D51CDFE4CB00C9C006 /* S6Importer.cpp in Sources */, - D44272221CC81B3200D84D28 /* widget.c in Sources */, - D442723D1CC81B3200D84D28 /* macos.m in Sources */, - D44271FF1CC81B3200D84D28 /* Console.cpp in Sources */, - D44272781CC81B3200D84D28 /* player.c in Sources */, - C686F9161CDBC3B7009F9BFC /* lay_down_roller_coaster.c in Sources */, - D442727C1CC81B3200D84D28 /* ride_construction.c in Sources */, - D442724A1CC81B3200D84D28 /* track_data.c in Sources */, - D442725C1CC81B3200D84D28 /* editor_main.c in Sources */, - C686F9361CDBC3B7009F9BFC /* mini_helicopters.c in Sources */, - C686F93F1CDBC3B7009F9BFC /* enterprise.c in Sources */, - C686F91B1CDBC3B7009F9BFC /* mini_roller_coaster.c in Sources */, - D48ABABA1E71EBD500A3E39C /* entrance.cpp in Sources */, - D44D93AE1E92DD28004D6B77 /* Fountain.cpp in Sources */, - D464FEE51D31A6AA00CBABAC /* BannerObject.cpp in Sources */, - D44272391CC81B3200D84D28 /* peep.c in Sources */, - D44272681CC81B3200D84D28 /* land_rights.c in Sources */, - D44272601CC81B3200D84D28 /* error.c in Sources */, - D464B3E21E4FBCC00003F3B5 /* audio.cpp in Sources */, - C686F8B41CDBC37E009F9BFC /* paint.c in Sources */, - D442728D1CC81B3200D84D28 /* title_exit.c in Sources */, - D48A8D831D00272F00649DA7 /* TcpSocket.cpp in Sources */, - D442722C1CC81B3200D84D28 /* user.c in Sources */, - C686F92F1CDBC3B7009F9BFC /* ferris_wheel.c in Sources */, - D44272301CC81B3200D84D28 /* marketing.c in Sources */, - D44272321CC81B3200D84D28 /* research.c in Sources */, - D442725D1CC81B3200D84D28 /* editor_object_selection.c in Sources */, - D43407DB1D0E14BE00C2B3D4 /* OpenGLAPI.cpp in Sources */, - D44272981CC81B3200D84D28 /* water.c in Sources */, - D442726C1CC81B3200D84D28 /* map_tooltip.c in Sources */, - C686F9281CDBC3B7009F9BFC /* wild_mouse.c in Sources */, - D44272701CC81B3200D84D28 /* music_credits.c in Sources */, - D433A5021E4A861F00D9A6DF /* SawyerChunkWriter.cpp in Sources */, - C686F90E1CDBC3B7009F9BFC /* corkscrew_roller_coaster.c in Sources */, - D44272A61CC81B3200D84D28 /* scenery.c in Sources */, - C686F9111CDBC3B7009F9BFC /* heartline_twister_coaster.c in Sources */, - C6834A111DFDE8E300CE933A /* interop.c in Sources */, - C686F9231CDBC3B7009F9BFC /* steeplechase.c in Sources */, - D44272871CC81B3200D84D28 /* staff_list.c in Sources */, - F61331C839858250899F1E9B /* Balloon.cpp in Sources */, - F2CC500E17C9411FBA859888 /* Climate.cpp in Sources */, - 8DED2F20E0D63A1DCFCE0197 /* banner.cpp in Sources */, - B94C3C5FC4DBBB864434DE83 /* Duck.cpp in Sources */, F76C88781EC5324E00FA49E2 /* AudioChannel.cpp in Sources */, F76C88791EC5324E00FA49E2 /* AudioContext.cpp in Sources */, F76C887A1EC5324E00FA49E2 /* AudioMixer.cpp in Sources */, @@ -4008,7 +3137,6 @@ F76C86FE1EC4E88400FA49E2 /* ride_data.c in Sources */, F76C87001EC4E88400FA49E2 /* ride_ratings.c in Sources */, F76C87021EC4E88400FA49E2 /* facility.c in Sources */, - F76C87031EC4E88400FA49E2 /* misc.c in Sources */, F76C87041EC4E88400FA49E2 /* shop.c in Sources */, F76C87051EC4E88400FA49E2 /* station.c in Sources */, F76C87071EC4E88400FA49E2 /* 3d_cinema.c in Sources */, @@ -4040,7 +3168,6 @@ F76C87291EC4E88400FA49E2 /* boat_ride.c in Sources */, F76C872A1EC4E88400FA49E2 /* dingy_slide.c in Sources */, F76C872B1EC4E88400FA49E2 /* log_flume.c in Sources */, - F76C872C1EC4E88400FA49E2 /* river_rafts.c in Sources */, F76C872D1EC4E88400FA49E2 /* river_rapids.c in Sources */, F76C872E1EC4E88400FA49E2 /* splash_boats.c in Sources */, F76C872F1EC4E88400FA49E2 /* submarine_ride.c in Sources */, From 3ebf5be3ea9577e74eea014abdbbe45b3f745498 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 20 May 2017 22:34:13 +0100 Subject: [PATCH 60/76] Fix mingw cmake --- CMakeLists.txt | 6 +++++- src/openrct2-ui/UiContext.Win32.cpp | 17 +++++++---------- src/openrct2/CMakeLists.txt | 6 ++++++ src/openrct2/platform/windows.c | 13 +------------ 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82b4d528dc..709ed10acc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,11 @@ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CUR install(CODE "file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)") install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)") install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)") -install(TARGETS "libopenrct2" LIBRARY DESTINATION lib) +if (WIN32) + install(TARGETS "libopenrct2" RUNTIME DESTINATION bin) +else() + install(TARGETS "libopenrct2" LIBRARY DESTINATION lib) +endif() install(TARGETS "openrct2" RUNTIME DESTINATION bin) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION "share/openrct2") install(DIRECTORY "data/" DESTINATION "share/openrct2") diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 0c4e63519e..de9c00f1d8 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -16,6 +16,12 @@ #ifdef _WIN32 +#ifdef __MINGW32__ +// 0x0600 == vista +#define WINVER 0x0600 +#define _WIN32_WINNT 0x0600 +#endif // __MINGW32__ + #include #include #include @@ -31,7 +37,7 @@ #include // Native resource IDs -#include "../../../resources/resource.h" +#include "../../resources/resource.h" static std::wstring SHGetPathFromIDListLongPath(LPCITEMIDLIST pidl) { @@ -191,15 +197,6 @@ namespace OpenRCT2 { namespace Ui } result = wmInfo.info.win.window; -#ifdef __MINGW32__ - assert(sizeof(HWND) == sizeof(uint32)); - uint8 A = (uint32)result & 0xff000000 >> 24; - uint8 B = (uint32)result & 0xff0000 >> 16; - uint8 C = (uint32)result & 0xff00 >> 8; - uint8 D = (uint32)handle & 0xff; - result = (HWND)(D << 24 | A << 16 | B << 8 | C); - log_warning("twisting bits of handle, a workaround for mingw/sdl bug"); -#endif // __MINGW32__ } return result; } diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index e9143188c7..9020d55126 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -280,6 +280,9 @@ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_TYPES -Wsugge ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_METHODS -Wsuggest-final-methods) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wsuggest-override) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DUPLICATED_COND -Wduplicated-cond) +if (MINGW) + ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wno-error=redundant-decls) +endif () # Items below are not supported by ICC ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_REDUNDANT_DECLS -Wredundant-decls) @@ -311,6 +314,9 @@ endif () if (ENABLE_LIGHTFX) add_definitions(-D__ENABLE_LIGHTFX__) endif () +if (DISABLE_RCT2) + add_definitions(-DNO_RCT2) +endif () if (NOT DISABLE_RCT2) # Disable optimizations for addresses.c for all compilers, to allow optimized diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index 4d3a6c32be..46954a5e63 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -65,18 +65,7 @@ static HMODULE plaform_get_dll_module() return _dllModule; } -#ifdef NO_RCT2 - -#ifdef __MINGW32__ - -int main(int argc, char **argv) -{ - return RunOpenRCT2(argc, argv); -} - -#endif - -#else +#ifndef NO_RCT2 /* DllMain is already defined in one of static libraries we implicitly depend * on (libcrypto), which is their bug really, but since we don't do anything in From f998172674107e076959663669a2eaa179dd9e54 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 21 May 2017 14:30:22 +0100 Subject: [PATCH 61/76] Fix IME text input --- src/openrct2-ui/TextComposition.cpp | 4 +++- src/openrct2/Context.h | 2 ++ src/openrct2/drawing/drawing.h | 2 +- src/openrct2/drawing/string.c | 2 +- src/openrct2/windows/text_input.c | 26 ++++++++++++++------------ 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index 3a7b6ec4e3..e788c5ba60 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -57,6 +57,7 @@ TextInputSession * TextComposition::Start(utf8 * buffer, size_t bufferSize) _session.Size = strlen(buffer); _session.SelectionStart = _session.Size; _session.SelectionSize = 0; + _session.ImeBuffer = _imeBuffer; RecalculateLength(); return &_session; } @@ -65,6 +66,7 @@ void TextComposition::Stop() { SDL_StopTextInput(); _session.Buffer = nullptr; + _session.ImeBuffer = nullptr; _imeActive = false; } @@ -111,7 +113,7 @@ void TextComposition::HandleMessage(const SDL_Event * e) // Map Keypad enter to regular enter. key = SDLK_RETURN; } - + GetContext()->GetUiContext()->SetKeysPressed(key, e->key.keysym.scancode); // Text input diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index a8baea5968..947b7a1dbd 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -36,6 +36,8 @@ typedef struct TextInputSession size_t Length; // Number of codepoints size_t SelectionStart; // Selection start, in bytes size_t SelectionSize; // Selection length in bytes + + const utf8 * ImeBuffer; // IME UTF-8 stream } TextInputSession; struct Resolution diff --git a/src/openrct2/drawing/drawing.h b/src/openrct2/drawing/drawing.h index 362584c60d..37a11bc9a1 100644 --- a/src/openrct2/drawing/drawing.h +++ b/src/openrct2/drawing/drawing.h @@ -338,7 +338,7 @@ void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, sint32 // string sint32 clip_text(char *buffer, sint32 width); sint32 gfx_wrap_string(char* buffer, sint32 width, sint32* num_lines, sint32* font_height); -sint32 gfx_get_string_width(char *buffer); +sint32 gfx_get_string_width(const utf8 * buffer); sint32 gfx_get_string_width_new_lined(char* buffer); void gfx_draw_string(rct_drawpixelinfo *dpi, char *buffer, sint32 colour, sint32 x, sint32 y); void gfx_draw_string_left(rct_drawpixelinfo *dpi, rct_string_id format, void *args, sint32 colour, sint32 x, sint32 y); diff --git a/src/openrct2/drawing/string.c b/src/openrct2/drawing/string.c index 9674affb99..22c2733cdd 100644 --- a/src/openrct2/drawing/string.c +++ b/src/openrct2/drawing/string.c @@ -101,7 +101,7 @@ sint32 gfx_get_string_width_new_lined(utf8 *text) * rct2: 0x006C2321 * buffer (esi) */ -sint32 gfx_get_string_width(char* buffer) +sint32 gfx_get_string_width(const utf8 * buffer) { return ttf_get_string_width(buffer); } diff --git a/src/openrct2/windows/text_input.c b/src/openrct2/windows/text_input.c index d5a8804195..9d892f42f9 100644 --- a/src/openrct2/windows/text_input.c +++ b/src/openrct2/windows/text_input.c @@ -53,7 +53,6 @@ static rct_widget window_text_input_widgets[] = { static void window_text_input_close(rct_window *w); static void window_text_input_mouseup(rct_window *w, rct_widgetindex widgetIndex); static void window_text_input_update7(rct_window *w); -static void window_text_input_text(sint32 key, rct_window* w); static void window_text_input_invalidate(rct_window *w); static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi); static void draw_ime_composition(rct_drawpixelinfo * dpi, int cursorX, int cursorY); @@ -281,6 +280,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) uint8 cur_drawn = 0; sint32 cursorX = 0; + sint32 cursorY = 0; for (sint32 line = 0; line <= no_lines; line++) { gfx_draw_string(dpi, wrap_pointer, w->colours[1], w->x + 12, y); @@ -291,6 +291,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) char temp_string[TEXT_INPUT_SIZE] = { 0 }; memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count); cursorX = w->x + 13 + gfx_get_string_width(temp_string); + cursorY = y; sint32 width = 6; if (gTextInput->SelectionStart < strlen(text_input)){ @@ -321,12 +322,13 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) if (!cur_drawn) { cursorX = gLastDrawStringX; + cursorY = y - 10; } // IME composition - // if (gTextInputCompositionActive) { - // draw_ime_composition(dpi, cursorX, cursorY); - // } + if (!str_is_null_or_empty(gTextInput->ImeBuffer)) { + draw_ime_composition(dpi, cursorX, cursorY); + } } void window_text_input_key(rct_window* w, sint32 key) @@ -400,13 +402,13 @@ static void window_text_input_invalidate(rct_window *w) static void draw_ime_composition(rct_drawpixelinfo * dpi, int cursorX, int cursorY) { - // int compositionWidth = gfx_get_string_width(gTextInputComposition); - // int x = cursorX - (compositionWidth / 2); - // int y = cursorY + 13; - // int width = compositionWidth; - // int height = 10; + int compositionWidth = gfx_get_string_width(gTextInput->ImeBuffer); + int x = cursorX - (compositionWidth / 2); + int y = cursorY + 13; + int width = compositionWidth; + int height = 10; - // gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, PALETTE_INDEX_12); - // gfx_fill_rect(dpi, x, y, x + width, y + height, PALETTE_INDEX_0); - // gfx_draw_string(dpi, gTextInputComposition, COLOUR_DARK_GREEN, x, y); + gfx_fill_rect(dpi, x - 1, y - 1, x + width + 1, y + height + 1, PALETTE_INDEX_12); + gfx_fill_rect(dpi, x, y, x + width, y + height, PALETTE_INDEX_0); + gfx_draw_string(dpi, (char *)gTextInput->ImeBuffer, COLOUR_DARK_GREEN, x, y); } From 7a59eef47ebbee1344ae35bdc6086cb1b6574971 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Tue, 23 May 2017 15:37:03 +0100 Subject: [PATCH 62/76] Fix cmake for OpenRCT2-UI on macOS --- CMakeLists.txt | 1 + src/openrct2-ui/CMakeLists.txt | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 709ed10acc..6852a0e482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif() set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}") +set(CMAKE_MACOSX_RPATH 1) set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v0.0.5/title-sequence-v0.0.5.zip") set(TITLE_SEQUENCE_SHA1 "79ffb2585d12abcbfce205d7696e3472a504b005") diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 535fa9f087..7ff4d16ba3 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -12,6 +12,7 @@ include(FindPkgConfig) # Third party libraries PKG_CHECK_MODULES(SDL2 REQUIRED sdl2) +PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp) if (NOT DISABLE_OPENGL) # GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu. if (APPLE) @@ -43,7 +44,12 @@ add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES} ${OPENRCT2_UI_M_SOURCES} ${OPEN target_link_libraries(${PROJECT} "libopenrct2" ${SDL2_LIBRARIES} - ${SDL2_TTF_LIBRARIES}) + ${SDL2_TTF_LIBRARIES} + ${SPEEX_LIBRARIES}) + +if (APPLE) + target_link_libraries(${PROJECT} "-framework Cocoa") +endif () if (NOT DISABLE_OPENGL) if (WIN32) @@ -57,7 +63,8 @@ endif () # Includes target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.." - ${SDL2_INCLUDE_DIRS}) + ${SDL2_INCLUDE_DIRS} + ${SPEEX_INCLUDE_DIRS}) # Compiler flags if (FORCE32) From 1eb5ed0c93ae46fca995203a032b38018f6b57b1 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 May 2017 19:44:04 +0100 Subject: [PATCH 63/76] Update vscode debug configuration --- .vscode/launch.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 05028b4a95..6f0ed89e8b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,10 +7,15 @@ "request": "launch", "program": "${workspaceRoot}/bin/openrct2", "args": [], - "stopAtEntry": true, + "stopAtEntry": false, "cwd": "${workspaceRoot}/bin", "environment": [], "externalConsole": true, + "setupCommands": [ + { + "text": "-enable-pretty-printing" + } + ], "linux": { "MIMode": "gdb" }, @@ -27,6 +32,11 @@ "request": "attach", "program": "${workspaceRoot}/bin/openrct2", "processId": "${command.pickProcess}", + "setupCommands": [ + { + "text": "-enable-pretty-printing" + } + ], "linux": { "MIMode": "gdb" }, From e313568a27dfe1e7570352d1d3f0d170cbb76733 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 May 2017 19:59:59 +0100 Subject: [PATCH 64/76] Initialise UiContext input fields This was causing undefined data to appear in _keysPressed which caused shortcuts to be invoked on startup. --- src/openrct2-ui/UiContext.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 8782685331..4ff77cd9e4 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -75,12 +75,12 @@ private: // Input TextComposition _textComposition; - CursorState _cursorState; - uint32 _lastKeyPressed; - const uint8 * _keysState; - uint8 _keysPressed[256]; - uint32 _lastGestureTimestamp; - float _gestureRadius; + CursorState _cursorState = { 0 }; + uint32 _lastKeyPressed = 0; + const uint8 * _keysState = nullptr; + uint8 _keysPressed[256] = { 0 }; + uint32 _lastGestureTimestamp = 0; + float _gestureRadius = 0; public: UiContext() @@ -217,7 +217,7 @@ public: { SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE); } - + void SetKeysPressed(uint32 keysym, uint8 scancode) override { _lastKeyPressed = keysym; From a15a226d7a82069d5d37fad4d8045475c2430f8b Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 May 2017 20:00:44 +0100 Subject: [PATCH 65/76] Fix zenity dialog logic --- src/openrct2-ui/UiContext.Linux.cpp | 33 +++++++++++++++-------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 95cabdfca9..2b6200c97e 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -130,7 +130,7 @@ namespace OpenRCT2 { namespace Ui desc.InitialDirectory.c_str(), filter.c_str()); std::string output; - if (Execute(cmd, &output) != 0) + if (Execute(cmd, &output) == 0) { result = output; } @@ -153,7 +153,7 @@ namespace OpenRCT2 { namespace Ui desc.Title.c_str(), filters.c_str()); std::string output; - if (Execute(cmd, &output) != 0) + if (Execute(cmd, &output) == 0) { result = output; } @@ -164,20 +164,21 @@ namespace OpenRCT2 { namespace Ui break; } - log_verbose("filename = %s", result.c_str()); - - if (desc.Type == FILE_DIALOG_TYPE::OPEN && access(result.c_str(), F_OK) == -1) + if (!result.empty()) { - std::string msg = String::StdFormat("\"%s\" not found: %s, please choose another file\n", result.c_str(), strerror(errno)); - ShowMessageBox(window, msg); - return ShowFileDialog(window, desc); - } - else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result.c_str(), F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) - { - std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath.c_str(), result.c_str()); - if (Execute(cmd) != 0) + if (desc.Type == FILE_DIALOG_TYPE::OPEN && access(result.c_str(), F_OK) == -1) { - result = std::string(); + std::string msg = String::StdFormat("\"%s\" not found: %s, please choose another file\n", result.c_str(), strerror(errno)); + ShowMessageBox(window, msg); + return ShowFileDialog(window, desc); + } + else if (desc.Type == FILE_DIALOG_TYPE::SAVE && access(result.c_str(), F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) + { + std::string cmd = String::StdFormat("%s --yesno \"Overwrite %s?\"", executablePath.c_str(), result.c_str()); + if (Execute(cmd) != 0) + { + result = std::string(); + } } } return result; @@ -323,8 +324,8 @@ namespace OpenRCT2 { namespace Ui else if (isalpha(c)) { filtersb << '[' - << toupper(c) - << tolower(c) + << (char)tolower(c) + << (char)toupper(c) << ']'; } else From 4932537a917521f801fd0b15c2b6ad8d909787ba Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 May 2017 21:53:40 +0100 Subject: [PATCH 66/76] Fix kdialog implementation --- src/openrct2-ui/UiContext.Linux.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 2b6200c97e..5d6f4bb129 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -123,7 +123,7 @@ namespace OpenRCT2 { namespace Ui (desc.Type == FILE_DIALOG_TYPE::OPEN) ? "--getopenfilename" : "--getsavefilename"; std::string filter = GetKDialogFilterString(desc.Filters); - std::string cmd = String::StdFormat("%s --title '%s' %s '%s/' ~ '%s'", + std::string cmd = String::StdFormat("%s --title '%s' %s '%s' '%s'", executablePath.c_str(), desc.Title.c_str(), action.c_str(), @@ -226,7 +226,7 @@ namespace OpenRCT2 { namespace Ui { return DIALOG_TYPE::ZENITY; } - if (Execute("which kdialog", executablePath)) + if (Execute("which kdialog", executablePath) == 0) { return DIALOG_TYPE::KDIALOG; } From 3ca1b4838427c508e5eea69f6afdb6ea2793f65f Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 May 2017 23:28:54 +0100 Subject: [PATCH 67/76] Open the game window on the last remembered display --- distribution/changelog.txt | 1 + src/openrct2-ui/UiContext.cpp | 28 ++++++++++++++++++++++++++-- src/openrct2/config/Config.cpp | 2 ++ src/openrct2/config/Config.h | 1 + 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 034e8b4df3..8db2975672 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,5 +1,6 @@ 0.0.8 (in development) ------------------------------------------------------------------------ +- Feature: OpenRCT2 now starts up on the display it was last shown on. - Improved: Mouse can now be dragged to select scenery when saving track designs - Fix: [#3178, #5456] Paths with non-ASCII characters not handled properly on macOS. - Fix: [#3681] Steel Twister rollercoaster always shows all track designs diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 4ff77cd9e4..2ddabd104c 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -295,6 +296,24 @@ public: { OnResize(e.window.data1, e.window.data2); } + + switch (e.window.event) { + case SDL_WINDOWEVENT_SIZE_CHANGED: + case SDL_WINDOWEVENT_MOVED: + case SDL_WINDOWEVENT_MAXIMIZED: + case SDL_WINDOWEVENT_RESTORED: + { + // Update default display index + sint32 displayIndex = SDL_GetWindowDisplayIndex(_window); + if (displayIndex != gConfigGeneral.default_display) + { + gConfigGeneral.default_display = displayIndex; + config_save_default(); + } + break; + } + } + if (gConfigSound.audio_focus && gConfigSound.sound_enabled) { if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) @@ -481,6 +500,11 @@ public: // g1.dat is loaded. // sub_68371D(); + // Set window position to default display + sint32 defaultDisplay = Math::Clamp(0, gConfigGeneral.default_display, 0xFFFF); + sint32 x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); + sint32 y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay); + // Get saved window size sint32 width = gConfigGeneral.window_width; sint32 height = gConfigGeneral.window_height; @@ -494,7 +518,7 @@ public: flags |= SDL_WINDOW_OPENGL; } - _window = SDL_CreateWindow(OPENRCT2_NAME, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, flags); + _window = SDL_CreateWindow(OPENRCT2_NAME, x, y, width, height, flags); if (_window == nullptr) { SDLException::Throw("SDL_CreateWindow(...)"); @@ -503,7 +527,7 @@ public: SDL_SetWindowMinimumSize(_window, 720, 480); SetCursorTrap(gConfigGeneral.trap_cursor); _platformUiContext->SetWindowIcon(_window); - + // Initialise the surface, palette and draw buffer OnResize(width, height); diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index ab7c0ba5f8..8c7d2d345b 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -160,6 +160,7 @@ namespace Config model->window_height = reader->GetSint32("window_height", -1); model->window_snap_proximity = reader->GetSint32("window_snap_proximity", 5); model->window_width = reader->GetSint32("window_width", -1); + model->default_display = reader->GetSint32("default_display", 0); model->drawing_engine = reader->GetEnum("drawing_engine", DRAWING_ENGINE_SOFTWARE, Enum_DrawingEngine); model->uncap_fps = reader->GetBoolean("uncap_fps", false); @@ -233,6 +234,7 @@ namespace Config writer->WriteSint32("window_height", model->window_height); writer->WriteSint32("window_snap_proximity", model->window_snap_proximity); writer->WriteSint32("window_width", model->window_width); + writer->WriteSint32("default_display", model->default_display); writer->WriteEnum("drawing_engine", model->drawing_engine, Enum_DrawingEngine); writer->WriteBoolean("uncap_fps", model->uncap_fps); writer->WriteBoolean("test_unfinished_tracks", model->test_unfinished_tracks); diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 818e402bca..76eeba1757 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -25,6 +25,7 @@ typedef struct GeneralConfiguration utf8 * rct2_path; // Display + sint32 default_display; sint32 window_width; sint32 window_height; sint32 fullscreen_mode; From 61228fc4e89a655006ae94dcb8fb92224c2f8365 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 28 May 2017 23:46:25 +0100 Subject: [PATCH 68/76] Add all files filter --- src/openrct2/windows/loadsave.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openrct2/windows/loadsave.c b/src/openrct2/windows/loadsave.c index 755e485276..14042bcf4e 100644 --- a/src/openrct2/windows/loadsave.c +++ b/src/openrct2/windows/loadsave.c @@ -286,6 +286,10 @@ static bool browse(bool isSave, char *path, size_t pathSize) break; } + // Add 'all files' filter + desc.filters[1].name = language_get_string(STR_ALL_FILES); + desc.filters[1].pattern = "*"; + desc.title = language_get_string(title); return platform_open_common_file_dialog(path, &desc, pathSize); } From 615580dc0320904ec2e71b9ff7c875788e4b3cad Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 29 May 2017 10:47:52 +0200 Subject: [PATCH 69/76] Don't check for fontconfig on macOS --- src/openrct2/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index 9020d55126..47b24c10b0 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -65,7 +65,9 @@ if (NOT DISABLE_TTF) # FreeType is required by SDL2_ttf, but not wired up properly in package PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2) endif () - PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) + if (UNIX AND NOT APPLE) + PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig) + endif () PKG_CHECK_MODULES(SDL2_TTF REQUIRED SDL2_ttf) endif () From a43ee2b9877763b53a1ebb4e8afb8f16e40b776f Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 29 May 2017 22:04:50 +0200 Subject: [PATCH 70/76] Fix copyright year and comment --- src/openrct2-cli/Cli.cpp | 2 +- src/openrct2/windows/loadsave.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp index 4c1e52de49..a71e09b77b 100644 --- a/src/openrct2-cli/Cli.cpp +++ b/src/openrct2-cli/Cli.cpp @@ -1,4 +1,4 @@ -#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers +#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers /***************************************************************************** * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * diff --git a/src/openrct2/windows/loadsave.c b/src/openrct2/windows/loadsave.c index 14042bcf4e..7cda60fa59 100644 --- a/src/openrct2/windows/loadsave.c +++ b/src/openrct2/windows/loadsave.c @@ -286,7 +286,7 @@ static bool browse(bool isSave, char *path, size_t pathSize) break; } - // Add 'all files' filter + // Add 'all files' filter. If the number of filters is increased, this code will need to be adjusted. desc.filters[1].name = language_get_string(STR_ALL_FILES); desc.filters[1].pattern = "*"; From de9adf54457cd3b75e7031076b8c57049e19ff8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 29 May 2017 22:13:46 +0200 Subject: [PATCH 71/76] Allow building headless version as a separate target --- CMakeLists.txt | 8 ++------ src/openrct2-cli/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6852a0e482..df831b8f11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,6 @@ set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/do set(TITLE_SEQUENCE_SHA1 "79ffb2585d12abcbfce205d7696e3472a504b005") option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") -option(CLI_ONLY "CLI only build of OpenRCT2") option(WITH_TESTS "Build tests") # Define current git branch @@ -49,11 +48,8 @@ endif() # Include sub-projects include("${ROOT_DIR}/src/openrct2/CMakeLists.txt" NO_POLICY_SCOPE) -if (CLI_ONLY) - include("${ROOT_DIR}/src/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) -else () - include("${ROOT_DIR}/src/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) -endif () +include("${ROOT_DIR}/src/openrct2-cli/CMakeLists.txt" NO_POLICY_SCOPE) +include("${ROOT_DIR}/src/openrct2-ui/CMakeLists.txt" NO_POLICY_SCOPE) # g2 add_custom_command( diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 3966b7f05b..0048c68909 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -18,9 +18,9 @@ file(GLOB_RECURSE OPENRCT2_CLI_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.hpp") # Outputs -set (PROJECT openrct2) +set (PROJECT openrct2-cli) project(${PROJECT}) -add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES}) +add_executable(${PROJECT} EXCLUDE_FROM_ALL ${OPENRCT2_CLI_SOURCES}) target_link_libraries(${PROJECT} "libopenrct2") From 8cb24b21a7d5241463faddc74c65f1ea46fc9693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 29 May 2017 22:30:24 +0200 Subject: [PATCH 72/76] Add headless builds to travis configurations --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3bf45ad661..4e9ef7ac62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: c before_install: - - if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-j2 -k" ; fi + - if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash scripts/linux/install.sh; export OPENRCT_MAKE_OPTS="-j2 -k all openrct2-cli" ; fi - if [[ $TRAVIS_OS_NAME == "osx" ]]; then sudo gem install xcpretty-travis-formatter; fi sudo: required From 5a93b67bd9e3c545f29d78b2a6674c14c1e37312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 29 May 2017 23:21:23 +0200 Subject: [PATCH 73/76] Update changelog.txt [ci skip] --- distribution/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 8db2975672..d8a3aa5359 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Fix: [#3178, #5456] Paths with non-ASCII characters not handled properly on macOS. - Fix: [#3681] Steel Twister rollercoaster always shows all track designs - Fix: Track components added by OpenRCT2 are now usable in older scenarios. +- Technical: [#5458] Begin offering headless build with reduced compile- and run-time dependencies 0.0.7 (2017-05-03) ------------------------------------------------------------------------ From 1e550e905991c18a44e5d3ad65574392c109164d Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 30 May 2017 22:34:13 +0100 Subject: [PATCH 74/76] Create portable builds Which set rpath to $ORIGIN so it can be run out the box. --- .travis.yml | 4 ++-- CMakeLists.txt | 15 ++++++++++----- src/openrct2-ui/CMakeLists.txt | 5 +++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e9ef7ac62..61ed0b283d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,13 +16,13 @@ matrix: services: - docker env: - - OPENRCT2_CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=OpenRCT2" TARGET=ubuntu_amd64 + - OPENRCT2_CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DPORTABLE=ON" TARGET=ubuntu_amd64 - secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ=" after_success: - sudo chown -R $USER build - cd build # make install is done inside docker - - mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc + - mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/bin/libopenrct2.so OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc - rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs - tar cvzf openrct2-linux.tar.gz OpenRCT2/ - if [[ "z${TRAVIS_TAG}" != "z" ]] ; then diff --git a/CMakeLists.txt b/CMakeLists.txt index df831b8f11..e1d8c50121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ set(TITLE_SEQUENCE_SHA1 "79ffb2585d12abcbfce205d7696e3472a504b005") option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") option(WITH_TESTS "Build tests") +option(PORTABLE "Create a portable build (-rpath=$ORIGIN)" OFF) # Define current git branch execute_process( @@ -81,11 +82,15 @@ install(CODE "file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_ install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)") install(CODE "file(REMOVE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/title/title-sequences.zip)") if (WIN32) - install(TARGETS "libopenrct2" RUNTIME DESTINATION bin) -else() - install(TARGETS "libopenrct2" LIBRARY DESTINATION lib) -endif() -install(TARGETS "openrct2" RUNTIME DESTINATION bin) + install(TARGETS "libopenrct2" RUNTIME DESTINATION "bin") +else () + if (PORTABLE) + install(TARGETS "libopenrct2" LIBRARY DESTINATION "bin") + else () + install(TARGETS "libopenrct2" LIBRARY DESTINATION "lib") + endif () +endif () +install(TARGETS "openrct2" RUNTIME DESTINATION "bin") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/g2.dat" DESTINATION "share/openrct2") install(DIRECTORY "data/" DESTINATION "share/openrct2") install(FILES ${DOC_FILES} DESTINATION "share/doc/openrct2") diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 7ff4d16ba3..091381affa 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -75,6 +75,11 @@ if (WIN32) # tell it that it is set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") endif () + +if (PORTABLE) + set(CMAKE_INSTALL_RPATH "$ORIGIN") +endif () + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${TARGET_M}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_M}") From 25e50bf43c0b6a35e0688685efbe59f20d50c839 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 31 May 2017 19:39:38 +0100 Subject: [PATCH 75/76] Set CMAKE_INSTALL_RPATH before adding executables. --- src/openrct2-ui/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 091381affa..2ae3a9fb61 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -7,6 +7,10 @@ endif () # Options option(DISABLE_OPENGL "Disable OpenGL support.") +if (PORTABLE) + set(CMAKE_INSTALL_RPATH "$ORIGIN") +endif () + # CMake dependencies include(FindPkgConfig) @@ -76,10 +80,6 @@ if (WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__USE_MINGW_ANSI_STDIO=1") endif () -if (PORTABLE) - set(CMAKE_INSTALL_RPATH "$ORIGIN") -endif () - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ${TARGET_M}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 ${TARGET_M}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_M}") From 8d3b7f8c27cef5f265881f9812a22c950f2f2594 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Wed, 31 May 2017 20:29:37 +0100 Subject: [PATCH 76/76] Set CMAKE_INSTALL_RPATH to $ORIGIN on CLI build --- src/openrct2-cli/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openrct2-cli/CMakeLists.txt b/src/openrct2-cli/CMakeLists.txt index 0048c68909..a51cd6f22a 100644 --- a/src/openrct2-cli/CMakeLists.txt +++ b/src/openrct2-cli/CMakeLists.txt @@ -4,6 +4,10 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt") endif () +if (PORTABLE) + set(CMAKE_INSTALL_RPATH "$ORIGIN") +endif () + # CMake dependencies include(FindPkgConfig)