summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-23 21:12:09 +0000
committerrubidium <rubidium@openttd.org>2007-06-23 21:12:09 +0000
commit6402d001909cc0f47fa3d9654b331c0ad96267f5 (patch)
treea1cc1caa824002d18729cbbf175cfdf094f14a10 /src/newgrf.cpp
parentbe35df3f0363ffffe1cfed8d81084c40212e9571 (diff)
downloadopenttd-6402d001909cc0f47fa3d9654b331c0ad96267f5.tar.xz
(svn r10298) -Fix [FS#903]: show the subdirectory below the default data directory in this filename in the newgrf list. The directory was removed in r9560 because then it used to full path instead of the path relative to the data directory, but since the inclusion of "search paths" that is not necessary anymore.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index c4e4b58cb..6c0e58189 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4659,7 +4659,7 @@ static void InitNewGRFFile(const GRFConfig *config, int sprite_offset)
if (newfile == NULL) error ("Out of memory");
- newfile->filename = strdup(config->full_path);
+ newfile->filename = strdup(config->filename);
newfile->sprite_offset = sprite_offset;
/* Copy the initial parameter list */
@@ -4936,7 +4936,7 @@ static void DecodeSpecialSprite(uint num, GrfLoadingStage stage)
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
{
- const char *filename = config->full_path;
+ const char *filename = config->filename;
uint16 num;
/* A .grf file is activated only if it was active when the game was
@@ -5069,7 +5069,7 @@ void LoadNewGRF(uint load_index, uint file_index)
if (stage > GLS_INIT && HASBIT(c->flags, GCF_INIT_ONLY)) continue;
/* @todo usererror() */
- if (!FioCheckFileExists(c->full_path)) error("NewGRF file is missing '%s'", c->filename);
+ if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
LoadNewGRFFile(c, slot++, stage);