Added terrain parameters to the xml.

This commit is contained in:
Steffen Fündgens 2015-02-06 12:37:00 +01:00
parent 7e8b0d4c58
commit 5c2491557b
2 changed files with 27 additions and 0 deletions

View File

@ -4400,6 +4400,14 @@
<intensity>0.2</intensity>
</directionalLight>
<terrain>
<texture>seamlessTerrain.png</texture>
<ambientFactor>0.1</ambientFactor>
<diffuseFactor>0.8</diffuseFactor>
<specularFactor>0.2</specularFactor>
<shininess>3.0</shininess>
</terrain>
<skydome>
<texture>skydome.png</texture>
</skydome>

View File

@ -101,6 +101,25 @@ Converter::Converter(std::string level){
doc->InsertEndChild(fogColour);
doc->InsertEndChild(directionalLight);
//Create global terrain Element
XMLElement* terrain = doc->NewElement("terrain");
XMLElement* terrainTexture = doc->NewElement("texture");
XMLElement* terrainAmbientFactor = doc->NewElement("ambientFactor");
XMLElement* terrainDiffuseFactor = doc->NewElement("diffuseFactor");
XMLElement* terrainSpecularFactor = doc->NewElement("specularFactor");
XMLElement* terrainShininess = doc->NewElement("shininess");
terrainTexture->SetText("seamlessTerrain.png");
terrainAmbientFactor->SetText("0.1");
terrainDiffuseFactor->SetText("0.8");
terrainSpecularFactor->SetText("0.2");
terrainShininess->SetText("3.0");
terrain->InsertEndChild(terrainTexture);
terrain->InsertEndChild(terrainAmbientFactor);
terrain->InsertEndChild(terrainDiffuseFactor);
terrain->InsertEndChild(terrainSpecularFactor);
terrain->InsertEndChild(terrainShininess);
doc->InsertEndChild(terrain);
//Create global skydome Element
XMLElement* skydome = doc->NewElement("skydome");
XMLElement* skydomeTexture = doc->NewElement("texture");