|
|
@ -61,37 +61,36 @@ plOneShotMod::plOneShotMod() |
|
|
|
fReversable(false), |
|
|
|
fReversable(false), |
|
|
|
fSeekDuration(1.0f), |
|
|
|
fSeekDuration(1.0f), |
|
|
|
fSmartSeek(false), |
|
|
|
fSmartSeek(false), |
|
|
|
fAnimName(nil), |
|
|
|
|
|
|
|
fNoSeek(false) |
|
|
|
fNoSeek(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// this constructor is called from the loader.
|
|
|
|
// this constructor is called from the loader.
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// CTOR(char *)
|
|
|
|
// CTOR(char *)
|
|
|
|
plOneShotMod::plOneShotMod(const char *animName, |
|
|
|
plOneShotMod::plOneShotMod(const plString &animName, |
|
|
|
bool drivable, |
|
|
|
bool drivable, |
|
|
|
bool reversable, |
|
|
|
bool reversable, |
|
|
|
float seekDuration, |
|
|
|
float seekDuration, |
|
|
|
bool smartSeek, |
|
|
|
bool smartSeek, |
|
|
|
bool noSeek) |
|
|
|
bool noSeek) |
|
|
|
: fDrivable(drivable), |
|
|
|
: fAnimName(animName), |
|
|
|
|
|
|
|
fDrivable(drivable), |
|
|
|
fReversable(reversable), |
|
|
|
fReversable(reversable), |
|
|
|
fSeekDuration(seekDuration), |
|
|
|
fSeekDuration(seekDuration), |
|
|
|
fSmartSeek((float)smartSeek), |
|
|
|
fSmartSeek((float)smartSeek), |
|
|
|
fNoSeek(noSeek) |
|
|
|
fNoSeek(noSeek) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fAnimName = hsStrcpy(animName); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// INIT
|
|
|
|
// INIT
|
|
|
|
void plOneShotMod::Init(const char *animName, |
|
|
|
void plOneShotMod::Init(const plString &animName, |
|
|
|
bool drivable, |
|
|
|
bool drivable, |
|
|
|
bool reversable, |
|
|
|
bool reversable, |
|
|
|
float seekDuration, |
|
|
|
float seekDuration, |
|
|
|
bool smartSeek, |
|
|
|
bool smartSeek, |
|
|
|
bool noSeek) |
|
|
|
bool noSeek) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fAnimName = hsStrcpy(animName); |
|
|
|
fAnimName = animName; |
|
|
|
fDrivable = drivable; |
|
|
|
fDrivable = drivable; |
|
|
|
fReversable = reversable; |
|
|
|
fReversable = reversable; |
|
|
|
fSeekDuration = seekDuration; |
|
|
|
fSeekDuration = seekDuration; |
|
|
@ -99,15 +98,6 @@ void plOneShotMod::Init(const char *animName, |
|
|
|
fNoSeek = noSeek; |
|
|
|
fNoSeek = noSeek; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// DTOR()
|
|
|
|
|
|
|
|
plOneShotMod::~plOneShotMod() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(fAnimName) { |
|
|
|
|
|
|
|
delete[] fAnimName; |
|
|
|
|
|
|
|
fAnimName = nil; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MSGRECEIVE
|
|
|
|
// MSGRECEIVE
|
|
|
|
bool plOneShotMod::MsgReceive(plMessage* msg) |
|
|
|
bool plOneShotMod::MsgReceive(plMessage* msg) |
|
|
@ -164,7 +154,7 @@ void plOneShotMod::Read(hsStream *stream, hsResMgr *mgr) |
|
|
|
plMultiModifier::Read(stream, mgr); |
|
|
|
plMultiModifier::Read(stream, mgr); |
|
|
|
|
|
|
|
|
|
|
|
// read in the name of the animation itself
|
|
|
|
// read in the name of the animation itself
|
|
|
|
fAnimName = stream->ReadSafeString(); |
|
|
|
fAnimName = stream->ReadSafeString_TEMP(); |
|
|
|
fSeekDuration = stream->ReadLEScalar(); |
|
|
|
fSeekDuration = stream->ReadLEScalar(); |
|
|
|
fDrivable = stream->ReadBool(); |
|
|
|
fDrivable = stream->ReadBool(); |
|
|
|
fReversable = stream->ReadBool(); |
|
|
|
fReversable = stream->ReadBool(); |
|
|
|