You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Merge pull request #22259 from AaronVanGeffen/rework-common
Rework common.h into local definitions
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "CursorRepository.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/Guard.hpp>
|
||||
#include <openrct2/interface/Cursors.h>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <SDL.h>
|
||||
#include <openrct2-ui/interface/Window.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/core/Memory.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/core/UTF8.h>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/ui/UiContext.h>
|
||||
|
||||
union SDL_Event;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/PlatformEnvironment.h>
|
||||
#include <openrct2/audio/AudioContext.h>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# include <SDL.h>
|
||||
# include <dlfcn.h>
|
||||
# include <jni.h>
|
||||
# include <openrct2/common.h>
|
||||
# include <openrct2/Diagnostic.h>
|
||||
# include <openrct2/core/String.hpp>
|
||||
# include <openrct2/platform/Platform.h>
|
||||
# include <openrct2/ui/UiContext.h>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# include <SDL.h>
|
||||
# include <algorithm>
|
||||
# include <dlfcn.h>
|
||||
# include <openrct2/common.h>
|
||||
# include <openrct2/Diagnostic.h>
|
||||
# include <openrct2/core/Path.hpp>
|
||||
# include <openrct2/core/String.hpp>
|
||||
# include <openrct2/core/StringBuilder.h>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <openrct2/Diagnostic.h>
|
||||
# include <windows.h>
|
||||
# include <shellapi.h>
|
||||
// clang-format on
|
||||
@@ -24,7 +25,6 @@
|
||||
|
||||
# include <SDL.h>
|
||||
# include <SDL_syswm.h>
|
||||
# include <openrct2/common.h>
|
||||
# include <openrct2/core/Path.hpp>
|
||||
# include <openrct2/core/String.hpp>
|
||||
# include <openrct2/ui/UiContext.h>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <openrct2-ui/input/InputManager.h>
|
||||
#include <openrct2-ui/interface/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <openrct2/Input.h>
|
||||
#include <openrct2/Version.h>
|
||||
#include <openrct2/audio/AudioContext.h>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <openrct2/common.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -31,20 +30,21 @@ namespace OpenRCT2::Ui
|
||||
struct IPlatformUiContext
|
||||
{
|
||||
virtual ~IPlatformUiContext() = default;
|
||||
virtual void SetWindowIcon(SDL_Window* window) abstract;
|
||||
virtual bool IsSteamOverlayAttached() abstract;
|
||||
virtual void SetWindowIcon(SDL_Window* window) = 0;
|
||||
virtual bool IsSteamOverlayAttached() = 0;
|
||||
|
||||
virtual void ShowMessageBox(SDL_Window* window, const std::string& message) abstract;
|
||||
virtual bool HasMenuSupport() abstract;
|
||||
virtual void ShowMessageBox(SDL_Window* window, const std::string& message) = 0;
|
||||
virtual bool HasMenuSupport() = 0;
|
||||
virtual int32_t ShowMenuDialog(
|
||||
const std::vector<std::string>& options, const std::string& title, const std::string& text) abstract;
|
||||
virtual void OpenFolder(const std::string& path) abstract;
|
||||
const std::vector<std::string>& options, const std::string& title, const std::string& text)
|
||||
= 0;
|
||||
virtual void OpenFolder(const std::string& path) = 0;
|
||||
|
||||
virtual void OpenURL(const std::string& url) abstract;
|
||||
virtual std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) abstract;
|
||||
virtual std::string ShowDirectoryDialog(SDL_Window* window, const std::string& title) abstract;
|
||||
virtual void OpenURL(const std::string& url) = 0;
|
||||
virtual std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) = 0;
|
||||
virtual std::string ShowDirectoryDialog(SDL_Window* window, const std::string& title) = 0;
|
||||
|
||||
virtual bool HasFilePicker() const abstract;
|
||||
virtual bool HasFilePicker() const = 0;
|
||||
};
|
||||
|
||||
[[nodiscard]] std::unique_ptr<IUiContext> CreateUiContext(const std::shared_ptr<IPlatformEnvironment>& env);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
# include "UiContext.h"
|
||||
|
||||
# include <openrct2/common.h>
|
||||
# include <openrct2/Diagnostic.h>
|
||||
# include <openrct2/core/String.hpp>
|
||||
# include <openrct2/ui/UiContext.h>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/localisation/StringIdType.h>
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <openrct2/common.h>
|
||||
|
||||
namespace OpenRCT2::Ui
|
||||
{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <openrct2/audio/AudioSource.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <speex/speex_resampler.h>
|
||||
|
||||
namespace OpenRCT2::Audio
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
#include <SDL.h>
|
||||
#include <memory>
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <openrct2/audio/AudioContext.h>
|
||||
#include <openrct2/audio/AudioSource.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
|
||||
namespace OpenRCT2::Audio
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <memory>
|
||||
#include <openrct2/audio/AudioChannel.h>
|
||||
#include <openrct2/audio/AudioSource.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <string>
|
||||
|
||||
struct SDL_RWops;
|
||||
@@ -25,9 +24,9 @@ namespace OpenRCT2::Audio
|
||||
|
||||
struct ISDLAudioChannel : public IAudioChannel
|
||||
{
|
||||
[[nodiscard]] virtual AudioFormat GetFormat() const abstract;
|
||||
[[nodiscard]] virtual SpeexResamplerState* GetResampler() const abstract;
|
||||
virtual void SetResampler(SpeexResamplerState* value) abstract;
|
||||
[[nodiscard]] virtual AudioFormat GetFormat() const = 0;
|
||||
[[nodiscard]] virtual SpeexResamplerState* GetResampler() const = 0;
|
||||
virtual void SetResampler(SpeexResamplerState* value) = 0;
|
||||
};
|
||||
|
||||
namespace AudioChannel
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "SDLAudioSource.h"
|
||||
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef DISABLE_FLAC
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <SDL.h>
|
||||
#include <algorithm>
|
||||
#include <openrct2/audio/AudioSource.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "SDLAudioSource.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef DISABLE_VORBIS
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
|
||||
namespace OpenRCT2::Ui
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
#include <SDL.h>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
#include <openrct2/Diagnostic.h>
|
||||
#include <openrct2/Game.h>
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
#include <openrct2/drawing/LightFX.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user