summaryrefslogtreecommitdiff
path: root/ContentLoader.cpp
diff options
context:
space:
mode:
authorJapa2011-02-23 01:28:19 +0000
committerJapa2011-02-23 01:28:19 +0000
commitd654ce4b90956f57eb1a1b9c1d7069e0191016d3 (patch)
tree6d497f88e67cb643ebb124528c9ffe4266e988b8 /ContentLoader.cpp
parentf06e0e44cc5eb98c8606dcd061f04c857e18acc1 (diff)
downloadstonesense-d654ce4b90956f57eb1a1b9c1d7069e0191016d3.tar.gz
stonesense-d654ce4b90956f57eb1a1b9c1d7069e0191016d3.tar.bz2
stonesense-d654ce4b90956f57eb1a1b9c1d7069e0191016d3.tar.xz
'Fixed' the crash that happened when pressing G.
as in, not fixed at all, instead just disabled the function completely.
Diffstat (limited to 'ContentLoader.cpp')
-rw-r--r--ContentLoader.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/ContentLoader.cpp b/ContentLoader.cpp
index 2312e7d..32c0629 100644
--- a/ContentLoader.cpp
+++ b/ContentLoader.cpp
@@ -233,6 +233,24 @@ bool ContentLoader::Load( DFHack::Context& DF){
return true;
}
+bool ContentLoader::reload_configs()
+{
+ flushBuildingConfig(&buildingConfigs);
+ flushTerrainConfig(terrainFloorConfigs);
+ flushTerrainConfig(terrainBlockConfigs);
+ flushColorConfig(colorConfigs);
+ creatureConfigs.clear();
+ treeConfigs.clear();
+ shrubConfigs.clear();
+ grassConfigs.clear();
+ flushImgFiles();
+
+ loadGraphicsFromDisk(); //these get destroyed when flushImgFiles is called.
+ bool overallResult = parseContentIndexFile( "index.txt" );
+
+ return overallResult;
+}
+
// takes a filename and the file referring to it, and makes a combined filename in
// HTML style: (ie "/something" is relative to the stonesense root, everything
// else is relative to the referrer)