mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Remove dead code
This commit is contained in:
parent
102ea6734c
commit
cceeed43f7
@ -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.
|
* \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:
|
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||||
if (g_bFullScreen)
|
if (g_bFullScreen)
|
||||||
{
|
|
||||||
RestoreGame();
|
|
||||||
g_lastPhase = 999;
|
g_lastPhase = 999;
|
||||||
}
|
|
||||||
if (!g_bFullScreen && g_bTermInit)
|
if (!g_bFullScreen && g_bTermInit)
|
||||||
{
|
{
|
||||||
totalDim.x = 64;
|
totalDim.x = 64;
|
||||||
@ -334,8 +301,6 @@ static void HandleEvent (const SDL_Event &event)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||||
if (g_bFullScreen)
|
|
||||||
FlushGame();
|
|
||||||
SDL_SetWindowTitle (g_window, "Blupi -- stop");
|
SDL_SetWindowTitle (g_window, "Blupi -- stop");
|
||||||
if (g_pSound != nullptr)
|
if (g_pSound != nullptr)
|
||||||
g_pSound->SuspendMusic();
|
g_pSound->SuspendMusic();
|
||||||
|
@ -1674,21 +1674,6 @@ void CEvent::SetMenu (Sint32 button, Sint32 menu)
|
|||||||
m_buttons[index].SetMenu (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.
|
// Crée tous les boutons nécessaires à la phase en cours.
|
||||||
|
|
||||||
bool CEvent::CreateButtons ()
|
bool CEvent::CreateButtons ()
|
||||||
|
@ -74,7 +74,6 @@ public:
|
|||||||
void MovieToStart();
|
void MovieToStart();
|
||||||
Uint32 GetPhase();
|
Uint32 GetPhase();
|
||||||
void TryInsert();
|
void TryInsert();
|
||||||
void RestoreGame();
|
|
||||||
|
|
||||||
Sint32 GetButtonIndex (Sint32 button);
|
Sint32 GetButtonIndex (Sint32 button);
|
||||||
Sint32 GetState (Sint32 button);
|
Sint32 GetState (Sint32 button);
|
||||||
|
@ -92,13 +92,6 @@ bool CPixmap::Create (POINT dim,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lib�re les bitmaps.
|
|
||||||
|
|
||||||
bool CPixmap::Flush()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rempli une zone rectangulaire avec une couleur uniforme.
|
// Rempli une zone rectangulaire avec une couleur uniforme.
|
||||||
|
|
||||||
void CPixmap::Fill (RECT rect, COLORREF color)
|
void CPixmap::Fill (RECT rect, COLORREF color)
|
||||||
|
@ -15,7 +15,6 @@ public:
|
|||||||
~CPixmap();
|
~CPixmap();
|
||||||
|
|
||||||
bool Create (POINT dim, bool bFullScreen, Sint32 mouseType);
|
bool Create (POINT dim, bool bFullScreen, Sint32 mouseType);
|
||||||
bool Flush();
|
|
||||||
void Fill (RECT rect, COLORREF color);
|
void Fill (RECT rect, COLORREF color);
|
||||||
|
|
||||||
bool Cache (Sint32 channel, const char *pFilename, POINT totalDim,
|
bool Cache (Sint32 channel, const char *pFilename, POINT totalDim,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user