--- a/src/newgrf.cpp Thu Apr 19 14:48:10 2007 +0000
+++ b/src/newgrf.cpp Tue Jun 12 11:56:35 2007 +0000
@@ -2539,7 +2539,7 @@
StationSpec *statspec = _cur_grffile->stations[stid];
statspec->spritegroup[CT_DEFAULT] = _cur_grffile->spritegroups[groupid];
- statspec->grfid = _cur_grffile->grfid;
+ statspec->grffile = _cur_grffile;
statspec->localidx = stid;
SetCustomStationSpec(statspec);
}
@@ -4305,7 +4305,7 @@
if (newfile == NULL) error ("Out of memory");
- newfile->filename = strdup(config->filename);
+ newfile->filename = strdup(config->full_path);
newfile->sprite_offset = sprite_offset;
/* Copy the initial parameter list */
@@ -4583,7 +4583,7 @@
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
{
- const char *filename = config->filename;
+ const char *filename = config->full_path;
uint16 num;
/* A .grf file is activated only if it was active when the game was
@@ -4699,7 +4699,7 @@
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND) continue;
/* @todo usererror() */
- if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
+ if (!FileExists(c->full_path)) error("NewGRF file is missing '%s'", c->filename);
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
LoadNewGRFFile(c, slot++, stage);