From cceeed43f71391434c5ee6b81f2a293ae97b0f5c Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sun, 26 Feb 2017 17:47:24 +0100 Subject: [PATCH] Remove dead code --- src/blupi.cxx | 37 +------------------------------------ src/event.cxx | 15 --------------- src/event.h | 1 - src/pixmap.cxx | 7 ------- src/pixmap.h | 1 - 5 files changed, 1 insertion(+), 60 deletions(-) diff --git a/src/blupi.cxx b/src/blupi.cxx index e3b4887..e14ce4b 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -229,37 +229,6 @@ static void UpdateFrame (void) } } -/** - * \brief Restore the game after a fullscreen enabling. - * - * XXX: This method seems useless with SDL2. - * - * \returns true on success. - */ -static bool RestoreGame () -{ - if (g_pPixmap == nullptr) - return false; - - g_pEvent->RestoreGame (); - return true; -} - -/** - * \brief Flush the game before a fullscreen disabling. - * - * XXX: This method seems useless with SDL2. - * - * \returns true on success. - */ -static bool FlushGame () -{ - if (g_pPixmap == nullptr) - return false; - - return g_pPixmap->Flush (); -} - /** * \brief Finished with all objects we use; release them. */ @@ -314,10 +283,8 @@ static void HandleEvent (const SDL_Event &event) { case SDL_WINDOWEVENT_FOCUS_GAINED: if (g_bFullScreen) - { - RestoreGame(); g_lastPhase = 999; - } + if (!g_bFullScreen && g_bTermInit) { totalDim.x = 64; @@ -334,8 +301,6 @@ static void HandleEvent (const SDL_Event &event) return; case SDL_WINDOWEVENT_FOCUS_LOST: - if (g_bFullScreen) - FlushGame(); SDL_SetWindowTitle (g_window, "Blupi -- stop"); if (g_pSound != nullptr) g_pSound->SuspendMusic(); diff --git a/src/event.cxx b/src/event.cxx index c13905b..5907b19 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -1674,21 +1674,6 @@ void CEvent::SetMenu (Sint32 button, Sint32 menu) m_buttons[index].SetMenu (menu); } - - -// Restitue le jeu après une activation en mode fullScreen. - -void CEvent::RestoreGame() -{ - if (m_phase == WM_PHASE_PLAY && m_index < 0) - return; - - HideMouse (false); - WaitMouse (true); - WaitMouse (false); // force le changement de sprite ! -} - - // Crée tous les boutons nécessaires à la phase en cours. bool CEvent::CreateButtons () diff --git a/src/event.h b/src/event.h index 7ecacc5..b62020c 100644 --- a/src/event.h +++ b/src/event.h @@ -74,7 +74,6 @@ public: void MovieToStart(); Uint32 GetPhase(); void TryInsert(); - void RestoreGame(); Sint32 GetButtonIndex (Sint32 button); Sint32 GetState (Sint32 button); diff --git a/src/pixmap.cxx b/src/pixmap.cxx index 0fd6dfc..775c502 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -92,13 +92,6 @@ bool CPixmap::Create (POINT dim, return true; } -// Lib�re les bitmaps. - -bool CPixmap::Flush() -{ - return true; -} - // Rempli une zone rectangulaire avec une couleur uniforme. void CPixmap::Fill (RECT rect, COLORREF color) diff --git a/src/pixmap.h b/src/pixmap.h index 033b00c..517afb7 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -15,7 +15,6 @@ public: ~CPixmap(); bool Create (POINT dim, bool bFullScreen, Sint32 mouseType); - bool Flush(); void Fill (RECT rect, COLORREF color); bool Cache (Sint32 channel, const char *pFilename, POINT totalDim,