aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-05-15 11:16:35 +0200
committeruruk2014-05-15 11:16:35 +0200
commit99c15216c71f5f75632a7e38573a2387be39fed9 (patch)
tree9eec8d3f1d96fbb7478c88a7d31bf4af98cd23a8 /engines
parentb2cbc7cdd17d2e998cc2dd4273ec8966fbe8e58f (diff)
downloadscummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.tar.gz
scummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.tar.bz2
scummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.zip
CGE2: Add Bitmap::xLatPos().
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/bitmap.cpp5
-rw-r--r--engines/cge2/bitmap.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/cge2/bitmap.cpp b/engines/cge2/bitmap.cpp
index 6237feaa5d..39483b067d 100644
--- a/engines/cge2/bitmap.cpp
+++ b/engines/cge2/bitmap.cpp
@@ -368,4 +368,9 @@ bool Bitmap::loadVBM(EncryptedStream *f) {
return (!f->err());
}
+void Bitmap::xLatPos(V2D& p) {
+ p.x -= (_w >> 1);
+ p.y = kWorldHeight - p.y - _h;
+}
+
} // End of namespace CGE2
diff --git a/engines/cge2/bitmap.h b/engines/cge2/bitmap.h
index 3d3c27f97e..ea7146f0d7 100644
--- a/engines/cge2/bitmap.h
+++ b/engines/cge2/bitmap.h
@@ -28,7 +28,7 @@
#ifndef CGE2_BITMAP_H
#define CGE2_BITMAP_H
-#include "cge/general.h"
+#include "cge2/general.h"
#include "common/file.h"
namespace CGE2 {
@@ -77,6 +77,7 @@ public:
void show(int16 x, int16 y);
void xShow(int16 x, int16 y);
bool solidAt(int16 x, int16 y);
+ void xLatPos(V2D& p);
};