mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Movie filename in plMovieMsg and plBinkPlayer => plString
This commit is contained in:
@ -78,35 +78,35 @@ protected:
|
||||
hsColorRGBA fColor;
|
||||
|
||||
hsColorRGBA fFadeInColor;
|
||||
float fFadeInSecs;
|
||||
float fFadeInSecs;
|
||||
|
||||
hsColorRGBA fFadeOutColor;
|
||||
float fFadeOutSecs;
|
||||
float fFadeOutSecs;
|
||||
|
||||
float fVolume;
|
||||
float fVolume;
|
||||
|
||||
char* fFileName;
|
||||
plString fFileName;
|
||||
|
||||
uint16_t fCmd;
|
||||
uint16_t fCmd;
|
||||
|
||||
hsTArray<plMessage*> fCallbacks;
|
||||
|
||||
public:
|
||||
plMovieMsg(const char* n, uint16_t cmd)
|
||||
plMovieMsg(const plString& name, uint16_t cmd)
|
||||
: plMessage(nil, nil, nil)
|
||||
{
|
||||
fFileName = hsStrcpy(n);
|
||||
fFileName = name;
|
||||
SetCmd(cmd).MakeDefault();
|
||||
}
|
||||
plMovieMsg() : fFileName(nil), fCmd(kIgnore)
|
||||
|
||||
plMovieMsg() : fCmd(kIgnore)
|
||||
{
|
||||
MakeDefault();
|
||||
}
|
||||
|
||||
virtual ~plMovieMsg()
|
||||
{
|
||||
delete [] fFileName;
|
||||
int i;
|
||||
for( i = 0; i < fCallbacks.GetCount(); i++ )
|
||||
for (int i = 0; i < fCallbacks.GetCount(); i++)
|
||||
{
|
||||
hsRefCnt_SafeUnRef(fCallbacks[i]);
|
||||
}
|
||||
@ -157,8 +157,8 @@ public:
|
||||
|
||||
// Include the movie folder, e.g. "avi/porno.bik"
|
||||
// String is copied, not pointer copy.
|
||||
const char* GetFileName() const { return fFileName; }
|
||||
plMovieMsg& SetFileName(const char* n) { delete [] fFileName; fFileName = hsStrcpy(n); return *this; }
|
||||
plString GetFileName() const { return fFileName; }
|
||||
plMovieMsg& SetFileName(const plString& name) { fFileName = name; return *this; }
|
||||
|
||||
// Color is mostly useful for alpha fade up and down.
|
||||
const hsColorRGBA& GetColor() const { return fColor; }
|
||||
|
@ -57,8 +57,7 @@ class plBinkPlayer
|
||||
{
|
||||
public:
|
||||
|
||||
plBinkPlayer() : fFileName(nil) { }
|
||||
~plBinkPlayer() { delete [] fFileName; }
|
||||
plBinkPlayer() { }
|
||||
|
||||
static bool Init( hsWindowHndl hWnd) { return true; }
|
||||
static bool DeInit() { return true; }
|
||||
@ -83,14 +82,12 @@ class plBinkPlayer
|
||||
for (int i = 0; i < fCallbacks.GetCount(); i++)
|
||||
fCallbacks[i]->Send();
|
||||
fCallbacks.Reset();
|
||||
delete [] fFileName;
|
||||
fFileName = nil;
|
||||
fFileName = plString::Null;
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetFileName(const char* filename) {
|
||||
delete [] fFileName;
|
||||
fFileName = hsStrcpy(filename);
|
||||
void SetFileName(const plString& filename) {
|
||||
fFileName = filename;
|
||||
}
|
||||
void SetColor(const hsColorRGBA& c) { }
|
||||
void SetPosition(float x, float y) { }
|
||||
@ -102,7 +99,7 @@ class plBinkPlayer
|
||||
void SetPosition(const hsPoint2& p) { }
|
||||
void SetScale(const hsPoint2& s) { }
|
||||
|
||||
const char* GetFileName() const { return fFileName; }
|
||||
plString GetFileName() const { return fFileName; }
|
||||
const hsColorRGBA GetColor() const { return hsColorRGBA(); }
|
||||
const hsPoint2 GetPosition() const { return hsPoint2(); }
|
||||
const hsPoint2 GetScale() const { return hsPoint2(); }
|
||||
@ -125,7 +122,7 @@ class plBinkPlayer
|
||||
hsColorRGBA GetFadeToColor() const { return hsColorRGBA(); }
|
||||
|
||||
private:
|
||||
char* fFileName;
|
||||
plString fFileName;
|
||||
hsTArray<plMessage*> fCallbacks;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user