mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 10:43:49 +00:00
- Remove most buildhoriz()
calls.
This commit is contained in:
parent
293a71ed55
commit
92798b5a07
10 changed files with 22 additions and 21 deletions
|
@ -572,7 +572,7 @@ DEFINE_MAP_OPTION(ex_ramses_horiz, false)
|
|||
{
|
||||
parse.ParseAssign();
|
||||
parse.sc.MustGetNumber();
|
||||
info->ex_ramses_horiz = parse.sc.Number;
|
||||
info->ex_ramses_horiz = maphoriz(parse.sc.Number);
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(ex_ramses_cdtrack, false)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "palentry.h"
|
||||
#include "vectors.h"
|
||||
#include "screenjob.h"
|
||||
#include "maptypes.h"
|
||||
|
||||
#ifdef GetMessage
|
||||
#undef GetMessage // Windows strikes...
|
||||
|
@ -148,7 +149,7 @@ struct MapRecord
|
|||
// game specific stuff
|
||||
int rr_startsound = 0;
|
||||
int rr_mamaspawn = 15;
|
||||
int ex_ramses_horiz = 11;
|
||||
fixedhoriz ex_ramses_horiz = pitchhoriz(4.912);
|
||||
int ex_ramses_cdtrack = -1; // this is not music, it is the actual dialogue!
|
||||
FString ex_ramses_pup;
|
||||
FString ex_ramses_text;
|
||||
|
|
|
@ -513,7 +513,7 @@ static void SetupView(PLAYER* pPlayer, DVector3& cPos, DAngle& cA, fixedhoriz& c
|
|||
}
|
||||
|
||||
viewUpdateShake(pPlayer, cPos, cA, cH, shakeX, shakeY);
|
||||
cH += buildhoriz(MulScale(0x40000000 - Cos(pPlayer->tiltEffect << 2), 30, 30));
|
||||
cH += pitchhoriz((1 - BobVal((pPlayer->tiltEffect << 2) + 512)) * 13.2);
|
||||
if (gViewPos == 0)
|
||||
{
|
||||
if (cl_viewhbob)
|
||||
|
|
|
@ -1382,7 +1382,7 @@ static bool weaponhitsprite(DDukeActor* proj, DDukeActor *targ, bool fireball)
|
|||
|
||||
if (proj->spr.picnum == SPIT)
|
||||
{
|
||||
ps[p].horizon.addadjustment(buildhoriz(32));
|
||||
ps[p].horizon.addadjustment(pitchhoriz(14.04));
|
||||
ps[p].sync.actions |= SB_CENTERVIEW;
|
||||
|
||||
if (ps[p].loogcnt == 0)
|
||||
|
|
|
@ -1006,7 +1006,7 @@ static bool weaponhitsprite(DDukeActor *proj, DDukeActor *targ, const DVector3 &
|
|||
guts_r(proj, RABBITJIBC, 2, myconnectindex);
|
||||
}
|
||||
|
||||
ps[p].horizon.addadjustment(buildhoriz(32));
|
||||
ps[p].horizon.addadjustment(pitchhoriz(14.04));
|
||||
ps[p].sync.actions |= SB_CENTERVIEW;
|
||||
|
||||
if (ps[p].loogcnt == 0)
|
||||
|
|
|
@ -344,7 +344,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
{
|
||||
ps[iPlayer].sync.actions &= ~SB_CENTERVIEW;
|
||||
}
|
||||
ps[iPlayer].horizon.settarget(buildhoriz(lValue));
|
||||
ps[iPlayer].horizon.settarget(maphoriz(lValue));
|
||||
}
|
||||
else SetGameVarID(lVar2, ps[iPlayer].horizon.horiz.asbuild(), sActor, sPlayer);
|
||||
break;
|
||||
|
@ -354,7 +354,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_HORIZOFF:
|
||||
if (bSet) ps[iPlayer].horizon.horizoff = buildhoriz(lValue);
|
||||
if (bSet) ps[iPlayer].horizon.horizoff = maphoriz(lValue);
|
||||
else SetGameVarID(lVar2, ps[iPlayer].horizon.horizoff.asbuild(), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void forceplayerangle(int snum)
|
|||
{
|
||||
player_struct* p = &ps[snum];
|
||||
|
||||
p->horizon.addadjustment(buildhoriz(64));
|
||||
p->horizon.addadjustment(pitchhoriz(26.566));
|
||||
p->sync.actions |= SB_CENTERVIEW;
|
||||
p->angle.rotscrnang = p->angle.look_ang = (DAngle22_5 - randomAngle(45)) / 2.;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ void dokneeattack(int snum, const std::initializer_list<int> & respawnlist)
|
|||
{
|
||||
p->oknee_incs = p->knee_incs;
|
||||
p->knee_incs++;
|
||||
p->horizon.addadjustment(buildhoriz(-48));
|
||||
p->horizon.addadjustment(pitchhoriz(-20.556));
|
||||
p->sync.actions |= SB_CENTERVIEW;
|
||||
if (p->knee_incs > 15)
|
||||
{
|
||||
|
@ -806,7 +806,7 @@ void player_struct::checkhardlanding()
|
|||
{
|
||||
if (hard_landing > 0)
|
||||
{
|
||||
horizon.addadjustment(buildhoriz(-(hard_landing << 4)));
|
||||
horizon.addadjustment(maphoriz(-(hard_landing << 4)));
|
||||
hard_landing--;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2962,7 +2962,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
case RIFLEGUN_WEAPON:
|
||||
|
||||
p->kickback_pic++;
|
||||
p->horizon.addadjustment(buildhoriz(1));
|
||||
p->horizon.addadjustment(pitchhoriz(0.4476));
|
||||
p->recoil++;
|
||||
|
||||
if (p->kickback_pic <= 12)
|
||||
|
@ -3134,7 +3134,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
else if (p->kickback_pic == 12)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector();
|
||||
p->horizon.addadjustment(buildhoriz(20));
|
||||
p->horizon.addadjustment(pitchhoriz(8.88));
|
||||
p->recoil += 20;
|
||||
}
|
||||
if (p->kickback_pic > 20)
|
||||
|
@ -3975,7 +3975,7 @@ HORIZONLY:
|
|||
if (!d)
|
||||
d = 1;
|
||||
p->recoil -= d;
|
||||
p->horizon.addadjustment(buildhoriz(-d));
|
||||
p->horizon.addadjustment(maphoriz(-d));
|
||||
}
|
||||
|
||||
if (SyncInput())
|
||||
|
|
|
@ -89,7 +89,7 @@ void GameInterface::UpdateCameras(double smoothratio)
|
|||
display_mirror = 1; // should really be 'display external view'.
|
||||
auto cstat = camera->spr.cstat;
|
||||
camera->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
render_camtex(camera, camera->spr.pos, camera->sector(), camera->interpolatedangle(smoothratio), buildhoriz(camera->spr.shade), nullAngle, tex, rect, smoothratio);
|
||||
render_camtex(camera, camera->spr.pos, camera->sector(), camera->interpolatedangle(smoothratio), maphoriz(camera->spr.shade), nullAngle, tex, rect, smoothratio);
|
||||
camera->spr.cstat = cstat;
|
||||
display_mirror = 0;
|
||||
});
|
||||
|
@ -255,7 +255,7 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
|
|||
|
||||
cpos = viewer->spr.pos.plusZ(-4);
|
||||
cang = viewer->interpolatedangle(interpfrac);
|
||||
choriz = buildhoriz(viewer->spr.yint);
|
||||
choriz = maphoriz(viewer->spr.yint);
|
||||
rotscrnang = nullAngle;
|
||||
sect = viewer->sector();
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
|
|||
{
|
||||
viewer = p->newOwner;
|
||||
cang = viewer->interpolatedangle(interpfrac);
|
||||
choriz = buildhoriz(viewer->spr.shade);
|
||||
choriz = maphoriz(viewer->spr.shade);
|
||||
cpos = viewer->spr.pos;
|
||||
sect = viewer->sector();
|
||||
rotscrnang = nullAngle;
|
||||
|
|
|
@ -1079,7 +1079,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
PlayerList[nPlayer].angle.settarget(ang, true);
|
||||
pPlayerActor->spr.angle = ang;
|
||||
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(0), true);
|
||||
PlayerList[nPlayer].horizon.settarget(pitchhoriz(nullAngle.Degrees()), true);
|
||||
|
||||
sPlayerInput[nPlayer].vel.Zero();
|
||||
pPlayerActor->vel.Zero();
|
||||
|
@ -1092,7 +1092,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
InitSpiritHead();
|
||||
|
||||
PlayerList[nPlayer].nDestVertPan = pitchhoriz(nullAngle.Degrees());
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(currentLevel->ex_ramses_horiz));
|
||||
PlayerList[nPlayer].horizon.settarget(currentLevel->ex_ramses_horiz);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2623,16 +2623,16 @@ sectdone:
|
|||
{
|
||||
if (PlayerList[nPlayer].horizon.horiz.Sgn() < 0)
|
||||
{
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(0));
|
||||
PlayerList[nPlayer].horizon.settarget(pitchhoriz(nullAngle.Degrees()));
|
||||
PlayerList[nPlayer].eyelevel -= dVertPan[nPlayer];
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerList[nPlayer].horizon.addadjustment(buildhoriz(dVertPan[nPlayer]));
|
||||
PlayerList[nPlayer].horizon.addadjustment(maphoriz(dVertPan[nPlayer]));
|
||||
|
||||
if (PlayerList[nPlayer].horizon.horiz.Degrees() >= 38)
|
||||
{
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(99));
|
||||
PlayerList[nPlayer].horizon.settarget(pitchhoriz(37.72));
|
||||
}
|
||||
else if (PlayerList[nPlayer].horizon.horiz.Sgn() <= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue