1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Pass the pixmap to the movie class

This commit is contained in:
Mathieu Schroeter 2018-07-24 23:58:49 +02:00
parent 8d67df23b1
commit d1fc426e48
3 changed files with 7 additions and 3 deletions

View File

@ -1061,7 +1061,7 @@ DoInit (int argc, char * argv[], bool & exit)
g_pSound->SetState (true); g_pSound->SetState (true);
// Create the movie manager. // Create the movie manager.
g_pMovie = new CMovie; g_pMovie = new CMovie (g_pPixmap);
if (g_pMovie == nullptr) if (g_pMovie == nullptr)
{ {
InitFail ("New movie"); InitFail ("New movie");

View File

@ -163,8 +163,10 @@ CMovie::playMovie ()
Kit_PlayerPause (m_player); Kit_PlayerPause (m_player);
} }
CMovie::CMovie () CMovie::CMovie (CPixmap * pixmap)
{ {
this->pixmap = pixmap;
m_bEnable = false; m_bEnable = false;
m_fPlaying = false; m_fPlaying = false;
m_fMovieOpen = false; m_fMovieOpen = false;

View File

@ -26,13 +26,14 @@ struct Kit_Source;
struct Kit_Player; struct Kit_Player;
struct Kit_PlayerInfo; struct Kit_PlayerInfo;
struct SDL_Texture; struct SDL_Texture;
class CPixmap;
#define AUDIOBUFFER_SIZE (32768) #define AUDIOBUFFER_SIZE (32768)
class CMovie class CMovie
{ {
public: public:
CMovie (); CMovie (CPixmap * pixmap);
~CMovie (); ~CMovie ();
bool Create (); bool Create ();
@ -52,6 +53,7 @@ protected:
bool initAVI (); bool initAVI ();
protected: protected:
CPixmap * pixmap;
Kit_Source * m_movie; Kit_Source * m_movie;
Kit_Player * m_player; Kit_Player * m_player;
SDL_Texture * m_videoTex; SDL_Texture * m_videoTex;