- Added +SPRITEFLIP which reverses a sprite's left-rightness.
This commit is contained in:
parent
8303d8bbd1
commit
2acb485121
6 changed files with 19 additions and 4 deletions
|
|
@ -64,7 +64,7 @@ PalEntry OtherGameSkinPalette[256];
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
FTextureID spritedef_t::GetSpriteFrame(int frame, int rot, DAngle ang, bool *mirror)
|
||||
FTextureID spritedef_t::GetSpriteFrame(int frame, int rot, DAngle ang, bool *mirror, bool flipagain)
|
||||
{
|
||||
if ((unsigned)frame >= numframes)
|
||||
{
|
||||
|
|
@ -77,10 +77,18 @@ FTextureID spritedef_t::GetSpriteFrame(int frame, int rot, DAngle ang, bool *mir
|
|||
spriteframe_t *sprframe = &SpriteFrames[spriteframes + frame];
|
||||
if (rot == -1)
|
||||
{
|
||||
if (sprframe->Texture[0] == sprframe->Texture[1])
|
||||
if ((sprframe->Texture[0] == sprframe->Texture[1]) && flipagain)
|
||||
{
|
||||
rot = (360.0 - ang + 45.0 / 2 * 9).BAMs() >> 28;
|
||||
}
|
||||
else if (sprframe->Texture[0] == sprframe->Texture[1])
|
||||
{
|
||||
rot = (ang + 45.0 / 2 * 9).BAMs() >> 28;
|
||||
}
|
||||
else if (flipagain)
|
||||
{
|
||||
rot = (360.0 - ang + (45.0 / 2 * 9 - 180.0 / 16)).BAMs() >> 28;
|
||||
}
|
||||
else
|
||||
{
|
||||
rot = (ang + (45.0 / 2 * 9 - 180.0 / 16)).BAMs() >> 28;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue