Browse Source

Switched all remaining uses of `UINT64` to `unsigned __int64` to make it compilable on <=VC5

pull/4/head
Dennis Duda 8 years ago
parent
commit
2f7f7d055e
  1. 4
      Source/inv.cpp
  2. 4
      Source/items.cpp
  3. 4
      Source/player.cpp
  4. 8
      structs.h

4
Source/inv.cpp

@ -1861,7 +1861,7 @@ void __fastcall RemoveInvItem(int pnum, int iv)
{
if ( plr[pnum]._pRSpell != SPL_INVALID )
{
// BUGFIX: Cast the literal `1` to `UINT64` to make that bitshift 64bit
// BUGFIX: Cast the literal `1` to `unsigned __int64` to make that bitshift 64bit
// this causes the last 4 skills to not reset correctly after use
if ( !(
plr[pnum]._pScrlSpells64
@ -1885,7 +1885,7 @@ void __fastcall RemoveSpdBarItem(int pnum, int iv)
{
if ( plr[pnum]._pRSpell != SPL_INVALID )
{
// BUGFIX: Cast the literal `1` to `UINT64` to make that bitshift 64bit
// BUGFIX: Cast the literal `1` to `unsigned __int64` to make that bitshift 64bit
// this causes the last 4 skills to not reset correctly after use
if ( !(
plr[pnum]._pScrlSpells64

4
Source/items.cpp

@ -775,7 +775,7 @@ void __fastcall CalcPlrItemVals(int p, BOOL Loadgfx)
int dadd = 0; // added dexterity
int vadd = 0; // added vitality
UINT64 spl = 0; // bitarray for all enabled/active spells
unsigned __int64 spl = 0; // bitarray for all enabled/active spells
signed int fr = 0; // fire resistance
signed int lr = 0; // lightning resistance
@ -938,7 +938,7 @@ void __fastcall CalcPlrItemVals(int p, BOOL Loadgfx)
// check if the current RSplType is a valid/allowed spell
if ( plr[p]._pRSplType == RSPLTYPE_CHARGES
&& !(spl & ((UINT64)1 << (plr[p]._pRSpell - 1))) )
&& !(spl & ((unsigned __int64)1 << (plr[p]._pRSpell - 1))) )
{
plr[p]._pRSpell = SPL_INVALID;
plr[p]._pRSplType = RSPLTYPE_INVALID;

4
Source/player.cpp

@ -3105,7 +3105,7 @@ BOOL __fastcall PM_DoSpell(int pnum)
if ( !plr[pnum]._pSplFrom ) {
if ( plr[pnum]._pRSplType == RSPLTYPE_SCROLL) {
if ( !(plr[pnum]._pScrlSpells64
& (UINT64)1 << (plr[pnum]._pRSpell - 1))
& (unsigned __int64)1 << (plr[pnum]._pRSpell - 1))
) {
plr[pnum]._pRSpell = SPL_INVALID;
plr[pnum]._pRSplType = RSPLTYPE_INVALID;
@ -3115,7 +3115,7 @@ BOOL __fastcall PM_DoSpell(int pnum)
if ( plr[pnum]._pRSplType == RSPLTYPE_CHARGES) {
if ( !(plr[pnum]._pISpells64
& (UINT64)1 << (plr[pnum]._pRSpell - 1))
& (unsigned __int64)1 << (plr[pnum]._pRSpell - 1))
) {
plr[pnum]._pRSpell = SPL_INVALID;
plr[pnum]._pRSplType = RSPLTYPE_INVALID;

8
structs.h

@ -213,15 +213,15 @@ struct PlayerStruct
char _pSBkSplType;
char _pSplLvl[64];
union {
__int64 _pMemSpells64;
unsigned __int64 _pMemSpells64;
int _pMemSpells[2];
};
union {
__int64 _pAblSpells64;
unsigned __int64 _pAblSpells64;
int _pAblSpells[2];
};
union {
__int64 _pScrlSpells64;
unsigned __int64 _pScrlSpells64;
int _pScrlSpells[2];
};
int _pSpellFlags;
@ -322,7 +322,7 @@ struct PlayerStruct
int _pIBonusAC;
int _pIBonusDamMod;
union {
__int64 _pISpells64;
unsigned __int64 _pISpells64;
int _pISpells[2];
};
int _pIFlags;

Loading…
Cancel
Save