@@ -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),
|
||||
|
@@ -48,7 +48,7 @@ static uint GetTownInspectWindowNumber(const Town *town)
|
||||
return GetInspectWindowNumber(GSF_FAKE_TOWNS, town->index);
|
||||
}
|
||||
|
||||
static bool IsLabelPrintable(uint32 l)
|
||||
static bool IsLabelPrintable(uint32_t l)
|
||||
{
|
||||
for (uint i = 0; i < 4; i++) {
|
||||
if ((l & 0xFF) < 0x20 || (l & 0xFF) > 0x7F) return false;
|
||||
@@ -58,7 +58,7 @@ static bool IsLabelPrintable(uint32 l)
|
||||
}
|
||||
|
||||
struct label_dumper {
|
||||
inline const char *Label(uint32 label)
|
||||
inline const char *Label(uint32_t label)
|
||||
{
|
||||
if (IsLabelPrintable(label)) {
|
||||
seprintf(this->buffer, lastof(this->buffer), "%c%c%c%c", label >> 24, label >> 16, label >> 8, label);
|
||||
@@ -169,7 +169,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, Vehicle::Get(index)->First()->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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -404,7 +404,7 @@ class NIHVehicle : public NIHelper {
|
||||
break;
|
||||
case TRLIT_SPEED_ADAPTATION: {
|
||||
TileIndex tile = item.data_id;
|
||||
uint16 td = item.data_aux;
|
||||
uint16_t td = item.data_aux;
|
||||
b += seprintf(b, lastof(buffer), "speed adaptation: tile: %X, trackdir: %X", tile, td);
|
||||
if (item.end + 1 < l.reservation_end_position) {
|
||||
b += seprintf(b, lastof(buffer), " --> %u", GetLowestSpeedTrainAdaptationSpeedAtSignal(tile, td));
|
||||
@@ -518,7 +518,7 @@ class NIHVehicle : public NIHelper {
|
||||
seprintf(buffer, lastof(buffer), " Callbacks: 0x%X, CB36 Properties: 0x" OTTD_PRINTFHEX64,
|
||||
e->callbacks_used, e->cb36_properties_used);
|
||||
output.print(buffer);
|
||||
uint64 cb36_properties = e->cb36_properties_used;
|
||||
uint64_t cb36_properties = e->cb36_properties_used;
|
||||
if (!e->sprite_group_cb36_properties_used.empty()) {
|
||||
const SpriteGroup *root_spritegroup = nullptr;
|
||||
if (v->IsGroundVehicle()) root_spritegroup = GetWagonOverrideSpriteSet(v->engine_type, v->cargo_type, v->GetGroundVehicleCache()->first_engine);
|
||||
@@ -535,11 +535,11 @@ class NIHVehicle : public NIHelper {
|
||||
}
|
||||
}
|
||||
if (cb36_properties != UINT64_MAX) {
|
||||
uint64 props = cb36_properties;
|
||||
uint64_t props = cb36_properties;
|
||||
while (props) {
|
||||
PropertyID prop = (PropertyID)FindFirstBit(props);
|
||||
props = KillFirstBit(props);
|
||||
uint16 res = GetVehicleProperty(v, prop, CALLBACK_FAILED);
|
||||
uint16_t res = GetVehicleProperty(v, prop, CALLBACK_FAILED);
|
||||
if (res == CALLBACK_FAILED) {
|
||||
seprintf(buffer, lastof(buffer), " CB36: 0x%X --> FAILED", prop);
|
||||
} else {
|
||||
@@ -723,7 +723,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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -761,7 +761,7 @@ class NIHStation : public NIHelper {
|
||||
}
|
||||
seprintf(b, lastof(buffer), ", register flags: %X", reg->flags);
|
||||
output.print(buffer);
|
||||
auto log_reg = [&](TileLayoutFlags flag, const char *name, uint8 flag_reg) {
|
||||
auto log_reg = [&](TileLayoutFlags flag, const char *name, uint8_t flag_reg) {
|
||||
if (reg->flags & flag) {
|
||||
seprintf(buffer, lastof(buffer), " %s reg: %X", name, flag_reg);
|
||||
output.print(buffer);
|
||||
@@ -877,7 +877,7 @@ class NIHHouse : public NIHelper {
|
||||
const void *GetInstance(uint)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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -966,7 +966,7 @@ class NIHIndustryTile : public NIHelper {
|
||||
const void *GetInstance(uint)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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1099,7 +1099,7 @@ class NIHIndustry : public NIHelper {
|
||||
bool ShowSpriteDumpButton(uint index) const override { return true; }
|
||||
uint GetParent(uint index) const override { return HasBit(index, 26) ? UINT32_MAX : GetTownInspectWindowNumber(Industry::Get(index)->town); }
|
||||
const void *GetInstance(uint index)const override { return HasBit(index, 26) ? nullptr : Industry::Get(index); }
|
||||
uint32 GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? ((const IndustrySpec *)this->GetSpec(index))->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? ((const IndustrySpec *)this->GetSpec(index))->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
bool ShowExtraInfoOnly(uint index) const override
|
||||
{
|
||||
@@ -1138,16 +1138,16 @@ class NIHIndustry : public NIHelper {
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
std::vector<uint32> GetPSAGRFIDs(uint index) const override
|
||||
std::vector<uint32_t> GetPSAGRFIDs(uint index) const override
|
||||
{
|
||||
return { 0 };
|
||||
}
|
||||
@@ -1261,7 +1261,7 @@ class NIHCargo : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return nullptr; }
|
||||
const void *GetSpec(uint index) const override { return CargoSpec::Get(index); }
|
||||
void SetStringParameters(uint index) const override { SetDParam(0, CargoSpec::Get(index)->name); }
|
||||
uint32 GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? CargoSpec::Get(index)->grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? CargoSpec::Get(index)->grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1300,7 +1300,7 @@ class NIHCargo : public NIHelper {
|
||||
seprintf(buffer, lastof(buffer), " Weight: %u, Capacity multiplier: %u", spec->weight, spec->multiplier);
|
||||
output.print(buffer);
|
||||
seprintf(buffer, lastof(buffer), " Initial payment: %d, Current payment: " OTTD_PRINTF64 ", Transit periods: (%u, %u)",
|
||||
spec->initial_payment, (int64)spec->current_payment, spec->transit_periods[0], spec->transit_periods[1]);
|
||||
spec->initial_payment, (int64_t)spec->current_payment, spec->transit_periods[0], spec->transit_periods[1]);
|
||||
output.print(buffer);
|
||||
seprintf(buffer, lastof(buffer), " Freight: %s, Town effect: %u", spec->is_freight ? "yes" : "no", spec->town_effect);
|
||||
output.print(buffer);
|
||||
@@ -1376,13 +1376,13 @@ class NIHSignals : 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_SIGNALS, 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, GetVariableExtra *extra) const override
|
||||
{
|
||||
extern TraceRestrictProgram *GetFirstTraceRestrictProgramOnTile(TileIndex t);
|
||||
CustomSignalSpriteContext ctx = CSSC_TRACK;
|
||||
uint8 style = 0;
|
||||
uint8_t style = 0;
|
||||
uint z = 0;
|
||||
if (IsTunnelBridgeWithSignalSimulation(index)) {
|
||||
ctx = IsTunnelBridgeSignalSimulationEntrance(index) ? CSSC_TUNNEL_BRIDGE_ENTRANCE : CSSC_TUNNEL_BRIDGE_EXIT;
|
||||
@@ -1510,7 +1510,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->ShowExtraInfoOnly(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
|
||||
uint32_t GetGRFID(uint index) const override { return (!this->ShowExtraInfoOnly(index)) ? ObjectSpec::GetByTile(index)->grf_prop.grffile->grfid : 0; }
|
||||
|
||||
uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1621,14 +1621,14 @@ static const NIVariable _niv_railtypes[] = {
|
||||
NIV_END()
|
||||
};
|
||||
|
||||
static void PrintTypeLabels(char *buffer, const char *last, const char *prefix, uint32 label, const uint32 *alternate_labels, size_t alternate_labels_count, std::function<void(const char *)> &print)
|
||||
static void PrintTypeLabels(char *buffer, const char *last, const char *prefix, uint32_t label, const uint32_t *alternate_labels, size_t alternate_labels_count, std::function<void(const char *)> &print)
|
||||
{
|
||||
if (alternate_labels_count > 0) {
|
||||
char *b = buffer;
|
||||
b += seprintf(b, last, "%sAlternate labels: ", prefix);
|
||||
for (size_t i = 0; i < alternate_labels_count; i++) {
|
||||
if (i != 0) b += seprintf(b, last, ", ");
|
||||
uint32 l = alternate_labels[i];
|
||||
uint32_t l = alternate_labels[i];
|
||||
b += seprintf(b, last, "%s", label_dumper().Label(l));
|
||||
}
|
||||
print(buffer);
|
||||
@@ -1642,7 +1642,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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1693,7 +1693,7 @@ class NIHRailType : public NIHelper {
|
||||
dump_railtypes("Compatible", info->compatible_railtypes, RAILTYPES_NONE);
|
||||
dump_railtypes("All compatible", info->all_compatible_railtypes, ~info->compatible_railtypes);
|
||||
|
||||
PrintTypeLabels(buffer, lastof(buffer), " ", info->label, (const uint32*) info->alternate_labels.data(), info->alternate_labels.size(), output.print);
|
||||
PrintTypeLabels(buffer, lastof(buffer), " ", info->label, (const uint32_t*) info->alternate_labels.data(), info->alternate_labels.size(), output.print);
|
||||
seprintf(buffer, lastof(buffer), " Cost multiplier: %u/8, Maintenance multiplier: %u/8", info->cost_multiplier, info->maintenance_multiplier);
|
||||
output.print(buffer);
|
||||
|
||||
@@ -1791,7 +1791,7 @@ class NIHAirportTile : public NIHelper {
|
||||
const void *GetInstance(uint)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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1902,9 +1902,9 @@ class NIHTown : public NIHelper {
|
||||
const void *GetInstance(uint index)const override { return Town::Get(index); }
|
||||
const void *GetSpec(uint) 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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -1912,7 +1912,7 @@ class NIHTown : public NIHelper {
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -1923,11 +1923,11 @@ class NIHTown : public NIHelper {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual std::vector<uint32> GetPSAGRFIDs(uint index) const override
|
||||
virtual std::vector<uint32_t> GetPSAGRFIDs(uint index) const override
|
||||
{
|
||||
Town *t = Town::Get(index);
|
||||
|
||||
std::vector<uint32> output;
|
||||
std::vector<uint32_t> output;
|
||||
for (const auto &iter : t->psa_list) {
|
||||
output.push_back(iter->grfid);
|
||||
}
|
||||
@@ -1958,7 +1958,7 @@ class NIHTown : public NIHelper {
|
||||
|
||||
if (t->have_ratings != 0) {
|
||||
output.print(" Company ratings:");
|
||||
for (uint8 bit : SetBitIterator(t->have_ratings)) {
|
||||
for (uint8_t bit : SetBitIterator(t->have_ratings)) {
|
||||
seprintf(buffer, lastof(buffer), " %u: %d", bit, t->ratings[bit]);
|
||||
output.print(buffer);
|
||||
}
|
||||
@@ -1996,7 +1996,7 @@ class NIHStationStruct : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -2142,7 +2142,7 @@ class NIHTraceRestrict : public NIHelper {
|
||||
SetDParam(2, GetTraceRestrictRefIdTrack(static_cast<TraceRestrictRefId>(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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -2199,7 +2199,7 @@ class NIHTraceRestrict : public NIHelper {
|
||||
seprintf(buffer, lastof(buffer), "Ref count: %u", prog->refcount);
|
||||
output.print(buffer);
|
||||
const TraceRestrictRefId *refs = prog->GetRefIdsPtr();
|
||||
for (uint32 i = 0; i < prog->refcount; i++) {
|
||||
for (uint32_t i = 0; i < prog->refcount; i++) {
|
||||
TileIndex tile = GetTraceRestrictRefIdTileIndex(refs[i]);
|
||||
seprintf(buffer, lastof(buffer), " %X x %X, track: %X", TileX(tile), TileY(tile), GetTraceRestrictRefIdTrack(refs[i]));
|
||||
output.print(buffer);
|
||||
@@ -2248,7 +2248,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_ROAD_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, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -2291,7 +2291,7 @@ class NIHRoadType : public NIHelper {
|
||||
if (output.flags & (1 << rtt)) {
|
||||
DumpRoadTypeList(output, " ", rti->powered_roadtypes);
|
||||
}
|
||||
PrintTypeLabels(buffer, lastof(buffer), " ", rti->label, (const uint32*) rti->alternate_labels.data(), rti->alternate_labels.size(), output.print);
|
||||
PrintTypeLabels(buffer, lastof(buffer), " ", rti->label, (const uint32_t*) rti->alternate_labels.data(), rti->alternate_labels.size(), output.print);
|
||||
seprintf(buffer, lastof(buffer), " Cost multiplier: %u/8, Maintenance multiplier: %u/8", rti->cost_multiplier, rti->maintenance_multiplier);
|
||||
output.print(buffer);
|
||||
};
|
||||
@@ -2382,7 +2382,7 @@ 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, uint param, GetVariableExtra *extra) const override
|
||||
{
|
||||
@@ -2452,7 +2452,7 @@ class NIHNewLandscape : 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_LAI_CLEAR_DESCRIPTION_ROCKS, 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, GetVariableExtra *extra) const override
|
||||
{
|
||||
|
@@ -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)
|
||||
|
@@ -11,7 +11,7 @@
|
||||
static size_t ConvertLandscape(const char *value);
|
||||
|
||||
/* Callback function used in _settings[] as well as _gui_settings[] */
|
||||
static void UpdateTimeSettings(int32 new_value);
|
||||
static void UpdateTimeSettings(int32_t new_value);
|
||||
|
||||
/* Callback function used for various settings */
|
||||
static bool CheckTTDPatchSettingFlag(uint flag);
|
||||
@@ -42,7 +42,7 @@ static bool CheckTTDPatchSettingFlag(uint flag);
|
||||
*
|
||||
* 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_t
|
||||
* - 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)
|
||||
|
@@ -10,15 +10,15 @@
|
||||
[pre-amble]
|
||||
static const uint GAME_DIFFICULTY_NUM = 18;
|
||||
static 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"};
|
||||
static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8 _old_diff_level; ///< Old difficulty level from old savegames
|
||||
static uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8_t _old_diff_level; ///< Old difficulty level from old savegames
|
||||
|
||||
static void DifficultyNoiseChange(int32_t new_value);
|
||||
static void MaxNoAIsChange(int32_t new_value);
|
||||
static bool TownCouncilToleranceAdjust(int32 &new_value);
|
||||
static void DifficultyMoneyCheatMultiplayerChange(int32 new_value);
|
||||
static void DifficultyRenameTownsMultiplayerChange(int32 new_value);
|
||||
static void DifficultyOverrideTownSettingsMultiplayerChange(int32 new_value);
|
||||
static bool TownCouncilToleranceAdjust(int32_t &new_value);
|
||||
static void DifficultyMoneyCheatMultiplayerChange(int32_t new_value);
|
||||
static void DifficultyRenameTownsMultiplayerChange(int32_t new_value);
|
||||
static void DifficultyOverrideTownSettingsMultiplayerChange(int32_t new_value);
|
||||
|
||||
static const SettingDescEnumEntry _town_council_approval[] = {
|
||||
{ 0, STR_CITY_APPROVAL_LENIENT },
|
||||
|
@@ -9,16 +9,16 @@
|
||||
|
||||
[pre-amble]
|
||||
static void TownFoundingChanged(int32_t new_value);
|
||||
static void InvalidateCompanyWindow(int32 new_value);
|
||||
static bool DayLengthPreChange(int32 &new_value);
|
||||
static void DayLengthChanged(int32 new_value);
|
||||
static bool CheckSharingRail(int32 &new_value);
|
||||
static void SharingRailChanged(int32 new_value);
|
||||
static bool CheckSharingRoad(int32 &new_value);
|
||||
static bool CheckSharingWater(int32 &new_value);
|
||||
static bool CheckSharingAir(int32 &new_value);
|
||||
static void TownZoneModeChanged(int32 new_value);
|
||||
static void TownZoneCustomValueChanged(int32 new_value);
|
||||
static void InvalidateCompanyWindow(int32_t new_value);
|
||||
static bool DayLengthPreChange(int32_t &new_value);
|
||||
static void DayLengthChanged(int32_t new_value);
|
||||
static bool CheckSharingRail(int32_t &new_value);
|
||||
static void SharingRailChanged(int32_t new_value);
|
||||
static bool CheckSharingRoad(int32_t &new_value);
|
||||
static bool CheckSharingWater(int32_t &new_value);
|
||||
static bool CheckSharingAir(int32_t &new_value);
|
||||
static void TownZoneModeChanged(int32_t new_value);
|
||||
static void TownZoneCustomValueChanged(int32_t new_value);
|
||||
|
||||
static bool OrderTownGrowthRate(SettingOnGuiCtrlData &data);
|
||||
|
||||
@@ -71,7 +71,7 @@ from = SLV_113
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS
|
||||
strhelp = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x62); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x62); }
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.found_town
|
||||
@@ -242,7 +242,7 @@ def = false
|
||||
str = STR_CONFIG_SETTING_INFLATION
|
||||
strhelp = STR_CONFIG_SETTING_INFLATION_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x81); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x81); }
|
||||
|
||||
[SDT_BOOL]
|
||||
var = economy.inflation_fixed_dates
|
||||
|
@@ -14,18 +14,18 @@ static constexpr std::initializer_list<const char*> _roadsides{"left", "right"};
|
||||
static void StationSpreadChanged(int32_t new_value);
|
||||
static void UpdateConsists(int32_t new_value);
|
||||
static void TrainAccelerationModelChanged(int32_t new_value);
|
||||
static bool CheckTrainBrakingModelChange(int32 &new_value);
|
||||
static void TrainBrakingModelChanged(int32 new_value);
|
||||
static bool CheckTrainBrakingModelChange(int32_t &new_value);
|
||||
static void TrainBrakingModelChanged(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 void RoadSideChanged(int32 new_value);
|
||||
static void RoadSideChanged(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 void ImprovedBreakdownsSettingChanged(int32 new_value);
|
||||
static void TrainSpeedAdaptationChanged(int32 new_value);
|
||||
static void ImprovedBreakdownsSettingChanged(int32_t new_value);
|
||||
static void TrainSpeedAdaptationChanged(int32_t new_value);
|
||||
|
||||
static const SettingDescEnumEntry _train_braking_model[] = {
|
||||
{ TBM_ORIGINAL, STR_CONFIG_SETTING_ORIGINAL },
|
||||
@@ -171,7 +171,7 @@ var = station.never_expire_airports
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS
|
||||
strhelp = STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x0C); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x0C); }
|
||||
|
||||
[SDT_VAR]
|
||||
var = station.station_spread
|
||||
@@ -508,7 +508,7 @@ var = vehicle.wagon_speed_limits
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_WAGONSPEEDLIMITS
|
||||
strhelp = STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x5D); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x5D); }
|
||||
post_cb = UpdateConsists
|
||||
|
||||
[SDT_BOOL]
|
||||
@@ -551,7 +551,7 @@ interval = 1
|
||||
str = STR_CONFIG_SETTING_FREIGHT_TRAINS
|
||||
strhelp = STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT
|
||||
strval = STR_JUST_COMMA
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x58); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x58); }
|
||||
post_cb = UpdateConsists
|
||||
|
||||
[SDT_VAR]
|
||||
|
@@ -15,16 +15,16 @@ 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 void AutosaveModeChanged(int32 new_value);
|
||||
static void ViewportMapShowTunnelModeChanged(int32 new_value);
|
||||
static void ViewportMapLandscapeModeChanged(int32 new_value);
|
||||
static void ChangeTimetableInTicksMode(int32 new_value);
|
||||
static void InvalidateVehTimetableWindow(int32 new_value);
|
||||
static void ChangeTimeOverrideMode(int32 new_value);
|
||||
static void ProgrammableSignalsShownChanged(int32 new_value);
|
||||
static void EnableSingleVehSharedOrderGuiChanged(int32 new_value);
|
||||
static void ChangeTrackTypeSortMode(int32 new_value);
|
||||
static void DeveloperModeChanged(int32 new_value);
|
||||
static void AutosaveModeChanged(int32_t new_value);
|
||||
static void ViewportMapShowTunnelModeChanged(int32_t new_value);
|
||||
static void ViewportMapLandscapeModeChanged(int32_t new_value);
|
||||
static void ChangeTimetableInTicksMode(int32_t new_value);
|
||||
static void InvalidateVehTimetableWindow(int32_t new_value);
|
||||
static void ChangeTimeOverrideMode(int32_t new_value);
|
||||
static void ProgrammableSignalsShownChanged(int32_t new_value);
|
||||
static void EnableSingleVehSharedOrderGuiChanged(int32_t new_value);
|
||||
static void ChangeTrackTypeSortMode(int32_t new_value);
|
||||
static void DeveloperModeChanged(int32_t new_value);
|
||||
|
||||
/* Begin - GUI callbacks */
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
[pre-amble]
|
||||
|
||||
static int64 LinkGraphDistModeXrefChillPP(int64 val);
|
||||
static int64_t LinkGraphDistModeXrefChillPP(int64_t val);
|
||||
static bool LinkGraphDistributionSettingGUI(SettingOnGuiCtrlData &data);
|
||||
|
||||
static const SettingDescEnumEntry _linkgraph_mode_symmetric[] = {
|
||||
@@ -97,7 +97,7 @@ strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME_HELPTEXT
|
||||
[SDT_NAMED_NULL]
|
||||
name = ""linkgraph.recalc_not_scaled_by_daylength""
|
||||
length = 1
|
||||
extver = SlXvFeatureTest([](uint16 version, bool version_in_range, const std::array<uint16, XSLFI_SIZE> &feature_versions) -> bool { return version_in_range && SlXvIsFeaturePresent(feature_versions, XSLFI_LINKGRAPH_DAY_SCALE, 1, 1) && !SlXvIsFeaturePresent(feature_versions, XSLFI_JOKERPP); })
|
||||
extver = SlXvFeatureTest([](uint16_t version, bool version_in_range, const std::array<uint16_t, XSLFI_SIZE> &feature_versions) -> bool { return version_in_range && SlXvIsFeaturePresent(feature_versions, XSLFI_LINKGRAPH_DAY_SCALE, 1, 1) && !SlXvIsFeaturePresent(feature_versions, XSLFI_JOKERPP); })
|
||||
patxname = ""linkgraph_day_scale.linkgraph.recalc_not_scaled_by_daylength""
|
||||
|
||||
[SDT_ENUM]
|
||||
|
@@ -15,7 +15,7 @@ static constexpr std::initializer_list<const char*> _locale_units{"imperial", "m
|
||||
|
||||
static_assert(_locale_currencies.size() == CURRENCY_END);
|
||||
|
||||
static void VelocityUnitsChanged(int32 new_value);
|
||||
static void VelocityUnitsChanged(int32_t new_value);
|
||||
|
||||
static const SettingTable _locale_settings{
|
||||
[post-amble]
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
[pre-amble]
|
||||
static void InvalidateShipPathCache(int32_t new_value);
|
||||
static void CheckYapfRailSignalPenalties(int32 new_value);
|
||||
static void CheckYapfRailSignalPenalties(int32_t new_value);
|
||||
|
||||
static const SettingTable _pathfinding_settings{
|
||||
[post-amble]
|
||||
|
@@ -10,9 +10,9 @@
|
||||
[pre-amble]
|
||||
static constexpr std::initializer_list<const char*> _settings_profiles{"easy", "medium", "hard"};
|
||||
|
||||
static void ScriptMaxOpsChange(int32 new_value);
|
||||
static bool CheckScriptMaxMemoryChange(int32 &new_value);
|
||||
static void ScriptMaxMemoryChange(int32 new_value);
|
||||
static void ScriptMaxOpsChange(int32_t new_value);
|
||||
static bool CheckScriptMaxMemoryChange(int32_t &new_value);
|
||||
static void ScriptMaxMemoryChange(int32_t new_value);
|
||||
|
||||
const SettingTable _script_settings = {
|
||||
[post-amble]
|
||||
|
@@ -14,9 +14,9 @@ static bool CheckMaxHeightLevel(int32_t &new_value);
|
||||
static bool CheckFreeformEdges(int32_t &new_value);
|
||||
static void UpdateFreeformEdges(int32_t new_value);
|
||||
static bool CheckMapEdgeMode(int32_t &new_value);
|
||||
static void ClimateThresholdModeChanged(int32 new_value);
|
||||
static void PublicRoadsSettingChange(int32 new_value);
|
||||
static void MarkAllViewportsDirty(int32 new_value);
|
||||
static void ClimateThresholdModeChanged(int32_t new_value);
|
||||
static void PublicRoadsSettingChange(int32_t new_value);
|
||||
static void MarkAllViewportsDirty(int32_t new_value);
|
||||
|
||||
static bool AllowRoadStopsUnderBridgesSettingGUI(SettingOnGuiCtrlData &data);
|
||||
static bool TreePlacerSettingGUI(SettingOnGuiCtrlData &data);
|
||||
@@ -678,7 +678,7 @@ interval = 1
|
||||
str = STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH
|
||||
strhelp = STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_TILE_LENGTH
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x0F); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x0F); }
|
||||
|
||||
[SDT_VAR]
|
||||
var = construction.max_bridge_height
|
||||
@@ -740,7 +740,7 @@ max = 2
|
||||
str = STR_CONFIG_SETTING_SIGNALSIDE
|
||||
strhelp = STR_CONFIG_SETTING_SIGNALSIDE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SIGNALSIDE_LEFT
|
||||
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x3B); }
|
||||
pre_cb = [](int32_t &new_value) -> bool { return CheckTTDPatchSettingFlag(0x3B); }
|
||||
post_cb = [](auto) { MarkWholeScreenDirty(); }
|
||||
cat = SC_BASIC
|
||||
|
||||
|
@@ -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,39 +287,39 @@ 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;
|
||||
|
||||
/* Programmable pre-signal sprites */
|
||||
static const SpriteID SPR_PROGSIGNAL_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT;
|
||||
static const uint16 PROGSIGNAL_SPRITE_COUNT = 32;
|
||||
static const uint16_t PROGSIGNAL_SPRITE_COUNT = 32;
|
||||
static const SpriteID SPR_DUP_PROGSIGNAL_BASE = SPR_PROGSIGNAL_BASE + PROGSIGNAL_SPRITE_COUNT;
|
||||
|
||||
/* Extra signal sprites */
|
||||
static const SpriteID SPR_EXTRASIGNAL_BASE = SPR_DUP_PROGSIGNAL_BASE + PROGSIGNAL_SPRITE_COUNT;
|
||||
static const uint16 EXTRASIGNAL_SPRITE_COUNT = 16;
|
||||
static const uint16_t EXTRASIGNAL_SPRITE_COUNT = 16;
|
||||
static const SpriteID SPR_DUP_EXTRASIGNAL_BASE = SPR_EXTRASIGNAL_BASE + EXTRASIGNAL_SPRITE_COUNT;
|
||||
|
||||
/* Zoning sprites */
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_BASE = SPR_DUP_EXTRASIGNAL_BASE + EXTRASIGNAL_SPRITE_COUNT;
|
||||
static const uint16 ZONING_INNER_HIGHLIGHT_SPRITE_COUNT = 32;
|
||||
static const uint16_t ZONING_INNER_HIGHLIGHT_SPRITE_COUNT = 32;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_RED = SPR_ZONING_INNER_HIGHLIGHT_BASE + 19;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_GREEN = SPR_ZONING_INNER_HIGHLIGHT_BASE + 20;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_BLACK = SPR_ZONING_INNER_HIGHLIGHT_BASE + 21;
|
||||
@@ -340,11 +340,11 @@ static const SpriteID ROUTE_STEP_SPRITE_COUNT = 4;
|
||||
|
||||
/* Tracerestrict sprites */
|
||||
static const SpriteID SPR_TRACERESTRICT_BASE = SPR_ROUTE_STEP_BASE + ROUTE_STEP_SPRITE_COUNT;
|
||||
static const uint16 TRACERESTRICT_SPRITE_COUNT = 3;
|
||||
static const uint16_t TRACERESTRICT_SPRITE_COUNT = 3;
|
||||
|
||||
/* Misc GUI sprites */
|
||||
static const SpriteID SPR_MISC_GUI_BASE = SPR_TRACERESTRICT_BASE + TRACERESTRICT_SPRITE_COUNT;
|
||||
static const uint16 MISC_GUI_SPRITE_COUNT = 1;
|
||||
static const uint16_t MISC_GUI_SPRITE_COUNT = 1;
|
||||
|
||||
/* Road waypoints sprites */
|
||||
static const SpriteID SPR_ROAD_WAYPOINTS_BASE = SPR_MISC_GUI_BASE + MISC_GUI_SPRITE_COUNT;
|
||||
@@ -352,13 +352,13 @@ static const SpriteID SPR_ROAD_WAYPOINT_Y_W = SPR_ROAD_WAYPOINTS_BASE;
|
||||
static const SpriteID SPR_ROAD_WAYPOINT_Y_E = SPR_ROAD_WAYPOINTS_BASE + 1;
|
||||
static const SpriteID SPR_ROAD_WAYPOINT_X_W = SPR_ROAD_WAYPOINTS_BASE + 2;
|
||||
static const SpriteID SPR_ROAD_WAYPOINT_X_E = SPR_ROAD_WAYPOINTS_BASE + 3;
|
||||
static const uint16 ROAD_WAYPOINTS_SPRITE_COUNT = 4;
|
||||
static const uint16_t ROAD_WAYPOINTS_SPRITE_COUNT = 4;
|
||||
|
||||
/* Duplicated signal sprites */
|
||||
static const SpriteID SPR_DUP_ORIGINAL_SIGNALS_BASE = SPR_ROAD_WAYPOINTS_BASE + ROAD_WAYPOINTS_SPRITE_COUNT;
|
||||
static const uint16 DUP_ORIGINAL_SIGNALS_SPRITE_COUNT = 16;
|
||||
static const uint16_t DUP_ORIGINAL_SIGNALS_SPRITE_COUNT = 16;
|
||||
static const SpriteID SPR_DUP_SIGNALS_BASE = SPR_DUP_ORIGINAL_SIGNALS_BASE + DUP_ORIGINAL_SIGNALS_SPRITE_COUNT;
|
||||
static const uint16 DUP_SIGNALS_SPRITE_COUNT = PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT;
|
||||
static const uint16_t DUP_SIGNALS_SPRITE_COUNT = PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT;
|
||||
|
||||
/* From where can we start putting NewGRFs? */
|
||||
static const SpriteID SPR_NEWGRFS_BASE = SPR_DUP_SIGNALS_BASE + DUP_SIGNALS_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[] = {
|
||||
|
@@ -17,8 +17,8 @@ static const byte _tree_count_by_landscape[4] = {12, 8, 12, 9};
|
||||
#define MAX_TREE_COUNT_BY_LANDSCAPE 12
|
||||
|
||||
struct TreePos {
|
||||
uint8 x;
|
||||
uint8 y;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
};
|
||||
|
||||
static const TreePos _tree_layout_xy[][4] = {
|
||||
|
@@ -8,8 +8,8 @@
|
||||
/** @file unicode.h Character mapping for using Unicode characters in OTTD. */
|
||||
|
||||
struct DefaultUnicodeMapping {
|
||||
WChar code; ///< Unicode value
|
||||
byte key; ///< Character index of sprite
|
||||
char32_t code; ///< Unicode value
|
||||
byte key; ///< Character index of sprite
|
||||
};
|
||||
|
||||
static const byte CLRA = 0; ///< Identifier to clear all glyphs at this codepoint
|
||||
|
@@ -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