mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Removes remaining usage of Bink in main engine.
- Removes Bink headers. - Remove usage of Bink movie layers in pfJournalBook (replacing it with plLayerAVI in the interim). - Removes Bink cmake. Conflicts: CMakeLists.txt Sources/Plasma/Apps/plClient/plClient.cpp Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h
This commit is contained in:
@ -7,9 +7,6 @@ include_directories("../../NucleusLib")
|
||||
include_directories("../../PubUtilLib/inc")
|
||||
include_directories("../../PubUtilLib")
|
||||
|
||||
if(Bink_SDK_AVAILABLE)
|
||||
include_directories(${Bink_INCLUDE_DIR})
|
||||
endif()
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
@ -85,6 +82,7 @@ target_link_libraries(plClient pfGameScoreMgr)
|
||||
target_link_libraries(plClient pfJournalBook)
|
||||
target_link_libraries(plClient pfLocalizationMgr)
|
||||
target_link_libraries(plClient pfMessage)
|
||||
target_link_libraries(plClient pfMoviePlayer)
|
||||
target_link_libraries(plClient pfPython)
|
||||
target_link_libraries(plClient pfSurface)
|
||||
target_link_libraries(plClient plAgeDescription)
|
||||
|
@ -111,7 +111,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plStatusLog/plStatusLog.h"
|
||||
#include "plProgressMgr/plProgressMgr.h"
|
||||
#include "plPipeline/plDTProgressMgr.h"
|
||||
#include "plPipeline/plBinkPlayer.h"
|
||||
#include "pfMoviePlayer/plMoviePlayer.h"
|
||||
#include "plMessage/plMovieMsg.h"
|
||||
|
||||
#include "plSDL/plSDL.h"
|
||||
@ -275,8 +275,7 @@ bool plClient::Shutdown()
|
||||
IKillMovies();
|
||||
|
||||
plgAudioSys::Activate(false);
|
||||
plBinkPlayer::DeInit();
|
||||
//
|
||||
|
||||
// Get any proxies to commit suicide.
|
||||
plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAllTypes
|
||||
| plProxyDrawMsg::kDestroy);
|
||||
@ -826,78 +825,75 @@ bool plClient::IHandleMovieMsg(plMovieMsg* mov)
|
||||
if (mov->GetFileName().IsEmpty())
|
||||
return true;
|
||||
|
||||
int i;
|
||||
i = fMovies.GetCount();
|
||||
if( !(mov->GetCmd() & plMovieMsg::kMake) )
|
||||
int i = fMovies.GetCount();
|
||||
if (!(mov->GetCmd() & plMovieMsg::kMake))
|
||||
{
|
||||
for( i = 0; i < fMovies.GetCount(); i++ )
|
||||
for (i = 0; i < fMovies.GetCount(); i++)
|
||||
{
|
||||
if (mov->GetFileName().CompareI(fMovies[i]->GetFileName()) == 0)
|
||||
if (mov->GetFileName().CompareI(fMovies[i]->GetFileName().AsString()) == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( i == fMovies.GetCount() )
|
||||
if (i == fMovies.GetCount())
|
||||
{
|
||||
|
||||
fMovies.Append(new plBinkPlayer);
|
||||
fMovies.Append(new plMoviePlayer);
|
||||
fMovies[i]->SetFileName(mov->GetFileName());
|
||||
}
|
||||
|
||||
if( mov->GetCmd() & plMovieMsg::kAddCallbacks )
|
||||
if (mov->GetCmd() & plMovieMsg::kAddCallbacks)
|
||||
{
|
||||
int j;
|
||||
for( j = 0; j < mov->GetNumCallbacks(); j++ )
|
||||
for (j = 0; j < mov->GetNumCallbacks(); j++)
|
||||
fMovies[i]->AddCallback(mov->GetCallback(j));
|
||||
}
|
||||
if( mov->GetCmd() & plMovieMsg::kMove )
|
||||
if (mov->GetCmd() & plMovieMsg::kMove)
|
||||
fMovies[i]->SetPosition(mov->GetCenter());
|
||||
if( mov->GetCmd() & plMovieMsg::kScale )
|
||||
if (mov->GetCmd() & plMovieMsg::kScale)
|
||||
fMovies[i]->SetScale(mov->GetScale());
|
||||
if( mov->GetCmd() & plMovieMsg::kColorAndOpacity )
|
||||
if (mov->GetCmd() & plMovieMsg::kColorAndOpacity)
|
||||
fMovies[i]->SetColor(mov->GetColor());
|
||||
if( mov->GetCmd() & plMovieMsg::kColor )
|
||||
if (mov->GetCmd() & plMovieMsg::kColor)
|
||||
{
|
||||
hsColorRGBA c = fMovies[i]->GetColor();
|
||||
c.Set(mov->GetColor().r, mov->GetColor().g, mov->GetColor().b, c.a);
|
||||
fMovies[i]->SetColor(c);
|
||||
}
|
||||
if( mov->GetCmd() & plMovieMsg::kOpacity )
|
||||
if (mov->GetCmd() & plMovieMsg::kOpacity)
|
||||
{
|
||||
hsColorRGBA c = fMovies[i]->GetColor();
|
||||
c.a = mov->GetColor().a;
|
||||
fMovies[i]->SetColor(c);
|
||||
}
|
||||
if( mov->GetCmd() & plMovieMsg::kFadeIn )
|
||||
if (mov->GetCmd() & plMovieMsg::kFadeIn)
|
||||
{
|
||||
fMovies[i]->SetFadeFromColor(mov->GetFadeInColor());
|
||||
fMovies[i]->SetFadeFromTime(mov->GetFadeInSecs());
|
||||
}
|
||||
if( mov->GetCmd() & plMovieMsg::kFadeOut )
|
||||
if (mov->GetCmd() & plMovieMsg::kFadeOut)
|
||||
{
|
||||
fMovies[i]->SetFadeToColor(mov->GetFadeOutColor());
|
||||
fMovies[i]->SetFadeToTime(mov->GetFadeOutSecs());
|
||||
}
|
||||
if( mov->GetCmd() & plMovieMsg::kVolume )
|
||||
if (mov->GetCmd() & plMovieMsg::kVolume)
|
||||
fMovies[i]->SetVolume(mov->GetVolume());
|
||||
|
||||
if( mov->GetCmd() & plMovieMsg::kStart )
|
||||
fMovies[i]->Start(fPipeline, fWindowHndl);
|
||||
if( mov->GetCmd() & plMovieMsg::kPause )
|
||||
if (mov->GetCmd() & plMovieMsg::kStart)
|
||||
fMovies[i]->Start();
|
||||
if (mov->GetCmd() & plMovieMsg::kPause)
|
||||
fMovies[i]->Pause(true);
|
||||
if( mov->GetCmd() & plMovieMsg::kResume )
|
||||
if (mov->GetCmd() & plMovieMsg::kResume)
|
||||
fMovies[i]->Pause(false);
|
||||
if( mov->GetCmd() & plMovieMsg::kStop )
|
||||
if (mov->GetCmd() & plMovieMsg::kStop)
|
||||
fMovies[i]->Stop();
|
||||
|
||||
// If a movie has lost its filename, it means something went horribly wrong
|
||||
// with playing it and it has shutdown. Or we just stopped it. Either way,
|
||||
// with playing it and it has shutdown. Or we just stopped it. Either way,
|
||||
// we need to clear it out of our list.
|
||||
if (fMovies[i]->GetFileName().IsEmpty())
|
||||
if (!fMovies[i]->GetFileName().IsValid())
|
||||
{
|
||||
delete fMovies[i];
|
||||
fMovies.Remove(i);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1441,11 +1437,7 @@ bool plClient::StartInit()
|
||||
|
||||
plgAudioSys::Activate(true);
|
||||
|
||||
plConst(float) delay(2.f);
|
||||
//commenting out publisher splash for MORE
|
||||
//IPlayIntroBink("avi/intro0.bik", delay, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||
//if( GetDone() ) return false;
|
||||
IPlayIntroBink("avi/intro1.bik", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||
IPlayIntroMovie("avi/CyanWorlds.avi", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||
if( GetDone() ) return false;
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plMovieMsg::Index(), GetKey());
|
||||
|
||||
@ -1837,10 +1829,9 @@ bool plClient::IDraw()
|
||||
void plClient::IServiceMovies()
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fMovies.GetCount(); i++ )
|
||||
for (i = 0; i < fMovies.GetCount(); i++)
|
||||
{
|
||||
hsAssert(!fMovies[i]->GetFileName().IsEmpty(), "Lost our movie");
|
||||
if( !fMovies[i]->NextFrame() )
|
||||
if (!fMovies[i]->NextFrame())
|
||||
{
|
||||
delete fMovies[i];
|
||||
fMovies.Remove(i);
|
||||
@ -1851,16 +1842,15 @@ void plClient::IServiceMovies()
|
||||
|
||||
void plClient::IKillMovies()
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fMovies.GetCount(); i++ )
|
||||
for (int i = 0; i < fMovies.GetCount(); i++)
|
||||
delete fMovies[i];
|
||||
fMovies.Reset();
|
||||
}
|
||||
|
||||
bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)
|
||||
bool plClient::IPlayIntroMovie(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume /* = 1.0 */)
|
||||
{
|
||||
SetQuitIntro(false);
|
||||
plBinkPlayer player;
|
||||
plMoviePlayer player;
|
||||
player.SetPosition(posX, posY);
|
||||
player.SetScale(scaleX, scaleY);
|
||||
player.SetFileName(movieName);
|
||||
@ -1869,14 +1859,14 @@ bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX,
|
||||
player.SetVolume(volume);
|
||||
bool firstTry = true; // flag to make sure that we don't quit before we even start
|
||||
|
||||
if( player.Start(fPipeline, fWindowHndl) )
|
||||
if (player.Start())
|
||||
{
|
||||
while( true )
|
||||
while (true)
|
||||
{
|
||||
if( fInstance )
|
||||
if (fInstance)
|
||||
fInstance->fMessagePumpProc();
|
||||
|
||||
if( GetDone() )
|
||||
if (GetDone())
|
||||
return true;
|
||||
if (firstTry)
|
||||
{
|
||||
@ -1885,20 +1875,21 @@ bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX,
|
||||
}
|
||||
else
|
||||
{
|
||||
if( GetQuitIntro() )
|
||||
if (GetQuitIntro())
|
||||
return true;
|
||||
}
|
||||
|
||||
bool done = false;
|
||||
if( !fPipeline->BeginRender() )
|
||||
if (!fPipeline->BeginRender())
|
||||
{
|
||||
fPipeline->ClearRenderTarget();
|
||||
done = !player.NextFrame();
|
||||
|
||||
fPipeline->RenderScreenElements();
|
||||
fPipeline->EndRender();
|
||||
}
|
||||
|
||||
if( done )
|
||||
if (done)
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -79,7 +79,7 @@ class plFontCache;
|
||||
class plClientMsg;
|
||||
class plLocation;
|
||||
class plMovieMsg;
|
||||
class plBinkPlayer;
|
||||
class plMoviePlayer;
|
||||
class plPreloaderMsg;
|
||||
class plNetCommAuthMsg;
|
||||
class plAgeLoaded2Msg;
|
||||
@ -147,7 +147,7 @@ protected:
|
||||
int fQuality;
|
||||
|
||||
bool fQuitIntro;
|
||||
hsTArray<plBinkPlayer*> fMovies;
|
||||
hsTArray<plMoviePlayer*> fMovies;
|
||||
|
||||
plMessagePumpProc fMessagePumpProc;
|
||||
|
||||
@ -186,7 +186,7 @@ protected:
|
||||
void IProcessRenderRequests(hsTArray<plRenderRequest*>& reqs);
|
||||
void IAddRenderRequest(plRenderRequest* req);
|
||||
|
||||
bool IPlayIntroBink(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume = 1.0);
|
||||
bool IPlayIntroMovie(const char* movieName, float endDelay, float posX, float posY, float scaleX, float scaleY, float volume = 1.0);
|
||||
bool IHandleMovieMsg(plMovieMsg* mov);
|
||||
void IKillMovies();
|
||||
void IServiceMovies();
|
||||
|
Reference in New Issue
Block a user