summaryrefslogtreecommitdiff
path: root/ContentLoader.cpp
diff options
context:
space:
mode:
authorJapa2011-02-18 09:17:32 +0000
committerJapa2011-02-18 09:17:32 +0000
commitfcb4aa62ec08a1639cb396a88a81262ad40aee65 (patch)
treead8f944453e914ff8d967ab76bf447a856eab9c4 /ContentLoader.cpp
parent4757c2d4e449be85400fbccc53ec1391c84f8673 (diff)
downloadstonesense-fcb4aa62ec08a1639cb396a88a81262ad40aee65.tar.gz
stonesense-fcb4aa62ec08a1639cb396a88a81262ad40aee65.tar.bz2
stonesense-fcb4aa62ec08a1639cb396a88a81262ad40aee65.tar.xz
more work on grass
Diffstat (limited to 'ContentLoader.cpp')
-rw-r--r--ContentLoader.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/ContentLoader.cpp b/ContentLoader.cpp
index 1ad5c66..dcddfd4 100644
--- a/ContentLoader.cpp
+++ b/ContentLoader.cpp
@@ -221,6 +221,9 @@ bool ContentLoader::Load( DFHack::Context& DF){
//DF.Resume();
+ //time to copy all the junk from mats to contentloader.
+ this->organic = Mats->organic;
+ this->inorganic = Mats->inorganic;
contentLoader.obsidian = lookupMaterialIndex(INORGANIC, "OBSIDIAN");
loadGraphicsFromDisk(); //these get destroyed when flushImgFiles is called.
@@ -387,15 +390,15 @@ bool ContentLoader::parseCreatureContent(TiXmlElement* elemRoot ){
}
bool ContentLoader::parseShrubContent(TiXmlElement* elemRoot ){
- return addSingleVegetationConfig( elemRoot, &shrubConfigs, Mats->organic );
+ return addSingleVegetationConfig( elemRoot, &shrubConfigs, organic );
}
bool ContentLoader::parseTreeContent(TiXmlElement* elemRoot ){
- return addSingleVegetationConfig( elemRoot, &treeConfigs, Mats->organic );
+ return addSingleVegetationConfig( elemRoot, &treeConfigs, organic );
}
bool ContentLoader::parseGrassContent(TiXmlElement* elemRoot ){
- return addSingleVegetationConfig( elemRoot, &grassConfigs, Mats->organic );
+ return addSingleVegetationConfig( elemRoot, &grassConfigs, organic );
}
bool ContentLoader::parseTerrainContent(TiXmlElement* elemRoot ){
@@ -470,15 +473,15 @@ int lookupMaterialIndex(int matType, const char* strValue)
// for appropriate elements, look up subtype
if ((matType == INORGANIC) && (!config.skipInorganicMats))
{
- typeVector=&(contentLoader.Mats->inorganic);
+ typeVector=&(contentLoader.inorganic);
}
else if ((matType == WOOD) && (!config.skipOrganicMats))
{
- typeVector=&(contentLoader.Mats->organic);
+ typeVector=&(contentLoader.organic);
}
else if ((matType == PLANTCLOTH) && (!config.skipOrganicMats))
{
- typeVector=&(contentLoader.Mats->organic);
+ typeVector=&(contentLoader.organic);
}
else if (matType == LEATHER)
{
@@ -554,15 +557,15 @@ const char *lookupMaterialName(int matType,int matIndex)
// for appropriate elements, look up subtype
if ((matType == INORGANIC) && (!config.skipInorganicMats))
{
- typeVector=&(contentLoader.Mats->inorganic);
+ typeVector=&(contentLoader.inorganic);
}
else if ((matType == WOOD) && (!config.skipOrganicMats))
{
- typeVector=&(contentLoader.Mats->organic);
+ typeVector=&(contentLoader.organic);
}
else if ((matType == PLANTCLOTH) && (!config.skipOrganicMats))
{
- typeVector=&(contentLoader.Mats->organic);
+ typeVector=&(contentLoader.organic);
}
else if (matType == LEATHER)
{
@@ -587,7 +590,7 @@ const char *lookupTreeName(int matIndex)
return NULL;
vector<t_matgloss>* typeVector;
// for appropriate elements, look up subtype
- typeVector=&(contentLoader.Mats->organic);
+ typeVector=&(contentLoader.organic);
if (matIndex >= typeVector->size())
return NULL;
return (*typeVector)[matIndex].id;