From c0a7852662be724077921bcf9b9bb0bf2da2dfff Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 27 Aug 2014 22:13:43 -0400 Subject: ACCESS: Refactor the file manager to return resource structures --- engines/access/martian/martian_game.cpp | 6 +++--- engines/access/martian/martian_room.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/access/martian') diff --git a/engines/access/martian/martian_game.cpp b/engines/access/martian/martian_game.cpp index f087b56ac6..969267f719 100644 --- a/engines/access/martian/martian_game.cpp +++ b/engines/access/martian/martian_game.cpp @@ -106,9 +106,9 @@ void MartianEngine::doTitle() { _screen->forceFadeIn(); _sound->playSound(1); - byte *spriteData = _files->loadFile(0, 2); - _objectsTable[0] = new SpriteResource(this, spriteData, _files->_filesize, - DisposeAfterUse::YES); + Resource *spriteData = _files->loadFile(0, 2); + _objectsTable[0] = new SpriteResource(this, spriteData); + delete spriteData; _sound->playSound(1); diff --git a/engines/access/martian/martian_room.cpp b/engines/access/martian/martian_room.cpp index 80eaf59fec..52eead7c0b 100644 --- a/engines/access/martian/martian_room.cpp +++ b/engines/access/martian/martian_room.cpp @@ -117,9 +117,9 @@ void MartianRoom::roomSet() { } void MartianRoom::roomMenu() { - byte *iconData = _vm->_files->loadFile("ICONS.LZ"); - SpriteResource *spr = new SpriteResource(_vm, iconData, _vm->_files->_filesize); - delete[] iconData; + Resource *iconData = _vm->_files->loadFile("ICONS.LZ"); + SpriteResource *spr = new SpriteResource(_vm, iconData); + delete iconData; _vm->_screen->saveScreen(); _vm->_screen->setDisplayScan(); -- cgit v1.2.3