mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- buildutils: Replace sintable[]
use within Duke's animatesprites_*.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
b6e8030307
commit
95fa3a6f52
2 changed files with 10 additions and 10 deletions
|
@ -245,8 +245,8 @@ void animatesprites_d(int x, int y, int a, int smoothratio)
|
||||||
t->ang = getangle(x - t->x, y - t->y);
|
t->ang = getangle(x - t->x, y - t->y);
|
||||||
t->x = Owner->x;
|
t->x = Owner->x;
|
||||||
t->y = Owner->y;
|
t->y = Owner->y;
|
||||||
t->x += sintable[(t->ang + 512) & 2047] >> 10;
|
t->x += bcos(t->ang, -10);
|
||||||
t->y += sintable[t->ang & 2047] >> 10;
|
t->y += bsin(t->ang, -10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -255,7 +255,7 @@ void animatesprites_d(int x, int y, int a, int smoothratio)
|
||||||
t->z -= (4 << 8);
|
t->z -= (4 << 8);
|
||||||
break;
|
break;
|
||||||
case CRYSTALAMMO:
|
case CRYSTALAMMO:
|
||||||
t->shade = (sintable[(ud.levelclock << 4) & 2047] >> 10);
|
t->shade = bsin(ud.levelclock << 4, -10);
|
||||||
continue;
|
continue;
|
||||||
case VIEWSCREEN:
|
case VIEWSCREEN:
|
||||||
case VIEWSCREEN2:
|
case VIEWSCREEN2:
|
||||||
|
@ -615,8 +615,8 @@ void animatesprites_d(int x, int y, int a, int smoothratio)
|
||||||
{
|
{
|
||||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||||
int look = getangle(shadowspr->x - ps[screenpeek].posx, shadowspr->y - ps[screenpeek].posy);
|
int look = getangle(shadowspr->x - ps[screenpeek].posx, shadowspr->y - ps[screenpeek].posy);
|
||||||
shadowspr->x += sintable[(look + 2560) & 2047] >> 9;
|
shadowspr->x += bcos(look, -9);
|
||||||
shadowspr->y += sintable[(look + 2048) & 2047] >> 9;
|
shadowspr->y += bsin(look, -9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
|
|
|
@ -242,8 +242,8 @@ void animatesprites_r(int x, int y, int a, int smoothratio)
|
||||||
t->ang = getangle(x - t->x, y - t->y);
|
t->ang = getangle(x - t->x, y - t->y);
|
||||||
t->x = Owner->x;
|
t->x = Owner->x;
|
||||||
t->y = Owner->y;
|
t->y = Owner->y;
|
||||||
t->x += sintable[(t->ang + 512) & 2047] >> 10;
|
t->x += bcos(t->ang, -10);
|
||||||
t->y += sintable[t->ang & 2047] >> 10;
|
t->y += bsin(t->ang, -10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -252,7 +252,7 @@ void animatesprites_r(int x, int y, int a, int smoothratio)
|
||||||
t->z -= (4 << 8);
|
t->z -= (4 << 8);
|
||||||
break;
|
break;
|
||||||
case CRYSTALAMMO:
|
case CRYSTALAMMO:
|
||||||
t->shade = (sintable[(ud.levelclock << 4) & 2047] >> 10);
|
t->shade = bsin(ud.levelclock << 4, -10);
|
||||||
break;
|
break;
|
||||||
case SHRINKSPARK:
|
case SHRINKSPARK:
|
||||||
if (Owner && (Owner->picnum == CHEER || Owner->picnum == CHEERSTAYPUT) && isRRRA())
|
if (Owner && (Owner->picnum == CHEER || Owner->picnum == CHEERSTAYPUT) && isRRRA())
|
||||||
|
@ -776,8 +776,8 @@ void animatesprites_r(int x, int y, int a, int smoothratio)
|
||||||
{
|
{
|
||||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||||
int look = getangle(shadowspr->x - ps[screenpeek].posx, shadowspr->y - ps[screenpeek].posy);
|
int look = getangle(shadowspr->x - ps[screenpeek].posx, shadowspr->y - ps[screenpeek].posy);
|
||||||
shadowspr->x += sintable[(look + 2560) & 2047] >> 9;
|
shadowspr->x += bcos(look, -9);
|
||||||
shadowspr->y += sintable[(look + 2048) & 2047] >> 9;
|
shadowspr->y += bsin(look, -9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
|
|
Loading…
Reference in a new issue