mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- renamed ESyncBits so that the replacement can take that name later.
This commit is contained in:
parent
78a024a50c
commit
36d676ca20
9 changed files with 37 additions and 37 deletions
|
@ -56,8 +56,8 @@ enum ESyncBits_ : uint32_t
|
|||
};
|
||||
|
||||
// enforce type safe operations on the input bits.
|
||||
using ESyncBits = TFlags<ESyncBits_, uint32_t>;
|
||||
DEFINE_TFLAGS_OPERATORS(ESyncBits)
|
||||
using EDukeSyncBits = TFlags<ESyncBits_, uint32_t>;
|
||||
DEFINE_TFLAGS_OPERATORS(EDukeSyncBits)
|
||||
|
||||
union SYNCFLAGS
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ struct InputPacket
|
|||
|
||||
// Making this a union lets some constructs fail. Since these names are transitional only the added memory use doesn't really matter.
|
||||
// for Duke
|
||||
ESyncBits sbits;
|
||||
EDukeSyncBits sbits;
|
||||
|
||||
// for SW
|
||||
int32_t bits;
|
||||
|
|
|
@ -112,10 +112,10 @@ void playerJump(int snum, int fz, int cz);
|
|||
void applylook(int snum, double factor, fixed_t adjustment);
|
||||
void checklook(int snum, int sb_snum);
|
||||
void playerCenterView(int snum);
|
||||
void playerLookUp(int snum, ESyncBits sb_snum);
|
||||
void playerLookDown(int snum, ESyncBits sb_snum);
|
||||
void playerAimUp(int snum, ESyncBits sb_snum);
|
||||
void playerAimDown(int snum, ESyncBits sb_snum);
|
||||
void playerLookUp(int snum, EDukeSyncBits sb_snum);
|
||||
void playerLookDown(int snum, EDukeSyncBits sb_snum);
|
||||
void playerAimUp(int snum, EDukeSyncBits sb_snum);
|
||||
void playerAimDown(int snum, EDukeSyncBits sb_snum);
|
||||
bool view(struct player_struct* pp, int* vx, int* vy, int* vz, short* vsectnum, int ang, int horiz);
|
||||
void tracers(int x1, int y1, int z1, int x2, int y2, int z2, int n);
|
||||
int hits(int i);
|
||||
|
|
|
@ -116,22 +116,22 @@ inline bool isIn(int value, const std::initializer_list<int>& list)
|
|||
|
||||
|
||||
// these are mainly here to avoid directly accessing the input data so that it can be more easily refactored later.
|
||||
inline bool PlayerInput(int pl, ESyncBits bit)
|
||||
inline bool PlayerInput(int pl, EDukeSyncBits bit)
|
||||
{
|
||||
return (!!((sync[pl].sbits) & bit));
|
||||
}
|
||||
|
||||
inline void PlayerSetInput(int pl, ESyncBits bit)
|
||||
inline void PlayerSetInput(int pl, EDukeSyncBits bit)
|
||||
{
|
||||
sync[pl].sbits |= bit;
|
||||
}
|
||||
|
||||
inline void PlayerClearInput(int pl, ESyncBits bit)
|
||||
inline void PlayerClearInput(int pl, EDukeSyncBits bit)
|
||||
{
|
||||
sync[pl].sbits &= ~bit;
|
||||
}
|
||||
|
||||
inline ESyncBits PlayerInputBits(int pl, ESyncBits bits)
|
||||
inline EDukeSyncBits PlayerInputBits(int pl, EDukeSyncBits bits)
|
||||
{
|
||||
return (sync[pl].sbits & bits);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ source as it is released.
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
static int WeaponToSend;
|
||||
static ESyncBits BitsToSend;
|
||||
static EDukeSyncBits BitsToSend;
|
||||
|
||||
// State timer counters.
|
||||
static int nonsharedtimer;
|
||||
|
@ -665,7 +665,7 @@ static void processInputBits(player_struct *p, ControlInfo &info)
|
|||
if (buttonMap.ButtonDown(gamefunc_Dpad_Select) && info.dz < 0) j = 12;
|
||||
|
||||
if (j && (loc.sbits & SKB_WEAPONMASK_BITS) == 0)
|
||||
loc.sbits |= ESyncBits::FromInt(j * SKB_FIRST_WEAPON_BIT);
|
||||
loc.sbits |= EDukeSyncBits::FromInt(j * SKB_FIRST_WEAPON_BIT);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1050,7 +1050,7 @@ void playerCenterView(int snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerLookUp(int snum, ESyncBits sb_snum)
|
||||
void playerLookUp(int snum, EDukeSyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -1062,7 +1062,7 @@ void playerLookUp(int snum, ESyncBits sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerLookDown(int snum, ESyncBits sb_snum)
|
||||
void playerLookDown(int snum, EDukeSyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -1074,7 +1074,7 @@ void playerLookDown(int snum, ESyncBits sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerAimUp(int snum, ESyncBits sb_snum)
|
||||
void playerAimUp(int snum, EDukeSyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
@ -1085,7 +1085,7 @@ void playerAimUp(int snum, ESyncBits sb_snum)
|
|||
}
|
||||
}
|
||||
|
||||
void playerAimDown(int snum, ESyncBits sb_snum)
|
||||
void playerAimDown(int snum, EDukeSyncBits sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
SetGameVarID(g_iReturnVarID, 0, p->i, snum);
|
||||
|
|
|
@ -41,7 +41,7 @@ source as it is released.
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
void fireweapon_ww(int snum);
|
||||
void operateweapon_ww(int snum, ESyncBits sb_snum, int psect);
|
||||
void operateweapon_ww(int snum, EDukeSyncBits sb_snum, int psect);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -1548,7 +1548,7 @@ void checkweapons_d(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz, int cz, int shrunk)
|
||||
static void operateJetpack(int snum, EDukeSyncBits sb_snum, int psectlotag, int fz, int cz, int shrunk)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -1622,7 +1622,7 @@ static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz,
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist, int psectlotag)
|
||||
static void movement(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist, int psectlotag)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -1809,7 +1809,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
|
||||
static void underwater(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -2058,7 +2058,7 @@ static void fireweapon(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
static void operateweapon(int snum, EDukeSyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -2514,7 +2514,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void processweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
static void processweapon(int snum, EDukeSyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -2599,7 +2599,7 @@ void processinput_d(int snum)
|
|||
{
|
||||
int j, i, k, doubvel, fz, cz, hz, lz, truefdist;
|
||||
char shrunk;
|
||||
ESyncBits sb_snum;
|
||||
EDukeSyncBits sb_snum;
|
||||
short psect, psectlotag, pi;
|
||||
struct player_struct* p;
|
||||
spritetype* s;
|
||||
|
@ -3065,12 +3065,12 @@ HORIZONLY:
|
|||
processweapon(snum, sb_snum, psect);
|
||||
}
|
||||
|
||||
void processweapon_d(int s, ESyncBits ss, int p)
|
||||
void processweapon_d(int s, EDukeSyncBits ss, int p)
|
||||
{
|
||||
processweapon(s, ss, p);
|
||||
}
|
||||
|
||||
void processmove_d(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
void processmove_d(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
int psectlotag = sector[psect].lotag;
|
||||
auto p = &ps[snum];
|
||||
|
|
|
@ -1509,7 +1509,7 @@ void checkweapons_r(struct player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void onMotorcycle(int snum, ESyncBits &sb_snum)
|
||||
static void onMotorcycle(int snum, EDukeSyncBits &sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -1802,7 +1802,7 @@ static void onMotorcycle(int snum, ESyncBits &sb_snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void onBoat(int snum, ESyncBits& sb_snum)
|
||||
static void onBoat(int snum, EDukeSyncBits& sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -2086,7 +2086,7 @@ static void onBoat(int snum, ESyncBits& sb_snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist, int psectlotag)
|
||||
static void movement(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist, int psectlotag)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pi = p->i;
|
||||
|
@ -2316,7 +2316,7 @@ static void movement(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void underwater(int snum, ESyncBits sb_snum, int psect, int fz, int cz)
|
||||
static void underwater(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz)
|
||||
{
|
||||
int j;
|
||||
auto p = &ps[snum];
|
||||
|
@ -2740,7 +2740,7 @@ static void fireweapon(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
static void operateweapon(int snum, EDukeSyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -3332,7 +3332,7 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void processweapon(int snum, ESyncBits sb_snum, int psect)
|
||||
static void processweapon(int snum, EDukeSyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
@ -3397,7 +3397,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
int j, i, k, doubvel, fz, cz, hz, lz, truefdist, var60;
|
||||
char shrunk;
|
||||
ESyncBits sb_snum;
|
||||
EDukeSyncBits sb_snum;
|
||||
short psect, psectlotag, pi;
|
||||
struct player_struct* p;
|
||||
spritetype* s;
|
||||
|
@ -4099,12 +4099,12 @@ HORIZONLY:
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void processweapon_r(int s, ESyncBits ss, int p)
|
||||
void processweapon_r(int s, EDukeSyncBits ss, int p)
|
||||
{
|
||||
processweapon(s, ss, p);
|
||||
}
|
||||
|
||||
void processmove_r(int snum, ESyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
void processmove_r(int snum, EDukeSyncBits sb_snum, int psect, int fz, int cz, int shrunk, int truefdist)
|
||||
{
|
||||
int psectlotag = sector[psect].lotag;
|
||||
auto p = &ps[snum];
|
||||
|
|
|
@ -306,7 +306,7 @@ void fireweapon_ww(int snum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void operateweapon_ww(int snum, ESyncBits sb_snum, int psect)
|
||||
void operateweapon_ww(int snum, EDukeSyncBits sb_snum, int psect)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
|
|
@ -104,7 +104,7 @@ void fakedomovethings(void)
|
|||
input *syn;
|
||||
struct player_struct *p;
|
||||
int i, j, k, doubvel, fz, cz, hz, lz, x, y;
|
||||
ESyncBits sb_snum;
|
||||
EDukeSyncBits sb_snum;
|
||||
short psect, psectlotag, tempsect, backcstat;
|
||||
uint8_t shrunk, spritebridge;
|
||||
|
||||
|
|
Loading…
Reference in a new issue