Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
struct AirportFTAbuildup {
|
||||
byte position; ///< The position that an airplane is at.
|
||||
byte heading; ///< The current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.).
|
||||
uint64 block; ///< The block this position is on on the airport (st->airport.flags).
|
||||
uint64_t block; ///< The block this position is on on the airport (st->airport.flags).
|
||||
byte next; ///< Next position from this position.
|
||||
};
|
||||
|
||||
|
@@ -1032,16 +1032,16 @@ static const std::vector<IndustryTileLayout> _tile_table_sugar_mine {
|
||||
#undef MK
|
||||
|
||||
/** Array with saw sound, for sawmill */
|
||||
static const uint8 _sawmill_sounds[] = { SND_28_SAWMILL };
|
||||
static const uint8_t _sawmill_sounds[] = { SND_28_SAWMILL };
|
||||
|
||||
/** Array with whistle sound, for factory */
|
||||
static const uint8 _factory_sounds[] = { SND_03_FACTORY };
|
||||
static const uint8_t _factory_sounds[] = { SND_03_FACTORY };
|
||||
|
||||
/** Array with 3 animal sounds, for farms */
|
||||
static const uint8 _farm_sounds[] = { SND_24_FARM_1, SND_25_FARM_2, SND_26_FARM_3 };
|
||||
static const uint8_t _farm_sounds[] = { SND_24_FARM_1, SND_25_FARM_2, SND_26_FARM_3 };
|
||||
|
||||
/** Array with... hem... a sound of toyland */
|
||||
static const uint8 _plastic_mine_sounds[] = { SND_33_PLASTIC_MINE };
|
||||
static const uint8_t _plastic_mine_sounds[] = { SND_33_PLASTIC_MINE };
|
||||
|
||||
enum IndustryTypes {
|
||||
IT_COAL_MINE = 0,
|
||||
|
@@ -245,11 +245,11 @@ static const Direction PPPorder[DIAGDIR_END][TLG_END][DIR_END] = { // X -
|
||||
}
|
||||
};
|
||||
/* Geometric placement of the PCP relative to the tile origin */
|
||||
static const int8 x_pcp_offsets[DIAGDIR_END] = {0, 8, 16, 8};
|
||||
static const int8 y_pcp_offsets[DIAGDIR_END] = {8, 16, 8, 0};
|
||||
static const int8_t x_pcp_offsets[DIAGDIR_END] = {0, 8, 16, 8};
|
||||
static const int8_t y_pcp_offsets[DIAGDIR_END] = {8, 16, 8, 0};
|
||||
/* Geometric placement of the PPP relative to the PCP*/
|
||||
static const int8 x_ppp_offsets[DIR_END] = {-2, -4, -2, 0, 2, 4, 2, 0};
|
||||
static const int8 y_ppp_offsets[DIR_END] = {-2, 0, 2, 4, 2, 0, -2, -4};
|
||||
static const int8_t x_ppp_offsets[DIR_END] = {-2, -4, -2, 0, 2, 4, 2, 0};
|
||||
static const int8_t y_ppp_offsets[DIR_END] = {-2, 0, 2, 4, 2, 0, -2, -4};
|
||||
|
||||
/**
|
||||
* Offset for pylon sprites from the base pylon sprite.
|
||||
@@ -266,7 +266,7 @@ enum PylonSpriteOffset {
|
||||
};
|
||||
|
||||
/* The type of pylon to draw at each PPP */
|
||||
static const uint8 pylon_sprites[] = {
|
||||
static const uint8_t pylon_sprites[] = {
|
||||
PSO_EW_N,
|
||||
PSO_Y_NE,
|
||||
PSO_NS_E,
|
||||
@@ -315,13 +315,13 @@ enum WireSpriteOffset {
|
||||
};
|
||||
|
||||
struct SortableSpriteStruct {
|
||||
uint8 image_offset;
|
||||
int8 x_offset;
|
||||
int8 y_offset;
|
||||
int8 x_size;
|
||||
int8 y_size;
|
||||
int8 z_size;
|
||||
int8 z_offset;
|
||||
uint8_t image_offset;
|
||||
int8_t x_offset;
|
||||
int8_t y_offset;
|
||||
int8_t x_size;
|
||||
int8_t y_size;
|
||||
int8_t z_size;
|
||||
int8_t z_offset;
|
||||
};
|
||||
|
||||
/** Distance between wire and rail */
|
||||
|
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/** Height map colours for the green colour scheme, ordered by height. */
|
||||
static const uint32 _green_map_heights[] = {
|
||||
static const uint32_t _green_map_heights[] = {
|
||||
MKCOLOUR(0x59595958),
|
||||
MKCOLOUR(0x59595958),
|
||||
MKCOLOUR(0x59595959),
|
||||
@@ -129,7 +129,7 @@ static const uint32 _green_map_heights[] = {
|
||||
};
|
||||
|
||||
/** Height map colours for the dark green colour scheme, ordered by height. */
|
||||
static const uint32 _dark_green_map_heights[] = {
|
||||
static const uint32_t _dark_green_map_heights[] = {
|
||||
MKCOLOUR(0x60606060),
|
||||
MKCOLOUR(0x60606061),
|
||||
MKCOLOUR(0x60606160),
|
||||
@@ -232,7 +232,7 @@ static const uint32 _dark_green_map_heights[] = {
|
||||
};
|
||||
|
||||
/** Height map colours for the violet colour scheme, ordered by height. */
|
||||
static const uint32 _violet_map_heights[] = {
|
||||
static const uint32_t _violet_map_heights[] = {
|
||||
MKCOLOUR(0x80808080),
|
||||
MKCOLOUR(0x80808081),
|
||||
MKCOLOUR(0x80808180),
|
||||
|
@@ -76,7 +76,7 @@ class NIHVehicle : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return Vehicle::Get(index); }
|
||||
const void *GetSpec(uint index) const override { return Vehicle::Get(index)->GetEngine(); }
|
||||
void SetStringParameters(uint index) const override { this->SetSimpleStringParameters(STR_VEHICLE_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const override { return Vehicle::Get(index)->GetGRFID(); }
|
||||
uint32_t GetGRFID(uint index) const override { return Vehicle::Get(index)->GetGRFID(); }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -140,7 +140,7 @@ class NIHStation : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return GetStationSpec(index); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetStationSpec(index)->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetStationSpec(index)->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -205,7 +205,7 @@ class NIHHouse : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return HouseSpec::Get(GetHouseType(index)); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_TOWN_NAME, GetTownIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? HouseSpec::Get(GetHouseType(index))->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? HouseSpec::Get(GetHouseType(index))->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -255,7 +255,7 @@ class NIHIndustryTile : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return GetIndustryTileSpec(GetIndustryGfx(index)); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_INDUSTRY_NAME, GetIndustryIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustryTileSpec(GetIndustryGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustryTileSpec(GetIndustryGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -363,7 +363,7 @@ class NIHIndustry : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return Industry::Get(index); }
|
||||
const void *GetSpec(uint index) const override { return GetIndustrySpec(Industry::Get(index)->type); }
|
||||
void SetStringParameters(uint index) const override { this->SetSimpleStringParameters(STR_INDUSTRY_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -372,13 +372,13 @@ class NIHIndustry : public NIHelper {
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
|
||||
uint GetPSASize(uint index, uint32 grfid) const override { return cpp_lengthof(PersistentStorage, storage); }
|
||||
uint GetPSASize(uint index, uint32_t grfid) const override { return cpp_lengthof(PersistentStorage, storage); }
|
||||
|
||||
const int32 *GetPSAFirstPosition(uint index, uint32 grfid) const override
|
||||
const int32_t *GetPSAFirstPosition(uint index, uint32_t grfid) const override
|
||||
{
|
||||
const Industry *i = (const Industry *)this->GetInstance(index);
|
||||
if (i->psa == nullptr) return nullptr;
|
||||
return (int32 *)(&i->psa->storage);
|
||||
return (int32_t *)(&i->psa->storage);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -428,7 +428,7 @@ class NIHObject : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return Object::GetByTile(index); }
|
||||
const void *GetSpec(uint index) const override { return ObjectSpec::GetByTile(index); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT, INVALID_STRING_ID, index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -462,7 +462,7 @@ class NIHRailType : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return nullptr; }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE, INVALID_STRING_ID, index); }
|
||||
uint32 GetGRFID(uint index) const override { return 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -498,7 +498,7 @@ class NIHAirportTile : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return AirportTileSpec::Get(GetAirportGfx(index)); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? AirportTileSpec::Get(GetAirportGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? AirportTileSpec::Get(GetAirportGfx(index))->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -536,9 +536,9 @@ class NIHTown : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return Town::Get(index); }
|
||||
const void *GetSpec(uint index) const override { return nullptr; }
|
||||
void SetStringParameters(uint index) const override { this->SetSimpleStringParameters(STR_TOWN_NAME, index); }
|
||||
uint32 GetGRFID(uint index) const override { return 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return 0; }
|
||||
bool PSAWithParameter() const override { return true; }
|
||||
uint GetPSASize(uint index, uint32 grfid) const override { return cpp_lengthof(PersistentStorage, storage); }
|
||||
uint GetPSASize(uint index, uint32_t grfid) const override { return cpp_lengthof(PersistentStorage, storage); }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -546,7 +546,7 @@ class NIHTown : public NIHelper {
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, avail);
|
||||
}
|
||||
|
||||
const int32 *GetPSAFirstPosition(uint index, uint32 grfid) const override
|
||||
const int32_t *GetPSAFirstPosition(uint index, uint32_t grfid) const override
|
||||
{
|
||||
Town *t = Town::Get(index);
|
||||
|
||||
@@ -582,7 +582,7 @@ class NIHRoadType : public NIHelper {
|
||||
const void *GetInstance(uint index) const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return nullptr; }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE, INVALID_STRING_ID, index); }
|
||||
uint32 GetGRFID(uint index) const override { return 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, bool *avail) const override
|
||||
{
|
||||
@@ -647,9 +647,9 @@ class NIHRoadStop : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return GetRoadStopSpec(index); }
|
||||
void SetStringParameters(uint index) const override { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
|
||||
uint32 GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetRoadStopSpec(index)->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetRoadStopSpec(index)->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint32 param, bool *avail) const override
|
||||
uint Resolve(uint index, uint var, uint32_t param, bool *avail) const override
|
||||
{
|
||||
int view = GetRoadStopDir(index);
|
||||
if (IsDriveThroughStopTile(index)) view += 4;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/** @file object_land.h Sprites to use and how to display them for object tiles. */
|
||||
|
||||
#define TILE_SEQ_LINE(sz, img) { 0, 0, 0, 16, 16, sz, {img, PAL_NONE} },
|
||||
#define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
#define TILE_SEQ_END() { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
|
||||
static const DrawTileSeqStruct _object_nothing[] = {
|
||||
TILE_SEQ_END()
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/** @file road_land.h Sprite constructs for road depots. */
|
||||
|
||||
#define TILE_SEQ_LINE(img, pal, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 20, {img, pal} },
|
||||
#define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
#define TILE_SEQ_END() { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
|
||||
static const DrawTileSeqStruct _road_depot_NE[] = {
|
||||
TILE_SEQ_LINE(0x584 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 0, 15, 16, 1)
|
||||
|
@@ -36,7 +36,7 @@ static size_t ConvertLandscape(const char *value);
|
||||
*
|
||||
* The something part defines the type of variable to store. There are a
|
||||
* lot of types. Easy ones are:
|
||||
* - VAR: any number type, 'type' field specifies what number. eg int8 or uint32
|
||||
* - VAR: any number type, 'type' field specifies what number. eg int8_t or uint32
|
||||
* - BOOL: a boolean number type
|
||||
* - STR: a string or character. 'type' field specifies what string. Normal, string, or quoted
|
||||
* A bit more difficult to use are MMANY (meaning ManyOfMany) and OMANY (OneOfMany)
|
||||
|
@@ -8,9 +8,9 @@
|
||||
; company changes them, it changes for all players.
|
||||
|
||||
[pre-amble]
|
||||
static void UpdateAllServiceInterval(int32 new_value);
|
||||
static bool CanUpdateServiceInterval(VehicleType type, int32 &new_value);
|
||||
static void UpdateServiceInterval(VehicleType type, int32 new_value);
|
||||
static void UpdateAllServiceInterval(int32_t new_value);
|
||||
static bool CanUpdateServiceInterval(VehicleType type, int32_t &new_value);
|
||||
static void UpdateServiceInterval(VehicleType type, int32_t new_value);
|
||||
|
||||
static const SettingVariant _company_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -10,11 +10,11 @@
|
||||
[pre-amble]
|
||||
const std::array<std::string, GAME_DIFFICULTY_NUM> _old_diff_settings{"max_no_competitors", "competitor_start_time", "number_towns", "industry_density", "max_loan", "initial_interest", "vehicle_costs", "competitor_speed", "competitor_intelligence", "vehicle_breakdowns", "subsidy_multiplier", "construction_cost", "terrain_type", "quantity_sea_lakes", "economy", "line_reverse_mode", "disasters", "town_council_tolerance"};
|
||||
|
||||
uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8 _old_diff_level; ///< Old difficulty level from old savegames
|
||||
uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8_t _old_diff_level; ///< Old difficulty level from old savegames
|
||||
|
||||
static void DifficultyNoiseChange(int32 new_value);
|
||||
static void MaxNoAIsChange(int32 new_value);
|
||||
static void DifficultyNoiseChange(int32_t new_value);
|
||||
static void MaxNoAIsChange(int32_t new_value);
|
||||
|
||||
static const SettingVariant _difficulty_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -8,7 +8,7 @@
|
||||
; and in the savegame PATS chunk.
|
||||
|
||||
[pre-amble]
|
||||
static void TownFoundingChanged(int32 new_value);
|
||||
static void TownFoundingChanged(int32_t new_value);
|
||||
|
||||
static const SettingVariant _economy_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -11,16 +11,16 @@
|
||||
[pre-amble]
|
||||
static constexpr std::initializer_list<const char*> _roadsides{"left", "right"};
|
||||
|
||||
static void StationSpreadChanged(int32 new_value);
|
||||
static void UpdateConsists(int32 new_value);
|
||||
static void TrainAccelerationModelChanged(int32 new_value);
|
||||
static void RoadVehAccelerationModelChanged(int32 new_value);
|
||||
static void TrainSlopeSteepnessChanged(int32 new_value);
|
||||
static void RoadVehSlopeSteepnessChanged(int32 new_value);
|
||||
static bool CheckRoadSide(int32 &new_value);
|
||||
static bool CheckDynamicEngines(int32 &new_value);
|
||||
static void StationCatchmentChanged(int32 new_value);
|
||||
static void MaxVehiclesChanged(int32 new_value);
|
||||
static void StationSpreadChanged(int32_t new_value);
|
||||
static void UpdateConsists(int32_t new_value);
|
||||
static void TrainAccelerationModelChanged(int32_t new_value);
|
||||
static void RoadVehAccelerationModelChanged(int32_t new_value);
|
||||
static void TrainSlopeSteepnessChanged(int32_t new_value);
|
||||
static void RoadVehSlopeSteepnessChanged(int32_t new_value);
|
||||
static bool CheckRoadSide(int32_t &new_value);
|
||||
static bool CheckDynamicEngines(int32_t &new_value);
|
||||
static void StationCatchmentChanged(int32_t new_value);
|
||||
static void MaxVehiclesChanged(int32_t new_value);
|
||||
|
||||
static const SettingVariant _game_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -7,14 +7,14 @@
|
||||
; GUI settings as stored in the main configuration file ("openttd.cfg").
|
||||
|
||||
[pre-amble]
|
||||
static void v_PositionMainToolbar(int32 new_value);
|
||||
static void v_PositionStatusbar(int32 new_value);
|
||||
static void RedrawSmallmap(int32 new_value);
|
||||
static void UpdateLinkgraphColours(int32 new_value);
|
||||
static void InvalidateCompanyLiveryWindow(int32 new_value);
|
||||
static void InvalidateNewGRFChangeWindows(int32 new_value);
|
||||
static void ZoomMinMaxChanged(int32 new_value);
|
||||
static void SpriteZoomMinChanged(int32 new_value);
|
||||
static void v_PositionMainToolbar(int32_t new_value);
|
||||
static void v_PositionStatusbar(int32_t new_value);
|
||||
static void RedrawSmallmap(int32_t new_value);
|
||||
static void UpdateLinkgraphColours(int32_t new_value);
|
||||
static void InvalidateCompanyLiveryWindow(int32_t new_value);
|
||||
static void InvalidateNewGRFChangeWindows(int32_t new_value);
|
||||
static void ZoomMinMaxChanged(int32_t new_value);
|
||||
static void SpriteZoomMinChanged(int32_t new_value);
|
||||
|
||||
static constexpr std::initializer_list<const char*> _osk_activation{"disabled", "double", "single", "immediately"};
|
||||
static constexpr std::initializer_list<const char*> _savegame_date{"long", "short", "iso"};
|
||||
|
@@ -8,7 +8,7 @@
|
||||
; in the savegame PATS chunk. These settings are not sync'd over the network.
|
||||
|
||||
[pre-amble]
|
||||
uint8 _old_units; ///< Old units from old savegames
|
||||
uint8_t _old_units; ///< Old units from old savegames
|
||||
|
||||
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR"};
|
||||
static constexpr std::initializer_list<const char*> _locale_units{"imperial", "metric", "si", "gameunits"};
|
||||
|
@@ -8,7 +8,7 @@
|
||||
; and in the savegame PATS chunk.
|
||||
|
||||
[pre-amble]
|
||||
static void InvalidateShipPathCache(int32 new_value);
|
||||
static void InvalidateShipPathCache(int32_t new_value);
|
||||
|
||||
static const SettingVariant _pathfinding_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -10,9 +10,9 @@
|
||||
; basically construction and game_creation settings.
|
||||
|
||||
[pre-amble]
|
||||
static bool CheckMaxHeightLevel(int32 &new_value);
|
||||
static bool CheckFreeformEdges(int32 &new_value);
|
||||
static void UpdateFreeformEdges(int32 new_value);
|
||||
static bool CheckMaxHeightLevel(int32_t &new_value);
|
||||
static bool CheckFreeformEdges(int32_t &new_value);
|
||||
static void UpdateFreeformEdges(int32_t new_value);
|
||||
|
||||
static const SettingVariant _world_settings_table[] = {
|
||||
[post-amble]
|
||||
|
@@ -54,7 +54,7 @@ static const SpriteID SPR_LARGE_SMALL_WINDOW = 682;
|
||||
|
||||
/** Extra graphic spritenumbers */
|
||||
static const SpriteID SPR_OPENTTD_BASE = 4896;
|
||||
static const uint16 OPENTTD_SPRITE_COUNT = 191;
|
||||
static const uint16_t OPENTTD_SPRITE_COUNT = 191;
|
||||
|
||||
/* Halftile-selection sprites */
|
||||
static const SpriteID SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE;
|
||||
@@ -175,12 +175,12 @@ static const SpriteID SPR_PLAYER_HOST = SPR_OPENTTD_BASE + 190;
|
||||
static const SpriteID SPR_IMG_CARGOFLOW = SPR_OPENTTD_BASE + 174;
|
||||
|
||||
static const SpriteID SPR_SIGNALS_BASE = SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
||||
static const uint16 PRESIGNAL_SPRITE_COUNT = 48;
|
||||
static const uint16 PRESIGNAL_AND_SEMAPHORE_SPRITE_COUNT = 112;
|
||||
static const uint16 PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT = 240;
|
||||
static const uint16_t PRESIGNAL_SPRITE_COUNT = 48;
|
||||
static const uint16_t PRESIGNAL_AND_SEMAPHORE_SPRITE_COUNT = 112;
|
||||
static const uint16_t PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT = 240;
|
||||
|
||||
static const SpriteID SPR_CANALS_BASE = SPR_SIGNALS_BASE + PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT;
|
||||
static const uint16 CANALS_SPRITE_COUNT = 65;
|
||||
static const uint16_t CANALS_SPRITE_COUNT = 65;
|
||||
|
||||
/** Sprites for the Aqueduct. */
|
||||
static const SpriteID SPR_AQUEDUCT_BASE = SPR_CANALS_BASE + CANALS_SPRITE_COUNT;
|
||||
@@ -192,33 +192,33 @@ static const SpriteID SPR_AQUEDUCT_MIDDLE_X = SPR_AQUEDUCT_BASE + 4;
|
||||
static const SpriteID SPR_AQUEDUCT_MIDDLE_Y = SPR_AQUEDUCT_BASE + 5;
|
||||
static const SpriteID SPR_AQUEDUCT_PILLAR_X = SPR_AQUEDUCT_BASE + 6;
|
||||
static const SpriteID SPR_AQUEDUCT_PILLAR_Y = SPR_AQUEDUCT_BASE + 7;
|
||||
static const uint16 AQUEDUCT_SPRITE_COUNT = 8;
|
||||
static const uint16_t AQUEDUCT_SPRITE_COUNT = 8;
|
||||
|
||||
/** Sprites for 'highlighting' tracks on sloped land. */
|
||||
static const SpriteID SPR_TRACKS_FOR_SLOPES_BASE = SPR_AQUEDUCT_BASE + AQUEDUCT_SPRITE_COUNT;
|
||||
static const SpriteID SPR_TRACKS_FOR_SLOPES_RAIL_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 0;
|
||||
static const SpriteID SPR_TRACKS_FOR_SLOPES_MONO_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 4;
|
||||
static const SpriteID SPR_TRACKS_FOR_SLOPES_MAGLEV_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 8;
|
||||
static const uint16 TRACKS_FOR_SLOPES_SPRITE_COUNT = 12;
|
||||
static const uint16_t TRACKS_FOR_SLOPES_SPRITE_COUNT = 12;
|
||||
|
||||
static const SpriteID SPR_SLOPES_BASE = SPR_TRACKS_FOR_SLOPES_BASE + TRACKS_FOR_SLOPES_SPRITE_COUNT;
|
||||
static const SpriteID SPR_SLOPES_INCLINED_OFFSET = 15;
|
||||
static const SpriteID SPR_SLOPES_VIRTUAL_BASE = SPR_SLOPES_BASE - SPR_SLOPES_INCLINED_OFFSET; // The original foundations (see SPR_FOUNDATION_BASE below) are mapped before the additional foundations.
|
||||
static const SpriteID SPR_TRKFOUND_BLOCK_SIZE = 22; // The normal track foundation sprites are organized in blocks of 22.
|
||||
static const uint16 NORMAL_FOUNDATION_SPRITE_COUNT = 74;
|
||||
static const uint16_t NORMAL_FOUNDATION_SPRITE_COUNT = 74;
|
||||
/** Halftile foundations */
|
||||
static const SpriteID SPR_HALFTILE_FOUNDATION_BASE = SPR_SLOPES_BASE + NORMAL_FOUNDATION_SPRITE_COUNT;
|
||||
static const SpriteID SPR_HALFTILE_BLOCK_SIZE = 4; // The half tile foundation sprites are organized in blocks of 4.
|
||||
static const uint16 NORMAL_AND_HALFTILE_FOUNDATION_SPRITE_COUNT = 90;
|
||||
static const uint16_t NORMAL_AND_HALFTILE_FOUNDATION_SPRITE_COUNT = 90;
|
||||
|
||||
static const SpriteID SPR_AUTORAIL_BASE = SPR_HALFTILE_FOUNDATION_BASE + NORMAL_AND_HALFTILE_FOUNDATION_SPRITE_COUNT;
|
||||
static const uint16 AUTORAIL_SPRITE_COUNT = 55;
|
||||
static const uint16_t AUTORAIL_SPRITE_COUNT = 55;
|
||||
|
||||
static const SpriteID SPR_ELRAIL_BASE = SPR_AUTORAIL_BASE + AUTORAIL_SPRITE_COUNT;
|
||||
static const uint16 ELRAIL_SPRITE_COUNT = 48;
|
||||
static const uint16_t ELRAIL_SPRITE_COUNT = 48;
|
||||
|
||||
static const SpriteID SPR_2CCMAP_BASE = SPR_ELRAIL_BASE + ELRAIL_SPRITE_COUNT;
|
||||
static const uint16 TWOCCMAP_SPRITE_COUNT = 256;
|
||||
static const uint16_t TWOCCMAP_SPRITE_COUNT = 256;
|
||||
|
||||
/** shore tiles - action 05-0D */
|
||||
static const SpriteID SPR_SHORE_BASE = SPR_2CCMAP_BASE + TWOCCMAP_SPRITE_COUNT;
|
||||
@@ -242,7 +242,7 @@ static const SpriteID SPR_NEWHANGAR_E = SPR_AIRPORTX_BASE + 11;
|
||||
static const SpriteID SPR_NEWHELIPAD = SPR_AIRPORTX_BASE + 12;
|
||||
static const SpriteID SPR_GRASS_RIGHT = SPR_AIRPORTX_BASE + 13;
|
||||
static const SpriteID SPR_GRASS_LEFT = SPR_AIRPORTX_BASE + 14;
|
||||
static const uint16 AIRPORTX_SPRITE_COUNT = 15;
|
||||
static const uint16_t AIRPORTX_SPRITE_COUNT = 15;
|
||||
|
||||
/** Airport preview sprites */
|
||||
static const SpriteID SPR_AIRPORT_PREVIEW_BASE = SPR_AIRPORTX_BASE + AIRPORTX_SPRITE_COUNT;
|
||||
@@ -266,7 +266,7 @@ static const SpriteID SPR_TRUCK_STOP_DT_Y_W = SPR_ROADSTOP_BASE + 4;
|
||||
static const SpriteID SPR_TRUCK_STOP_DT_Y_E = SPR_ROADSTOP_BASE + 5;
|
||||
static const SpriteID SPR_TRUCK_STOP_DT_X_W = SPR_ROADSTOP_BASE + 6;
|
||||
static const SpriteID SPR_TRUCK_STOP_DT_X_E = SPR_ROADSTOP_BASE + 7;
|
||||
static const uint16 ROADSTOP_SPRITE_COUNT = 8;
|
||||
static const uint16_t ROADSTOP_SPRITE_COUNT = 8;
|
||||
|
||||
/** Tramway sprites */
|
||||
static const SpriteID SPR_TRAMWAY_BASE = SPR_ROADSTOP_BASE + ROADSTOP_SPRITE_COUNT;
|
||||
@@ -287,25 +287,25 @@ static const SpriteID SPR_TRAMWAY_FRONT_WIRES_SLOPED = SPR_TRAMWAY_BASE + 72;
|
||||
static const SpriteID SPR_TRAMWAY_TUNNEL_WIRES = SPR_TRAMWAY_BASE + 80;
|
||||
static const SpriteID SPR_TRAMWAY_BRIDGE = SPR_TRAMWAY_BASE + 107;
|
||||
static const SpriteID SPR_TRAMWAY_DEPOT_NO_TRACK = SPR_TRAMWAY_BASE + 113;
|
||||
static const uint16 TRAMWAY_SPRITE_COUNT = 119;
|
||||
static const uint16_t TRAMWAY_SPRITE_COUNT = 119;
|
||||
|
||||
/** One way road sprites */
|
||||
static const SpriteID SPR_ONEWAY_BASE = SPR_TRAMWAY_BASE + TRAMWAY_SPRITE_COUNT;
|
||||
static const SpriteID SPR_ONEWAY_SLOPE_N_OFFSET = 6;
|
||||
static const SpriteID SPR_ONEWAY_SLOPE_S_OFFSET = 12;
|
||||
static const uint16 ONEWAY_SPRITE_COUNT = 18;
|
||||
static const uint16_t ONEWAY_SPRITE_COUNT = 18;
|
||||
|
||||
/** Tunnel sprites with grass only for custom railtype tunnel. */
|
||||
static const SpriteID SPR_RAILTYPE_TUNNEL_BASE = SPR_ONEWAY_BASE + ONEWAY_SPRITE_COUNT;
|
||||
static const uint16 RAILTYPE_TUNNEL_BASE_COUNT = 16;
|
||||
static const uint16_t RAILTYPE_TUNNEL_BASE_COUNT = 16;
|
||||
|
||||
/* Not really a sprite, but an empty bounding box. Used to construct bounding boxes that help sorting the sprites, but do not have a sprite associated. */
|
||||
static const SpriteID SPR_EMPTY_BOUNDING_BOX = SPR_RAILTYPE_TUNNEL_BASE + RAILTYPE_TUNNEL_BASE_COUNT;
|
||||
static const uint16 EMPTY_BOUNDING_BOX_SPRITE_COUNT = 1;
|
||||
static const uint16_t EMPTY_BOUNDING_BOX_SPRITE_COUNT = 1;
|
||||
|
||||
/* Black palette sprite, needed for painting (fictive) tiles outside map */
|
||||
static const SpriteID SPR_PALETTE_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT;
|
||||
static const uint16 PALETTE_SPRITE_COUNT = 1;
|
||||
static const uint16_t PALETTE_SPRITE_COUNT = 1;
|
||||
|
||||
/* From where can we start putting NewGRFs? */
|
||||
static const SpriteID SPR_NEWGRFS_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT;
|
||||
|
@@ -39,7 +39,7 @@
|
||||
* @param img Sprite to draw
|
||||
* @param pal Palette sprite
|
||||
*/
|
||||
#define TILE_SEQ_CHILD(dx, dy, img, pal) TILE_SEQ_LINE_PAL(dx, dy, (int8)0x80, 0, 0, 0, img, pal)
|
||||
#define TILE_SEQ_CHILD(dx, dy, img, pal) TILE_SEQ_LINE_PAL(dx, dy, (int8_t)0x80, 0, 0, 0, img, pal)
|
||||
|
||||
/**
|
||||
* Constructor macro for additional ground sprites.
|
||||
@@ -52,7 +52,7 @@
|
||||
#define TILE_SEQ_GROUND(dx, dy, dz, img) TILE_SEQ_CHILD(2 * (dy - dx), dx + dy - dz, img, PAL_NONE)
|
||||
|
||||
/** Constructor macro for a terminating DrawTileSeqStruct entry in an array */
|
||||
#define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
#define TILE_SEQ_END() { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
|
||||
static const DrawTileSeqStruct _station_display_nothing[] = {
|
||||
TILE_SEQ_END()
|
||||
|
@@ -24,8 +24,8 @@ struct CmdStruct {
|
||||
const char *cmd;
|
||||
ParseCmdProc proc;
|
||||
long value;
|
||||
uint8 consumes;
|
||||
int8 default_plural_offset;
|
||||
uint8_t consumes;
|
||||
int8_t default_plural_offset;
|
||||
CmdFlags flags;
|
||||
};
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/** @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} },
|
||||
#define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
#define TILE_SEQ_END() { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
|
||||
|
||||
static const DrawTileSeqStruct _depot_gfx_NE[] = {
|
||||
|
@@ -14,8 +14,8 @@ static const byte _tree_base_by_landscape[4] = {0, 12, 20, 32};
|
||||
static const byte _tree_count_by_landscape[4] = {12, 8, 12, 9};
|
||||
|
||||
struct TreePos {
|
||||
uint8 x;
|
||||
uint8 y;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
};
|
||||
|
||||
static const TreePos _tree_layout_xy[][4] = {
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/** @file unicode.h Character mapping for using Unicode characters in OTTD. */
|
||||
|
||||
struct DefaultUnicodeMapping {
|
||||
WChar code; ///< Unicode value
|
||||
char32_t code; ///< Unicode value
|
||||
byte key; ///< Character index of sprite
|
||||
};
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#define TILE_SEQ_LINE(dx, dy, dz, sx, sy, sz, img) { dx, dy, dz, sx, sy, sz, {img, PAL_NONE} },
|
||||
|
||||
/** Constructor macro for a terminating DrawTileSeqStruct entry in an array */
|
||||
#define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
#define TILE_SEQ_END() { (int8_t)0x80, 0, 0, 0, 0, 0, {0, 0} }
|
||||
|
||||
/**
|
||||
* Constructor macro of a DrawTileSprites structure
|
||||
|
Reference in New Issue
Block a user