Remove deprecated ffmpeg initialization
This commit is contained in:
parent
c4409487fd
commit
628a27b38b
2 changed files with 6 additions and 52 deletions
55
src/bink.c
55
src/bink.c
|
@ -31,8 +31,6 @@ extern float PlatVolumeToGain(int volume);
|
||||||
|
|
||||||
#define FRAMEQUEUESIZE 4
|
#define FRAMEQUEUESIZE 4
|
||||||
|
|
||||||
static BOOL binkInitialized = FALSE;
|
|
||||||
|
|
||||||
struct binkMovie
|
struct binkMovie
|
||||||
{
|
{
|
||||||
AVFormatContext* avContext;
|
AVFormatContext* avContext;
|
||||||
|
@ -464,40 +462,11 @@ int BinkUpdateMovie(struct binkMovie* aMovie)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
BOOL BinkSys_Init()
|
|
||||||
{
|
|
||||||
if(binkInitialized)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
av_register_all();
|
|
||||||
|
|
||||||
binkInitialized = TRUE;
|
|
||||||
return binkInitialized;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void BinkSys_Release()
|
|
||||||
{
|
|
||||||
if(!binkInitialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
binkInitialized = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void PlayBinkedFMV(char *filenamePtr, int volume)
|
void PlayBinkedFMV(char *filenamePtr, int volume)
|
||||||
{
|
{
|
||||||
if(!binkInitialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
struct binkMovie movie;
|
struct binkMovie movie;
|
||||||
|
|
||||||
if(BinkStartMovie(&movie, filenamePtr, FALSE, FALSE, FALSE))
|
if(BinkStartMovie(&movie, filenamePtr, FALSE, FALSE, FALSE))
|
||||||
|
@ -519,18 +488,12 @@ struct binkMovie menuBackgroundMovie;
|
||||||
|
|
||||||
void StartMenuBackgroundBink()
|
void StartMenuBackgroundBink()
|
||||||
{
|
{
|
||||||
if(!binkInitialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
BinkStartMovie(&menuBackgroundMovie, "FMVs/Menubackground.bik", TRUE, FALSE, FALSE);
|
BinkStartMovie(&menuBackgroundMovie, "FMVs/Menubackground.bik", TRUE, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int PlayMenuBackgroundBink()
|
int PlayMenuBackgroundBink()
|
||||||
{
|
{
|
||||||
if(!binkInitialized)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ClearScreenToBlack();
|
ClearScreenToBlack();
|
||||||
if(BinkUpdateMovie(&menuBackgroundMovie))
|
if(BinkUpdateMovie(&menuBackgroundMovie))
|
||||||
{
|
{
|
||||||
|
@ -543,9 +506,6 @@ int PlayMenuBackgroundBink()
|
||||||
|
|
||||||
void EndMenuBackgroundBink()
|
void EndMenuBackgroundBink()
|
||||||
{
|
{
|
||||||
if(!binkInitialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
BinkReleaseMovie(&menuBackgroundMovie);
|
BinkReleaseMovie(&menuBackgroundMovie);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,7 +516,7 @@ struct binkMovie musicMovie;
|
||||||
|
|
||||||
int StartMusicBink(char* filenamePtr, BOOL looping)
|
int StartMusicBink(char* filenamePtr, BOOL looping)
|
||||||
{
|
{
|
||||||
if(!binkInitialized || !SoundSys_IsOn())
|
if(!SoundSys_IsOn())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int ret = BinkStartMovie(&musicMovie, filenamePtr, looping, FALSE, TRUE);
|
int ret = BinkStartMovie(&musicMovie, filenamePtr, looping, FALSE, TRUE);
|
||||||
|
@ -565,7 +525,7 @@ int StartMusicBink(char* filenamePtr, BOOL looping)
|
||||||
|
|
||||||
int PlayMusicBink(int volume)
|
int PlayMusicBink(int volume)
|
||||||
{
|
{
|
||||||
if(!binkInitialized || !SoundSys_IsOn())
|
if(!SoundSys_IsOn())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if(!musicMovie.avContext)
|
if(!musicMovie.avContext)
|
||||||
|
@ -592,7 +552,7 @@ int PlayMusicBink(int volume)
|
||||||
|
|
||||||
void EndMusicBink()
|
void EndMusicBink()
|
||||||
{
|
{
|
||||||
if(!binkInitialized || !SoundSys_IsOn())
|
if(!SoundSys_IsOn())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BinkReleaseMovie(&musicMovie);
|
BinkReleaseMovie(&musicMovie);
|
||||||
|
@ -604,9 +564,6 @@ void EndMusicBink()
|
||||||
|
|
||||||
FMVHandle CreateBinkFMV(char* filenamePtr)
|
FMVHandle CreateBinkFMV(char* filenamePtr)
|
||||||
{
|
{
|
||||||
if(!binkInitialized)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
struct binkMovie* movie = malloc(sizeof(struct binkMovie));
|
struct binkMovie* movie = malloc(sizeof(struct binkMovie));
|
||||||
BinkInitMovieStruct(movie);
|
BinkInitMovieStruct(movie);
|
||||||
|
|
||||||
|
@ -621,7 +578,7 @@ FMVHandle CreateBinkFMV(char* filenamePtr)
|
||||||
|
|
||||||
int UpdateBinkFMV(FMVHandle aFmvHandle, int volume)
|
int UpdateBinkFMV(FMVHandle aFmvHandle, int volume)
|
||||||
{
|
{
|
||||||
if(!binkInitialized || aFmvHandle==0)
|
if(aFmvHandle==0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||||
|
@ -636,7 +593,7 @@ int UpdateBinkFMV(FMVHandle aFmvHandle, int volume)
|
||||||
|
|
||||||
void CloseBinkFMV(FMVHandle aFmvHandle)
|
void CloseBinkFMV(FMVHandle aFmvHandle)
|
||||||
{
|
{
|
||||||
if(!binkInitialized || aFmvHandle==0)
|
if(aFmvHandle==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||||
|
@ -647,7 +604,7 @@ void CloseBinkFMV(FMVHandle aFmvHandle)
|
||||||
|
|
||||||
char* GetBinkFMVImage(FMVHandle aFmvHandle)
|
char* GetBinkFMVImage(FMVHandle aFmvHandle)
|
||||||
{
|
{
|
||||||
if(!binkInitialized || aFmvHandle==0)
|
if(aFmvHandle==0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||||
|
|
|
@ -1231,8 +1231,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
SoundSys_Start();
|
SoundSys_Start();
|
||||||
|
|
||||||
BinkSys_Init();
|
|
||||||
|
|
||||||
if (WantCDRom) CDDA_Start();
|
if (WantCDRom) CDDA_Start();
|
||||||
|
|
||||||
InitTextStrings();
|
InitTextStrings();
|
||||||
|
@ -1424,7 +1422,6 @@ if (AvP_MainMenus())
|
||||||
ExitSystem();
|
ExitSystem();
|
||||||
|
|
||||||
CDDA_End();
|
CDDA_End();
|
||||||
BinkSys_Release();
|
|
||||||
|
|
||||||
ClearMemoryPool();
|
ClearMemoryPool();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue