1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
SamuXarick 6058ee8b57
Merge 5d8f3ae6db into 03f5f7145f 2025-07-18 17:24:27 +00:00
Peter Nelson 03f5f7145f
Fix f6e78a480d: Truncation ellipsis always drawn in initial colour. (#14451)
Truncation ellipsis is now a layouted line, so we can no longer rely on implicitly using the last set colour.
2025-07-18 18:24:19 +01:00
Peter Nelson 0dc40877fd
Codechange: Initialise/reset font cache with FontSizes bitset. (#14448)
Instead of choosing either "Normal/Small/Large" or "Monospace", use an EnumBitSet to allow any combination.
2025-07-18 18:23:28 +01:00
SamuXarick 5d8f3ae6db Change: [Script] Improve some ScriptAirport return values for AT_OILRIG airport type
Affected functions are:
IsAirportInformationAvailable, GetAirportWidth, GetAirportHeight, GetAirportCoverageRadius, GetNumHangars, GetHangarOfAirport, GetNoiseLevelIncrease, GetNearestTown, GetMaintenanceCostFactor, GetMonthlyMaintenanceCost and GetAirportNumHelipads.

Add AT_OILRIG to the AirportType enum even though it can't be built.

Add an AirportTileTable for oilrig in AirportSpec definitions.
2025-05-27 21:19:32 +01:00
17 changed files with 71 additions and 48 deletions

View File

@ -877,12 +877,12 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetAirportHeight(8): 2 GetAirportHeight(8): 2
GetAirportCoverageRadius(8): 4 GetAirportCoverageRadius(8): 4
GetAirportNumHelipads(8): 3 GetAirportNumHelipads(8): 3
IsAirportInformationAvailable(9): false IsAirportInformationAvailable(9): true
IsValidAirportType(9): false IsValidAirportType(9): false
GetAirportWidth(9): -1 GetAirportWidth(9): 1
GetAirportHeight(9): -1 GetAirportHeight(9): 1
GetAirportCoverageRadius(9): -1 GetAirportCoverageRadius(9): 4
GetAirportNumHelipads(9): -1 GetAirportNumHelipads(9): 1
GetBankBalance(): 1999999790 GetBankBalance(): 1999999790
GetPrice(): 5400 GetPrice(): 5400
BuildAirport(): true BuildAirport(): true

View File

@ -2369,7 +2369,7 @@ static bool ConFont(std::span<std::string_view> argv)
FontCacheSubSetting *setting = GetFontCacheSubSetting(fs); FontCacheSubSetting *setting = GetFontCacheSubSetting(fs);
/* Make sure all non sprite fonts are loaded. */ /* Make sure all non sprite fonts are loaded. */
if (!setting->font.empty() && !fc->HasParent()) { if (!setting->font.empty() && !fc->HasParent()) {
InitFontCache(fs == FS_MONO); InitFontCache(fs);
fc = FontCache::Get(fs); fc = FontCache::Get(fs);
} }
IConsolePrint(CC_DEFAULT, "{} font:", FontSizeToName(fs)); IConsolePrint(CC_DEFAULT, "{} font:", FontSizeToName(fs));

View File

@ -126,10 +126,10 @@ void SetFont(FontSize fontsize, const std::string &font, uint size)
CheckForMissingGlyphs(); CheckForMissingGlyphs();
_fcsettings = std::move(backup); _fcsettings = std::move(backup);
} else { } else {
InitFontCache(true); InitFontCache(fontsize);
} }
LoadStringWidthTable(fontsize == FS_MONO); LoadStringWidthTable(fontsize);
UpdateAllVirtCoords(); UpdateAllVirtCoords();
ReInitAllWindows(true); ReInitAllWindows(true);
@ -213,15 +213,13 @@ std::string GetFontCacheFontName(FontSize fs)
/** /**
* (Re)initialize the font cache related things, i.e. load the non-sprite fonts. * (Re)initialize the font cache related things, i.e. load the non-sprite fonts.
* @param monospace Whether to initialise the monospace or regular fonts. * @param fontsizes Font sizes to be initialised.
*/ */
void InitFontCache(bool monospace) void InitFontCache(FontSizes fontsizes)
{ {
FontCache::InitializeFontCaches(); FontCache::InitializeFontCaches();
for (FontSize fs = FS_BEGIN; fs < FS_END; fs++) { for (FontSize fs : fontsizes) {
if (monospace != (fs == FS_MONO)) continue;
FontCache *fc = FontCache::Get(fs); FontCache *fc = FontCache::Get(fs);
if (fc->HasParent()) delete fc; if (fc->HasParent()) delete fc;

View File

@ -167,9 +167,9 @@ inline void InitializeUnicodeGlyphMap()
} }
} }
inline void ClearFontCache() inline void ClearFontCache(FontSizes fontsizes)
{ {
for (FontSize fs = FS_BEGIN; fs < FS_END; fs++) { for (FontSize fs : fontsizes) {
FontCache::Get(fs)->ClearFontCache(); FontCache::Get(fs)->ClearFontCache();
} }
} }
@ -231,7 +231,7 @@ inline FontCacheSubSetting *GetFontCacheSubSetting(FontSize fs)
uint GetFontCacheFontSize(FontSize fs); uint GetFontCacheFontSize(FontSize fs);
std::string GetFontCacheFontName(FontSize fs); std::string GetFontCacheFontName(FontSize fs);
void InitFontCache(bool monospace); void InitFontCache(FontSizes fontsizes);
void UninitFontCache(); void UninitFontCache();
bool GetFontAAState(); bool GetFontAAState();

View File

@ -8,6 +8,7 @@
/** @file gfx.cpp Handling of drawing text and other gfx related stuff. */ /** @file gfx.cpp Handling of drawing text and other gfx related stuff. */
#include "stdafx.h" #include "stdafx.h"
#include "gfx_func.h"
#include "gfx_layout.h" #include "gfx_layout.h"
#include "progress.h" #include "progress.h"
#include "zoom_func.h" #include "zoom_func.h"
@ -579,7 +580,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
const uint shadow_offset = ScaleGUITrad(1); const uint shadow_offset = ScaleGUITrad(1);
auto draw_line = [&](const ParagraphLayouter::Line &line, bool do_shadow, int left, int min_x, int max_x, bool truncation) { auto draw_line = [&](const ParagraphLayouter::Line &line, bool do_shadow, int left, int min_x, int max_x, bool truncation, TextColour &last_colour) {
const DrawPixelInfo *dpi = _cur_dpi; const DrawPixelInfo *dpi = _cur_dpi;
int dpi_left = dpi->left; int dpi_left = dpi->left;
int dpi_right = dpi->left + dpi->width - 1; int dpi_right = dpi->left + dpi->width - 1;
@ -592,10 +593,15 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
FontCache *fc = f->fc; FontCache *fc = f->fc;
TextColour colour = f->colour; TextColour colour = f->colour;
if (colour == TC_INVALID || HasFlag(default_colour, TC_FORCED)) colour = default_colour; if (colour == TC_INVALID || HasFlag(last_colour, TC_FORCED)) {
colour = last_colour;
} else {
/* Update the last colour for the truncation ellipsis. */
last_colour = colour;
}
bool colour_has_shadow = (colour & TC_NO_SHADE) == 0 && colour != TC_BLACK; bool colour_has_shadow = (colour & TC_NO_SHADE) == 0 && colour != TC_BLACK;
SetColourRemap(do_shadow ? TC_BLACK : colour); // the last run also sets the colour for the truncation dots
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue; if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
SetColourRemap(do_shadow ? TC_BLACK : colour);
for (int i = 0; i < run.GetGlyphCount(); i++) { for (int i = 0; i < run.GetGlyphCount(); i++) {
GlyphID glyph = glyphs[i]; GlyphID glyph = glyphs[i];
@ -623,11 +629,12 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
/* Draw shadow, then foreground */ /* Draw shadow, then foreground */
for (bool do_shadow : {true, false}) { for (bool do_shadow : {true, false}) {
draw_line(line, do_shadow, left - offset_x, min_x, max_x, truncation); TextColour last_colour = default_colour;
draw_line(line, do_shadow, left - offset_x, min_x, max_x, truncation, last_colour);
if (truncation) { if (truncation) {
int x = (_current_text_dir == TD_RTL) ? left : (right - truncation_width); int x = (_current_text_dir == TD_RTL) ? left : (right - truncation_width);
draw_line(*truncation_layout->front(), do_shadow, x, INT32_MIN, INT32_MAX, false); draw_line(*truncation_layout->front(), do_shadow, x, INT32_MIN, INT32_MAX, false, last_colour);
} }
} }
@ -1240,14 +1247,14 @@ static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode,
} }
/** /**
* Initialize _stringwidth_table cache * Initialize _stringwidth_table cache for the specified font sizes.
* @param monospace Whether to load the monospace cache or the normal fonts. * @param fontsizes Font sizes to initialise.
*/ */
void LoadStringWidthTable(bool monospace) void LoadStringWidthTable(FontSizes fontsizes)
{ {
ClearFontCache(); ClearFontCache(fontsizes);
for (FontSize fs = monospace ? FS_MONO : FS_BEGIN; fs < (monospace ? FS_END : FS_MONO); fs++) { for (FontSize fs : fontsizes) {
for (uint i = 0; i != 224; i++) { for (uint i = 0; i != 224; i++) {
_stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32); _stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32);
} }
@ -1812,7 +1819,7 @@ bool AdjustGUIZoom(bool automatic)
if (old_font_zoom != _font_zoom) { if (old_font_zoom != _font_zoom) {
GfxClearFontSpriteCache(); GfxClearFontSpriteCache();
} }
ClearFontCache(); ClearFontCache(FONTSIZES_ALL);
LoadStringWidthTable(); LoadStringWidthTable();
SetupWidgetDimensions(); SetupWidgetDimensions();

View File

@ -149,7 +149,7 @@ int GetStringHeight(StringID str, int maxw);
int GetStringLineCount(std::string_view str, int maxw); int GetStringLineCount(std::string_view str, int maxw);
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion); Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion);
Dimension GetStringMultiLineBoundingBox(std::string_view str, const Dimension &suggestion, FontSize fontsize = FS_NORMAL); Dimension GetStringMultiLineBoundingBox(std::string_view str, const Dimension &suggestion, FontSize fontsize = FS_NORMAL);
void LoadStringWidthTable(bool monospace = false); void LoadStringWidthTable(FontSizes fontsizes = FONTSIZES_REQUIRED);
void DrawDirtyBlocks(); void DrawDirtyBlocks();
void AddDirtyBlock(int left, int top, int right, int bottom); void AddDirtyBlock(int left, int top, int right, int bottom);

View File

@ -258,6 +258,13 @@ enum FontSize : uint8_t {
}; };
DECLARE_INCREMENT_DECREMENT_OPERATORS(FontSize) DECLARE_INCREMENT_DECREMENT_OPERATORS(FontSize)
using FontSizes = EnumBitSet<FontSize, uint8_t>;
/** Mask of all possible font sizes. */
constexpr FontSizes FONTSIZES_ALL{FS_NORMAL, FS_SMALL, FS_LARGE, FS_MONO};
/** Mask of font sizes required to be present. */
constexpr FontSizes FONTSIZES_REQUIRED{FS_NORMAL, FS_SMALL, FS_LARGE};
inline std::string_view FontSizeToName(FontSize fs) inline std::string_view FontSizeToName(FontSize fs)
{ {
static const std::string_view SIZE_TO_NAME[] = { "medium", "small", "large", "mono" }; static const std::string_view SIZE_TO_NAME[] = { "medium", "small", "large", "mono" };

View File

@ -245,7 +245,7 @@ static void RealChangeBlitter(std::string_view repl_blitter)
/* Clear caches that might have sprites for another blitter. */ /* Clear caches that might have sprites for another blitter. */
VideoDriver::GetInstance()->ClearSystemSprites(); VideoDriver::GetInstance()->ClearSystemSprites();
ClearFontCache(); ClearFontCache(FONTSIZES_ALL);
GfxClearSpriteCache(); GfxClearSpriteCache();
ReInitAllWindows(false); ReInitAllWindows(false);
} }
@ -326,7 +326,7 @@ void CheckBlitter()
{ {
if (!SwitchNewGRFBlitter()) return; if (!SwitchNewGRFBlitter()) return;
ClearFontCache(); ClearFontCache(FONTSIZES_ALL);
GfxClearSpriteCache(); GfxClearSpriteCache();
ReInitAllWindows(false); ReInitAllWindows(false);
} }
@ -338,7 +338,7 @@ void GfxLoadSprites()
SwitchNewGRFBlitter(); SwitchNewGRFBlitter();
VideoDriver::GetInstance()->ClearSystemSprites(); VideoDriver::GetInstance()->ClearSystemSprites();
ClearFontCache(); ClearFontCache(FONTSIZES_ALL);
GfxInitSpriteMem(); GfxInitSpriteMem();
LoadSpriteTables(); LoadSpriteTables();
GfxInitPalettes(); GfxInitPalettes();

View File

@ -700,7 +700,7 @@ int openttd_main(std::span<std::string_view> arguments)
InitializeLanguagePacks(); InitializeLanguagePacks();
/* Initialize the font cache */ /* Initialize the font cache */
InitFontCache(false); InitFontCache(FONTSIZES_REQUIRED);
/* This must be done early, since functions use the SetWindowDirty* calls */ /* This must be done early, since functions use the SetWindowDirty* calls */
InitWindowSystem(); InitWindowSystem();

View File

@ -182,6 +182,6 @@ bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_is
if (best_font == nullptr) return false; if (best_font == nullptr) return false;
callback->SetFontNames(settings, best_font, &best_index); callback->SetFontNames(settings, best_font, &best_index);
InitFontCache(callback->Monospace()); InitFontCache(callback->Monospace() ? FontSizes{FS_MONO} : FONTSIZES_REQUIRED);
return true; return true;
} }

View File

@ -28,6 +28,7 @@
* \li AICargo::CC_POTABLE * \li AICargo::CC_POTABLE
* \li AICargo::CC_NON_POTABLE * \li AICargo::CC_NON_POTABLE
* \li AIVehicleList_Waypoint * \li AIVehicleList_Waypoint
* \li AIAirport::AT_OILRIG
* *
* Other changes: * Other changes:
* \li AIBridge::GetBridgeID renamed to AIBridge::GetBridgeType * \li AIBridge::GetBridgeID renamed to AIBridge::GetBridgeType

View File

@ -29,6 +29,7 @@
* \li GSCargo::CC_NON_POTABLE * \li GSCargo::CC_NON_POTABLE
* \li GSVehicleList_Waypoint * \li GSVehicleList_Waypoint
* \li GSBaseStation::GetOwner * \li GSBaseStation::GetOwner
* \li GSAirport::AT_OILRIG
* *
* Other changes: * Other changes:
* \li GSBridge::GetBridgeID renamed to GSBridge::GetBridgeType * \li GSBridge::GetBridgeID renamed to GSBridge::GetBridgeType

View File

@ -24,7 +24,7 @@
/* static */ bool ScriptAirport::IsAirportInformationAvailable(AirportType type) /* static */ bool ScriptAirport::IsAirportInformationAvailable(AirportType type)
{ {
return type >= 0 && type < (AirportType)NUM_AIRPORTS && AirportSpec::Get(type)->enabled; return type == AT_OILRIG || (type >= 0 && type < (AirportType)NUM_AIRPORTS && AirportSpec::Get(type)->enabled);
} }
/* static */ Money ScriptAirport::GetPrice(AirportType type) /* static */ Money ScriptAirport::GetPrice(AirportType type)
@ -67,6 +67,7 @@
{ {
if (!IsAirportInformationAvailable(type)) return -1; if (!IsAirportInformationAvailable(type)) return -1;
if (type == AT_OILRIG && !_settings_game.station.serve_neutral_industries) return (uint)CA_NONE;
return _settings_game.station.modified_catchment ? ::AirportSpec::Get(type)->catchment : (uint)CA_UNMODIFIED; return _settings_game.station.modified_catchment ? ::AirportSpec::Get(type)->catchment : (uint)CA_UNMODIFIED;
} }
@ -96,9 +97,8 @@
if (!::IsTileType(tile, MP_STATION)) return -1; if (!::IsTileType(tile, MP_STATION)) return -1;
const Station *st = ::Station::GetByTile(tile); const Station *st = ::Station::GetByTile(tile);
if (st->owner != ScriptObject::GetCompany() && ScriptCompanyMode::IsValid()) return -1; if (st->owner != OWNER_NONE && st->owner != ScriptObject::GetCompany() && ScriptCompanyMode::IsValid()) return -1;
if (!st->facilities.Test(StationFacility::Airport)) return -1; if (!st->facilities.Test(StationFacility::Airport)) return -1;
return st->airport.GetNumHangars(); return st->airport.GetNumHangars();
} }
@ -110,7 +110,7 @@
if (GetNumHangars(tile) < 1) return INVALID_TILE; if (GetNumHangars(tile) < 1) return INVALID_TILE;
const Station *st = ::Station::GetByTile(tile); const Station *st = ::Station::GetByTile(tile);
if (st->owner != ScriptObject::GetCompany() && ScriptCompanyMode::IsValid()) return INVALID_TILE; if (st->owner != OWNER_NONE && st->owner != ScriptObject::GetCompany() && ScriptCompanyMode::IsValid()) return INVALID_TILE;
if (!st->facilities.Test(StationFacility::Airport)) return INVALID_TILE; if (!st->facilities.Test(StationFacility::Airport)) return INVALID_TILE;
return st->airport.GetHangarTile(0); return st->airport.GetHangarTile(0);
@ -143,7 +143,7 @@
return GetAirportNoiseLevelForDistance(as, dist); return GetAirportNoiseLevelForDistance(as, dist);
} }
return 1; return type == AT_OILRIG ? 0 : 1;
} }
/* static */ TownID ScriptAirport::GetNearestTown(TileIndex tile, AirportType type) /* static */ TownID ScriptAirport::GetNearestTown(TileIndex tile, AirportType type)

View File

@ -34,6 +34,7 @@ public:
AT_HELIPORT = ::AT_HELIPORT, ///< The heliport. AT_HELIPORT = ::AT_HELIPORT, ///< The heliport.
AT_HELISTATION = ::AT_HELISTATION, ///< The helistation. AT_HELISTATION = ::AT_HELISTATION, ///< The helistation.
AT_HELIDEPOT = ::AT_HELIDEPOT, ///< The helidepot. AT_HELIDEPOT = ::AT_HELIDEPOT, ///< The helidepot.
AT_OILRIG = ::AT_OILRIG, ///< The oil rig heliport.
AT_INVALID = ::AT_INVALID, ///< Invalid airport. AT_INVALID = ::AT_INVALID, ///< Invalid airport.
}; };

View File

@ -1036,9 +1036,8 @@ struct GameOptionsWindow : Window {
this->SetWidgetDisabledState(WID_GO_GUI_FONT_AA, _fcsettings.prefer_sprite); this->SetWidgetDisabledState(WID_GO_GUI_FONT_AA, _fcsettings.prefer_sprite);
this->SetDirty(); this->SetDirty();
InitFontCache(false); InitFontCache(FONTSIZES_ALL);
InitFontCache(true); ClearFontCache(FONTSIZES_ALL);
ClearFontCache();
CheckForMissingGlyphs(); CheckForMissingGlyphs();
SetupWidgetDimensions(); SetupWidgetDimensions();
UpdateAllVirtCoords(); UpdateAllVirtCoords();
@ -1051,7 +1050,7 @@ struct GameOptionsWindow : Window {
this->SetWidgetLoweredState(WID_GO_GUI_FONT_AA, _fcsettings.global_aa); this->SetWidgetLoweredState(WID_GO_GUI_FONT_AA, _fcsettings.global_aa);
MarkWholeScreenDirty(); MarkWholeScreenDirty();
ClearFontCache(); ClearFontCache(FONTSIZES_ALL);
break; break;
#endif /* HAS_TRUETYPE_FONT */ #endif /* HAS_TRUETYPE_FONT */

View File

@ -2278,7 +2278,7 @@ std::string_view GetCurrentLanguageIsoCode()
*/ */
bool MissingGlyphSearcher::FindMissingGlyphs() bool MissingGlyphSearcher::FindMissingGlyphs()
{ {
InitFontCache(this->Monospace()); InitFontCache(this->Monospace() ? FontSizes{FS_MONO} : FONTSIZES_REQUIRED);
this->Reset(); this->Reset();
for (auto text = this->NextString(); text.has_value(); text = this->NextString()) { for (auto text = this->NextString(); text.has_value(); text = this->NextString()) {
@ -2395,7 +2395,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
/* Our fallback font does miss characters too, so keep the /* Our fallback font does miss characters too, so keep the
* user chosen font as that is more likely to be any good than * user chosen font as that is more likely to be any good than
* the wild guess we made */ * the wild guess we made */
InitFontCache(searcher->Monospace()); InitFontCache(searcher->Monospace() ? FontSizes{FS_MONO} : FONTSIZES_REQUIRED);
} }
} }
#endif #endif
@ -2412,12 +2412,12 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
ShowErrorMessage(GetEncodedString(STR_JUST_RAW_STRING, std::move(err_str)), {}, WL_WARNING); ShowErrorMessage(GetEncodedString(STR_JUST_RAW_STRING, std::move(err_str)), {}, WL_WARNING);
/* Reset the font width */ /* Reset the font width */
LoadStringWidthTable(searcher->Monospace()); LoadStringWidthTable(searcher->Monospace() ? FontSizes{FS_MONO} : FONTSIZES_REQUIRED);
return; return;
} }
/* Update the font with cache */ /* Update the font with cache */
LoadStringWidthTable(searcher->Monospace()); LoadStringWidthTable(searcher->Monospace() ? FontSizes{FS_MONO} : FONTSIZES_REQUIRED);
#if !(defined(WITH_ICU_I18N) && defined(WITH_HARFBUZZ)) && !defined(WITH_UNISCRIBE) && !defined(WITH_COCOA) #if !(defined(WITH_ICU_I18N) && defined(WITH_HARFBUZZ)) && !defined(WITH_UNISCRIBE) && !defined(WITH_COCOA)
/* /*

View File

@ -359,6 +359,15 @@ static const std::initializer_list<AirportTileLayout> _tile_table_helistation =
{ _tile_table_helistation_0, DIR_N }, { _tile_table_helistation_0, DIR_N },
}; };
/** Tiles for oilrig */
static const std::initializer_list<AirportTileTable> _tile_table_oilrig_0 = {
MK(0, 0, APT_EMPTY),
};
static const std::initializer_list<AirportTileLayout> _tile_table_oilrig = {
{ _tile_table_oilrig_0, DIR_N, }
};
#undef MK #undef MK
/** General AirportSpec definition. */ /** General AirportSpec definition. */
@ -377,7 +386,7 @@ static const std::initializer_list<AirportTileLayout> _tile_table_helistation =
/* The helidepot and helistation have ATP_TTDP_SMALL because they are at ground level */ /* The helidepot and helistation have ATP_TTDP_SMALL because they are at ground level */
extern const AirportSpec _origin_airport_specs[] = { extern const AirportSpec _origin_airport_specs[] = {
AS(country, 4, 3, 0, 1959, 4, 3, 7, ATP_TTDP_SMALL, APC_SMALL, STR_AIRPORT_SMALL, SPR_AIRPORT_PREVIEW_SMALL), AS(country, 4, 3, CalendarTime::MIN_YEAR, 1959, 4, 3, 7, ATP_TTDP_SMALL, APC_SMALL, STR_AIRPORT_SMALL, SPR_AIRPORT_PREVIEW_SMALL),
AS(city, 6, 6, 1955, CalendarTime::MAX_YEAR, 5, 5, 24, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_CITY, SPR_AIRPORT_PREVIEW_LARGE), AS(city, 6, 6, 1955, CalendarTime::MAX_YEAR, 5, 5, 24, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_CITY, SPR_AIRPORT_PREVIEW_LARGE),
AS_ND(heliport, 1, 1, 1963, CalendarTime::MAX_YEAR, 4, 1, 4, ATP_TTDP_HELIPORT, APC_HELIPORT, STR_AIRPORT_HELIPORT, SPR_AIRPORT_PREVIEW_HELIPORT), AS_ND(heliport, 1, 1, 1963, CalendarTime::MAX_YEAR, 4, 1, 4, ATP_TTDP_HELIPORT, APC_HELIPORT, STR_AIRPORT_HELIPORT, SPR_AIRPORT_PREVIEW_HELIPORT),
AS(metropolitan, 6, 6, 1980, CalendarTime::MAX_YEAR, 6, 8, 28, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_METRO, SPR_AIRPORT_PREVIEW_METROPOLITAN), AS(metropolitan, 6, 6, 1980, CalendarTime::MAX_YEAR, 6, 8, 28, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_METRO, SPR_AIRPORT_PREVIEW_METROPOLITAN),
@ -386,7 +395,7 @@ extern const AirportSpec _origin_airport_specs[] = {
AS(helidepot, 2, 2, 1976, CalendarTime::MAX_YEAR, 4, 2, 7, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELIDEPOT, SPR_AIRPORT_PREVIEW_HELIDEPOT), AS(helidepot, 2, 2, 1976, CalendarTime::MAX_YEAR, 4, 2, 7, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELIDEPOT, SPR_AIRPORT_PREVIEW_HELIDEPOT),
AS(intercontinental, 9, 11, 2002, CalendarTime::MAX_YEAR, 10, 25, 72, ATP_TTDP_LARGE, APC_HUB, STR_AIRPORT_INTERCONTINENTAL, SPR_AIRPORT_PREVIEW_INTERCONTINENTAL), AS(intercontinental, 9, 11, 2002, CalendarTime::MAX_YEAR, 10, 25, 72, ATP_TTDP_LARGE, APC_HUB, STR_AIRPORT_INTERCONTINENTAL, SPR_AIRPORT_PREVIEW_INTERCONTINENTAL),
AS(helistation, 4, 2, 1980, CalendarTime::MAX_YEAR, 4, 3, 14, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELISTATION, SPR_AIRPORT_PREVIEW_HELISTATION), AS(helistation, 4, 2, 1980, CalendarTime::MAX_YEAR, 4, 3, 14, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELISTATION, SPR_AIRPORT_PREVIEW_HELISTATION),
AS_GENERIC(&_airportfta_oilrig, {}, {}, 1, 1, 0, 4, 0, 0, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, 0, false), AS_GENERIC(&_airportfta_oilrig, _tile_table_oilrig, {}, 1, 1, 0, 4, CalendarTime::MIN_YEAR, CalendarTime::MIN_YEAR, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, 0, false),
}; };
static_assert(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs)); static_assert(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));