mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-21 11:01:01 +00:00
- Exhumed: Replace all uses of binangle
with DAngle
objects.
# Conflicts: # source/games/exhumed/src/view.cpp
This commit is contained in:
parent
8912d7d6cc
commit
aee102ba73
1 changed files with 13 additions and 13 deletions
|
@ -50,7 +50,7 @@ int16_t nQuake[kMaxPlayers] = { 0 };
|
||||||
|
|
||||||
int nChunkTotal = 0;
|
int nChunkTotal = 0;
|
||||||
|
|
||||||
binangle nCameraa;
|
DAngle nCameraa;
|
||||||
fixedhoriz nCamerapan;
|
fixedhoriz nCamerapan;
|
||||||
int nViewTop;
|
int nViewTop;
|
||||||
bool bCamera = false;
|
bool bCamera = false;
|
||||||
|
@ -191,7 +191,7 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
int playerY;
|
int playerY;
|
||||||
int playerZ;
|
int playerZ;
|
||||||
sectortype* pSector = nullptr;
|
sectortype* pSector = nullptr;
|
||||||
binangle nAngle, rotscrnang;
|
DAngle nAngle, rotscrnang;
|
||||||
fixedhoriz pan = {};
|
fixedhoriz pan = {};
|
||||||
|
|
||||||
zbob = bsin(2 * bobangle, -3);
|
zbob = bsin(2 * bobangle, -3);
|
||||||
|
@ -211,8 +211,8 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
playerY = pActor->int_pos().Y;
|
playerY = pActor->int_pos().Y;
|
||||||
playerZ = pActor->int_pos().Z;
|
playerZ = pActor->int_pos().Z;
|
||||||
pSector = pActor->sector();
|
pSector = pActor->sector();
|
||||||
nAngle = buildang(pActor->int_ang());
|
nAngle = DAngle::fromBuild(pActor->int_ang());
|
||||||
rotscrnang = buildang(0);
|
rotscrnang = DAngle::fromDeg(0.);
|
||||||
|
|
||||||
SetGreenPal();
|
SetGreenPal();
|
||||||
|
|
||||||
|
@ -241,14 +241,14 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
if (!SyncInput())
|
if (!SyncInput())
|
||||||
{
|
{
|
||||||
pan = PlayerList[nLocalPlayer].horizon.sum();
|
pan = PlayerList[nLocalPlayer].horizon.sum();
|
||||||
nAngle = PlayerList[nLocalPlayer].angle.sum();
|
nAngle = DAngle::fromBam(PlayerList[nLocalPlayer].angle.sum().asbam());
|
||||||
rotscrnang = PlayerList[nLocalPlayer].angle.rotscrnang;
|
rotscrnang = DAngle::fromBam(PlayerList[nLocalPlayer].angle.rotscrnang.asbam());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pan = PlayerList[nLocalPlayer].horizon.interpolatedsum(smoothRatio);
|
pan = PlayerList[nLocalPlayer].horizon.interpolatedsum(smoothRatio);
|
||||||
nAngle = PlayerList[nLocalPlayer].angle.interpolatedsum(smoothRatio);
|
nAngle = DAngle::fromBam(PlayerList[nLocalPlayer].angle.interpolatedsum(smoothRatio).asbam());
|
||||||
rotscrnang = PlayerList[nLocalPlayer].angle.interpolatedrotscrn(smoothRatio);
|
rotscrnang = DAngle::fromBam(PlayerList[nLocalPlayer].angle.interpolatedrotscrn(smoothRatio).asbam());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bCamera)
|
if (!bCamera)
|
||||||
|
@ -279,15 +279,15 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
if (viewz > floorZ)
|
if (viewz > floorZ)
|
||||||
viewz = floorZ;
|
viewz = floorZ;
|
||||||
|
|
||||||
nCameraa += buildang((nQuake[nLocalPlayer] >> 7) % 31);
|
nCameraa += DAngle::fromBuild((nQuake[nLocalPlayer] >> 7) % 31);
|
||||||
|
|
||||||
if (bCamera)
|
if (bCamera)
|
||||||
{
|
{
|
||||||
viewz -= 2560;
|
viewz -= 2560;
|
||||||
if (!calcChaseCamPos(&playerX, &playerY, &viewz, pPlayerActor, &pSector, DAngle::fromBam(nAngle.asbam()), pan, smoothRatio))
|
if (!calcChaseCamPos(&playerX, &playerY, &viewz, pPlayerActor, &pSector, nAngle, pan, smoothRatio))
|
||||||
{
|
{
|
||||||
viewz += 2560;
|
viewz += 2560;
|
||||||
calcChaseCamPos(&playerX, &playerY, &viewz, pPlayerActor, &pSector, DAngle::fromBam(nAngle.asbam()), pan, smoothRatio);
|
calcChaseCamPos(&playerX, &playerY, &viewz, pPlayerActor, &pSector, nAngle, pan, smoothRatio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
|
|
||||||
if (!nFreeze && !sceneonly)
|
if (!nFreeze && !sceneonly)
|
||||||
DrawWeapons(smoothRatio);
|
DrawWeapons(smoothRatio);
|
||||||
render_drawrooms(nullptr, { nCamerax, nCameray, viewz }, sectnum(pSector), DAngle::fromBam(nCameraa.asbam()), nCamerapan, DAngle::fromBam(rotscrnang.asbam()), smoothRatio);
|
render_drawrooms(nullptr, { nCamerax, nCameray, viewz }, sectnum(pSector), nCameraa, nCamerapan, rotscrnang, smoothRatio);
|
||||||
|
|
||||||
if (HavePLURemap())
|
if (HavePLURemap())
|
||||||
{
|
{
|
||||||
|
@ -374,7 +374,7 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
|
|
||||||
pPlayerActor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
pPlayerActor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||||
|
|
||||||
int ang2 = nCameraa.asbuild() - pPlayerActor->int_ang();
|
int ang2 = nCameraa.Buildang() - pPlayerActor->int_ang();
|
||||||
if (ang2 < 0)
|
if (ang2 < 0)
|
||||||
ang2 = -ang2;
|
ang2 = -ang2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue