diff options
Diffstat (limited to 'engines/gob/rxyfile.cpp')
-rw-r--r-- | engines/gob/rxyfile.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/gob/rxyfile.cpp b/engines/gob/rxyfile.cpp index 5311eece0f..9702dc8c7f 100644 --- a/engines/gob/rxyfile.cpp +++ b/engines/gob/rxyfile.cpp @@ -30,6 +30,15 @@ RXYFile::RXYFile(Common::SeekableReadStream &rxy) : _width(0), _height(0) { load(rxy); } +RXYFile::RXYFile(uint16 width, uint16 height) : _realCount(1), _width(width), _height(height) { + _coords.resize(1); + + _coords[0].left = 0; + _coords[0].top = 0; + _coords[0].right = _width - 1; + _coords[0].bottom = _height - 1; +} + RXYFile::~RXYFile() { } @@ -79,4 +88,15 @@ void RXYFile::load(Common::SeekableReadStream &rxy) { } } +uint16 RXYFile::add(uint16 left, uint16 top, uint16 right, uint16 bottom) { + _coords.resize(_coords.size() + 1); + + _coords.back().left = left; + _coords.back().top = top; + _coords.back().right = right; + _coords.back().bottom = bottom; + + return _coords.size() - 1; +} + } // End of namespace Gob |