mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Obliterate hsBool
This commit is contained in:
@ -57,7 +57,7 @@ plCameraProxy::~plCameraProxy()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plCameraProxy::Init(plVirtualCam1* aud)
|
||||
bool plCameraProxy::Init(plVirtualCam1* aud)
|
||||
{
|
||||
plProxyGen::Init(aud);
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
plCameraProxy();
|
||||
virtual ~plCameraProxy();
|
||||
|
||||
hsBool Init(plVirtualCam1* aud);
|
||||
bool Init(plVirtualCam1* aud);
|
||||
plSceneNode* node;
|
||||
};
|
||||
|
||||
|
@ -72,7 +72,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plAvatar/plAvBrainHuman.h"
|
||||
#include "plNetClient/plNetClientMgr.h"
|
||||
|
||||
hsBool plCameraBrain1_FirstPerson::fDontFade = false;
|
||||
bool plCameraBrain1_FirstPerson::fDontFade = false;
|
||||
float plCameraBrain1::fFallAccel = 20.0f;
|
||||
float plCameraBrain1::fFallDecel = 5.0f;
|
||||
float plCameraBrain1::fFallVelocity = 50.0f;
|
||||
@ -153,7 +153,7 @@ void plCameraBrain1::AddTarget()
|
||||
}
|
||||
|
||||
// called when we are pushed on top of the camera stack (or re-activated by another popping off directly above)
|
||||
void plCameraBrain1::Push(hsBool recenter)
|
||||
void plCameraBrain1::Push(bool recenter)
|
||||
{
|
||||
if (fFlags.IsBitSet(kRailComponent))
|
||||
{
|
||||
@ -203,7 +203,7 @@ void plCameraBrain1::SetZoomParams(float max, float min, float rate)
|
||||
|
||||
// periodic update - forced means we are forcing an update at a non-normal time to "prime" the camera
|
||||
// into position before it renders the first time (hence the fake 10 second frame delta)
|
||||
void plCameraBrain1::Update(hsBool forced)
|
||||
void plCameraBrain1::Update(bool forced)
|
||||
{
|
||||
double secs = hsTimer::GetDelSysSeconds();
|
||||
if (forced)
|
||||
@ -259,7 +259,7 @@ void plCameraBrain1::IAnimateFOV(double time)
|
||||
// move the camera's origin point (not where it is looking) toward where it is going
|
||||
void plCameraBrain1::IMoveTowardGoal(double elapsedTime)
|
||||
{
|
||||
hsBool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera());
|
||||
bool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera());
|
||||
|
||||
if (fFlags.IsBitSet(kCutPos) || fFlags.IsBitSet(kNonPhys) || !current)
|
||||
{
|
||||
@ -334,7 +334,7 @@ void plCameraBrain1::SetMovementFlag(int f)
|
||||
|
||||
void plCameraBrain1::IPointTowardGoal(double elapsedTime)
|
||||
{
|
||||
hsBool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera());
|
||||
bool current = plVirtualCam1::Instance()->IsCurrentCamera(GetCamera());
|
||||
|
||||
if (fFlags.IsBitSet(kCutPOA) || fFlags.IsBitSet(kNonPhys) || !current)
|
||||
{
|
||||
@ -452,7 +452,7 @@ float plCameraBrain1::IClampVelocity(hsVector3* vel, float maxSpeed, double elap
|
||||
return distMoved;
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal)
|
||||
bool plCameraBrain1::IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal)
|
||||
{
|
||||
if (decelSpeed == 0)
|
||||
// no deceleration
|
||||
@ -535,7 +535,7 @@ void plCameraBrain1::Write(hsStream* stream, hsResMgr* mgr)
|
||||
stream->WriteLEFloat(fZoomMin);
|
||||
stream->WriteLEFloat(fZoomMax);
|
||||
}
|
||||
hsBool plCameraBrain1::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plCameraMsg* pCamMsg = plCameraMsg::ConvertNoRef(msg);
|
||||
if (pCamMsg)
|
||||
@ -743,7 +743,7 @@ plCameraBrain1_Drive::~plCameraBrain1_Drive()
|
||||
}
|
||||
|
||||
|
||||
void plCameraBrain1_Drive::Push(hsBool recenter)
|
||||
void plCameraBrain1_Drive::Push(bool recenter)
|
||||
{
|
||||
plCameraBrain1::Push(recenter);
|
||||
plInputManager::SetRecenterMouse(true);
|
||||
@ -757,7 +757,7 @@ void plCameraBrain1_Drive::Pop()
|
||||
//
|
||||
// Update Method
|
||||
//
|
||||
void plCameraBrain1_Drive::Update(hsBool forced)
|
||||
void plCameraBrain1_Drive::Update(bool forced)
|
||||
{
|
||||
hsVector3 neg_up = -1 * fUp;
|
||||
fTargetMatrix.Make(&fGoal, &fPOAGoal, &neg_up);
|
||||
@ -882,7 +882,7 @@ void plCameraBrain1_Drive::Update(hsBool forced)
|
||||
fCamera->SetTargetPOA(fPOAGoal);
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1_Drive::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1_Drive::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plMouseEventMsg* pMouseMsg = plMouseEventMsg::ConvertNoRef(msg);
|
||||
if( pMouseMsg )
|
||||
@ -992,7 +992,7 @@ void plCameraBrain1_Avatar::Pop()
|
||||
plCameraBrain1::Pop();
|
||||
}
|
||||
|
||||
void plCameraBrain1_Avatar::Push(hsBool recenter)
|
||||
void plCameraBrain1_Avatar::Push(bool recenter)
|
||||
{
|
||||
bObscured = false;
|
||||
fFallTimer = 0.0f;
|
||||
@ -1003,7 +1003,7 @@ void plCameraBrain1_Avatar::Push(hsBool recenter)
|
||||
//
|
||||
// Update Method
|
||||
//
|
||||
void plCameraBrain1_Avatar::Update(hsBool forced)
|
||||
void plCameraBrain1_Avatar::Update(bool forced)
|
||||
{
|
||||
if (!GetSubject())
|
||||
return;
|
||||
@ -1139,7 +1139,7 @@ void plCameraBrain1_Avatar::IHandleObstacle()
|
||||
// swing around the 'obstacle'
|
||||
}
|
||||
|
||||
void plCameraBrain1_Avatar::ISendFadeMsg(hsBool fade)
|
||||
void plCameraBrain1_Avatar::ISendFadeMsg(bool fade)
|
||||
{
|
||||
if (plVirtualCam1::IsCurrentCamera(GetCamera()))
|
||||
{
|
||||
@ -1158,7 +1158,7 @@ void plCameraBrain1_Avatar::ISendFadeMsg(hsBool fade)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1_Avatar::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1_Avatar::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plLOSHitMsg *pLOSMsg = plLOSHitMsg::ConvertNoRef( msg );
|
||||
if( pLOSMsg )
|
||||
@ -1295,7 +1295,7 @@ plCameraBrain1_FirstPerson::~plCameraBrain1_FirstPerson()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1_FirstPerson::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1_FirstPerson::MsgReceive(plMessage* msg)
|
||||
{
|
||||
|
||||
plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
@ -1429,7 +1429,7 @@ void plCameraBrain1_FirstPerson::CalculatePosition()
|
||||
}
|
||||
|
||||
|
||||
void plCameraBrain1_FirstPerson::Push(hsBool recenter)
|
||||
void plCameraBrain1_FirstPerson::Push(bool recenter)
|
||||
{
|
||||
if (!GetSubject())
|
||||
return;
|
||||
@ -1490,7 +1490,7 @@ void plCameraBrain1_Fixed::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fTargetPoint);
|
||||
}
|
||||
|
||||
void plCameraBrain1_Fixed::Update(hsBool forced)
|
||||
void plCameraBrain1_Fixed::Update(bool forced)
|
||||
{
|
||||
double secs = hsTimer::GetDelSysSeconds();
|
||||
if (forced)
|
||||
@ -1563,7 +1563,7 @@ void plCameraBrain1_Fixed::CalculatePosition()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1_Fixed::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1_Fixed::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (pRefMsg)
|
||||
@ -1611,7 +1611,7 @@ plCameraBrain1_Circle::~plCameraBrain1_Circle()
|
||||
//
|
||||
//
|
||||
//
|
||||
void plCameraBrain1_Circle::Update(hsBool forced)
|
||||
void plCameraBrain1_Circle::Update(bool forced)
|
||||
{
|
||||
double secs = hsTimer::GetDelSysSeconds();
|
||||
if (forced)
|
||||
@ -1651,7 +1651,7 @@ void plCameraBrain1_Circle::Update(hsBool forced)
|
||||
//
|
||||
// keep us on the circle
|
||||
//
|
||||
hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, hsBool warp)
|
||||
hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, bool warp)
|
||||
{
|
||||
|
||||
if (fCurRad != fGoalRad)
|
||||
@ -1659,7 +1659,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do
|
||||
float dist = hsABS(fGoalRad-fCurRad);
|
||||
|
||||
hsAssert(dist>=0 && dist<=kTwoPI, "illegal radian diff");
|
||||
hsBool mustWrap = (dist > M_PI); // go opposite direction for shortcut and wrap
|
||||
bool mustWrap = (dist > M_PI); // go opposite direction for shortcut and wrap
|
||||
|
||||
// compute speed
|
||||
float speed;
|
||||
@ -1676,7 +1676,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do
|
||||
if (mustWrap)
|
||||
{
|
||||
fCurRad-=speed;
|
||||
hsBool didWrap=false;
|
||||
bool didWrap=false;
|
||||
while(fCurRad<0)
|
||||
{
|
||||
didWrap=true;
|
||||
@ -1697,7 +1697,7 @@ hsPoint3 plCameraBrain1_Circle::MoveTowardsFromGoal(const hsPoint3* fromGoal, do
|
||||
if (mustWrap)
|
||||
{
|
||||
fCurRad+=speed;
|
||||
hsBool didWrap=false;
|
||||
bool didWrap=false;
|
||||
while(fCurRad>kTwoPI)
|
||||
{
|
||||
didWrap=true;
|
||||
@ -1791,7 +1791,7 @@ void plCameraBrain1_Circle::Read(hsStream* stream, hsResMgr* mgr)
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plCameraBrain1_Circle::MsgReceive(plMessage* msg)
|
||||
bool plCameraBrain1_Circle::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg* pRefMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (pRefMsg)
|
||||
|
@ -103,8 +103,8 @@ public:
|
||||
|
||||
const plCameraModifier1* GetCamera() { return fCamera; }
|
||||
|
||||
virtual void Update(hsBool forced = false);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual void Update(bool forced = false);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual plSceneObject* GetSubject();
|
||||
virtual void SetSubject(plSceneObject* sub);
|
||||
@ -116,15 +116,15 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool GetFaded() { return false; }
|
||||
virtual hsBool SetFaded(hsBool b) { return false; }
|
||||
virtual bool GetFaded() { return false; }
|
||||
virtual bool SetFaded(bool b) { return false; }
|
||||
|
||||
hsBool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); }
|
||||
bool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); }
|
||||
void SetMovementFlag(int f);
|
||||
void ClearMovementFlag(int which) { fMoveFlags.ClearBit( which ); }
|
||||
void SetFlags(int i) { fFlags.SetBit(i); }
|
||||
void ClearFlags(int which) { fFlags.ClearBit( which ); }
|
||||
hsBool HasFlag(int f) { return fFlags.IsBitSet(f); }
|
||||
bool HasFlag(int f) { return fFlags.IsBitSet(f); }
|
||||
|
||||
void SetGoal(hsPoint3 pt) { fGoal = pt; }
|
||||
void SetPOAGoal(hsPoint3 pt) { fPOAGoal = pt; }
|
||||
@ -141,7 +141,7 @@ public:
|
||||
hsPoint3 GetGoal() { return fGoal; }
|
||||
hsPoint3 GetPOAGoal() { return fPOAGoal; }
|
||||
|
||||
virtual void Push(hsBool recenter = true);
|
||||
virtual void Push(bool recenter = true);
|
||||
virtual void Pop();
|
||||
|
||||
float GetVelocity() { return fVelocity; }
|
||||
@ -182,7 +182,7 @@ protected:
|
||||
double elapsedTime);
|
||||
|
||||
float IClampVelocity(hsVector3* vel, float maxSpeed, double elapsedTime);
|
||||
hsBool IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal);
|
||||
bool IShouldDecelerate(float decelSpeed, float curSpeed, float distToGoal);
|
||||
|
||||
plCameraModifier1* fCamera;
|
||||
plKey fSubjectKey;
|
||||
@ -225,11 +225,11 @@ class plCameraBrain1_Drive : public plCameraBrain1
|
||||
protected:
|
||||
hsPoint3 fDesiredPosition;
|
||||
hsPoint3 fFacingTarget;
|
||||
hsBool bUseDesiredFacing;
|
||||
bool bUseDesiredFacing;
|
||||
float deltaX;
|
||||
float deltaY;
|
||||
hsBool bDisregardY; // these are here to prevent
|
||||
hsBool bDisregardX; // the camera from jumping when the mouse cursor recenters / wraps around.
|
||||
bool bDisregardY; // these are here to prevent
|
||||
bool bDisregardX; // the camera from jumping when the mouse cursor recenters / wraps around.
|
||||
hsVector3 fUp;
|
||||
|
||||
public:
|
||||
@ -243,9 +243,9 @@ public:
|
||||
CLASSNAME_REGISTER( plCameraBrain1_Drive );
|
||||
GETINTERFACE_ANY( plCameraBrain1_Drive, plCameraBrain1 );
|
||||
|
||||
virtual void Update(hsBool forced = false);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual void Push(hsBool recenter = true);
|
||||
virtual void Update(bool forced = false);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual void Push(bool recenter = true);
|
||||
virtual void Pop();
|
||||
|
||||
static float fAcceleration;
|
||||
@ -267,8 +267,8 @@ public:
|
||||
GETINTERFACE_ANY( plCameraBrain1_Avatar, plCameraBrain1 );
|
||||
|
||||
|
||||
virtual void Update(hsBool forced = false);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual void Update(bool forced = false);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void CalculatePosition();
|
||||
hsVector3 GetOffset() { return fOffset; }
|
||||
@ -277,21 +277,21 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool GetFaded() { return fFaded; }
|
||||
virtual hsBool SetFaded(hsBool b) { fFaded = b; return true; }
|
||||
virtual bool GetFaded() { return fFaded; }
|
||||
virtual bool SetFaded(bool b) { fFaded = b; return true; }
|
||||
|
||||
virtual void Pop();
|
||||
virtual void Push(hsBool recenter = true);
|
||||
virtual void Push(bool recenter = true);
|
||||
|
||||
protected:
|
||||
void ISendFadeMsg(hsBool fade);
|
||||
void ISendFadeMsg(bool fade);
|
||||
void IHandleObstacle();
|
||||
|
||||
hsPoint3 fHitPoint;
|
||||
hsVector3 fOffset;
|
||||
hsVector3 fHitNormal;
|
||||
hsBool bObscured;
|
||||
hsBool fFaded;
|
||||
bool bObscured;
|
||||
bool fFaded;
|
||||
plSceneObject* fObstacle;
|
||||
};
|
||||
|
||||
@ -307,12 +307,12 @@ public:
|
||||
GETINTERFACE_ANY( plCameraBrain1_FirstPerson, plCameraBrain1_Avatar );
|
||||
|
||||
virtual void CalculatePosition();
|
||||
virtual void Push(hsBool recenter = true);
|
||||
virtual void Push(bool recenter = true);
|
||||
virtual void Pop();
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// for console hack
|
||||
static hsBool fDontFade;
|
||||
static bool fDontFade;
|
||||
protected:
|
||||
plSceneObject* fPosNode;
|
||||
|
||||
@ -333,9 +333,9 @@ public:
|
||||
|
||||
void SetTargetPoint(plCameraModifier1* pt) { fTargetPoint = pt; }
|
||||
|
||||
virtual void Update(hsBool forced = false);
|
||||
virtual void Update(bool forced = false);
|
||||
void CalculatePosition();
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
@ -382,9 +382,9 @@ public:
|
||||
|
||||
virtual void Read(hsStream *stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream *stream, hsResMgr* mgr);
|
||||
virtual hsPoint3 MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, hsBool warp = false);
|
||||
virtual void Update(hsBool forced = false);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual hsPoint3 MoveTowardsFromGoal(const hsPoint3* fromGoal, double secs, bool warp = false);
|
||||
virtual void Update(bool forced = false);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
uint32_t GetCircleFlags() { return fCircleFlags; }
|
||||
hsPoint3* GetCenter() { return &fCenter; } // use GetCenterPoint
|
||||
@ -396,7 +396,7 @@ public:
|
||||
void SetCircleFlags(uint32_t f) { fCircleFlags|=f; }
|
||||
void SetCenter(hsPoint3* ctr) { fCenter = *ctr; } // Circle lies in the plane z = ctr->z
|
||||
void SetRadius(float radius) { fRadius = radius; }
|
||||
void SetFarCircleCam(hsBool farType) { if (farType) fCircleFlags |= kFarthest; else fCircleFlags &= ~kFarthest; }
|
||||
void SetFarCircleCam(bool farType) { if (farType) fCircleFlags |= kFarthest; else fCircleFlags &= ~kFarthest; }
|
||||
void SetCenterObjectKey(plKey k);
|
||||
void SetPOAObject(plSceneObject* pObj) { fPOAObj = pObj; }
|
||||
|
||||
|
@ -137,34 +137,34 @@ plSceneObject* plCameraModifier1::GetSubject()
|
||||
return fSubObj;
|
||||
}
|
||||
|
||||
void plCameraModifier1::SetFOVw(float f, hsBool fUpdateVCam)
|
||||
void plCameraModifier1::SetFOVw(float f, bool fUpdateVCam)
|
||||
{
|
||||
fFOVw = f;
|
||||
if (plVirtualCam1::Instance() && fUpdateVCam)
|
||||
plVirtualCam1::SetFOV(fFOVw, fFOVh, this);
|
||||
}
|
||||
|
||||
void plCameraModifier1::SetFOVh(float f, hsBool fUpdateVCam)
|
||||
void plCameraModifier1::SetFOVh(float f, bool fUpdateVCam)
|
||||
{
|
||||
fFOVh = f;
|
||||
if (plVirtualCam1::Instance() && fUpdateVCam)
|
||||
plVirtualCam1::SetFOV(fFOVw, fFOVh, this);
|
||||
}
|
||||
|
||||
hsBool plCameraModifier1::SetFaded(hsBool b)
|
||||
bool plCameraModifier1::SetFaded(bool b)
|
||||
{
|
||||
if (GetBrain())
|
||||
return GetBrain()->SetFaded(b);
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plCameraModifier1::GetFaded()
|
||||
bool plCameraModifier1::GetFaded()
|
||||
{
|
||||
if (GetBrain())
|
||||
return GetBrain()->GetFaded();
|
||||
return false;
|
||||
}
|
||||
hsBool plCameraModifier1::MsgReceive(plMessage* msg)
|
||||
bool plCameraModifier1::MsgReceive(plMessage* msg)
|
||||
{
|
||||
if (GetBrain())
|
||||
GetBrain()->MsgReceive(msg);
|
||||
@ -257,7 +257,7 @@ void plCameraModifier1::Update()
|
||||
GetBrain()->AddTarget(); // update the brain's target
|
||||
}
|
||||
|
||||
hsBool moveInSub = !(GetBrain()->HasFlag(plCameraBrain1::kIgnoreSubworldMovement));
|
||||
bool moveInSub = !(GetBrain()->HasFlag(plCameraBrain1::kIgnoreSubworldMovement));
|
||||
|
||||
if (moveInSub && GetBrain()->GetSubject())
|
||||
{
|
||||
@ -330,9 +330,9 @@ void plCameraModifier1::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
|
||||
plKey key = mgr->ReadKey(stream);
|
||||
hsBool cutpos = stream->ReadBool();
|
||||
hsBool cutpoa = stream->ReadBool();
|
||||
hsBool ignore = stream->ReadBool();
|
||||
bool cutpos = stream->ReadBool();
|
||||
bool cutpoa = stream->ReadBool();
|
||||
bool ignore = stream->ReadBool();
|
||||
float v = stream->ReadLEScalar();
|
||||
float a = stream->ReadLEScalar();
|
||||
float d = stream->ReadLEScalar();
|
||||
@ -424,7 +424,7 @@ void plCameraModifier1::Write(hsStream* stream, hsResMgr* mgr)
|
||||
stream->WriteBool(fResetAnimOnPop);
|
||||
}
|
||||
|
||||
void plCameraModifier1::Push(hsBool recenter)
|
||||
void plCameraModifier1::Push(bool recenter)
|
||||
{
|
||||
if (fAnimated)
|
||||
{
|
||||
|
@ -72,9 +72,9 @@ struct CamTrans
|
||||
}
|
||||
plKey fTransTo;
|
||||
|
||||
hsBool fCutPos;
|
||||
hsBool fCutPOA;
|
||||
hsBool fIgnore;
|
||||
bool fCutPos;
|
||||
bool fCutPOA;
|
||||
bool fIgnore;
|
||||
float fAccel;
|
||||
float fDecel;
|
||||
float fVelocity;
|
||||
@ -96,7 +96,7 @@ class plCameraModifier1 : public plSingleModifier
|
||||
protected:
|
||||
|
||||
void Output();
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
|
||||
public:
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
CLASSNAME_REGISTER( plCameraModifier1 );
|
||||
GETINTERFACE_ANY( plCameraModifier1, plSingleModifier );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
void Initialize();
|
||||
virtual void Update();
|
||||
@ -130,10 +130,10 @@ public:
|
||||
void SetSubworldPOA(hsPoint3 pos) { fLastSubPOA = pos; }
|
||||
float GetFOVw() { return fFOVw; }
|
||||
float GetFOVh() { return fFOVh; }
|
||||
void SetFOVw(float f, hsBool fUpdateVCam = true);
|
||||
void SetFOVh(float f, hsBool fUpdateVCam = true);
|
||||
hsBool GetInSubworld() { return fInSubLastUpdate; }
|
||||
void InSubworld(hsBool b) { fInSubLastUpdate = b; }
|
||||
void SetFOVw(float f, bool fUpdateVCam = true);
|
||||
void SetFOVh(float f, bool fUpdateVCam = true);
|
||||
bool GetInSubworld() { return fInSubLastUpdate; }
|
||||
void InSubworld(bool b) { fInSubLastUpdate = b; }
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
void AddTrans(CamTrans* t) { fTrans.Append(t); }
|
||||
@ -142,14 +142,14 @@ public:
|
||||
void SetSubject(plSceneObject* pObj);
|
||||
plSceneObject* GetSubject();
|
||||
|
||||
virtual void Push(hsBool recenter = true);
|
||||
virtual void Push(bool recenter = true);
|
||||
virtual void Pop();
|
||||
|
||||
virtual hsBool GetFaded();
|
||||
virtual hsBool SetFaded(hsBool b);
|
||||
virtual bool GetFaded();
|
||||
virtual bool SetFaded(bool b);
|
||||
|
||||
hsBool IsAnimated() { return fAnimated; }
|
||||
void SetAnimCommands(hsBool a, hsBool b, hsBool c) { fStartAnimOnPush = a; fStopAnimOnPop = b; fResetAnimOnPop = c; }
|
||||
bool IsAnimated() { return fAnimated; }
|
||||
void SetAnimCommands(bool a, bool b, bool c) { fStartAnimOnPush = a; fStopAnimOnPop = b; fResetAnimOnPop = c; }
|
||||
|
||||
private:
|
||||
hsPoint3 fFrom;
|
||||
@ -161,11 +161,11 @@ private:
|
||||
float fFOVh;
|
||||
hsTArray<plMessage*> fMessageQueue;
|
||||
hsTArray<plCameraMsg*> fFOVInstructions;
|
||||
hsBool fAnimated, fStartAnimOnPush, fStopAnimOnPop, fResetAnimOnPop;
|
||||
bool fAnimated, fStartAnimOnPush, fStopAnimOnPop, fResetAnimOnPop;
|
||||
hsPoint3 fLastSubPos;
|
||||
hsPoint3 fLastSubPOA;
|
||||
hsBool fInSubLastUpdate;
|
||||
hsBool fUpdateBrainTarget; // sometimes our target isn't loaded yet, so wait to update the brain til later
|
||||
bool fInSubLastUpdate;
|
||||
bool fUpdateBrainTarget; // sometimes our target isn't loaded yet, so wait to update the brain til later
|
||||
};
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ float plInterestingModifier::fInterestRadius = 100.0f;
|
||||
float plInterestingModifier::fInterestWeight = 1.0f;
|
||||
|
||||
|
||||
hsBool plInterestingModifier::IEval(double secs, float del, uint32_t dirty)
|
||||
bool plInterestingModifier::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
for (int i=0; i < GetNumTargets(); i++)
|
||||
{
|
||||
|
@ -67,13 +67,13 @@ protected:
|
||||
static float fInterestRadius;
|
||||
static float fInterestWeight;
|
||||
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
|
||||
public:
|
||||
plInterestingModifier(){ fType = kTypeInteresting;}
|
||||
virtual ~plInterestingModifier(){;}
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg) {return false;}
|
||||
virtual bool MsgReceive(plMessage* msg) {return false;}
|
||||
|
||||
CLASSNAME_REGISTER( plInterestingModifier );
|
||||
GETINTERFACE_ANY( plInterestingModifier, plSingleModifier );
|
||||
|
@ -90,9 +90,9 @@ float plVirtualCam1::fFOVw = 45.0f;
|
||||
float plVirtualCam1::fFOVh = 33.75f;
|
||||
float plVirtualCam1::fHither = 0.3f;
|
||||
float plVirtualCam1::fYon = 500.0f;
|
||||
hsBool plVirtualCam1::printFOV = false;
|
||||
hsBool plVirtualCam1::fUseAccelOverride = 1;
|
||||
hsBool plVirtualCam1::freeze = 0;
|
||||
bool plVirtualCam1::printFOV = false;
|
||||
bool plVirtualCam1::fUseAccelOverride = 1;
|
||||
bool plVirtualCam1::freeze = 0;
|
||||
//float plVirtualCam1::fAccel = 5.0f;
|
||||
//float plVirtualCam1::fDecel = 5.0f;
|
||||
//float plVirtualCam1::fVel = 10.0f;
|
||||
@ -101,9 +101,9 @@ float plVirtualCam1::fDecel = 50.0f;
|
||||
float plVirtualCam1::fVel = 100.0f;
|
||||
float plVirtualCam1::fPanResponseTime = 3.0f;
|
||||
float plVirtualCam1::fFallTimerDelay = 0.25f;
|
||||
hsBool plVirtualCam1::alwaysCutForColin = false;
|
||||
hsBool plVirtualCam1::WalkPan3rdPerson = false;
|
||||
hsBool plVirtualCam1::StayInFirstPersonForever = false;
|
||||
bool plVirtualCam1::alwaysCutForColin = false;
|
||||
bool plVirtualCam1::WalkPan3rdPerson = false;
|
||||
bool plVirtualCam1::StayInFirstPersonForever = false;
|
||||
float plVirtualCam1::fAspectRatio = fFOVw / fFOVh;
|
||||
|
||||
// #define STATUS_LOG
|
||||
@ -121,7 +121,7 @@ void plVirtualCam1::AddMsgToLog(const char* msg)
|
||||
#endif
|
||||
}
|
||||
|
||||
hsBool plVirtualCam1::IsCurrentCamera(const plCameraModifier1* mod)
|
||||
bool plVirtualCam1::IsCurrentCamera(const plCameraModifier1* mod)
|
||||
{
|
||||
if (plVirtualCam1::Instance())
|
||||
{
|
||||
@ -392,7 +392,7 @@ void plVirtualCam1::SetPipeline(plPipeline* p)
|
||||
SetRender(false);
|
||||
}
|
||||
|
||||
void plVirtualCam1::Reset(hsBool bRender)
|
||||
void plVirtualCam1::Reset(bool bRender)
|
||||
{
|
||||
if (fPythonOverride)
|
||||
fPythonOverride = nil;
|
||||
@ -455,7 +455,7 @@ plCameraModifier1* plVirtualCam1::GetCurrentCamera()
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool plVirtualCam1::Is1stPersonCamera()
|
||||
bool plVirtualCam1::Is1stPersonCamera()
|
||||
{
|
||||
if (GetCurrentStackCamera() == fDriveCamera)
|
||||
return false;
|
||||
@ -508,7 +508,7 @@ void plVirtualCam1::SetCutNextTrans()
|
||||
#endif
|
||||
}
|
||||
|
||||
void plVirtualCam1::SetRender(hsBool render)
|
||||
void plVirtualCam1::SetRender(bool render)
|
||||
{
|
||||
fFlags.SetBit(kRender,render);
|
||||
if (render)
|
||||
@ -532,7 +532,7 @@ void plVirtualCam1::SetRender(hsBool render)
|
||||
}
|
||||
|
||||
// hack, hack, hack
|
||||
hsBool plVirtualCam1::RestoreFromName(const plString& name)
|
||||
bool plVirtualCam1::RestoreFromName(const plString& name)
|
||||
{
|
||||
for(plSOVec::iterator it = fCamerasLoaded.begin(); it != fCamerasLoaded.end(); ++it)
|
||||
{
|
||||
@ -777,7 +777,7 @@ void plVirtualCam1::IUpdate()
|
||||
|
||||
for (plCameraVec::iterator i = fCameraStack.begin(); i != fCameraStack.end(); ++i)
|
||||
{
|
||||
hsBool update = true;
|
||||
bool update = true;
|
||||
for (plCameraVec::iterator j = (i+1); j != fCameraStack.end(); ++j)
|
||||
{
|
||||
if (*i != *j)
|
||||
@ -954,7 +954,7 @@ void plVirtualCam1::FirstPersonOverride()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plVirtualCam1::MsgReceive(plMessage* msg)
|
||||
bool plVirtualCam1::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plPlayerPageMsg* pPMsg = plPlayerPageMsg::ConvertNoRef(msg);
|
||||
if (pPMsg)
|
||||
@ -1356,7 +1356,7 @@ hsBool plVirtualCam1::MsgReceive(plMessage* msg)
|
||||
if (pCam->GetTriggerer() && pCam->GetTriggerer() != plNetClientApp::GetInstance()->GetLocalPlayerKey())
|
||||
return true;
|
||||
{
|
||||
hsBool bDef = pCam->Cmd(plCameraMsg::kSetAsPrimary);
|
||||
bool bDef = pCam->Cmd(plCameraMsg::kSetAsPrimary);
|
||||
plKey pCamKey = pCam->GetNewCam();
|
||||
if (pCamKey)
|
||||
{
|
||||
@ -1504,7 +1504,7 @@ void plVirtualCam1::AddCameraToStack(plCameraModifier1* pCam)
|
||||
hsgResMgr::ResMgr()->AddViaNotify(pCam->GetKey(), new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefCamera), plRefFlags::kPassiveRef);
|
||||
}
|
||||
|
||||
void plVirtualCam1::PushCamera(plCameraModifier1* pCam, hsBool bDefault)
|
||||
void plVirtualCam1::PushCamera(plCameraModifier1* pCam, bool bDefault)
|
||||
{
|
||||
// pushing the same camera, folks?
|
||||
if (pCam == GetCurrentStackCamera())
|
||||
@ -1696,7 +1696,7 @@ void plVirtualCam1::PopCamera(plCameraModifier1* pCam)
|
||||
}
|
||||
|
||||
// are we mouse-looking?
|
||||
hsBool mLook = false;
|
||||
bool mLook = false;
|
||||
if (pCam->GetBrain() && pCam->GetBrain()->HasMovementFlag(S_SET_FREELOOK))
|
||||
mLook = true;
|
||||
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
void SetPipeline(plPipeline* p);
|
||||
void Init();
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
static void SetFOV(float w, float h);
|
||||
static void SetFOV(float w, float h, plCameraModifier1* pCam);
|
||||
static void SetDepth(float h, float y);
|
||||
@ -133,14 +133,14 @@ public:
|
||||
static void SetAspectRatio(float aspect) { fAspectRatio = aspect; }
|
||||
static float GetAspectRatio() { return fAspectRatio; }
|
||||
|
||||
hsBool InTransition() { return fTransPos != POS_TRANS_OFF; }
|
||||
bool InTransition() { return fTransPos != POS_TRANS_OFF; }
|
||||
plCameraModifier1* GetCurrentCamera();
|
||||
plCameraModifier1* GetCurrentStackCamera();
|
||||
plCameraModifier1* GetTransitionCamera(){return fTransitionCamera;}
|
||||
hsBool Is1stPersonCamera();
|
||||
bool Is1stPersonCamera();
|
||||
|
||||
hsBool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); }
|
||||
void SetMovementFlag(int f, hsBool on = true) { fMoveFlags.SetBit(f, on);}
|
||||
bool HasMovementFlag(int f) { return fMoveFlags.IsBitSet(f); }
|
||||
void SetMovementFlag(int f, bool on = true) { fMoveFlags.SetBit(f, on);}
|
||||
|
||||
hsPoint3 GetCameraPos() { return fOutputPos; }
|
||||
hsPoint3 GetCameraPOA() { return fOutputPOA; }
|
||||
@ -155,34 +155,34 @@ public:
|
||||
void RebuildStack(const plKey& key);
|
||||
|
||||
void SetFlags(int flag) { fFlags.SetBit(flag); }
|
||||
hsBool HasFlags(int flag) { return fFlags.IsBitSet(flag); }
|
||||
bool HasFlags(int flag) { return fFlags.IsBitSet(flag); }
|
||||
void ClearFlags(int flag) { fFlags.ClearBit(flag); }
|
||||
|
||||
// console command stuff
|
||||
static void Next();
|
||||
static void Prev();
|
||||
static void Deactivate();
|
||||
void CameraRegions(hsBool b) { fFlags.SetBit(kRegionIgnore,b); }
|
||||
void LogFOV(hsBool b) { printFOV = b; }
|
||||
void CameraRegions(bool b) { fFlags.SetBit(kRegionIgnore,b); }
|
||||
void LogFOV(bool b) { printFOV = b; }
|
||||
void Drive();
|
||||
void PushThirdPerson();
|
||||
|
||||
static void AddMsgToLog(const char* msg);
|
||||
static hsBool IsCurrentCamera(const plCameraModifier1* mod);
|
||||
static bool IsCurrentCamera(const plCameraModifier1* mod);
|
||||
void ClearStack();
|
||||
|
||||
void AddCameraLoaded(plSceneObject* pCam) { fCamerasLoaded.push_back(pCam); }
|
||||
hsBool RestoreFromName(const plString& name);
|
||||
bool RestoreFromName(const plString& name);
|
||||
void StartUnPan();
|
||||
// these are for console access
|
||||
static hsBool fUseAccelOverride, freeze, alwaysCutForColin, WalkPan3rdPerson,StayInFirstPersonForever;
|
||||
static bool fUseAccelOverride, freeze, alwaysCutForColin, WalkPan3rdPerson,StayInFirstPersonForever;
|
||||
static float fDecel, fAccel, fVel;
|
||||
static float fFallTimerDelay;
|
||||
|
||||
private:
|
||||
|
||||
void Reset(hsBool bRender);
|
||||
void PushCamera(plCameraModifier1* pCam, hsBool bDefault = false);
|
||||
void Reset(bool bRender);
|
||||
void PushCamera(plCameraModifier1* pCam, bool bDefault = false);
|
||||
void PopCamera(plCameraModifier1* pCam);
|
||||
void AddCameraToStack(plCameraModifier1* pCam);
|
||||
void PopAll();
|
||||
@ -190,7 +190,7 @@ private:
|
||||
void StartTransition(CamTrans* transition);
|
||||
void RunTransition();
|
||||
void FinishTransition();
|
||||
void SetRender(hsBool render);
|
||||
void SetRender(bool render);
|
||||
void IHandleCameraStatusLog(plCameraModifier1* pMod, int action);
|
||||
void ICreatePlate();
|
||||
void FreezeOutput(int frames) { fFreezeCounter = frames; } // I hate this and I hate myself for doing it
|
||||
@ -242,10 +242,10 @@ private:
|
||||
static float fFOVh, fFOVw;
|
||||
static float fHither, fYon;
|
||||
static plVirtualCam1* fInstance;
|
||||
static hsBool printFOV;
|
||||
static bool printFOV;
|
||||
static float fPanResponseTime;
|
||||
static float fAspectRatio;
|
||||
hsBool fForceCutOnce;
|
||||
bool fForceCutOnce;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user