Browse Source

Merge pull request #407 from Deledrius/bink_removal_again

Bink Removal
Adam Johnson 10 years ago
parent
commit
69bc106576
  1. 2
      CMakeLists.txt
  2. 4
      Sources/Plasma/Apps/plClient/CMakeLists.txt
  3. 85
      Sources/Plasma/Apps/plClient/plClient.cpp
  4. 6
      Sources/Plasma/Apps/plClient/plClient.h
  5. 1
      Sources/Plasma/FeatureLib/CMakeLists.txt
  6. 9
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp
  7. 38
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp
  8. 8
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.h
  9. 17
      Sources/Plasma/FeatureLib/pfMoviePlayer/CMakeLists.txt
  10. 37
      Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp
  11. 101
      Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.h
  12. 5
      Sources/Plasma/FeatureLib/pfSurface/CMakeLists.txt
  13. 4
      Sources/Plasma/FeatureLib/pfSurface/pfSurfaceCreatable.h
  14. 2
      Sources/Plasma/NucleusLib/inc/plCreatableIndex.h
  15. 2
      Sources/Plasma/PubUtilLib/plMessage/plMovieMsg.h
  16. 4
      Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
  17. 2
      Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.h
  18. 129
      Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h
  19. 4
      Sources/Plasma/PubUtilLib/plSurface/CMakeLists.txt
  20. 21
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp
  21. 1
      Sources/Tools/MaxConvert/hsMaterialConverter.h
  22. 1
      Sources/Tools/MaxConvert/plLayerConverter.cpp
  23. 3
      Sources/Tools/MaxMain/CMakeLists.txt
  24. 16
      cmake/FindBink.cmake

2
CMakeLists.txt

@ -49,8 +49,6 @@ if(WIN32)
find_package(DirectX REQUIRED) find_package(DirectX REQUIRED)
endif(WIN32) 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 include(PrecompiledHeader) #Precompiled Header helper macros
# libCurl isn't smart enough to detect this for us, so we have to configure it ourselves # 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/inc")
include_directories("../../PubUtilLib") include_directories("../../PubUtilLib")
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
include_directories(${OPENAL_INCLUDE_DIR}) include_directories(${OPENAL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${PYTHON_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 pfJournalBook)
target_link_libraries(plClient pfLocalizationMgr) target_link_libraries(plClient pfLocalizationMgr)
target_link_libraries(plClient pfMessage) target_link_libraries(plClient pfMessage)
target_link_libraries(plClient pfMoviePlayer)
target_link_libraries(plClient pfPython) target_link_libraries(plClient pfPython)
target_link_libraries(plClient pfSurface) target_link_libraries(plClient pfSurface)
target_link_libraries(plClient plAgeDescription) target_link_libraries(plClient plAgeDescription)

85
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 "plStatusLog/plStatusLog.h"
#include "plProgressMgr/plProgressMgr.h" #include "plProgressMgr/plProgressMgr.h"
#include "plPipeline/plDTProgressMgr.h" #include "plPipeline/plDTProgressMgr.h"
#include "plPipeline/plBinkPlayer.h" #include "pfMoviePlayer/plMoviePlayer.h"
#include "plMessage/plMovieMsg.h" #include "plMessage/plMovieMsg.h"
#include "plSDL/plSDL.h" #include "plSDL/plSDL.h"
@ -275,8 +275,7 @@ bool plClient::Shutdown()
IKillMovies(); IKillMovies();
plgAudioSys::Activate(false); plgAudioSys::Activate(false);
plBinkPlayer::DeInit();
//
// Get any proxies to commit suicide. // Get any proxies to commit suicide.
plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAllTypes plProxyDrawMsg* nuke = new plProxyDrawMsg(plProxyDrawMsg::kAllTypes
| plProxyDrawMsg::kDestroy); | plProxyDrawMsg::kDestroy);
@ -826,78 +825,75 @@ bool plClient::IHandleMovieMsg(plMovieMsg* mov)
if (mov->GetFileName().IsEmpty()) if (mov->GetFileName().IsEmpty())
return true; return true;
int i; int i = fMovies.GetCount();
i = fMovies.GetCount(); if (!(mov->GetCmd() & plMovieMsg::kMake))
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; break;
} }
} }
if( i == fMovies.GetCount() ) if (i == fMovies.GetCount())
{ {
fMovies.Append(new plMoviePlayer);
fMovies.Append(new plBinkPlayer);
fMovies[i]->SetFileName(mov->GetFileName()); fMovies[i]->SetFileName(mov->GetFileName());
} }
if( mov->GetCmd() & plMovieMsg::kAddCallbacks ) if (mov->GetCmd() & plMovieMsg::kAddCallbacks)
{ {
int j; int j;
for( j = 0; j < mov->GetNumCallbacks(); j++ ) for (j = 0; j < mov->GetNumCallbacks(); j++)
fMovies[i]->AddCallback(mov->GetCallback(j)); fMovies[i]->AddCallback(mov->GetCallback(j));
} }
if( mov->GetCmd() & plMovieMsg::kMove ) if (mov->GetCmd() & plMovieMsg::kMove)
fMovies[i]->SetPosition(mov->GetCenter()); fMovies[i]->SetPosition(mov->GetCenter());
if( mov->GetCmd() & plMovieMsg::kScale ) if (mov->GetCmd() & plMovieMsg::kScale)
fMovies[i]->SetScale(mov->GetScale()); fMovies[i]->SetScale(mov->GetScale());
if( mov->GetCmd() & plMovieMsg::kColorAndOpacity ) if (mov->GetCmd() & plMovieMsg::kColorAndOpacity)
fMovies[i]->SetColor(mov->GetColor()); fMovies[i]->SetColor(mov->GetColor());
if( mov->GetCmd() & plMovieMsg::kColor ) if (mov->GetCmd() & plMovieMsg::kColor)
{ {
hsColorRGBA c = fMovies[i]->GetColor(); hsColorRGBA c = fMovies[i]->GetColor();
c.Set(mov->GetColor().r, mov->GetColor().g, mov->GetColor().b, c.a); c.Set(mov->GetColor().r, mov->GetColor().g, mov->GetColor().b, c.a);
fMovies[i]->SetColor(c); fMovies[i]->SetColor(c);
} }
if( mov->GetCmd() & plMovieMsg::kOpacity ) if (mov->GetCmd() & plMovieMsg::kOpacity)
{ {
hsColorRGBA c = fMovies[i]->GetColor(); hsColorRGBA c = fMovies[i]->GetColor();
c.a = mov->GetColor().a; c.a = mov->GetColor().a;
fMovies[i]->SetColor(c); fMovies[i]->SetColor(c);
} }
if( mov->GetCmd() & plMovieMsg::kFadeIn ) if (mov->GetCmd() & plMovieMsg::kFadeIn)
{ {
fMovies[i]->SetFadeFromColor(mov->GetFadeInColor()); fMovies[i]->SetFadeFromColor(mov->GetFadeInColor());
fMovies[i]->SetFadeFromTime(mov->GetFadeInSecs()); fMovies[i]->SetFadeFromTime(mov->GetFadeInSecs());
} }
if( mov->GetCmd() & plMovieMsg::kFadeOut ) if (mov->GetCmd() & plMovieMsg::kFadeOut)
{ {
fMovies[i]->SetFadeToColor(mov->GetFadeOutColor()); fMovies[i]->SetFadeToColor(mov->GetFadeOutColor());
fMovies[i]->SetFadeToTime(mov->GetFadeOutSecs()); fMovies[i]->SetFadeToTime(mov->GetFadeOutSecs());
} }
if( mov->GetCmd() & plMovieMsg::kVolume ) if (mov->GetCmd() & plMovieMsg::kVolume)
fMovies[i]->SetVolume(mov->GetVolume()); fMovies[i]->SetVolume(mov->GetVolume());
if( mov->GetCmd() & plMovieMsg::kStart ) if (mov->GetCmd() & plMovieMsg::kStart)
fMovies[i]->Start(fPipeline, fWindowHndl); fMovies[i]->Start();
if( mov->GetCmd() & plMovieMsg::kPause ) if (mov->GetCmd() & plMovieMsg::kPause)
fMovies[i]->Pause(true); fMovies[i]->Pause(true);
if( mov->GetCmd() & plMovieMsg::kResume ) if (mov->GetCmd() & plMovieMsg::kResume)
fMovies[i]->Pause(false); fMovies[i]->Pause(false);
if( mov->GetCmd() & plMovieMsg::kStop ) if (mov->GetCmd() & plMovieMsg::kStop)
fMovies[i]->Stop(); fMovies[i]->Stop();
// If a movie has lost its filename, it means something went horribly wrong // 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. // we need to clear it out of our list.
if (fMovies[i]->GetFileName().IsEmpty()) if (!fMovies[i]->GetFileName().IsValid())
{ {
delete fMovies[i]; delete fMovies[i];
fMovies.Remove(i); fMovies.Remove(i);
} }
return true; return true;
} }
@ -1440,11 +1436,7 @@ bool plClient::StartInit()
plgAudioSys::Activate(true); plgAudioSys::Activate(true);
plConst(float) delay(2.f); IPlayIntroMovie("avi/CyanWorlds.avi", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
//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);
if( GetDone() ) return false; if( GetDone() ) return false;
plgDispatch::Dispatch()->RegisterForExactType(plMovieMsg::Index(), GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plMovieMsg::Index(), GetKey());
@ -1836,10 +1828,9 @@ bool plClient::IDraw()
void plClient::IServiceMovies() void plClient::IServiceMovies()
{ {
int i; 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]; delete fMovies[i];
fMovies.Remove(i); fMovies.Remove(i);
@ -1850,16 +1841,15 @@ void plClient::IServiceMovies()
void plClient::IKillMovies() void plClient::IKillMovies()
{ {
int i; for (int i = 0; i < fMovies.GetCount(); i++)
for( i = 0; i < fMovies.GetCount(); i++ )
delete fMovies[i]; delete fMovies[i];
fMovies.Reset(); 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); SetQuitIntro(false);
plBinkPlayer player; plMoviePlayer player;
player.SetPosition(posX, posY); player.SetPosition(posX, posY);
player.SetScale(scaleX, scaleY); player.SetScale(scaleX, scaleY);
player.SetFileName(movieName); player.SetFileName(movieName);
@ -1868,14 +1858,14 @@ bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX,
player.SetVolume(volume); player.SetVolume(volume);
bool firstTry = true; // flag to make sure that we don't quit before we even start 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(); fInstance->fMessagePumpProc();
if( GetDone() ) if (GetDone())
return true; return true;
if (firstTry) if (firstTry)
{ {
@ -1884,20 +1874,21 @@ bool plClient::IPlayIntroBink(const char* movieName, float endDelay, float posX,
} }
else else
{ {
if( GetQuitIntro() ) if (GetQuitIntro())
return true; return true;
} }
bool done = false; bool done = false;
if( !fPipeline->BeginRender() ) if (!fPipeline->BeginRender())
{ {
fPipeline->ClearRenderTarget(); fPipeline->ClearRenderTarget();
done = !player.NextFrame(); done = !player.NextFrame();
fPipeline->RenderScreenElements();
fPipeline->EndRender(); fPipeline->EndRender();
} }
if( done ) if (done)
return true; return true;
} }
return true; return true;

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

@ -79,7 +79,7 @@ class plFontCache;
class plClientMsg; class plClientMsg;
class plLocation; class plLocation;
class plMovieMsg; class plMovieMsg;
class plBinkPlayer; class plMoviePlayer;
class plPreloaderMsg; class plPreloaderMsg;
class plNetCommAuthMsg; class plNetCommAuthMsg;
class plAgeLoaded2Msg; class plAgeLoaded2Msg;
@ -147,7 +147,7 @@ protected:
int fQuality; int fQuality;
bool fQuitIntro; bool fQuitIntro;
hsTArray<plBinkPlayer*> fMovies; hsTArray<plMoviePlayer*> fMovies;
plMessagePumpProc fMessagePumpProc; plMessagePumpProc fMessagePumpProc;
@ -186,7 +186,7 @@ protected:
void IProcessRenderRequests(hsTArray<plRenderRequest*>& reqs); void IProcessRenderRequests(hsTArray<plRenderRequest*>& reqs);
void IAddRenderRequest(plRenderRequest* req); 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); bool IHandleMovieMsg(plMovieMsg* mov);
void IKillMovies(); void IKillMovies();
void IServiceMovies(); void IServiceMovies();

1
Sources/Plasma/FeatureLib/CMakeLists.txt

@ -17,6 +17,7 @@ add_subdirectory(pfJournalBook)
# add_subdirectory(pfKI) # add_subdirectory(pfKI)
add_subdirectory(pfLocalizationMgr) add_subdirectory(pfLocalizationMgr)
add_subdirectory(pfMessage) add_subdirectory(pfMessage)
add_subdirectory(pfMoviePlayer)
add_subdirectory(pfPatcher) add_subdirectory(pfPatcher)
add_subdirectory(pfPython) add_subdirectory(pfPython)
add_subdirectory(pfSurface) add_subdirectory(pfSurface)

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

@ -3934,18 +3934,11 @@ PF_CONSOLE_GROUP( Movie ) // Defines a main command group
PF_CONSOLE_CMD( Movie, PF_CONSOLE_CMD( Movie,
Start, Start,
"string filename", "string filename",
"Start of movie with this filename" ) "Start movie with this filename" )
{ {
char* filename = params[0]; char* filename = params[0];
plMovieMsg* mov = new plMovieMsg(filename, plMovieMsg::kStart); 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(); mov->Send();
PrintStringF(PrintString, "%s now playing", filename); 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/plLayer.h"
#include "plSurface/hsGMaterial.h" #include "plSurface/hsGMaterial.h"
#include "plAgeLoader/plAgeLoader.h" #include "plAgeLoader/plAgeLoader.h"
#include "pfSurface/plLayerBink.h" #include "pfSurface/plLayerAVI.h"
// So we can do image searches in our local age // So we can do image searches in our local age
#include "plNetClient/plNetClientMgr.h" #include "plNetClient/plNetClientMgr.h"
@ -1327,7 +1327,7 @@ void pfJournalBook::Show( bool startOpened /*= false */)
else 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) // 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; loadedMovie *movie = new loadedMovie;
movie->movieLayer = movieLayer; movie->movieLayer = movieLayer;
movie->movieChunk = fCoverDecals[i]; movie->movieChunk = fCoverDecals[i];
@ -1397,7 +1397,7 @@ void pfJournalBook::Hide( void )
int i; int i;
for( i = 0; i < fLoadedMovies.GetCount(); i++ ) for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{ {
plLayerBink *movie = fLoadedMovies[ i ]->movieLayer; plLayerAVI *movie = fLoadedMovies[ i ]->movieLayer;
movie->GetKey()->UnRefObject(); movie->GetKey()->UnRefObject();
delete fLoadedMovies[ i ]; delete fLoadedMovies[ i ];
} }
@ -2477,7 +2477,7 @@ void pfJournalBook::IFreeSource( void )
for( i = 0; i < fLoadedMovies.GetCount(); i++ ) for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{ {
plLayerBink *movie = fLoadedMovies[ i ]->movieLayer; plLayerAVI *movie = fLoadedMovies[ i ]->movieLayer;
movie->GetKey()->UnRefObject(); movie->GetKey()->UnRefObject();
delete fLoadedMovies[ i ]; 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 // clear any exiting layers (movies) from the material
int i; 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); plLayerInterface *matLayer = material->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer if (movie) // if it was a movie layer
{ {
plMatRefMsg* refMsg = new plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it plMatRefMsg* refMsg = new plMatRefMsg(material->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(material->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); 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: case pfEsHTMLChunk::kMovie:
movieAlreadyLoaded = (IMovieAlreadyLoaded(chunk) != nil); // have we already cached it? 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) if (movieLayer)
{ {
// adjust the starting height of the movie if we are keeping it inline with the text // 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 ) void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest )
{ {
hsTArray<plLayerBink*> moviesOnPage; hsTArray<plLayerAVI*> moviesOnPage;
if (source && dest) if (source && dest)
{ {
// clear any exiting layers (movies) from the material and save them to our local array // clear any exiting layers (movies) from the material and save them to our local array
int i; 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); plLayerInterface *matLayer = source->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer if (movie) // if it was a movie layer
{ {
plMatRefMsg* refMsg = new plMatRefMsg(source->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it plMatRefMsg* refMsg = new plMatRefMsg(source->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(source->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); 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) // 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); plLayerInterface *matLayer = dest->GetLayer(i);
plLayerBink *bink = plLayerBink::ConvertNoRef(matLayer); plLayerAVI *movie = plLayerAVI::ConvertNoRef(matLayer);
if (bink) // if it was a bink layer if (movie) // if it was a movie layer
{ {
plMatRefMsg* refMsg = new plMatRefMsg(dest->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it plMatRefMsg* refMsg = new plMatRefMsg(dest->GetKey(), plRefMsg::kOnRemove, i, plMatRefMsg::kLayer); // remove it
hsgResMgr::ResMgr()->SendRef(dest->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef); hsgResMgr::ResMgr()->SendRef(dest->GetLayer(i)->GetKey(), refMsg, plRefFlags::kActiveRef);
@ -3014,12 +3014,12 @@ pfJournalBook::loadedMovie *pfJournalBook::IGetMovieByIndex(uint8_t index)
return nil; 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 // see if it's already loaded
loadedMovie *movie = IMovieAlreadyLoaded(chunk); loadedMovie *movie = IMovieAlreadyLoaded(chunk);
plLayer* layer = nil; plLayer* layer = nil;
plLayerBink* movieLayer = nil; plLayerAVI* movieLayer = nil;
uint16_t movieWidth=0,movieHeight=0; uint16_t movieWidth=0,movieHeight=0;
if (movie) if (movie)
{ {
@ -3041,7 +3041,7 @@ plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, uint16_t x, ui
hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation()); hsgResMgr::ResMgr()->NewKey(buff, layer, GetKey()->GetUoid().GetLocation());
buff = plFormat("{}_{}_m", GetKey()->GetName(), uniqueSuffix++); buff = plFormat("{}_{}_m", GetKey()->GetName(), uniqueSuffix++);
movieLayer = new plLayerBink; movieLayer = new plLayerAVI;
hsgResMgr::ResMgr()->NewKey(buff, movieLayer, GetKey()->GetUoid().GetLocation()); hsgResMgr::ResMgr()->NewKey(buff, movieLayer, GetKey()->GetUoid().GetLocation());
movieLayer->GetKey()->RefObject(); // we want to own a ref so we can nuke it at will 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 // // tint=yes/no - Defines whether or not this decal is tinted //
// with the cover. Overridden by the tintfirst // // with the cover. Overridden by the tintfirst //
// option on the <cover> tag. Defaults to no // // 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 // // src=<movie name> - Selects the movie to be used. (nead search //
// methods here eventually) // // methods here eventually) //
// align=left/right/center // // align=left/right/center //
@ -188,7 +188,7 @@ class plLayerInterface;
class plMipmap; class plMipmap;
class pfGUIProgressCtrl; class pfGUIProgressCtrl;
class hsGMaterial; class hsGMaterial;
class plLayerBink; class plLayerAVI;
class pfGUIMultiLineEditCtrl; class pfGUIMultiLineEditCtrl;
class pfJournalBook; class pfJournalBook;
@ -453,7 +453,7 @@ class pfJournalBook : public hsKeyedObject
struct loadedMovie struct loadedMovie
{ {
pfEsHTMLChunk *movieChunk; pfEsHTMLChunk *movieChunk;
plLayerBink *movieLayer; plLayerAVI *movieLayer;
}; };
friend class pfJournalDlgProc; friend class pfJournalDlgProc;
@ -574,7 +574,7 @@ class pfJournalBook : public hsKeyedObject
// Movie functions // Movie functions
loadedMovie *IMovieAlreadyLoaded(pfEsHTMLChunk *chunk); loadedMovie *IMovieAlreadyLoaded(pfEsHTMLChunk *chunk);
loadedMovie *IGetMovieByIndex(uint8_t index); 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 // Cover functions
plLayerInterface *IMakeBaseLayer(plMipmap *image); plLayerInterface *IMakeBaseLayer(plMipmap *image);

17
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})

37
Sources/Plasma/FeatureLib/pfSurface/plLayerBink.h → Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp

@ -40,26 +40,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/ *==LICENSE==*/
#ifndef plLayerBink_inc #include "plMoviePlayer.h"
#define plLayerBink_inc
#include "plLayerMovie.h" #include "hsTimer.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 ); plMoviePlayer::plMoviePlayer() :
GETINTERFACE_ANY( plLayerBink, plLayerMovie ); fTimeScale(0),
fStartTime(0)
{
fScale.Set(1.0f, 1.0f);
}
}; int64_t plMoviePlayer::GetMovieTime() const
{
return ((int64_t) hsTimer::GetSeconds() * fTimeScale) - fStartTime;
}
#endif // plLayerBink_inc bool plMoviePlayer::Stop()
{
for (int i = 0; i < fCallbacks.GetCount(); i++)
fCallbacks[i]->Send();
fCallbacks.Reset();
return false;
}

101
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 <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 _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<plMessage*> fCallbacks;
};
#endif // _plMoviePlayer_inc

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

@ -3,10 +3,6 @@ include_directories(../../NucleusLib)
include_directories(../../NucleusLib/inc) include_directories(../../NucleusLib/inc)
include_directories(../../PubUtilLib) include_directories(../../PubUtilLib)
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
if(WIN32) if(WIN32)
include_directories(${DirectX_INCLUDE_DIR}) include_directories(${DirectX_INCLUDE_DIR})
add_definitions(-DWIN32) add_definitions(-DWIN32)
@ -28,7 +24,6 @@ set(pfSurface_HEADERS
plFadeOpacityMod.h plFadeOpacityMod.h
plGrabCubeMap.h plGrabCubeMap.h
plLayerAVI.h plLayerAVI.h
plLayerBink.h
plLayerMovie.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 ); REGISTER_NONCREATABLE( plLayerMovie );
#include "plLayerBink.h"
REGISTER_CREATABLE( plLayerBink );
#include "plLayerAVI.h" #include "plLayerAVI.h"
REGISTER_CREATABLE( plLayerAVI ); REGISTER_CREATABLE( plLayerAVI );

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

@ -121,7 +121,7 @@ CLASS_INDEX_LIST_START
CLASS_INDEX(plLayerAnimation), CLASS_INDEX(plLayerAnimation),
CLASS_INDEX(plLayerDepth), CLASS_INDEX(plLayerDepth),
CLASS_INDEX(plLayerMovie), CLASS_INDEX(plLayerMovie),
CLASS_INDEX(plLayerBink), CLASS_INDEX(UNUSED_plLayerBink),
CLASS_INDEX(plLayerAVI), CLASS_INDEX(plLayerAVI),
CLASS_INDEX(plSound), CLASS_INDEX(plSound),
CLASS_INDEX(plWin32Sound), 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& SetScaleX(float x) { fScale.fX = x; return *this; }
plMovieMsg& SetScaleY(float y) { fScale.fY = y; 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. // String is copied, not pointer copy.
plString GetFileName() const { return fFileName; } plString GetFileName() const { return fFileName; }
plMovieMsg& SetFileName(const plString& name) { fFileName = name; return *this; } 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("../../NucleusLib")
include_directories("../../PubUtilLib") include_directories("../../PubUtilLib")
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
if(WIN32) if(WIN32)
include_directories(${DirectX_INCLUDE_DIR}) include_directories(${DirectX_INCLUDE_DIR})
endif(WIN32) endif(WIN32)
@ -48,7 +45,6 @@ set(plPipeline_HEADERS
hsGColorizer.h hsGColorizer.h
hsGDeviceRef.h hsGDeviceRef.h
hsWinRef.h hsWinRef.h
plBinkPlayer.h
plCaptureRender.h plCaptureRender.h
plCubicRenderTarget.h plCubicRenderTarget.h
plCubicRenderTargetModifier.h plCubicRenderTargetModifier.h

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

@ -171,7 +171,6 @@ class plParticleSpan;
class plCubicEnvironmap; class plCubicEnvironmap;
class plDXRenderTargetRef; class plDXRenderTargetRef;
class plStatusLogDrawer; class plStatusLogDrawer;
class plBinkPlayer;
class plDXPipeline : public plPipeline class plDXPipeline : public plPipeline
{ {
@ -537,7 +536,6 @@ protected:
// Plate management // Plate management
friend class plDXPlateManager; friend class plDXPlateManager;
friend class plBinkPlayer;
void IDrawPlate( plPlate *plate ); 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("../../NucleusLib")
include_directories("../../PubUtilLib") include_directories("../../PubUtilLib")
if(Bink_SDK_AVAILABLE)
include_directories(${Bink_INCLUDE_DIR})
endif()
set(plSurface_SOURCES set(plSurface_SOURCES
hsGMaterial.cpp hsGMaterial.cpp
plGrassShaderMod.cpp plGrassShaderMod.cpp

21
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 "MaxPlasmaMtls/Layers/plLayerTexBitmapPB.h"
#include "pfSurface/plLayerAVI.h" #include "pfSurface/plLayerAVI.h"
#include "pfSurface/plLayerBink.h"
#include "MaxComponent/plLightMapComponent.h" #include "MaxComponent/plLightMapComponent.h"
#include "plDrawable/plGeometrySpan.h" #include "plDrawable/plGeometrySpan.h"
@ -693,14 +692,6 @@ bool hsMaterialConverter::IsQTLayer(Texmap* texMap)
hsGuardEnd; hsGuardEnd;
} }
bool hsMaterialConverter::IsBinkLayer(Texmap* texMap)
{
hsGuardBegin("hsMaterialConverter::IsBinkLayer");
return false;
hsGuardEnd;
}
// MAXR3 broke GetCoordMapping, here's a work around which // MAXR3 broke GetCoordMapping, here's a work around which
// works for everything except "Texture - Planar from Object XYZ" // works for everything except "Texture - Planar from Object XYZ"
@ -1984,22 +1975,16 @@ static plLayerInterface* IProcessLayerMovie(plPassMtlBase* mtl, plLayerTex* layT
plAnimStealthNode* stealth = IGetEntireAnimation(mtl); plAnimStealthNode* stealth = IGetEntireAnimation(mtl);
plString ext = fileName.GetFileExt(); plString ext = fileName.GetFileExt();
bool isBink = (ext.CompareI("bik") == 0);
bool isAvi = (ext.CompareI("avi") == 0); bool isAvi = (ext.CompareI("avi") == 0);
if (isBink || isAvi) if (isAvi)
{ {
plFileName movieName = plFileName::Join("avi", fileName.GetFileName()); plFileName movieName = plFileName::Join("avi", fileName.GetFileName());
plLayerMovie* movieLayer = nil; plLayerMovie* movieLayer = nil;
plString moviePostfix; plString moviePostfix;
if (isBink) if (isAvi)
{
movieLayer = new plLayerBink;
moviePostfix = "_bink";
}
else if (isAvi)
{ {
movieLayer = new plLayerAVI; movieLayer = new plLayerAVI;
moviePostfix = "_avi"; moviePostfix = "_avi";
@ -4139,7 +4124,7 @@ bool hsMaterialConverter::IIsAnimatedTexmap(Texmap* texmap)
if (hsControlConverter::Instance().GetControllerByName(texmap, TSTR("Opacity"), ctl)) if (hsControlConverter::Instance().GetControllerByName(texmap, TSTR("Opacity"), ctl))
return true; 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 true;
return false; return false;

1
Sources/Tools/MaxConvert/hsMaterialConverter.h

@ -126,7 +126,6 @@ public:
static bool IsFireLayer(plMaxNode* node, Texmap* texMap); static bool IsFireLayer(plMaxNode* node, Texmap* texMap);
static bool IsAVILayer(Texmap* texMap); static bool IsAVILayer(Texmap* texMap);
static bool IsQTLayer(Texmap* texMap); static bool IsQTLayer(Texmap* texMap);
static bool IsBinkLayer(Texmap* texMap);
// static bool IsEnvironMapped(plMaxNode *node); // static bool IsEnvironMapped(plMaxNode *node);
// static bool IsPortal(plMaxNode* node); // static bool IsPortal(plMaxNode* node);
static bool ForceNoUvsFlatten(plMaxNode* node); static bool ForceNoUvsFlatten(plMaxNode* node);

1
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 "plPipeline/plDynamicEnvMap.h"
#include "pfSurface/plLayerAVI.h" #include "pfSurface/plLayerAVI.h"
#include "pfSurface/plLayerBink.h"
#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h" #include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h"
#include "MaxPlasmaMtls/Layers/plLayerTex.h" #include "MaxPlasmaMtls/Layers/plLayerTex.h"

3
Sources/Tools/MaxMain/CMakeLists.txt

@ -93,9 +93,6 @@ target_link_libraries(MaxMain MaxExport)
target_link_libraries(MaxMain MaxPlasmaMtls) target_link_libraries(MaxMain MaxPlasmaMtls)
target_link_libraries(MaxMain ${3dsm_LIBRARIES}) 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 ${EXPAT_LIBRARY})
target_link_libraries(MaxMain ${DirectX_LIBRARIES}) target_link_libraries(MaxMain ${DirectX_LIBRARIES})
target_link_libraries(MaxMain ${JPEG_LIBRARY}) target_link_libraries(MaxMain ${JPEG_LIBRARY})

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