NewGRF stations: Remove extended version of varuiable 68

pull/532/head
Jonathan G Rennison 12 months ago
parent 1d8df99c83
commit bc00753996

@ -782,39 +782,8 @@
<h3 id="varaction2_station"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations">Variational Action 2 - Stations</a></h3>
<h4 id="varaction2_station_var42">Track type in purchase list (42)</h4>
<p>This is indicated by the feature name: <font face="monospace">varaction2_station_var42</font>, version 1</p>
<h4 id="varaction2_station_var68">Station info of nearby tiles (68)</h4>
<p>If feature name <font face="monospace">varaction2_station_var68_extended_localidx</font> is present and the feature is successfully tested for,<br />
then the local setID field which would normally be in bits 0..7 (clamped to 0..255), is instead split such that the lower byte is in bits 0..7, and the upper byte is in bits 24..31, such that the variable overall has the format:
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 7</td><td>
If the tile is defined in the current GRF, this is the lower 8 bits of the setID used in the definition. Otherwise, the content is undefined.<br />
Note that if this GRF has any station setIDs greater than 255, bits 24 - 31 need to be used as well.
</td></tr>
<tr><td>8 - 9</td><td>
0 - The tile uses original TTD graphics<br />
1 - The tile is defined in the current GRF<br />
2 - The tile is defined in another GRF
</td></tr>
<tr><td>10</td><td>Set if the selected tile belongs to the current station, clear otherwise</td></tr>
<tr><td>11</td><td>Clear if the selected tile is parallel with the current one, set if perpendicular to it </td></tr>
<tr><td>12 - 13</td><td>
0 - plain platform<br />
1 - platform with building<br />
2 - platform with roof, left side<br />
3 - platform with roof, right side
</td></tr>
<tr><td>24 - 31</td><td>
If the tile is defined in the current GRF, this is the upper 8 bits of the setID used in the definition. Otherwise, the content is undefined.<br />
This can be ignored if this GRF does not have any station setIDs greater than 255 (does not define more than 256 station types).
</td></tr>
</table>
<br />
The remaining bits are reserved for future use and should be masked.<br />
This format requires <font face="monospace">varaction2_station_var68_extended_localidx</font>, version 1.
</p>
<h4 id="station_station_info_nearby_tiles_v2">Station info of nearby tiles v2 (mappable variable: station_station_info_nearby_tiles_v2)</h4>
<p>This has a similar value to <a href="#varaction2_station_var68">68</a>/<a href="#varaction2_station_var68">Station info of nearby tiles</a>, above.<br />
<p>This has a similar value to <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations#Station_info_of_nearby_tiles_.2868.29">68/Station info of nearby tiles</a>.<br />
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 15</td><td>If the tile is defined in the current GRF, this is the setID used in the definition. Otherwise, the content is undefined. </td></tr>

@ -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()
};

Loading…
Cancel
Save