diff --git a/src/openrct2-ui/Ui.h b/src/openrct2-ui/Ui.h index 3922630fb5..cc0f0077cd 100644 --- a/src/openrct2-ui/Ui.h +++ b/src/openrct2-ui/Ui.h @@ -7,6 +7,8 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#pragma once + #ifdef _MSC_VER int NormalisedMain(int argc, const char** argv); #endif diff --git a/src/openrct2/Cheats.h b/src/openrct2/Cheats.h index 4f36817073..47653acd6b 100644 --- a/src/openrct2/Cheats.h +++ b/src/openrct2/Cheats.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _CHEATS_H_ -#define _CHEATS_H_ +#pragma once #include "common.h" @@ -120,5 +119,3 @@ void CheatsReset(); const char* CheatsGetName(CheatType cheatType); void CheatsSet(CheatType cheatType, int32_t param1 = 0, int32_t param2 = 0); void CheatsSerialise(class DataSerialiser& ds); - -#endif diff --git a/src/openrct2/CmdlineSprite.h b/src/openrct2/CmdlineSprite.h index 58227cc23e..e9f4e65686 100644 --- a/src/openrct2/CmdlineSprite.h +++ b/src/openrct2/CmdlineSprite.h @@ -7,12 +7,9 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _CMDLINE_SPRITE_H_ -#define _CMDLINE_SPRITE_H_ +#pragma once #include "common.h" int32_t cmdline_for_sprite(const char** argv, int32_t argc); extern int32_t gSpriteMode; - -#endif diff --git a/src/openrct2/Input.h b/src/openrct2/Input.h index c27addc3da..0de27cf7d4 100644 --- a/src/openrct2/Input.h +++ b/src/openrct2/Input.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _INPUT_H_ -#define _INPUT_H_ +#pragma once #include "interface/Window.h" @@ -117,5 +116,3 @@ void reset_tooltip_not_shown(); void input_reset_place_obj_modifier(); void InputScrollViewport(const ScreenCoordsXY& screenCoords); - -#endif diff --git a/src/openrct2/Intro.h b/src/openrct2/Intro.h index 70e9592fe3..8fbf9f9c27 100644 --- a/src/openrct2/Intro.h +++ b/src/openrct2/Intro.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _INTRO_H_ -#define _INTRO_H_ +#pragma once #include "common.h" @@ -34,5 +33,3 @@ extern IntroState gIntroState; void intro_update(); void intro_draw(rct_drawpixelinfo* dpi); - -#endif diff --git a/src/openrct2/interface/Chat.h b/src/openrct2/interface/Chat.h index d3885109f8..a51cba25a8 100644 --- a/src/openrct2/interface/Chat.h +++ b/src/openrct2/interface/Chat.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _CHAT_H_ -#define _CHAT_H_ +#pragma once #include "../common.h" @@ -42,5 +41,3 @@ void chat_history_add(const char* src); void chat_input(ChatInput input); int32_t chat_string_wrapped_get_height(void* args, int32_t width); - -#endif diff --git a/src/openrct2/localisation/Currency.h b/src/openrct2/localisation/Currency.h index a926f70bf8..9acb00e791 100644 --- a/src/openrct2/localisation/Currency.h +++ b/src/openrct2/localisation/Currency.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef CURRENCY_H -#define CURRENCY_H +#pragma once #include "../common.h" @@ -68,5 +67,3 @@ extern currency_descriptor CurrencyDescriptors[static_cast(CurrencyType * custom currency entry */ void currency_load_custom_currency_config(); - -#endif diff --git a/src/openrct2/paint/tile_element/Paint.Surface.h b/src/openrct2/paint/tile_element/Paint.Surface.h index 15a7a6793e..2010377992 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.h +++ b/src/openrct2/paint/tile_element/Paint.Surface.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _PAINT_SURFACE_H -#define _PAINT_SURFACE_H +#pragma once #include "../../common.h" #include "../../sprites.h" @@ -104,5 +103,3 @@ enum SPR_RCT1_WATER_MASK = SPR_CSG_BEGIN + 46787, SPR_RCT1_WATER_OVERLAY = SPR_CSG_BEGIN + 46792, }; - -#endif //_PAINT_SURFACE_H diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index cf3f035803..6f4bad1206 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _PEEP_H_ -#define _PEEP_H_ +#pragma once #include "../common.h" #include "../management/Finance.h" @@ -1036,5 +1035,3 @@ inline const rct_sprite_bounds& GetSpriteBounds( { return g_peep_animation_entries[EnumValue(spriteType)].sprite_bounds[EnumValue(actionSpriteType)]; }; - -#endif diff --git a/src/openrct2/peep/Staff.h b/src/openrct2/peep/Staff.h index 245af03882..795b9d0fcc 100644 --- a/src/openrct2/peep/Staff.h +++ b/src/openrct2/peep/Staff.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _STAFF_H_ -#define _STAFF_H_ +#pragma once #include "../common.h" #include "Peep.h" @@ -75,5 +74,3 @@ int32_t staff_get_available_entertainer_costume_list(EntertainerCostume* costume money32 GetStaffWage(StaffType type); PeepSpriteType EntertainerCostumeToSprite(EntertainerCostume entertainerType); - -#endif diff --git a/src/openrct2/platform/Crash.h b/src/openrct2/platform/Crash.h index ef1b140122..46c4a1c966 100644 --- a/src/openrct2/platform/Crash.h +++ b/src/openrct2/platform/Crash.h @@ -7,12 +7,9 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _OPENRCT2_CRASH_ -#define _OPENRCT2_CRASH_ +#pragma once using CExceptionHandler = void*; extern bool gOpenRCT2SilentBreakpad; CExceptionHandler crash_init(); - -#endif /* _OPENRCT2_CRASH_ */ diff --git a/src/openrct2/ride/CableLift.h b/src/openrct2/ride/CableLift.h index 2c1ec083bd..7660f052af 100644 --- a/src/openrct2/ride/CableLift.h +++ b/src/openrct2/ride/CableLift.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _CABLE_LIFT_H_ -#define _CABLE_LIFT_H_ +#pragma once #include "../common.h" #include "Ride.h" @@ -17,5 +16,3 @@ struct Vehicle; Vehicle* cable_lift_segment_create( Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head); - -#endif diff --git a/src/openrct2/ride/VehicleData.h b/src/openrct2/ride/VehicleData.h index c4fb7940b6..f78ee882fe 100644 --- a/src/openrct2/ride/VehicleData.h +++ b/src/openrct2/ride/VehicleData.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _VEHICLE_DATA_H -#define _VEHICLE_DATA_H +#pragma once #include "../common.h" @@ -31,5 +30,3 @@ extern const int32_t dword_9A2930[]; extern const int32_t dword_9A2970[]; extern const int32_t SpriteDirectionToSoundDirection[]; - -#endif diff --git a/src/openrct2/ride/VehiclePaint.h b/src/openrct2/ride/VehiclePaint.h index 5bbe90dc61..24edb42b9d 100644 --- a/src/openrct2/ride/VehiclePaint.h +++ b/src/openrct2/ride/VehiclePaint.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _VEHICLE_PAINT_H -#define _VEHICLE_PAINT_H +#pragma once #include "../common.h" @@ -61,5 +60,3 @@ void vehicle_visual_mini_golf_player( paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle); void vehicle_visual_mini_golf_ball( paint_session* session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle); - -#endif diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/JuniorRollerCoaster.h index d9bbcaaf66..be1220034e 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _JUNIOR_ROLLER_COASTER_H -#define _JUNIOR_ROLLER_COASTER_H +#pragma once #include "../../common.h" @@ -114,5 +113,3 @@ void junior_rc_paint_track_diag_25_deg_down_to_flat( void junior_rc_paint_track_diag_60_deg_down_to_flat( paint_session* session, const Ride* ride, uint8_t trackSequence, uint8_t direction, uint16_t height, const TrackElement& trackElement, JuniorRcChainType chainType); - -#endif // _JUNIOR_ROLLER_COASTER_H diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 87b9c8ee91..991e0ef714 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _SPRITES_H_ -#define _SPRITES_H_ +#pragma once #include "drawing/ScrollingText.h" #include "rct1/RCT1.h" @@ -1098,5 +1097,3 @@ enum SPR_IMAGE_LIST_BEGIN = SPR_SCROLLING_TEXT_END, SPR_IMAGE_LIST_END = 0x7FFFE }; - -#endif diff --git a/src/openrct2/util/SawyerCoding.h b/src/openrct2/util/SawyerCoding.h index db4a2a1b70..3045ce888e 100644 --- a/src/openrct2/util/SawyerCoding.h +++ b/src/openrct2/util/SawyerCoding.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _SAWYERCODING_H_ -#define _SAWYERCODING_H_ +#pragma once #include "../common.h" @@ -55,5 +54,3 @@ int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length); int32_t sawyercoding_detect_file_type(const uint8_t* src, size_t length); int32_t sawyercoding_detect_rct1_version(int32_t gameVersion); - -#endif diff --git a/src/openrct2/world/MapHelpers.h b/src/openrct2/world/MapHelpers.h index bfcc7af89f..a2097c8a0a 100644 --- a/src/openrct2/world/MapHelpers.h +++ b/src/openrct2/world/MapHelpers.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _MAP_HELPERS_H_ -#define _MAP_HELPERS_H_ +#pragma once #include "../common.h" @@ -22,5 +21,3 @@ enum int32_t map_smooth(int32_t l, int32_t t, int32_t r, int32_t b); int32_t tile_smooth(int32_t x, int32_t y); - -#endif diff --git a/src/openrct2/world/Water.h b/src/openrct2/world/Water.h index ef1af4da04..77943a7c03 100644 --- a/src/openrct2/world/Water.h +++ b/src/openrct2/world/Water.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _WATER_H_ -#define _WATER_H_ +#pragma once #include "../common.h" @@ -28,5 +27,3 @@ struct rct_water_type }; assert_struct_size(rct_water_type, 16); #pragma pack(pop) - -#endif diff --git a/test/testpaint/Addresses.h b/test/testpaint/Addresses.h index 6d71cfa890..8db772bf4c 100644 --- a/test/testpaint/Addresses.h +++ b/test/testpaint/Addresses.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _ADDRESSES_H_ -#define _ADDRESSES_H_ +#pragma once #include @@ -41,5 +40,3 @@ */ int32_t RCT2_CALLPROC_X( int32_t address, int32_t _eax, int32_t _ebx, int32_t _ecx, int32_t _edx, int32_t _esi, int32_t _edi, int32_t _ebp); - -#endif diff --git a/test/testpaint/Data.h b/test/testpaint/Data.h index cb7feebffe..74717d403d 100644 --- a/test/testpaint/Data.h +++ b/test/testpaint/Data.h @@ -7,8 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#ifndef _TEST_PAINT_DATA_H_ -#define _TEST_PAINT_DATA_H_ +#pragma once #include #include @@ -20,5 +19,3 @@ extern const utf8string TrackElemNames[256]; extern const utf8string RideCodeNames[RCT2_RIDE_TYPE_COUNT]; extern const utf8string TrackCodeNames[256]; extern const uint32_t* RideTypeTrackPaintFunctionsOld[RCT2_RIDE_TYPE_COUNT]; - -#endif // #endif _TEST_PAINT_DATA_H_