1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Removes remaining usage of Bink in main engine.

- Removes Bink headers.
- Remove usage of Bink movie layers in pfJournalBook (replacing it
  with plLayerAVI in the interim).
- Removes Bink cmake.

Conflicts:
	CMakeLists.txt
	Sources/Plasma/Apps/plClient/plClient.cpp
	Sources/Plasma/PubUtilLib/plPipeline/plBinkPlayer.h
This commit is contained in:
2013-02-15 07:30:08 -08:00
parent 8b5b85cc53
commit 9732a997c0
17 changed files with 69 additions and 318 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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