diff options
Diffstat (limited to 'engines/access/asurface.cpp')
-rw-r--r-- | engines/access/asurface.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index 5f4372d5af..526690807a 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -54,6 +54,12 @@ SpriteResource::~SpriteResource() { SpriteFrame::SpriteFrame(AccessEngine *vm, Common::SeekableReadStream *stream, int frameSize) { int xSize = stream->readUint16LE(); int ySize = stream->readUint16LE(); + + if (vm->getGameID() == GType_MartianMemorandum) { + int size = stream->readUint16LE(); + if (size != frameSize) + warning("Unexpected file difference: framesize %d - size %d %d - unknown %d", frameSize, xSize, ySize, size); + } create(xSize, ySize); // Empty surface @@ -312,6 +318,21 @@ void ASurface::drawRect() { Graphics::Surface::fillRect(Common::Rect(_orgX1, _orgY1, _orgX2, _orgY2), _lColor); } +void ASurface::drawLine(int x1, int y1, int x2, int y2, int col) { + Graphics::Surface::drawLine(x1, y1, x2, y2, col); +} + +void ASurface::drawLine() { + Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); +} + +void ASurface::drawBox() { + Graphics::Surface::drawLine(_orgX1, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::Surface::drawLine(_orgX1, _orgY2, _orgX2, _orgY2, _lColor); + Graphics::Surface::drawLine(_orgX2, _orgY1, _orgX2, _orgY1, _lColor); + Graphics::Surface::drawLine(_orgX2, _orgY2, _orgX2, _orgY2, _lColor); +} + void ASurface::flipHorizontal(ASurface &dest) { dest.create(this->w, this->h); for (int y = 0; y < h; ++y) { |