NewGRF stations: Remove extended version of varuiable 68
This commit is contained in:
@@ -5988,10 +5988,6 @@ static void NewSpriteGroup(ByteReader *buf)
|
||||
if (adjust.variable == 0x68) adjust.variable = A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT;
|
||||
if (adjust.variable == 0x7B && adjust.parameter == 0x68) adjust.parameter = A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT;
|
||||
}
|
||||
if (info.scope_feature == GSF_STATIONS && HasBit(_cur.grffile->observed_feature_tests, GFTOF_STATION_VAR68_EXT_LOCALIDX)) {
|
||||
if (adjust.variable == 0x68) adjust.variable = A2VRI_STATION_INFO_NEARBY_TILES_EXT;
|
||||
if (adjust.variable == 0x7B && adjust.parameter == 0x68) adjust.parameter = A2VRI_STATION_INFO_NEARBY_TILES_EXT;
|
||||
}
|
||||
|
||||
if (adjust.type != DSGA_TYPE_NONE) {
|
||||
adjust.add_val = buf->ReadVarSize(varsize);
|
||||
|
||||
@@ -24,7 +24,6 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
|
||||
GRFFeatureInfo("action0_station_prop1B", 1),
|
||||
GRFFeatureInfo("action0_station_disallowed_bridge_pillars", 1),
|
||||
GRFFeatureInfo("varaction2_station_var42", 1),
|
||||
GRFFeatureInfo("varaction2_station_var68_extended_localidx", 1, GFTOF_STATION_VAR68_EXT_LOCALIDX),
|
||||
GRFFeatureInfo("varaction2_station_station_nearby_info_v2", 1),
|
||||
GRFFeatureInfo("more_bridge_types", 1),
|
||||
GRFFeatureInfo("action0_bridge_prop14", 1),
|
||||
@@ -199,7 +198,6 @@ extern const GRFVariableMapDefinition _grf_action2_remappable_variables[] = {
|
||||
|
||||
extern const GRFNameOnlyVariableMapDefinition _grf_action2_internal_variable_names[] = {
|
||||
GRFNameOnlyVariableMapDefinition(A2VRI_VEHICLE_CURRENT_SPEED_SCALED, "current speed scaled"),
|
||||
GRFNameOnlyVariableMapDefinition(A2VRI_STATION_INFO_NEARBY_TILES_EXT, "68 (extended)"),
|
||||
GRFNameOnlyVariableMapDefinition(A2VRI_ROADSTOP_INFO_NEARBY_TILES_EXT, "68 (extended)"),
|
||||
GRFNameOnlyVariableMapDefinition(),
|
||||
};
|
||||
|
||||
@@ -76,8 +76,7 @@ enum Action0RemapPropertyIds {
|
||||
|
||||
|
||||
enum Action2VariableRemapIds {
|
||||
A2VRI_STATION_INFO_NEARBY_TILES_EXT = 0x100,
|
||||
A2VRI_STATION_INFO_NEARBY_TILES_V2,
|
||||
A2VRI_STATION_INFO_NEARBY_TILES_V2 = 0x100,
|
||||
A2VRI_OBJECT_FOUNDATION_SLOPE,
|
||||
A2VRI_OBJECT_FOUNDATION_SLOPE_CHANGE,
|
||||
A2VRI_VEHICLE_CURRENT_SPEED_SCALED,
|
||||
@@ -108,7 +107,6 @@ enum GRFFeatureTestObservationFlag : uint8 {
|
||||
GFTOF_MORE_VARACTION2_TYPES,
|
||||
GFTOF_MULTI_PART_SHIPS,
|
||||
GFTOF_ROAD_STOPS,
|
||||
GFTOF_STATION_VAR68_EXT_LOCALIDX,
|
||||
|
||||
GFTOF_INVALID = 0xFF,
|
||||
};
|
||||
|
||||
@@ -45,7 +45,6 @@ static bool IsExpensiveStationVariable(uint16 variable)
|
||||
case 0x67:
|
||||
case 0x68:
|
||||
case 0x6A:
|
||||
case A2VRI_STATION_INFO_NEARBY_TILES_EXT:
|
||||
case A2VRI_STATION_INFO_NEARBY_TILES_V2:
|
||||
return true;
|
||||
|
||||
|
||||
@@ -289,9 +289,6 @@ uint32 StationScopeResolver::GetNearbyStationInfo(uint32 parameter, StationScope
|
||||
default:
|
||||
return res | ClampTo<uint8>(localidx);
|
||||
|
||||
case NearbyStationInfoMode::Extended:
|
||||
return res | (localidx & 0xFF) | ((localidx & 0xFF00) << 16);
|
||||
|
||||
case NearbyStationInfoMode::V2:
|
||||
return (res << 8) | localidx;
|
||||
}
|
||||
@@ -389,11 +386,6 @@ uint32 StationScopeResolver::GetNearbyStationInfo(uint32 parameter, StationScope
|
||||
return this->GetNearbyStationInfo(parameter, NearbyStationInfoMode::Standard);
|
||||
}
|
||||
|
||||
/* Station info of nearby tiles: extended */
|
||||
case A2VRI_STATION_INFO_NEARBY_TILES_EXT: {
|
||||
return this->GetNearbyStationInfo(parameter, NearbyStationInfoMode::Extended);
|
||||
}
|
||||
|
||||
/* Station info of nearby tiles: v2 */
|
||||
case A2VRI_STATION_INFO_NEARBY_TILES_V2: {
|
||||
return this->GetNearbyStationInfo(parameter, NearbyStationInfoMode::V2);
|
||||
|
||||
@@ -50,7 +50,6 @@ struct StationScopeResolver : public ScopeResolver {
|
||||
private:
|
||||
enum class NearbyStationInfoMode {
|
||||
Standard,
|
||||
Extended,
|
||||
V2,
|
||||
};
|
||||
uint32 GetNearbyStationInfo(uint32 parameter, NearbyStationInfoMode mode) const;
|
||||
|
||||
@@ -591,7 +591,6 @@ static const NIVariable _niv_stations[] = {
|
||||
NIV(0x68, "station info of nearby tiles"),
|
||||
NIV(0x69, "information about cargo accepted in the past"),
|
||||
NIV(0x6A, "GRFID of nearby station tiles"),
|
||||
NIVF(A2VRI_STATION_INFO_NEARBY_TILES_EXT, "station info of nearby tiles ext", NIVF_SHOW_PARAMS),
|
||||
NIVF(A2VRI_STATION_INFO_NEARBY_TILES_V2, "station info of nearby tiles v2", NIVF_SHOW_PARAMS),
|
||||
NIV_END()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user