diff options
author | Paul Gilbert | 2014-08-05 22:17:30 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-08-05 22:17:30 -0400 |
commit | 7d605ce57316c86a247cf978e6b123b23045659c (patch) | |
tree | d6fb956e8aa56fb2a1579c09211f8f6a3c696d70 /engines/access/room.cpp | |
parent | f1309a7b0b7e98256b45e9977c62f040452d54c4 (diff) | |
download | scummvm-rg350-7d605ce57316c86a247cf978e6b123b23045659c.tar.gz scummvm-rg350-7d605ce57316c86a247cf978e6b123b23045659c.tar.bz2 scummvm-rg350-7d605ce57316c86a247cf978e6b123b23045659c.zip |
ACCESS: Implement outer room handler
Diffstat (limited to 'engines/access/room.cpp')
-rw-r--r-- | engines/access/room.cpp | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/engines/access/room.cpp b/engines/access/room.cpp new file mode 100644 index 0000000000..25d3584ede --- /dev/null +++ b/engines/access/room.cpp @@ -0,0 +1,130 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/scummsys.h" +#include "access/access.h" +#include "access/room.h" + +namespace Access { + +Room::Room(AccessEngine *vm) : _vm(vm) { + _function = 0; +} + +void Room::doRoom() { + bool reloadFlag = false; + + while (!_vm->shouldQuit()) { + if (!reloadFlag) { + _vm->_numImages = 0; + _vm->_newRect.clear(); + _vm->_oldRect.clear(); + _vm->_nextImage = 0; + _vm->_numAnimTimers = 0; + } + + reloadFlag = false; + _vm->_startup = 0; + _function = 0; + + while (!_vm->shouldQuit()) { + _vm->_numImages = 0; + if (_vm->_startup != -1 && --_vm->_startup != 0) { + --_vm->_startup; + _vm->_events->showCursor(); + _vm->_screen->fadeIn(); + } + + _vm->_events->pollEvents(); + _vm->_nextImage = 0; + _vm->_player->walk(); + _vm->_sound->midiRepeat(); + _vm->_screen->checkScroll(); + doCommands(); + + // DOROOMFLASHBACK jump point + if (_function == 1) { + clearRoom(); + break; + } else if (_function == 2) { + clearRoom(); + return; + } else if (_function == 3) { + reloadRoom1(); + reloadFlag = true; + break; + } else if (_function == 4) { + break; + } + + if (_vm->_screen->_scrollFlag) { + _vm->_screen->copyBF1BF2(); + _vm->_newRect.clear(); + _function = 0; + roomLoop(); + + if (_function == 1) { + clearRoom(); + break; + } else { + _vm->_screen->plotList(); + _vm->_screen->copyRects(); + + _vm->_screen->copyBF2Vid(); + } + } else { + _vm->_screen->copyBF1BF2(); + _vm->_newRect.clear(); + _function = 0; + roomLoop(); + + if (_function == 1) { + clearRoom(); + break; + } else { + _vm->_screen->plotList(); + _vm->_screen->copyBlocks(); + } + } + } + } +} + +void Room::clearRoom() { + // TODO +} + +void Room::reloadRoom1() { + // TODO +} + +void Room::roomLoop() { + // TODO +} + + +void Room::doCommands() { + +} + + +} // End of namespace Access |