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

Animation SDL variable names => plString

This commit is contained in:
2014-01-12 17:45:53 -08:00
parent ef04cfcf84
commit ae1bbdc1d6
4 changed files with 12 additions and 41 deletions

View File

@ -674,12 +674,7 @@ bool plLayerLinkAnimation::MsgReceive( plMessage* pMsg )
///////////////////////////////////////////////////////////////////////////////////////////////
plLayerSDLAnimation::plLayerSDLAnimation() : plLayerAnimationBase(), fVar(nil), fVarName(nil) {}
plLayerSDLAnimation::~plLayerSDLAnimation()
{
delete [] fVarName;
}
plLayerSDLAnimation::plLayerSDLAnimation() : plLayerAnimationBase(), fVar(nil) {}
uint32_t plLayerSDLAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore)
{
@ -691,7 +686,7 @@ uint32_t plLayerSDLAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore
if (fEvalTime < 0)
{
if (fVarName != nil)
if (!fVarName.IsEmpty())
{
extern const plSDLModifier *ExternFindAgeSDL();
const plSDLModifier *sdlMod = ExternFindAgeSDL();
@ -741,7 +736,7 @@ void plLayerSDLAnimation::Read(hsStream* s, hsResMgr* mgr)
{
plLayerAnimationBase::Read(s, mgr);
fVarName = s->ReadSafeString();
fVarName = s->ReadSafeString_TEMP();
}
void plLayerSDLAnimation::Write(hsStream* s, hsResMgr* mgr)
@ -750,9 +745,3 @@ void plLayerSDLAnimation::Write(hsStream* s, hsResMgr* mgr)
s->WriteSafeString(fVarName);
}
void plLayerSDLAnimation::SetVarName(char *name)
{
delete [] fVarName;
fVarName = hsStrcpy(name);
}

View File

@ -189,11 +189,10 @@ class plLayerSDLAnimation : public plLayerAnimationBase
{
protected:
plSimpleStateVariable *fVar;
char *fVarName;
plString fVarName;
public:
plLayerSDLAnimation();
virtual ~plLayerSDLAnimation();
CLASSNAME_REGISTER( plLayerSDLAnimation );
GETINTERFACE_ANY( plLayerSDLAnimation, plLayerAnimationBase );
@ -205,8 +204,8 @@ public:
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
char *GetVarName() { return fVarName; }
void SetVarName(char *name);
plString GetVarName() const { return fVarName; }
void SetVarName(const plString &name) { fVarName = name; }
};
#endif // plLayerAnimation_inc