mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
49 lines
939 B
C++
49 lines
939 B
C++
// movie.h
|
|
//
|
|
|
|
#pragma once
|
|
|
|
struct Kit_Source;
|
|
struct Kit_Player;
|
|
struct Kit_PlayerInfo;
|
|
struct SDL_Texture;
|
|
|
|
#define AUDIOBUFFER_SIZE (32768)
|
|
|
|
class CMovie
|
|
{
|
|
public:
|
|
CMovie();
|
|
~CMovie();
|
|
|
|
bool Create();
|
|
bool GetEnable();
|
|
bool IsExist(char *pFilename);
|
|
bool Play(RECT rect, char *pFilename);
|
|
void Stop();
|
|
bool Render ();
|
|
|
|
protected:
|
|
void playMovie(int nDirection);
|
|
bool fileOpenMovie(RECT rect, char *pFilename);
|
|
void fileCloseMovie();
|
|
void termAVI();
|
|
bool initAVI();
|
|
|
|
protected:
|
|
Kit_PlayerInfo *pinfo;
|
|
Kit_Source *m_movie;
|
|
Kit_Player *m_player;
|
|
SDL_Texture *m_videoTex;
|
|
int m_ret;
|
|
SDL_AudioDeviceID m_audioDev;
|
|
|
|
char m_audiobuf[AUDIOBUFFER_SIZE];
|
|
bool m_bEnable;
|
|
MCIDEVICEID m_wMCIDeviceID; // MCI Device ID for the AVI file
|
|
HWND m_hwndMovie; // window handle of the movie
|
|
bool m_fPlaying; // Play flag: true == playing, false == paused
|
|
bool m_fMovieOpen; // Open flag: true == movie open, false = none
|
|
};
|
|
|