Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sf::Sprite spr;
- spr.SetImage(*MGR_RESOURCE->GetImage(name)); //only singleton left. not even needed
- spr.SetX(dst->Left());
- spr.SetY(dst->Top());
- if(src != NULL)
- spr.SetSubRect(sf::IntRect(src->Left(), src->Top()
- , src->Right(), src->Bottom()));
- float scaleX = 1.0f + (src->Width() / dst->Width());
- float scaleY = 1.0f + (src->Height() / dst->Height());
- spr.SetScaleX(scaleX);
- spr.SetScaleX(scaleY);
- mWindow->Draw(spr);
Add Comment
Please, Sign In to add comment