diff options
author | johndoe123 | 2014-01-30 20:18:55 +0100 |
---|---|---|
committer | johndoe123 | 2014-01-30 20:18:55 +0100 |
commit | cf51529cfd0fedb33b1b0c70beb59997b21cfc5b (patch) | |
tree | 1df30e23c7f1eac7ca4a8ddfba40c89c2577dda7 /engines/fullpipe/fullpipe.cpp | |
parent | 542197a891eac799855571fe2849e0dca43bdd2b (diff) | |
parent | 462f7c1c24a48b7555316a3afae357bad14cc14b (diff) | |
download | scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.gz scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.bz2 scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.zip |
Merge remote-tracking branch 'origin/master' into bbvs
Diffstat (limited to 'engines/fullpipe/fullpipe.cpp')
-rw-r--r-- | engines/fullpipe/fullpipe.cpp | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 5e1af1227c..b1e366c3a1 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -33,11 +33,14 @@ #include "fullpipe/behavior.h" #include "fullpipe/modal.h" #include "fullpipe/input.h" +#include "fullpipe/motion.h" #include "fullpipe/scenes.h" +#include "fullpipe/floaters.h" +#include "fullpipe/console.h" namespace Fullpipe { -FullpipeEngine *g_fullpipe = 0; +FullpipeEngine *g_fp = 0; Vars *g_vars = 0; FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { @@ -50,6 +53,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _rnd = new Common::RandomSource("fullpipe"); + _console = 0; _gameProjectVersion = 0; _pictureScale = 8; @@ -78,9 +82,16 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _modalObject = 0; + _liftEnterMQ = 0; + _liftExitMQ = 0; + _lift = 0; + _lastLiftButton = 0; + _liftX = 0; + _liftY = 0; + _gameContinue = true; _needRestart = false; - _flgPlayIntro = false; + _flgPlayIntro = true; _gamePaused = false; _inputArFlag = false; _recordEvents = false; @@ -90,12 +101,17 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _isProcessingMessages = false; _musicAllowed = -1; + _musicGameVar = 0; _aniMan = 0; _aniMan2 = 0; _currentScene = 0; + _loaderScene = 0; _scene2 = 0; + _scene3 = 0; _movTable = 0; + _floaters = 0; + _mgm = 0; _globalMessageQueueList = 0; _messageHandlers = 0; @@ -142,14 +158,22 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _objectAtCursor = 0; _objectIdAtCursor = 0; + _arcadeOverlay = 0; + _arcadeOverlayHelper = 0; + _arcadeOverlayX = 0; + _arcadeOverlayY = 0; + _arcadeOverlayMidX = 0; + _arcadeOverlayMidY = 0; + _isSaveAllowed = true; - g_fullpipe = this; + g_fp = this; g_vars = new Vars; } FullpipeEngine::~FullpipeEngine() { delete _rnd; + delete _console; delete _globalMessageQueueList; } @@ -161,6 +185,9 @@ void FullpipeEngine::initialize() { _sceneRect.top = 0; _sceneRect.right = 799; _sceneRect.bottom = 599; + + _floaters = new Floaters; + _mgm = new MGM; } Common::Error FullpipeEngine::run() { @@ -170,13 +197,15 @@ Common::Error FullpipeEngine::run() { _backgroundSurface.create(800, 600, format); + _console = new Console(this); + initialize(); _isSaveAllowed = false; int scene = 0; if (ConfMan.hasKey("boot_param")) - scene = ConfMan.getInt("boot_param"); + scene = convertScene(ConfMan.getInt("boot_param")); if (!loadGam("fullpipe.gam", scene)) return Common::kNoGameDataFoundError; @@ -268,6 +297,11 @@ void FullpipeEngine::updateEvents() { return; break; default: + if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) { + // Start the debugger + getDebugger()->attach(); + getDebugger()->onFrame(); + } ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = event.kbd.keycode; ex->_excFlags |= 3; @@ -424,21 +458,6 @@ void FullpipeEngine::setObjectState(const char *name, int state) { var->setSubVarAsInt(name, state); } -void FullpipeEngine::updateMapPiece(int mapId, int update) { - for (int i = 0; i < 200; i++) { - int hiWord = (_mapTable[i] >> 16) & 0xffff; - - if (hiWord == mapId) { - _mapTable[i] |= update; - return; - } - if (!hiWord) { - _mapTable[i] = (mapId << 16) | update; - return; - } - } -} - void FullpipeEngine::disableSaves(ExCommand *ex) { warning("STUB: FullpipeEngine::disableSaves()"); } |