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);
// Create the movie manager.
g_pMovie = new CMovie;
g_pMovie = new CMovie (g_pPixmap);
if (g_pMovie == nullptr)
{
InitFail ("New movie");

View File

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

View File

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