aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v80he.cpp
diff options
context:
space:
mode:
authorMax Horn2005-05-10 14:07:21 +0000
committerMax Horn2005-05-10 14:07:21 +0000
commit22f4b63df824e6452613b9ca75b1dc9e2739a484 (patch)
tree7be3d2734907f33a55e4198b74b17387ab06b04c /scumm/script_v80he.cpp
parent249deed3b2017d3b82f7447eb74090883f69eab0 (diff)
downloadscummvm-rg350-22f4b63df824e6452613b9ca75b1dc9e2739a484.tar.gz
scummvm-rg350-22f4b63df824e6452613b9ca75b1dc9e2739a484.tar.bz2
scummvm-rg350-22f4b63df824e6452613b9ca75b1dc9e2739a484.zip
Another fix, more cleanup
svn-id: r18033
Diffstat (limited to 'scumm/script_v80he.cpp')
-rw-r--r--scumm/script_v80he.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 7bb5ceca86..ee9c88ccb7 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -646,8 +646,6 @@ void ScummEngine_v80he::drawLine(int x1, int y1, int x, int y, int step, int typ
y = y1;
x = x1;
- const int tmpA = absDY;
- int tmbB = 0;
if (type == 2) {
Actor *a = derefActor(id, "drawLine");
@@ -665,24 +663,27 @@ void ScummEngine_v80he::drawLine(int x1, int y1, int x, int y, int step, int typ
}
int var_C = 0;
- int ebx = 0;
+ int tmpX = 0;
+ int tmpY = 0;
for (int i = 0; i <= maxDist; i++) {
- ebx += absDX;
- tmbB += tmpA;
+ tmpX += absDX;
+ tmpY += absDY;
int eax = 0;
- if (ebx > maxDist) {
+ if (tmpX > maxDist) {
eax = 1;
+ tmpX -= maxDist;
+
if (dx >= 0) {
x++;
} else {
x--;
}
}
- if (tmbB > maxDist) {
+ if (tmpY > maxDist) {
eax = dy;
- tmbB -= maxDist;
+ tmpY -= maxDist;
if (dy >= 0) {
y++;