Add crop property to Actor - currently only used in Sprite

This commit is contained in:
Chris Danford
2003-06-20 23:04:11 +00:00
parent c0b41e3c4f
commit aac9739fac
16 changed files with 198 additions and 160 deletions
+4 -7
View File
@@ -53,13 +53,10 @@ static const ScreenMessage SM_AllowOptionsMenuRepeat = ScreenMessage(SM_User+1);
* on Y by flipping texture coordinates. */
static void FlipSpriteHorizontally(Sprite &s)
{
float Coords[8];
s.GetCurrentTextureCoords(Coords);
swap(Coords[0], Coords[6]); /* top left X <-> top right X */
swap(Coords[1], Coords[7]); /* top left Y <-> top right Y */
swap(Coords[2], Coords[4]); /* bottom left X <-> bottom left X */
swap(Coords[3], Coords[5]); /* bottom left Y <-> bottom left Y */
s.SetCustomTextureCoords(Coords);
RectF texCoords = *s.GetCurrentTextureCoords();
swap( texCoords.left, texCoords.right );
swap( texCoords.top, texCoords.bottom );
s.SetCustomTextureCoords( texCoords );
}
ScreenSelectMusic::ScreenSelectMusic() : Screen("ScreenSelectMusic")