Browse Source

Fill out bink stub

Max 2012 doesn't like getting a null from ClassDesc2::Create(). I can't
blame it.
Adam Johnson 12 years ago
parent
commit
a382752354
  1. 35
      Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp

35
Sources/Tools/MaxPlasmaMtls/plBinkBitmap.cpp

@ -42,18 +42,43 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h" #include "HeadSpin.h"
#include "hsWindows.h" #include "hsWindows.h"
#include <bmmlib.h>
#include <iparamb2.h> #include <iparamb2.h>
#pragma hdrstop #pragma hdrstop
class BinkClassDesc : public ClassDesc2 /** Stubbed out BitmapIO instance for deprecated bink layers **/
class plBinkBitmapIO : public BitmapIO
{ {
public: public:
int IsPublic() { return 1; } int ExtCount() { return 1; }
void* Create(BOOL loading=FALSE) const TCHAR* Ext(int n) { return _T("bik"); }
const TCHAR* LongDesc() { return _T("DEAD: Bink File"); }
const TCHAR* ShortDesc() { return _T("Bink"); }
const TCHAR* AuthorName() { return _T("Colin Bonstead"); }
const TCHAR* CopyrightMessage() { return _T("Copyright 2004, Cyan Inc."); }
unsigned int Version() { return 100; }
int Capability() { return 0; }
DWORD EvaluateConfigure() { return 0; }
BOOL LoadConfigure(void* ptr) { return FALSE; }
BOOL SaveConfigure(void* ptr) { return FALSE; }
BMMRES GetImageInfo(BitmapInfo* fbi) { return BMMRES_INTERNALERROR; }
BitmapStorage* Load(BitmapInfo* fbi, Bitmap* map, BMMRES* status) { return nullptr; }
void ShowAbout(HWND hWnd)
{ {
hsAssert(false, "bink layers removed due to license issues"); hsMessageBoxWithOwner(hWnd, "Bink Layers removed due to license issues", "DEAD", hsMessageBoxNormal, MB_ICONEXCLAMATION);
return nil;
} }
};
class BinkClassDesc : public ClassDesc2
{
public:
int IsPublic() { return 1; }
void* Create(BOOL loading=FALSE) { return static_cast<void*>(new plBinkBitmapIO); }
const TCHAR* ClassName() { return "Bink"; } const TCHAR* ClassName() { return "Bink"; }
SClass_ID SuperClassID() { return BMM_IO_CLASS_ID; } SClass_ID SuperClassID() { return BMM_IO_CLASS_ID; }

Loading…
Cancel
Save