mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Satisfy rollangle table with a 3deg angle
This commit is contained in:
parent
551828607c
commit
6779c508e7
2 changed files with 6 additions and 5 deletions
|
@ -1180,8 +1180,7 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
||||||
leftoffset = width - leftoffset;
|
leftoffset = width - leftoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't cache angle = 0
|
for (angle = 0; angle < ROTANGLES; angle++)
|
||||||
for (angle = 1; angle < ROTANGLES; angle++)
|
|
||||||
{
|
{
|
||||||
INT32 newwidth, newheight;
|
INT32 newwidth, newheight;
|
||||||
|
|
||||||
|
|
|
@ -500,7 +500,7 @@ void R_InitSprites(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
#ifdef ROTSPRITE
|
#ifdef ROTSPRITE
|
||||||
INT32 angle, realangle = 0;
|
INT32 angle, ra;
|
||||||
float fa;
|
float fa;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -510,10 +510,12 @@ void R_InitSprites(void)
|
||||||
#ifdef ROTSPRITE
|
#ifdef ROTSPRITE
|
||||||
for (angle = 0; angle < ROTANGLES; angle++)
|
for (angle = 0; angle < ROTANGLES; angle++)
|
||||||
{
|
{
|
||||||
fa = ANG2RAD(FixedAngle(realangle<<FRACBITS));
|
ra = (ROTANGDIFF * angle);
|
||||||
|
if (!ra)
|
||||||
|
ra = (ROTANGDIFF / 2) + 1;
|
||||||
|
fa = ANG2RAD(FixedAngle(ra<<FRACBITS));
|
||||||
cosang2rad[angle] = FLOAT_TO_FIXED(cos(-fa));
|
cosang2rad[angle] = FLOAT_TO_FIXED(cos(-fa));
|
||||||
sinang2rad[angle] = FLOAT_TO_FIXED(sin(-fa));
|
sinang2rad[angle] = FLOAT_TO_FIXED(sin(-fa));
|
||||||
realangle += ROTANGDIFF;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue