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
|
||||
|
||||
static BOOL binkInitialized = FALSE;
|
||||
|
||||
struct binkMovie
|
||||
{
|
||||
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)
|
||||
{
|
||||
if(!binkInitialized)
|
||||
return;
|
||||
|
||||
struct binkMovie movie;
|
||||
|
||||
if(BinkStartMovie(&movie, filenamePtr, FALSE, FALSE, FALSE))
|
||||
|
@ -519,18 +488,12 @@ struct binkMovie menuBackgroundMovie;
|
|||
|
||||
void StartMenuBackgroundBink()
|
||||
{
|
||||
if(!binkInitialized)
|
||||
return;
|
||||
|
||||
BinkStartMovie(&menuBackgroundMovie, "FMVs/Menubackground.bik", TRUE, FALSE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
int PlayMenuBackgroundBink()
|
||||
{
|
||||
if(!binkInitialized)
|
||||
return 0;
|
||||
|
||||
ClearScreenToBlack();
|
||||
if(BinkUpdateMovie(&menuBackgroundMovie))
|
||||
{
|
||||
|
@ -543,9 +506,6 @@ int PlayMenuBackgroundBink()
|
|||
|
||||
void EndMenuBackgroundBink()
|
||||
{
|
||||
if(!binkInitialized)
|
||||
return;
|
||||
|
||||
BinkReleaseMovie(&menuBackgroundMovie);
|
||||
}
|
||||
|
||||
|
@ -556,7 +516,7 @@ struct binkMovie musicMovie;
|
|||
|
||||
int StartMusicBink(char* filenamePtr, BOOL looping)
|
||||
{
|
||||
if(!binkInitialized || !SoundSys_IsOn())
|
||||
if(!SoundSys_IsOn())
|
||||
return 0;
|
||||
|
||||
int ret = BinkStartMovie(&musicMovie, filenamePtr, looping, FALSE, TRUE);
|
||||
|
@ -565,7 +525,7 @@ int StartMusicBink(char* filenamePtr, BOOL looping)
|
|||
|
||||
int PlayMusicBink(int volume)
|
||||
{
|
||||
if(!binkInitialized || !SoundSys_IsOn())
|
||||
if(!SoundSys_IsOn())
|
||||
return 1;
|
||||
|
||||
if(!musicMovie.avContext)
|
||||
|
@ -592,7 +552,7 @@ int PlayMusicBink(int volume)
|
|||
|
||||
void EndMusicBink()
|
||||
{
|
||||
if(!binkInitialized || !SoundSys_IsOn())
|
||||
if(!SoundSys_IsOn())
|
||||
return;
|
||||
|
||||
BinkReleaseMovie(&musicMovie);
|
||||
|
@ -604,9 +564,6 @@ void EndMusicBink()
|
|||
|
||||
FMVHandle CreateBinkFMV(char* filenamePtr)
|
||||
{
|
||||
if(!binkInitialized)
|
||||
return 0;
|
||||
|
||||
struct binkMovie* movie = malloc(sizeof(struct binkMovie));
|
||||
BinkInitMovieStruct(movie);
|
||||
|
||||
|
@ -621,7 +578,7 @@ FMVHandle CreateBinkFMV(char* filenamePtr)
|
|||
|
||||
int UpdateBinkFMV(FMVHandle aFmvHandle, int volume)
|
||||
{
|
||||
if(!binkInitialized || aFmvHandle==0)
|
||||
if(aFmvHandle==0)
|
||||
return 0;
|
||||
|
||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||
|
@ -636,7 +593,7 @@ int UpdateBinkFMV(FMVHandle aFmvHandle, int volume)
|
|||
|
||||
void CloseBinkFMV(FMVHandle aFmvHandle)
|
||||
{
|
||||
if(!binkInitialized || aFmvHandle==0)
|
||||
if(aFmvHandle==0)
|
||||
return;
|
||||
|
||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||
|
@ -647,7 +604,7 @@ void CloseBinkFMV(FMVHandle aFmvHandle)
|
|||
|
||||
char* GetBinkFMVImage(FMVHandle aFmvHandle)
|
||||
{
|
||||
if(!binkInitialized || aFmvHandle==0)
|
||||
if(aFmvHandle==0)
|
||||
return 0;
|
||||
|
||||
struct binkMovie* movie = (struct binkMovie*)aFmvHandle;
|
||||
|
|
|
@ -1231,8 +1231,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
SoundSys_Start();
|
||||
|
||||
BinkSys_Init();
|
||||
|
||||
if (WantCDRom) CDDA_Start();
|
||||
|
||||
InitTextStrings();
|
||||
|
@ -1424,7 +1422,6 @@ if (AvP_MainMenus())
|
|||
ExitSystem();
|
||||
|
||||
CDDA_End();
|
||||
BinkSys_Release();
|
||||
|
||||
ClearMemoryPool();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue