diff options
author | Travis Howell | 2005-04-12 13:44:06 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-12 13:44:06 +0000 |
commit | 003b3a3f487500e17788590ea1c5e75b55221765 (patch) | |
tree | fd1d33c148fc4463f9aaec3d7cd6bc62b6eef0f8 /scumm/wiz_he.cpp | |
parent | 4efa8da52a1f64796562629c286be09ea10fd624 (diff) | |
download | scummvm-rg350-003b3a3f487500e17788590ea1c5e75b55221765.tar.gz scummvm-rg350-003b3a3f487500e17788590ea1c5e75b55221765.tar.bz2 scummvm-rg350-003b3a3f487500e17788590ea1c5e75b55221765.zip |
Add missing segment
svn-id: r17568
Diffstat (limited to 'scumm/wiz_he.cpp')
-rw-r--r-- | scumm/wiz_he.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scumm/wiz_he.cpp b/scumm/wiz_he.cpp index 5e6b8a3403..e08436b11b 100644 --- a/scumm/wiz_he.cpp +++ b/scumm/wiz_he.cpp @@ -172,6 +172,43 @@ bool Wiz::polygonContains(const WizPolygon &pol, int x, int y) { diry = curdir; } + // HE80+ + int a, b; + pi = pol.numVerts - 1; + if (r == 0) { + for (int i = 0; i < pol.numVerts; i++) { + if (pol.vert[i].y == y && pol.vert[i].y == pol.vert[pi].y) { + + a = pol.vert[i].x; + b = pol.vert[pi].x; + + if (pol.vert[i].x >= pol.vert[pi].x) + a = pol.vert[pi].x; + + if (pol.vert[i].x > pol.vert[pi].x) + b = pol.vert[i].x; + + if (x >= a && x <= b) + return 1; + + } else if (pol.vert[i].x == x && pol.vert[i].x == pol.vert[pi].x) { + + a = pol.vert[i].y; + b = pol.vert[i].y; + + if (pol.vert[i].y >= pol.vert[pi].y) + a = pol.vert[pi].y; + + if (pol.vert[i].y <= pol.vert[pi].y) + b = pol.vert[pi].y; + + if (y >= a && y <= b) + return 1; + } + pi = i; + } + } + return r; } |