1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

Pack nested namespaces together

This commit is contained in:
Hielke Morsink
2018-02-16 00:43:16 +01:00
parent dbbd5b89e6
commit bc44792da9
29 changed files with 214 additions and 226 deletions

View File

@@ -17,7 +17,7 @@
#include <openrct2/interface/Cursors.h> #include <openrct2/interface/Cursors.h>
#include "CursorRepository.h" #include "CursorRepository.h"
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
static constexpr const CursorData BlankCursorData = static constexpr const CursorData BlankCursorData =
{ {
@@ -664,4 +664,4 @@ namespace OpenRCT2 { namespace Ui
} }
return result; return result;
} }
} } }

View File

@@ -23,9 +23,7 @@
struct SDL_Cursor; struct SDL_Cursor;
namespace OpenRCT2 namespace OpenRCT2::Ui
{
namespace Ui
{ {
class CursorRepository class CursorRepository
{ {
@@ -78,4 +76,3 @@ namespace OpenRCT2
static const CursorData * GetCursorData(CURSOR_ID cursorId); static const CursorData * GetCursorData(CURSOR_ID cursorId);
}; };
} }
}

View File

@@ -20,9 +20,7 @@
union SDL_Event; union SDL_Event;
namespace OpenRCT2 namespace OpenRCT2::Ui
{
namespace Ui
{ {
/** /**
* Represents a * Represents a
@@ -55,4 +53,3 @@ namespace OpenRCT2
void RecalculateLength(); void RecalculateLength();
}; };
} }
}

View File

@@ -26,7 +26,7 @@
#include <SDL.h> #include <SDL.h>
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
class AndroidContext final : public IPlatformUiContext class AndroidContext final : public IPlatformUiContext
@@ -74,6 +74,6 @@ namespace OpenRCT2 { namespace Ui
{ {
return new AndroidContext(); return new AndroidContext();
} }
} } }
#endif // __ANDROID__ #endif // __ANDROID__

View File

@@ -29,7 +29,7 @@
#include <SDL.h> #include <SDL.h>
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
enum class DIALOG_TYPE enum class DIALOG_TYPE
{ {
@@ -385,6 +385,6 @@ namespace OpenRCT2 { namespace Ui
{ {
return new LinuxContext(); return new LinuxContext();
} }
} } }
#endif // __linux__ || __OpenBSD__ #endif // __linux__ || __OpenBSD__

View File

@@ -54,7 +54,7 @@ static std::wstring SHGetPathFromIDListLongPath(LPCITEMIDLIST pidl)
return pszPath; return pszPath;
} }
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
class Win32Context : public IPlatformUiContext class Win32Context : public IPlatformUiContext
{ {
@@ -224,6 +224,6 @@ namespace OpenRCT2 { namespace Ui
{ {
return new Win32Context(); return new Win32Context();
} }
} } }
#endif // _WIN32 #endif // _WIN32

View File

@@ -27,7 +27,7 @@
#include <SDL.h> #include <SDL.h>
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
class macOSContext final : public IPlatformUiContext class macOSContext final : public IPlatformUiContext
{ {
@@ -182,6 +182,6 @@ namespace OpenRCT2 { namespace Ui
{ {
return new macOSContext(); return new macOSContext();
} }
} } }
#endif // __APPLE__ && __MACH__ #endif // __APPLE__ && __MACH__

View File

@@ -16,9 +16,9 @@
#include <openrct2/common.h> #include <openrct2/common.h>
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
interface IWindowManager; interface IWindowManager;
IWindowManager * CreateWindowManager(); IWindowManager * CreateWindowManager();
} } }

View File

@@ -24,7 +24,7 @@
#include "AudioContext.h" #include "AudioContext.h"
#include "AudioFormat.h" #include "AudioFormat.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
class AudioChannelImpl : public ISDLAudioChannel class AudioChannelImpl : public ISDLAudioChannel
{ {
@@ -295,4 +295,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return new (std::nothrow) AudioChannelImpl(); return new (std::nothrow) AudioChannelImpl();
} }
} } }

View File

@@ -21,7 +21,7 @@
#include "../SDLException.h" #include "../SDLException.h"
#include "AudioContext.h" #include "AudioContext.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
class AudioContext : public IAudioContext class AudioContext : public IAudioContext
{ {
@@ -98,4 +98,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return new AudioContext(); return new AudioContext();
} }
} } }

View File

@@ -9,7 +9,7 @@
struct SDL_RWops; struct SDL_RWops;
using SpeexResamplerState = struct SpeexResamplerState_; using SpeexResamplerState = struct SpeexResamplerState_;
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
struct AudioFormat; struct AudioFormat;
interface IAudioContext; interface IAudioContext;
@@ -70,4 +70,4 @@ namespace OpenRCT2 { namespace Audio
} }
IAudioContext * CreateAudioContext(); IAudioContext * CreateAudioContext();
} } }

View File

@@ -19,7 +19,7 @@
#include <openrct2/common.h> #include <openrct2/common.h>
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
/** /**
* Represents the size, frequency and number of channels for * Represents the size, frequency and number of channels for
@@ -53,4 +53,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return !(lhs == rhs); return !(lhs == rhs);
} }
} } }

View File

@@ -36,7 +36,7 @@
#include <openrct2/OpenRCT2.h> #include <openrct2/OpenRCT2.h>
#include <openrct2/platform/platform.h> #include <openrct2/platform/platform.h>
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
class AudioMixerImpl final : public IAudioMixer class AudioMixerImpl final : public IAudioMixer
{ {
@@ -513,4 +513,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return new AudioMixerImpl(); return new AudioMixerImpl();
} }
} } }

View File

@@ -21,7 +21,7 @@
#include "AudioContext.h" #include "AudioContext.h"
#include "AudioFormat.h" #include "AudioFormat.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
/** /**
* An audio source where raw PCM data is streamed directly from * An audio source where raw PCM data is streamed directly from
@@ -207,4 +207,4 @@ namespace OpenRCT2 { namespace Audio
} }
return source; return source;
} }
} } }

View File

@@ -24,7 +24,7 @@
#include "AudioContext.h" #include "AudioContext.h"
#include "AudioFormat.h" #include "AudioFormat.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
/** /**
* An audio source where raw PCM data is initially loaded into RAM from * An audio source where raw PCM data is initially loaded into RAM from
@@ -243,4 +243,4 @@ namespace OpenRCT2 { namespace Audio
} }
return source; return source;
} }
} } }

View File

@@ -1,6 +1,6 @@
#include <openrct2/interface/Console.h> #include <openrct2/interface/Console.h>
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
class InGameConsole final : public InteractiveConsole class InGameConsole final : public InteractiveConsole
{ {
@@ -53,4 +53,4 @@ namespace OpenRCT2 { namespace Ui
void Invalidate() const; void Invalidate() const;
sint32 GetNumVisibleLines() const; sint32 GetNumVisibleLines() const;
}; };
} } }

View File

@@ -18,7 +18,7 @@
#include "../common.h" #include "../common.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
interface IAudioSource; interface IAudioSource;
@@ -73,4 +73,4 @@ namespace OpenRCT2 { namespace Audio
virtual size_t Read(void * dst, size_t len) abstract; virtual size_t Read(void * dst, size_t len) abstract;
}; };
} } }

View File

@@ -20,9 +20,7 @@
#include <vector> #include <vector>
#include "../common.h" #include "../common.h"
namespace OpenRCT2 namespace OpenRCT2::Audio
{
namespace Audio
{ {
interface IAudioChannel; interface IAudioChannel;
interface IAudioMixer; interface IAudioMixer;
@@ -63,4 +61,3 @@ namespace OpenRCT2
IAudioContext * CreateDummyAudioContext(); IAudioContext * CreateDummyAudioContext();
} }
}

View File

@@ -29,7 +29,7 @@ enum MIXER_GROUP
MIXER_GROUP_TITLE_MUSIC, MIXER_GROUP_TITLE_MUSIC,
}; };
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
interface IAudioSource; interface IAudioSource;
interface IAudioChannel; interface IAudioChannel;
@@ -53,7 +53,7 @@ namespace OpenRCT2 { namespace Audio
virtual IAudioSource * GetSoundSource(sint32 id) abstract; virtual IAudioSource * GetSoundSource(sint32 id) abstract;
virtual IAudioSource * GetMusicSource(sint32 id) abstract; virtual IAudioSource * GetMusicSource(sint32 id) abstract;
}; };
} } }
#ifndef DSBPAN_LEFT #ifndef DSBPAN_LEFT
#define DSBPAN_LEFT -10000 #define DSBPAN_LEFT -10000

View File

@@ -19,7 +19,7 @@
#include "../common.h" #include "../common.h"
#include "AudioMixer.h" #include "AudioMixer.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
/** /**
* Represents a readable source of audio PCM data. * Represents a readable source of audio PCM data.
@@ -37,4 +37,4 @@ namespace OpenRCT2 { namespace Audio
{ {
IAudioSource * CreateNull(); IAudioSource * CreateNull();
} }
} } }

View File

@@ -16,7 +16,7 @@
#include "AudioContext.h" #include "AudioContext.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
class DummyAudioContext final : public IAudioContext class DummyAudioContext final : public IAudioContext
{ {
@@ -49,4 +49,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return new DummyAudioContext(); return new DummyAudioContext();
} }
} } }

View File

@@ -16,7 +16,7 @@
#include "AudioSource.h" #include "AudioSource.h"
namespace OpenRCT2 { namespace Audio namespace OpenRCT2::Audio
{ {
/** /**
* An audio source representing silence. * An audio source representing silence.
@@ -39,4 +39,4 @@ namespace OpenRCT2 { namespace Audio
{ {
return new NullAudioSource(); return new NullAudioSource();
} }
} } }

View File

@@ -20,7 +20,7 @@
#include "Drawing.h" #include "Drawing.h"
namespace OpenRCT2 { namespace Drawing namespace OpenRCT2::Drawing
{ {
interface IDrawingEngine; interface IDrawingEngine;
@@ -39,4 +39,4 @@ namespace OpenRCT2 { namespace Drawing
virtual void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) 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 void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) abstract;
}; };
} } }

View File

@@ -40,7 +40,7 @@ enum DRAWING_ENGINE_FLAGS
struct rct_drawpixelinfo; struct rct_drawpixelinfo;
struct rct_palette_entry; struct rct_palette_entry;
namespace OpenRCT2 { namespace Drawing namespace OpenRCT2::Drawing
{ {
interface IDrawingContext; interface IDrawingContext;
@@ -80,4 +80,4 @@ namespace OpenRCT2 { namespace Drawing
sint32 xStart, sint32 xStart,
sint32 yStart) abstract; sint32 yStart) abstract;
}; };
} } }

View File

@@ -20,9 +20,9 @@
struct rct_drawpixelinfo; struct rct_drawpixelinfo;
namespace OpenRCT2 { namespace Drawing namespace OpenRCT2::Drawing
{ {
interface IRainDrawer; interface IRainDrawer;
} } }
void DrawRain(rct_drawpixelinfo * dpi, OpenRCT2::Drawing::IRainDrawer * rainDrawer); void DrawRain(rct_drawpixelinfo * dpi, OpenRCT2::Drawing::IRainDrawer * rainDrawer);

View File

@@ -51,7 +51,7 @@ enum CURSOR_ID
CURSOR_COUNT, CURSOR_COUNT,
}; };
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
constexpr size_t CURSOR_BIT_WIDTH = 32; constexpr size_t CURSOR_BIT_WIDTH = 32;
constexpr size_t CURSOR_HEIGHT = 4; constexpr size_t CURSOR_HEIGHT = 4;
@@ -65,4 +65,4 @@ namespace OpenRCT2 { namespace Ui
uint8 Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; uint8 Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT];
uint8 Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; uint8 Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT];
}; };
} } }

View File

@@ -20,7 +20,7 @@
using namespace OpenRCT2::Drawing; using namespace OpenRCT2::Drawing;
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
/** /**
* Represents the window or screen that OpenRCT2 is presented on. * Represents the window or screen that OpenRCT2 is presented on.
@@ -96,4 +96,4 @@ namespace OpenRCT2 { namespace Ui
{ {
return new DummyUiContext(); return new DummyUiContext();
} }
} } }

View File

@@ -16,7 +16,7 @@
#include "WindowManager.h" #include "WindowManager.h"
namespace OpenRCT2 { namespace Ui namespace OpenRCT2::Ui
{ {
class DummyWindowManager final : public IWindowManager class DummyWindowManager final : public IWindowManager
{ {
@@ -38,4 +38,4 @@ namespace OpenRCT2 { namespace Ui
{ {
return new DummyWindowManager(); return new DummyWindowManager();
} }
} } }

View File

@@ -22,9 +22,7 @@
#include "../interface/Window.h" #include "../interface/Window.h"
namespace OpenRCT2 namespace OpenRCT2::Ui
{
namespace Ui
{ {
/** /**
* Manager of in-game windows and widgets. * Manager of in-game windows and widgets.
@@ -48,4 +46,3 @@ namespace OpenRCT2
IWindowManager * CreateDummyWindowManager(); IWindowManager * CreateDummyWindowManager();
} }
}