mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Fix string usage that was broken from enabling the Max plugin build
This commit is contained in:
@ -150,8 +150,6 @@ void pfGUIButtonMod::StartDragging( void )
|
||||
|
||||
pfGUIButtonMod::pfGUIButtonMod()
|
||||
{
|
||||
fAnimName = nil;
|
||||
fMouseOverAnimName = nil;
|
||||
fDraggable = nil;
|
||||
fOrigHandler = nil;
|
||||
|
||||
@ -161,12 +159,6 @@ pfGUIButtonMod::pfGUIButtonMod()
|
||||
SetFlag( kWantsInterest );
|
||||
}
|
||||
|
||||
pfGUIButtonMod::~pfGUIButtonMod()
|
||||
{
|
||||
delete [] fAnimName;
|
||||
delete [] fMouseOverAnimName;
|
||||
}
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIButtonMod::IEval( double secs, float del, uint32_t dirty )
|
||||
@ -204,13 +196,13 @@ void pfGUIButtonMod::Read( hsStream *s, hsResMgr *mgr )
|
||||
uint32_t i, count = s->ReadLE32();
|
||||
for( i = 0; i < count; i++ )
|
||||
fAnimationKeys.Append( mgr->ReadKey( s ) );
|
||||
fAnimName = s->ReadSafeString();
|
||||
fAnimName = s->ReadSafeString_TEMP();
|
||||
|
||||
fMouseOverAnimKeys.Reset();
|
||||
count = s->ReadLE32();
|
||||
for( i = 0; i < count; i++ )
|
||||
fMouseOverAnimKeys.Append( mgr->ReadKey( s ) );
|
||||
fMouseOverAnimName = s->ReadSafeString();
|
||||
fMouseOverAnimName = s->ReadSafeString_TEMP();
|
||||
|
||||
fNotifyType = s->ReadLE32();
|
||||
mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDraggable ), plRefFlags::kActiveRef );
|
||||
@ -366,30 +358,16 @@ void pfGUIButtonMod::SetInteresting( hsBool i )
|
||||
}
|
||||
|
||||
|
||||
void pfGUIButtonMod::SetAnimationKeys( hsTArray<plKey> &keys, const char *name )
|
||||
void pfGUIButtonMod::SetAnimationKeys( hsTArray<plKey> &keys, const plString &name )
|
||||
{
|
||||
fAnimationKeys = keys;
|
||||
delete [] fAnimName;
|
||||
if( name != nil )
|
||||
{
|
||||
fAnimName = new char[ strlen( name ) + 1 ];
|
||||
strcpy( fAnimName, name );
|
||||
}
|
||||
else
|
||||
fAnimName = nil;
|
||||
fAnimName = name;
|
||||
}
|
||||
|
||||
void pfGUIButtonMod::SetMouseOverAnimKeys( hsTArray<plKey> &keys, const char *name )
|
||||
void pfGUIButtonMod::SetMouseOverAnimKeys( hsTArray<plKey> &keys, const plString &name )
|
||||
{
|
||||
fMouseOverAnimKeys = keys;
|
||||
delete [] fMouseOverAnimName;
|
||||
if( name != nil )
|
||||
{
|
||||
fMouseOverAnimName = new char[ strlen( name ) + 1 ];
|
||||
strcpy( fMouseOverAnimName, name );
|
||||
}
|
||||
else
|
||||
fMouseOverAnimName = nil;
|
||||
fMouseOverAnimName = name;
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,10 +60,10 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
protected:
|
||||
|
||||
hsTArray<plKey> fAnimationKeys;
|
||||
char *fAnimName;
|
||||
plString fAnimName;
|
||||
|
||||
hsTArray<plKey> fMouseOverAnimKeys;
|
||||
char *fMouseOverAnimName;
|
||||
plString fMouseOverAnimName;
|
||||
|
||||
hsBool fClicking;
|
||||
hsBool fTriggering;
|
||||
@ -83,7 +83,6 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
public:
|
||||
|
||||
pfGUIButtonMod();
|
||||
virtual ~pfGUIButtonMod();
|
||||
|
||||
CLASSNAME_REGISTER( pfGUIButtonMod );
|
||||
GETINTERFACE_ANY( pfGUIButtonMod, pfGUIControlMod );
|
||||
@ -130,8 +129,8 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
void StopDragging( hsBool cancel );
|
||||
|
||||
// Export only
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const char *name );
|
||||
void SetMouseOverAnimKeys( hsTArray<plKey> &keys, const char *name );
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
void SetMouseOverAnimKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
};
|
||||
|
||||
#endif // _pfGUIButtonMod_h
|
||||
|
@ -65,18 +65,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
pfGUICheckBoxCtrl::pfGUICheckBoxCtrl()
|
||||
{
|
||||
fAnimName = nil;
|
||||
SetFlag( kWantsInterest );
|
||||
fChecked = false;
|
||||
fClicking = false;
|
||||
fPlaySound = true;
|
||||
}
|
||||
|
||||
pfGUICheckBoxCtrl::~pfGUICheckBoxCtrl()
|
||||
{
|
||||
delete [] fAnimName;
|
||||
}
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUICheckBoxCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
@ -102,7 +96,7 @@ void pfGUICheckBoxCtrl::Read( hsStream *s, hsResMgr *mgr )
|
||||
for( i = 0; i < count; i++ )
|
||||
fAnimationKeys.Append( mgr->ReadKey( s ) );
|
||||
|
||||
fAnimName = s->ReadSafeString();
|
||||
fAnimName = s->ReadSafeString_TEMP();
|
||||
fChecked = s->ReadBool();
|
||||
}
|
||||
|
||||
@ -197,17 +191,10 @@ void pfGUICheckBoxCtrl::SetChecked( hsBool checked, hsBool immediate /*= fals
|
||||
}
|
||||
}
|
||||
|
||||
void pfGUICheckBoxCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const char *name )
|
||||
void pfGUICheckBoxCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const plString &name )
|
||||
{
|
||||
fAnimationKeys = keys;
|
||||
delete [] fAnimName;
|
||||
if( name != nil )
|
||||
{
|
||||
fAnimName = new char[ strlen( name ) + 1 ];
|
||||
strcpy( fAnimName, name );
|
||||
}
|
||||
else
|
||||
fAnimName = nil;
|
||||
fAnimName = name;
|
||||
}
|
||||
|
||||
//// IGetDesiredCursor ///////////////////////////////////////////////////////
|
||||
|
@ -59,7 +59,7 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
protected:
|
||||
|
||||
hsTArray<plKey> fAnimationKeys;
|
||||
char *fAnimName;
|
||||
plString fAnimName;
|
||||
hsBool fClicking;
|
||||
|
||||
hsBool fChecked;
|
||||
@ -72,7 +72,6 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
public:
|
||||
|
||||
pfGUICheckBoxCtrl();
|
||||
virtual ~pfGUICheckBoxCtrl();
|
||||
|
||||
CLASSNAME_REGISTER( pfGUICheckBoxCtrl );
|
||||
GETINTERFACE_ANY( pfGUICheckBoxCtrl, pfGUIControlMod );
|
||||
@ -94,7 +93,7 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
void DontPlaySounds() { fPlaySound = false; } // should the checkbox play sounds?
|
||||
|
||||
const hsTArray<plKey> &GetAnimationKeys( void ) const { return fAnimationKeys; }
|
||||
const char *GetAnimationName( void ) const { return fAnimName; }
|
||||
plString GetAnimationName( void ) const { return fAnimName; }
|
||||
|
||||
enum SoundEvents
|
||||
{
|
||||
@ -105,7 +104,7 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
};
|
||||
|
||||
// Export only
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const char *name );
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
};
|
||||
|
||||
#endif // _pfGUICheckBoxCtrl_h
|
||||
|
@ -69,7 +69,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//// Constructor/Destructor //////////////////////////////////////////////////
|
||||
|
||||
pfGUIKnobCtrl::pfGUIKnobCtrl() :
|
||||
fAnimName(nil),
|
||||
fDragStart(0.f, 0.f, 0.f),
|
||||
fDragging(false),
|
||||
fAnimStartPos(0.f, 0.f, 0.f),
|
||||
@ -83,11 +82,6 @@ pfGUIKnobCtrl::pfGUIKnobCtrl() :
|
||||
SetFlag( kWantsInterest );
|
||||
}
|
||||
|
||||
pfGUIKnobCtrl::~pfGUIKnobCtrl()
|
||||
{
|
||||
delete [] fAnimName;
|
||||
}
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIKnobCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
@ -112,7 +106,7 @@ void pfGUIKnobCtrl::Read( hsStream *s, hsResMgr *mgr )
|
||||
uint32_t i, count = s->ReadLE32();
|
||||
for( i = 0; i < count; i++ )
|
||||
fAnimationKeys.Append( mgr->ReadKey( s ) );
|
||||
fAnimName = s->ReadSafeString();
|
||||
fAnimName = s->ReadSafeString_TEMP();
|
||||
|
||||
fAnimTimesCalced = false;
|
||||
|
||||
@ -262,17 +256,10 @@ void pfGUIKnobCtrl::HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers )
|
||||
|
||||
//// SetAnimationKeys ////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIKnobCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const char *name )
|
||||
void pfGUIKnobCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const plString &name )
|
||||
{
|
||||
fAnimationKeys = keys;
|
||||
delete [] fAnimName;
|
||||
if( name != nil )
|
||||
{
|
||||
fAnimName = new char[ strlen( name ) + 1 ];
|
||||
strcpy( fAnimName, name );
|
||||
}
|
||||
else
|
||||
fAnimName = nil;
|
||||
fAnimName = name;
|
||||
}
|
||||
|
||||
//// ICalcAnimTimes //////////////////////////////////////////////////////////
|
||||
|
@ -58,17 +58,17 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
protected:
|
||||
|
||||
hsTArray<plKey> fAnimationKeys;
|
||||
char *fAnimName;
|
||||
plString fAnimName;
|
||||
|
||||
hsPoint3 fDragStart;
|
||||
float fDragValue;
|
||||
float fDragValue;
|
||||
hsBool fDragging;
|
||||
|
||||
hsPoint3 fAnimStartPos, fAnimEndPos; // Calculated at export time for kMapToScreenRange
|
||||
float fDragRangeMin, fDragRangeMax;
|
||||
float fDragRangeMin, fDragRangeMax;
|
||||
|
||||
// Computed once, once an anim is loaded that we can compute this with
|
||||
float fAnimBegin, fAnimEnd;
|
||||
float fAnimBegin, fAnimEnd;
|
||||
hsBool fAnimTimesCalced;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
@ -80,7 +80,6 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
public:
|
||||
|
||||
pfGUIKnobCtrl();
|
||||
virtual ~pfGUIKnobCtrl();
|
||||
|
||||
CLASSNAME_REGISTER( pfGUIKnobCtrl );
|
||||
GETINTERFACE_ANY( pfGUIKnobCtrl, pfGUIValueCtrl );
|
||||
@ -109,7 +108,7 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
virtual void SetCurrValue( float v );
|
||||
|
||||
// Export only
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const char *name );
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
void SetScreenRange( const hsPoint3 &startPos, const hsPoint3 &endPos ) { fAnimStartPos = startPos; fAnimEndPos = endPos; }
|
||||
};
|
||||
|
||||
|
@ -72,15 +72,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
pfGUIProgressCtrl::pfGUIProgressCtrl() : fStopSoundTimer(99)
|
||||
{
|
||||
fAnimTimesCalced = false;
|
||||
fAnimName = nil;
|
||||
fPlaySound = true;
|
||||
}
|
||||
|
||||
pfGUIProgressCtrl::~pfGUIProgressCtrl()
|
||||
{
|
||||
delete [] fAnimName;
|
||||
}
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIProgressCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
@ -114,7 +108,7 @@ void pfGUIProgressCtrl::Read( hsStream *s, hsResMgr *mgr )
|
||||
uint32_t i, count = s->ReadLE32();
|
||||
for( i = 0; i < count; i++ )
|
||||
fAnimationKeys.Append( mgr->ReadKey( s ) );
|
||||
fAnimName = s->ReadSafeString();
|
||||
fAnimName = s->ReadSafeString_TEMP();
|
||||
|
||||
fAnimTimesCalced = false;
|
||||
}
|
||||
@ -141,17 +135,10 @@ void pfGUIProgressCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool forc
|
||||
|
||||
//// SetAnimationKeys ////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIProgressCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const char *name )
|
||||
void pfGUIProgressCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const plString &name )
|
||||
{
|
||||
fAnimationKeys = keys;
|
||||
delete [] fAnimName;
|
||||
if( name != nil )
|
||||
{
|
||||
fAnimName = new char[ strlen( name ) + 1 ];
|
||||
strcpy( fAnimName, name );
|
||||
}
|
||||
else
|
||||
fAnimName = nil;
|
||||
fAnimName = name;
|
||||
}
|
||||
|
||||
//// ICalcAnimTimes //////////////////////////////////////////////////////////
|
||||
|
@ -58,10 +58,10 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl
|
||||
protected:
|
||||
|
||||
hsTArray<plKey> fAnimationKeys;
|
||||
char *fAnimName;
|
||||
plString fAnimName;
|
||||
|
||||
// Computed once, once an anim is loaded that we can compute this with
|
||||
float fAnimBegin, fAnimEnd;
|
||||
float fAnimBegin, fAnimEnd;
|
||||
hsBool fAnimTimesCalced;
|
||||
hsBool fPlaySound;
|
||||
|
||||
@ -69,12 +69,11 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl
|
||||
|
||||
hsBool ICalcAnimTimes( void );
|
||||
|
||||
const uint32_t fStopSoundTimer;
|
||||
const uint32_t fStopSoundTimer;
|
||||
|
||||
public:
|
||||
|
||||
pfGUIProgressCtrl();
|
||||
virtual ~pfGUIProgressCtrl();
|
||||
|
||||
CLASSNAME_REGISTER( pfGUIProgressCtrl );
|
||||
GETINTERFACE_ANY( pfGUIProgressCtrl, pfGUIValueCtrl );
|
||||
@ -103,7 +102,7 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl
|
||||
void DontPlaySounds() { fPlaySound = false; }
|
||||
|
||||
// Export only
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const char *name );
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
};
|
||||
|
||||
#endif // _pfGUIProgressCtrl_h
|
||||
|
Reference in New Issue
Block a user