aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/bitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge2/bitmap.cpp')
-rw-r--r--engines/cge2/bitmap.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/cge2/bitmap.cpp b/engines/cge2/bitmap.cpp
index 7a7a88430c..c62a784110 100644
--- a/engines/cge2/bitmap.cpp
+++ b/engines/cge2/bitmap.cpp
@@ -274,13 +274,16 @@ BitmapPtr Bitmap::code(uint8 *map) {
return this;
}
-bool Bitmap::solidAt(int16 x, int16 y) {
- if ((x >= _w) || (y >= _h))
+bool Bitmap::solidAt(V2D pos) {
+ pos.x += _w >> 1;
+ pos.y = _h - pos.y;
+
+ if (!pos.limited(V2D(_vm, _w, _h)))
return false;
uint8 *m = _v;
- uint16 r = static_cast<uint16>(x) % 4;
- uint16 n0 = (kScrWidth * y + x) / 4;
+ uint16 r = static_cast<uint16>(pos.x) % 4;
+ uint16 n0 = (kScrWidth * pos.y + pos.x) / 4;
uint16 n = 0;
while (r) {