mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 02:51:27 +00:00
Obliterate hsBool
This commit is contained in:
@ -79,7 +79,7 @@ public:
|
||||
fHitPoint.Write(stream);
|
||||
}
|
||||
|
||||
hsBool TriggerType() { return fTriggerType; }
|
||||
bool TriggerType() { return fTriggerType; }
|
||||
void SetTriggerType(int n) { fTriggerType = n; }
|
||||
|
||||
enum
|
||||
|
@ -61,8 +61,8 @@ public:
|
||||
bool fLoaded;
|
||||
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoaded = stream->Readbool(); }
|
||||
void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->Writebool(fLoaded); }
|
||||
void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoaded = stream->ReadBool(); }
|
||||
void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->WriteBool(fLoaded); }
|
||||
};
|
||||
|
||||
// A msg sent locally when panding pages are done loaded and it's now ok to join the game
|
||||
@ -94,8 +94,8 @@ public:
|
||||
bool fLoading;
|
||||
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoading = stream->Readbool(); }
|
||||
void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->Writebool(fLoading); }
|
||||
void Read(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgRead(stream, mgr); fLoading = stream->ReadBool(); }
|
||||
void Write(hsStream* stream, hsResMgr* mgr) { plMessage::IMsgWrite(stream, mgr); stream->WriteBool(fLoading); }
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -76,7 +76,7 @@ plString plAnimCmdMsg::GetLoopName()
|
||||
return fLoopName;
|
||||
}
|
||||
|
||||
hsBool plAnimCmdMsg::CmdChangesAnimTime()
|
||||
bool plAnimCmdMsg::CmdChangesAnimTime()
|
||||
{
|
||||
return (Cmd(kContinue) ||
|
||||
Cmd(kStop) ||
|
||||
|
@ -108,12 +108,12 @@ public:
|
||||
|
||||
hsBitVector fCmd;
|
||||
|
||||
hsBool Cmd(int n) const { return fCmd.IsBitSet(n); }
|
||||
bool Cmd(int n) const { return fCmd.IsBitSet(n); }
|
||||
void SetCmd(int n) { fCmd.SetBit(n); }
|
||||
void ClearCmd();
|
||||
void SetAnimName(const plString &name);
|
||||
plString GetAnimName();
|
||||
hsBool CmdChangesAnimTime(); // Will this command cause an update to the current anim time?
|
||||
bool CmdChangesAnimTime(); // Will this command cause an update to the current anim time?
|
||||
|
||||
// TEMP plString REVISIT
|
||||
// Because I'm TOO LAZY to keep converting all these calls to SetAnimName
|
||||
@ -167,7 +167,7 @@ public:
|
||||
|
||||
hsBitVector fCmd;
|
||||
|
||||
hsBool Cmd(int n) const { return fCmd.IsBitSet(n); }
|
||||
bool Cmd(int n) const { return fCmd.IsBitSet(n); }
|
||||
void SetCmd(int n) { fCmd.SetBit(n); }
|
||||
void ClearCmd() { fCmd.Clear(); }
|
||||
void SetAnimName(const plString &name);
|
||||
|
@ -99,7 +99,7 @@ void plAvCoopMsg::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgRead(stream, mgr);
|
||||
|
||||
if(stream->Readbool())
|
||||
if(stream->ReadBool())
|
||||
fCoordinator = reinterpret_cast<plCoopCoordinator *>(mgr->ReadCreatable(stream));
|
||||
|
||||
fInitiatorID = stream->ReadLE32();
|
||||
@ -114,7 +114,7 @@ void plAvCoopMsg::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgWrite(stream, mgr);
|
||||
|
||||
stream->Writebool(fCoordinator != nil);
|
||||
stream->WriteBool(fCoordinator != nil);
|
||||
if(fCoordinator)
|
||||
mgr->WriteCreatable(stream, fCoordinator);
|
||||
|
||||
|
@ -51,7 +51,7 @@ plAvatarFootMsg::plAvatarFootMsg()
|
||||
{
|
||||
}
|
||||
|
||||
plAvatarFootMsg::plAvatarFootMsg(const plKey& s, plArmatureMod *armature, plAvBrain *brain, hsBool isLocal, hsBool isLeft)
|
||||
plAvatarFootMsg::plAvatarFootMsg(const plKey& s, plArmatureMod *armature, plAvBrain *brain, bool isLocal, bool isLeft)
|
||||
: plArmatureUpdateMsg(s, isLocal, true, armature, brain),
|
||||
fIsLeft(isLeft)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ class plAvBrain;
|
||||
class plAvatarFootMsg : public plEventCallbackMsg
|
||||
{
|
||||
protected:
|
||||
hsBool fIsLeft;
|
||||
bool fIsLeft;
|
||||
plArmatureMod* fArmature;
|
||||
public:
|
||||
plAvatarFootMsg()
|
||||
@ -61,7 +61,7 @@ public:
|
||||
fEvent = kTime;
|
||||
SetBCastFlag(plMessage::kBCastByExactType);
|
||||
}
|
||||
plAvatarFootMsg(const plKey& s, plArmatureMod *armature, hsBool isLeft) : plEventCallbackMsg(s, nil, nil), fArmature(armature), fIsLeft(isLeft)
|
||||
plAvatarFootMsg(const plKey& s, plArmatureMod *armature, bool isLeft) : plEventCallbackMsg(s, nil, nil), fArmature(armature), fIsLeft(isLeft)
|
||||
{
|
||||
fEvent = kTime;
|
||||
SetBCastFlag(plMessage::kBCastByExactType);
|
||||
@ -79,8 +79,8 @@ public:
|
||||
hsAssert(false, "This message is not supposed to travel over the network or persist in a file.");
|
||||
}
|
||||
|
||||
hsBool IsLeft() const { return fIsLeft; }
|
||||
void SetIsLeft(hsBool on) { fIsLeft = (0 != on); }
|
||||
bool IsLeft() const { return fIsLeft; }
|
||||
void SetIsLeft(bool on) { fIsLeft = (0 != on); }
|
||||
|
||||
plArmatureMod* GetArmature() const { return fArmature; }
|
||||
void SetArmature(plArmatureMod* a) { fArmature = a; }
|
||||
|
@ -96,7 +96,7 @@ plArmatureUpdateMsg::plArmatureUpdateMsg()
|
||||
|
||||
// CTOR sender receiver islocal isplayercontrolled
|
||||
plArmatureUpdateMsg::plArmatureUpdateMsg(const plKey &sender,
|
||||
hsBool isLocal, hsBool isPlayerControlled,
|
||||
bool isLocal, bool isPlayerControlled,
|
||||
plArmatureMod *armature)
|
||||
: plAvatarMsg(sender, nil),
|
||||
fIsLocal(isLocal),
|
||||
@ -120,18 +120,18 @@ void plArmatureUpdateMsg::Write(hsStream *stream, hsResMgr *mgr)
|
||||
}
|
||||
|
||||
// ISLOCAL
|
||||
hsBool plArmatureUpdateMsg::IsLocal() const
|
||||
bool plArmatureUpdateMsg::IsLocal() const
|
||||
{
|
||||
return fIsLocal;
|
||||
}
|
||||
|
||||
// ISPLAYERCONTROLLED
|
||||
hsBool plArmatureUpdateMsg::IsPlayerControlled() const
|
||||
bool plArmatureUpdateMsg::IsPlayerControlled() const
|
||||
{
|
||||
return fIsPlayerControlled;
|
||||
}
|
||||
|
||||
hsBool plArmatureUpdateMsg::IsInvis() const
|
||||
bool plArmatureUpdateMsg::IsInvis() const
|
||||
{
|
||||
return fIsInvis;
|
||||
}
|
||||
@ -155,13 +155,13 @@ plAvatarSetTypeMsg::plAvatarSetTypeMsg(const plKey &sender, const plKey &receive
|
||||
// READ
|
||||
void plAvatarSetTypeMsg::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
fIsPlayer = stream->Readbool();
|
||||
fIsPlayer = stream->ReadBool();
|
||||
}
|
||||
|
||||
// WRITE
|
||||
void plAvatarSetTypeMsg::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
stream->Writebool(fIsPlayer);
|
||||
stream->WriteBool(fIsPlayer);
|
||||
}
|
||||
|
||||
// SETISPLAYER
|
||||
@ -248,8 +248,8 @@ plAvSeekMsg::plAvSeekMsg()
|
||||
|
||||
// CTOR(sender, receiver, seekKey, time)
|
||||
plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver,
|
||||
const plKey &seekKey, float duration, hsBool smartSeek,
|
||||
plAvAlignment alignType, char *animName, hsBool noSeek,
|
||||
const plKey &seekKey, float duration, bool smartSeek,
|
||||
plAvAlignment alignType, char *animName, bool noSeek,
|
||||
uint8_t flags, plKey finishKey)
|
||||
: plAvTaskMsg(sender, receiver),
|
||||
fSeekPoint(seekKey),
|
||||
@ -265,22 +265,22 @@ plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver,
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plAvSeekMsg::Force3rdPersonOnStart()
|
||||
bool plAvSeekMsg::Force3rdPersonOnStart()
|
||||
{
|
||||
return fFlags & kSeekFlagForce3rdPersonOnStart;
|
||||
}
|
||||
|
||||
hsBool plAvSeekMsg::UnForce3rdPersonOnFinish()
|
||||
bool plAvSeekMsg::UnForce3rdPersonOnFinish()
|
||||
{
|
||||
return fFlags & kSeekFlagUnForce3rdPersonOnFinish;
|
||||
}
|
||||
|
||||
hsBool plAvSeekMsg::NoWarpOnTimeout()
|
||||
bool plAvSeekMsg::NoWarpOnTimeout()
|
||||
{
|
||||
return fFlags & kSeekFlagNoWarpOnTimeout;
|
||||
}
|
||||
|
||||
hsBool plAvSeekMsg::RotationOnly()
|
||||
bool plAvSeekMsg::RotationOnly()
|
||||
{
|
||||
return fFlags & kSeekFlagRotationOnly;
|
||||
}
|
||||
@ -357,8 +357,8 @@ plAvOneShotMsg::plAvOneShotMsg()
|
||||
|
||||
// CTOR(sender, receiver, seekKey, time)
|
||||
plAvOneShotMsg::plAvOneShotMsg(const plKey &sender, const plKey& receiver,
|
||||
const plKey& seekKey, float duration, hsBool smartSeek,
|
||||
const plString &animName, hsBool drivable, hsBool reversible)
|
||||
const plKey& seekKey, float duration, bool smartSeek,
|
||||
const plString &animName, bool drivable, bool reversible)
|
||||
: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek), fAnimName(animName),
|
||||
fDrivable(drivable), fReversible(reversible), fCallbacks(nil)
|
||||
{
|
||||
@ -412,7 +412,7 @@ plAvBrainGenericMsg::plAvBrainGenericMsg()
|
||||
|
||||
// canonical CTOR sender receiver type stage rewind transitionTime
|
||||
plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
plAvBrainGenericMsg::Type type, int stage, hsBool rewind, float transitionTime)
|
||||
plAvBrainGenericMsg::Type type, int stage, bool rewind, float transitionTime)
|
||||
: plAvatarMsg(sender, receiver),
|
||||
fType(type),
|
||||
fWhichStage(stage),
|
||||
@ -426,8 +426,8 @@ plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &recei
|
||||
}
|
||||
|
||||
plAvBrainGenericMsg::plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, float transitiontime)
|
||||
Type type, int stage, bool setTime, float newTime,
|
||||
bool setDirection, bool isForward, float transitiontime)
|
||||
: plAvatarMsg(sender, receiver),
|
||||
fType(type),
|
||||
fWhichStage(stage),
|
||||
|
@ -86,18 +86,18 @@ class plArmatureUpdateMsg : public plAvatarMsg
|
||||
public:
|
||||
plArmatureUpdateMsg();
|
||||
plArmatureUpdateMsg(const plKey &sender,
|
||||
hsBool isLocal, hsBool isPlayerControlled,
|
||||
bool isLocal, bool isPlayerControlled,
|
||||
plArmatureMod *armature);
|
||||
|
||||
/** The avatar that sent this message is the local avatar for this client. */
|
||||
hsBool IsLocal() const;
|
||||
void SetIsLocal(hsBool on) { fIsLocal = on; }
|
||||
bool IsLocal() const;
|
||||
void SetIsLocal(bool on) { fIsLocal = on; }
|
||||
/** The avatar that sent this message is controlled by a human being -- although
|
||||
not necessarily a local human being. */
|
||||
hsBool IsPlayerControlled() const;
|
||||
void SetIsPlayerControlled(hsBool on) { fIsPlayerControlled = on; }
|
||||
hsBool IsInvis() const;
|
||||
void SetInvis(hsBool val) { fIsInvis = val; }
|
||||
bool IsPlayerControlled() const;
|
||||
void SetIsPlayerControlled(bool on) { fIsPlayerControlled = on; }
|
||||
bool IsInvis() const;
|
||||
void SetInvis(bool val) { fIsInvis = val; }
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plArmatureUpdateMsg );
|
||||
@ -111,9 +111,9 @@ public:
|
||||
|
||||
protected:
|
||||
// these will probably change to enums + bitmasks .. don't count on the representation
|
||||
hsBool fIsLocal;
|
||||
hsBool fIsPlayerControlled;
|
||||
hsBool fIsInvis; // Avatar is invis. Don't update visable effects.
|
||||
bool fIsLocal;
|
||||
bool fIsPlayerControlled;
|
||||
bool fIsInvis; // Avatar is invis. Don't update visable effects.
|
||||
};
|
||||
|
||||
// use this to turn an npc into a player and vice-versa
|
||||
@ -188,18 +188,18 @@ public:
|
||||
|
||||
// tors
|
||||
plAvSeekMsg();
|
||||
plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, hsBool smartSeek,
|
||||
plAvAlignment align = kAlignHandle, char *animName = nil, hsBool noSeek = false,
|
||||
plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek,
|
||||
plAvAlignment align = kAlignHandle, char *animName = nil, bool noSeek = false,
|
||||
uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil);
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plAvSeekMsg );
|
||||
GETINTERFACE_ANY( plAvSeekMsg, plAvTaskMsg );
|
||||
|
||||
hsBool Force3rdPersonOnStart();
|
||||
hsBool UnForce3rdPersonOnFinish();
|
||||
hsBool NoWarpOnTimeout();
|
||||
hsBool RotationOnly();
|
||||
bool Force3rdPersonOnStart();
|
||||
bool UnForce3rdPersonOnFinish();
|
||||
bool NoWarpOnTimeout();
|
||||
bool RotationOnly();
|
||||
plKey GetFinishCallbackKey() { return fFinishKey; }
|
||||
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
@ -210,8 +210,8 @@ public:
|
||||
hsPoint3 fTargetPos; // Or we specify the point/lookat explicitly
|
||||
hsPoint3 fTargetLookAt;
|
||||
float fDuration; // take this much time to do the move (only if smartSeek is false)
|
||||
hsBool fSmartSeek; // seek by walking rather than floating
|
||||
hsBool fNoSeek;
|
||||
bool fSmartSeek; // seek by walking rather than floating
|
||||
bool fNoSeek;
|
||||
char *fAnimName;
|
||||
plAvAlignment fAlignType;
|
||||
uint8_t fFlags;
|
||||
@ -221,7 +221,7 @@ public:
|
||||
class plAvTaskSeekDoneMsg : public plAvatarMsg
|
||||
{
|
||||
public:
|
||||
hsBool fAborted;
|
||||
bool fAborted;
|
||||
|
||||
plAvTaskSeekDoneMsg() : plAvatarMsg(), fAborted(false) {}
|
||||
plAvTaskSeekDoneMsg(const plKey &sender, const plKey &receiver) : plAvatarMsg(sender, receiver), fAborted(false) {}
|
||||
@ -246,8 +246,8 @@ public:
|
||||
plAvOneShotMsg();
|
||||
virtual ~plAvOneShotMsg();
|
||||
plAvOneShotMsg(const plKey &sender, const plKey& receiver,
|
||||
const plKey& seekKey, float duration, hsBool fSmartSeek,
|
||||
const plString &animName, hsBool drivable, hsBool reversible);
|
||||
const plKey& seekKey, float duration, bool fSmartSeek,
|
||||
const plString &animName, bool drivable, bool reversible);
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plAvOneShotMsg );
|
||||
@ -258,8 +258,8 @@ public:
|
||||
|
||||
// public members
|
||||
plString fAnimName; // the name of the animation we're going to use
|
||||
hsBool fDrivable; // are we animated by time or by mouse movement?
|
||||
hsBool fReversible; // can we play backwards?
|
||||
bool fDrivable; // are we animated by time or by mouse movement?
|
||||
bool fReversible; // can we play backwards?
|
||||
plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier
|
||||
// we share it, so release with UnRef
|
||||
};
|
||||
@ -283,17 +283,17 @@ public:
|
||||
fType;
|
||||
int fWhichStage; // used only by goto stage
|
||||
float fTransitionTime; // for crossfade between stages
|
||||
hsBool fSetTime;
|
||||
bool fSetTime;
|
||||
float fNewTime;
|
||||
hsBool fSetDirection;
|
||||
hsBool fNewDirection;
|
||||
bool fSetDirection;
|
||||
bool fNewDirection;
|
||||
int fNewLoopCount;
|
||||
// tors
|
||||
plAvBrainGenericMsg();
|
||||
|
||||
//! Older constructor version, allowing simple rewinding only
|
||||
plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool rewind, float transitionTime);
|
||||
Type type, int stage, bool rewind, float transitionTime);
|
||||
|
||||
/** Canonical constructor, allowing full control over time and direction of new stage.
|
||||
\param sender Message sender
|
||||
@ -307,8 +307,8 @@ public:
|
||||
\param transitionTime Time in seconds to transition between stages.
|
||||
*/
|
||||
plAvBrainGenericMsg(const plKey& sender, const plKey &receiver,
|
||||
Type type, int stage, hsBool setTime, float newTime,
|
||||
hsBool setDirection, bool isForward, float transitiontime);
|
||||
Type type, int stage, bool setTime, float newTime,
|
||||
bool setDirection, bool isForward, float transitiontime);
|
||||
|
||||
/** Constructor for setting the loop count in a particular stage.
|
||||
\param sender The sender of this message.
|
||||
@ -403,7 +403,7 @@ class plAvatarBehaviorNotifyMsg : public plMessage
|
||||
{
|
||||
public:
|
||||
uint32_t fType;
|
||||
hsBool state;
|
||||
bool state;
|
||||
|
||||
plAvatarBehaviorNotifyMsg() : fType(0),state(false) {}
|
||||
|
||||
|
@ -77,9 +77,9 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
hsBool Shot() const { return fCmd == kShot; }
|
||||
hsBool Spray() const { return fCmd == kSpray; }
|
||||
hsBool Stop() const { return fCmd == kStop; }
|
||||
bool Shot() const { return fCmd == kShot; }
|
||||
bool Spray() const { return fCmd == kSpray; }
|
||||
bool Stop() const { return fCmd == kStop; }
|
||||
|
||||
void FireShot(const hsPoint3& from, const hsVector3& dir, float radius, float range, float psecs=-1.f);
|
||||
void FireShot(const hsPoint3& from, const hsPoint3& at, float radius, float psecs=-1.f);
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
class plCCRBanLinkingMsg : public plCCRMessage
|
||||
{
|
||||
public:
|
||||
hsBool fBan; // ban or un ban
|
||||
bool fBan; // ban or un ban
|
||||
|
||||
plCCRBanLinkingMsg() ;
|
||||
~plCCRBanLinkingMsg() {}
|
||||
@ -170,7 +170,7 @@ public:
|
||||
class plCCRSilencePlayerMsg : public plCCRMessage
|
||||
{
|
||||
public:
|
||||
hsBool fSilence; // ban or un ban
|
||||
bool fSilence; // ban or un ban
|
||||
|
||||
plCCRSilencePlayerMsg() ;
|
||||
~plCCRSilencePlayerMsg() {}
|
||||
|
@ -55,7 +55,7 @@ plClimbMsg::plClimbMsg()
|
||||
// nothing
|
||||
}
|
||||
|
||||
plClimbMsg::plClimbMsg(const plKey &sender, const plKey &receiver, Command command, Direction direction, hsBool status, plKey target)
|
||||
plClimbMsg::plClimbMsg(const plKey &sender, const plKey &receiver, Command command, Direction direction, bool status, plKey target)
|
||||
: plMessage(sender, receiver, nil),
|
||||
fCommand(command), fDirection(direction),
|
||||
fStatus(status),
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
|
||||
// tors
|
||||
plClimbMsg();
|
||||
plClimbMsg(const plKey &sender, const plKey &receiver, Command command = kNoCommand, Direction direction = kCenter, hsBool status = false, plKey target = nil);
|
||||
plClimbMsg(const plKey &sender, const plKey &receiver, Command command = kNoCommand, Direction direction = kCenter, bool status = false, plKey target = nil);
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plClimbMsg );
|
||||
@ -83,7 +83,7 @@ public:
|
||||
|
||||
Command fCommand;
|
||||
Direction fDirection;
|
||||
hsBool fStatus;
|
||||
bool fStatus;
|
||||
plKey fTarget; // used for seeking to mount points
|
||||
private:
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ class plCollideMsg : public plMessage
|
||||
protected:
|
||||
public:
|
||||
plKey fOtherKey;
|
||||
hsBool fEntering; // otherwise it's leaving
|
||||
bool fEntering; // otherwise it's leaving
|
||||
|
||||
plCollideMsg() { SetBCastFlag(plMessage::kPropagateToModifiers); }
|
||||
~plCollideMsg() {}
|
||||
|
@ -55,7 +55,7 @@ plDynaDecalEnableMsg::plDynaDecalEnableMsg()
|
||||
{
|
||||
}
|
||||
|
||||
plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, float w, hsBool end, uint32_t id, hsBool isArm)
|
||||
plDynaDecalEnableMsg::plDynaDecalEnableMsg(const plKey& r, const plKey& a, double t, float w, bool end, uint32_t id, bool isArm)
|
||||
: plMessage(nil, r, nil),
|
||||
fKey(a),
|
||||
fFlags(0),
|
||||
|
@ -63,7 +63,7 @@ protected:
|
||||
uint32_t fID;
|
||||
public:
|
||||
plDynaDecalEnableMsg();
|
||||
plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, float wetLength, hsBool end, uint32_t id=uint32_t(-1), hsBool isArm=true);
|
||||
plDynaDecalEnableMsg(const plKey& r, const plKey& armOrShapeKey, double conTime, float wetLength, bool end, uint32_t id=uint32_t(-1), bool isArm=true);
|
||||
~plDynaDecalEnableMsg();
|
||||
|
||||
CLASSNAME_REGISTER( plDynaDecalEnableMsg );
|
||||
@ -76,8 +76,8 @@ public:
|
||||
const plKey& GetArmKey() const { return fKey; }
|
||||
void SetArmKey(const plKey& k) { fKey = k; SetArmature(true); }
|
||||
|
||||
hsBool IsArmature() const { return 0 != (fFlags & kArmature); }
|
||||
void SetArmature(hsBool b) { if(b)fFlags |= kArmature; else fFlags &= ~kArmature; }
|
||||
bool IsArmature() const { return 0 != (fFlags & kArmature); }
|
||||
void SetArmature(bool b) { if(b)fFlags |= kArmature; else fFlags &= ~kArmature; }
|
||||
|
||||
const plKey& GetShapeKey() const { return fKey; }
|
||||
void SetShapeKey(const plKey& k) { fKey = k; SetArmature(false); }
|
||||
@ -88,8 +88,8 @@ public:
|
||||
float GetWetLength() const { return fWetLength; }
|
||||
void SetWetLength(float w) { fWetLength = w; }
|
||||
|
||||
hsBool AtEnd() const { return 0 != (fFlags & kAtEnd); }
|
||||
void SetAtEnd(hsBool b) { if(b)fFlags |= kAtEnd; else fFlags &= ~kAtEnd; }
|
||||
bool AtEnd() const { return 0 != (fFlags & kAtEnd); }
|
||||
void SetAtEnd(bool b) { if(b)fFlags |= kAtEnd; else fFlags &= ~kAtEnd; }
|
||||
|
||||
uint32_t GetID() const { return fID; }
|
||||
void SetID(uint32_t n) { fID = n; }
|
||||
|
@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsResMgr.h"
|
||||
#include "hsBitVector.h"
|
||||
|
||||
void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, hsBool blockRGB )
|
||||
void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, bool blockRGB )
|
||||
{
|
||||
hsAssert( ( fCmd & kColorCmds ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~kColorCmds;
|
||||
@ -60,7 +60,7 @@ void plDynamicTextMsg::SetTextColor( hsColorRGBA &c, hsBool blockRGB )
|
||||
fBlockRGB = blockRGB;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::SetFont( const char *face, int16_t size, hsBool isBold )
|
||||
void plDynamicTextMsg::SetFont( const char *face, int16_t size, bool isBold )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kPosCmds | kStringCmds | kFlagCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kPosCmds | kStringCmds | kFlagCmds );
|
||||
@ -178,7 +178,7 @@ void plDynamicTextMsg::DrawWrappedString( int16_t x, int16_t y, uint16_t wrap
|
||||
fBottom = wrapHeight;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, hsBool respectAlpha )
|
||||
void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, bool respectAlpha )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kPosCmds | kFlagCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kPosCmds | kFlagCmds );
|
||||
@ -190,7 +190,7 @@ void plDynamicTextMsg::DrawImage( int16_t x, int16_t y, plKey &image, hsBool
|
||||
fFlags = (uint32_t)respectAlpha;
|
||||
}
|
||||
|
||||
void plDynamicTextMsg::DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, hsBool respectAlpha )
|
||||
void plDynamicTextMsg::DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, bool respectAlpha )
|
||||
{
|
||||
hsAssert( ( fCmd & ( kPosCmds | kFlagCmds | kRectCmds ) ) == 0, "Attempting to issue conflicting drawText commands" );
|
||||
fCmd &= ~( kPosCmds | kFlagCmds | kRectCmds );
|
||||
@ -227,7 +227,7 @@ void plDynamicTextMsg::Read( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
s->ReadLE( &fFlags );
|
||||
|
||||
s->ReadLE( &fBlockRGB );
|
||||
fBlockRGB = s->ReadBOOL();
|
||||
s->ReadLE( &fLineSpacing );
|
||||
}
|
||||
void plDynamicTextMsg::Write( hsStream *s, hsResMgr *mgr )
|
||||
@ -258,7 +258,7 @@ void plDynamicTextMsg::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
s->WriteLE( fFlags );
|
||||
|
||||
s->WriteLE( fBlockRGB );
|
||||
s->WriteBOOL(fBlockRGB);
|
||||
s->WriteLE( fLineSpacing );
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ void plDynamicTextMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
|
||||
if (contentFlags.IsBitSet(kDynTextMsgFlags))
|
||||
s->ReadLE( &fFlags );
|
||||
if (contentFlags.IsBitSet(kDynTextMsgBlockRGB))
|
||||
s->ReadLE( &fBlockRGB );
|
||||
fBlockRGB = s->ReadBOOL();
|
||||
if (contentFlags.IsBitSet(kDynTextMsgLineSpacing))
|
||||
s->ReadLE( &fLineSpacing );
|
||||
}
|
||||
@ -368,7 +368,7 @@ void plDynamicTextMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
s->WriteLE( fFlags );
|
||||
|
||||
// kDynTextMsgBlockRGB
|
||||
s->WriteLE( fBlockRGB );
|
||||
s->WriteBOOL( fBlockRGB );
|
||||
// kDynTextMsgLineSpacing
|
||||
s->WriteLE( fLineSpacing );
|
||||
|
||||
|
@ -80,7 +80,7 @@ protected:
|
||||
// Misc flags field
|
||||
uint32_t fFlags;
|
||||
|
||||
hsBool fBlockRGB;
|
||||
bool fBlockRGB;
|
||||
int16_t fLineSpacing;
|
||||
|
||||
public:
|
||||
@ -121,8 +121,8 @@ public:
|
||||
void PurgeImage( void ) { fCmd |= kPurgeImage; }
|
||||
|
||||
// The following are mutually exclusive commands 'cause they share some parameters
|
||||
void SetTextColor( hsColorRGBA &c, hsBool blockRGB = false );
|
||||
void SetFont( const char *face, int16_t size, hsBool isBold = false );
|
||||
void SetTextColor( hsColorRGBA &c, bool blockRGB = false );
|
||||
void SetFont( const char *face, int16_t size, bool isBold = false );
|
||||
void SetLineSpacing( int16_t spacing );
|
||||
void FillRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c );
|
||||
void FrameRect( uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, hsColorRGBA &c );
|
||||
@ -132,8 +132,8 @@ public:
|
||||
void DrawClippedString( int16_t x, int16_t y, uint16_t clipLeft, uint16_t clipTop, uint16_t clipRight, uint16_t clipBottom, const wchar_t *text );
|
||||
void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const char *text );
|
||||
void DrawWrappedString( int16_t x, int16_t y, uint16_t wrapWidth, uint16_t wrapHeight, const wchar_t *text );
|
||||
void DrawImage( int16_t x, int16_t y, plKey &image, hsBool respectAlpha = false );
|
||||
void DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, hsBool respectAlpha = false );
|
||||
void DrawImage( int16_t x, int16_t y, plKey &image, bool respectAlpha = false );
|
||||
void DrawClippedImage( int16_t x, int16_t y, plKey &image, uint16_t clipX, uint16_t clipY, uint16_t clipWidth, uint16_t clipHeight, bool respectAlpha = false );
|
||||
void SetJustify( uint8_t justifyFlags );
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr);
|
||||
|
@ -52,7 +52,7 @@ class hsResMgr;
|
||||
class plEnvEffectMsg : public plMessage
|
||||
{
|
||||
|
||||
hsBool fEnable;
|
||||
bool fEnable;
|
||||
|
||||
public:
|
||||
plEnvEffectMsg(){ SetBCastFlag(plMessage::kPropagateToModifiers); }
|
||||
@ -66,8 +66,8 @@ public:
|
||||
CLASSNAME_REGISTER( plEnvEffectMsg );
|
||||
GETINTERFACE_ANY( plEnvEffectMsg, plMessage );
|
||||
|
||||
hsBool Enabled() { return fEnable; }
|
||||
void Enable(hsBool b) { fEnable = b; }
|
||||
bool Enabled() { return fEnable; }
|
||||
void Enable(bool b) { fEnable = b; }
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ void plControlEventMsg::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plInputEventMsg::Read(stream, mgr);
|
||||
stream->ReadLE((int32_t*)&fControlCode);
|
||||
stream->ReadLE(&fControlActivated);
|
||||
fControlActivated = stream->ReadBOOL();
|
||||
stream->ReadLE(&fControlPct);
|
||||
fTurnToPt.Read(stream);
|
||||
|
||||
@ -147,7 +147,7 @@ void plControlEventMsg::Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plInputEventMsg::Write(stream, mgr);
|
||||
stream->WriteLE((int32_t)fControlCode);
|
||||
stream->WriteLE(fControlActivated);
|
||||
stream->WriteBOOL(fControlActivated);
|
||||
stream->WriteLE(fControlPct);
|
||||
fTurnToPt.Write(stream);
|
||||
|
||||
@ -175,7 +175,7 @@ void plControlEventMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
|
||||
s->ReadLE((int32_t*)&fControlCode);
|
||||
|
||||
if (contentFlags.IsBitSet(kControlEventMsgActivated))
|
||||
s->ReadLE(&fControlActivated);
|
||||
fControlActivated = s->ReadBOOL();
|
||||
|
||||
if (contentFlags.IsBitSet(kControlEventMsgPct))
|
||||
s->ReadLE(&fControlPct);
|
||||
@ -204,7 +204,7 @@ void plControlEventMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
s->WriteLE((int32_t)fControlCode);
|
||||
|
||||
// kControlEventMsgActivated,
|
||||
s->WriteLE(fControlActivated);
|
||||
s->WriteBOOL(fControlActivated);
|
||||
|
||||
// kControlEventMsgPct,
|
||||
s->WriteLE(fControlPct);
|
||||
@ -319,7 +319,7 @@ void plAvatarInputStateMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
s->WriteLE16(fState);
|
||||
}
|
||||
|
||||
hsBool plAvatarInputStateMsg::IsCodeInMap(ControlEventCode code)
|
||||
bool plAvatarInputStateMsg::IsCodeInMap(ControlEventCode code)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fMapSize; i++)
|
||||
|
@ -87,9 +87,9 @@ private:
|
||||
protected:
|
||||
|
||||
ControlEventCode fControlCode;
|
||||
hsBool fControlActivated;
|
||||
bool fControlActivated;
|
||||
hsPoint3 fTurnToPt;
|
||||
float fControlPct;
|
||||
float fControlPct;
|
||||
public:
|
||||
|
||||
plControlEventMsg();
|
||||
@ -103,12 +103,12 @@ public:
|
||||
|
||||
void SetCmdString(const char* cs) { delete [] fCmd; fCmd=hsStrcpy(cs); }
|
||||
void SetControlCode(ControlEventCode c) { fControlCode = c; }
|
||||
void SetControlActivated(hsBool b) { fControlActivated = b; }
|
||||
void SetControlActivated(bool b) { fControlActivated = b; }
|
||||
void SetTurnToPt(hsPoint3 pt) { fTurnToPt = pt; }
|
||||
void SetControlPct(float p) { fControlPct = p; }
|
||||
|
||||
ControlEventCode GetControlCode() const { return fControlCode; }
|
||||
hsBool ControlActivated() { return fControlActivated; }
|
||||
bool ControlActivated() { return fControlActivated; }
|
||||
hsPoint3 GetTurnToPt() { return fTurnToPt; }
|
||||
float GetPct() { return fControlPct; }
|
||||
char* GetCmdString() { return fCmd; }
|
||||
@ -127,11 +127,11 @@ class plKeyEventMsg : public plInputEventMsg
|
||||
protected:
|
||||
wchar_t fKeyChar;
|
||||
plKeyDef fKeyCode;
|
||||
hsBool fKeyDown;
|
||||
hsBool fCapsLockKeyDown;
|
||||
hsBool fShiftKeyDown;
|
||||
hsBool fCtrlKeyDown;
|
||||
hsBool fRepeat;
|
||||
bool fKeyDown;
|
||||
bool fCapsLockKeyDown;
|
||||
bool fShiftKeyDown;
|
||||
bool fCtrlKeyDown;
|
||||
bool fRepeat;
|
||||
|
||||
public:
|
||||
|
||||
@ -147,41 +147,41 @@ public:
|
||||
|
||||
void SetKeyChar(wchar_t key) { fKeyChar = key; }
|
||||
void SetKeyCode(plKeyDef w) { fKeyCode = w; }
|
||||
void SetKeyDown(hsBool b) { fKeyDown = b; }
|
||||
void SetShiftKeyDown(hsBool b) { fShiftKeyDown = b; }
|
||||
void SetCtrlKeyDown(hsBool b) { fCtrlKeyDown = b; }
|
||||
void SetCapsLockKeyDown(hsBool b) { fCapsLockKeyDown = b; }
|
||||
void SetRepeat(hsBool b) { fRepeat = b; }
|
||||
void SetKeyDown(bool b) { fKeyDown = b; }
|
||||
void SetShiftKeyDown(bool b) { fShiftKeyDown = b; }
|
||||
void SetCtrlKeyDown(bool b) { fCtrlKeyDown = b; }
|
||||
void SetCapsLockKeyDown(bool b) { fCapsLockKeyDown = b; }
|
||||
void SetRepeat(bool b) { fRepeat = b; }
|
||||
|
||||
wchar_t GetKeyChar() { return fKeyChar; }
|
||||
plKeyDef GetKeyCode() { return fKeyCode; }
|
||||
hsBool GetKeyDown() { return fKeyDown; }
|
||||
hsBool GetShiftKeyDown() { return fShiftKeyDown; }
|
||||
hsBool GetCtrlKeyDown() { return fCtrlKeyDown; }
|
||||
hsBool GetCapsLockKeyDown() { return fCapsLockKeyDown; }
|
||||
hsBool GetRepeat() { return fRepeat; }
|
||||
wchar_t GetKeyChar() const { return fKeyChar; }
|
||||
plKeyDef GetKeyCode() const { return fKeyCode; }
|
||||
bool GetKeyDown() const { return fKeyDown; }
|
||||
bool GetShiftKeyDown() const { return fShiftKeyDown; }
|
||||
bool GetCtrlKeyDown() const { return fCtrlKeyDown; }
|
||||
bool GetCapsLockKeyDown() const { return fCapsLockKeyDown; }
|
||||
bool GetRepeat() const { return fRepeat; }
|
||||
|
||||
// IO
|
||||
void Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plInputEventMsg::Read(stream, mgr);
|
||||
stream->ReadLE((int32_t*)&fKeyCode);
|
||||
stream->ReadLE(&fKeyDown);
|
||||
stream->ReadLE(&fCapsLockKeyDown);
|
||||
stream->ReadLE(&fShiftKeyDown);
|
||||
stream->ReadLE(&fCtrlKeyDown);
|
||||
stream->ReadLE(&fRepeat);
|
||||
fKeyDown = stream->ReadBOOL();
|
||||
fCapsLockKeyDown = stream->ReadBOOL();
|
||||
fShiftKeyDown = stream->ReadBOOL();
|
||||
fCtrlKeyDown = stream->ReadBOOL();
|
||||
fRepeat = stream->ReadBOOL();
|
||||
}
|
||||
|
||||
void Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plInputEventMsg::Write(stream, mgr);
|
||||
stream->WriteLE((int32_t)fKeyCode);
|
||||
stream->WriteLE(fKeyDown);
|
||||
stream->WriteLE(fCapsLockKeyDown);
|
||||
stream->WriteLE(fShiftKeyDown);
|
||||
stream->WriteLE(fCtrlKeyDown);
|
||||
stream->WriteLE(fRepeat);
|
||||
stream->WriteLE32((int32_t)fKeyCode);
|
||||
stream->WriteBOOL(fKeyDown);
|
||||
stream->WriteBOOL(fCapsLockKeyDown);
|
||||
stream->WriteBOOL(fShiftKeyDown);
|
||||
stream->WriteBOOL(fCtrlKeyDown);
|
||||
stream->WriteBOOL(fRepeat);
|
||||
}
|
||||
};
|
||||
|
||||
@ -190,10 +190,10 @@ class plDebugKeyEventMsg : public plInputEventMsg
|
||||
{
|
||||
protected:
|
||||
ControlEventCode fKeyCode;
|
||||
hsBool fKeyDown;
|
||||
hsBool fCapsLockKeyDown;
|
||||
hsBool fShiftKeyDown;
|
||||
hsBool fCtrlKeyDown;
|
||||
bool fKeyDown;
|
||||
bool fCapsLockKeyDown;
|
||||
bool fShiftKeyDown;
|
||||
bool fCtrlKeyDown;
|
||||
|
||||
public:
|
||||
|
||||
@ -208,16 +208,16 @@ public:
|
||||
GETINTERFACE_ANY( plDebugKeyEventMsg, plInputEventMsg );
|
||||
|
||||
void SetKeyCode(ControlEventCode w) { fKeyCode = w; }
|
||||
void SetKeyDown(hsBool b) { fKeyDown = b; }
|
||||
void SetShiftKeyDown(hsBool b) { fShiftKeyDown = b; }
|
||||
void SetCtrlKeyDown(hsBool b) { fCtrlKeyDown = b; }
|
||||
void SetCapsLockKeyDown(hsBool b) { fCapsLockKeyDown = b; }
|
||||
void SetKeyDown(bool b) { fKeyDown = b; }
|
||||
void SetShiftKeyDown(bool b) { fShiftKeyDown = b; }
|
||||
void SetCtrlKeyDown(bool b) { fCtrlKeyDown = b; }
|
||||
void SetCapsLockKeyDown(bool b) { fCapsLockKeyDown = b; }
|
||||
|
||||
ControlEventCode GetKeyCode() { return fKeyCode; }
|
||||
hsBool GetKeyDown() { return fKeyDown; }
|
||||
hsBool GetShiftKeyDown() { return fShiftKeyDown; }
|
||||
hsBool GetCtrlKeyDown() { return fCtrlKeyDown; }
|
||||
hsBool GetCapsLockKeyDown() { return fCapsLockKeyDown; }
|
||||
ControlEventCode GetKeyCode() const { return fKeyCode; }
|
||||
bool GetKeyDown() const { return fKeyDown; }
|
||||
bool GetShiftKeyDown() const { return fShiftKeyDown; }
|
||||
bool GetCtrlKeyDown() const { return fCtrlKeyDown; }
|
||||
bool GetCapsLockKeyDown() const { return fCapsLockKeyDown; }
|
||||
|
||||
|
||||
// IO
|
||||
@ -225,20 +225,20 @@ public:
|
||||
{
|
||||
plInputEventMsg::Read(stream, mgr);
|
||||
stream->ReadLE((int32_t*)&fKeyCode);
|
||||
stream->ReadLE(&fKeyDown);
|
||||
stream->ReadLE(&fCapsLockKeyDown);
|
||||
stream->ReadLE(&fShiftKeyDown);
|
||||
stream->ReadLE(&fCtrlKeyDown);
|
||||
fKeyDown = stream->ReadBOOL();
|
||||
fCapsLockKeyDown = stream->ReadBOOL();
|
||||
fShiftKeyDown = stream->ReadBOOL();
|
||||
fCtrlKeyDown = stream->ReadBOOL();
|
||||
}
|
||||
|
||||
void Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plInputEventMsg::Write(stream, mgr);
|
||||
stream->WriteLE((int32_t)fKeyCode);
|
||||
stream->WriteLE(fKeyDown);
|
||||
stream->WriteLE(fCapsLockKeyDown);
|
||||
stream->WriteLE(fShiftKeyDown);
|
||||
stream->WriteLE(fCtrlKeyDown);
|
||||
stream->WriteBOOL(fKeyDown);
|
||||
stream->WriteBOOL(fCapsLockKeyDown);
|
||||
stream->WriteBOOL(fShiftKeyDown);
|
||||
stream->WriteBOOL(fCtrlKeyDown);
|
||||
}
|
||||
};
|
||||
|
||||
@ -420,7 +420,7 @@ public:
|
||||
static const ControlEventCode fCodeMap[];
|
||||
static const uint8_t fMapSize;
|
||||
|
||||
static hsBool IsCodeInMap(ControlEventCode code);
|
||||
static bool IsCodeInMap(ControlEventCode code);
|
||||
};
|
||||
|
||||
#endif // plInputEventMsg_inc
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
|
||||
plKey fObj;
|
||||
hsPoint3 fHitPoint;
|
||||
hsBool fNoHit;
|
||||
bool fNoHit;
|
||||
uint32_t fRequestID;
|
||||
uint32_t fHitFlags;
|
||||
hsVector3 fNormal;
|
||||
|
@ -314,7 +314,7 @@ void plLinkEffectBCMsg::Write(hsStream* stream, hsResMgr* mgr)
|
||||
stream->WriteLE32(fLinkFlags);
|
||||
}
|
||||
|
||||
void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, hsBool on /* = true */)
|
||||
void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, bool on /* = true */)
|
||||
{
|
||||
if (on)
|
||||
fLinkFlags |= flag;
|
||||
@ -322,7 +322,7 @@ void plLinkEffectBCMsg::SetLinkFlag(uint32_t flag, hsBool on /* = true */)
|
||||
fLinkFlags &= ~flag;
|
||||
}
|
||||
|
||||
hsBool plLinkEffectBCMsg::HasLinkFlag(uint32_t flag)
|
||||
bool plLinkEffectBCMsg::HasLinkFlag(uint32_t flag)
|
||||
{
|
||||
return fLinkFlags & flag;
|
||||
}
|
||||
@ -384,7 +384,7 @@ plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg() : fForward(false)
|
||||
}
|
||||
|
||||
|
||||
plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg(hsBool forward, plKey avatarKey)
|
||||
plPseudoLinkAnimTriggerMsg::plPseudoLinkAnimTriggerMsg(bool forward, plKey avatarKey)
|
||||
{
|
||||
fForward = forward;
|
||||
fAvatarKey = avatarKey;
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
class plLinkEffectsTriggerMsg : public plMessage
|
||||
{
|
||||
protected:
|
||||
hsBool fLeavingAge;
|
||||
bool fLeavingAge;
|
||||
plKey fLinkKey;
|
||||
plKey fLinkInAnimKey;
|
||||
int fInvisLevel;
|
||||
@ -131,8 +131,8 @@ public:
|
||||
void SetInvisLevel(int invisLevel) { fInvisLevel=invisLevel; }
|
||||
int GetInvisLevel() { return fInvisLevel; }
|
||||
|
||||
void SetLeavingAge(hsBool leaving) { fLeavingAge = leaving; }
|
||||
hsBool IsLeavingAge() { return fLeavingAge; }
|
||||
void SetLeavingAge(bool leaving) { fLeavingAge = leaving; }
|
||||
bool IsLeavingAge() { return fLeavingAge; }
|
||||
|
||||
void SetLinkKey(plKey &key);
|
||||
const plKey GetLinkKey() const { return fLinkKey; }
|
||||
@ -157,7 +157,7 @@ protected:
|
||||
plLinkEffectsTriggerMsg *fTrigger;
|
||||
|
||||
public:
|
||||
hsBool fLeavingAge;
|
||||
bool fLeavingAge;
|
||||
plKey fLinkKey;
|
||||
|
||||
plLinkEffectsTriggerPrepMsg() : fLeavingAge(false), fLinkKey(nil), fTrigger(nil) { }
|
||||
@ -202,8 +202,8 @@ public:
|
||||
void Read(hsStream* stream, hsResMgr* mgr);
|
||||
void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void SetLinkFlag(uint32_t flag, hsBool on = true);
|
||||
hsBool HasLinkFlag(uint32_t flag);
|
||||
void SetLinkFlag(uint32_t flag, bool on = true);
|
||||
bool HasLinkFlag(uint32_t flag);
|
||||
|
||||
plKey fLinkKey;
|
||||
};
|
||||
@ -213,7 +213,7 @@ public:
|
||||
class plLinkEffectPrepBCMsg : public plMessage
|
||||
{
|
||||
public:
|
||||
hsBool fLeavingAge;
|
||||
bool fLeavingAge;
|
||||
plKey fLinkKey;
|
||||
|
||||
plLinkEffectPrepBCMsg();
|
||||
@ -268,7 +268,7 @@ class plPseudoLinkAnimTriggerMsg : public plMessage
|
||||
public:
|
||||
|
||||
plPseudoLinkAnimTriggerMsg();
|
||||
plPseudoLinkAnimTriggerMsg(hsBool forward, plKey avatarKey);
|
||||
plPseudoLinkAnimTriggerMsg(bool forward, plKey avatarKey);
|
||||
~plPseudoLinkAnimTriggerMsg() {}
|
||||
|
||||
CLASSNAME_REGISTER(plPseudoLinkAnimTriggerMsg);
|
||||
@ -278,7 +278,7 @@ public:
|
||||
void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
plKey fAvatarKey;
|
||||
hsBool fForward;
|
||||
bool fForward;
|
||||
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@ void plListenerMsg::Write(hsStream* s, hsResMgr* mgr)
|
||||
}
|
||||
|
||||
|
||||
plSetListenerMsg::plSetListenerMsg( uint8_t type, const plKey &srcKey, hsBool binding ) : plMessage( nil, nil, nil )
|
||||
plSetListenerMsg::plSetListenerMsg( uint8_t type, const plKey &srcKey, bool binding ) : plMessage( nil, nil, nil )
|
||||
{
|
||||
plUoid uoid( kListenerMod_KEY );
|
||||
plKey pLKey = hsgResMgr::ResMgr()->FindKey( uoid );
|
||||
@ -94,7 +94,7 @@ void plSetListenerMsg::Write( hsStream *s, hsResMgr *mgr )
|
||||
s->WriteBool( fBinding );
|
||||
}
|
||||
|
||||
void plSetListenerMsg::Set( const plKey &key, uint8_t type, hsBool binding )
|
||||
void plSetListenerMsg::Set( const plKey &key, uint8_t type, bool binding )
|
||||
{
|
||||
fSrcKey = key;
|
||||
fType = (uint8_t)type;
|
||||
|
@ -88,7 +88,7 @@ protected:
|
||||
|
||||
uint8_t fType;
|
||||
plKey fSrcKey;
|
||||
hsBool fBinding;
|
||||
bool fBinding;
|
||||
|
||||
public:
|
||||
|
||||
@ -103,7 +103,7 @@ public:
|
||||
};
|
||||
|
||||
plSetListenerMsg() : plMessage( nil, nil, nil ) { fType = 0; fBinding = false; }
|
||||
plSetListenerMsg( uint8_t type, const plKey &srcKey, hsBool binding );
|
||||
plSetListenerMsg( uint8_t type, const plKey &srcKey, bool binding );
|
||||
~plSetListenerMsg();
|
||||
|
||||
CLASSNAME_REGISTER( plSetListenerMsg );
|
||||
@ -112,11 +112,11 @@ public:
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
void Set( const plKey &key, uint8_t type, hsBool binding );
|
||||
void Set( const plKey &key, uint8_t type, bool binding );
|
||||
|
||||
plKey &GetSrcKey( void ) { return fSrcKey; }
|
||||
uint8_t GetType( void ) const { return fType; }
|
||||
hsBool IsBinding( void ) const { return fBinding; }
|
||||
bool IsBinding( void ) const { return fBinding; }
|
||||
};
|
||||
|
||||
#endif // plListenerMsg_inc
|
||||
|
@ -57,7 +57,7 @@ class plLoadAgeMsg : public plMessage
|
||||
protected:
|
||||
char* fAgeFilename; // the age to load/unload
|
||||
plUUID fAgeGuid;
|
||||
hsBool fUnload; // true if we want to unload the age
|
||||
bool fUnload; // true if we want to unload the age
|
||||
int fPlayerID;
|
||||
public:
|
||||
plLoadAgeMsg() : fAgeFilename(nil), fUnload(false), fPlayerID(-1){ }
|
||||
@ -72,8 +72,8 @@ public:
|
||||
void SetAgeGuid( const plUUID * v ) { fAgeGuid.CopyFrom( v ); }
|
||||
const plUUID * GetAgeGuid() const { return &fAgeGuid; }
|
||||
|
||||
void SetLoading(hsBool l) { fUnload=!l; }
|
||||
hsBool GetLoading() const { return !fUnload; }
|
||||
void SetLoading(bool l) { fUnload=!l; }
|
||||
bool GetLoading() const { return !fUnload; }
|
||||
|
||||
void SetPlayerID(int p) { fPlayerID=p; }
|
||||
int GetPlayerID() const { return fPlayerID; }
|
||||
|
@ -66,7 +66,7 @@ plLoadAvatarMsg::plLoadAvatarMsg()
|
||||
|
||||
// CTOR uoidToClone, requestorKey, userData, isPlayer, spawnPOint, initialTask
|
||||
plLoadAvatarMsg::plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &requestorKey, uint32_t userData,
|
||||
hsBool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char* userStr /*= nil*/)
|
||||
bool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char* userStr /*= nil*/)
|
||||
: plLoadCloneMsg(uoidToClone, requestorKey, userData),
|
||||
fIsPlayer(isPlayer),
|
||||
fSpawnPoint(spawnPoint),
|
||||
@ -77,7 +77,7 @@ plLoadAvatarMsg::plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &request
|
||||
}
|
||||
|
||||
plLoadAvatarMsg::plLoadAvatarMsg(const plKey &existing, const plKey &requestor, uint32_t userData,
|
||||
hsBool isPlayer, hsBool isLoading, const char* userStr /*= nil*/)
|
||||
bool isPlayer, bool isLoading, const char* userStr /*= nil*/)
|
||||
: plLoadCloneMsg(existing, requestor, userData, isLoading),
|
||||
fIsPlayer(isPlayer),
|
||||
fSpawnPoint(nil),
|
||||
@ -186,7 +186,7 @@ void plLoadAvatarMsg::SetIsPlayer(bool is)
|
||||
}
|
||||
|
||||
// GETISPLAYER
|
||||
hsBool plLoadAvatarMsg::GetIsPlayer()
|
||||
bool plLoadAvatarMsg::GetIsPlayer()
|
||||
{
|
||||
return fIsPlayer;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
\param userStr - a string that the user can set
|
||||
*/
|
||||
plLoadAvatarMsg(const plUoid &uoidToClone, const plKey &requestorKey, uint32_t userData,
|
||||
hsBool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char *userStr = nil);
|
||||
bool isPlayer, const plKey &spawnPoint, plAvTask *initialTask, const char *userStr = nil);
|
||||
|
||||
/** Use this form if you're sending a message about an existing clone -- either
|
||||
to propagate it to other machines or to tell them to unload it.
|
||||
@ -97,12 +97,12 @@ public:
|
||||
\param userStr - a string that the user can set
|
||||
*/
|
||||
plLoadAvatarMsg(const plKey &existing, const plKey &requestorKey, uint32_t userData,
|
||||
hsBool isPlayer, hsBool isLoading, const char *userStr = nil);
|
||||
bool isPlayer, bool isLoading, const char *userStr = nil);
|
||||
|
||||
virtual ~plLoadAvatarMsg();
|
||||
|
||||
void SetIsPlayer(bool is);
|
||||
hsBool GetIsPlayer();
|
||||
bool GetIsPlayer();
|
||||
|
||||
void SetSpawnPoint(const plKey &spawnSceneObjectKey);
|
||||
plKey GetSpawnPoint();
|
||||
@ -123,7 +123,7 @@ public:
|
||||
void WriteVersion(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
protected:
|
||||
hsBool fIsPlayer;
|
||||
bool fIsPlayer;
|
||||
plKey fSpawnPoint;
|
||||
plAvTask *fInitialTask;
|
||||
char *fUserStr;
|
||||
|
@ -99,7 +99,7 @@ plLoadCloneMsg::plLoadCloneMsg(const plUoid &uoidToClone, const plKey &requestor
|
||||
|
||||
// CTOR existing, requestor, userData, isLoading
|
||||
// this form is for unloading or other operations on existing clones
|
||||
plLoadCloneMsg::plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, hsBool isLoading)
|
||||
plLoadCloneMsg::plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, bool isLoading)
|
||||
: fCloneKey(existing),
|
||||
fRequestorKey(requestor),
|
||||
fUserData(userData),
|
||||
@ -231,7 +231,7 @@ plKey plLoadCloneMsg::GetRequestorKey()
|
||||
}
|
||||
|
||||
// ISVALIDMESSAGE
|
||||
hsBool plLoadCloneMsg::IsValidMessage()
|
||||
bool plLoadCloneMsg::IsValidMessage()
|
||||
{
|
||||
return fValidMsg;
|
||||
}
|
||||
@ -253,7 +253,7 @@ void plLoadCloneMsg::SetOriginatingPlayerID(uint32_t playerId)
|
||||
fOriginatingPlayerID = playerId;
|
||||
}
|
||||
|
||||
hsBool plLoadCloneMsg::GetIsLoading()
|
||||
bool plLoadCloneMsg::GetIsLoading()
|
||||
{
|
||||
return fIsLoading;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
\param userData - Whatever you want. Will be propagated to the requestor.
|
||||
\param isLoading - Are we loading or unloading?
|
||||
*/
|
||||
plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, hsBool isLoading);
|
||||
plLoadCloneMsg(const plKey &existing, const plKey &requestor, uint32_t userData, bool isLoading);
|
||||
|
||||
virtual ~plLoadCloneMsg();
|
||||
|
||||
@ -108,11 +108,11 @@ public:
|
||||
|
||||
plKey GetCloneKey();
|
||||
plKey GetRequestorKey();
|
||||
hsBool IsValidMessage();
|
||||
bool IsValidMessage();
|
||||
uint32_t GetUserData();
|
||||
uint32_t GetOriginatingPlayerID();
|
||||
void SetOriginatingPlayerID(uint32_t playerId);
|
||||
hsBool GetIsLoading();
|
||||
bool GetIsLoading();
|
||||
void SetTriggerMsg(plMessage *msg);
|
||||
plMessage *GetTriggerMsg();
|
||||
|
||||
@ -120,10 +120,10 @@ public:
|
||||
protected:
|
||||
plKey fCloneKey; // the key that will be loaded
|
||||
plKey fRequestorKey; // forward the message to this guy after the clone is created
|
||||
hsBool fValidMsg; // only gets set if the message built successfully
|
||||
bool fValidMsg; // only gets set if the message built successfully
|
||||
uint32_t fUserData; // let requestors send some data to their remote versions
|
||||
uint32_t fOriginatingPlayerID; // network / player id of the client initiating the request
|
||||
hsBool fIsLoading; // true if we're loading; false if we're unloading
|
||||
bool fIsLoading; // true if we're loading; false if we're unloading
|
||||
plMessage *fTriggerMsg; // Handy place to store a message that caused you to request a clone,
|
||||
// so you can see it and continue processing once your clone is loaded.
|
||||
};
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
plMultistageModMsg() : fStageNum(0), fNumLoops(1) {}
|
||||
plMultistageModMsg(const plKey &sender, const plKey &receiver) : plMessage(sender,receiver,nil),fStageNum(0),fNumLoops(1) {}
|
||||
|
||||
hsBool GetCommand(uint8_t cmd) { return fCmds.IsBitSet(cmd); }
|
||||
void SetCommand(uint8_t cmd, hsBool val = true) { fCmds.SetBit(cmd, val); }
|
||||
bool GetCommand(uint8_t cmd) { return fCmds.IsBitSet(cmd); }
|
||||
void SetCommand(uint8_t cmd, bool val = true) { fCmds.SetBit(cmd, val); }
|
||||
|
||||
// plasma protocol
|
||||
CLASSNAME_REGISTER( plMultistageModMsg );
|
||||
|
@ -53,7 +53,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
hsBool fPicked;
|
||||
bool fPicked;
|
||||
hsPoint3 fHitPoint; // where in the world the object was picked on
|
||||
|
||||
plPickedMsg() : fPicked(true),fHitPoint(0,0,0){SetBCastFlag(plMessage::kPropagateToModifiers);}
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
|
||||
hsBitVector fCmd;
|
||||
|
||||
hsBool Cmd(int n) { return fCmd.IsBitSet(n); }
|
||||
bool Cmd(int n) { return fCmd.IsBitSet(n); }
|
||||
void SetCmd(int n) { fCmd.SetBit(n); }
|
||||
void ClearCmd() { fCmd.Clear(); }
|
||||
const hsPoint3 GetTargPoint() { return targPoint; }
|
||||
|
@ -59,12 +59,12 @@ plRideAnimatedPhysMsg::plRideAnimatedPhysMsg(const plKey &sender, const plKey &r
|
||||
void plRideAnimatedPhysMsg::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgRead(stream, mgr);
|
||||
fEntering = stream->Readbool();
|
||||
fEntering = stream->ReadBool();
|
||||
fRegion = mgr->ReadKey(stream);
|
||||
}
|
||||
void plRideAnimatedPhysMsg::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgWrite(stream, mgr);
|
||||
stream->Writebool(fEntering);
|
||||
stream->WriteBool(fEntering);
|
||||
mgr->WriteKey(stream, fRegion);
|
||||
}
|
@ -83,7 +83,7 @@ void plSwimMsg::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgRead(stream, mgr);
|
||||
|
||||
fIsEntering = stream->Readbool();
|
||||
fIsEntering = stream->ReadBool();
|
||||
fSwimRegionKey = mgr->ReadKey(stream);
|
||||
}
|
||||
|
||||
@ -93,6 +93,6 @@ void plSwimMsg::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMessage::IMsgWrite(stream, mgr);
|
||||
|
||||
stream->Writebool(fIsEntering);
|
||||
stream->WriteBool(fIsEntering);
|
||||
mgr->WriteKey(stream, fSwimRegionKey);
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ class plTransitionMsg : public plMessageWithCallbacks
|
||||
{
|
||||
protected:
|
||||
|
||||
uint32_t fEffect;
|
||||
float fLengthInSecs;
|
||||
hsBool fHoldUntilNext;
|
||||
uint32_t fEffect;
|
||||
float fLengthInSecs;
|
||||
bool fHoldUntilNext;
|
||||
public:
|
||||
enum
|
||||
{
|
||||
@ -64,7 +64,7 @@ public:
|
||||
};
|
||||
|
||||
plTransitionMsg() : plMessageWithCallbacks(nil, nil, nil), fEffect( 0 ) { SetBCastFlag(kBCastByExactType); }
|
||||
plTransitionMsg( uint32_t type, float lengthInSecs, hsBool holdUntilNext = false ) :
|
||||
plTransitionMsg( uint32_t type, float lengthInSecs, bool holdUntilNext = false ) :
|
||||
plMessageWithCallbacks(nil, nil, nil), fEffect( type ), fLengthInSecs( lengthInSecs ), fHoldUntilNext( holdUntilNext )
|
||||
{ SetBCastFlag( kBCastByExactType ); }
|
||||
|
||||
@ -73,16 +73,16 @@ public:
|
||||
CLASSNAME_REGISTER( plTransitionMsg );
|
||||
GETINTERFACE_ANY( plTransitionMsg, plMessageWithCallbacks );
|
||||
|
||||
uint32_t GetEffect( void ) const { return fEffect; }
|
||||
uint32_t GetEffect( void ) const { return fEffect; }
|
||||
float GetLengthInSecs( void ) const { return fLengthInSecs; }
|
||||
hsBool GetHoldState( void ) const { return fHoldUntilNext; }
|
||||
bool GetHoldState( void ) const { return fHoldUntilNext; }
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plMessageWithCallbacks::Read(s, mgr);
|
||||
s->ReadLE(&fEffect);
|
||||
s->ReadLE(&fLengthInSecs);
|
||||
s->ReadLE(&fHoldUntilNext);
|
||||
fHoldUntilNext = s->ReadBOOL();
|
||||
}
|
||||
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr)
|
||||
@ -90,7 +90,7 @@ public:
|
||||
plMessageWithCallbacks::Write(s, mgr);
|
||||
s->WriteLE(fEffect);
|
||||
s->WriteLE(fLengthInSecs);
|
||||
s->WriteLE(fHoldUntilNext);
|
||||
s->WriteBOOL(fHoldUntilNext);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user