Skip to content

Commit 2386087

Browse files
committed
(building/registers) quick hack to get road stop climate offset working
1 parent 42cad75 commit 2386087

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

agrf/lib/building/registers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Registers:
99
NOSNOW = grf.Temp(4)
1010
RECOLOUR_OFFSET = grf.Temp(5)
1111
NOSLOPE = grf.Temp(6)
12+
CLIMATE_ROAD_OFFSET = grf.Temp(7)
1213

1314

1415
code = """
@@ -18,4 +19,5 @@ class Registers:
1819
TEMP[0x03] = (terrain_type & 0x4) == 0x4
1920
TEMP[0x04] = (terrain_type & 0x4) != 0x4
2021
TEMP[0x06] = var(0x67, param=0x00, shift=0, and=0x0000001f) == 0
22+
TEMP[0x07] = (19 * ((terrain_type & 0x5) > 0))
2123
"""

agrf/lib/building/roadstop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def get_sprites(self, g, sprites=None):
5858
default=graphics,
5959
code="""
6060
TEMP[0x03] = (terrain_type & 0x4) == 0x4
61+
TEMP[0x07] = (19 * ((terrain_type & 0x5) > 0))
6162
""",
6263
)
6364
self.callbacks.set_flag_props(self._props)

0 commit comments

Comments
 (0)