1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Move extern "C" {} blocks to headers (#6282)

This commit is contained in:
Michał Janiszewski
2017-09-18 17:05:28 +02:00
committed by GitHub
parent 7671b9fcde
commit 00fd18809c
280 changed files with 1562 additions and 1379 deletions

View File

@@ -20,12 +20,9 @@
#include "../localisation/LanguagePack.h"
#include "Fonts.h"
extern "C"
{
#include "../drawing/drawing.h"
#include "../drawing/ttf.h"
#include "../localisation/language.h"
}
#include "../drawing/drawing.h"
#include "../drawing/ttf.h"
#include "../localisation/language.h"
#ifndef NO_TTF
static TTFFontSetDescriptor TTFFontMSGothic = { {

View File

@@ -17,16 +17,8 @@
#ifndef OPENRCT2_FONTS_H
#define OPENRCT2_FONTS_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../drawing/font.h"
#ifdef __cplusplus
}
#endif
void TryLoadFonts();
#endif // OPENRCT2_FONTS_H

View File

@@ -23,17 +23,14 @@
#include "../OpenRCT2.h"
#include "Screenshot.h"
extern "C"
{
#include "../drawing/drawing.h"
#include "../game.h"
#include "../intro.h"
#include "../localisation/localisation.h"
#include "../platform/platform.h"
#include "../util/util.h"
#include "../windows/error.h"
#include "viewport.h"
}
#include "../drawing/drawing.h"
#include "../game.h"
#include "../intro.h"
#include "../localisation/localisation.h"
#include "../platform/platform.h"
#include "../util/util.h"
#include "../windows/error.h"
#include "viewport.h"
using namespace OpenRCT2;

View File

@@ -16,12 +16,12 @@
#pragma once
#include "../drawing/drawing.h"
#ifdef __cplusplus
extern "C"
{
#endif
#include "../drawing/drawing.h"
extern uint8 gScreenshotCountdown;
void screenshot_check();

View File

@@ -19,14 +19,11 @@
#include <vector>
#include <jansson.h>
extern "C"
{
#include "../common.h"
#include "../config/Config.h"
#include "../platform/platform.h"
#include "themes.h"
#include "window.h"
}
#include "../common.h"
#include "../config/Config.h"
#include "../platform/platform.h"
#include "themes.h"
#include "window.h"
#include "../core/Json.hpp"
#include "../core/Math.hpp"

View File

@@ -32,6 +32,10 @@ typedef enum CHAT_INPUT
CHAT_INPUT_CLOSE,
} CHAT_INPUT;
#ifdef __cplusplus
extern "C" {
#endif
extern bool gChatOpen;
void chat_open();
@@ -48,4 +52,8 @@ void chat_input(CHAT_INPUT input);
sint32 chat_string_wrapped_get_height(void *args, sint32 width);
sint32 chat_history_draw_string(rct_drawpixelinfo *dpi, void *args, sint32 x, sint32 y, sint32 width);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -136,8 +136,16 @@ typedef struct rct_colour_map {
uint8 colour_11;
} rct_colour_map;
#ifdef __cplusplus
extern "C" {
#endif
extern rct_colour_map ColourMapA[COLOUR_COUNT];
void colours_init_maps();
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -31,6 +31,10 @@ typedef enum CONSOLE_INPUT
CONSOLE_INPUT_SCROLL_NEXT,
} CONSOLE_INPUT;
#ifdef __cplusplus
extern "C" {
#endif
extern bool gConsoleOpen;
void console_open();
@@ -53,4 +57,8 @@ void console_clear_line();
void console_refresh_caret();
void console_scroll(sint32 delta);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -20,7 +20,15 @@
#include "../common.h"
#include "../drawing/drawing.h"
#ifdef __cplusplus
extern "C" {
#endif
void graph_draw_uint8(rct_drawpixelinfo *dpi, uint8 *history, sint32 count, sint32 baseX, sint32 baseY);
void graph_draw_money32(rct_drawpixelinfo *dpi, money32 *history, sint32 count, sint32 baseX, sint32 baseY, sint32 modifier, sint32 offset);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -18,12 +18,17 @@
#include "../common.h"
#include "../sprites.h"
#include "window.h"
#define MINIMUM_TOOL_SIZE 1
#define MAXIMUM_TOOL_SIZE 64
// The highest tool size to have a sprite. Bigger tool sizes simply display a number.
#define MAX_TOOL_SIZE_WITH_SPRITE 7
#ifdef __cplusplus
extern "C" {
#endif
extern uint16 gLandToolSize;
extern money32 gLandToolRaiseCost;
extern money32 gLandToolLowerCost;
@@ -35,3 +40,7 @@ extern money32 gWaterToolLowerCost;
uint32 land_tool_size_to_sprite_index(uint16 size);
void land_tool_show_surface_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentSurfaceType);
void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uint8 currentEdgeType);
#ifdef __cplusplus
}
#endif

View File

@@ -28,6 +28,10 @@ enum {
UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR = 1 << 4,
};
#ifdef __cplusplus
extern "C" {
#endif
void colour_scheme_update(rct_window *window);
void colour_scheme_update_all();
void colour_scheme_update_by_class(rct_window *window, rct_windowclass classification);
@@ -52,4 +56,8 @@ void theme_delete();
uint8 theme_desc_get_num_colours(rct_windowclass wc);
rct_string_id theme_desc_get_name(rct_windowclass wc);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -89,6 +89,10 @@ typedef struct viewport_interaction_info {
#define MAX_VIEWPORT_COUNT WINDOW_LIMIT_MAX
#ifdef __cplusplus
extern "C" {
#endif
/**
* A reference counter for whether something is forcing the grid lines to show. When the counter
* is decremented to 0, the grid lines are hidden.
@@ -166,4 +170,8 @@ sint16 get_height_marker_offset();
void viewport_set_saved_view();
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -59,6 +59,11 @@ enum {
SCROLL_BOTH = SCROLL_HORIZONTAL | SCROLL_VERTICAL
};
#ifdef __cplusplus
extern "C" {
#endif
void widget_scroll_update_thumbs(rct_window *w, rct_widgetindex widget_index);
void widget_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetindex widgetIndex);
@@ -72,4 +77,9 @@ void widget_scroll_get_part(rct_window *w, rct_widget* widget, sint32 x, sint32
void widget_set_enabled(rct_window *w, rct_widgetindex widgetIndex, bool enabled);
void widget_set_checkbox_value(rct_window *w, rct_widgetindex widgetIndex, sint32 value);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -38,6 +38,10 @@ typedef struct scenario_index_entry scenario_index_entry;
#define TEXT_INPUT_SIZE 1024
#define TOP_TOOLBAR_HEIGHT 27
#ifdef __cplusplus
extern "C" {
#endif
extern uint16 TextInputDescriptionArgs[4];
extern char gTextBoxInput[TEXT_INPUT_SIZE];
extern sint32 gMaxTextBoxInputLength;
@@ -835,4 +839,9 @@ void window_ride_construction_keyboard_shortcut_demolish_current();
bool sub_6CA2DF(sint32 *trackType, sint32 *trackDirection, sint32 *rideIndex, sint32 *_liftHillAndAlternativeState, sint32 *x, sint32 *y, sint32 *z, sint32 *properties);
money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 liftHillAndAlternativeState, sint32 x, sint32 y, sint32 z);
#ifdef __cplusplus
}
#endif
#endif