From a26db5934994550b1ed577e01cbec27e659e16a1 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 28 Nov 2018 02:53:51 +0000 Subject: [PATCH] Add Action 5 support for programmable signals graphics --- docs/newgrf-additions.html | 10 ++++++++++ src/newgrf.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/docs/newgrf-additions.html b/docs/newgrf-additions.html index de10aa60d0..cb09237792 100644 --- a/docs/newgrf-additions.html +++ b/docs/newgrf-additions.html @@ -249,5 +249,15 @@ -1 sprites/sample.png 546 8 09 23 33 -26 0 -1 sprites/sample.png 594 8 09 23 33 -5 0 +

Programmable signal graphics (mappable type: programmable_signals)

+

Signal graphics come in groups of 16. These groups contain sprites in the same order as sprites 1275-1290 in trg1[r].grf and Action 5 type 4 (signals); + red, then green, for each of: SW-facing, NE-facing, NW-facing, SE-facing, E-facing, W-facing, S-facing, N-facing. + + + + +
GroupContents
0Semaphore programmable signals
1Lighted programmable signals
+

+

This is indicated by the feature name: action5_programmable_signals, version 1

diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 3a3cbe4085..e8e439c0eb 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -7992,6 +7992,7 @@ static const GRFFeatureInfo _grf_feature_list[] = { GRFFeatureInfo("more_bridge_types", 1), GRFFeatureInfo("action0_bridge_prop14", 1), GRFFeatureInfo("action0_bridge_pillar_flags", 1), + GRFFeatureInfo("action5_programmable_signals", 1), GRFFeatureInfo(), }; @@ -8112,6 +8113,7 @@ static const GRFPropertyMapDefinition _grf_action0_remappable_properties[] = { /** Action14 Action5 remappable type list */ static const Action5TypeRemapDefinition _grf_action5_remappable_types[] = { + Action5TypeRemapDefinition("programmable_signals", A5BLOCK_ALLOW_OFFSET, SPR_PROGSIGNAL_BASE, 1, 32, "Programmable signal graphics"), Action5TypeRemapDefinition(), };