From a6150f9308f24f55793b8be07f8756d39763b59b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 27 Nov 2015 12:12:32 -0500 Subject: ACCESS: Creation of access.dat for holding Access games engine data --- engines/access/access.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'engines/access/access.cpp') diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 56fa6c7533..bc9bcb4b08 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -34,19 +34,24 @@ namespace Access { AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) : _gameDescription(gameDesc), Engine(syst), _randomSource("Access"), _useItem(_flags[99]), _startup(_flags[170]), _manScaleOff(_flags[172]) { + _aboutBox = nullptr; _animation = nullptr; _bubbleBox = nullptr; _char = nullptr; _debugger = nullptr; _events = nullptr; _files = nullptr; + _invBox = nullptr; _inventory = nullptr; + _helpBox = nullptr; _midi = nullptr; _player = nullptr; + _res = nullptr; _room = nullptr; _screen = nullptr; _scripts = nullptr; _sound = nullptr; + _travelBox = nullptr; _video = nullptr; _destIn = nullptr; @@ -130,6 +135,7 @@ AccessEngine::~AccessEngine() { delete _inventory; delete _midi; delete _player; + delete _res; delete _room; delete _screen; delete _scripts; @@ -204,6 +210,13 @@ void AccessEngine::initialize() { } Common::Error AccessEngine::run() { + _res = Resources::init(this); + Common::String errorMessage; + if (!_res->load(errorMessage)) { + GUIErrorMessage(errorMessage); + return Common::kNoError; + } + setVGA(); initialize(); -- cgit v1.2.3 From 9c7569b74bf3493f7970a912ae54b87d73e6633e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 10 Mar 2016 21:51:06 -0500 Subject: ACCESS: Changed engine to use Graphics::ManagedSurface --- engines/access/access.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'engines/access/access.cpp') diff --git a/engines/access/access.cpp b/engines/access/access.cpp index bc9bcb4b08..c12761af4a 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -436,20 +436,9 @@ void AccessEngine::copyBF1BF2() { } void AccessEngine::copyBF2Vid() { - const byte *srcP = (const byte *)_buffer2.getPixels(); - byte *destP = (byte *)_screen->getBasePtr(_screen->_windowXAdd, - _screen->_windowYAdd + _screen->_screenYOff); - - for (int yp = 0; yp < _screen->_vWindowLinesTall; ++yp) { - Common::copy(srcP, srcP + _screen->_vWindowBytesWide, destP); - srcP += _buffer2.pitch; - destP += _screen->pitch; - } - - // Add dirty rect for affected area - Common::Rect r(_screen->_vWindowBytesWide, _screen->_vWindowLinesTall); - r.moveTo(_screen->_windowXAdd, _screen->_windowYAdd + _screen->_screenYOff); - _screen->addDirtyRect(r); + _screen->blitFrom(_buffer2, + Common::Rect(0, 0, _screen->_vWindowBytesWide, _screen->_vWindowLinesTall), + Common::Point(_screen->_windowXAdd, _screen->_windowYAdd)); } void AccessEngine::playVideo(int videoNum, const Common::Point &pt) { -- cgit v1.2.3 From ac8adb07c835885584517674b9b03bab14e8a772 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 26 May 2016 21:21:03 -0400 Subject: ACCESS: Refactor ASurface and Screen to not use virtual inheritance --- engines/access/access.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/access/access.cpp') diff --git a/engines/access/access.cpp b/engines/access/access.cpp index c12761af4a..6f91bd76dd 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -244,7 +244,7 @@ void AccessEngine::freeCells() { } } -void AccessEngine::speakText(ASurface *s, const Common::String &msg) { +void AccessEngine::speakText(BaseSurface *s, const Common::String &msg) { Common::String lines = msg; Common::String line; int curPage = 0; @@ -325,7 +325,7 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { } } -void AccessEngine::printText(ASurface *s, const Common::String &msg) { +void AccessEngine::printText(BaseSurface *s, const Common::String &msg) { Common::String lines = msg; Common::String line; int width = 0; -- cgit v1.2.3