aboutsummaryrefslogtreecommitdiff
path: root/engines/access/amazon/amazon_game.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-10 11:56:14 -0400
committerPaul Gilbert2014-08-10 11:56:14 -0400
commit0e3f9e983d51759e0d6373e95c71b2130e7f181c (patch)
tree4bde4a6b2863572447766707cb5a1edbb1301176 /engines/access/amazon/amazon_game.cpp
parentba1f8b2f6bf7362d011d01aa7106e5bd6d38366d (diff)
downloadscummvm-rg350-0e3f9e983d51759e0d6373e95c71b2130e7f181c.tar.gz
scummvm-rg350-0e3f9e983d51759e0d6373e95c71b2130e7f181c.tar.bz2
scummvm-rg350-0e3f9e983d51759e0d6373e95c71b2130e7f181c.zip
ACCESS: Changed _objectsTable from raw data array to SpriteResource array
Diffstat (limited to 'engines/access/amazon/amazon_game.cpp')
-rw-r--r--engines/access/amazon/amazon_game.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 5c2cda61aa..fe158125b5 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -125,8 +125,9 @@ void AmazonEngine::doTitle() {
_screen->forceFadeIn();
_sound->playSound(1);
- _objectsTable[0] = _files->loadFile(0, 2);
- SpriteResource *spr = new SpriteResource(this, _objectsTable[0], _files->_filesize);
+ byte *spriteData = _files->loadFile(0, 2);
+ _objectsTable[0] = new SpriteResource(this, spriteData, _files->_filesize,
+ DisposeAfterUse::YES);
_sound->playSound(1);
@@ -143,11 +144,11 @@ void AmazonEngine::doTitle() {
_buffer2.copyFrom(_buffer1);
int id = READ_LE_UINT16(COUNTDOWN + _pCount * 4);
int xp = READ_LE_UINT16(COUNTDOWN + _pCount * 4 + 2);
- _screen->plotImage(spr, id, Common::Point(xp, 71));
+ _screen->plotImage(_objectsTable[0], id, Common::Point(xp, 71));
}
// TODO: More to do
- delete spr;
+ delete _objectsTable[0];
}
void AmazonEngine::doOpening() {