From 8b5b85cc53399a7c5f59baf616d29947e57e3e6f Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Mon, 21 Apr 2014 18:31:27 -0700 Subject: [PATCH 1/3] Add stub plMoviePlayer. Provides a working replacement for plBinkPlayer so that its removal won't leave videos 'playing' indefinitely waiting for unhandled messages. --- Sources/Plasma/FeatureLib/CMakeLists.txt | 1 + .../FeatureLib/pfMoviePlayer/CMakeLists.txt | 17 +++ .../pfMoviePlayer/plMoviePlayer.cpp | 66 ++++++++++++ .../FeatureLib/pfMoviePlayer/plMoviePlayer.h | 101 ++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt create mode 100644 Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp create mode 100644 Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.h diff --git a/Sources/Plasma/FeatureLib/CMakeLists.txt b/Sources/Plasma/FeatureLib/CMakeLists.txt index 3b34f88d..5faa5ada 100644 --- a/Sources/Plasma/FeatureLib/CMakeLists.txt +++ b/Sources/Plasma/FeatureLib/CMakeLists.txt @@ -17,6 +17,7 @@ add_subdirectory(pfJournalBook) # add_subdirectory(pfKI) add_subdirectory(pfLocalizationMgr) add_subdirectory(pfMessage) +add_subdirectory(pfMoviePlayer) add_subdirectory(pfPatcher) add_subdirectory(pfPython) add_subdirectory(pfSurface) diff --git a/Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt b/Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt new file mode 100644 index 00000000..2e6c7277 --- /dev/null +++ b/Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt @@ -0,0 +1,17 @@ +include_directories(../../CoreLib) +include_directories(../../NucleusLib) +include_directories(../../NucleusLib/inc) +include_directories(../../PubUtilLib) + +set(pfMoviePlayer_SOURCES + plMoviePlayer.cpp +) + +set(pfMoviePlayer_HEADERS + plMoviePlayer.h +) + +add_library(pfMoviePlayer STATIC ${pfMoviePlayer_SOURCES} ${pfMoviePlayer_HEADERS}) + +source_group("Source Files" FILES ${pfMoviePlayer_SOURCES}) +source_group("Header Files" FILES ${pfMoviePlayer_HEADERS}) diff --git a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp new file mode 100644 index 00000000..cfc75c73 --- /dev/null +++ b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp @@ -0,0 +1,66 @@ +/*==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 . + +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==*/ + +#include "plMoviePlayer.h" + +#include "hsTimer.h" + + +plMoviePlayer::plMoviePlayer() : +fTimeScale(0), +fStartTime(0) +{ + fScale.Set(1.0f, 1.0f); +} + +int64_t plMoviePlayer::GetMovieTime() const +{ + return ((int64_t) hsTimer::GetSeconds() * fTimeScale) - fStartTime; +} + +bool plMoviePlayer::Stop() +{ + for (int i = 0; i < fCallbacks.GetCount(); i++) + fCallbacks[i]->Send(); + fCallbacks.Reset(); + return false; +} diff --git a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.h b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.h new file mode 100644 index 00000000..a42bb1a0 --- /dev/null +++ b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.h @@ -0,0 +1,101 @@ +/*==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 . + +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 _plMoviePlayer_inc +#define _plMoviePlayer_inc + +#include "HeadSpin.h" +#include "plFileSystem.h" +#include "hsPoint2.h" +#include "hsColorRGBA.h" +#include "plMessage/plMovieMsg.h" + +class plMoviePlayer +{ +protected: + int64_t fTimeScale, fStartTime; + + hsPoint2 fPosition, fScale; + plFileName fMoviePath; + + int64_t GetMovieTime() const; + bool IOpenMovie() { return false; }; + +public: + plMoviePlayer(); + ~plMoviePlayer() {} + + bool Start() { return false; } + bool Pause(bool on) { return false; } + bool Stop(); + bool NextFrame() { return Stop(); } + + void AddCallback(plMessage* msg) { hsRefCnt_SafeRef(msg); fCallbacks.Append(msg); } + uint32_t GetNumCallbacks() const { return 0; } + plMessage* GetCallback(int i) const { return nullptr; } + + plFileName GetFileName() const { return fMoviePath; } + void SetFileName(const plFileName& filename) { fMoviePath = filename; } + + void SetColor(const hsColorRGBA& c) { } + const hsColorRGBA GetColor() const { return hsColorRGBA(); } + void SetVolume(float v) { } + + hsPoint2 GetPosition() const { return fPosition; } + void SetPosition(const hsPoint2& pos) { fPosition = pos; } + void SetPosition(float x, float y) { fPosition.Set(x, y); } + + hsPoint2 GetScale() const { return fScale; } + void SetScale(const hsPoint2& scale) { fScale = scale; } + void SetScale(float x, float y) { fScale.Set(x, y); } + + void SetFadeFromTime(float secs) { } + void SetFadeFromColor(hsColorRGBA c) { } + + void SetFadeToTime(float secs) { } + void SetFadeToColor(hsColorRGBA c) { } + +private: + hsTArray fCallbacks; +}; + +#endif // _plMoviePlayer_inc From 9732a997c0af3c087d6226810210e369dbbd11db Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Fri, 15 Feb 2013 07:30:08 -0800 Subject: [PATCH 2/3] 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 --- CMakeLists.txt | 2 - Sources/Plasma/Apps/plClient/CMakeLists.txt | 4 +- Sources/Plasma/Apps/plClient/plClient.cpp | 87 ++++++------ Sources/Plasma/Apps/plClient/plClient.h | 6 +- .../pfConsole/pfConsoleCommands.cpp | 9 +- .../pfJournalBook/pfJournalBook.cpp | 38 +++--- .../FeatureLib/pfJournalBook/pfJournalBook.h | 8 +- .../FeatureLib/pfSurface/CMakeLists.txt | 5 - .../FeatureLib/pfSurface/pfSurfaceCreatable.h | 4 - .../Plasma/FeatureLib/pfSurface/plLayerBink.h | 65 --------- .../Plasma/NucleusLib/inc/plCreatableIndex.h | 2 +- .../Plasma/PubUtilLib/plMessage/plMovieMsg.h | 2 +- .../PubUtilLib/plPipeline/CMakeLists.txt | 4 - .../PubUtilLib/plPipeline/DX/plDXPipeline.h | 2 - .../PubUtilLib/plPipeline/plBinkPlayer.h | 129 ------------------ .../PubUtilLib/plSurface/CMakeLists.txt | 4 - cmake/FindBink.cmake | 16 --- 17 files changed, 69 insertions(+), 318 deletions(-) delete mode 100644 Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h delete mode 100644 Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h delete mode 100644 cmake/FindBink.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e1f87bc..a8195f76 100644 --- a/CMakeLists.txt +++ b/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 diff --git a/Sources/Plasma/Apps/plClient/CMakeLists.txt b/Sources/Plasma/Apps/plClient/CMakeLists.txt index f1408fe5..e5d9ef41 100644 --- a/Sources/Plasma/Apps/plClient/CMakeLists.txt +++ b/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) diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 8ea7eec4..44dab137 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/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; diff --git a/Sources/Plasma/Apps/plClient/plClient.h b/Sources/Plasma/Apps/plClient/plClient.h index 4611a01b..77c9a357 100644 --- a/Sources/Plasma/Apps/plClient/plClient.h +++ b/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 fMovies; + hsTArray fMovies; plMessagePumpProc fMessagePumpProc; @@ -186,7 +186,7 @@ protected: void IProcessRenderRequests(hsTArray& 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(); diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp index c59f127b..ce051ebd 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp +++ b/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); diff --git a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp index 0b2a2506..48630a7f 100644 --- a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp +++ b/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 moviesOnPage; + hsTArray 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 diff --git a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h b/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h index d30030c7..fc407ed2 100644 --- a/Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h +++ b/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 tag. Defaults to no // -// - Places a movie (.bik file) inline with the text. Options: // +// - Places a movie (.avi file) inline with the text. Options: // // src= - 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); diff --git a/Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt b/Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt index 2c52a2b3..7b06bc8e 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt +++ b/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 ) diff --git a/Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h b/Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h index 85bd8e13..cdf1e381 100644 --- a/Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h +++ b/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 ); diff --git a/Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h b/Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h deleted file mode 100644 index 74ba997f..00000000 --- a/Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h +++ /dev/null @@ -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 . - -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 diff --git a/Sources/Plasma/NucleusLib/inc/plCreatableIndex.h b/Sources/Plasma/NucleusLib/inc/plCreatableIndex.h index 4cb01771..7e3b873f 100644 --- a/Sources/Plasma/NucleusLib/inc/plCreatableIndex.h +++ b/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), diff --git a/Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h index a8f87553..bdd213e7 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h +++ b/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; } diff --git a/Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt index 2f7012f0..0712c060 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt +++ b/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 diff --git a/Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h b/Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h index 46d40412..d21eb507 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h +++ b/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 ); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h b/Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h deleted file mode 100644 index 4e006307..00000000 --- a/Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h +++ /dev/null @@ -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 . - -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 fCallbacks; -}; - -#endif // plBinkPlayer_inc diff --git a/Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt b/Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt index 5cab1320..0408d369 100644 --- a/Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt +++ b/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 diff --git a/cmake/FindBink.cmake b/cmake/FindBink.cmake deleted file mode 100644 index 20827fc2..00000000 --- a/cmake/FindBink.cmake +++ /dev/null @@ -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}) From 3898b4f39bad67f961f4ccd7e6942544fac23593 Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Mon, 21 Apr 2014 11:05:15 -0700 Subject: [PATCH 3/3] Removes remaining usage of Bink in Max plugin. - Removes Bink headers. - Removes Bink Layer processing. --- .../Tools/MaxConvert/hsMaterialConverter.cpp | 21 +++---------------- .../Tools/MaxConvert/hsMaterialConverter.h | 1 - Sources/Tools/MaxConvert/plLayerConverter.cpp | 1 - Sources/Tools/MaxMain/CMakeLists.txt | 3 --- 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp index ac94080b..34891e20 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.cpp +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.cpp @@ -109,7 +109,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h" #include "pfSurface/plLayerAVI.h" -#include "pfSurface/plLayerBink.h" #include "MaxComponent/plLightMapComponent.h" #include "plDrawable/plGeometrySpan.h" @@ -693,14 +692,6 @@ bool hsMaterialConverter::IsQTLayer(Texmap* texMap) hsGuardEnd; } -bool hsMaterialConverter::IsBinkLayer(Texmap* texMap) -{ - hsGuardBegin("hsMaterialConverter::IsBinkLayer"); - return false; - hsGuardEnd; -} - - // MAXR3 broke GetCoordMapping, here's a work around which // works for everything except "Texture - Planar from Object XYZ" @@ -1984,22 +1975,16 @@ static plLayerInterface* IProcessLayerMovie(plPassMtlBase* mtl, plLayerTex* layT plAnimStealthNode* stealth = IGetEntireAnimation(mtl); plString ext = fileName.GetFileExt(); - bool isBink = (ext.CompareI("bik") == 0); bool isAvi = (ext.CompareI("avi") == 0); - if (isBink || isAvi) + if (isAvi) { plFileName movieName = plFileName::Join("avi", fileName.GetFileName()); plLayerMovie* movieLayer = nil; plString moviePostfix; - if (isBink) - { - movieLayer = new plLayerBink; - moviePostfix = "_bink"; - } - else if (isAvi) + if (isAvi) { movieLayer = new plLayerAVI; moviePostfix = "_avi"; @@ -4139,7 +4124,7 @@ bool hsMaterialConverter::IIsAnimatedTexmap(Texmap* texmap) if (hsControlConverter::Instance().GetControllerByName(texmap, TSTR("Opacity"), ctl)) return true; - if (HasAnimatedTextures(texmap) || IsAVILayer(texmap) || IsBinkLayer(texmap)|| IsQTLayer(texmap) || ITextureTransformIsAnimated(texmap)) + if (HasAnimatedTextures(texmap) || IsAVILayer(texmap) || IsQTLayer(texmap) || ITextureTransformIsAnimated(texmap)) return true; return false; diff --git a/Sources/Tools/MaxConvert/hsMaterialConverter.h b/Sources/Tools/MaxConvert/hsMaterialConverter.h index 7ff6f913..daefba7f 100644 --- a/Sources/Tools/MaxConvert/hsMaterialConverter.h +++ b/Sources/Tools/MaxConvert/hsMaterialConverter.h @@ -126,7 +126,6 @@ public: static bool IsFireLayer(plMaxNode* node, Texmap* texMap); static bool IsAVILayer(Texmap* texMap); static bool IsQTLayer(Texmap* texMap); - static bool IsBinkLayer(Texmap* texMap); // static bool IsEnvironMapped(plMaxNode *node); // static bool IsPortal(plMaxNode* node); static bool ForceNoUvsFlatten(plMaxNode* node); diff --git a/Sources/Tools/MaxConvert/plLayerConverter.cpp b/Sources/Tools/MaxConvert/plLayerConverter.cpp index ee26da7c..766b8689 100644 --- a/Sources/Tools/MaxConvert/plLayerConverter.cpp +++ b/Sources/Tools/MaxConvert/plLayerConverter.cpp @@ -100,7 +100,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plPipeline/plDynamicEnvMap.h" #include "pfSurface/plLayerAVI.h" -#include "pfSurface/plLayerBink.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h" diff --git a/Sources/Tools/MaxMain/CMakeLists.txt b/Sources/Tools/MaxMain/CMakeLists.txt index afe93984..1916ccb2 100644 --- a/Sources/Tools/MaxMain/CMakeLists.txt +++ b/Sources/Tools/MaxMain/CMakeLists.txt @@ -93,9 +93,6 @@ target_link_libraries(MaxMain MaxExport) target_link_libraries(MaxMain MaxPlasmaMtls) target_link_libraries(MaxMain ${3dsm_LIBRARIES}) -if(Bink_SDK_AVAILABLE) - target_link_libraries(MaxMain ${Bink_LIBRARIES}) -endif() target_link_libraries(MaxMain ${EXPAT_LIBRARY}) target_link_libraries(MaxMain ${DirectX_LIBRARIES}) target_link_libraries(MaxMain ${JPEG_LIBRARY})