diff options
| author | Kris Parker | 2009-12-13 04:23:39 +0000 |
|---|---|---|
| committer | Kris Parker | 2009-12-13 04:23:39 +0000 |
| commit | affa9bb79b43be94ce09e28c010f8fd25c245954 (patch) | |
| tree | be84976f085b0412cb729ab79ab5561061fb18bb /VegetationConfiguration.cpp | |
| parent | a7fa8cd1197ff8fb28cc63d1f85389dd8f62b987 (diff) | |
| download | stonesense-affa9bb79b43be94ce09e28c010f8fd25c245954.tar.gz stonesense-affa9bb79b43be94ce09e28c010f8fd25c245954.tar.bz2 stonesense-affa9bb79b43be94ce09e28c010f8fd25c245954.tar.xz | |
xml and index files are read based on a central master index
content is read relative to the calling file
Diffstat (limited to 'VegetationConfiguration.cpp')
| -rw-r--r-- | VegetationConfiguration.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/VegetationConfiguration.cpp b/VegetationConfiguration.cpp index c0ac3c8..61a7646 100644 --- a/VegetationConfiguration.cpp +++ b/VegetationConfiguration.cpp @@ -34,7 +34,7 @@ bool addSingleVegetationConfig( TiXmlElement* elemRoot, vector<VegetationConfig const char* filename = elemRoot->Attribute("file");
if (filename != NULL && filename[0] != 0)
{
- basefile = loadImgFile((char*)filename);
+ basefile = loadConfigImgFile((char*)filename, elemRoot);
}
//kinda round about- looking to needing to shift the lot into the plant elem
@@ -66,26 +66,6 @@ bool addSingleVegetationConfig( TiXmlElement* elemRoot, vector<VegetationConfig return true;
}
-
-/*bool addCreaturesConfig( TiXmlElement* elemRoot, vector<CreatureConfiguration>* knownCreatures ){
- int basefile = -1;
- const char* filename = elemRoot->Attribute("file");
- if (filename != NULL && filename[0] != 0)
- {
- basefile = loadImgFile((char*)filename);
- }
- TiXmlElement* elemCreature = elemRoot->FirstChildElement("creature");
- if (elemCreature == NULL)
- {
- contentError("No creatures found",elemRoot);
- return false;
- }
- while( elemCreature ){
- addSingleCreatureConfig(elemCreature,knownCreatures,basefile );
- elemCreature = elemCreature->NextSiblingElement("creature");
- }
- return true;
-}*/
t_SpriteWithOffset getVegetationSprite(vector<VegetationConfiguration>& vegetationConfigs,int index,bool live,bool grown)
{
|
