summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-12-18 15:34:12 +0000
committerglx <glx@openttd.org>2006-12-18 15:34:12 +0000
commit64bf2432bbf643bb36e46c6668f6b7d880c3f989 (patch)
tree3054f7ea9cecf4bfccf3102ccf24bef93ed836da /newgrf.c
parent32db875d978fd59c6dc941c61d331d4a1b20a24a (diff)
downloadopenttd-64bf2432bbf643bb36e46c6668f6b7d880c3f989.tar.xz
(svn r7506) -Codechange: [NewGRF] Add action 7/9/D variable 0x81 (current year)
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 440cfbf31..73b900960 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -2193,6 +2193,9 @@ static void GraphicsNew(byte *buf, int len)
static uint32 GetParamVal(byte param, uint32 *cond_val)
{
switch (param) {
+ case 0x81: /* current year */
+ return clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR;
+
case 0x83: /* current climate, 0=temp, 1=arctic, 2=trop, 3=toyland */
return _opt.landscape;