1
Graphics / Missing Template Arguments - Sprite.SetSubRect [RESOLVED]
« on: November 28, 2011, 01:58:10 am »
Oh wow. I was doing that on all my other classes, just not that one... Thanks for the speedy response.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
class invader0
{
private:
short posX, posY; // (0-800, 0-600)
static sf::Image Image0;
sf::Sprite Sprite;
public:
static bool state0; // (0-1)
void setPos(short, short);
static bool init (const std::string& ImageFile) {return Image0.LoadFromFile(ImageFile);}
invader0() {
Sprite.SetImage(Image0);
}
void spriteSetRect() {
if (state0 == 0) {
invader0::Sprite.SetSubRect(sf::Rect(0, 0, 16, 16)); // Error goes here
} else {invader0::Sprite.SetSubRect(sf::Rect(16, 0, 32, 16));}
}
};