diff options
author | Paul Gilbert | 2014-03-06 22:31:41 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-03-06 22:31:41 -0500 |
commit | a77ed90618664e50705b3e59dd2111faec2f5f39 (patch) | |
tree | b7f55059e7902cf0d2007fcecb015029aa21d37a /engines/mads/msurface.cpp | |
parent | c9186f51b9502a4cfb1881f2db4f92eeb6227144 (diff) | |
download | scummvm-rg350-a77ed90618664e50705b3e59dd2111faec2f5f39.tar.gz scummvm-rg350-a77ed90618664e50705b3e59dd2111faec2f5f39.tar.bz2 scummvm-rg350-a77ed90618664e50705b3e59dd2111faec2f5f39.zip |
MADS: Implementing support methods needed for scene 804 initialisation
Diffstat (limited to 'engines/mads/msurface.cpp')
-rw-r--r-- | engines/mads/msurface.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp index 754fea851d..74043bf91f 100644 --- a/engines/mads/msurface.cpp +++ b/engines/mads/msurface.cpp @@ -497,4 +497,17 @@ MSurface *MSurface::flipHorizontal() const { return dest; } +/*------------------------------------------------------------------------*/ + +int DepthSurface::getDepth(const Common::Point &pt) { + + if (_vm->_game->_scene._sceneInfo->_depthStyle == 2) { + int bits = (3 - (pt.x % 4)) * 2; + byte v = *getBasePtr(pt.x >> 2, pt.y); + return v >> bits; + } else { + return *getBasePtr(pt.x, pt.y) & 0xF; + } +} + } // End of namespace MADS |