diff options
author | Paul Gilbert | 2012-05-05 22:33:13 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-05 22:33:13 +1000 |
commit | 4fc57f13491781893edf4b4aa6e477b0e0fc02b8 (patch) | |
tree | cfd2ff2f252c247c0a4317263d87d689f27b8ff2 /engines/tony | |
parent | 5625846bf2a0015e212ea2f1d97543cbba81e0c7 (diff) | |
download | scummvm-rg350-4fc57f13491781893edf4b4aa6e477b0e0fc02b8.tar.gz scummvm-rg350-4fc57f13491781893edf4b4aa6e477b0e0fc02b8.tar.bz2 scummvm-rg350-4fc57f13491781893edf4b4aa6e477b0e0fc02b8.zip |
TONY: Added some class field initialisations
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/gfxengine.cpp | 2 | ||||
-rw-r--r-- | engines/tony/loc.cpp | 25 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 40 |
3 files changed, 38 insertions, 29 deletions
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 27db5c18bf..f98942403d 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -288,7 +288,7 @@ SKIPCLICKSINISTRO: } // Anima Tony - m_tony.DoFrame(&m_bigBuf,m_nCurLoc); + m_tony.DoFrame(&m_bigBuf, m_nCurLoc); // Aggiorna lo scrolling per tenere Tony dentro lo schermo if (m_tony.MustUpdateScrolling() && m_bLocationLoaded) { diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index 4bb1832102..9a2f4cfe6a 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -819,10 +819,21 @@ RMItem::RMItem() { m_bCurFlag = 0; m_patterns = NULL; m_sprites = NULL; - m_sfx= NULL; + m_sfx = NULL; m_curScroll.Set(0, 0); - m_bInitCurPattern=true; + m_bInitCurPattern = true; m_nCurPattern = 0; + m_z = 0; + m_cm = CM_256; + m_FX = 0; + m_FXparm = 0; + m_mpalCode = 0; + m_nSprites = 0; + m_nSfx = 0; + m_nPatterns = 0; + m_hEndPattern = 0; + m_bPal = 0; + m_nCurSprite = 0; m_hEndPattern = CreateEvent(NULL, false, false, NULL); } @@ -1632,6 +1643,16 @@ RMCharacter::RMCharacter() { curSpeed = 3; bRemoveFromOT = false; bMoving = false; + curLocation = 0; + curbox = 0; + dx = dy = 0; + olddx = olddy = 0; + fx = fy = slope = 0; + walkspeed = walkstatus = 0; + nextbox = 0; + pathlenght = pathcount = 0; + status = STAND; + theBoxes = NULL; m_pos.Set(0, 0); } diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index 293646e3f8..cf746dc978 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -375,45 +375,33 @@ void TonyEngine::Abort(void) { void TonyEngine::Play(void) { // Main game loop while (!shouldQuit() && !m_bQuitNow) { + // Se siamo in pausa, entra nel loop appropriato + if (m_bPaused) + PauseLoop(); + g_system->delayMillis(50); - _window.Repaint(); Common::Event evt; while (g_system->getEventManager()->pollEvent(evt)) ; - } -#if 0 - MSG msg; + // Call the engine to handle the next frame + _theEngine.DoFrame(m_bDrawLocation); - do { - // Se siamo in pausa, entra nel loop appropriato - if (m_bPaused) - PauseLoop(); - - // Redraw del graphic engine - theEngine.DoFrame(m_bDrawLocation); - - // Avverte che è finito un frame + // Warns that a frame is finished PulseEvent(m_hEndOfFrame); - // Passa il buffer dall'engine alla finestra + // Handle drawing the frame if (!m_bPaused) { - if (!theEngine.m_bWiping) - _window.GetNewFrame(theEngine, NULL); + if (!_theEngine.m_bWiping) + _window.GetNewFrame(_theEngine, NULL); else - _window.GetNewFrame(theEngine, &theEngine.m_rcWipeEllipse); + _window.GetNewFrame(_theEngine, &_theEngine.m_rcWipeEllipse); } - // Loop minchia dei messaggi - if (PeekMessage(&msg, _window, 0, 0, true)) { - if (!TranslateAccelerator(_window, m_hacc, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } while (msg.message != WM_QUIT && !m_bQuitNow); -#endif + // Paint the frame onto the screen + _window.Repaint(); + } } |