mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-13 05:36:22 +00:00
Add SPRINFO_DEFAULT_PIVOT, change spriteinfo_t.available to bit array
Default is used if the bit is not set for a particular frame.
This commit is contained in:
parent
b0f84e99fc
commit
5a631b302d
2 changed files with 9 additions and 3 deletions
|
|
@ -141,11 +141,16 @@ patch_t *Patch_GetRotatedSprite(
|
|||
|
||||
patch = W_CachePatchNum(lump, PU_SPRITE);
|
||||
|
||||
if (sprinfo->available)
|
||||
if (in_bit_array(sprinfo->available, frame))
|
||||
{
|
||||
xpivot = sprinfo->pivot[frame].x;
|
||||
ypivot = sprinfo->pivot[frame].y;
|
||||
}
|
||||
else if (in_bit_array(sprinfo->available, SPRINFO_DEFAULT_PIVOT))
|
||||
{
|
||||
xpivot = sprinfo->pivot[SPRINFO_DEFAULT_PIVOT].x;
|
||||
ypivot = sprinfo->pivot[SPRINFO_DEFAULT_PIVOT].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
xpivot = patch->leftoffset;
|
||||
|
|
|
|||
|
|
@ -100,8 +100,9 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
spriteframepivot_t pivot[64];
|
||||
boolean available;
|
||||
spriteframepivot_t pivot[64 + 1];
|
||||
#define SPRINFO_DEFAULT_PIVOT (64)
|
||||
UINT8 available[BIT_ARRAY_SIZE(64 + 1)]; // 1 extra for default_pivot
|
||||
} spriteinfo_t;
|
||||
|
||||
// Portable Network Graphics
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue