Skip to content

Commit f68e997

Browse files
committed
Feature: Bridge deck overlays for vanilla infrastructure types
Fixes #104
1 parent d7ea635 commit f68e997

8 files changed

Lines changed: 31 additions & 1 deletion

ogfxe_extra.pnml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "sprites/extra/extra-openttd-recolour.pnml"
2626
#include "sprites/extra/extra-road-waypoints.pnml"
2727
#include "sprites/extra/extra-overlay-rocks.pnml"
28+
#include "sprites/extra/extra-bridge-decks.pnml"
2829

2930
#include "sprites/extra/extra-plus-canals.pnml"
3031
#include "sprites/extra/extra-plus-locks.pnml"
@@ -41,4 +42,3 @@ if (climate == CLIMATE_TROPICAL) {
4142
if (climate == CLIMATE_TOYLAND) {
4243
#include "sprites/extra/extra-plus-toyland-infrastructure.pnml"
4344
}
44-
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Bridge deck overlays
2+
template tmpl_bridgedeckoverlay_general(x, y) {
3+
[ 1+x, 1+y, 64, 47-1, -31, -16 ]
4+
[ 131+x, 1+y, 64, 47-1, -31, -16 ]
5+
6+
[ 261+x, 1+y, 64, 55-1, -31, -24 ]
7+
[ 456+x, 1+y, 64, 55-1, -31, -24 ]
8+
[ 326+x, 1+y, 64, 55-1, -31, -24 ]
9+
[ 391+x, 1+y, 64, 55-1, -31, -24 ]
10+
}
11+
12+
template tmpl_bridgedeckoverlay_road(x, y) {
13+
[ 131+x, 1+y, 64, 47-1, -31, -16 ]
14+
[ 1+x, 1+y, 64, 47-1, -31, -16 ]
15+
16+
[ 261+x, 1+y, 64, 55-1, -31, -24 ]
17+
[ 456+x, 1+y, 64, 55-1, -31, -24 ]
18+
[ 326+x, 1+y, 64, 55-1, -31, -24 ]
19+
[ 391+x, 1+y, 64, 55-1, -31, -24 ]
20+
}
21+
22+
replacenew bridge_decks_spr6(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_monorail_8bpp.png", 6) { tmpl_bridgedeckoverlay_general(0, 0) }
23+
replacenew bridge_decks_spr12(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_maglev_8bpp.png", 12) { tmpl_bridgedeckoverlay_general(0, 0) }
24+
if (climate != CLIMATE_TOYLAND) {
25+
replacenew bridge_decks_spr0(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_rail_8bpp.png", 0) { tmpl_bridgedeckoverlay_general(0, 0) }
26+
replacenew bridge_decks_spr18(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_road_8bpp.png", 18) { tmpl_bridgedeckoverlay_road(0, 0) }
27+
} else if (climate == CLIMATE_TOYLAND) {
28+
replacenew bridge_decks_toyland_spr0(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_toyland_rail_8bpp.png", 0) { tmpl_bridgedeckoverlay_general(0, 0) }
29+
replacenew bridge_decks_toyland_spr18(BRIDGE_DECKS, "sprites/png/infrastructure/ramps_deckonly_toyland_road_8bpp.png", 18) { tmpl_bridgedeckoverlay_road(0, 0) }
30+
}
9.87 KB
Loading
10.4 KB
Loading
10.1 KB
Loading
9.36 KB
Loading
9.77 KB
Loading
9.19 KB
Loading

0 commit comments

Comments
 (0)