summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-03 13:32:02 +0000
committeryexo <yexo@openttd.org>2010-08-03 13:32:02 +0000
commit04a9a58ecd2e22025c794f72d378b4e718a92267 (patch)
tree62d913068fbdad9af1116f8b175b9330f69e4f19
parent87386cabc4b7b5934f5839d7b1f728ceda97a0c9 (diff)
downloadopenttd-04a9a58ecd2e22025c794f72d378b4e718a92267.tar.xz
(svn r20346) -Change: scan for tar files before scanning for AIs/NewGRFs so new AIs/NewGRFs inside a tar file are found
-rw-r--r--src/ai/ai_scanner.cpp1
-rw-r--r--src/newgrf_config.cpp2
-rw-r--r--src/tar_type.h3
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 9d689a815..d404270d9 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -25,6 +25,7 @@
void AIScanner::RescanAIDir()
{
+ TarScanner::DoScan();
this->ScanScriptDir("info.nut", AI_DIR);
this->ScanScriptDir("library.nut", AI_LIBRARY_DIR);
}
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 6807a5d5d..b12c688aa 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -549,6 +549,8 @@ void ScanNewGRFFiles()
{
ClearGRFConfigList(&_all_grfs);
+ TarScanner::DoScan();
+
DEBUG(grf, 1, "Scanning for NewGRFs");
uint num = GRFFileScanner::DoScan();
diff --git a/src/tar_type.h b/src/tar_type.h
index 335b646d0..272ae5da4 100644
--- a/src/tar_type.h
+++ b/src/tar_type.h
@@ -40,7 +40,4 @@ extern TarFileList _tar_filelist;
#define FOR_ALL_TARS(tar) for (tar = _tar_filelist.begin(); tar != _tar_filelist.end(); tar++)
-typedef bool FioTarFileListCallback(const char *filename, int size, void *userdata);
-FILE *FioTarFileList(const char *tar, const char *mode, size_t *filesize, FioTarFileListCallback *callback, void *userdata);
-
#endif /* TAR_TYPE_H */