diff --git a/Source/player.cpp b/Source/player.cpp index ef65ac296..849614279 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -2795,7 +2795,7 @@ BOOL PM_DoSpell(int pnum) plr[pnum].WorldY, plr[pnum]._pVar1, plr[pnum]._pVar2, - FALSE, + 0, plr[pnum]._pVar4); if (!plr[pnum]._pSplFrom) { diff --git a/Source/spells.cpp b/Source/spells.cpp index bb7a336e3..49b314685 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -25,8 +25,7 @@ int GetManaAmount(int id, int sn) adj = sl * (spelldata[SPL_RESURRECT].sManaCost / 8); } - if (spelldata[sn].sManaCost == 255) // TODO: check sign - { + if (spelldata[sn].sManaCost == 255) { i = (BYTE)plr[id]._pMaxManaBase; } else { i = spelldata[sn].sManaCost; @@ -105,17 +104,16 @@ BOOL CheckSpell(int id, int sn, BYTE st, BOOL manaonly) return result; } -void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl) +void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int caster, int spllvl) { int i; int dir; // missile direction - // ugly switch, but generates the right code switch (caster) { - case TRUE: + case 1: dir = monster[id]._mdir; break; - case FALSE: + case 0: // caster must be 0 already in this case, but oh well, // it's needed to generate the right code caster = 0; @@ -143,8 +141,10 @@ void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int } } -// pnum: player index -// rid: target player index +/** + * @param pnum player index + * @param rid target player index + */ void DoResurrect(int pnum, int rid) { int hp; diff --git a/Source/spells.h b/Source/spells.h index d0a58a8f9..9376d27c3 100644 --- a/Source/spells.h +++ b/Source/spells.h @@ -5,7 +5,7 @@ int GetManaAmount(int id, int sn); void UseMana(int id, int sn); BOOL CheckSpell(int id, int sn, BYTE st, BOOL manaonly); -void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, BOOL caster, int spllvl); +void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int caster, int spllvl); void DoResurrect(int pnum, int rid); void PlacePlayer(int pnum); void DoHealOther(int pnum, int rid);