summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-06-07 07:20:44 +0000
committerpeter1138 <peter1138@openttd.org>2007-06-07 07:20:44 +0000
commit041c9461191b7648a53b5b0ee2997e739d81b4e2 (patch)
treee2e6b6dc657ef21d4b0e40bc9c85a93d0d95cb09 /src
parent463093d0aef194ff6e3adc731742880ca890e608 (diff)
downloadopenttd-041c9461191b7648a53b5b0ee2997e739d81b4e2.tar.xz
(svn r10052) -Codechange: Support reserve/activate stage bits of action 7/9 variable 84.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index c0071c206..a646b686d 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -2987,8 +2987,14 @@ static uint32 GetParamVal(byte param, uint32 *cond_val)
case 0x83: // current climate, 0=temp, 1=arctic, 2=trop, 3=toyland
return _opt.landscape;
- case 0x84: // GRF loading stage
- return (_cur_stage > GLS_INIT) | ((_cur_stage == GLS_ACTIVATION) << 9);
+ case 0x84: { // GRF loading stage
+ uint32 res = 0;
+
+ if (_cur_stage > GLS_INIT) SETBIT(res, 0);
+ if (_cur_stage == GLS_RESERVE) SETBIT(res, 8);
+ if (_cur_stage == GLS_ACTIVATION) SETBIT(res, 9);
+ return res;
+ }
case 0x85: // TTDPatch flags, only for bit tests
if (cond_val == NULL) {