mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Added quad creation to shapeList (not working yet)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user