aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/graphics.cpp
diff options
context:
space:
mode:
authorStrangerke2012-02-26 18:08:53 +0100
committerStrangerke2012-04-06 08:22:04 +0200
commit510cae8af11ec66d849d6d6912eacef048de8012 (patch)
treed4c0e74743c848667cb3337acacbb9c469dd0cba /engines/mortevielle/graphics.cpp
parentce56512c99b522e3942a84993360203d5f9e8fbc (diff)
downloadscummvm-rg350-510cae8af11ec66d849d6d6912eacef048de8012.tar.gz
scummvm-rg350-510cae8af11ec66d849d6d6912eacef048de8012.tar.bz2
scummvm-rg350-510cae8af11ec66d849d6d6912eacef048de8012.zip
MORTEVIELLE: Start removing deline() and delig
Diffstat (limited to 'engines/mortevielle/graphics.cpp')
-rw-r--r--engines/mortevielle/graphics.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index 7511b21ce2..bec7ef4073 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -1112,18 +1112,22 @@ void ScreenSurface::drawLine(int x, int y, int xx, int yy, int coul) {
a = (float)((x - xx)) / (y - yy);
b = (yr * xro - yro * xr) / (y - yy);
i = y;
- if (y > yy) step = -1;
- else step = 1;
+ if (y > yy)
+ step = -1;
+ else
+ step = 1;
do {
g_vm->_screenSurface.setPixel(Common::Point(abs((int)(a * i + b)), i), coul);
- i = i + step;
+ i += step;
} while (i != yy);
} else {
a = (float)((y - yy)) / (x - xx);
b = ((yro * xr) - (yr * xro)) / (x - xx);
i = x;
- if (x > xx) step = -1;
- else step = 1;
+ if (x > xx)
+ step = -1;
+ else
+ step = 1;
do {
g_vm->_screenSurface.setPixel(Common::Point(i, abs((int)(a * i + b))), coul);
i = i + step;