aboutsummaryrefslogtreecommitdiffstats
path: root/src/components.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.cpp')
-rw-r--r--src/components.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components.cpp b/src/components.cpp
index f4ac01e..a711f45 100644
--- a/src/components.cpp
+++ b/src/components.cpp
@@ -126,7 +126,7 @@ void RenderSystem::render(void)
else
sz = sprite.getSpriteSize().x;
- if(sprite.faceLeft) {
+ if (sprite.faceLeft) {
glm::mat4 scale = glm::scale(glm::mat4(1.0f), glm::vec3(-1.0f,1.0f,1.0f));
glm::mat4 translate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f - sz - pos.x * 2.0f, 0.0f, 0.0f));
@@ -348,7 +348,7 @@ std::vector<Frame> developFrame(XMLElement* xml)
{
Frame tmpf;
std::vector<Frame> tmp;
- SpriteData* sd;
+ SpriteData sd;
unsigned int limb = 0;
@@ -377,13 +377,13 @@ std::vector<Frame> developFrame(XMLElement* xml)
if (sxml->Attribute("size") != nullptr) {
fsize = sxml->StrAttribute("size");
- sd = new SpriteData(sxml->GetText(), foffset, fsize);
+ sd = SpriteData(sxml->GetText(), foffset, fsize);
} else {
- sd = new SpriteData(sxml->GetText(), foffset);
+ sd = SpriteData(sxml->GetText(), foffset);
}
if (sxml->QueryUnsignedAttribute("limb", &limb) == XML_NO_ERROR)
- sd->limb = limb;
- tmpf.push_back(std::make_pair(*sd, fdraw));
+ sd.limb = limb;
+ tmpf.push_back(std::make_pair(sd, fdraw));
}
sxml = sxml->NextSiblingElement();
}