Added quad creation to shapeList (not working yet)

This commit is contained in:
Tats
2013-11-30 20:39:45 -05:00
parent 4ca1f190ec
commit fab560760e
4 changed files with 44 additions and 2 deletions
+10
View File
@@ -56,5 +56,15 @@ int map_int(int value, int istart, int istop, int ostart, int ostop)
return std::max(std::min(int(ret), ostop), ostart);
}
Quad* createQuadForTexture(Texture* texture, int frameWidth, int frameHeight)
{
return new Quad(
Point(texture->getX(), texture->getY()),
Point(texture->getX() + texture->getWidth(), texture->getY()),
Point(texture->getX() + texture->getWidth(), texture->getY() + texture->getHeight()),
Point(texture->getX(), texture->getY() + texture->getHeight())
);
}
} // end of namespace