mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r4824) - NewGRF: add support for getting/setting miscellaneous grf flags (param 0x9E)
This commit is contained in:
parent
c6fd0c3a46
commit
0bbd367245
10
newgrf.c
10
newgrf.c
@ -47,6 +47,9 @@ static SpriteID _cur_spriteid;
|
|||||||
static int _cur_stage;
|
static int _cur_stage;
|
||||||
static uint32 _nfo_line;
|
static uint32 _nfo_line;
|
||||||
|
|
||||||
|
/* Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E */
|
||||||
|
static byte _misc_grf_features = 0;
|
||||||
|
|
||||||
/* 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
|
/* 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
|
||||||
static uint32 _ttdpatch_flags[8];
|
static uint32 _ttdpatch_flags[8];
|
||||||
|
|
||||||
@ -1976,6 +1979,9 @@ static uint32 GetParamVal(byte param, uint32 *cond_val)
|
|||||||
case 0x9D: /* TTD Platform, 00=TTDPatch, 01=OpenTTD */
|
case 0x9D: /* TTD Platform, 00=TTDPatch, 01=OpenTTD */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
case 0x9E: /* Miscellaneous GRF features */
|
||||||
|
return _misc_grf_features;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* GRF Parameter */
|
/* GRF Parameter */
|
||||||
if (param < 0x80) return _cur_grffile->param[param];
|
if (param < 0x80) return _cur_grffile->param[param];
|
||||||
@ -2435,6 +2441,10 @@ static void ParamSet(byte *buf, int len)
|
|||||||
DEBUG(grf, 7) ("ParamSet: Skipping unimplemented target 0x%02X", target);
|
DEBUG(grf, 7) ("ParamSet: Skipping unimplemented target 0x%02X", target);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x9E: /* Miscellaneous GRF features */
|
||||||
|
_misc_grf_features = res;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (target < 0x80) {
|
if (target < 0x80) {
|
||||||
_cur_grffile->param[target] = res;
|
_cur_grffile->param[target] = res;
|
||||||
|
Loading…
Reference in New Issue
Block a user