diff options
author | uruk | 2014-05-15 11:16:35 +0200 |
---|---|---|
committer | uruk | 2014-05-15 11:16:35 +0200 |
commit | 99c15216c71f5f75632a7e38573a2387be39fed9 (patch) | |
tree | 9eec8d3f1d96fbb7478c88a7d31bf4af98cd23a8 | |
parent | b2cbc7cdd17d2e998cc2dd4273ec8966fbe8e58f (diff) | |
download | scummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.tar.gz scummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.tar.bz2 scummvm-rg350-99c15216c71f5f75632a7e38573a2387be39fed9.zip |
CGE2: Add Bitmap::xLatPos().
-rw-r--r-- | engines/cge2/bitmap.cpp | 5 | ||||
-rw-r--r-- | engines/cge2/bitmap.h | 3 |
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); }; |