From bc73c2fe7acfee848fc338e3fc9726e3c0992497 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sun, 5 Feb 2017 09:25:32 +0100 Subject: [PATCH] Fix crash by removing ddraw function --- event.cpp | 1 - pixmap.cpp | 12 ------------ pixmap.h | 1 - 3 files changed, 14 deletions(-) diff --git a/event.cpp b/event.cpp index 6dd71c7..f77e29a 100644 --- a/event.cpp +++ b/event.cpp @@ -4041,7 +4041,6 @@ bool CEvent::StartMovie(char *pFilename) void CEvent::StopMovie() { m_pMovie->Stop(); - m_pPixmap->RestorePalette(); m_pSound->Flush(SOUND_MOVIE); // m_pSound->RestartMusic(); ChangePhase(m_phase); diff --git a/pixmap.cpp b/pixmap.cpp index 58db4c8..1c8c505 100644 --- a/pixmap.cpp +++ b/pixmap.cpp @@ -389,18 +389,6 @@ bool CPixmap::SavePalette() return true; } -// Restitue toute la palette de couleurs. - -bool CPixmap::RestorePalette() -{ - HRESULT ddrval; - - ddrval = m_lpDDPal->SetEntries(0, 0, 256, m_pal); - - if ( ddrval != DD_OK ) return false; - return true; -} - // Cherche une couleur dans la palette principale. // En mode plein écran, il faut chercher dans la palette // correspondant aux images (obtenue avec SavePalette), diff --git a/pixmap.h b/pixmap.h index e3b4b48..6652f61 100644 --- a/pixmap.h +++ b/pixmap.h @@ -26,7 +26,6 @@ public: void Fill(RECT rect, COLORREF color); bool SavePalette(); - bool RestorePalette(); int SearchColor(int red, int green, int blue); bool Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim, bool bUsePalette); bool Cache(int channel, char *pFilename, POINT totalDim, bool bUsePalette);