mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-08 01:22:02 +00:00
Remove unused Quad, Element tags from map, and worldMapIndex attrib
This commit is contained in:
parent
27f7e2f014
commit
69ffb75746
2 changed files with 0 additions and 91 deletions
|
@ -1357,11 +1357,6 @@ bool Game::loadSceneXML(std::string scene)
|
||||||
saveWaterLevel = atoi(level->Attribute("waterLevel"));
|
saveWaterLevel = atoi(level->Attribute("waterLevel"));
|
||||||
levelSF->SetAttribute("waterLevel", waterLevel.x);
|
levelSF->SetAttribute("waterLevel", waterLevel.x);
|
||||||
}
|
}
|
||||||
if (level->Attribute("worldMapIndex"))
|
|
||||||
{
|
|
||||||
worldMapIndex = atoi(level->Attribute("worldMapIndex"));
|
|
||||||
levelSF->SetAttribute("worldMapIndex", worldMapIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (level->Attribute("bgSfxLoop"))
|
if (level->Attribute("bgSfxLoop"))
|
||||||
{
|
{
|
||||||
|
@ -1541,44 +1536,6 @@ bool Game::loadSceneXML(std::string scene)
|
||||||
pathXml = pathXml->NextSiblingElement("Path");
|
pathXml = pathXml->NextSiblingElement("Path");
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLElement *quad = doc.FirstChildElement("Quad");
|
|
||||||
while (quad)
|
|
||||||
{
|
|
||||||
XMLElement *qSF = saveFile->NewElement("Quad");
|
|
||||||
int x=0, y=0, z=0;
|
|
||||||
int w=0,h=0;
|
|
||||||
bool cull=true;
|
|
||||||
bool solid = false;
|
|
||||||
std::string justify;
|
|
||||||
std::string tex;
|
|
||||||
qSF->SetAttribute("x", x = atoi(quad->Attribute("x")));
|
|
||||||
qSF->SetAttribute("y", y = atoi(quad->Attribute("y")));
|
|
||||||
qSF->SetAttribute("w", w = atoi(quad->Attribute("w")));
|
|
||||||
qSF->SetAttribute("h", h = atoi(quad->Attribute("h")));
|
|
||||||
qSF->SetAttribute("tex", (tex = (quad->Attribute("tex"))).c_str());
|
|
||||||
qSF->SetAttribute("cull", cull = atoi(quad->Attribute("cull")));
|
|
||||||
qSF->SetAttribute("justify", (justify = (quad->Attribute("justify"))).c_str());
|
|
||||||
|
|
||||||
if (quad->Attribute("solid"))
|
|
||||||
qSF->SetAttribute("solid", solid = atoi(quad->Attribute("solid")));
|
|
||||||
|
|
||||||
Quad *q = new Quad;
|
|
||||||
q->position = Vector(x,y,z);
|
|
||||||
q->setTexture(tex);
|
|
||||||
q->toggleCull(cull);
|
|
||||||
q->setWidthHeight(w, h);
|
|
||||||
|
|
||||||
if (justify == "upperLeft")
|
|
||||||
{
|
|
||||||
q->offset = Vector((q->getWidth()*q->scale.x)/2.0f, (q->getHeight()*q->scale.y)/2.0f);
|
|
||||||
}
|
|
||||||
addRenderObject(q, LR_BACKGROUND);
|
|
||||||
|
|
||||||
saveFile->InsertEndChild(qSF);
|
|
||||||
|
|
||||||
quad = quad->NextSiblingElement("Quad");
|
|
||||||
}
|
|
||||||
|
|
||||||
XMLElement *schoolFish = doc.FirstChildElement("SchoolFish");
|
XMLElement *schoolFish = doc.FirstChildElement("SchoolFish");
|
||||||
while(schoolFish)
|
while(schoolFish)
|
||||||
{
|
{
|
||||||
|
@ -1865,50 +1822,6 @@ bool Game::loadSceneXML(std::string scene)
|
||||||
e->setTag(d.tag);
|
e->setTag(d.tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLElement *element = doc.FirstChildElement("Element");
|
|
||||||
while (element)
|
|
||||||
{
|
|
||||||
if (element->Attribute("idx"))
|
|
||||||
{
|
|
||||||
int x = atoi(element->Attribute("x"));
|
|
||||||
int y = atoi(element->Attribute("y"));
|
|
||||||
int idx = atoi(element->Attribute("idx"));
|
|
||||||
int layer=LR_ELEMENTS5;
|
|
||||||
float rot =0;
|
|
||||||
bool flipH = false, flipV = false;
|
|
||||||
if (element->Attribute("flipH"))
|
|
||||||
flipH = atoi(element->Attribute("flipH"));
|
|
||||||
if (element->Attribute("flipV"))
|
|
||||||
flipV = atoi(element->Attribute("flipV"));
|
|
||||||
|
|
||||||
if (element->Attribute("rot"))
|
|
||||||
rot = atof(element->Attribute("rot"));
|
|
||||||
|
|
||||||
if (element->Attribute("lyr"))
|
|
||||||
layer = atoi(element->Attribute("lyr"));
|
|
||||||
|
|
||||||
|
|
||||||
if (idx != -1)
|
|
||||||
{
|
|
||||||
Element *e = createElement(idx, Vector(x,y), layer);
|
|
||||||
e->rotation.z = rot;
|
|
||||||
if (flipH)
|
|
||||||
e->flipHorizontal();
|
|
||||||
if (flipV)
|
|
||||||
e->flipVertical();
|
|
||||||
|
|
||||||
if (element->Attribute("sz"))
|
|
||||||
{
|
|
||||||
SimpleIStringStream is(element->Attribute("sz"));
|
|
||||||
is >> e->scale.x >> e->scale.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
element = element->NextSiblingElement("Element");
|
|
||||||
}
|
|
||||||
|
|
||||||
this->reconstructGrid(true);
|
this->reconstructGrid(true);
|
||||||
|
|
||||||
std::vector<EntitySaveData> toSpawn;
|
std::vector<EntitySaveData> toSpawn;
|
||||||
|
@ -2618,8 +2531,6 @@ void Game::applyState()
|
||||||
|
|
||||||
controlHintNotes.clear();
|
controlHintNotes.clear();
|
||||||
|
|
||||||
worldMapIndex = -1;
|
|
||||||
|
|
||||||
particleManager->setNumSuckPositions(10);
|
particleManager->setNumSuckPositions(10);
|
||||||
|
|
||||||
currentPet = 0;
|
currentPet = 0;
|
||||||
|
|
|
@ -346,8 +346,6 @@ public:
|
||||||
MiniMapRender *miniMapRender;
|
MiniMapRender *miniMapRender;
|
||||||
WorldMapRender *worldMapRender;
|
WorldMapRender *worldMapRender;
|
||||||
|
|
||||||
int worldMapIndex;
|
|
||||||
|
|
||||||
bool loadingScene;
|
bool loadingScene;
|
||||||
bool doScreenTrans;
|
bool doScreenTrans;
|
||||||
bool noSceneTransitionFadeout;
|
bool noSceneTransitionFadeout;
|
||||||
|
|
Loading…
Add table
Reference in a new issue