Move MVESTREAM pointer up one layer
This commit is contained in:
parent
53aa70cecb
commit
19bb554f31
|
@ -10,6 +10,7 @@
|
|||
#define MVE_ERR_EOF 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
struct MVESTREAM;
|
||||
|
||||
struct MVE_videoSpec {
|
||||
int screenWidth;
|
||||
|
@ -19,10 +20,10 @@ struct MVE_videoSpec {
|
|||
int truecolor;
|
||||
};
|
||||
|
||||
int MVE_rmPrepMovie(void *stream, int x, int y, int track);
|
||||
int MVE_rmStepMovie();
|
||||
int MVE_rmPrepMovie(MVESTREAM *&, void *stream, int x, int y, int track);
|
||||
int MVE_rmStepMovie(MVESTREAM *mve);
|
||||
void MVE_rmHoldMovie();
|
||||
void MVE_rmEndMovie();
|
||||
void MVE_rmEndMovie(MVESTREAM *&mve);
|
||||
|
||||
void MVE_getVideoSpec(MVE_videoSpec *vSpec);
|
||||
|
||||
|
|
|
@ -660,9 +660,6 @@ static int end_chunk_handler(unsigned char major, unsigned char minor, const uns
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static MVESTREAM *mve = NULL;
|
||||
|
||||
void MVE_ioCallbacks(mve_cb_Read io_read)
|
||||
{
|
||||
mve_read = io_read;
|
||||
|
@ -684,7 +681,7 @@ void MVE_palCallbacks(mve_cb_SetPalette setpalette)
|
|||
mve_setpalette = setpalette;
|
||||
}
|
||||
|
||||
int MVE_rmPrepMovie(void *src, int x, int y, int track)
|
||||
int MVE_rmPrepMovie(MVESTREAM *&mve, void *src, int x, int y, int track)
|
||||
{
|
||||
if (mve) {
|
||||
mve_reset(mve);
|
||||
|
@ -733,7 +730,7 @@ void MVE_getVideoSpec(MVE_videoSpec *vSpec)
|
|||
}
|
||||
|
||||
|
||||
int MVE_rmStepMovie()
|
||||
int MVE_rmStepMovie(MVESTREAM *const mve)
|
||||
{
|
||||
static int init_timer=0;
|
||||
int cont=1;
|
||||
|
@ -758,7 +755,7 @@ int MVE_rmStepMovie()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void MVE_rmEndMovie()
|
||||
void MVE_rmEndMovie(MVESTREAM *&mve)
|
||||
{
|
||||
timer_stop();
|
||||
timer_created = 0;
|
||||
|
|
|
@ -80,6 +80,7 @@ static int init_subtitles(const char *filename);
|
|||
static subtitle Subtitles[MAX_SUBTITLES];
|
||||
static int Num_subtitles;
|
||||
static char *subtitle_raw_data;
|
||||
static MVESTREAM *pMovie;
|
||||
|
||||
class RunSubtitles
|
||||
{
|
||||
|
@ -343,7 +344,7 @@ static window_event_result MovieHandler(window *wind,const d_event &event, movie
|
|||
case EVENT_WINDOW_DRAW:
|
||||
if (!m->paused)
|
||||
{
|
||||
m->result = MVE_rmStepMovie();
|
||||
m->result = MVE_rmStepMovie(pMovie);
|
||||
if (m->result)
|
||||
{
|
||||
window_close(wind);
|
||||
|
@ -425,7 +426,7 @@ int RunMovie(char *filename, int hires_flag, int must_have,int dx,int dy)
|
|||
MVE_sfCallbacks(MovieShowFrame);
|
||||
MVE_palCallbacks(MovieSetPalette);
|
||||
|
||||
if (MVE_rmPrepMovie((void *)filehndl, dx, dy, track)) {
|
||||
if (MVE_rmPrepMovie(pMovie, (void *)filehndl, dx, dy, track)) {
|
||||
Int3();
|
||||
SDL_FreeRW(filehndl);
|
||||
window_close(wind);
|
||||
|
@ -442,7 +443,7 @@ int RunMovie(char *filename, int hires_flag, int must_have,int dx,int dy)
|
|||
|
||||
Assert(m.aborted || m.result == MVE_ERR_EOF); ///movie should be over
|
||||
|
||||
MVE_rmEndMovie();
|
||||
MVE_rmEndMovie(pMovie);
|
||||
|
||||
SDL_FreeRW(filehndl); // Close Movie File
|
||||
if (reshow)
|
||||
|
@ -466,19 +467,19 @@ int RotateRobot()
|
|||
{
|
||||
int err;
|
||||
|
||||
err = MVE_rmStepMovie();
|
||||
err = MVE_rmStepMovie(pMovie);
|
||||
|
||||
gr_palette_load(gr_palette);
|
||||
|
||||
if (err == MVE_ERR_EOF) //end of movie, so reset
|
||||
{
|
||||
SDL_RWseek(RoboFile, 0, SEEK_SET);
|
||||
if (MVE_rmPrepMovie(RoboFile, SWIDTH/2.3, SHEIGHT/2.3, 0))
|
||||
if (MVE_rmPrepMovie(pMovie, RoboFile, SWIDTH/2.3, SHEIGHT/2.3, 0))
|
||||
{
|
||||
Int3();
|
||||
return 0;
|
||||
}
|
||||
err = MVE_rmStepMovie();
|
||||
err = MVE_rmStepMovie(pMovie);
|
||||
}
|
||||
if (err) {
|
||||
Int3();
|
||||
|
@ -491,7 +492,7 @@ int RotateRobot()
|
|||
|
||||
void DeInitRobotMovie(void)
|
||||
{
|
||||
MVE_rmEndMovie();
|
||||
MVE_rmEndMovie(pMovie);
|
||||
SDL_FreeRW(RoboFile); // Close Movie File
|
||||
}
|
||||
|
||||
|
@ -519,7 +520,7 @@ int InitRobotMovie(const char *filename)
|
|||
|
||||
Vid_State = VID_PLAY;
|
||||
|
||||
if (MVE_rmPrepMovie((void *)RoboFile, SWIDTH/2.3, SHEIGHT/2.3, 0)) {
|
||||
if (MVE_rmPrepMovie(pMovie, (void *)RoboFile, SWIDTH/2.3, SHEIGHT/2.3, 0)) {
|
||||
Int3();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue