diff options
author | Nipun Garg | 2019-07-04 23:29:23 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:11 +0200 |
commit | d70888269ed5dc5aacf55b5eacdacffcaa311f5c (patch) | |
tree | 14bdc9fb2356f7256e3994f66519067ae1fc6019 /engines/hdb | |
parent | 49cb33911e9cfa9250fb8737cc4adc8c9185f940 (diff) | |
download | scummvm-rg350-d70888269ed5dc5aacf55b5eacdacffcaa311f5c.tar.gz scummvm-rg350-d70888269ed5dc5aacf55b5eacdacffcaa311f5c.tar.bz2 scummvm-rg350-d70888269ed5dc5aacf55b5eacdacffcaa311f5c.zip |
HDB: Modify the return type of draw functions
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/gfx.cpp | 16 | ||||
-rw-r--r-- | engines/hdb/gfx.h | 8 |
2 files changed, 16 insertions, 8 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 2f3e501d7d..36ec659e0b 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -732,7 +732,7 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) { return _surface; } -void Picture::draw(int x, int y) { +int Picture::draw(int x, int y) { g_hdb->_gfx->_globalSurface.blitFrom(_surface, Common::Point(x, y)); Common::Rect clip(_surface.getBounds()); @@ -740,10 +740,12 @@ void Picture::draw(int x, int y) { clip.clip(g_hdb->_gfx->_globalSurface.getBounds()); if (!clip.isEmpty()) { g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); + return 1; } + return 0; } -void Picture::drawMasked(int x, int y) { +int Picture::drawMasked(int x, int y) { g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); Common::Rect clip(_surface.getBounds()); @@ -751,7 +753,9 @@ void Picture::drawMasked(int x, int y) { clip.clip(g_hdb->_gfx->_globalSurface.getBounds()); if (!clip.isEmpty()) { g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); + return 1; } + return 0; } Tile::Tile() : _flags(0), _name("") { @@ -782,7 +786,7 @@ Graphics::Surface Tile::load(Common::SeekableReadStream *stream) { return _surface; } -void Tile::draw(int x, int y) { +int Tile::draw(int x, int y) { g_hdb->_gfx->_globalSurface.blitFrom(_surface, Common::Point(x, y)); Common::Rect clip(_surface.getBounds()); @@ -790,10 +794,12 @@ void Tile::draw(int x, int y) { clip.clip(g_hdb->_gfx->_globalSurface.getBounds()); if (!clip.isEmpty()) { g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); + return 1; } + return 0; } -void Tile::drawMasked(int x, int y) { +int Tile::drawMasked(int x, int y) { g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f); Common::Rect clip(_surface.getBounds()); @@ -801,7 +807,9 @@ void Tile::drawMasked(int x, int y) { clip.clip(g_hdb->_gfx->_globalSurface.getBounds()); if (!clip.isEmpty()) { g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); + return 1; } + return 0; } } diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h index 41277a1e4c..849ae693ea 100644 --- a/engines/hdb/gfx.h +++ b/engines/hdb/gfx.h @@ -217,8 +217,8 @@ public: ~Picture(); Graphics::Surface load(Common::SeekableReadStream *stream); - void draw(int x, int y); - void drawMasked(int x, int y); + int draw(int x, int y); + int drawMasked(int x, int y); uint _width, _height; @@ -239,8 +239,8 @@ public: ~Tile(); Graphics::Surface load(Common::SeekableReadStream *stream); - void draw(int x, int y); - void drawMasked(int x, int y); + int draw(int x, int y); + int drawMasked(int x, int y); uint32 _flags; |