|
@@ -3641,17 +3641,13 @@ bool GetGlobalVariable(byte param, uint3
|
|
|
uint build = 1382;
|
|
|
*value = (major << 24) | (minor << 20) | (revision << 16) | build;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
case 0x0D: // TTD Version, 00=DOS, 01=Windows
|
|
|
if (_palette_remap_grf[_file_index]) {
|
|
|
*value = !_use_palette;
|
|
|
} else {
|
|
|
*value = _use_palette;
|
|
|
}
|
|
|
*value = _cur_grfconfig->windows_paletted;
|
|
|
return true;
|
|
|
|
|
|
case 0x0E: // Y-offset for train sprites
|
|
|
*value = _traininfo_vehicle_pitch;
|
|
|
return true;
|
|
|
|
|
@@ -4097,13 +4093,13 @@ static void GRFInfo(byte *buf, size_t le
|
|
|
|
|
|
_cur_grffile->grfid = grfid;
|
|
|
_cur_grffile->grf_version = version;
|
|
|
_cur_grfconfig->status = _cur_stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED;
|
|
|
|
|
|
/* Do swap the GRFID for displaying purposes since people expect that */
|
|
|
DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s", version, BSWAP32(grfid), name);
|
|
|
DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s (palette: %s)", version, BSWAP32(grfid), name, _cur_grfconfig->windows_paletted ? "Windows" : "DOS");
|
|
|
}
|
|
|
|
|
|
/* Action 0x0A */
|
|
|
static void SpriteReplace(byte *buf, size_t len)
|
|
|
{
|
|
|
/* <0A> <num-sets> <set1> [<set2> ...]
|
|
@@ -5891,12 +5887,13 @@ void LoadNewGRFFile(GRFConfig *config, u
|
|
|
config->error->message = STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
FioOpenFile(file_index, filename);
|
|
|
_file_index = file_index; // XXX
|
|
|
_palette_remap_grf[_file_index] = (config->windows_paletted != (_use_palette == PAL_WINDOWS));
|
|
|
|
|
|
_cur_grfconfig = config;
|
|
|
|
|
|
DEBUG(grf, 2, "LoadNewGRFFile: Reading NewGRF-file '%s'", filename);
|
|
|
|
|
|
/* Skip the first sprite; we don't care about how many sprites this
|