dxx-rebirth/d2x-rebirth/include/libmve.h

64 lines
1.6 KiB
C
Raw Normal View History

2014-06-01 17:55:23 +00:00
/*
* This file is part of the DXX-Rebirth project <http://www.dxx-rebirth.com/>.
* It is copyright by its individual contributors, as recorded in the
* project's Git history. See COPYING.txt at the top level for license
* terms and a link to the Git history.
*/
2006-03-20 17:12:09 +00:00
#ifndef _LIBMVE_H
#define _LIBMVE_H
#define MVE_ERR_EOF 1
#ifdef __cplusplus
2014-10-29 02:59:08 +00:00
#include <memory>
2014-10-29 02:57:52 +00:00
struct MVESTREAM;
struct MVE_videoSpec {
2006-03-20 17:12:09 +00:00
int screenWidth;
int screenHeight;
int width;
int height;
int truecolor;
};
2006-03-20 17:12:09 +00:00
2014-10-29 02:57:52 +00:00
int MVE_rmStepMovie(MVESTREAM *mve);
2006-03-20 17:12:09 +00:00
void MVE_rmHoldMovie();
2014-10-29 02:57:52 +00:00
void MVE_rmEndMovie(MVESTREAM *&mve);
2006-03-20 17:12:09 +00:00
2014-10-29 02:59:08 +00:00
struct MVESTREAM_deleter_t
{
void operator()(MVESTREAM *p) const
{
MVE_rmEndMovie(p);
}
};
typedef std::unique_ptr<MVESTREAM, MVESTREAM_deleter_t> MVESTREAM_ptr_t;
int MVE_rmPrepMovie(MVESTREAM_ptr_t &, void *stream, int x, int y, int track);
2006-03-20 17:12:09 +00:00
void MVE_getVideoSpec(MVE_videoSpec *vSpec);
void MVE_sndInit(int x);
typedef unsigned int (*mve_cb_Read)(void *stream,
void *buffer,
unsigned int count);
2014-10-10 02:43:40 +00:00
typedef void *(*mve_cb_Alloc)(size_t size);
2006-03-20 17:12:09 +00:00
typedef void (*mve_cb_Free)(void *ptr);
typedef void (*mve_cb_ShowFrame)(unsigned char *buffer, int dstx, int dsty, int bufw, int bufh, int sw, int sh);
2006-03-20 17:12:09 +00:00
2014-10-10 02:44:15 +00:00
typedef void (*mve_cb_SetPalette)(const unsigned char *p,
2006-03-20 17:12:09 +00:00
unsigned int start, unsigned int count);
void MVE_ioCallbacks(mve_cb_Read io_read);
void MVE_memCallbacks(mve_cb_Alloc mem_alloc, mve_cb_Free mem_free);
void MVE_sfCallbacks(mve_cb_ShowFrame showframe);
void MVE_palCallbacks(mve_cb_SetPalette setpalette);
#endif
2006-03-20 17:12:09 +00:00
#endif /* _LIBMVE_H */