diff options
Diffstat (limited to 'engines/gob/cmpfile.cpp')
-rw-r--r-- | engines/gob/cmpfile.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp index 62ac9f3fa4..7b21c4c835 100644 --- a/engines/gob/cmpfile.cpp +++ b/engines/gob/cmpfile.cpp @@ -230,4 +230,17 @@ void CMPFile::draw(Surface &dest, uint16 left, uint16 top, uint16 right, uint16 dest.blit(*_surface, left, top, right, bottom, x, y, transp); } +uint16 CMPFile::addSprite(uint16 left, uint16 top, uint16 right, uint16 bottom) { + if (empty()) + return 0; + + const uint16 height = bottom - top + 1; + const uint16 width = right - left + 1; + + _maxWidth = MAX(_maxWidth , width); + _maxHeight = MAX(_maxHeight, height); + + return _coordinates->add(left, top, right, bottom); +} + } // End of namespace Gob |