diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2017-03-08 20:44:00 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2017-03-08 20:44:00 -0500 |
commit | 4e52a7ccc57e9f7d62de69c1e2c66001b040f3af (patch) | |
tree | 95e16c83babbc8932e14991615a9aef40c0fe1dd /src | |
parent | 8194e952b3e7fd5c333f117416f0ce579e0a1de0 (diff) |
fixes n stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/components.cpp | 12 |
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(); } |