aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/actors.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2013-08-19 03:08:11 +0300
committerFilippos Karapetis2013-08-19 03:08:58 +0300
commitd531484350291f037c896c05fdaf691231ef3c04 (patch)
treebe07e362767f156842dac5353522dd7b4b16c555 /engines/drascula/actors.cpp
parentd17dcc1cbed57b0c6861b5b0c91106aa26aa6b83 (diff)
downloadscummvm-rg350-d531484350291f037c896c05fdaf691231ef3c04.tar.gz
scummvm-rg350-d531484350291f037c896c05fdaf691231ef3c04.tar.bz2
scummvm-rg350-d531484350291f037c896c05fdaf691231ef3c04.zip
DRASCULA: Some renaming. Also, get rid of some extraneous globals
This removes the superfluous talkHeight, talkWidth and timeDiff variables. It also changes _loadedDifferentChapter to be a boolean
Diffstat (limited to 'engines/drascula/actors.cpp')
-rw-r--r--engines/drascula/actors.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp
index 9d5d6550fa..e0983809fa 100644
--- a/engines/drascula/actors.cpp
+++ b/engines/drascula/actors.cpp
@@ -135,7 +135,7 @@ void DrasculaEngine::startWalking() {
else
characterMoved = 0;
}
- startTime = getTime();
+ _startTime = getTime();
}
void DrasculaEngine::moveCharacters() {
@@ -239,7 +239,7 @@ void DrasculaEngine::moveCharacters() {
factor_red[curY + curHeight], frontSurface, screenSurface);
}
} else if (characterMoved == 1) {
- curPos[0] = _frameX[num_frame];
+ curPos[0] = _frameX[_characterFrame];
curPos[1] = frame_y + DIF_MASK_HARE;
curPos[2] = curX;
curPos[3] = curY;
@@ -369,13 +369,11 @@ void DrasculaEngine::quadrant_4() {
}
void DrasculaEngine::increaseFrameNum() {
- timeDiff = getTime() - startTime;
-
- if (timeDiff >= 6) {
- startTime = getTime();
- num_frame++;
- if (num_frame == 6)
- num_frame = 0;
+ if (getTime() - _startTime >= 6) {
+ _startTime = getTime();
+ _characterFrame++;
+ if (_characterFrame == 6)
+ _characterFrame = 0;
if (curDirection == kDirectionUp) {
curX -= stepX;