1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Reduce SDL2 in headers

This commit is contained in:
Ted John
2017-06-12 18:00:53 +01:00
parent 7e9f7df7d1
commit 29f0372da8
12 changed files with 17 additions and 32 deletions

View File

@@ -37,9 +37,7 @@ extern "C"
utf8 gCustomRCT2DataPath[MAX_PATH] = { 0 };
utf8 gCustomPassword[MAX_PATH] = { 0 };
// This should probably be changed later and allow a custom selection of things to initialise like SDL_INIT
bool gOpenRCT2Headless = false;
bool gOpenRCT2ShowChangelog;
bool gOpenRCT2SilentBreakpad;

View File

@@ -41,7 +41,6 @@ enum DRAWING_ENGINE_FLAGS
struct rct_drawpixelinfo;
struct rct_palette_entry;
struct SDL_Window;
namespace OpenRCT2 { namespace Drawing
{

View File

@@ -21,6 +21,8 @@
#include "../interface/colour.h"
#include "font.h"
typedef struct SDL_Surface SDL_Surface;
// For g1 only enable packing when still relying on vanilla
#ifndef NO_RCT2
#pragma pack(push, 1)

View File

@@ -14,6 +14,10 @@
*****************************************************************************/
#pragma endregion
#ifndef NO_TTF
#include "../common.h"
#include <SDL_ttf.h>
#endif
#include "../rct2/addresses.h"
#include "../localisation/localisation.h"
#include "../sprites.h"

View File

@@ -18,7 +18,7 @@
#define _DRAWING_FONT_H_
#ifndef NO_TTF
#include <SDL_ttf.h>
typedef struct _TTF_Font TTF_Font;
#endif // NO_TTF
#include "../common.h"

View File

@@ -14,6 +14,10 @@
*****************************************************************************/
#pragma endregion
#ifndef NO_TTF
#include "../common.h"
#include <SDL_ttf.h>
#endif
#include "../rct2/addresses.h"
#include "../config/Config.h"
#include "../interface/colour.h"

View File

@@ -14,6 +14,10 @@
*****************************************************************************/
#pragma endregion
#ifndef NO_TTF
#include "../common.h"
#include <SDL_ttf.h>
#endif
#include "../interface/colour.h"
#include "../interface/viewport.h"
#include "../localisation/localisation.h"

View File

@@ -33,11 +33,6 @@ void macos_disallow_automatic_window_tabbing()
}
}
bool platform_check_steam_overlay_attached() {
STUB();
return false;
}
void platform_get_exe_path(utf8 *outPath, size_t outSize)
{
if (outSize == 0) return;
@@ -103,17 +98,6 @@ void platform_posix_sub_resolve_openrct_data_path(utf8 *out, size_t size) {
}
}
void platform_show_messagebox(const char * message)
{
@autoreleasepool
{
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"OK"];
alert.messageText = [NSString stringWithUTF8String:message];
[alert runModal];
}
}
utf8* macos_str_decomp_to_precomp(utf8 *input)
{
@autoreleasepool
@@ -225,9 +209,4 @@ uint8 platform_get_locale_measurement_format()
}
}
sint32 platform_get_non_window_flags()
{
return SDL_WINDOW_MINIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_FULLSCREEN_DESKTOP;
}
#endif

View File

@@ -147,8 +147,6 @@ uint8 platform_get_locale_date_format();
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer, size_t size);
#endif // NO_TTF
bool platform_check_steam_overlay_attached();
datetime64 platform_get_datetime_now_utc();
// Called very early in the program before parsing commandline arguments.

View File

@@ -786,11 +786,6 @@ uint8 platform_get_locale_date_format()
return DATE_FORMAT_DAY_MONTH_YEAR;
}
bool platform_check_steam_overlay_attached()
{
return GetModuleHandle("GameOverlayRenderer.dll") != NULL;
}
char *strndup(const char *src, size_t size)
{
size_t len = strnlen(src, size);

View File

@@ -15,6 +15,7 @@
#pragma endregion
#include <algorithm>
#include <cstdarg>
#include <string>
#include <vector>

View File

@@ -15,6 +15,7 @@
#pragma endregion
#include <algorithm>
#include <cstdarg>
#include <string>
#include <vector>