Browse Source

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
Joseph Davies 12 years ago
parent
commit
9732a997c0
  1. 2
      CMakeLists.txt
  2. 4
      Sources/Plasma/Apps/plClient/CMakeLists.txt
  3. 87
      Sources/Plasma/Apps/plClient/plClient.cpp
  4. 6
      Sources/Plasma/Apps/plClient/plClient.h
  5. 9
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp
  6. 38
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp
  7. 8
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h
  8. 5
      Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt
  9. 4
      Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h
  10. 65
      Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h
  11. 2
      Sources/Plasma/NucleusLib/inc/plCreatableIndex.h
  12. 2
      Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h
  13. 4
      Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
  14. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h
  15. 129
      Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h
  16. 4
      Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt
  17. 16
      cmake/FindBink.cmake

2
CMakeLists.txt

@ -46,8 +46,6 @@ if(WIN32)
find_package(DirectX REQUIRED)
endif(WIN32)
find_package(Bink) #TODO: Find Bink, but don't require it if plPipeline isn't built...
# Or better yet, just eliminate bink altogether
include(PrecompiledHeader) #Precompiled Header helper macros
# libCurl isn't smart enough to detect this for us, so we have to configure it ourselves

4
Sources/Plasma/Apps/plClient/CMakeLists.txt

@ -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)

87
Sources/Plasma/Apps/plClient/plClient.cpp

@ -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;

6
Sources/Plasma/Apps/plClient/plClient.h

@ -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();

9
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp

@ -3935,18 +3935,11 @@ PF_CONSOLE_GROUP( Movie ) // Defines a main command group
PF_CONSOLE_CMD( Movie,
Start,
"string filename",
"Start of movie with this filename" )
"Start movie with this filename" )
{
char* filename = params[0];
plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kStart);
//#define MF_TEST_MOVIECALLBACKS
#ifdef MF_TEST_MOVIECALLBACKS
plMovieMsg* cb = new plMovieMsg("avi/intro0.bik", plMovieMsg::kStart);
mov->AddCallback(cb);
mov->SetCmd(mov->GetCmd() | plMovieMsg::kAddCallbacks);
#endif // MF_TEST_MOVIECALLBACKS
mov->Send();
PrintStringF(PrintString, "%s now playing", filename);

38
Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp

@ -78,7 +78,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plSurface/plLayer.h"
#include "plSurface/hsGMaterial.h"
#include "plAgeLoader/plAgeLoader.h"
#include "pfSurface/plLayerBink.h"
#include "pfSurface/plLayerAVI.h"
// So we can do image searches in our local age
#include "plNetClient/plNetClientMgr.h"
@ -1327,7 +1327,7 @@ void pfJournalBook::Show( bool startOpened /*= false */)
else
{
// it's a cover movie, not a decal, so we make a layer, thinking it's at 0,0 and a left map (which gives us the results we want)
plLayerBink *movieLayer = IMakeMovieLayer(fCoverDecals[i],0,0,mip,pfJournalDlgProc::kTagLeftDTMap,false);
plLayerAVI *movieLayer = IMakeMovieLayer(fCoverDecals[i],0,0,mip,pfJournalDlgProc::kTagLeftDTMap,false);
loadedMovie *movie = new loadedMovie;
movie->movieLayer = movieLayer;
movie->movieChunk = fCoverDecals[i];
@ -1397,7 +1397,7 @@ void pfJournalBook::Hide( void )
int i;
for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{
plLayerBink *movie = fLoadedMovies[ i ]->movieLayer;
plLayerAVI *movie = fLoadedMovies[ i ]->movieLayer;
movie->GetKey()->UnRefObject();
delete fLoadedMovies[ i ];
}
@ -2477,7 +2477,7 @@ void pfJournalBook::IFreeSource( void )
for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{
plLayerBink *movie = fLoadedMovies[ i ]->movieLayer;
plLayerAVI *movie = fLoadedMovies[ i ]->movieLayer;
movie->GetKey()->UnRefObject();
delete fLoadedMovies[ i ];
}
@ -2589,11 +2589,11 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, bool sup
{
// clear any exiting layers (movies) from the material
int i;
for( i = 0; i < material->GetNumLayers(); i++ ) // remove all plLayerBink layers
for( i = 0; i < material->GetNumLayers(); i++ ) // remove all plLayerMovie layers
{
plLayerInterface *matLayer = material->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer
plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (movie) // if it was a movie layer
{
plMatRefMsg* refMsg = new plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(material->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef);
@ -2788,7 +2788,7 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, bool sup
case pfEsHTMLChunk::kMovie:
movieAlreadyLoaded = (IMovieAlreadyLoaded(chunk) != nil); // have we already cached it?
plLayerBink *movieLayer = IMakeMovieLayer(chunk, x, y, (plMipmap*)dtMap, whichDTMap, suppressRendering);
plLayerAVI *movieLayer = IMakeMovieLayer(chunk, x, y, (plMipmap*)dtMap, whichDTMap, suppressRendering);
if (movieLayer)
{
// adjust the starting height of the movie if we are keeping it inline with the text
@ -2853,28 +2853,28 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, bool sup
void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest )
{
hsTArray<plLayerBink*> moviesOnPage;
hsTArray<plLayerAVI*> moviesOnPage;
if (source && dest)
{
// clear any exiting layers (movies) from the material and save them to our local array
int i;
for( i = 0; i < source->GetNumLayers(); i++ ) // remove all plLayerBink layers
for( i = 0; i < source->GetNumLayers(); i++ ) // remove all plLayerMovie layers
{
plLayerInterface *matLayer = source->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer
plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (movie) // if it was a movie layer
{
plMatRefMsg* refMsg = new plMatRefMsg(source->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(source->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef);
moviesOnPage.Append(bink);
moviesOnPage.Append(movie);
}
}
// clear the destination's movies (if it has any)
for( i = 0; i < dest->GetNumLayers(); i++ ) // remove all plLayerBink layers
for( i = 0; i < dest->GetNumLayers(); i++ ) // remove all plLayerMovie layers
{
plLayerInterface *matLayer = dest->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer
plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (movie) // if it was a movie layer
{
plMatRefMsg* refMsg = new plMatRefMsg(dest->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(dest->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef);
@ -3014,12 +3014,12 @@ pfJournalBook::loadedMovie *pfJournalBook::IGetMovieByIndex(uint8_t index)
return nil;
}
plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender)
plLayerAVI *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender)
{
// see if it's already loaded
loadedMovie *movie = IMovieAlreadyLoaded(chunk);
plLayer* layer = nil;
plLayerBink* movieLayer = nil;
plLayerAVI* movieLayer = nil;
uint16_t movieWidth=0,movieHeight=0;
if (movie)
{
@ -3041,7 +3041,7 @@ plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, ui
hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation());
buff = plFormat("{}_{}_m", GetKey()->GetName(), uniqueSuffix++);
movieLayer = new plLayerBink;
movieLayer = new plLayerAVI;
hsgResMgr::ResMgr()->NewKey(buff, movieLayer, GetKey()->GetUoid().GetLocation());
movieLayer->GetKey()->RefObject(); // we want to own a ref so we can nuke it at will

8
Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h

@ -129,7 +129,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// tint=yes/no - Defines whether or not this decal is tinted //
// with the cover. Overridden by the tintfirst //
// option on the <cover> tag. Defaults to no //
// <movie> - Places a movie (.bik file) inline with the text. Options: //
// <movie> - Places a movie (.avi file) inline with the text. Options: //
// src=<movie name> - Selects the movie to be used. (nead search //
// methods here eventually) //
// align=left/right/center //
@ -188,7 +188,7 @@ class plLayerInterface;
class plMipmap;
class pfGUIProgressCtrl;
class hsGMaterial;
class plLayerBink;
class plLayerAVI;
class pfGUIMultiLineEditCtrl;
class pfJournalBook;
@ -453,7 +453,7 @@ class pfJournalBook : public hsKeyedObject
struct loadedMovie
{
pfEsHTMLChunk *movieChunk;
plLayerBink *movieLayer;
plLayerAVI *movieLayer;
};
friend class pfJournalDlgProc;
@ -574,7 +574,7 @@ class pfJournalBook : public hsKeyedObject
// Movie functions
loadedMovie *IMovieAlreadyLoaded(pfEsHTMLChunk *chunk);
loadedMovie *IGetMovieByIndex(uint8_t index);
plLayerBink *IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender);
plLayerAVI *IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, uint16_t y, plMipmap *baseMipmap, uint32_t whichDTMap, bool dontRender);
// Cover functions
plLayerInterface *IMakeBaseLayer(plMipmap *image);

5
Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt

@ -3,10 +3,6 @@ include_directories(../../NucleusLib)
include_directories(../../NucleusLib/inc)
include_directories(../../PubUtilLib)
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
if(WIN32)
include_directories(${DirectX_INCLUDE_DIR})
add_definitions(-DWIN32)
@ -28,7 +24,6 @@ set(pfSurface_HEADERS
plFadeOpacityMod.h
plGrabCubeMap.h
plLayerAVI.h
plLayerBink.h
plLayerMovie.h
)

4
Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h

@ -49,10 +49,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
REGISTER_NONCREATABLE( plLayerMovie );
#include "plLayerBink.h"
REGISTER_CREATABLE( plLayerBink );
#include "plLayerAVI.h"
REGISTER_CREATABLE( plLayerAVI );

65
Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h

@ -1,65 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerBink_inc
#define plLayerBink_inc
#include "plLayerMovie.h"
class plLayerBink : public plLayerMovie
{
protected:
virtual int32_t ISecsToFrame(float secs) { return 0; }
virtual bool IInit() { return true; }
virtual bool IGetCurrentFrame() { return true; }
virtual bool IRelease() { return true; }
public:
plLayerBink() { }
virtual ~plLayerBink() { }
CLASSNAME_REGISTER( plLayerBink );
GETINTERFACE_ANY( plLayerBink, plLayerMovie );
};
#endif // plLayerBink_inc

2
Sources/Plasma/NucleusLib/inc/plCreatableIndex.h

@ -121,7 +121,7 @@ CLASS_INDEX_LIST_START
CLASS_INDEX(plLayerAnimation),
CLASS_INDEX(plLayerDepth),
CLASS_INDEX(plLayerMovie),
CLASS_INDEX(plLayerBink),
CLASS_INDEX(UNUSED_plLayerBink),
CLASS_INDEX(plLayerAVI),
CLASS_INDEX(plSound),
CLASS_INDEX(plWin32Sound),

2
Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h

@ -155,7 +155,7 @@ public:
plMovieMsg& SetScaleX(float x) { fScale.fX = x; return *this; }
plMovieMsg& SetScaleY(float y) { fScale.fY = y; return *this; }
// Include the movie folder, e.g. "avi/porno.bik"
// Include the movie folder, e.g. "avi/movie.avi"
// String is copied, not pointer copy.
plString GetFileName() const { return fFileName; }
plMovieMsg& SetFileName(const plString& name) { fFileName = name; return *this; }

4
Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt

@ -4,9 +4,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
if(WIN32)
include_directories(${DirectX_INCLUDE_DIR})
endif(WIN32)
@ -48,7 +45,6 @@ set(plPipeline_HEADERS
hsGColorizer.h
hsGDeviceRef.h
hsWinRef.h
plBinkPlayer.h
plCaptureRender.h
plCubicRenderTarget.h
plCubicRenderTargetModifier.h

2
Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h

@ -171,7 +171,6 @@ class plParticleSpan;
class plCubicEnvironmap;
class plDXRenderTargetRef;
class plStatusLogDrawer;
class plBinkPlayer;
class plDXPipeline : public plPipeline
{
@ -537,7 +536,6 @@ protected:
// Plate management
friend class plDXPlateManager;
friend class plBinkPlayer;
void IDrawPlate( plPlate *plate );

129
Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h

@ -1,129 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plBinkPlayer_inc
#define plBinkPlayer_inc
#include "HeadSpin.h"
#include "hsPoint2.h"
#include "hsTemplates.h"
struct D3DVertex;
class plDXPipeline;
struct IDirect3DTexture9;
class plMessage;
struct IDirectSound8;
class plBinkPlayer
{
public:
plBinkPlayer() { }
static bool Init( hsWindowHndl hWnd) { return true; }
static bool DeInit() { return true; }
static void SetForeGroundTrack(uint32_t t) { }
static void SetBackGroundTrack(uint32_t t) { }
static uint32_t GetForeGroundTrack() { }
static uint32_t GetBackGroundTrack() { }
void SetDefaults() { }
bool Start(plPipeline* pipe, hsWindowHndl hWnd) { return false; }
bool NextFrame() {
// we have reached the end
return Stop();
}
bool Pause(bool on) { return false; }
bool Stop() {
for (int i = 0; i < fCallbacks.GetCount(); i++)
fCallbacks[i]->Send();
fCallbacks.Reset();
fFileName = plString::Null;
return false;
}
void SetFileName(const plString& filename) {
fFileName = filename;
}
void SetColor(const hsColorRGBA& c) { }
void SetPosition(float x, float y) { }
void SetScale(float x, float y) { }
void SetVolume(float v) { }
void SetForeVolume(float v) { }
void SetBackVolume(float v) { }
void SetPosition(const hsPoint2& p) { }
void SetScale(const hsPoint2& s) { }
plString GetFileName() const { return fFileName; }
const hsColorRGBA GetColor() const { return hsColorRGBA(); }
const hsPoint2 GetPosition() const { return hsPoint2(); }
const hsPoint2 GetScale() const { return hsPoint2(); }
float GetBackVolume() const { return 0.0f; }
float GetForeVolume() const { return 0.0f; }
void AddCallback(plMessage* msg) { hsRefCnt_SafeRef(msg); fCallbacks.Append(msg); }
uint32_t GetNumCallbacks() const { return 0; }
plMessage* GetCallback(int i) const { return nil; }
void SetFadeFromTime(float secs) { }
void SetFadeFromColor(hsColorRGBA c) { }
void SetFadeToTime(float secs) { }
void SetFadeToColor(hsColorRGBA c) { }
float GetFadeFromTime() const { return 0.0f; }
hsColorRGBA GetFadeFromColor() const { return hsColorRGBA(); }
float GetFadeToTime() const { return 0.0f; }
hsColorRGBA GetFadeToColor() const { return hsColorRGBA(); }
private:
plString fFileName;
hsTArray<plMessage*> fCallbacks;
};
#endif // plBinkPlayer_inc

4
Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt

@ -3,10 +3,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
set(plSurface_SOURCES
hsGMaterial.cpp
plGrassShaderMod.cpp

16
cmake/FindBink.cmake

@ -1,16 +0,0 @@
find_path(Bink_INCLUDE_DIR bink.h
C:/BinkW32
)
find_library(Bink_LIBRARY NAMES binkw32
PATHS C:/BinkW32
)
if(Bink_INCLUDE_DIR AND Bink_LIBRARY)
set(Bink_SDK_AVAILABLE TRUE)
add_definitions(-DBINK_SDK_AVAILABLE)
else()
set(Bink_SDK_AVAILABLE FALSE)
endif()
set(Bink_LIBRARIES ${Bink_LIBRARY})
Loading…
Cancel
Save