mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- buildutils: Replace sintable[]
use within remainder of WHaven's files with bsin()
/bcos()
.
This commit is contained in:
parent
96aa6452ef
commit
449714667b
7 changed files with 21 additions and 21 deletions
|
@ -362,8 +362,8 @@ void analyzesprites(PLAYER& plr, int dasmoothratio)
|
|||
SPRITE& tshadow = tsprite[spritesortcnt];
|
||||
tshadow = tspr;
|
||||
int camangle = getangle(plr.x - tshadow.x, plr.y - tshadow.y);
|
||||
tshadow.x -= mulscale(sintable[(camangle + 512) & 2047], 100, 16);
|
||||
tshadow.y += mulscale(sintable[(camangle + 1024) & 2047], 100, 16);
|
||||
tshadow.x -= mulscale(bcos(camangle), 100, 16);
|
||||
tshadow.y += mulscale(-bsin(camangle), 100, 16);
|
||||
tshadow.z = fz + 1;
|
||||
tshadow.statnum = 99;
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@ void processinput(int num) {
|
|||
dist >>= 2;
|
||||
|
||||
if (dist > 0 && feetoffground <= (plr.height << 8) || onsprite != -1) {
|
||||
oldhoriz = ((dist * sintable[(lockclock << 5) & 2047]) >> 19) >> 2;
|
||||
oldhoriz = ((dist * bsin(lockclock << 5)) >> 19) >> 2;
|
||||
plr.horizon.addadjustment(oldhoriz);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -358,11 +358,11 @@ void GameInterface::Ticker()
|
|||
if (followmode) {
|
||||
followa += followang;
|
||||
|
||||
followx += (followvel * sintable[(512 + 2048 - followa) & 2047]) >> 10;
|
||||
followy += (followvel * sintable[(512 + 1024 - 512 - followa) & 2047]) >> 10;
|
||||
followx += MulScale(-bsin(followa), followvel, 10);
|
||||
followy += MulScale(-bcos(followa), followvel, 10);
|
||||
|
||||
followx += (followsvel * sintable[(512 + 1024 - 512 - followa) & 2047]) >> 10;
|
||||
followy -= (followsvel * sintable[(512 + 2048 - followa) & 2047]) >> 10;
|
||||
followx += MulScale(-bcos(followa), followsvel, 10);
|
||||
followy -= MulScale(-bsin(followa), followsvel, 10);
|
||||
}
|
||||
|
||||
lockclock += TICSPERFRAME;
|
||||
|
|
|
@ -44,8 +44,8 @@ int hitscan(int xs, int ys, int zs, short sectnum, int vx, int vy, int vz, Hitsc
|
|||
|
||||
Point rotatepoint(int xpivot, int ypivot, int x, int y, short daang) { // jfBuild
|
||||
Point rotatepoint;
|
||||
int dacos = sintable[(daang + 2560) & 2047];
|
||||
int dasin = sintable[(daang + 2048) & 2047];
|
||||
int dacos = bcos(daang);
|
||||
int dasin = bsin(daang);
|
||||
x -= xpivot;
|
||||
y -= ypivot;
|
||||
rotatepoint.x = dmulscale(x, dacos, -y, dasin, 14) + xpivot;
|
||||
|
|
|
@ -398,7 +398,7 @@ void revolvefx() {
|
|||
void bobbingsector() {
|
||||
for (int i = 0; i < bobbingsectorcnt; i++) {
|
||||
short dasector = bobbingsectorlist[i];
|
||||
sector[dasector].floorz += (sintable[(lockclock << 4) & 2047] >> 6);
|
||||
sector[dasector].floorz += bsin(lockclock << 4, -6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ void dofx() {
|
|||
GLRenderer gl = glrender();
|
||||
if (gl != nullptr) {
|
||||
if (player[pyrn].poisoned != 0) {
|
||||
int tilt = mulscale(sintable[(3 * lockclock) & 2047], 20, 16);
|
||||
int tilt = mulscale(bsin(3 * lockclock), 20, 16);
|
||||
if (tilt != 0)
|
||||
gl.setdrunk(tilt);
|
||||
} else
|
||||
|
@ -826,8 +826,8 @@ void makeasplash(int picnum, PLAYER& plr) {
|
|||
break;
|
||||
}
|
||||
|
||||
movesprite((short) j, ((sintable[(sprite[j].ang + 512) & 2047]) * TICSPERFRAME) << 3,
|
||||
((sintable[sprite[j].ang & 2047]) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
||||
movesprite((short) j, (bcos(sprite[j].ang) * TICSPERFRAME) << 3,
|
||||
(bsin(sprite[j].ang) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
||||
}
|
||||
|
||||
void makemonstersplash(int picnum, int i) {
|
||||
|
@ -1020,8 +1020,8 @@ void warpfxsprite(int s) {
|
|||
|
||||
int daz = (((sprite[j].zvel) * TICSPERFRAME) >> 3);
|
||||
|
||||
movesprite((short) j, ((sintable[(daang + 512) & 2047]) * TICSPERFRAME) << 3,
|
||||
((sintable[daang & 2047]) * TICSPERFRAME) << 3, daz, 4 << 8, 4 << 8, 1);
|
||||
movesprite((short) j, (bcos(daang) * TICSPERFRAME) << 3,
|
||||
(bsin(daang) * TICSPERFRAME) << 3, daz, 4 << 8, 4 << 8, 1);
|
||||
}
|
||||
|
||||
void FadeInit() {
|
||||
|
|
|
@ -247,8 +247,8 @@ void plruse(PLAYER& plr) {
|
|||
int daz2 = -mulscale16(plr.horizon.horiz.asq16(), 2000);
|
||||
Hitscan pHitInfo;
|
||||
hitscan(plr.x, plr.y, plr.z, plr.sector, // Start position
|
||||
sintable[(daang + 2560) & 2047], // X vector of 3D ang
|
||||
sintable[(daang + 2048) & 2047], // Y vector of 3D ang
|
||||
bcos(daang), // X vector of 3D ang
|
||||
bsin(daang), // Y vector of 3D ang
|
||||
daz2, // Z vector of 3D ang
|
||||
pHitInfo, CLIPMASK1);
|
||||
|
||||
|
@ -430,8 +430,8 @@ void chunksofmeat(PLAYER& plr, int hitsprite, int hitx, int hity, int hitz, shor
|
|||
sprite[j].lotag = 512;
|
||||
sprite[j].hitag = 0;
|
||||
sprite[j].pal = 0;
|
||||
movesprite((short) j, ((sintable[(sprite[j].ang + 512) & 2047]) * TICSPERFRAME) << 3,
|
||||
((sintable[sprite[j].ang & 2047]) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
||||
movesprite((short) j, (bcos(sprite[j].ang) * TICSPERFRAME) << 3,
|
||||
(bsin(sprite[j].ang) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ void dophysics(PLAYER& plr, int goalz, int flyupdn, int v) {
|
|||
if (flyupdn < 0) {
|
||||
plr.hvel += (TICSPERFRAME << 7);
|
||||
}
|
||||
plr.hvel += (sintable[(lockclock << 4) & 2047] >> 6);
|
||||
plr.hvel += bsin(lockclock << 4, -6);
|
||||
plr.fallz = 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -938,7 +938,7 @@ void animatetags(int nPlayer) {
|
|||
|
||||
#pragma message ("setinterpolation")
|
||||
//game.pInt.setceilinterpolate(dasector, sector[dasector]);
|
||||
sector[dasector].floorz = dragfloorz[i] + (sintable[(lockclock << 4) & 2047] >> 3);
|
||||
sector[dasector].floorz = dragfloorz[i] + bsin(lockclock << 4, -3);
|
||||
|
||||
if (plr.sector == dasector) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue