aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2019-09-13 20:12:28 +0200
committerEugene Sandulenko2019-11-13 22:07:08 +0100
commit92e22e4153963b8bd57f149dc335ee852beaf7c0 (patch)
tree7e01b554ee21365dbc727f9e33cf69b77bb1ab20 /engines
parenta27a54433c7b2cfcdd97a8f12e9e38b69961fdb9 (diff)
downloadscummvm-rg350-92e22e4153963b8bd57f149dc335ee852beaf7c0.tar.gz
scummvm-rg350-92e22e4153963b8bd57f149dc335ee852beaf7c0.tar.bz2
scummvm-rg350-92e22e4153963b8bd57f149dc335ee852beaf7c0.zip
GRIFFON: Remove some dead code
Diffstat (limited to 'engines')
-rw-r--r--engines/griffon/draw.cpp14
-rw-r--r--engines/griffon/logic.cpp15
2 files changed, 5 insertions, 24 deletions
diff --git a/engines/griffon/draw.cpp b/engines/griffon/draw.cpp
index e1eb308ad8..37d9f46f28 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 31bd5c483d..310bfcc590 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;