diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index 1212046f9e..e43993e165 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -12,6 +12,8 @@ #include "../timer/timer_game_calendar.h" +/* clang-format off */ + /** * Definition of an airport tiles layout. * @param x offset x of this tile @@ -412,4 +414,6 @@ const AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, {}, {}, 0, #undef AS_ND #undef AS_GENERIC +/* clang-format on */ + #endif /* AIRPORT_DEFAULTS_H */ diff --git a/src/table/airport_movement.h b/src/table/airport_movement.h index 08e81aaa89..72abff341d 100644 --- a/src/table/airport_movement.h +++ b/src/table/airport_movement.h @@ -24,6 +24,8 @@ struct AirportFTAbuildup { uint8_t next; ///< Next position from this position. }; +/* clang-format off */ + /////////////////////////////////////////////////////////////////////// /////*********Movement Positions on Airports********************/////// @@ -832,4 +834,6 @@ static const AirportFTAbuildup _airport_fta_helistation[] = { { MAX_ELEMENTS, TO_ALL, {}, 0 } // end marker. DO NOT REMOVE }; +/* clang-format on */ + #endif /* AIRPORT_MOVEMENT_H */ diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h index f3f9deb6d1..b5b839e77e 100644 --- a/src/table/airporttiles.h +++ b/src/table/airporttiles.h @@ -12,6 +12,8 @@ #include "table/strings.h" +/* clang-format off */ + /** Writes all airport tile properties in the AirportTile struct */ #define AT(num_frames, anim_speed) {{num_frames, AnimationStatus::Looping, anim_speed, {}}, STR_NULL, AirportTileCallbackMasks{}, 0, true, GRFFileProps(INVALID_AIRPORTTILE), {}} /** Writes an airport tile without animation in the AirportTile struct */ @@ -111,4 +113,6 @@ static_assert(NEW_AIRPORTTILE_OFFSET == lengthof(_origin_airporttile_specs)); #undef AT_NOANIM #undef AT +/* clang-format on */ + #endif /* AIRPORTTILES_H */ diff --git a/src/table/animcursors.h b/src/table/animcursors.h index ed25691a5e..05ca187027 100644 --- a/src/table/animcursors.h +++ b/src/table/animcursors.h @@ -14,6 +14,8 @@ * is to be displayed. */ +/* clang-format off */ + /** * Creates two array entries that define one * status of the cursor. @@ -89,3 +91,5 @@ static const AnimCursor * const _animcursors[] = { _order_goto_animcursor, _build_signals_animcursor }; + +/* clang-format on */ diff --git a/src/table/autorail.h b/src/table/autorail.h index 8c5a5a492f..1233303ba1 100644 --- a/src/table/autorail.h +++ b/src/table/autorail.h @@ -7,6 +7,8 @@ /** @file autorail.h Highlight/sprite information for autorail. */ +/* clang-format off */ + /* Rail selection types (directions): * / \ / \ / \ / \ / \ / \ * / /\ /\ \ /===\ / \ /| \ / |\ @@ -77,3 +79,5 @@ static const HighLightStyle _autorail_piece[][16] = { { HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_X, HT_DIR_X, HT_DIR_X, HT_DIR_X, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL }, { HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_VL, HT_DIR_X, HT_DIR_X, HT_DIR_X, HT_DIR_X, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL, HT_DIR_HL } }; + +/* clang-format on */ diff --git a/src/table/bridge_land.h b/src/table/bridge_land.h index e6f4f7f185..2397b3b544 100644 --- a/src/table/bridge_land.h +++ b/src/table/bridge_land.h @@ -7,6 +7,8 @@ #include "table/strings.h" +/* clang-format off */ + /** * @file bridge_land.h This file contains all the sprites for bridges * It consists of a number of arrays. @@ -799,3 +801,5 @@ const BridgeSpec _orig_bridge[] = { #undef MR #undef MW #undef MC + +/* clang-format on */ diff --git a/src/table/build_industry.h b/src/table/build_industry.h index d2ddf914a4..384c7bafc7 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -12,6 +12,8 @@ #include "table/strings.h" +/* clang-format off */ + /** * Definition of an industry tiles layout. * @param x offset x of this tile @@ -1787,4 +1789,6 @@ static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET }; #undef MT +/* clang-format on */ + #endif /* BUILD_INDUSTRY_H */ diff --git a/src/table/cargo_const.h b/src/table/cargo_const.h index 13880539a6..7746ab26e6 100644 --- a/src/table/cargo_const.h +++ b/src/table/cargo_const.h @@ -12,6 +12,8 @@ #include "table/strings.h" #endif +/* clang-format off */ + /** Construction macros for the #CargoSpec StringID entries. */ #define MK_STR_CARGO_PLURAL(label_plural) STR_CARGO_PLURAL_ ## label_plural #define MK_STR_CARGO_SINGULAR(label_singular) STR_CARGO_SINGULAR_ ## label_singular @@ -108,3 +110,4 @@ static const std::variant _default_climate_cargo[NUM_LANDSCAPE] { CT_PASSENGERS, CT_SUGAR, CT_MAIL, CT_TOYS, CT_BATTERIES, CT_CANDY, CT_TOFFEE, CT_COLA, CT_COTTON_CANDY, CT_BUBBLES, CT_PLASTIC, CT_FIZZY_DRINKS, }, }; +/* clang-format on */ diff --git a/src/table/clear_land.h b/src/table/clear_land.h index 00ea23fd0d..79c71d6ff7 100644 --- a/src/table/clear_land.h +++ b/src/table/clear_land.h @@ -9,6 +9,8 @@ #include "sprites.h" +/* clang-format off */ + static const SpriteID _landscape_clear_sprites_rough[8] = { SPR_FLAT_ROUGH_LAND, SPR_FLAT_ROUGH_LAND_1, @@ -76,3 +78,5 @@ static const SpriteID _clear_land_sprites_snow_desert[8] = { SPR_FLAT_3_QUART_SNOW_DESERT_TILE, SPR_FLAT_SNOW_DESERT_TILE, }; + +/* clang-format on */ diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h index 4c5ec7f4e3..4ffd9c71b2 100644 --- a/src/table/elrail_data.h +++ b/src/table/elrail_data.h @@ -13,6 +13,8 @@ #ifndef ELRAIL_DATA_H #define ELRAIL_DATA_H +/* clang-format off */ + /** * Tile Location group. * This defines whether the X and or Y coordinate of a tile is even @@ -510,4 +512,6 @@ static const RailCatenarySprite Wires[5][TRACK_END][4] = { } }; +/* clang-format on */ + #endif /* ELRAIL_DATA_H */ diff --git a/src/table/engines.h b/src/table/engines.h index b5e745c1b2..1378243a3b 100644 --- a/src/table/engines.h +++ b/src/table/engines.h @@ -15,6 +15,8 @@ #include "table/strings.h" +/* clang-format off */ + /** * Writes the properties of a train into the EngineInfo struct. * @see EngineInfo @@ -767,4 +769,6 @@ static constexpr RoadVehicleInfo _orig_road_vehicle_info[] = { }; #undef ROV +/* clang-format on */ + #endif /* ENGINES_H */ diff --git a/src/table/genland.h b/src/table/genland.h index 51d983f2be..d227b36d43 100644 --- a/src/table/genland.h +++ b/src/table/genland.h @@ -7,6 +7,8 @@ /** @file genland.h Table used to generate deserts and/or rainforests. */ +/* clang-format off */ + #define M(x, y) {x, y} static const TileIndexDiffC _make_desert_or_rainforest_data[] = { @@ -161,6 +163,6 @@ static const TileIndexDiffC _make_desert_or_rainforest_data[] = { M( 3, -6) }; - - #undef M + +/* clang-format on */ diff --git a/src/table/heightmap_colours.h b/src/table/heightmap_colours.h index a03e714cfc..7289f39a8e 100644 --- a/src/table/heightmap_colours.h +++ b/src/table/heightmap_colours.h @@ -9,6 +9,8 @@ * @file heightmap_colours.h The colour tables for heightmaps. */ +/* clang-format off */ + /** Height map colours for the green colour scheme, ordered by height. */ static const uint32_t _green_map_heights[] = { MKCOLOUR(0x59595958), @@ -340,3 +342,5 @@ static const uint32_t _violet_map_heights[] = { MKCOLOUR(0x87878786), MKCOLOUR(0x87878787), }; + +/* clang-format on */ diff --git a/src/table/industry_land.h b/src/table/industry_land.h index a8cae114c7..a9bc7cea53 100644 --- a/src/table/industry_land.h +++ b/src/table/industry_land.h @@ -31,6 +31,8 @@ struct DrawIndustryCoordinates { uint8_t y; ///< coordinate y of the pair }; +/* clang-format off */ + /** * Macro to ease the declaration of the array * @param s1 sprite ID of ground sprite @@ -954,3 +956,4 @@ static const DrawIndustryCoordinates _coal_plant_sparks[] = { {15, 0}, }; +/* clang-format on */ diff --git a/src/table/landscape_sprite.h b/src/table/landscape_sprite.h index d72cbc7cd7..d2035076a0 100644 --- a/src/table/landscape_sprite.h +++ b/src/table/landscape_sprite.h @@ -7,6 +7,8 @@ /** @file landscape_sprite.h Offsets of sprites to replace for non-temperate landscapes. */ +/* clang-format off */ + static constexpr std::pair _landscape_spriteindexes_arctic[] = { { 0xF67, 0xF9F}, { 0xAAD, 0xAB0}, @@ -136,3 +138,5 @@ static constexpr std::pair _landscape_spriteindexes_toyland[ { 0x511, 0x511}, { 0x322, 0x322}, }; + +/* clang-format on */ diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index b2ecb6a2b5..c769850dd5 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -12,6 +12,8 @@ #include "../newgrf_roadtype.h" #include "../newgrf_roadstop.h" +/* clang-format off */ + /* Helper for filling property tables */ #define NIP(prop, base, variable, type, name) { name, [] (const void *b) -> const void * { return std::addressof(static_cast(b)->variable); }, cpp_sizeof(base, variable), prop, type } @@ -747,3 +749,5 @@ static const NIFeature * const _nifeatures[] = { nullptr, }; static_assert(lengthof(_nifeatures) == GSF_FAKE_END); + +/* clang-format on */ diff --git a/src/table/object_land.h b/src/table/object_land.h index 6988af7a72..677453738d 100644 --- a/src/table/object_land.h +++ b/src/table/object_land.h @@ -9,6 +9,8 @@ #include "table/strings.h" +/* clang-format off */ + #define TILE_SEQ_LINE(sz, img) { 0, 0, 0, 16, 16, sz, {img, PAL_NONE} }, static const DrawTileSeqStruct _object_transmitter_seq[] = { @@ -131,3 +133,5 @@ extern const ObjectSpec _original_objects[] = { #undef S #undef A #undef T + +/* clang-format on */ diff --git a/src/table/opengl_shader.h b/src/table/opengl_shader.h index b644123d14..c6a3a7e799 100644 --- a/src/table/opengl_shader.h +++ b/src/table/opengl_shader.h @@ -7,6 +7,8 @@ /** @file opengl_shader.h OpenGL shader programs. */ +/* clang-format off */ + /** Vertex shader that positions a sprite on screen.. */ static const char *_vertex_shader_sprite[] = { "#version 110\n", @@ -199,3 +201,5 @@ static const char *_frag_shader_sprite_blend_150[] = { " colour.rgb = idx > 0.0 ? adj_brightness(remap_col.rgb, max3(rgb_col.rgb)) : rgb_col.rgb;", "}", }; + +/* clang-format on */ diff --git a/src/table/palette_convert.h b/src/table/palette_convert.h index 2a4ed36dda..957e6b39c9 100644 --- a/src/table/palette_convert.h +++ b/src/table/palette_convert.h @@ -7,6 +7,8 @@ /** @file palette_convert.h Translation tables from one GRF to another GRF. */ +/* clang-format off */ + /** Converting from the Windows palette to the DOS palette */ extern const uint8_t _palmap_w2d[] = { 0, 1, 2, 3, 4, 5, 6, 7, // 0..7 @@ -78,3 +80,5 @@ static const uint8_t _palmap_d2w[] = { 240, 241, 242, 243, 244, 217, 218, 219, // 240..247 220, 221, 222, 223, 224, 225, 226, 255, // 248..255 }; + +/* clang-format on */ diff --git a/src/table/palettes.h b/src/table/palettes.h index ec0a62a0ba..a888011c1a 100644 --- a/src/table/palettes.h +++ b/src/table/palettes.h @@ -7,6 +7,8 @@ /** @file palettes.h The colour translation of the GRF palettes. */ +/* clang-format off */ + #define M(r, g, b) Colour(r, g, b) /** Colour palette (DOS) */ @@ -143,3 +145,5 @@ static const ExtraPaletteValues _extra_palette_values = { M(116, 180, 196), M(148, 200, 216), M(180, 220, 232) } }; #undef M + +/* clang-format on */ diff --git a/src/table/pricebase.h b/src/table/pricebase.h index 27af6a370e..bbb4c7c847 100644 --- a/src/table/pricebase.h +++ b/src/table/pricebase.h @@ -7,6 +7,8 @@ /** @file pricebase.h Price Bases */ +/* clang-format off */ + extern const PriceBaseSpec _price_base_specs[] = { { 100, PCAT_NONE, GSF_END, INVALID_PRICE }, ///< PR_STATION_VALUE { 100, PCAT_CONSTRUCTION, GSF_END, INVALID_PRICE }, ///< PR_BUILD_RAIL @@ -81,3 +83,5 @@ extern const PriceBaseSpec _price_base_specs[] = { { 5000, PCAT_RUNNING, GSF_END, PR_BUILD_STATION_AIRPORT}, ///< PR_INFRASTRUCTURE_AIRPORT }; static_assert(lengthof(_price_base_specs) == PR_END); + +/* clang-format on */ diff --git a/src/table/railtypes.h b/src/table/railtypes.h index 3f687545bb..8b2e2ed215 100644 --- a/src/table/railtypes.h +++ b/src/table/railtypes.h @@ -15,6 +15,8 @@ #include "table/strings.h" +/* clang-format off */ + /** * Global Railtype definition */ @@ -416,4 +418,6 @@ static const RailTypeInfo _original_railtypes[] = { }, }; +/* clang-format on */ + #endif /* RAILTYPES_H */ diff --git a/src/table/road_land.h b/src/table/road_land.h index e6c57356e9..569828cdd5 100644 --- a/src/table/road_land.h +++ b/src/table/road_land.h @@ -7,6 +7,8 @@ /** @file road_land.h Sprite constructs for road depots. */ +/* clang-format off */ + #define TILE_SEQ_LINE(img, pal, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 20, {img, pal} }, static const DrawTileSeqStruct _road_depot_NE[] = { @@ -287,3 +289,5 @@ static const DrawRoadTileStruct * const * const _road_display_table[] = { _roadside_none, _roadside_trees, }; + +/* clang-format on */ diff --git a/src/table/roadtypes.h b/src/table/roadtypes.h index f77c34dc74..fd3f4f151d 100644 --- a/src/table/roadtypes.h +++ b/src/table/roadtypes.h @@ -15,6 +15,8 @@ #include "table/strings.h" +/* clang-format off */ + /** * Global Roadtype definition */ @@ -182,4 +184,6 @@ static const RoadTypeInfo _original_roadtypes[] = { }, }; +/* clang-format on */ + #endif /* ROADTYPES_H */ diff --git a/src/table/roadveh_movement.h b/src/table/roadveh_movement.h index 809a973ee8..d3f88de7fc 100644 --- a/src/table/roadveh_movement.h +++ b/src/table/roadveh_movement.h @@ -7,6 +7,8 @@ /** @file table/roadveh_movement.h Data about how a road vehicle must drive on a tile */ +/* clang-format off */ + static const RoadDriveEntry _roadveh_drive_data_0[] = { {15, 5}, {14, 5}, @@ -1482,3 +1484,5 @@ static const RoadDriveEntry * const * const _road_drive_data[2] = { _road_road_drive_data, _road_tram_drive_data, }; + +/* clang-format on */ diff --git a/src/table/station_land.h b/src/table/station_land.h index 0aa2e63480..fc8ed1f43c 100644 --- a/src/table/station_land.h +++ b/src/table/station_land.h @@ -7,6 +7,8 @@ /** @file station_land.h Sprites to use and how to display them for station tiles. */ +/* clang-format off */ + /** * Constructor macro for an image without a palette in a DrawTileSeqStruct array. * @param dx Offset in x direction @@ -902,3 +904,5 @@ static const std::array, to_underlying(Stati _station_display_datas_waypoint, _station_display_datas_road_waypoint, }}; + +/* clang-format on */ diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 2791e1982a..0d53562ecb 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -32,6 +32,8 @@ extern void EmitSingleChar(StringBuilder &builder, std::string_view param, char3 extern void EmitPlural(StringBuilder &builder, std::string_view param, char32_t value); extern void EmitGender(StringBuilder &builder, std::string_view param, char32_t value); +/* clang-format off */ + static const CmdStruct _cmd_structs[] = { /* Font size */ {"NORMAL_FONT", EmitSingleChar, SCC_NORMALFONT, 0, std::nullopt, {}}, @@ -157,6 +159,8 @@ static const CmdStruct _cmd_structs[] = { {"PDF", EmitSingleChar, CHAR_TD_PDF, 0, std::nullopt, {CmdFlag::DontCount}}, }; +/* clang-format on */ + /** Description of a plural form */ struct PluralForm { size_t plural_count; ///< The number of plural forms @@ -167,6 +171,8 @@ struct PluralForm { /** The maximum number of plurals. */ static const size_t MAX_PLURALS = 5; +/* clang-format off */ + /** All plural forms used */ static const PluralForm _plural_forms[] = { { 2, "Two forms: special case for 1.", "\"1\" \"other\"" }, @@ -214,3 +220,5 @@ static const char * const _pragmas[][4] = { { "gender", "tag", "", "List of genders" }, { "case", "tac", "", "List of cases" }, }; + +/* clang-format on */ diff --git a/src/table/string_colours.h b/src/table/string_colours.h index cc6347d56b..73363892ea 100644 --- a/src/table/string_colours.h +++ b/src/table/string_colours.h @@ -7,6 +7,8 @@ /** @file string_colours.h The colour translation of GRF's strings. */ +/* clang-format off */ + /** Colour mapping for #TextColour. */ static const uint8_t _string_colourmap[17] = { 150, // TC_BLUE @@ -27,3 +29,5 @@ static const uint8_t _string_colourmap[17] = { 133, // TC_DARK_BLUE 1, // TC_BLACK }; + +/* clang-format on */ diff --git a/src/table/town_land.h b/src/table/town_land.h index 012ad0086a..18f43dfaf4 100644 --- a/src/table/town_land.h +++ b/src/table/town_land.h @@ -7,6 +7,8 @@ /** @file town_land.h Sprites to use and how to display them for town tiles. */ +/* clang-format off */ + /** * Writes the data into the Town Tile Drawing Struct * @param s1 The first sprite of the building, mostly the ground sprite @@ -2277,3 +2279,5 @@ extern const HouseSpec _original_house_specs[] = { /** Make sure we have the right number of elements: one entry for each house */ static_assert(lengthof(_original_house_specs) == NEW_HOUSE_OFFSET); + +/* clang-format on */ diff --git a/src/table/townname.h b/src/table/townname.h index 685e888a97..8c16471b4a 100644 --- a/src/table/townname.h +++ b/src/table/townname.h @@ -9,6 +9,8 @@ #include "../core/enum_type.hpp" +/* clang-format off */ + static const char * const _name_original_english_1[] = { "Great ", "Little ", @@ -3312,3 +3314,5 @@ static const char * const _name_catalan_river1[] = { " de Segre", " de Francol\u00ed", }; + +/* clang-format on */ diff --git a/src/table/track_land.h b/src/table/track_land.h index 51a57b6e21..eb7dc0553c 100644 --- a/src/table/track_land.h +++ b/src/table/track_land.h @@ -7,8 +7,9 @@ /** @file track_land.h Sprites to use and how to display them for train depot tiles. */ -#define TILE_SEQ_LINE(img, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 23, {img, PAL_NONE} }, +/* clang-format off */ +#define TILE_SEQ_LINE(img, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 23, {img, PAL_NONE} }, static const DrawTileSeqStruct _depot_gfx_NE[] = { TILE_SEQ_LINE(SPR_RAIL_DEPOT_NE | (1 << PALETTE_MODIFIER_COLOUR), 2, 13, 13, 1) @@ -43,3 +44,5 @@ static const DrawTileSpriteSpan _depot_invisible_gfx_table[] = { }; #undef TILE_SEQ_LINE + +/* clang-format on */ diff --git a/src/table/train_sprites.h b/src/table/train_sprites.h index 36dfba1785..65a8c6d9cb 100644 --- a/src/table/train_sprites.h +++ b/src/table/train_sprites.h @@ -7,6 +7,8 @@ /** @file train_sprites.h Sprites to use for trains. */ +/* clang-format off */ + static const SpriteID _engine_sprite_base[] = { 0x0B59, 0x0B61, 0x0B69, 0x0BE1, 0x0B71, 0x0B75, 0x0B7D, 0x0B7D, 0x0B85, 0x0B85, 0x0B8D, 0x0B8D, 0x0BC9, 0x0BD1, 0x0BD9, 0x0BE9, @@ -66,3 +68,5 @@ static const uint8_t _wagon_full_adder[] = { static_assert(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_and)); static_assert(lengthof(_engine_sprite_base) == lengthof(_engine_sprite_add)); static_assert(lengthof(_engine_sprite_base) == lengthof(_wagon_full_adder)); + +/* clang-format on */ diff --git a/src/table/tree_land.h b/src/table/tree_land.h index 6769066477..a901ab1673 100644 --- a/src/table/tree_land.h +++ b/src/table/tree_land.h @@ -10,6 +10,8 @@ #ifndef TREE_LAND_H #define TREE_LAND_H +/* clang-format off */ + static const uint8_t _tree_base_by_landscape[4] = {0, 12, 20, 32}; static const uint8_t _tree_count_by_landscape[4] = {12, 8, 12, 9}; @@ -225,4 +227,6 @@ static const PalSpriteID _tree_layout_sprite[164 + (79 - 48 + 1)][4] = { { { 0x716, PAL_NONE }, { 0x701, PAL_NONE }, { 0x6fa, PAL_NONE }, { 0x716, PAL_NONE } }, // 31 }; +/* clang-format on */ + #endif /* TREE_LAND_H */ diff --git a/src/table/water_land.h b/src/table/water_land.h index d96aa979fe..c481ade6c9 100644 --- a/src/table/water_land.h +++ b/src/table/water_land.h @@ -7,6 +7,8 @@ /** @file water_land.h Sprites to use and how to display them for water tiles (depots/locks). */ +/* clang-format off */ + /** * Constructor macro for an image without a palette in a DrawTileSeqStruct array. * @param dx Offset in x direction @@ -140,3 +142,5 @@ static const DrawTileSpriteSpan _lock_display_data[][DIAGDIR_END] = { #undef TILE_SEQ_LINE #undef TILE_SPRITE_LINE + +/* clang-format on */