summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-11-14 14:54:10 +0000
committerdarkvater <darkvater@openttd.org>2004-11-14 14:54:10 +0000
commit80f787e60a10b1b4f1089249e01c992a20e5bb5e (patch)
tree51429b6e686cd269bc32e7b43c0d47080c8859f3
parent58473175266f453b900e4262588ccce075ec05c3 (diff)
downloadopenttd-80f787e60a10b1b4f1089249e01c992a20e5bb5e.tar.xz
(svn r593) -newgrf: Support for two more TTD(Patch) version relate) SkipIf in-game variables (pasky).
-rw-r--r--grfspecial.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/grfspecial.c b/grfspecial.c
index 4470c687e..062f55a94 100644
--- a/grfspecial.c
+++ b/grfspecial.c
@@ -1456,25 +1456,34 @@ static void SkipIf(byte *buf, int len)
cond_val = grf_load_byte(&buf);
switch (param) {
- case 0x83:
+ case 0x83: /* current climate, 0=temp, 1=arctic, 2=trop, 3=toyland */
param_val = _opt.landscape;
break;
- case 0x84:
+ case 0x84: /* .grf loading stage, 0=initialization, 1=activation */
param_val = _cur_stage;
break;
- case 0x85:
+ case 0x85: /* TTDPatch flags, only for bit tests */
param_val = _ttdpatch_flags[cond_val / 0x20];
cond_val %= 0x20;
break;
- case 0x86:
+ case 0x86: /* road traffic side, bit 4 clear=left, set=right */
param_val = _opt.road_side << 4;
break;
- case 0x88: {
+ case 0x88: { /* see if specified GRFID is active */
struct GRFFile *file;
file = GetFileByGRFID(cond_val);
param_val = (file != NULL);
} break;
+ case 0x8B: /* TTDPatch version */
+ param_val = 0xFFFF;
+ break;
+ case 0x8D: /* TTD Version, 00=DOS, 01=Windows */
+ param_val = 1;
+ break;
+ /* TODO */
+ case 0x8E: /* How many pixels to displace sprites in train info windows */
+ case 0x8F: /* Track type cost multipliers */
default:
if (param >= 0x80) {
/* In-game variable. */