diff --git a/engines/griffon/draw.cpp b/engines/griffon/draw.cpp index e1eb308ad8f..37d9f46f28e 100644 --- a/engines/griffon/draw.cpp +++ b/engines/griffon/draw.cpp @@ -745,23 +745,18 @@ void GriffonEngine::drawNPCs(int mode) { _npcinfo[i].floating = _npcinfo[i].floating - 16; float frame = _npcinfo[i].frame; - int cframe = _npcinfo[i].cframe; frame += 0.5 * _fpsr; while (frame >= 16) frame -= 16; - cframe = (int)(frame); - if (cframe > 16) - cframe = 16 - 1; + int cframe = (int)(frame); if (cframe < 0) cframe = 0; _npcinfo[i].frame = frame; _npcinfo[i].cframe = cframe; - cframe = _npcinfo[i].cframe; - rcSrc.left = 74 * wdir; rcSrc.top = (int)(cframe / 4) * 48; rcSrc.setWidth(74); @@ -937,23 +932,18 @@ void GriffonEngine::drawNPCs(int mode) { _npcinfo[i].floating = _npcinfo[i].floating - 16; float frame = _npcinfo[i].frame; - int cframe = _npcinfo[i].cframe; frame += 0.5 * _fpsr; while (frame >= 16) frame -= 16; - cframe = (int)(frame); - if (cframe > 16) - cframe = 16 - 1; + int cframe = (int)(frame); if (cframe < 0) cframe = 0; _npcinfo[i].frame = frame; _npcinfo[i].cframe = cframe; - cframe = _npcinfo[i].cframe; - rcSrc.left = 0; rcSrc.top = 0; rcSrc.setWidth(99); diff --git a/engines/griffon/logic.cpp b/engines/griffon/logic.cpp index 31bd5c483d0..310bfcc590d 100644 --- a/engines/griffon/logic.cpp +++ b/engines/griffon/logic.cpp @@ -80,7 +80,6 @@ void GriffonEngine::updateAnims() { int nframes = _objectInfo[i][0]; int o_animspd = _objectInfo[i][3]; float frame = _objectFrame[i][0]; - int cframe = _objectFrame[i][1]; // _objectinfo[i][6] = 0; // ?? out of bounds if (nframes > 1) { @@ -88,9 +87,7 @@ void GriffonEngine::updateAnims() { while (frame >= nframes) frame -= nframes; - cframe = (int)frame; // truncate fractional part - if (cframe > nframes) - cframe = nframes - 1; + int cframe = (int)frame; // truncate fractional part if (cframe < 0) cframe = 0; @@ -521,8 +518,6 @@ void GriffonEngine::updateNPCs() { frame -= 16; int cframe = (int)(frame); - if (cframe > 16) - cframe = 16 - 1; if (cframe < 0) cframe = 0; @@ -1248,7 +1243,6 @@ void GriffonEngine::updateNPCs() { void GriffonEngine::updateSpells() { int foundel[5]; - float npx, npy; long cl1, cl2, cl3; int ll[4][2]; @@ -1450,9 +1444,6 @@ void GriffonEngine::updateSpells() { ydif = (yloc + 24) - (_player.py + 12); if ((abs(xdif) < 24 && abs(ydif) < 24) && _player.pause < _ticks) { - npx = _player.px; - npy = _player.py; - float damage = (float)_npcinfo[spellinfo[i].npc].spelldamage * (1.0 + RND() * 0.5); if (_player.hp > 0) { @@ -1611,8 +1602,8 @@ void GriffonEngine::updateSpells() { spellinfo[i].frame = 0; _forcepause = false; - npx = _player.px + 12; - npy = _player.py + 20; + float npx = _player.px + 12; + float npy = _player.py + 20; int lx = (int)npx / 16; int ly = (int)npy / 16;