diff options
author | Paul Gilbert | 2015-10-12 15:18:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-10-12 15:18:03 -0400 |
commit | b0016071ecf3f5ffbc6f1619af610ab648bbba3a (patch) | |
tree | f00f6b17bfd3475200e454cdfc09eba94d764f01 /engines/access/asurface.cpp | |
parent | 652a6623156b6c6bba8ca49e038945fd0c2b7780 (diff) | |
parent | fbcf667b6a57593a2b85622ad1e1380c8aef7210 (diff) | |
download | scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.gz scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.bz2 scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.zip |
Merge branch 'msvc_2015' into xeen
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) { |