1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -104,7 +104,7 @@ void plAgePage::SetFlags(uint8_t f, bool on)
}
// now preservs original string
hsBool plAgePage::SetFromString( const char *stringIn )
bool plAgePage::SetFromString( const char *stringIn )
{
char *c, seps[] = ", \n";
std::string string = stringIn;
@ -396,7 +396,7 @@ const char *plAgeDescription::GetSectionName( void ) const
return "AgeInfo";
}
hsBool plAgeDescription::IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData )
bool plAgeDescription::IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData )
{
char *tok;

View File

@ -86,7 +86,7 @@ class plAgePage
void SetSeqSuffix( uint32_t s ) { fSeqSuffix = s; }
void SetFlags(uint8_t f, bool on=true);
hsBool SetFromString( const char *string );
bool SetFromString( const char *string );
char *GetAsString( void ) const;
plAgePage &operator=( const plAgePage &src );
@ -118,7 +118,7 @@ private:
void IDeInit( void );
// Overload for plInitSectionTokenReader
virtual hsBool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData );
virtual bool IParseToken( const char *token, hsStringTokenizer *tokenizer, uint32_t userData );
public:
static char kAgeDescPath[];
@ -169,10 +169,10 @@ public:
int32_t GetSequencePrefix( void ) const { return fSeqPrefix; }
uint32_t GetReleaseVersion( void ) const { return fReleaseVersion; }
hsBool IsGlobalAge( void ) const { return ( fSeqPrefix < 0 ) ? true : false; }
bool IsGlobalAge( void ) const { return ( fSeqPrefix < 0 ) ? true : false; }
// Setters
hsBool SetStart(short year, short month, short day, short hour, short minute, short second)
bool SetStart(short year, short month, short day, short hour, short minute, short second)
{ return fStart.SetTime(year,month,day,hour,minute,second); }
void SetDayLength(const float l) { fDayLength = l; }

View File

@ -151,7 +151,7 @@ protected:
virtual const char* GetSectionName() const { return "version"; }
virtual hsBool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData)
virtual bool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData)
{
if (stricmp(token, "format") == 0)
fDest->SetFormatVersion(atoi(tokenizer->next()));
@ -185,7 +185,7 @@ protected:
return new plManifestFile(name, "", sum, size, zippedSize, flags);
}
virtual hsBool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData)
virtual bool IParseToken(const char* token, hsStringTokenizer* tokenizer, uint32_t userData)
{
plManifestFile* file = IReadManifestFile(token, tokenizer, userData, false);
AddFile(file);

View File

@ -76,7 +76,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMessage/plAgeLoadedMsg.h"
extern hsBool gDataServerLocal;
extern bool gDataServerLocal;
// static
plAgeLoader* plAgeLoader::fInstance=nil;
@ -140,7 +140,7 @@ void plAgeLoader::SetInstance(plAgeLoader* inst)
//
// Plasma Msg Handler
//
hsBool plAgeLoader::MsgReceive(plMessage* msg)
bool plAgeLoader::MsgReceive(plMessage* msg)
{
plInitialAgeStateLoadedMsg *stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef( msg );
if( stateMsg != nil )
@ -335,7 +335,7 @@ class plUnloadAgeCollector : public plRegistryPageIterator
plUnloadAgeCollector( const char *a ) : fAge( a ) {}
virtual hsBool EatPage( plRegistryPageNode *page )
virtual bool EatPage( plRegistryPageNode *page )
{
if( fAge && stricmp( page->GetPageInfo().GetAge(), fAge ) == 0 )
{

View File

@ -107,7 +107,7 @@ public:
void Init();
void Shutdown();
hsBool MsgReceive(plMessage* msg);
bool MsgReceive(plMessage* msg);
bool LoadAge(const char ageName[]);
bool UnloadAge() { return IUnloadAge(); }
void UpdateAge(const char ageName[]);

View File

@ -75,7 +75,7 @@ public:
delete[] fFilename;
}
hsBool Open(const char* filename, const char* mode)
bool Open(const char* filename, const char* mode)
{
fFilename = hsStrcpy(filename);
return plZlibStream::Open(filename, mode);

View File

@ -63,8 +63,8 @@ public:
virtual plKey GetSceneObject() const { return fSceneObj; }
virtual void SetSceneObject(plKey newNode) { }
virtual plAudible& SetProperty(int prop, hsBool on) { return *this; }
virtual hsBool GetProperty(int prop) { return false; }
virtual plAudible& SetProperty(int prop, bool on) { return *this; }
virtual bool GetProperty(int prop) { return false; }
void Play(int index = -1){;}
void SynchedPlay(int index = -1) {;}
@ -79,8 +79,8 @@ public:
void SetVelocity(const hsVector3 vel,int index = -1){;}
hsVector3 GetVelocity(int index = -1) const;
hsPoint3 GetPosition(int index = -1);
void SetLooping(hsBool loop,int index = -1){;} // sets continuous loop or stops looping
hsBool IsPlaying(int index = -1){return false;}
void SetLooping(bool loop,int index = -1){;} // sets continuous loop or stops looping
bool IsPlaying(int index = -1){return false;}
virtual void SetTime(double t, int index = -1) {}
virtual void Activate(){}
virtual void DeActivate(){}
@ -89,12 +89,12 @@ public:
virtual plSound* GetSound(int i) const { return nil; }
virtual int GetSoundIndex(const char *keyname) const { return -1; }
virtual void SetVolume(const float volume,int index = -1) {;}
virtual void SetFilename(int index, const char *filename, hsBool isCompressed){}
virtual void SetFilename(int index, const char *filename, bool isCompressed){}
virtual void RemoveCallbacks(plSoundMsg* pMsg) {}
virtual void AddCallbacks(plSoundMsg* pMsg) {}
virtual void SetMuted( hsBool muted, int index = -1 ) {;}
virtual void SetMuted( bool muted, int index = -1 ) {;}
virtual void ToggleMuted( int index = -1 ) {;}
virtual void SetTalkIcon(int index, uint32_t str){;}
virtual void ClearTalkIcon(){;}

View File

@ -208,7 +208,7 @@ void plWinAudible::GetStatus(plSoundMsg* pMsg)
}
}
hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D )
bool plWinAudible::AddSound( plSound *pSnd, int index, bool is3D )
{
hsAssert(pSnd->GetKey() != nil, "Adding a new sound with no key.");
if (plgAudioSys::Active())
@ -227,7 +227,7 @@ hsBool plWinAudible::AddSound( plSound *pSnd, int index, hsBool is3D )
}
/* Unused
int plWinAudible::AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, hsBool is3D )
int plWinAudible::AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, bool is3D )
{
//plWin32Sound* pSnd = new plWin32Sound;
//IAssignSoundKey( pSnd, GetKey() ? GetKeyName() : "", fSoundObjs.Count() - 1 );
@ -344,7 +344,7 @@ void plWinAudible::SetVolume(const float volume,int index )
SND_APPLY_LOOP( index, SetVolume( volume ), ; );
}
void plWinAudible::SetMuted( hsBool muted, int index )
void plWinAudible::SetMuted( bool muted, int index )
{
SND_APPLY_LOOP( index, SetMuted( muted ), ; );
}
@ -392,7 +392,7 @@ hsPoint3 plWinAudible::GetPosition(int index)
return( fSoundObjs[index]->GetPosition() );
}
void plWinAudible::SetLooping(hsBool loop,int index)
void plWinAudible::SetLooping(bool loop,int index)
{
SND_APPLY_LOOP( index, SetProperty( plSound::kPropLooping, loop ), ; );
}
@ -407,7 +407,7 @@ void plWinAudible::SetFadeOut( const int type, const float length, int index
SND_APPLY_LOOP( index, SetFadeOutEffect( (plSound::plFadeParams::Type)type, length ), ; );
}
void plWinAudible::SetFilename(int index, const char *filename, hsBool isCompressed)
void plWinAudible::SetFilename(int index, const char *filename, bool isCompressed)
{
if(index < 0 || index >= fSoundObjs.Count())
{
@ -426,7 +426,7 @@ void plWinAudible::SetFilename(int index, const char *filename, hsBool isCompres
}
}
hsBool plWinAudible::IsPlaying(int index)
bool plWinAudible::IsPlaying(int index)
{
int count = fSoundObjs.Count();
@ -508,7 +508,7 @@ void plWinAudible::DeActivate()
}
}
hsBool plWinAudible::MsgReceive(plMessage* msg)
bool plWinAudible::MsgReceive(plMessage* msg)
{
plGenRefMsg *refMsg;
if (refMsg = plGenRefMsg::ConvertNoRef(msg))
@ -650,7 +650,7 @@ pl2WayWinAudible::~pl2WayWinAudible()
delete fVoiceRecorder;
}
hsBool pl2WayWinAudible::MsgReceive(plMessage* msg)
bool pl2WayWinAudible::MsgReceive(plMessage* msg)
{
plEvalMsg* pMsg = plEvalMsg::ConvertNoRef(msg);
if (pMsg && fVoiceRecorder)
@ -671,7 +671,7 @@ hsBool pl2WayWinAudible::MsgReceive(plMessage* msg)
return plWinAudible::MsgReceive(msg);
}
void pl2WayWinAudible::Init(hsBool isLocal)
void pl2WayWinAudible::Init(bool isLocal)
{
if (!fVoicePlayer)
{

View File

@ -72,8 +72,8 @@ public:
virtual plKey GetSceneObject() const { return fSceneObj; }
virtual void SetSceneObject(plKey obj);
virtual plAudible& SetProperty(int prop, hsBool on) { return *this; }
virtual hsBool GetProperty(int prop) { return false; }
virtual plAudible& SetProperty(int prop, bool on) { return *this; }
virtual bool GetProperty(int prop) { return false; }
virtual plAudible& SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, int index = -1);
@ -90,30 +90,30 @@ public:
virtual void SetVelocity(const hsVector3 vel,int index = -1);
hsVector3 GetVelocity(int index = -1) const;
hsPoint3 GetPosition(int index = -1);
void SetLooping(hsBool loop,int index = -1); // sets continuous loop or stops looping
hsBool IsPlaying(int index = -1);
void SetLooping(bool loop,int index = -1); // sets continuous loop or stops looping
bool IsPlaying(int index = -1);
void SetTime(double t, int index = -1);
void SetOuterVol(const int v,int index = -1); // volume for the outer cone (if applicable)
void SetConeAngles(int inner, int outer,int index = -1);
void RemoveCallbacks(plSoundMsg* pMsg);
void AddCallbacks(plSoundMsg* pMsg);
hsBool AddSound(plSound *pSnd, int index,hsBool is3D);
int AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, hsBool is3D);
bool AddSound(plSound *pSnd, int index,bool is3D);
int AddSoundFromResource(plSound *pSnd, void* addr, int32_t size, bool is3D);
virtual void GetStatus(plSoundMsg* pMsg);
virtual int GetNumSounds() const {return fSoundObjs.Count();}
virtual plSound* GetSound(int i) const;
virtual int GetSoundIndex(const char *keyname) const;
virtual void SetVolume(const float volume,int index = -1);
virtual void SetMuted( hsBool muted, int index = -1 );
virtual void SetMuted( bool muted, int index = -1 );
virtual void ToggleMuted( int index = -1 );
virtual void SetTalkIcon(int index, uint32_t str){;}
virtual void ClearTalkIcon(){;}
void SetFilename(int index, const char *filename, hsBool isCompressed);
void SetFilename(int index, const char *filename, bool isCompressed);
virtual void SetFadeIn( const int type, const float length, int index = -1 );
virtual void SetFadeOut( const int type, const float length, int index = -1 );
virtual hsBool MsgReceive(plMessage* pMsg);
virtual bool MsgReceive(plMessage* pMsg);
virtual void Activate();
virtual void DeActivate();
@ -145,8 +145,8 @@ public:
CLASSNAME_REGISTER( pl2WayWinAudible );
GETINTERFACE_ANY( pl2WayWinAudible, plWinAudible );
virtual hsBool MsgReceive(plMessage* pMsg);
virtual void Init(hsBool isLocal);
virtual bool MsgReceive(plMessage* pMsg);
virtual void Init(bool isLocal);
virtual void Activate();
virtual void DeActivate();
virtual void Read(hsStream* s, hsResMgr* mgr);

View File

@ -57,7 +57,7 @@ plWinAudibleProxy::~plWinAudibleProxy()
{
}
hsBool plWinAudibleProxy::Init(plWinAudible* aud)
bool plWinAudibleProxy::Init(plWinAudible* aud)
{
plProxyGen::Init(aud);

View File

@ -52,7 +52,7 @@ public:
plWinAudibleProxy();
virtual ~plWinAudibleProxy();
hsBool Init(plWinAudible* aud);
bool Init(plWinAudible* aud);
protected:
plWinAudible* fOwner;

View File

@ -68,7 +68,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//////////////////////////////////////////////////////////////////////////////
plAudioCaps plAudioCapsDetector::fCaps;
hsBool plAudioCapsDetector::fGotCaps = false;
bool plAudioCapsDetector::fGotCaps = false;
plStatusLog *plAudioCapsDetector::fLog = nil;
@ -83,7 +83,7 @@ plAudioCapsDetector::~plAudioCapsDetector()
//// Detect //////////////////////////////////////////////////////////////////
// Our big function that does all of our work
plAudioCaps &plAudioCapsDetector::Detect( hsBool logIt, hsBool init )
plAudioCaps &plAudioCapsDetector::Detect( bool logIt, bool init )
{
// If we already have the device capabilities, just return them
if(fGotCaps) return fCaps;
@ -158,10 +158,10 @@ plAudioCaps &plAudioCapsDetector::Detect( hsBool logIt, hsBool init )
// init code above as a way of trying to make sure this line here will
// succeed as often as possible.
hsBool plAudioCapsDetector::IDetectEAX( )
bool plAudioCapsDetector::IDetectEAX( )
{
#ifdef EAX_SDK_AVAILABLE
hsBool gotSupport = true;
bool gotSupport = true;
if(!alIsExtensionPresent((ALchar *)"EAX4.0")) // is eax 4 supported
{

View File

@ -68,15 +68,15 @@ public:
fMaxNumSources = 0;
}
hsBool IsAvailable( void ) const { return fIsAvailable; }
hsBool IsEAXAvailable( void ) const { return fEAXAvailable; }
hsBool UsingEAXUnified( void ) const { return fEAXUnified; }
bool IsAvailable( void ) const { return fIsAvailable; }
bool IsEAXAvailable( void ) const { return fEAXAvailable; }
bool UsingEAXUnified( void ) const { return fEAXUnified; }
unsigned GetMaxNumVoices() { return fMaxNumSources; }
protected:
friend class plAudioCapsDetector;
hsBool fIsAvailable, fEAXAvailable, fEAXUnified;
bool fIsAvailable, fEAXAvailable, fEAXUnified;
unsigned fMaxNumSources;
};
@ -86,14 +86,14 @@ public:
plAudioCapsDetector();
virtual ~plAudioCapsDetector();
static plAudioCaps &Detect( hsBool log = false, hsBool init = false );
static plAudioCaps &Detect( bool log = false, bool init = false );
protected:
static plStatusLog *fLog;
static plAudioCaps fCaps;
static hsBool fGotCaps;
static bool fGotCaps;
static hsBool IDetectEAX( );
static bool IDetectEAX( );
};
#endif //_plAudioCaps_h

View File

@ -225,7 +225,7 @@ void plAudioSystem::IEnumerateDevices()
// filter out any devices that aren't openal 1.1 compliant
if(major > 1 || (major == 1 && minor >= 1))
{
hsBool supportsEAX = false;
bool supportsEAX = false;
#ifdef EAX_SDK_AVAILABLE
if(alIsExtensionPresent((ALchar *)"EAX4.0") || alIsExtensionPresent((ALchar *) "EAX4.0Emulated"))
{
@ -264,10 +264,10 @@ void plAudioSystem::IEnumerateDevices()
}
//// Init ////////////////////////////////////////////////////////////////////
hsBool plAudioSystem::Init( hsWindowHndl hWnd )
bool plAudioSystem::Init( hsWindowHndl hWnd )
{
plgAudioSys::fRestarting = false;
static hsBool firstTimeInit = true;
static bool firstTimeInit = true;
plStatusLog::AddLineS( "audio.log", plStatusLog::kBlue, "ASYS: -- Init --" );
fMaxNumSources = 0;
@ -277,7 +277,7 @@ hsBool plAudioSystem::Init( hsWindowHndl hWnd )
// Set the maximum number of sounds based on priority cutoff slider
SetMaxNumberOfActiveSounds();
const char *deviceName = plgAudioSys::fDeviceName.c_str();
hsBool useDefaultDevice = true;
bool useDefaultDevice = true;
if(firstTimeInit)
{
@ -483,7 +483,7 @@ const char *plAudioSystem::GetAudioDeviceName(int index)
return fDeviceList[index].GetDeviceName();
}
hsBool plAudioSystem::SupportsEAX(const char *deviceName)
bool plAudioSystem::SupportsEAX(const char *deviceName)
{
for(DeviceIter i = fDeviceList.begin(); i != fDeviceList.end(); i++)
{
@ -547,7 +547,7 @@ void plAudioSystem::SetListenerOrientation(const hsVector3 view, const hsVector3
alListenerfv(AL_ORIENTATION, orientation);
}
void plAudioSystem::SetActive( hsBool b )
void plAudioSystem::SetActive( bool b )
{
fActive = b;
if( fActive )
@ -876,7 +876,7 @@ void plAudioSystem::SetFadeLength(float lengthSec)
fFadeLength = lengthSec;
}
hsBool plAudioSystem::MsgReceive(plMessage* msg)
bool plAudioSystem::MsgReceive(plMessage* msg)
{
if(plTimeMsg *time = plTimeMsg::ConvertNoRef( msg ) )
{
@ -989,12 +989,12 @@ hsBool plAudioSystem::MsgReceive(plMessage* msg)
// plgAudioSystem //////////////////////////////////////////////////////////////////////
plAudioSystem* plgAudioSys::fSys = nil;
hsBool plgAudioSys::fInit = false;
hsBool plgAudioSys::fActive = false;
hsBool plgAudioSys::fUseHardware = false;
hsBool plgAudioSys::fMuted = true;
hsBool plgAudioSys::fDelayedActivate = false;
hsBool plgAudioSys::fEnableEAX = false;
bool plgAudioSys::fInit = false;
bool plgAudioSys::fActive = false;
bool plgAudioSys::fUseHardware = false;
bool plgAudioSys::fMuted = true;
bool plgAudioSys::fDelayedActivate = false;
bool plgAudioSys::fEnableEAX = false;
hsWindowHndl plgAudioSys::fWnd = nil;
float plgAudioSys::fChannelVolumes[ kNumChannels ] = { 1.f, 1.f, 1.f, 1.f, 1.f, 1.f };
float plgAudioSys::f2D3DBias = 0.75f;
@ -1002,12 +1002,12 @@ uint32_t plgAudioSys::fDebugFlags = 0;
float plgAudioSys::fStreamingBufferSize = 2.f;
float plgAudioSys::fStreamFromRAMCutoff = 10.f;
uint8_t plgAudioSys::fPriorityCutoff = 9; // We cut off sounds above this priority
hsBool plgAudioSys::fEnableExtendedLogs = false;
bool plgAudioSys::fEnableExtendedLogs = false;
float plgAudioSys::fGlobalFadeVolume = 1.f;
hsBool plgAudioSys::fLogStreamingUpdates = false;
bool plgAudioSys::fLogStreamingUpdates = false;
std::string plgAudioSys::fDeviceName;
hsBool plgAudioSys::fRestarting = false;
hsBool plgAudioSys::fMutedStateChange = false;
bool plgAudioSys::fRestarting = false;
bool plgAudioSys::fMutedStateChange = false;
void plgAudioSys::Init(hsWindowHndl hWnd)
{
@ -1024,12 +1024,12 @@ void plgAudioSys::Init(hsWindowHndl hWnd)
Activate( true );
}
void plgAudioSys::SetActive(hsBool b)
void plgAudioSys::SetActive(bool b)
{
fActive = b;
}
void plgAudioSys::SetMuted( hsBool b )
void plgAudioSys::SetMuted( bool b )
{
fMuted = b;
fMutedStateChange = true;
@ -1040,14 +1040,14 @@ void plgAudioSys::SetMuted( hsBool b )
SetGlobalFadeVolume(1.0);
}
void plgAudioSys::SetUseHardware(hsBool b)
void plgAudioSys::SetUseHardware(bool b)
{
fUseHardware = b;
if( fActive )
Restart();
}
void plgAudioSys::EnableEAX( hsBool b )
void plgAudioSys::EnableEAX( bool b )
{
fEnableEAX = b;
if( fActive )
@ -1127,7 +1127,7 @@ void plgAudioSys::Shutdown()
}
}
void plgAudioSys::Activate(hsBool b)
void plgAudioSys::Activate(bool b)
{
if( fSys == nil )
{
@ -1210,7 +1210,7 @@ float plgAudioSys::Get2D3Dbias()
return f2D3DBias;
}
void plgAudioSys::SetDeviceName(const char *device, hsBool restart /* = false */)
void plgAudioSys::SetDeviceName(const char *device, bool restart /* = false */)
{
fDeviceName = device;
if(restart)
@ -1242,7 +1242,7 @@ ALCdevice *plgAudioSys::GetCaptureDevice()
return nil;
}
hsBool plgAudioSys::SupportsEAX(const char *deviceName)
bool plgAudioSys::SupportsEAX(const char *deviceName)
{
if(fSys)
{

View File

@ -65,17 +65,17 @@ typedef struct ALCcontext_struct ALCcontext;
class DeviceDescriptor
{
public:
DeviceDescriptor(const char *name, hsBool supportsEAX):
DeviceDescriptor(const char *name, bool supportsEAX):
fDeviceName(name),
fSupportsEAX(supportsEAX)
{
}
const char *GetDeviceName() { return fDeviceName.c_str();}
hsBool SupportsEAX() { return fSupportsEAX; }
bool SupportsEAX() { return fSupportsEAX; }
private:
std::string fDeviceName;
hsBool fSupportsEAX;
bool fSupportsEAX;
};
class plAudioSystem : public hsKeyedObject
@ -93,10 +93,10 @@ public:
kRefEAXRegion
};
hsBool Init(hsWindowHndl hWnd);
bool Init(hsWindowHndl hWnd);
void Shutdown();
void SetActive( hsBool b );
void SetActive( bool b );
void SetListenerPos(const hsPoint3 pos);
void SetListenerVelocity(const hsVector3 vel);
@ -104,7 +104,7 @@ public:
void SetMaxNumberOfActiveSounds(); // sets the max number of active sounds based on the priority cutoff
void SetDistanceModel(int i);
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
double GetTime();
void NextDebugSound( void );
@ -112,7 +112,7 @@ public:
int GetNumAudioDevices();
const char *GetAudioDeviceName(int index);
hsBool SupportsEAX(const char *deviceName);
bool SupportsEAX(const char *deviceName);
void SetFadeLength(float lengthSec);
@ -133,16 +133,16 @@ protected:
hsTArray<plKey> fPendingRegisters;
hsPoint3 fCurrListenerPos;//, fCommittedListenerPos;
hsBool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown;
bool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown;
int64_t fStartTime;
hsTArray<hsKeyedObject *> fMyRefs;
hsTArray<plEAXListenerMod *> fEAXRegions;
hsPoint3 fLastPos;
hsBool fAvatarPosSet; // used for listener stuff
bool fAvatarPosSet; // used for listener stuff
hsBool fDisplayNumBuffers;
bool fDisplayNumBuffers;
std::vector<DeviceDescriptor> fDeviceList; // list of openal device names
@ -158,7 +158,7 @@ protected:
void IEnumerateDevices();
public:
hsBool fListenerInit;
bool fListenerInit;
};
class plgAudioSys
@ -189,19 +189,19 @@ public:
kHardwarePlusEAX,
};
static void Init(hsWindowHndl hWnd);
static hsBool Hardware() { return fUseHardware; }
static void SetUseHardware(hsBool b);
static void SetActive(hsBool b);
static void SetMuted( hsBool b );
static void EnableEAX( hsBool b );
static hsBool Active() { return fInit; }
static bool Hardware() { return fUseHardware; }
static void SetUseHardware(bool b);
static void SetActive(bool b);
static void SetMuted( bool b );
static void EnableEAX( bool b );
static bool Active() { return fInit; }
static void Shutdown();
static void Activate(hsBool b);
static hsBool IsMuted( void ) { return fMuted; }
static void Activate(bool b);
static bool IsMuted( void ) { return fMuted; }
static hsWindowHndl hWnd() { return fWnd; }
static plAudioSystem* Sys() { return fSys; }
static void Restart( void );
static hsBool UsingEAX( void ) { return fSys->fUsingEAX; }
static bool UsingEAX( void ) { return fSys->fUsingEAX; }
static void NextDebugSound( void );
@ -214,8 +214,8 @@ public:
static void SetGlobalFadeVolume( float vol );
static float GetGlobalFadeVolume( void ) { return fGlobalFadeVolume; }
static void SetDebugFlag( uint32_t flag, hsBool set = true ) { if( set ) fDebugFlags |= flag; else fDebugFlags &= ~flag; }
static hsBool IsDebugFlagSet( uint32_t flag ) { return fDebugFlags & flag; }
static void SetDebugFlag( uint32_t flag, bool set = true ) { if( set ) fDebugFlags |= flag; else fDebugFlags &= ~flag; }
static bool IsDebugFlagSet( uint32_t flag ) { return fDebugFlags & flag; }
static void ClearDebugFlags( void ) { fDebugFlags = 0; }
static float GetStreamingBufferSize( void ) { return fStreamingBufferSize; }
@ -224,8 +224,8 @@ public:
static uint8_t GetPriorityCutoff( void ) { return fPriorityCutoff; }
static void SetPriorityCutoff( uint8_t cut ) { fPriorityCutoff = cut; if(fSys) fSys->SetMaxNumberOfActiveSounds(); }
static hsBool AreExtendedLogsEnabled( void ) { return fEnableExtendedLogs; }
static void EnableExtendedLogs( hsBool e ) { fEnableExtendedLogs = e; }
static bool AreExtendedLogsEnabled( void ) { return fEnableExtendedLogs; }
static void EnableExtendedLogs( bool e ) { fEnableExtendedLogs = e; }
static float GetStreamFromRAMCutoff( void ) { return fStreamFromRAMCutoff; }
static void SetStreamFromRAMCutoff( float c ) { fStreamFromRAMCutoff = c; }
@ -234,46 +234,46 @@ public:
static void SetListenerVelocity(const hsVector3 vel);
static void SetListenerOrientation(const hsVector3 view, const hsVector3 up);
static void ShowNumBuffers(hsBool b) { if(fSys) fSys->fDisplayNumBuffers = b; }
static void ShowNumBuffers(bool b) { if(fSys) fSys->fDisplayNumBuffers = b; }
static void SetAudioMode(AudioMode mode);
static int GetAudioMode();
static hsBool LogStreamingUpdates() { return fLogStreamingUpdates; }
static void SetLogStreamingUpdates(hsBool logUpdates) { fLogStreamingUpdates = logUpdates; }
static void SetDeviceName(const char *device, hsBool restart = false);
static bool LogStreamingUpdates() { return fLogStreamingUpdates; }
static void SetLogStreamingUpdates(bool logUpdates) { fLogStreamingUpdates = logUpdates; }
static void SetDeviceName(const char *device, bool restart = false);
static const char *GetDeviceName() { return fDeviceName.c_str(); }
static int GetNumAudioDevices();
static const char *GetAudioDeviceName(int index);
static ALCdevice *GetCaptureDevice();
static hsBool SupportsEAX(const char *deviceName);
static bool SupportsEAX(const char *deviceName);
static void RegisterSoftSound( const plKey soundKey );
static void UnregisterSoftSound( const plKey soundKey );
static hsBool IsRestarting() {return fRestarting;}
static bool IsRestarting() {return fRestarting;}
private:
friend class plAudioSystem;
static plAudioSystem* fSys;
static hsBool fInit;
static hsBool fActive;
static hsBool fMuted;
static bool fInit;
static bool fActive;
static bool fMuted;
static hsWindowHndl fWnd;
static hsBool fUseHardware;
static hsBool fDelayedActivate;
static bool fUseHardware;
static bool fDelayedActivate;
static float fChannelVolumes[ kNumChannels ];
static float fGlobalFadeVolume;
static uint32_t fDebugFlags;
static hsBool fEnableEAX;
static bool fEnableEAX;
static float fStreamingBufferSize;
static uint8_t fPriorityCutoff;
static hsBool fEnableExtendedLogs;
static bool fEnableExtendedLogs;
static float fStreamFromRAMCutoff;
static float f2D3DBias;
static hsBool fLogStreamingUpdates;
static bool fLogStreamingUpdates;
static std::string fDeviceName;
static hsBool fRestarting;
static hsBool fMutedStateChange;
static bool fRestarting;
static bool fMutedStateChange;
};

View File

@ -69,7 +69,7 @@ plProfile_CreateCounterNoReset( "Allocated", "Sound", NumAllocated );
//// Constructor/Destructor //////////////////////////////////////////////////
plDSoundBuffer::plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool isLooping, hsBool tryStatic, bool streaming )
plDSoundBuffer::plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool isLooping, bool tryStatic, bool streaming )
{
fLooping = isLooping;
fValid = false;
@ -100,7 +100,7 @@ plDSoundBuffer::~plDSoundBuffer()
//// IAllocate ///////////////////////////////////////////////////////////////
void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic )
void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool tryStatic )
{
// Create a DSound buffer description
fBufferDesc = new plWAVHeader;
@ -404,7 +404,7 @@ bool plDSoundBuffer::StreamingFillBuffer(plAudioFileReader *stream)
ALuint bufferId;
unsigned char data[STREAM_BUFFER_SIZE];
int buffersProcessed = BuffersProcessed();
hsBool finished = false;
bool finished = false;
for(int i = 0; i < buffersProcessed; i++)
{
@ -574,7 +574,7 @@ bool plDSoundBuffer::VoiceFillBuffer(void *data, unsigned bytes, unsigned buffer
//// SetLooping //////////////////////////////////////////////////////////////
void plDSoundBuffer::SetLooping( hsBool loop )
void plDSoundBuffer::SetLooping( bool loop )
{
fLooping = loop;
}
@ -684,7 +684,7 @@ void plDSoundBuffer::Rewind()
//// IsPlaying ///////////////////////////////////////////////////////////////
hsBool plDSoundBuffer::IsPlaying( void )
bool plDSoundBuffer::IsPlaying( void )
{
ALint state = AL_STOPPED;
alGetSourcei(source, AL_SOURCE_STATE, &state);
@ -694,7 +694,7 @@ hsBool plDSoundBuffer::IsPlaying( void )
//// IsEAXAccelerated ////////////////////////////////////////////////////////
hsBool plDSoundBuffer::IsEAXAccelerated( void ) const
bool plDSoundBuffer::IsEAXAccelerated( void ) const
{
return fEAXSource.IsValid();
}
@ -727,7 +727,7 @@ uint32_t plDSoundBuffer::GetLengthInBytes( void ) const
//// SetEAXSettings //////////////////////////////////////////////////////////
void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, hsBool force )
void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, bool force )
{
fEAXSource.SetFrom( settings, source, force );
}

View File

@ -68,7 +68,7 @@ class plAudioFileReader;
class plDSoundBuffer
{
public:
plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool looping, hsBool tryStatic = false, bool streaming = false );
plDSoundBuffer( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool looping, bool tryStatic = false, bool streaming = false );
~plDSoundBuffer();
void Play( void );
@ -86,14 +86,14 @@ public:
void SetConeOrientation(float x, float y, float z);
void SetConeOutsideVolume(int vol);
void SetLooping( hsBool loop );
void SetLooping( bool loop );
void SetMinDistance( int dist);
void SetMaxDistance( int dist );
hsBool IsValid( void ) const { return fValid; }
hsBool IsPlaying( void );
hsBool IsLooping( void ) const { return fLooping; }
hsBool IsEAXAccelerated( void ) const;
bool IsValid( void ) const { return fValid; }
bool IsPlaying( void );
bool IsLooping( void ) const { return fLooping; }
bool IsEAXAccelerated( void ) const;
bool FillBuffer(void *data, unsigned bytes, plWAVHeader *header);
@ -112,7 +112,7 @@ public:
uint32_t GetBufferBytePos( float timeInSecs ) const;
uint32_t bytePosToMSecs( uint32_t bytePos ) const;
void SetEAXSettings( plEAXSourceSettings *settings, hsBool force = false );
void SetEAXSettings( plEAXSourceSettings *settings, bool force = false );
void SetTimeOffsetBytes(unsigned bytes);
uint8_t GetBlockAlign( void ) const;
static uint32_t GetNumBuffers() { return fNumBuffers; }
@ -134,7 +134,7 @@ protected:
};
BufferType fType;
hsBool fValid, fLooping;
bool fValid, fLooping;
uint32_t fLockLength;
void * fLockPtr;
@ -158,7 +158,7 @@ protected:
unsigned fNumQueuedBuffers;
float fPrevVolume;
void IAllocate( uint32_t size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic );
void IAllocate( uint32_t size, plWAVHeader &bufferDesc, bool enable3D, bool tryStatic );
void IRelease( void );
int IGetALFormat(unsigned bitsPerSample, unsigned int numChannels);
};

View File

@ -106,7 +106,7 @@ plEAXListener::~plEAXListener()
//// Init ////////////////////////////////////////////////////////////////////
hsBool plEAXListener::Init( void )
bool plEAXListener::Init( void )
{
#ifdef EAX_SDK_AVAILABLE
if( fInited )
@ -229,7 +229,7 @@ void plEAXListener::IRelease( void )
//// IFail ///////////////////////////////////////////////////////////////////
void plEAXListener::IFail( hsBool major )
void plEAXListener::IFail( bool major )
{
plStatusLog::AddLineS( "audio.log", plStatusLog::kRed,
"ERROR in plEAXListener: Could not set global eax params");
@ -238,7 +238,7 @@ void plEAXListener::IFail( hsBool major )
IRelease();
}
void plEAXListener::IFail( const char *msg, hsBool major )
void plEAXListener::IFail( const char *msg, bool major )
{
plStatusLog::AddLineS( "audio.log", plStatusLog::kRed,
"ERROR in plEAXListener: %s", msg );
@ -296,13 +296,13 @@ void plEAXListener::ProcessMods( hsTArray<plEAXListenerMod *> &modArray )
#ifdef EAX_SDK_AVAILABLE
int i;
float totalStrength;
hsBool firstOne;
bool firstOne;
plEAXListenerMod *thisBigRegion = nil;
EAXLISTENERPROPERTIES finalProps;
static int oldTime = timeGetTime(); // Get starting time
int newTime;
hsBool bMorphing = false;
bool bMorphing = false;
static plStatusLog *myLog = nil;
@ -512,7 +512,7 @@ void plEAXSourceSettings::Write( hsStream *s )
}
}
void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, hsBool roomAuto, hsBool roomHFAuto )
void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, bool roomAuto, bool roomHFAuto )
{
fRoom = room;
fRoomHF = roomHF;
@ -521,7 +521,7 @@ void plEAXSourceSettings::SetRoomParams( int16_t room, int16_t roomHF, hsBool
fDirtyParams |= kRoom;
}
void plEAXSourceSettings::Enable( hsBool e )
void plEAXSourceSettings::Enable( bool e )
{
fEnabled = e;
if( !e )
@ -659,14 +659,14 @@ void plEAXSource::Release( void )
fInit = false;
}
hsBool plEAXSource::IsValid( void ) const
bool plEAXSource::IsValid( void ) const
{
return true;
}
//// SetFrom /////////////////////////////////////////////////////////////////
void plEAXSource::SetFrom( plEAXSourceSettings *settings, unsigned source, hsBool force )
void plEAXSource::SetFrom( plEAXSourceSettings *settings, unsigned source, bool force )
{
uint32_t dirtyParams;
if(source == 0 || !fInit)

View File

@ -75,7 +75,7 @@ public:
~plEAXListener();
static plEAXListener &GetInstance( void );
hsBool Init( void );
bool Init( void );
void Shutdown( void );
bool SetGlobalEAXProperty(GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize );
@ -86,17 +86,17 @@ public:
protected:
plEAXListener();
void IFail( hsBool major );
void IFail( const char *msg, hsBool major );
void IFail( bool major );
void IFail( const char *msg, bool major );
void IRelease( void );
void IMuteProperties( EAXREVERBPROPERTIES *props, float percent );
hsBool fInited;
bool fInited;
// Cache info
int32_t fLastModCount;
hsBool fLastWasEmpty;
bool fLastWasEmpty;
float fLastSingleStrength;
plEAXListenerMod *fLastBigRegion;
@ -138,14 +138,14 @@ class plEAXSourceSettings
void Read( hsStream *s );
void Write( hsStream *s );
void Enable( hsBool e );
hsBool IsEnabled( void ) const { return fEnabled; }
void Enable( bool e );
bool IsEnabled( void ) const { return fEnabled; }
void SetRoomParams( int16_t room, int16_t roomHF, hsBool roomAuto, hsBool roomHFAuto );
void SetRoomParams( int16_t room, int16_t roomHF, bool roomAuto, bool roomHFAuto );
int16_t GetRoom( void ) const { return fRoom; }
int16_t GetRoomHF( void ) const { return fRoomHF; }
hsBool GetRoomAuto( void ) const { return fRoomAuto; }
hsBool GetRoomHFAuto( void ) const { return fRoomHFAuto; }
bool GetRoomAuto( void ) const { return fRoomAuto; }
bool GetRoomHFAuto( void ) const { return fRoomHFAuto; }
void SetOutsideVolHF( int16_t vol );
int16_t GetOutsideVolHF( void ) const { return fOutsideVolHF; }
@ -170,9 +170,9 @@ class plEAXSourceSettings
friend class plEAXSource;
friend class plEAXSourceSoftSettings;
hsBool fEnabled;
bool fEnabled;
int16_t fRoom, fRoomHF;
hsBool fRoomAuto, fRoomHFAuto;
bool fRoomAuto, fRoomHFAuto;
int16_t fOutsideVolHF;
float fAirAbsorptionFactor, fRoomRolloffFactor, fDopplerFactor, fRolloffFactor;
plEAXSourceSoftSettings fSoftStarts, fSoftEnds, fCurrSoftValues;
@ -204,13 +204,13 @@ public:
void Init( plDSoundBuffer *parent );
void Release( void );
hsBool IsValid( void ) const;
bool IsValid( void ) const;
bool SetSourceEAXProperty(unsigned source, GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize);
bool GetSourceEAXProperty(unsigned source, GUID guid, unsigned long ulProperty, void *pData, unsigned long ulDataSize);
void SetFrom( plEAXSourceSettings *settings, unsigned source, hsBool force = false );
void SetFrom( plEAXSourceSettings *settings, unsigned source, bool force = false );
private:
hsBool fInit;
bool fInit;
};
#endif //_plEAXEffects_h

View File

@ -120,13 +120,13 @@ void plEAXListenerMod::IUnRegister( void )
fRegistered = false;
}
hsBool plEAXListenerMod::IEval( double secs, float del, uint32_t dirty )
bool plEAXListenerMod::IEval( double secs, float del, uint32_t dirty )
{
IRegister();
return false;
}
hsBool plEAXListenerMod::MsgReceive( plMessage* pMsg )
bool plEAXListenerMod::MsgReceive( plMessage* pMsg )
{
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( pMsg );
if( refMsg != nil )

View File

@ -72,7 +72,7 @@ public:
kRefSoftRegion = 0,
};
virtual hsBool MsgReceive( plMessage* pMsg );
virtual bool MsgReceive( plMessage* pMsg );
virtual void Read( hsStream* s, hsResMgr* mgr );
virtual void Write( hsStream* s, hsResMgr* mgr );
float GetStrength( void );
@ -83,11 +83,11 @@ public:
protected:
plSoftVolume *fSoftRegion;
EAXREVERBPROPERTIES *fListenerProps;
hsBool fRegistered, fGetsMessages;
bool fRegistered, fGetsMessages;
void IRegister( void );
void IUnRegister( void );
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
};
#endif // _plEAXListenerMod_h

View File

@ -75,8 +75,8 @@ plProfile_CreateAsynchTimer( "Sound Load Time", "Sound", SoundLoadTime );
plGraphPlate *plSound::fDebugPlate = nil;
plSound *plSound::fCurrDebugPlateSound = nil;
hsBool plSound::fLoadOnDemandFlag = true;
hsBool plSound::fLoadFromDiskOnDemand = true;
bool plSound::fLoadOnDemandFlag = true;
bool plSound::fLoadFromDiskOnDemand = true;
unsigned plSound::fIncidentalsPlaying = 0;
plSound::plSound() :
@ -128,7 +128,7 @@ plSound::~plSound()
plProfile_Dec( SoundNumLoaded );
}
void plSound::IPrintDbgMessage( const char *msg, hsBool isError )
void plSound::IPrintDbgMessage( const char *msg, bool isError )
{
static plStatusLog *ourLog = nil;
@ -468,7 +468,7 @@ void plSound::RefreshVolume( void )
this->ISetActualVolume( fCurrVolume );
}
void plSound::SetMuted( hsBool muted )
void plSound::SetMuted( bool muted )
{
if( muted != fMuted )
{
@ -605,7 +605,7 @@ void plSound::IStartFade( plFadeParams *params, float offsetIntoFade )
}
}
void plSound::IStopFade( hsBool shuttingDown, hsBool SetVolEnd)
void plSound::IStopFade( bool shuttingDown, bool SetVolEnd)
{
if( fCurrFadeParams != nil )
{
@ -643,7 +643,7 @@ void plSound::IStopFade( hsBool shuttingDown, hsBool SetVolEnd)
}
}
hsBool plSound::MsgReceive( plMessage* pMsg )
bool plSound::MsgReceive( plMessage* pMsg )
{
plTimeMsg *time = plTimeMsg::ConvertNoRef( pMsg );
if( time != nil )
@ -839,7 +839,7 @@ void plSound::IUnloadDataBuffer( void )
/////////////////////////////////////////////////////////////////////////
// calling preload will cause the sound to play once loaded
plSoundBuffer::ELoadReturnVal plSound::IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental /* = false */ )
plSoundBuffer::ELoadReturnVal plSound::IPreLoadBuffer( bool playWhenLoaded, bool isIncidental /* = false */ )
{
if(!ILoadDataBuffer())
{
@ -924,7 +924,7 @@ void plSound::ISetSoftOcclusionRegion( plSoftVolume *region )
/////////////////////////////////////////////////////////////////////////
// This function calculates our new softVolume value. Used both to update the
// said value and so the audio system can rank us in importance.
float plSound::CalcSoftVolume( hsBool enable, float distToListenerSquared )
float plSound::CalcSoftVolume( bool enable, float distToListenerSquared )
{
// Do distance-based attenuation ourselves
#if MCN_HACK_OUR_ATTEN
@ -1025,7 +1025,7 @@ float plSound::GetVolumeRank( void )
// Tests to see whether, if we try to play this sound now, it'll actually
// be able to play. Takes into account whether the sound is within range
// of the listener and the current soft region value.
hsBool plSound::IWillBeAbleToPlay( void )
bool plSound::IWillBeAbleToPlay( void )
{
if( fSoftVolume == 0.f )
return false;
@ -1036,7 +1036,7 @@ hsBool plSound::IWillBeAbleToPlay( void )
/////////////////////////////////////////////////////////////////////////
// Tests to see whether this sound is within range of the position given,
// ignoring soft volumes.
hsBool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared )
bool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared )
{
if( !IsPropertySet( plSound::kPropIs3DSound ) )
{
@ -1071,7 +1071,7 @@ hsBool plSound::IsWithinRange( const hsPoint3 &listenerPos, float *distSquared )
// Note: if we KNOW we're disabling this sound (out of range), Calc() doesn't
// have to be called at all, and we can simply call this function with
// enable = false.
void plSound::UpdateSoftVolume( hsBool enable, hsBool firstTime )
void plSound::UpdateSoftVolume( bool enable, bool firstTime )
{
fNotHighEnoughPriority = !enable;
@ -1146,7 +1146,7 @@ float plSound::IAttenuateActualVolume( float volume ) const
return volume;
}
void plSound::Activate(hsBool forcePlay)
void plSound::Activate(bool forcePlay)
{
// Our actual state...
fActive = true;
@ -1352,8 +1352,8 @@ void plSound::plFadeParams::Read( hsStream *s )
s->ReadLE( &fVolEnd );
s->ReadLE( &fType );
s->ReadLE( &fCurrTime );
s->ReadLE( &fStopWhenDone );
s->ReadLE( &fFadeSoftVol );
fStopWhenDone = s->ReadBOOL();
fFadeSoftVol = s->ReadBOOL();
}
void plSound::plFadeParams::Write( hsStream *s )
@ -1363,8 +1363,8 @@ void plSound::plFadeParams::Write( hsStream *s )
s->WriteLE( fVolEnd );
s->WriteLE( fType );
s->WriteLE( fCurrTime );
s->WriteLE( fStopWhenDone );
s->WriteLE( fFadeSoftVol );
s->WriteBOOL( fStopWhenDone );
s->WriteBOOL( fFadeSoftVol );
}
float plSound::plFadeParams::InterpValue( void )
@ -1480,7 +1480,7 @@ plDrawableSpans* plSound::CreateProxy(const hsMatrix44& l2w, hsGMaterial* mat, h
// call when state has changed
hsBool plSound::DirtySynchState(const char* sdlName /* kSDLSound */, uint32_t sendFlags)
bool plSound::DirtySynchState(const char* sdlName /* kSDLSound */, uint32_t sendFlags)
{
/*
if( sdlName == nil )

View File

@ -152,9 +152,9 @@ public:
float fLengthInSecs; // Time to take to fade
float fVolStart; // Set one of these two for fade in/out,
float fVolEnd; // the other becomes the current volume
uint8_t fType;
hsBool fStopWhenDone; // Actually stop the sound once the fade is complete
hsBool fFadeSoftVol; // Fade the soft volume instead of fCurrVolume
uint8_t fType;
bool fStopWhenDone; // Actually stop the sound once the fade is complete
bool fFadeSoftVol; // Fade the soft volume instead of fCurrVolume
plFadeParams() { fLengthInSecs = 0.f; fCurrTime = -1.f; fStopWhenDone = false; fFadeSoftVol = false; fVolStart = fVolEnd = 0.f; fType = kLinear; }
@ -174,7 +174,7 @@ public:
float fCurrTime; // -1 if we aren't active, else it's how far we're into the animation
};
virtual hsBool LoadSound( hsBool is3D ) = 0;
virtual bool LoadSound( bool is3D ) = 0;
float GetVirtualStartTime( void ) const { return (float)fVirtualStartTime; }
virtual void Play();
@ -190,14 +190,14 @@ public:
virtual void SetVolume(const float volume);
virtual float GetVolume(void) const { return fCurrVolume; }
float GetMaxVolume() { return fMaxVolume; }
virtual hsBool IsPlaying() { return fPlaying; }
virtual bool IsPlaying() { return fPlaying; }
void SetTime(double t);
virtual double GetTime( void ) { return 0.f; }
virtual void Activate(hsBool forcePlay = false);
virtual void Activate(bool forcePlay = false);
virtual void DeActivate();
virtual void SetLength(double l) { fLength = l; }
virtual void SetMuted( hsBool muted );
virtual hsBool IsMuted( void ) { return fMuted; }
virtual void SetMuted( bool muted );
virtual bool IsMuted( void ) { return fMuted; }
void Disable() { fDistAttenuation = 0; }
virtual plSoundMsg* GetStatus(plSoundMsg* pMsg){return NULL;}
virtual void SetConeOrientation(float x, float y, float z);
@ -216,8 +216,8 @@ public:
const char * GetFileName( void ) const;
virtual double GetLength();
void SetProperty( Property prop, hsBool on ) { if( on ) fProperties |= prop; else fProperties &= ~prop; }
hsBool IsPropertySet( Property prop ) const { return ( fProperties & prop ) ? true : false; }
void SetProperty( Property prop, bool on ) { if( on ) fProperties |= prop; else fProperties &= ~prop; }
bool IsPropertySet( Property prop ) const { return ( fProperties & prop ) ? true : false; }
virtual void RefreshVolume( void );
@ -235,14 +235,14 @@ public:
virtual void SetFadeInEffect( plFadeParams::Type type, float length );
virtual void SetFadeOutEffect( plFadeParams::Type type, float length );
virtual float CalcSoftVolume( hsBool enable, float distToListenerSquared );
virtual void UpdateSoftVolume( hsBool enable, hsBool firstTime = false );
virtual float CalcSoftVolume( bool enable, float distToListenerSquared );
virtual void UpdateSoftVolume( bool enable, bool firstTime = false );
virtual hsBool MsgReceive( plMessage* pMsg );
virtual hsBool DirtySynchState( const char *sdlName = nil, uint32_t sendFlags = 0 ); // call when state has changed
virtual bool MsgReceive( plMessage* pMsg );
virtual bool DirtySynchState( const char *sdlName = nil, uint32_t sendFlags = 0 ); // call when state has changed
// Tests whether this sound is within range of the given position, not counting soft regions
hsBool IsWithinRange( const hsPoint3 &listenerPos, float *distSquared );
bool IsWithinRange( const hsPoint3 &listenerPos, float *distSquared );
// Type setting and getting, from the Types enum
void SetType( uint8_t type ) { fType = type; }
@ -269,8 +269,8 @@ public:
float GetVolumeRank( void );
void ForceUnregisterFromAudioSys( void );
static void SetLoadOnDemand( hsBool activate ) { fLoadOnDemandFlag = activate; }
static void SetLoadFromDiskOnDemand( hsBool activate ) { fLoadFromDiskOnDemand = activate; }
static void SetLoadOnDemand( bool activate ) { fLoadOnDemandFlag = activate; }
static void SetLoadFromDiskOnDemand( bool activate ) { fLoadFromDiskOnDemand = activate; }
const plEAXSourceSettings &GetEAXSettings( void ) const { return fEAXSettings; }
plEAXSourceSettings &GetEAXSettings( void ) { return fEAXSettings; }
@ -279,8 +279,8 @@ public:
protected:
hsBool fPlaying;
hsBool fActive;
bool fPlaying;
bool fActive;
double fTime;
int fMaxFalloff;
int fMinFalloff;
@ -298,15 +298,15 @@ protected:
uint8_t fType;
uint8_t fPriority;
hsBool fMuted, fFading, fRegisteredForTime, fPlayOnReactivate, fFreeData;
hsBool fNotHighEnoughPriority; // Set whenever the audioSys calls UpdateSoftVolume() with enable=false,
bool fMuted, fFading, fRegisteredForTime, fPlayOnReactivate, fFreeData;
bool fNotHighEnoughPriority; // Set whenever the audioSys calls UpdateSoftVolume() with enable=false,
// thus indicating that we slipped off the top 16 most wanted list.
// Do these need to be synched values? They weren't before...
hsVector3 fConeOrientation;
hsPoint3 f3DPosition;
hsVector3 f3DVelocity;
hsBool fPlayWhenLoaded;
bool fPlayWhenLoaded;
double fSynchedStartTimeSec;
@ -315,7 +315,7 @@ protected:
// EAX Settings storage here
plEAXSourceSettings fEAXSettings;
hsBool fQueued;
bool fQueued;
plFadeParams fFadeInParams, fFadeOutParams;
plFadeParams fCoolSoftVolumeTrickParams;
@ -325,45 +325,45 @@ protected:
float fSoftVolume;
float fDistAttenuation, fDistToListenerSquared;
double fVirtualStartTime;
hsBool fRegistered;
bool fRegistered;
static unsigned fIncidentalsPlaying;
plSoftVolume *fSoftOcclusionRegion;
plSoundBuffer *fDataBuffer; // Not always around
hsBool fDataBufferLoaded;
bool fDataBufferLoaded;
plKey fDataBufferKey; // Always around
static plGraphPlate *fDebugPlate;
static plSound *fCurrDebugPlateSound;
static hsBool fLoadOnDemandFlag, fLoadFromDiskOnDemand;
hsBool fLoading;
static bool fLoadOnDemandFlag, fLoadFromDiskOnDemand;
bool fLoading;
void IUpdateDebugPlate( void );
void IPrintDbgMessage( const char *msg, hsBool isErr = false );
void IPrintDbgMessage( const char *msg, bool isErr = false );
virtual void ISetActualVolume(const float v) = 0;
virtual void IActuallyStop( void );
virtual hsBool IActuallyPlaying( void ) = 0;
virtual bool IActuallyPlaying( void ) = 0;
virtual void IActuallyPlay( void ) = 0;
virtual void IFreeBuffers( void ) = 0;
//NOTE: if isIncidental is true the entire sound will be loaded.
virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental = false );
virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( bool playWhenLoaded, bool isIncidental = false );
virtual void ISetActualTime( double t ) = 0;
virtual hsBool IActuallyLoaded( void ) = 0;
virtual void IRefreshEAXSettings( hsBool force = false ) = 0;
virtual bool IActuallyLoaded( void ) = 0;
virtual void IRefreshEAXSettings( bool force = false ) = 0;
virtual float IGetChannelVolume( void ) const;
void ISynchToStartTime( void );
void ISynchedPlay( double virtualStartTime );
void IStartFade( plFadeParams *params, float offsetIntoFade = 0.f );
void IStopFade( hsBool shuttingDown = false, hsBool SetVolEnd = true);
void IStopFade( bool shuttingDown = false, bool SetVolEnd = true);
hsBool IWillBeAbleToPlay( void );
bool IWillBeAbleToPlay( void );
void ISetSoftRegion( plSoftVolume *region );
float IAttenuateActualVolume( float volume ) const;

View File

@ -100,7 +100,7 @@ void plSoundEvent::AddCallback( plEventCallbackMsg *msg )
fCallbackEndingFlags.Append( 0 );
}
hsBool plSoundEvent::RemoveCallback( plEventCallbackMsg *msg )
bool plSoundEvent::RemoveCallback( plEventCallbackMsg *msg )
{
int idx = fCallbacks.Find( msg );
if( idx != fCallbacks.kMissingIndex )

View File

@ -74,7 +74,7 @@ public:
~plSoundEvent();
void AddCallback( plEventCallbackMsg *msg );
hsBool RemoveCallback( plEventCallbackMsg *msg );
bool RemoveCallback( plEventCallbackMsg *msg );
uint32_t GetNumCallbacks( void ) const;
int GetType( void ) const;

View File

@ -70,14 +70,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define VOICE_STOP_MS 2000
#define MAX_DATA_SIZE 1024 * 4 // 4 KB
hsBool plVoiceRecorder::fCompress = true;
hsBool plVoiceRecorder::fRecording = true;
hsBool plVoiceRecorder::fNetVoice = false;
bool plVoiceRecorder::fCompress = true;
bool plVoiceRecorder::fRecording = true;
bool plVoiceRecorder::fNetVoice = false;
short plVoiceRecorder::fSampleRate = FREQUENCY;
float plVoiceRecorder::fRecordThreshhold = 200.0f;
hsBool plVoiceRecorder::fShowIcons = true;
hsBool plVoiceRecorder::fMicAlwaysOpen = false;
hsBool plVoicePlayer::fEnabled = true;
bool plVoiceRecorder::fShowIcons = true;
bool plVoiceRecorder::fMicAlwaysOpen = false;
bool plVoicePlayer::fEnabled = true;
plVoiceRecorder::plVoiceRecorder()
{
@ -171,12 +171,12 @@ void plVoiceRecorder::SetComplexity(int c)
plSpeex::GetInstance()->SetComplexity((uint8_t) c);
}
void plVoiceRecorder::SetENH(hsBool b)
void plVoiceRecorder::SetENH(bool b)
{
plSpeex::GetInstance()->SetENH(b);
}
void plVoiceRecorder::SetMikeOpen(hsBool b)
void plVoiceRecorder::SetMikeOpen(bool b)
{
ALCdevice *device = plgAudioSys::GetCaptureDevice();
if (fRecording && device)
@ -198,7 +198,7 @@ void plVoiceRecorder::SetMikeOpen(hsBool b)
}
}
void plVoiceRecorder::DrawDisabledIcon(hsBool b)
void plVoiceRecorder::DrawDisabledIcon(bool b)
{
if (!fDisabledIcon)
{
@ -217,7 +217,7 @@ void plVoiceRecorder::DrawDisabledIcon(hsBool b)
fDisabledIcon->SetVisible(b);
}
void plVoiceRecorder::DrawTalkIcon(hsBool b)
void plVoiceRecorder::DrawTalkIcon(bool b)
{
if (!fTalkIcon)
{
@ -417,7 +417,7 @@ plVoiceSound::~plVoiceSound()
{
}
hsBool plVoiceSound::LoadSound( hsBool is3D )
bool plVoiceSound::LoadSound( bool is3D )
{
if( fFailed )
return false;
@ -538,7 +538,7 @@ plSpeex::~plSpeex()
fBits = nil;
}
hsBool plSpeex::Init(Mode mode)
bool plSpeex::Init(Mode mode)
{
int enh = 1;
@ -571,7 +571,7 @@ hsBool plSpeex::Init(Mode mode)
return true;
}
hsBool plSpeex::Shutdown()
bool plSpeex::Shutdown()
{
//shutdown speex
if(fDecoderState)
@ -596,7 +596,7 @@ hsBool plSpeex::Shutdown()
return true;
}
hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out)
bool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out)
{
*packedLength = 0;
@ -634,7 +634,7 @@ hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStrea
return true;
}
hsBool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out)
bool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out)
{
if(!fInitialized) return false;
*numOutputBytes = 0;
@ -677,7 +677,7 @@ hsBool plSpeex::Decode(uint8_t *data, int size, int numFrames, int *numOutputByt
}
// Sets variable bit rate on/off
void plSpeex::VBR(hsBool b)
void plSpeex::VBR(bool b)
{
fVBR = b;
speex_encoder_ctl(fEncoderState, SPEEX_SET_VBR, &fVBR);
@ -698,7 +698,7 @@ void plSpeex::SetQuality(uint32_t quality)
speex_encoder_ctl(fEncoderState, SPEEX_SET_QUALITY, &fQuality);
}
void plSpeex::SetENH(hsBool b)
void plSpeex::SetENH(bool b)
{
fENH = b;
speex_decoder_ctl(fDecoderState, SPEEX_SET_ENH, &fENH);

View File

@ -68,7 +68,7 @@ class plVoiceSound : public plWin32Sound
public:
plVoiceSound();
~plVoiceSound();
hsBool LoadSound( hsBool is3D );
bool LoadSound( bool is3D );
void AddVoiceData(void *data, unsigned bytes);
void Update();
void Play();
@ -100,11 +100,11 @@ public:
void SetTalkIcon(int index, uint32_t str){}
void ClearTalkIcon(){}
plVoiceSound *GetSoundPtr() { return &fSound; }
static void Enable(hsBool enable) { fEnabled = enable; }
static void Enable(bool enable) { fEnabled = enable; }
private:
plVoiceSound fSound;
static hsBool fEnabled;
static bool fEnabled;
};
class plVoiceRecorder
@ -114,21 +114,21 @@ public:
~plVoiceRecorder();
void Update(double time);
void SetMikeOpen(hsBool b);
void DrawTalkIcon(hsBool b);
void DrawDisabledIcon(hsBool b);
void SetMikeOpen(bool b);
void DrawTalkIcon(bool b);
void DrawDisabledIcon(bool b);
void SetTalkIcon(int index, uint32_t str);
void ClearTalkIcon();
static hsBool RecordingEnabled() { return fRecording; }
static hsBool NetVoiceEnabled() { return fNetVoice; }
static hsBool CompressionEnabled() { return fCompress; }
static void EnablePushToTalk(hsBool b) { fMicAlwaysOpen = !b; }
static void EnableIcons(hsBool b) { fShowIcons = b; }
static void EnableRecording(hsBool b) { fRecording = b; }
static void EnableNetVoice(hsBool b) { fNetVoice = b; }
static void EnableCompression(hsBool b) { fCompress = b; }
static bool RecordingEnabled() { return fRecording; }
static bool NetVoiceEnabled() { return fNetVoice; }
static bool CompressionEnabled() { return fCompress; }
static void EnablePushToTalk(bool b) { fMicAlwaysOpen = !b; }
static void EnableIcons(bool b) { fShowIcons = b; }
static void EnableRecording(bool b) { fRecording = b; }
static void EnableNetVoice(bool b) { fNetVoice = b; }
static void EnableCompression(bool b) { fCompress = b; }
static void SetSampleRate(short s) { fSampleRate = s; }
static void SetSquelch(float f) { fRecordThreshhold = f; }
@ -139,18 +139,18 @@ public:
static void SetMode(int mode); // sets nb or wb mode
static void SetVBR(bool vbr);
static void SetComplexity(int c);
static void SetENH(hsBool b);
static void SetENH(bool b);
static short GetSampleRate() { return fSampleRate; }
private:
hsBool fMikeOpen;
hsBool fMikeJustClosed;
static hsBool fMicAlwaysOpen;
static hsBool fShowIcons;
static hsBool fCompress;
static hsBool fNetVoice;
static hsBool fRecording;
bool fMikeOpen;
bool fMikeJustClosed;
static bool fMicAlwaysOpen;
static bool fShowIcons;
static bool fCompress;
static bool fNetVoice;
static bool fRecording;
static short fSampleRate;
plPlate* fDisabledIcon;
plPlate* fTalkIcon;
@ -176,37 +176,37 @@ public:
return &instance;
}
hsBool Init(Mode mode);
hsBool Shutdown();
hsBool Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out);
hsBool Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out);
bool Init(Mode mode);
bool Shutdown();
bool Encode(short *data, int numFrames, int *packedLength, hsRAMStream *out);
bool Decode(uint8_t *data, int size, int numFrames, int *numOutputBytes, short *out);
int GetFrameSize() { return fFrameSize; }
void VBR(hsBool b); // turn variable bit rate on/off
void VBR(bool b); // turn variable bit rate on/off
void SetVBR(uint32_t vbr); // Set variable bit rate quality
void ABR(hsBool b); // turn average bit rate on/off
void ABR(bool b); // turn average bit rate on/off
void SetABR(uint32_t abr); // Set average bit rate quality
void SetQuality(uint32_t quality); // Set encoder quality
hsBool IsUsingVBR() { return fVBR; }
bool IsUsingVBR() { return fVBR; }
int GetQuality() { return fQuality; }
void SetENH(hsBool b);
void SetENH(bool b);
void SetComplexity(uint8_t c);
hsBool Initialized() { return fInitialized; }
bool Initialized() { return fInitialized; }
private:
plSpeex();
SpeexBits* fBits; // main speex structure
hsBool fBitsInit;
bool fBitsInit;
void* fEncoderState;
void* fDecoderState;
int fSampleRate;
int fFrameSize; // frame size from speex - 160 for nb
int fQuality; // 0-10 speex encode quality
hsBool fVBR; // toggle variable bit rate
bool fVBR; // toggle variable bit rate
int fAverageBitrate; // n-bits per second
uint8_t fComplexity; // 1-10 sets cpu resources allowed for encoder
hsBool fENH; // perceptual enhancement
hsBool fInitialized;
bool fENH; // perceptual enhancement
bool fInitialized;
};
#endif //plVoiceChat_h

View File

@ -123,7 +123,7 @@ void plWin32GroupedSound::IWrite( hsStream *s, hsResMgr *mgr )
//// LoadSound ///////////////////////////////////////////////////////////////
hsBool plWin32GroupedSound::LoadSound( hsBool is3D )
bool plWin32GroupedSound::LoadSound( bool is3D )
{
if( fFailed )
return false;
@ -387,7 +387,7 @@ void plWin32GroupedSound::IDerivedActuallyPlay( void )
event->SendCallbacks();
}
hsBool plWin32GroupedSound::MsgReceive( plMessage* pMsg )
bool plWin32GroupedSound::MsgReceive( plMessage* pMsg )
{
plSoundMsg *soundMsg = plSoundMsg::ConvertNoRef( pMsg );
if( soundMsg != nil && soundMsg->Cmd( plSoundMsg::kSelectFromGroup ) )

View File

@ -68,8 +68,8 @@ public:
CLASSNAME_REGISTER( plWin32GroupedSound );
GETINTERFACE_ANY( plWin32GroupedSound, plWin32StaticSound );
virtual hsBool LoadSound( hsBool is3D );
virtual hsBool MsgReceive( plMessage *pMsg );
virtual bool LoadSound( bool is3D );
virtual bool MsgReceive( plMessage *pMsg );
void SetPositionArray( uint16_t numSounds, uint32_t *posArray, float *volumeArray );
float GetSoundLength( int16_t soundIndex );
virtual double GetLength() { return GetSoundLength( fCurrentSound ); }

View File

@ -83,7 +83,7 @@ plWin32Sound::~plWin32Sound()
{
}
void plWin32Sound::Activate( hsBool forcePlay )
void plWin32Sound::Activate( bool forcePlay )
{
if( fFailed )
return;
@ -314,7 +314,7 @@ void plWin32Sound::IRefreshParams( void )
plSound::IRefreshParams();
}
void plWin32Sound::IRefreshEAXSettings( hsBool force )
void plWin32Sound::IRefreshEAXSettings( bool force )
{
if( fDSoundBuffer != nil )
fDSoundBuffer->SetEAXSettings( &GetEAXSettings(), force );
@ -404,7 +404,7 @@ void plWin32Sound::AddCallbacks(plSoundMsg* pSoundMsg)
IAddCallback( pSoundMsg->GetEventCallback( i ) );
}
hsBool plWin32Sound::MsgReceive( plMessage* pMsg )
bool plWin32Sound::MsgReceive( plMessage* pMsg )
{
plEventCallbackMsg *e = plEventCallbackMsg::ConvertNoRef( pMsg );
if( e != nil )

View File

@ -68,14 +68,14 @@ public:
CLASSNAME_REGISTER( plWin32Sound );
GETINTERFACE_ANY( plWin32Sound, plSound );
virtual void Activate(hsBool forcePlay = false);
virtual void Activate(bool forcePlay = false);
virtual void DeActivate();
virtual void AddCallbacks(plSoundMsg* pMsg);
virtual void RemoveCallbacks(plSoundMsg* pMsg);
virtual plSoundMsg* GetStatus(plSoundMsg* pMsg);
virtual hsBool MsgReceive(plMessage* pMsg);
virtual bool MsgReceive(plMessage* pMsg);
virtual void Update();
virtual void SetMin(const int m); // sets minimum falloff distance
@ -100,12 +100,12 @@ protected:
plDSoundBuffer * fDSoundBuffer;
hsBool fFailed;
hsBool fPositionInited, fAwaitingPosition;
hsBool fReallyPlaying;
bool fFailed;
bool fPositionInited, fAwaitingPosition;
bool fReallyPlaying;
uint32_t fTotalBytes;
hsBool fWasPlaying;
bool fWasPlaying;
uint8_t fChannelSelect; // For selecting a mono channel from a stereo file
@ -113,10 +113,10 @@ protected:
virtual void ISetActualVolume(const float v);
virtual void IActuallyStop( void );
virtual hsBool IActuallyPlaying( void ) { return fReallyPlaying; }
virtual bool IActuallyPlaying( void ) { return fReallyPlaying; }
virtual void IActuallyPlay( void );
virtual void IFreeBuffers( void );
virtual hsBool IActuallyLoaded( void ) { return ( fDSoundBuffer != nil ) ? true : false; }
virtual bool IActuallyLoaded( void ) { return ( fDSoundBuffer != nil ) ? true : false; }
// Override to make sure the buffer is available before the base class is called
virtual void IRefreshParams( void );
@ -130,7 +130,7 @@ protected:
virtual void IRead( hsStream *s, hsResMgr *mgr );
virtual void IWrite( hsStream *s, hsResMgr *mgr );
virtual void IRefreshEAXSettings( hsBool force = false );
virtual void IRefreshEAXSettings( bool force = false );
};
#endif //plWin32Sound_h

View File

@ -72,7 +72,7 @@ plWin32StaticSound::~plWin32StaticSound()
IUnloadDataBuffer();
}
void plWin32StaticSound::Activate( hsBool forcePlay )
void plWin32StaticSound::Activate( bool forcePlay )
{
plWin32Sound::Activate( forcePlay );
}
@ -82,7 +82,7 @@ void plWin32StaticSound::DeActivate()
plWin32Sound::DeActivate();
}
hsBool plWin32StaticSound::LoadSound( hsBool is3D )
bool plWin32StaticSound::LoadSound( bool is3D )
{
if (fFailed)
return false;
@ -143,7 +143,7 @@ hsBool plWin32StaticSound::LoadSound( hsBool is3D )
header.fNumChannels = 1;
}
hsBool tryStatic = true;
bool tryStatic = true;
// If we want FX, we can't use a static voice, but EAX doesn't fit under that limitation :)
if( 0 )
tryStatic = false;
@ -250,7 +250,7 @@ void plWin32StaticSound::ISetActualTime(double t)
}
}
hsBool plWin32StaticSound::MsgReceive( plMessage* pMsg )
bool plWin32StaticSound::MsgReceive( plMessage* pMsg )
{
return plWin32Sound::MsgReceive( pMsg );
}
@ -295,7 +295,7 @@ void plWin32LinkSound::Write(hsStream* s, hsResMgr* mgr)
plWin32StaticSound::Write(s, mgr);
}
hsBool plWin32LinkSound::MsgReceive( plMessage* pMsg )
bool plWin32LinkSound::MsgReceive( plMessage* pMsg )
{
plLinkEffectBCMsg *msg = plLinkEffectBCMsg::ConvertNoRef( pMsg );
if( msg != nil && !msg->HasLinkFlag(plLinkEffectBCMsg::kMute))

View File

@ -59,15 +59,15 @@ public:
CLASSNAME_REGISTER( plWin32StaticSound );
GETINTERFACE_ANY( plWin32StaticSound, plWin32Sound );
virtual void Activate( hsBool forcePlay = false );
virtual void Activate( bool forcePlay = false );
virtual void DeActivate();
virtual hsBool LoadSound( hsBool is3D );
virtual bool LoadSound( bool is3D );
virtual void Update();
virtual hsBool MsgReceive(plMessage* pMsg);
virtual bool MsgReceive(plMessage* pMsg);
virtual void SetStartPos(unsigned bytes){}
protected:
hsBool fRegisteredOnThread;
bool fRegisteredOnThread;
virtual void IDerivedActuallyPlay( void );
virtual void ISetActualTime( double t );
@ -90,7 +90,7 @@ public:
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* pMsg);
virtual bool MsgReceive(plMessage* pMsg);
};
#endif //plWin32StaticSound_h

View File

@ -113,11 +113,11 @@ void plWin32StreamingSound::SetFilename(const char *filename, bool isCompressed)
//////////////////////////////////////////////////////////////
// Override, 'cause we don't want to actually LOAD the sound for streaming,
// just make sure it's decompressed and such and ready to stream.
plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental /* = false */ )
plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( bool playWhenLoaded, bool isIncidental /* = false */ )
{
if(fPlayWhenStopped)
return plSoundBuffer::kPending;
hsBool sfxPath = fNewFilename.size() ? false : true;
bool sfxPath = fNewFilename.size() ? false : true;
if( fDataStream != nil && fNewFilename.size() == 0)
return plSoundBuffer::kSuccess; // Already loaded
@ -240,7 +240,7 @@ void plWin32StreamingSound::IFreeBuffers( void )
// first half of our buffer. We'll fill the rest of the buffer as we get
// notifications for such.
hsBool plWin32StreamingSound::LoadSound( hsBool is3D )
bool plWin32StreamingSound::LoadSound( bool is3D )
{
if( fFailed )
return false;
@ -494,7 +494,7 @@ void plWin32StreamingSound::ISetActualTime( double t )
// fStartTimeSec = t;
}
hsBool plWin32StreamingSound::MsgReceive( plMessage* pMsg )
bool plWin32StreamingSound::MsgReceive( plMessage* pMsg )
{
return plWin32Sound::MsgReceive( pMsg );
}

View File

@ -60,14 +60,14 @@ public:
GETINTERFACE_ANY( plWin32StreamingSound, plWin32Sound );
virtual void DeActivate();
virtual hsBool LoadSound( hsBool is3D );
virtual bool LoadSound( bool is3D );
virtual float GetActualTimeSec();
virtual unsigned GetByteOffset();
virtual StreamType GetStreamType() const { return fStreamType; }
virtual void SetFilename(const char *filename, bool isCompressed);
virtual void Update(); // temp
void StreamUpdate();
virtual hsBool MsgReceive( plMessage *pMsg );
virtual bool MsgReceive( plMessage *pMsg );
protected:
float fTimeAtBufferStart;
@ -80,7 +80,7 @@ protected:
bool fIsCompressed; // this applies only to the new sound file specified in fNewFilename, so we can play both ogg's and wav's
std::string fNewFilename; // allow the filename to be changed so we can play from a different source.
// ultimately this filename will be given to fDataBuffer, but since it's not always around we'll store it here
hsBool fStopping;
bool fStopping;
double fLastStreamingUpdate;
bool fPlayWhenStopped;
@ -98,7 +98,7 @@ protected:
virtual void IFreeBuffers( void );
void IStreamUpdate();
virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( hsBool playWhenLoaded, hsBool isIncidental = false );
virtual plSoundBuffer::ELoadReturnVal IPreLoadBuffer( bool playWhenLoaded, bool isIncidental = false );
};
#endif //plWin32StreamingSound_h

View File

@ -72,11 +72,11 @@ DWORD sVolControlID = 0;
//// Local Static Helpers ////////////////////////////////////////////////////
hsBool IGetMuxMicVolumeControl( void );
hsBool IGetBaseMicVolumeControl( void );
bool IGetMuxMicVolumeControl( void );
bool IGetBaseMicVolumeControl( void );
hsBool IGetControlValue( DWORD &value );
hsBool ISetControlValue( DWORD value );
bool IGetControlValue( DWORD &value );
bool ISetControlValue( DWORD value );
MIXERLINE *IGetLineByType( DWORD type );
MIXERLINE *IGetLineByID( DWORD id );
@ -114,7 +114,7 @@ void plWinMicLevel::SetLevel( float level )
#endif
}
hsBool plWinMicLevel::CanSetLevel( void )
bool plWinMicLevel::CanSetLevel( void )
{
// Just to init
plWinMicLevel &instance = IGetInstance();
@ -196,7 +196,7 @@ void plWinMicLevel::IShutdown( void )
// Note: testing indcates that this works but the direct SRC_MICROPHONE
// doesn't, hence we try this one first.
hsBool IGetMuxMicVolumeControl( void )
bool IGetMuxMicVolumeControl( void )
{
if( sMixerHandle == nil )
return false;
@ -238,7 +238,7 @@ hsBool IGetMuxMicVolumeControl( void )
// Tries to get the volume control of the mic-in line. See
// IGetMuxMicVolumeControl for why we don't do this one first.
hsBool IGetBaseMicVolumeControl( void )
bool IGetBaseMicVolumeControl( void )
{
if( sMixerHandle == nil )
return false;
@ -267,7 +267,7 @@ hsBool IGetBaseMicVolumeControl( void )
//// IGetControlValue ////////////////////////////////////////////////////////
// Gets the raw value of the current volume control.
hsBool IGetControlValue( DWORD &value )
bool IGetControlValue( DWORD &value )
{
if( sMixerHandle == nil )
return false;
@ -292,7 +292,7 @@ hsBool IGetControlValue( DWORD &value )
//// ISetControlValue ////////////////////////////////////////////////////////
// Sets the raw value of the current volume control.
hsBool ISetControlValue( DWORD value )
bool ISetControlValue( DWORD value )
{
if( sMixerHandle == nil )
return false;

View File

@ -69,7 +69,7 @@ public:
static void SetLevel( float level );
// Returns whether we can set the level
static hsBool CanSetLevel( void );
static bool CanSetLevel( void );
protected:
plWinMicLevel(); // Protected constructor for IGetInstance. Just to init some stuff

View File

@ -76,14 +76,14 @@ public:
virtual uint32_t GetDataSize( void ) = 0;
virtual float GetLengthInSecs( void ) = 0;
virtual hsBool SetPosition( uint32_t numBytes ) = 0;
virtual hsBool Read( uint32_t numBytes, void *buffer ) = 0;
virtual bool SetPosition( uint32_t numBytes ) = 0;
virtual bool Read( uint32_t numBytes, void *buffer ) = 0;
virtual uint32_t NumBytesLeft( void ) = 0;
virtual hsBool OpenForWriting( const char *path, plWAVHeader &header ) { return false; }
virtual bool OpenForWriting( const char *path, plWAVHeader &header ) { return false; }
virtual uint32_t Write( uint32_t bytes, void *buffer ) { return 0; }
virtual hsBool IsValid( void ) = 0;
virtual bool IsValid( void ) = 0;
static plAudioFileReader* CreateReader(const char* path, plAudioCore::ChannelSelect whichChan = plAudioCore::kAll, StreamType type = kStreamWAV);
static plAudioFileReader* CreateWriter(const char* path, plWAVHeader& header);

View File

@ -141,7 +141,7 @@ float plBufferedFileReader::GetLengthInSecs( void )
return (float)fBufferSize / (float)fHeader.fAvgBytesPerSec;
}
hsBool plBufferedFileReader::SetPosition( uint32_t numBytes )
bool plBufferedFileReader::SetPosition( uint32_t numBytes )
{
hsAssert( IsValid(), "SetPosition() called on an invalid RAM buffer" );
@ -155,12 +155,12 @@ hsBool plBufferedFileReader::SetPosition( uint32_t numBytes )
return true;
}
hsBool plBufferedFileReader::Read( uint32_t numBytes, void *buffer )
bool plBufferedFileReader::Read( uint32_t numBytes, void *buffer )
{
hsAssert( IsValid(), "Read() called on an invalid RAM buffer" );
hsBool valid = true;
bool valid = true;
if( fCursor + numBytes > fBufferSize )
{

View File

@ -66,10 +66,10 @@ public:
virtual void Close( void );
virtual uint32_t GetDataSize( void ) { return fBufferSize; }
virtual float GetLengthInSecs( void );
virtual hsBool SetPosition( uint32_t numBytes );
virtual hsBool Read( uint32_t numBytes, void *buffer );
virtual bool SetPosition( uint32_t numBytes );
virtual bool Read( uint32_t numBytes, void *buffer );
virtual uint32_t NumBytesLeft( void );
virtual hsBool IsValid( void ) { return ( fBuffer != nil ) ? true : false; }
virtual bool IsValid( void ) { return ( fBuffer != nil ) ? true : false; }
protected:
uint32_t fBufferSize;

View File

@ -131,7 +131,7 @@ float plCachedFileReader::GetLengthInSecs()
return (float)fDataLength / (float)fHeader.fAvgBytesPerSec;
}
hsBool plCachedFileReader::SetPosition(uint32_t numBytes)
bool plCachedFileReader::SetPosition(uint32_t numBytes)
{
hsAssert(IsValid(), "SetPosition() called on an invalid cache file");
@ -142,7 +142,7 @@ hsBool plCachedFileReader::SetPosition(uint32_t numBytes)
return !fseek(fFileHandle, sizeof(plWAVHeader) + fCurPosition, SEEK_SET);
}
hsBool plCachedFileReader::Read(uint32_t numBytes, void *buffer)
bool plCachedFileReader::Read(uint32_t numBytes, void *buffer)
{
hsAssert(IsValid(), "Read() called on an invalid cache file");
@ -162,7 +162,7 @@ uint32_t plCachedFileReader::NumBytesLeft()
return fDataLength - fCurPosition;
}
hsBool plCachedFileReader::OpenForWriting(const char *path, plWAVHeader &header)
bool plCachedFileReader::OpenForWriting(const char *path, plWAVHeader &header)
{
hsAssert(path != nil, "Invalid path specified in plCachedFileReader");

View File

@ -71,14 +71,14 @@ public:
virtual uint32_t GetDataSize();
virtual float GetLengthInSecs();
virtual hsBool SetPosition(uint32_t numBytes);
virtual hsBool Read(uint32_t numBytes, void *buffer);
virtual bool SetPosition(uint32_t numBytes);
virtual bool Read(uint32_t numBytes, void *buffer);
virtual uint32_t NumBytesLeft();
virtual hsBool OpenForWriting(const char *path, plWAVHeader &header);
virtual bool OpenForWriting(const char *path, plWAVHeader &header);
virtual uint32_t Write(uint32_t bytes, void *buffer);
virtual hsBool IsValid() { return fFileHandle != nil; }
virtual bool IsValid() { return fFileHandle != nil; }
protected:
enum

View File

@ -265,7 +265,7 @@ float plFastWAV::GetLengthInSecs( void )
return (float)( fDataSize / fChannelAdjust ) / (float)fHeader.fAvgBytesPerSec;
}
hsBool plFastWAV::SetPosition( uint32_t numBytes )
bool plFastWAV::SetPosition( uint32_t numBytes )
{
hsAssert( IsValid(), "GetHeader() called on an invalid WAV file" );
@ -277,7 +277,7 @@ hsBool plFastWAV::SetPosition( uint32_t numBytes )
return ( fseek( fFileHandle, fDataStartPos + fCurrDataPos, SEEK_SET ) == 0 ) ? true : false;
}
hsBool plFastWAV::Read( uint32_t numBytes, void *buffer )
bool plFastWAV::Read( uint32_t numBytes, void *buffer )
{
hsAssert( IsValid(), "GetHeader() called on an invalid WAV file" );

View File

@ -71,11 +71,11 @@ public:
virtual uint32_t GetDataSize( void ) { return fDataSize / fChannelAdjust; }
virtual float GetLengthInSecs( void );
virtual hsBool SetPosition( uint32_t numBytes );
virtual hsBool Read( uint32_t numBytes, void *buffer );
virtual bool SetPosition( uint32_t numBytes );
virtual bool Read( uint32_t numBytes, void *buffer );
virtual uint32_t NumBytesLeft( void );
virtual hsBool IsValid( void ) { return ( fFileHandle != nil ) ? true : false; }
virtual bool IsValid( void ) { return ( fFileHandle != nil ) ? true : false; }
protected:
enum

View File

@ -227,7 +227,7 @@ float plOGGCodec::GetLengthInSecs( void )
return (float)ov_time_total( fOggFile, -1 );
}
hsBool plOGGCodec::SetPosition( uint32_t numBytes )
bool plOGGCodec::SetPosition( uint32_t numBytes )
{
hsAssert( IsValid(), "GetHeader() called on an invalid OGG file" );
@ -263,7 +263,7 @@ hsBool plOGGCodec::SetPosition( uint32_t numBytes )
return true;
}
hsBool plOGGCodec::Read( uint32_t numBytes, void *buffer )
bool plOGGCodec::Read( uint32_t numBytes, void *buffer )
{
hsAssert( IsValid(), "GetHeader() called on an invalid OGG file" );
// plNetClientApp::StaticDebugMsg("Ogg Read, t=%f, start", hsTimer::GetSeconds());

View File

@ -80,14 +80,14 @@ public:
virtual uint32_t GetDataSize( void ) { return fDataSize / fChannelAdjust; }
virtual float GetLengthInSecs( void );
virtual hsBool SetPosition( uint32_t numBytes );
virtual hsBool Read( uint32_t numBytes, void *buffer );
virtual bool SetPosition( uint32_t numBytes );
virtual bool Read( uint32_t numBytes, void *buffer );
virtual uint32_t NumBytesLeft( void );
virtual hsBool IsValid( void ) { return ( fOggFile != nil ) ? true : false; }
virtual bool IsValid( void ) { return ( fOggFile != nil ) ? true : false; }
static void SetDecodeFormat( DecodeFormat f ) { fDecodeFormat = f; }
static void SetDecodeFlag( uint8_t flag, hsBool on ) { if( on ) fDecodeFlags |= flag; else fDecodeFlags &= ~flag; }
static void SetDecodeFlag( uint8_t flag, bool on ) { if( on ) fDecodeFlags |= flag; else fDecodeFlags &= ~flag; }
static uint8_t GetDecodeFlags( void ) { return fDecodeFlags; }
void ResetWaveHeaderRef() { fCurHeaderPos = 0; }
void BuildActualWaveHeader();

View File

@ -71,7 +71,7 @@ static void GetFullPath( const char filename[], char *destStr )
// Makes sure the sound is ready to load without any extra processing (like
// decompression or the like), then opens a reader for it.
// fullpath tells the function whether to append 'sfx' to the path or not (we don't want to do this if were providing the full path)
static plAudioFileReader *CreateReader( hsBool fullpath, const char filename[], plAudioFileReader::StreamType type, plAudioCore::ChannelSelect channel )
static plAudioFileReader *CreateReader( bool fullpath, const char filename[], plAudioFileReader::StreamType type, plAudioCore::ChannelSelect channel )
{
char path[512];
if(fullpath) GetFullPath(filename, path);
@ -507,7 +507,7 @@ plSoundBuffer::ELoadReturnVal plSoundBuffer::EnsureInternal()
}
//// IGrabHeaderInfo /////////////////////////////////////////////////////////
hsBool plSoundBuffer::IGrabHeaderInfo( void )
bool plSoundBuffer::IGrabHeaderInfo( void )
{
static char path[ 512 ];
@ -543,7 +543,7 @@ hsBool plSoundBuffer::IGrabHeaderInfo( void )
// Makes sure the sound is ready to load without any extra processing (like
// decompression or the like), then opens a reader for it.
// fullpath tells the function whether to append 'sfx' to the path or not (we don't want to do this if were providing the full path)
plAudioFileReader *plSoundBuffer::IGetReader( hsBool fullpath )
plAudioFileReader *plSoundBuffer::IGetReader( bool fullpath )
{
char path[512];
if(fullpath) IGetFullPath(path);

View File

@ -97,12 +97,12 @@ public:
void SetDataLength(unsigned length) { fDataLength = length; }
void *GetData( void ) const { return fData; }
const char *GetFileName( void ) const { return fFileName; }
hsBool IsValid( void ) const { return fValid; }
bool IsValid( void ) const { return fValid; }
float GetDataLengthInSecs( void ) const;
void SetFileName( const char *name );
hsBool HasFlag( uint32_t flag ) { return ( fFlags & flag ) ? true : false; }
void SetFlag( uint32_t flag, hsBool yes = true ) { if( yes ) fFlags |= flag; else fFlags &= ~flag; }
bool HasFlag( uint32_t flag ) { return ( fFlags & flag ) ? true : false; }
void SetFlag( uint32_t flag, bool yes = true ) { if( yes ) fFlags |= flag; else fFlags &= ~flag; }
// Must be called until return value is kSuccess. starts an asynchronous load first time called. returns kSuccess when finished.
ELoadReturnVal AsyncLoad( plAudioFileReader::StreamType type, unsigned length = 0 );
@ -133,12 +133,12 @@ protected:
void IInitBuffer();
hsBool IGrabHeaderInfo( void );
bool IGrabHeaderInfo( void );
void IAddBuffers( void *base, void *toAdd, uint32_t lengthInBytes, uint8_t bitsPerSample );
void IGetFullPath( char *destStr );
uint32_t fFlags;
hsBool fValid;
bool fValid;
uint32_t fDataRead;
char *fFileName;
@ -154,7 +154,7 @@ protected:
plAudioFileReader::StreamType fStreamType;
// for plugins only
plAudioFileReader *IGetReader( hsBool fullpath );
plAudioFileReader *IGetReader( bool fullpath );
};

View File

@ -67,7 +67,7 @@ public:
protected:
uint8_t *fData;
uint32_t fNumSamples, fSampleSize, fStride;
hsBool fOwnsData;
bool fOwnsData;
};
#endif //_plSoundDeswizzler_h

View File

@ -950,7 +950,7 @@ CWaveFile::CWaveFile( const char *path, plAudioCore::ChannelSelect whichChan )
// Just a stub--do nothing
}
hsBool CWaveFile::OpenForWriting( const char *path, plWAVHeader &header )
bool CWaveFile::OpenForWriting( const char *path, plWAVHeader &header )
{
fHeader = header;
@ -991,13 +991,13 @@ float CWaveFile::GetLengthInSecs( void )
return 0.f;
}
hsBool CWaveFile::SetPosition( uint32_t numBytes )
bool CWaveFile::SetPosition( uint32_t numBytes )
{
hsAssert( false, "Unsupported" );
return false;
}
hsBool CWaveFile::Read( uint32_t numBytes, void *buffer )
bool CWaveFile::Read( uint32_t numBytes, void *buffer )
{
hsAssert( false, "Unsupported" );
return false;
@ -1016,7 +1016,7 @@ uint32_t CWaveFile::Write( uint32_t bytes, void *buffer )
return (uint32_t)written;
}
hsBool CWaveFile::IsValid( void )
bool CWaveFile::IsValid( void )
{
return true;
}

View File

@ -93,18 +93,18 @@ public:
// Overloads for plAudioFileReader
CWaveFile( const char *path, plAudioCore::ChannelSelect whichChan );
virtual hsBool OpenForWriting( const char *path, plWAVHeader &header );
virtual bool OpenForWriting( const char *path, plWAVHeader &header );
virtual plWAVHeader &GetHeader( void );
virtual void Close( void );
virtual uint32_t GetDataSize( void );
virtual float GetLengthInSecs( void );
virtual hsBool SetPosition( uint32_t numBytes );
virtual hsBool Read( uint32_t numBytes, void *buffer );
virtual bool SetPosition( uint32_t numBytes );
virtual bool Read( uint32_t numBytes, void *buffer );
virtual uint32_t NumBytesLeft( void );
virtual uint32_t Write( uint32_t bytes, void *buffer );
virtual hsBool IsValid( void );
virtual bool IsValid( void );
WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure
HMMIO m_hmmio; // MM I/O handle for the WAVE
MMCKINFO m_ck; // Multimedia RIFF chunk

View File

@ -175,7 +175,7 @@ int plAGAnim::AddApplicator(plAGApplicator *app)
// RemoveApplicator ------------------------
// -----------------
hsBool plAGAnim::RemoveApplicator(int index)
bool plAGAnim::RemoveApplicator(int index)
{
hsAssert(index < fApps.size(), "Out of range index for plAGAnim::RemoveApp()");
@ -299,7 +299,7 @@ plAGAnim * plAGAnim::FindAnim(const plString &name)
// RemoveAnim -------------------------------
// -----------
hsBool plAGAnim::RemoveAnim(const plString &name)
bool plAGAnim::RemoveAnim(const plString &name)
{
plAnimMap::iterator i = fAllAnims.find(name);
@ -328,7 +328,7 @@ void plAGAnim::DumpAnimationRegistry()
// SharesPinsWith -----------------------------------------
// ---------------
hsBool plAGAnim::SharesPinsWith(const plAGAnim *anim) const
bool plAGAnim::SharesPinsWith(const plAGAnim *anim) const
{
int i, j;
for (i = 0; i < fApps.size(); i++)
@ -394,10 +394,10 @@ void plATCAnim::Read(hsStream *stream, hsResMgr *mgr)
plAGAnim::Read(stream, mgr);
fInitial = stream->ReadLEScalar();
fAutoStart = stream->Readbool();
fAutoStart = stream->ReadBool();
fLoopStart = stream->ReadLEScalar();
fLoopEnd = stream->ReadLEScalar();
fLoop = stream->Readbool();
fLoop = stream->ReadBool();
fEaseInType = stream->ReadByte();
fEaseInMin = stream->ReadLEScalar();
@ -438,10 +438,10 @@ void plATCAnim::Write(hsStream *stream, hsResMgr *mgr)
plAGAnim::Write(stream, mgr);
stream->WriteLEScalar(fInitial);
stream->Writebool(fAutoStart);
stream->WriteBool(fAutoStart);
stream->WriteLEScalar(fLoopStart);
stream->WriteLEScalar(fLoopEnd);
stream->Writebool(fLoop);
stream->WriteBool(fLoop);
stream->WriteByte(fEaseInType);
stream->WriteLEScalar(fEaseInMin);

View File

@ -134,7 +134,7 @@ public:
/** Remove the ith applicator and its associated channel. Existing applicators
will be renumbered. */
hsBool RemoveApplicator(int appNum);
bool RemoveApplicator(int appNum);
/** The name of the animation. This name is used in the avatar manager to reference
animations. Animations are generally indexed by name when they are loaded
@ -164,7 +164,7 @@ public:
/** Returns true if any applicator on the arg anim tries to use the
same pin (on the same object) as we do. */
hsBool SharesPinsWith(const plAGAnim *anim) const;
bool SharesPinsWith(const plAGAnim *anim) const;
// PLASMA PROTOCOL
@ -181,7 +181,7 @@ public:
global animation registry. */
static plAGAnim *FindAnim(const plString &name);
/** Remove the given animation from the registry. */
static hsBool RemoveAnim(const plString &name);
static bool RemoveAnim(const plString &name);
/** Clear the animation cache. Used when resetting the client
to a vanilla state, as when clearing the scene while
exporting. */
@ -243,7 +243,7 @@ public:
/** Does this animation start automatically when it's applied? */
virtual bool GetAutoStart() const { return fAutoStart; }
void SetAutoStart(hsBool start) { fAutoStart = (start != 0); }
void SetAutoStart(bool start) { fAutoStart = (start != 0); }
/** If the animation loops, this is where it will restart the loop. Note that
loops do not have to start at the beginning of the animation. */
@ -258,7 +258,7 @@ public:
/** Does this animation loop?. Note that there may be multiple loop segments defined
within a given animation. */
virtual bool GetLoop() const { return fLoop; }
void SetLoop(hsBool loop) { fLoop = (loop != 0); }
void SetLoop(bool loop) { fLoop = (loop != 0); }
/** Set the curve type for easing in. Easing is an optional feature which allows you
to make an animation slow down gradually when you stop it.

View File

@ -91,7 +91,7 @@ extern const char *gGlobalChannelName = nil;
// ctor -------------------------------------------------------------------
// -----
plAGAnimInstance::plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master,
float blend, uint16_t blendPriority, hsBool cache,
float blend, uint16_t blendPriority, bool cache,
bool useAmplitude)
: fAnimation(anim),
fMaster(master),
@ -214,7 +214,7 @@ void plAGAnimInstance::IRegisterDetach(const plString &channelName, plAGChannel
// SetCurrentTime ---------------------------------------------------------------
// ---------------
void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */)
void plAGAnimInstance::SetCurrentTime(float localT, bool jump /* = false */)
{
if (fTimeConvert)
fTimeConvert->SetCurrentAnimTime(localT, jump);
@ -222,7 +222,7 @@ void plAGAnimInstance::SetCurrentTime(float localT, hsBool jump /* = false */)
// SeekRelative ------------------------------------
// -------------
void plAGAnimInstance::SeekRelative (float delta, hsBool jump)
void plAGAnimInstance::SeekRelative (float delta, bool jump)
{
if(fTimeConvert)
{
@ -333,7 +333,7 @@ plString plAGAnimInstance::GetName()
// SetLoop ----------------------------------
// --------
void plAGAnimInstance::SetLoop(hsBool status)
void plAGAnimInstance::SetLoop(bool status)
{
if (fTimeConvert)
fTimeConvert->Loop(status);
@ -341,7 +341,7 @@ void plAGAnimInstance::SetLoop(hsBool status)
// HandleCmd ----------------------------------------
// ----------
hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
bool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
{
if (fTimeConvert)
return fTimeConvert->HandleCmd(msg);
@ -350,7 +350,7 @@ hsBool plAGAnimInstance::HandleCmd(plAnimCmdMsg *msg)
// IsFinished -----------------------
// -----------
hsBool plAGAnimInstance::IsFinished()
bool plAGAnimInstance::IsFinished()
{
if (fTimeConvert)
return fTimeConvert->IsStopped();
@ -359,7 +359,7 @@ hsBool plAGAnimInstance::IsFinished()
// IsAtEnd -----------------------
// --------
hsBool plAGAnimInstance::IsAtEnd()
bool plAGAnimInstance::IsAtEnd()
{
if(fTimeConvert)
{
@ -452,7 +452,7 @@ void plAGAnimInstance::ProcessFade(float elapsed)
// ICalcFade ---------------------------------------------------------------------
// ----------
float plAGAnimInstance::ICalcFade(hsBool &fade, float curVal, float goal,
float plAGAnimInstance::ICalcFade(bool &fade, float curVal, float goal,
float rate, float elapsed)
{
float newVal;

View File

@ -98,7 +98,7 @@ public:
This attaches the animation channels to the channels of
the master modifier and creates all the bookkeeping structures
necessary to undo it later. */
plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, hsBool cache, bool useAmplitude);
plAGAnimInstance(plAGAnim * anim, plAGMasterMod * master, float blend, uint16_t blendPriority, bool cache, bool useAmplitude);
/** Destructor. Removes the animation from the scene objects it's attached to. */
virtual ~plAGAnimInstance();
@ -141,10 +141,10 @@ public:
/** Make this animation loop (or not.) Note that the instance can loop
or not without regard to whether the plAGAnim it is based on loops. */
void SetLoop(hsBool status);
void SetLoop(bool status);
/** Interpret and respond to an animation command message. /sa plAnimCmdMsg */
hsBool HandleCmd(plAnimCmdMsg *msg);
bool HandleCmd(plAnimCmdMsg *msg);
/** Start playback of the animation. You may optionally provide the a world
time, which is needed for synchronizing the animation's timeline
@ -159,14 +159,14 @@ public:
Note that this time is in animation local time, not global time.
The "jump" parameter specifies whether or not to fire callbacks
that occur between the current time and the target time. */
void SetCurrentTime(float newLocalTime, hsBool jump = false);
void SetCurrentTime(float newLocalTime, bool jump = false);
/** Move the playback head by the specified relative amount within
the animation. This may cause looping. If the beginning or end
of the animation is reached an looping is not on, the movement
will pin.
\param jump if true, don't look for callbacks between old time and TRACKED_NEW */
void SeekRelative(float delta, hsBool jump);
void SeekRelative(float delta, bool jump);
/** Gradually fade the blend strength or amplitude of the animation.
\param goal is the desired blend strength
@ -186,10 +186,10 @@ public:
Primarily used to see if an animation has played all the
way to the end, but will also return true if the animation
was stopped with a stop command */
hsBool IsFinished();
bool IsFinished();
/** Is the animation playback head positioned at the end. */
hsBool IsAtEnd();
bool IsAtEnd();
/** Get the name of the underlying animation. */
plString GetName();
@ -243,16 +243,16 @@ protected:
// Each activation gets its own timeline.
plAnimTimeConvert *fTimeConvert;
hsBool fFadeBlend; /// we are fading the blend
bool fFadeBlend; /// we are fading the blend
float fFadeBlendGoal; /// what blend level we're trying to reach
float fFadeBlendRate; /// how fast are we fading in blend units per second (1 blend unit = full)
hsBool fFadeDetach; /// detach after fade is finished? (only used for blend fades)
bool fFadeDetach; /// detach after fade is finished? (only used for blend fades)
hsBool fFadeAmp; /// we are fading the amplitude
bool fFadeAmp; /// we are fading the amplitude
float fFadeAmpGoal; /// amplitude we're trying to reach
float fFadeAmpRate; /// how faster we're fading in blend units per second
float ICalcFade(hsBool &fade, float curVal, float goal, float rate, float elapsed);
float ICalcFade(bool &fade, float curVal, float goal, float rate, float elapsed);
};

View File

@ -65,7 +65,7 @@ plAGApplicator::~plAGApplicator()
{
}
void plAGApplicator::Apply(const plAGModifier *mod, double time, hsBool force)
void plAGApplicator::Apply(const plAGModifier *mod, double time, bool force)
{
if (fEnabled || force)
IApply(mod, time);
@ -112,7 +112,7 @@ plAGApplicator *plAGApplicator::CloneWithChannel(plAGChannel *channel)
return app;
}
hsBool plAGApplicator::CanBlend(plAGApplicator *app)
bool plAGApplicator::CanBlend(plAGApplicator *app)
{
uint16_t ourClass = ClassIndex();
uint16_t theirClass = app->ClassIndex();

View File

@ -111,7 +111,7 @@ public:
/** Optionally suppress the action of this applicator.
The applicator can still be forced to apply using the force
paramater of the Apply function. */
void Enable(hsBool on) { fEnabled = on; }
void Enable(bool on) { fEnabled = on; }
/** Make a shallow copy of the applicator. Keep the same input channel
but do not clone the input channel. */
@ -129,24 +129,24 @@ public:
would be effected by pulling the input channel from the other applicator,
blending it with our input channel via a new blend node, attaching that blend
node as our new input, and throwing the other applicator away. */
virtual hsBool CanBlend(plAGApplicator *app);
virtual bool CanBlend(plAGApplicator *app);
/** Combine the two applicators if possible. \sa CanBlend */
virtual plAGChannel * MergeChannel(plAGApplicator *app, plAGChannel *channel,
plScalarChannel *blend, int blendPriority);
/** \bug It makes no sense for an applicator to combine because combination always
results in a different data type, which would require a different applicator. */
virtual hsBool CanCombine(plAGApplicator *app) { return false; }
virtual bool CanCombine(plAGApplicator *app) { return false; }
/** Apply our channel's data to the scene object, via the modifier.
This is the only function that actually changes perceivable scene state. */
void Apply(const plAGModifier *mod, double time, hsBool force = false); // Apply our channel's data to the modifier
void Apply(const plAGModifier *mod, double time, bool force = false); // Apply our channel's data to the modifier
// this is pretty much a HACK to support applicators that want to stick around when
// their channel is gone so they can operate on the next channel that comes in
// the RIGHT way to do this is to make applicators support the Detach() protocol just
// like channels...
virtual hsBool AutoDelete() { return true; } // should we remove it when its input channel is gone?
virtual bool AutoDelete() { return true; } // should we remove it when its input channel is gone?
// PlOP
CLASSNAME_REGISTER( plAGApplicator );
@ -171,7 +171,7 @@ protected:
// -- members --
plAGChannel *fChannel;
hsBool fEnabled;
bool fEnabled;
plString fChannelName;
};

View File

@ -163,7 +163,7 @@ public:
/** Is the animation moving at the given world time? Takes into account
start/stop messages that haven't been applied yet, ease curves, etc. */
virtual hsBool IsStoppedAt(double wSecs) { return true; }
virtual bool IsStoppedAt(double wSecs) { return true; }
/** Detach the given channel from our graph. If this is the channel in
question, returns any upstream channels so they can be reattached.

View File

@ -98,8 +98,8 @@ void plAGMasterMod::Write(hsStream *stream, hsResMgr *mgr)
{
mgr->WriteKey(stream, fPrivateAnims[i]->GetKey());
}
stream->Writebool(fIsGrouped);
stream->Writebool(fIsGroupMaster);
stream->WriteBool(fIsGrouped);
stream->WriteBool(fIsGroupMaster);
if (fIsGroupMaster)
mgr->WriteKey(stream, fMsgForwarder->GetKey());
@ -126,8 +126,8 @@ void plAGMasterMod::Read(hsStream * stream, hsResMgr *mgr)
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kPrivateAnim);
mgr->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
}
fIsGrouped = stream->Readbool();
fIsGroupMaster = stream->Readbool();
fIsGrouped = stream->ReadBool();
fIsGroupMaster = stream->ReadBool();
if (fIsGroupMaster)
{
plGenRefMsg* msg = new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0);
@ -218,7 +218,7 @@ plProfile_CreateTimer("AnimatingPhysicals", "Animation", AnimatingPhysicals);
plProfile_CreateTimer("StoppedAnimPhysicals", "Animation", StoppedAnimPhysicals);
// IEVAL
hsBool plAGMasterMod::IEval(double secs, float del, uint32_t dirty)
bool plAGMasterMod::IEval(double secs, float del, uint32_t dirty)
{
if (fFirstEval)
{
@ -325,7 +325,7 @@ void plAGMasterMod::DumpAniGraph(const char *justThisChannel, bool optimized, do
// GETCHANNELMOD(name)
// Get the modifier that controls the channel with the given name
plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, hsBool dontCache ) const
plAGModifier * plAGMasterMod::GetChannelMod(const plString & name, bool dontCache ) const
{
plAGModifier * result = nil;
std::map<plString, plAGModifier *>::const_iterator i = fChannelMods.find(name);
@ -389,7 +389,7 @@ plAGModifier * plAGMasterMod::IFindChannelMod(const plSceneObject *SO, const plS
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim,
float blendFactor /* = 0 */,
uint16_t blendPriority /* plAGMedBlendPriority */,
hsBool cache /* = false */)
bool cache /* = false */)
{
plAGAnimInstance *instance = nil;
plAnimVector::iterator i;
@ -421,7 +421,7 @@ plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(plAGAnim *anim,
}
// ATTACHANIMATIONBLENDED(name, blend)
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, hsBool cache /* = false */)
plAGAnimInstance * plAGMasterMod::AttachAnimationBlended(const plString &name, float blendFactor /* = 0 */, uint16_t blendPriority, bool cache /* = false */)
{
plAGAnimInstance *instance = nil;
plAGAnim *anim = plAGAnim::FindAnim(name);
@ -612,7 +612,7 @@ void plAGMasterMod::DumpCurrentAnims(const char *header)
// MSGRECEIVE
// receive trigger messages
hsBool plAGMasterMod::MsgReceive(plMessage* msg)
bool plAGMasterMod::MsgReceive(plMessage* msg)
{
plAnimCmdMsg* cmdMsg;
plAGCmdMsg* agMsg;
@ -768,7 +768,7 @@ hsBool plAGMasterMod::MsgReceive(plMessage* msg)
return plModifier::MsgReceive(msg);
}
void plAGMasterMod::IRegForEval(hsBool val)
void plAGMasterMod::IRegForEval(bool val)
{
if (fNeedEval == val)
return;
@ -780,10 +780,10 @@ void plAGMasterMod::IRegForEval(hsBool val)
plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey());
}
hsBool plAGMasterMod::HasRunningAnims()
bool plAGMasterMod::HasRunningAnims()
{
int i;
hsBool needEval = false;
bool needEval = false;
for (i = 0; i < fAnimInstances.size(); i++)
{
if (!fAnimInstances[i]->IsFinished())
@ -798,7 +798,7 @@ hsBool plAGMasterMod::HasRunningAnims()
//
// Send SDL sendState msg to object's plAGMasterSDLModifier
//
hsBool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
bool plAGMasterMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
{
if(GetNumTargets() > 0 && (!fIsGrouped || fIsGroupMaster))
{

View File

@ -98,7 +98,7 @@ public:
virtual ~plAGMasterMod();
/** Find an individual plAGModifier of the given name under our control. */
plAGModifier * GetChannelMod(const plString & name, hsBool dontCache = false) const;
plAGModifier * GetChannelMod(const plString & name, bool dontCache = false) const;
/** \name Managing Animations */
// \{
@ -108,13 +108,13 @@ public:
animation will be attached at full strength. */
plAGAnimInstance *AttachAnimationBlended(plAGAnim *anim, float blendFactor = 0,
uint16_t blendPriority = kAGMedBlendPriority,
hsBool cache = false);
bool cache = false);
/** Look up the given animation by name and attach it
with the given blend factor. */
plAGAnimInstance *AttachAnimationBlended(const plString &name, float blendFactor = 0,
uint16_t blendPriority = kAGMedBlendPriority,
hsBool cache = false);
bool cache = false);
/** Play a simple anim (one that doesn't affect root) once and auto detach.
Intended for Zandi's facial animations that run seperate from the behaviors. */
@ -204,13 +204,13 @@ public:
virtual void AddTarget(plSceneObject * object);
virtual void RemoveTarget(plSceneObject * object);
hsBool MsgReceive(plMessage* msg);
bool MsgReceive(plMessage* msg);
virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream * stream, hsResMgr *mgr);
hsBool HasRunningAnims();
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
bool HasRunningAnims();
bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags);
CLASSNAME_REGISTER( plAGMasterMod );
GETINTERFACE_ANY( plAGMasterMod, plModifier );
@ -220,7 +220,7 @@ protected:
plAGModifier * ICacheChannelMod(plAGModifier *mod) const;
plAGModifier * IFindChannelMod(const plSceneObject *obj, const plString &name) const;
virtual hsBool IEval(double secs, float del, uint32_t dirty);
virtual bool IEval(double secs, float del, uint32_t dirty);
virtual void IApplyDynamic() {}; // dummy function required by base class
@ -245,9 +245,9 @@ protected:
// animations that require AnimTimeConvert state to be synched
plInstanceVector fATCAnimInstances;
hsBool fFirstEval;
hsBool fNeedEval;
void IRegForEval(hsBool val);
bool fFirstEval;
bool fNeedEval;
void IRegForEval(bool val);
// SDL modifier which sends/recvs dynamics state
plAGMasterSDLModifier *fAGMasterSDLMod;

View File

@ -69,7 +69,7 @@ plAGModifier::plAGModifier()
}
// CTOR(name)
plAGModifier::plAGModifier(const plString &name, hsBool autoApply)
plAGModifier::plAGModifier(const plString &name, bool autoApply)
: plSingleModifier(), fAutoApply(autoApply)
{
fChannelName = name;
@ -93,7 +93,7 @@ plString plAGModifier::GetChannelName() const
}
// ENABLE
void plAGModifier::Enable(hsBool val)
void plAGModifier::Enable(bool val)
{
fEnabled = val;
}
@ -126,7 +126,7 @@ void plAGModifier::Apply(double time) const
// IEVAL
// Apply our channels to our scene object
hsBool plAGModifier::IEval(double time, float delta, uint32_t dirty)
bool plAGModifier::IEval(double time, float delta, uint32_t dirty)
{
if(fAutoApply) {
// Apply(time, delta);
@ -234,7 +234,7 @@ plAGChannel * plAGModifier::MergeChannel(plAGApplicator *app,
}
// DETACHCHANNEL
hsBool plAGModifier::DetachChannel(plAGChannel * channel)
bool plAGModifier::DetachChannel(plAGChannel * channel)
{
plAppTable::iterator i = fApps.begin();

View File

@ -89,7 +89,7 @@ public:
incoming channels with this modifier. You may also supply an
autoApply parameter, which indicates whether this modifier
should apply itself every frame, or only when explicitly asked to. */
plAGModifier(const plString &name, hsBool autoApply = true);
plAGModifier(const plString &name, bool autoApply = true);
/** It's a destructor. Destroys the name passed into the constructor,
and a bunch of other stuff you don't need to know anything about. */
@ -108,7 +108,7 @@ public:
plAGChannel *MergeChannel(plAGApplicator *app, plAGChannel *chan, plScalarChannel *blend,
plAGAnimInstance *anim, int priority);
/** Remove the given channel. Will also remove the channel's applicator. */
hsBool DetachChannel(plAGChannel * channel);
bool DetachChannel(plAGChannel * channel);
/** Set the applicator for a modifier.
\deprecated */
@ -125,7 +125,7 @@ public:
/** Get the channel tied to our ith applicator */
plAGChannel * GetChannel(int i) { return fApps[i]->GetChannel(); }
void Enable(hsBool val);
void Enable(bool val);
// PERSISTENCE
virtual void Read(hsStream *stream, hsResMgr *mgr);
@ -140,13 +140,13 @@ protected:
plAppTable fApps; // the applicators (with respective channels) that we're applying to our scene object
plString fChannelName; // name used for matching animation channels to this modifier
hsBool fAutoApply; // evaluate animation automatically during IEval call
hsBool fEnabled; // if not enabled, we don't eval any of our anims
bool fAutoApply; // evaluate animation automatically during IEval call
bool fEnabled; // if not enabled, we don't eval any of our anims
// APPLYING THE ANIMATION
virtual hsBool IEval(double secs, float del, uint32_t dirty);
virtual bool IEval(double secs, float del, uint32_t dirty);
virtual hsBool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these
virtual bool IHandleCmd(plAnimCmdMsg* modMsg) { return false; } // only plAGMasterMod should handle these
virtual void IApplyDynamic() {}; // dummy function required by base class
// INTERNAL ACCESSORS FOR SCENE OBJECT INTERFACES

View File

@ -288,7 +288,7 @@ plAGAnimInstance * plAnimStage::Attach(plArmatureMod *armature, plArmatureBrain
}
// SENDNOTIFY
hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain)
bool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain)
{
// make sure the user has requested this type of notify
if(fNotify & notifyMask)
@ -326,10 +326,10 @@ hsBool plAnimStage::ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArma
}
// DETACH
hsBool plAnimStage::Detach(plArmatureMod *armature)
bool plAnimStage::Detach(plArmatureMod *armature)
{
hsBool result = false;
bool result = false;
#ifdef DEBUG_MULTISTAGE
char sbuf[256];
@ -681,7 +681,7 @@ float plAnimStage::GetLocalTime()
}
// SETLOCALTIME
void plAnimStage::SetLocalTime(float time, hsBool noCallbacks /* = false */)
void plAnimStage::SetLocalTime(float time, bool noCallbacks /* = false */)
{
fLocalTime = time;
if(fAnimInstance)
@ -766,9 +766,9 @@ void plAnimStage::Read(hsStream *stream, hsResMgr *mgr)
fRegressType = (RegressType)stream->ReadLE32();
fLoops = stream->ReadLE32();
fDoAdvanceTo = stream->Readbool();
fDoAdvanceTo = stream->ReadBool();
fAdvanceTo = stream->ReadLE32();
fDoRegressTo = stream->Readbool();
fDoRegressTo = stream->ReadBool();
fRegressTo = stream->ReadLE32();
}
@ -782,9 +782,9 @@ void plAnimStage::Write(hsStream *stream, hsResMgr *mgr)
stream->WriteLE32(fRegressType);
stream->WriteLE32(fLoops);
stream->Writebool(fDoAdvanceTo);
stream->WriteBool(fDoAdvanceTo);
stream->WriteLE32(fAdvanceTo);
stream->Writebool(fDoRegressTo);
stream->WriteBool(fDoRegressTo);
stream->WriteLE32(fRegressTo);
}
@ -795,7 +795,7 @@ void plAnimStage::SaveAux(hsStream *stream, hsResMgr *mgr)
stream->WriteLEScalar(fLocalTime);
stream->WriteLEScalar(fLength);
stream->WriteLE32(fCurLoop);
stream->Writebool(fAttached);
stream->WriteBool(fAttached);
// no ephemeral stage at the moment
}
@ -805,8 +805,6 @@ void plAnimStage::LoadAux(hsStream *stream, hsResMgr *mgr, double time)
fLocalTime = stream->ReadLEScalar();
fLength = stream->ReadLEScalar();
fCurLoop = stream->ReadLE32();
// This should actually be Readbool (lowercase), but I won't fix it since that
// would require a version change
fAttached = (stream->Readbool() != 0);
fAttached = stream->ReadBool();
}

View File

@ -194,7 +194,7 @@ public:
const plAnimStage& operator=(const plAnimStage& src);
plAGAnimInstance * Attach(plArmatureMod *armature, plArmatureBrain *brain, float initialBlend, double time);
int Detach(plArmatureMod *armature);
bool Detach(plArmatureMod *armature);
void Reset(double time, plArmatureMod *avMod, bool atStart);
void ResetAtTime(double time, float localTime, plArmatureMod *avMod);
bool MoveRelative(double worldTime, float delta, float &overage, plArmatureMod *avMod);
@ -217,7 +217,7 @@ public:
int GetLoopValue();
void SetLoopValue(int loop);
float GetLocalTime();
void SetLocalTime(float time, hsBool noCallbacks = false);
void SetLocalTime(float time, bool noCallbacks = false);
float GetLength();
void SetMod(plMultistageBehMod* p) { fMod = p; } // for returning ID#'s to python scripts:
@ -252,7 +252,7 @@ protected:
bool ITryAdvance(plArmatureMod *avMod);
bool ITryRegress(plArmatureMod *avMod);
hsBool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain);
bool ISendNotify(uint32_t notifyMask, uint32_t notifyType, plArmatureMod *armature, plArmatureBrain *brain);
char *fAnimName; // the name of our animation
uint8_t fNotify; // flags for which events will cause notification events

View File

@ -61,14 +61,14 @@ public:
void SetSurface(plSwimRegionInterface *region, float surfaceHeight);
float GetBuoyancy() { return fBuoyancy; }
hsBool IsOnGround() { return fOnGround; }
hsBool HadContacts() { return fHadContacts; }
bool IsOnGround() { return fOnGround; }
bool HadContacts() { return fHadContacts; }
protected:
void IAdjustBuoyancy();
hsBool fOnGround;
hsBool fHadContacts;
bool fOnGround;
bool fHadContacts;
float fBuoyancy;
float fSurfaceHeight;
plSwimRegionInterface *fCurrentRegion;

View File

@ -104,7 +104,7 @@ void plArmatureEffectsMgr::Write(hsStream *s, hsResMgr *mgr)
mgr->WriteKey(s, fEffects[i]->GetKey());
}
hsBool plArmatureEffectsMgr::MsgReceive(plMessage* msg)
bool plArmatureEffectsMgr::MsgReceive(plMessage* msg)
{
plEventCallbackInterceptMsg *iMsg = plEventCallbackInterceptMsg::ConvertNoRef(msg);
if (iMsg)
@ -238,7 +238,7 @@ void plArmatureEffectFootSound::Write(hsStream* s, hsResMgr* mgr)
mgr->WriteKey(s, (fMods[i] ? fMods[i]->GetKey() : nil));
}
hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
bool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
{
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
if (refMsg)
@ -260,7 +260,7 @@ hsBool plArmatureEffectFootSound::MsgReceive(plMessage* msg)
return plArmatureEffect::MsgReceive(msg);
}
hsBool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
bool plArmatureEffectFootSound::HandleTrigger(plMessage* msg)
{
plArmatureEffectMsg *eMsg = plArmatureEffectMsg::ConvertNoRef(msg);
if (eMsg)

View File

@ -62,7 +62,7 @@ class plArmatureEffectsMgr : public hsKeyedObject
{
protected:
hsTArray<plArmatureEffect *> fEffects;
hsBool fEnabled;
bool fEnabled;
public:
@ -75,7 +75,7 @@ public:
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
uint32_t GetNumEffects();
plArmatureEffect *GetEffect(uint32_t num);
@ -119,7 +119,7 @@ public:
CLASSNAME_REGISTER( plArmatureEffect );
GETINTERFACE_ANY( plArmatureEffect, hsKeyedObject );
virtual hsBool HandleTrigger(plMessage* msg) = 0;
virtual bool HandleTrigger(plMessage* msg) = 0;
virtual void Reset() {}
};
@ -149,8 +149,8 @@ public:
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
virtual hsBool HandleTrigger(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual bool HandleTrigger(plMessage* msg);
virtual void Reset();
void SetFootType(uint8_t);

View File

@ -147,9 +147,9 @@ plArmatureModBase::~plArmatureModBase()
}
}
hsBool plArmatureModBase::MsgReceive(plMessage* msg)
bool plArmatureModBase::MsgReceive(plMessage* msg)
{
hsBool result = false;
bool result = false;
plArmatureBrain *curBrain = nil;
if (fBrains.size() > 0)
@ -184,7 +184,7 @@ void plArmatureModBase::RemoveTarget(plSceneObject* so)
plAGMasterMod::RemoveTarget(so);
}
hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
bool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
{
if (IsFinal())
{
@ -193,7 +193,7 @@ hsBool plArmatureModBase::IEval(double time, float elapsed, uint32_t dirty)
plArmatureBrain *curBrain = fBrains.back();
if (curBrain)
{
hsBool result = curBrain->Apply(time, elapsed);
bool result = curBrain->Apply(time, elapsed);
if (!result)
{
PopBrain();
@ -271,7 +271,7 @@ void plArmatureModBase::AddressMessageToDescendants(const plCoordinateInterface
AddressMessageToDescendants(CI->GetChild(i), msg);
}
void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, hsBool status)
void plArmatureModBase::EnableDrawingTree(const plSceneObject *object, bool status)
{
if (!object)
return;
@ -296,7 +296,7 @@ plKey plArmatureModBase::GetWorldKey() const
return nil;
}
hsBool plArmatureModBase::ValidatePhysics()
bool plArmatureModBase::ValidatePhysics()
{
if (!fTarget)
return false;
@ -310,7 +310,7 @@ hsBool plArmatureModBase::ValidatePhysics()
return !(fWaitFlags & kNeedPhysics);
}
hsBool plArmatureModBase::ValidateMesh()
bool plArmatureModBase::ValidateMesh()
{
if (fWaitFlags & kNeedMesh)
{
@ -327,7 +327,7 @@ hsBool plArmatureModBase::ValidateMesh()
fWaitFlags |= kNeedMesh;
break;
}
hsBool visible = (i == fCurLOD ? true : false);
bool visible = (i == fCurLOD ? true : false);
EnableDrawingTree(meshObj, visible);
}
}
@ -418,7 +418,7 @@ void plArmatureModBase::LeaveAge()
}
}
hsBool plArmatureModBase::IsFinal()
bool plArmatureModBase::IsFinal()
{
return !fWaitFlags;
}
@ -447,7 +447,7 @@ void plArmatureModBase::AdjustLOD()
}
// Should always be called from AdjustLOD
hsBool plArmatureModBase::SetLOD(int iNewLOD)
bool plArmatureModBase::SetLOD(int iNewLOD)
{
if (iNewLOD >= fMeshKeys.size())
iNewLOD = fMeshKeys.size() - 1;
@ -512,14 +512,14 @@ uint8_t plArmatureModBase::GetNumLOD() const
return fMeshKeys.size();
}
void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisableReasonUnknown */)
void plArmatureModBase::EnablePhysics(bool status, uint16_t reason /* = kDisableReasonUnknown */)
{
if (status)
fDisabledPhysics &= ~reason;
else
fDisabledPhysics |= reason;
hsBool newStatus = !fDisabledPhysics;
bool newStatus = !fDisabledPhysics;
if (fController)
fController->Enable(newStatus);
@ -532,21 +532,21 @@ void plArmatureModBase::EnablePhysics(hsBool status, uint16_t reason /* = kDisab
// Disabling Kinematics (state=false) means:
// - all outside forces will affect us and collisions on
// i.e. normal enabled physical
void plArmatureModBase::EnablePhysicsKinematic(hsBool status)
void plArmatureModBase::EnablePhysicsKinematic(bool status)
{
if (fController)
fController->Kinematic(status);
}
void plArmatureModBase::EnableDrawing(hsBool status, uint16_t reason /* = kDisableReasonUnknown */)
void plArmatureModBase::EnableDrawing(bool status, uint16_t reason /* = kDisableReasonUnknown */)
{
hsBool oldStatus = !fDisabledDraw;
bool oldStatus = !fDisabledDraw;
if (status)
fDisabledDraw &= ~reason;
else
fDisabledDraw |= reason;
hsBool newStatus = !fDisabledDraw;
bool newStatus = !fDisabledDraw;
if (oldStatus == newStatus)
return;
@ -613,7 +613,7 @@ void plArmatureModBase::ICustomizeApplicator()
}
}
void plArmatureModBase::IEnableBones(int lod, hsBool enable)
void plArmatureModBase::IEnableBones(int lod, bool enable)
{
if (lod < fUnusedBones.size())
{
@ -629,7 +629,7 @@ void plArmatureModBase::IEnableBones(int lod, hsBool enable)
const char *plArmatureMod::BoneStrings[] = {"Male", "Female", "Critter", "Actor"};
float plArmatureMod::fMouseTurnSensitivity = 1.f;
hsBool plArmatureMod::fClickToTurn = true;
bool plArmatureMod::fClickToTurn = true;
void plArmatureMod::IInitDefaults()
{
@ -927,7 +927,7 @@ void plArmatureMod::UnRegisterForBehaviorNotify(plKey key)
fNotifyKeys.RemoveItem(key);
}
void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart)
void plArmatureMod::IFireBehaviorNotify(uint32_t type, bool behaviorStart)
{
if (fNotifyKeys.GetCount() > 0)
{
@ -940,7 +940,7 @@ void plArmatureMod::IFireBehaviorNotify(uint32_t type, hsBool behaviorStart)
}
}
void plArmatureMod::EnterAge(hsBool reSpawn)
void plArmatureMod::EnterAge(bool reSpawn)
{
fMidLink = false;
fAlreadyPanicLinking = false;
@ -1002,7 +1002,7 @@ void plArmatureMod::LeaveAge()
ClearInputFlags(true, false);
}
void plArmatureMod::PanicLink(hsBool playLinkOutAnim /* = true */)
void plArmatureMod::PanicLink(bool playLinkOutAnim /* = true */)
{
// console override... just go back to the beginning
if (fDontPanicLink)
@ -1065,9 +1065,9 @@ void plArmatureMod::PersonalLink()
}
}
hsBool plArmatureMod::MsgReceive(plMessage* msg)
bool plArmatureMod::MsgReceive(plMessage* msg)
{
hsBool result = false;
bool result = false;
plArmatureBrain *curBrain = nil;
if (fBrains.size() > 0)
@ -1169,8 +1169,8 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
plEnableMsg *enMsg = plEnableMsg::ConvertNoRef(msg);
if(enMsg && enMsg->Type(plEnableMsg::kDrawable))
{
hsBool enable = enMsg->Cmd(plEnableMsg::kEnable);
hsBool disable = enMsg->Cmd(plEnableMsg::kDisable);
bool enable = enMsg->Cmd(plEnableMsg::kEnable);
bool disable = enMsg->Cmd(plEnableMsg::kDisable);
hsAssert(enable != disable, "Conflicting or missing commands to enable message");
@ -1278,7 +1278,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
plLoadAvatarMsg *avLoadMsg = plLoadAvatarMsg::ConvertNoRef(msg);
if (avLoadMsg)
{
hsBool isPlayer = avLoadMsg->GetIsPlayer();
bool isPlayer = avLoadMsg->GetIsPlayer();
if (!isPlayer)
plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
@ -1406,7 +1406,7 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
return plAGMasterMod::MsgReceive(msg);
}
hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
bool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
{
// Slight change in design here...
// Avatar input control messages are only sent locally.
@ -1427,7 +1427,7 @@ hsBool plArmatureMod::IHandleControlMsg(plControlEventMsg* pMsg)
{
ControlEventCode moveCode = pMsg->GetControlCode();
hsBool flagChanged = false;
bool flagChanged = false;
if(pMsg->ControlActivated())
{
if (moveCode == B_CONTROL_TURN_TO && fClickToTurn)
@ -1543,7 +1543,7 @@ void plArmatureMod::ILinkToPersonalAge()
pMsg->Send();
}
hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
bool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
{
if (IsFinal())
{
@ -1563,7 +1563,7 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
}
else // Bookkeeping for the local player...
{
hsBool update = false;
bool update = false;
if (fOldRegionsICareAbout != fRegionsICareAbout)
{
update = true;
@ -1830,7 +1830,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey());
}
hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
bool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
{
// skip requests to synch non-avatar state
if (SDLStateName && stricmp(SDLStateName, kSDLAvatar))
@ -1849,7 +1849,7 @@ hsBool plArmatureMod::DirtySynchState(const char* SDLStateName, uint32_t synchFl
return false;
}
hsBool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags)
bool plArmatureMod::DirtyPhysicalSynchState(uint32_t synchFlags)
{
synchFlags |= plSynchedObject::kForceFullSend; // TEMP
synchFlags |= plSynchedObject::kBCastToClients;
@ -1945,12 +1945,12 @@ void plArmatureMod::NetworkSynch(double timeNow, int force)
fPendingSynch = true;
}
hsBool plArmatureMod::IsLocalAvatar()
bool plArmatureMod::IsLocalAvatar()
{
return plAvatarMgr::GetInstance()->GetLocalAvatar() == this;
}
hsBool plArmatureMod::IsLocalAI()
bool plArmatureMod::IsLocalAI()
{
// Formerly a lot of silly cached rigamaroll... Now, we'll just rely
// on the fact that one player is the game master. HACK TURD if net groups
@ -1988,7 +1988,7 @@ plLayerLinkAnimation *plArmatureMod::IFindLayerLinkAnim()
return nil;
}
hsBool plArmatureMod::ValidatePhysics()
bool plArmatureMod::ValidatePhysics()
{
if (!fTarget)
return false;
@ -2019,7 +2019,7 @@ hsBool plArmatureMod::ValidatePhysics()
}
hsBool plArmatureMod::ValidateMesh()
bool plArmatureMod::ValidateMesh()
{
if (fWaitFlags & kNeedMesh)
{
@ -2036,7 +2036,7 @@ hsBool plArmatureMod::ValidateMesh()
fWaitFlags |= kNeedMesh;
break;
}
hsBool visible = (i == fCurLOD) ? true : false;
bool visible = (i == fCurLOD) ? true : false;
EnableDrawingTree(meshObj, visible);
@ -2155,12 +2155,12 @@ void plArmatureMod::RestoreInputState()
}
hsBool plArmatureMod::GetInputFlag (int which) const
bool plArmatureMod::GetInputFlag (int which) const
{
return fMoveFlags.IsBitSet(which);
}
void plArmatureMod::SetInputFlag(int which, hsBool status)
void plArmatureMod::SetInputFlag(int which, bool status)
{
if(status)
{
@ -2170,7 +2170,7 @@ void plArmatureMod::SetInputFlag(int which, hsBool status)
}
}
hsBool plArmatureMod::HasMovementFlag() const
bool plArmatureMod::HasMovementFlag() const
{
return (fMoveFlags.IsBitSet(B_CONTROL_MOVE_FORWARD) ||
fMoveFlags.IsBitSet(B_CONTROL_MOVE_BACKWARD) ||
@ -2306,7 +2306,7 @@ void plArmatureMod::SetReverseFBOnIdle(bool val)
SetInputFlag(B_CONTROL_LADDER_INVERTED, false);
}
hsBool plArmatureMod::IsFBReversed()
bool plArmatureMod::IsFBReversed()
{
return GetInputFlag(B_CONTROL_LADDER_INVERTED);
}
@ -2409,7 +2409,7 @@ void plArmatureMod::ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *at
{
float time = -1;
hsBool isLeft = false;
bool isLeft = false;
if (markers[i].Find("SndLeftFootDown") == 0)
{
isLeft = true;
@ -2484,7 +2484,7 @@ int8_t plArmatureMod::AnimNameToIndex(const plString &name)
return result;
}
hsBool plArmatureMod::IsInStealthMode() const
bool plArmatureMod::IsInStealthMode() const
{
return (fStealthMode != plAvatarStealthModeMsg::kStealthVisible);
}
@ -2504,7 +2504,7 @@ bool plArmatureMod::IsLinkedIn()
return fIsLinkedIn;
}
hsBool plArmatureMod::ConsumeJump()
bool plArmatureMod::ConsumeJump()
{
if (!GetInputFlag(B_CONTROL_CONSUMABLE_JUMP))
return false;

View File

@ -109,28 +109,28 @@ public:
CLASSNAME_REGISTER( plArmatureModBase );
GETINTERFACE_ANY( plArmatureModBase, plAGMasterMod );
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void AddTarget(plSceneObject* so);
virtual void RemoveTarget(plSceneObject* so);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
virtual bool IEval(double secs, float del, uint32_t dirty);
virtual void Read(hsStream *stream, hsResMgr *mgr);
virtual void Write(hsStream *stream, hsResMgr *mgr);
plMatrixDifferenceApp *GetRootAnimator() { return fRootAnimator; }
plPhysicalControllerCore* GetController() const { return fController; }
plKey GetWorldKey() const;
virtual hsBool ValidatePhysics();
virtual hsBool ValidateMesh();
virtual bool ValidatePhysics();
virtual bool ValidateMesh();
virtual void PushBrain(plArmatureBrain *brain);
virtual void PopBrain();
plArmatureBrain *GetCurrentBrain() const;
plDrawable *FindDrawable() const;
virtual void LeaveAge();
virtual hsBool IsFinal();
virtual bool IsFinal();
// LOD stuff
void AdjustLOD(); // see if we need to switch to a different resolution
hsBool SetLOD(int newLOD); // switch to a different resolution
bool SetLOD(int newLOD); // switch to a different resolution
void RefreshTree(); // Resend an LOD update to all our nodes (for when geometry changes)
int AppendMeshKey(plKey meshKey);
int AppendBoneVec(plKeyVector *boneVec);
@ -147,15 +147,15 @@ public:
kDisableReasonVehicle = 0x0010,
kDisableReasonGenericBrain = 0x0020,
};
void EnablePhysics(hsBool status, uint16_t reason = kDisableReasonUnknown);
void EnablePhysicsKinematic(hsBool status);
void EnableDrawing(hsBool status, uint16_t reason = kDisableReasonUnknown);
hsBool IsPhysicsEnabled() { return fDisabledPhysics == 0; }
hsBool IsDrawEnabled() { return fDisabledDraw == 0; }
void EnablePhysics(bool status, uint16_t reason = kDisableReasonUnknown);
void EnablePhysicsKinematic(bool status);
void EnableDrawing(bool status, uint16_t reason = kDisableReasonUnknown);
bool IsPhysicsEnabled() { return fDisabledPhysics == 0; }
bool IsDrawEnabled() { return fDisabledDraw == 0; }
static void AddressMessageToDescendants(const plCoordinateInterface * CI, plMessage *msg);
static void EnableDrawingTree(const plSceneObject *object, hsBool status);
static void EnableDrawingTree(const plSceneObject *object, bool status);
static int fMinLOD; // throttle for lowest-indexed LOD
static double fLODDistance; // Distance for first LOD switch 2nd is 2x this distance (for now)
@ -163,7 +163,7 @@ public:
protected:
virtual void IFinalize();
virtual void ICustomizeApplicator();
void IEnableBones(int lod, hsBool enable);
void IEnableBones(int lod, bool enable);
// Some of these flags are only needed by derived classes, but I just want
// the one waitFlags variable.
@ -204,23 +204,23 @@ public:
CLASSNAME_REGISTER( plArmatureMod );
GETINTERFACE_ANY( plArmatureMod, plArmatureModBase );
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void AddTarget(plSceneObject* so);
virtual void RemoveTarget(plSceneObject* so);
virtual hsBool IEval(double secs, float del, uint32_t dirty);
virtual bool IEval(double secs, float del, uint32_t dirty);
virtual void Read(hsStream *stream, hsResMgr *mgr);
virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual hsBool ValidatePhysics();
virtual hsBool ValidateMesh();
virtual bool ValidatePhysics();
virtual bool ValidateMesh();
// Get or set the position of the avatar in simulation space. Set any
// arguments you don't care about to nil.
void SetPositionAndRotationSim(const hsPoint3* position, const hsQuat* rotation);
void GetPositionAndRotationSim(hsPoint3* position, hsQuat* rotation);
hsBool IsLocalAvatar();
hsBool IsLocalAI();
bool IsLocalAvatar();
bool IsLocalAI();
virtual const plSceneObject *FindBone(const plString & name) const;
virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID
virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone);
@ -229,9 +229,9 @@ public:
virtual void Spawn(double timeNow);
virtual void SpawnAt(int which, double timeNow);
virtual void EnterAge(hsBool reSpawn);
virtual void EnterAge(bool reSpawn);
virtual void LeaveAge();
virtual void PanicLink(hsBool playLinkOutAnim = true);
virtual void PanicLink(bool playLinkOutAnim = true);
virtual void PersonalLink();
virtual bool ToggleDontPanicLinkFlag() { fDontPanicLink = fDontPanicLink ? false : true; return fDontPanicLink; }
@ -249,15 +249,15 @@ public:
void IProcessQueuedInput();
void PreserveInputState();
void RestoreInputState();
hsBool GetInputFlag(int f) const;
void SetInputFlag(int which, hsBool status);
bool GetInputFlag(int f) const;
void SetInputFlag(int which, bool status);
void ClearInputFlags(bool saveAlwaysRun, bool clearBackup);
hsBool HasMovementFlag() const; // Is any *movement* input flag on?
bool HasMovementFlag() const; // Is any *movement* input flag on?
float GetTurnStrength() const;
float GetKeyTurnStrength() const;
float GetAnalogTurnStrength() const;
void SetReverseFBOnIdle(bool val);
hsBool IsFBReversed();
bool IsFBReversed();
bool ForwardKeyDown() const;
bool BackwardKeyDown() const;
@ -282,8 +282,8 @@ public:
void SynchIfLocal(double timeNow, int force); // Just physical state
void SynchInputState(uint32_t rcvID = kInvalidPlayerID);
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags );
hsBool DirtyPhysicalSynchState(uint32_t synchFlags);
bool DirtySynchState(const char* SDLStateName, uint32_t synchFlags );
bool DirtyPhysicalSynchState(uint32_t synchFlags);
plClothingOutfit *GetClothingOutfit() const { return fClothingOutfit; }
plClothingSDLModifier *GetClothingSDLMod() const { return fClothingSDLMod; }
const plSceneObject *GetClothingSO(uint8_t lod) const;
@ -310,19 +310,19 @@ public:
int RefreshDebugDisplay();
void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
void SetDebugState(hsBool state) { fDebugOn = (state != 0); }
void SetDebugState(bool state) { fDebugOn = (state != 0); }
bool GetDebugState() { return fDebugOn; }
virtual void RefreshTree() {}
hsBool IsInStealthMode() const;
bool IsInStealthMode() const;
int GetStealthLevel() const { return fStealthLevel; }
bool IsOpaque();
bool IsLinkedIn();
bool IsMidLink();
hsBool ConsumeJump(); // returns true if the jump keypress was available to consume
bool ConsumeJump(); // returns true if the jump keypress was available to consume
void SendBehaviorNotify(uint32_t type, hsBool start = true) { IFireBehaviorNotify(type,start); }
void SendBehaviorNotify(uint32_t type, bool start = true) { IFireBehaviorNotify(type,start); }
// Discovered a bug which makes these values horribly out of scale. So we do the rescale
// in the Get/Set functions for backwards compatability.
static void SetMouseTurnSensitivity(float val) { fMouseTurnSensitivity = val / 150.f; }
@ -363,7 +363,7 @@ public:
plMatrixDelayedCorrectionApplicator *fBoneRootAnimator;
static const float kAvatarInputSynchThreshold;
static hsBool fClickToTurn;
static bool fClickToTurn;
static const char *BoneStrings[];
void SetPhysicalDims(float height, float width) { fPhysHeight = height; fPhysWidth = width; }
@ -381,8 +381,8 @@ protected:
virtual void ISetupMarkerCallbacks(plATCAnim *anim, plAnimTimeConvert *atc);
void NetworkSynch(double timeNow, int force = 0);
hsBool IHandleControlMsg(plControlEventMsg* pMsg);
void IFireBehaviorNotify(uint32_t type, hsBool behaviorStart = true);
bool IHandleControlMsg(plControlEventMsg* pMsg);
void IFireBehaviorNotify(uint32_t type, bool behaviorStart = true);
void IHandleInputStateMsg(plAvatarInputStateMsg *msg);
void ILinkToPersonalAge();
int IFindSpawnOverride(void);

View File

@ -55,7 +55,7 @@ plArmatureBehavior::~plArmatureBehavior()
fAnim->Detach();
}
void plArmatureBehavior::Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index)
void plArmatureBehavior::Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index)
{
fArmature = armature;
fBrain = brain;

View File

@ -60,7 +60,7 @@ public:
plArmatureBehavior();
virtual ~plArmatureBehavior();
void Init(plAGAnim *anim, hsBool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index);
void Init(plAGAnim *anim, bool loop, plArmatureBrain *brain, plArmatureModBase *armature, uint8_t index);
virtual void Process(double time, float elapsed);
virtual void SetStrength(float val, float rate = 0.f); // default instant change
virtual float GetStrength();

View File

@ -79,7 +79,7 @@ plArmatureBrain::~plArmatureBrain()
delete fCurTask;
}
hsBool plArmatureBrain::Apply(double timeNow, float elapsed)
bool plArmatureBrain::Apply(double timeNow, float elapsed)
{
IProcessTasks(timeNow, elapsed);
fArmature->ApplyAnimations(timeNow, elapsed);
@ -99,7 +99,7 @@ void plArmatureBrain::QueueTask(plAvTask *task)
fTaskQueue.push_back(task);
}
hsBool plArmatureBrain::LeaveAge()
bool plArmatureBrain::LeaveAge()
{
if (fCurTask)
fCurTask->LeaveAge(plArmatureMod::ConvertNoRef(fArmature));
@ -115,7 +115,7 @@ hsBool plArmatureBrain::LeaveAge()
return true;
}
hsBool plArmatureBrain::IsRunningTask() const
bool plArmatureBrain::IsRunningTask() const
{
if (fCurTask)
return true;
@ -157,7 +157,7 @@ void plArmatureBrain::Read(hsStream *stream, hsResMgr *mgr)
}
// MSGRECEIVE
hsBool plArmatureBrain::MsgReceive(plMessage * msg)
bool plArmatureBrain::MsgReceive(plMessage * msg)
{
plAvTaskMsg *taskMsg = plAvTaskMsg::ConvertNoRef(msg);
if (taskMsg)
@ -192,7 +192,7 @@ void plArmatureBrain::IProcessTasks(double time, float elapsed)
}
}
hsBool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg)
bool plArmatureBrain::IHandleTaskMsg(plAvTaskMsg *msg)
{
plAvTask *task = msg->GetTask();
QueueTask(task);

View File

@ -71,25 +71,25 @@ public:
CLASSNAME_REGISTER( plArmatureBrain );
GETINTERFACE_ANY( plArmatureBrain, plCreatable );
virtual hsBool Apply(double timeNow, float elapsed);
virtual bool Apply(double timeNow, float elapsed);
virtual void Activate(plArmatureModBase *armature);
virtual void Deactivate() {}
virtual void Suspend() {}
virtual void Resume() {}
virtual void Spawn(double timeNow) {}
virtual void OnBehaviorStop(uint8_t index) {}
virtual hsBool LeaveAge();
virtual hsBool IsRunningTask() const;
virtual bool LeaveAge();
virtual bool IsRunningTask() const;
virtual void QueueTask(plAvTask *task);
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt) {}
virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream *stream, hsResMgr *mgr);
virtual hsBool MsgReceive(plMessage *msg);
virtual bool MsgReceive(plMessage *msg);
protected:
virtual void IProcessTasks(double time, float elapsed);
virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg);
virtual bool IHandleTaskMsg(plAvTaskMsg *msg);
typedef std::deque<plAvTask *> plAvTaskQueue;
plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on

View File

@ -210,9 +210,9 @@ void plAvBrainClimb::Deactivate()
}
// APPLY
hsBool plAvBrainClimb::Apply(double time, float elapsed)
bool plAvBrainClimb::Apply(double time, float elapsed)
{
hsBool result = true;
bool result = true;
IGetDesiredDirection();
@ -242,7 +242,7 @@ hsBool plAvBrainClimb::Apply(double time, float elapsed)
}
// MSGRECEIVE
hsBool plAvBrainClimb::MsgReceive(plMessage *msg)
bool plAvBrainClimb::MsgReceive(plMessage *msg)
{
plClimbMsg *climbMsg;
plLOSHitMsg *losMsg;
@ -259,7 +259,7 @@ hsBool plAvBrainClimb::MsgReceive(plMessage *msg)
}
// IHANDLECLIMBMSG
hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
{
switch(msg->fCommand)
{
@ -301,12 +301,12 @@ hsBool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
}
// IHANDLELOSMSG
hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
bool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
{
plClimbMsg::Direction blockDir = static_cast<plClimbMsg::Direction>(msg->fRequestID);
// this is a weak test because someone else could be using the same bits to mean something different
// the real strategy is that we should only receive LOS messages of our own creation
hsBool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight;
bool oneOfOurs = blockDir == plClimbMsg::kUp || blockDir == plClimbMsg::kDown || blockDir == plClimbMsg::kLeft || blockDir == plClimbMsg::kRight;
if(oneOfOurs)
{
fPhysicallyBlockedDirections |= blockDir;
@ -320,7 +320,7 @@ hsBool plAvBrainClimb::IHandleLOSMsg(plLOSHitMsg *msg)
bool plAvBrainClimb::IProcessExitStage(double time, float elapsed)
{
plAGAnimInstance *ai = fExitStage->GetAnimInstance();
hsBool animDone = ai->IsAtEnd();
bool animDone = ai->IsAtEnd();
float unused;
// if we have an exit stage running, move it instead of the base stage
@ -730,7 +730,7 @@ void plAvBrainClimb::ICalcProbeLengths()
// IInitAnimations ---------------------
// ---------------
hsBool plAvBrainClimb::IInitAnimations()
bool plAvBrainClimb::IInitAnimations()
{
fUp = new plAnimStage("WallClimbUp",
plAnimStage::kNotifyEnter, plAnimStage::kForwardAuto, plAnimStage::kBackNone, plAnimStage::kAdvanceAuto, plAnimStage::kRegressAuto,

View File

@ -98,7 +98,7 @@ public:
virtual void Activate(plArmatureModBase *avMod);
virtual void Deactivate();
virtual hsBool Apply(double timeNow, float elapsed);
virtual bool Apply(double timeNow, float elapsed);
virtual void SaveToSDL(plStateDataRecord *sdl);
virtual void LoadFromSDL(const plStateDataRecord *sdl);
@ -108,7 +108,7 @@ public:
const char *ModeStr(Mode mode);
// plasma protocol
virtual hsBool MsgReceive(plMessage *msg);
virtual bool MsgReceive(plMessage *msg);
CLASSNAME_REGISTER( plAvBrainClimb );
GETINTERFACE_ANY( plAvBrainClimb, plArmatureBrain);
@ -121,8 +121,8 @@ private:
/** Handle a climb message. Note that the "start climbing" climb message is handled
by the human brain, since there's no climb brain there to hear it, since you
(by definition) haven't started climbing yet... */
inline hsBool IHandleClimbMsg(plClimbMsg *msg);
inline hsBool IHandleLOSMsg(plLOSHitMsg *msg);
inline bool IHandleClimbMsg(plClimbMsg *msg);
inline bool IHandleLOSMsg(plLOSHitMsg *msg);
/** Allow or block dismounting in the specified direction. */
void IEnableDismount(plClimbMsg::Direction dir, bool status);
@ -159,7 +159,7 @@ private:
/** Create all our animation stage objects. Doesn't actually apply any of the animations
to the avatar yet. */
virtual hsBool IInitAnimations();
virtual bool IInitAnimations();
/** Find the animation stage corresponding with a mode */
plAnimStage * IGetStageFromMode(Mode mode);

View File

@ -116,7 +116,7 @@ plAvBrainCoop::plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut,
// MsgReceive ----------------------------------
// -----------
hsBool plAvBrainCoop::MsgReceive(plMessage *msg)
bool plAvBrainCoop::MsgReceive(plMessage *msg)
{
plPickedMsg *pickM = plPickedMsg::ConvertNoRef(msg);
if(pickM)
@ -202,15 +202,15 @@ void plAvBrainCoop::Read(hsStream *stream, hsResMgr *mgr)
fInitiatorID = stream->ReadLE32();
fInitiatorSerial = stream->ReadLE16();
if(stream->Readbool())
if(stream->ReadBool())
{
fHostKey = mgr->ReadKey(stream);
}
if(stream->Readbool())
if(stream->ReadBool())
{
fGuestKey = mgr->ReadKey(stream);
}
fWaitingForClick = stream->Readbool();
fWaitingForClick = stream->ReadBool();
unsigned numRecipients = stream->ReadLE16();
for (unsigned i = 0; i < numRecipients; i++)
@ -229,15 +229,15 @@ void plAvBrainCoop::Write(hsStream *stream, hsResMgr *mgr)
bool hasHostKey = (fHostKey != nil);
bool hasGuestKey = (fGuestKey != nil);
stream->Writebool(hasHostKey);
stream->WriteBool(hasHostKey);
if(hasHostKey)
mgr->WriteKey(stream, fHostKey);
stream->Writebool(hasGuestKey);
stream->WriteBool(hasGuestKey);
if(hasGuestKey)
mgr->WriteKey(stream, fGuestKey);
stream->Writebool(fWaitingForClick);
stream->WriteBool(fWaitingForClick);
stream->WriteLE16(fRecipients.size());
for (unsigned i = 0; i < fRecipients.size(); i++)

View File

@ -63,7 +63,7 @@ public:
plAvBrainCoop(uint32_t exitFlags, float fadeIn, float fadeOut, MoveMode moveMode,
uint32_t initiatorID, uint16_t initiatorSerial, plKey hostKey);
hsBool MsgReceive(plMessage *msg);
bool MsgReceive(plMessage *msg);
virtual bool RelayNotifyMsg(plNotifyMsg *msg);
void EnableGuestClick();

View File

@ -81,7 +81,7 @@ public:
fAvMod(nil), fCritterBrain(nil), fName(name), fRandomStartPoint(randomStart), fFadeInLength(fadeInLength), fFadeOutLength(fadeOutLength) {}
virtual ~CritterBehavior() {}
void Init(plAGAnim* anim, hsBool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index)
void Init(plAGAnim* anim, bool loop, plAvBrainCritter* brain, plArmatureMod* body, uint8_t index)
{
plArmatureBehavior::Init(anim, loop, brain, body, index);
fAvMod = body;
@ -89,7 +89,7 @@ public:
fAnimName = anim->GetName();
}
virtual hsBool PreCondition(double time, float elapsed) {return true;}
virtual bool PreCondition(double time, float elapsed) {return true;}
float GetAnimLength() {return (fAnim->GetAnimation()->GetLength());}
void SetAnimTime(float time) {fAnim->SetCurrentTime(time, true);}
@ -152,7 +152,7 @@ plAvBrainCritter::~plAvBrainCritter()
///////////////////////////////////////////////////////////////////////////////
hsBool plAvBrainCritter::Apply(double time, float elapsed)
bool plAvBrainCritter::Apply(double time, float elapsed)
{
// update internal pathfinding variables
IEvalGoal();
@ -173,7 +173,7 @@ hsBool plAvBrainCritter::Apply(double time, float elapsed)
return plArmatureBrain::Apply(time, elapsed);
}
hsBool plAvBrainCritter::MsgReceive(plMessage* msg)
bool plAvBrainCritter::MsgReceive(plMessage* msg)
{
return plArmatureBrain::MsgReceive(msg);
}
@ -456,7 +456,7 @@ void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, char*
///////////////////////////////////////////////////////////////////////////////
hsBool plAvBrainCritter::IInitBaseAnimations()
bool plAvBrainCritter::IInitBaseAnimations()
{
// create the basic idle and run behaviors, and put them into our appropriate structures
plAGAnim* idle = fAvMod->FindCustomAnim(kDefaultIdleAnimName);

View File

@ -75,8 +75,8 @@ public:
CLASSNAME_REGISTER(plAvBrainCritter);
GETINTERFACE_ANY(plAvBrainCritter, plArmatureBrain);
hsBool Apply(double time, float elapsed);
hsBool MsgReceive(plMessage* msg);
bool Apply(double time, float elapsed);
bool MsgReceive(plMessage* msg);
virtual void Activate(plArmatureModBase* avMod);
virtual void Deactivate();
@ -140,7 +140,7 @@ public:
static bool fDrawDebug;
protected:
virtual hsBool IInitBaseAnimations();
virtual bool IInitBaseAnimations();
int IPickBehavior(int behavior) const;
int IPickBehavior(const std::string& behavior) const;

View File

@ -100,7 +100,7 @@ void plAvBrainDrive::IEnablePhysics(bool enable, plKey avKey)
}
// APPLY
hsBool plAvBrainDrive::Apply(double timeNow, float elapsed)
bool plAvBrainDrive::Apply(double timeNow, float elapsed)
{
plSceneObject * avSO = fAvMod->GetTarget(0);
float eTime = hsTimer::GetDelSysSeconds();
@ -180,7 +180,7 @@ hsBool plAvBrainDrive::Apply(double timeNow, float elapsed)
}
// IHANDLECONTROLMSG
hsBool plAvBrainDrive::MsgReceive(plMessage* msg)
bool plAvBrainDrive::MsgReceive(plMessage* msg)
{
plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg);
if(ctrlMsg)

View File

@ -81,12 +81,12 @@ public:
virtual void Deactivate();
/** Look at the key states and figure out if and how we should move */
virtual hsBool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval()
virtual bool Apply(double timeNow, float elapsed); // main control loop. called by avatar eval()
// the user brain base handles most of the details of control messages,
// so this function just looks for the special command which gets us out
// of drive mode.
virtual hsBool MsgReceive(plMessage* pMsg); // handle control input from the user
virtual bool MsgReceive(plMessage* pMsg); // handle control input from the user
CLASSNAME_REGISTER( plAvBrainDrive );
GETINTERFACE_ANY( plAvBrainDrive, plArmatureBrain );

View File

@ -75,7 +75,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plStatusLog/plStatusLog.h"
#endif
hsBool plAvBrainGeneric::fForce3rdPerson = true;
bool plAvBrainGeneric::fForce3rdPerson = true;
const float plAvBrainGeneric::kDefaultFadeIn = 6.f; // 1/6th of a second to fade in
const float plAvBrainGeneric::kDefaultFadeOut = 0.f; // instant fade out.
@ -218,7 +218,7 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod)
fAvMod->SetReverseFBOnIdle(true);
}
hsBool plAvBrainGeneric::IsRunningTask()
bool plAvBrainGeneric::IsRunningTask()
{
if ( fStages->size() > 0 )
return true;
@ -242,9 +242,9 @@ bool plAvBrainGeneric::MatchAnimNames(const char *names[], int count)
// Apply ----------------------------------------------------
// ------
hsBool plAvBrainGeneric::Apply(double time, float elapsed)
bool plAvBrainGeneric::Apply(double time, float elapsed)
{
hsBool result = false;
bool result = false;
switch(fMode)
{
@ -345,7 +345,7 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed)
plAnimStage::ForwardType forward = curStage->GetForwardType();
plAnimStage::BackType back = curStage->GetBackType();
bool fwdIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->BackwardKeyDown() : fAvMod->ForwardKeyDown();
hsBool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown();
bool backIsDown = (fReverseFBControlsOnRelease && fAvMod->IsFBReversed()) ? fAvMod->ForwardKeyDown() : fAvMod->BackwardKeyDown();
// forward with a key down gets top priority
if(forward == plAnimStage::kForwardKey && fwdIsDown)
@ -372,14 +372,14 @@ float plAvBrainGeneric::IGetAnimDelta(double time, float elapsed)
// IProcessNormal -------------------------------------------------
// ---------------
hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
bool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
{
plAnimStage *curStage = (*fStages)[fCurStage];
if(curStage)
{
float animDelta = IGetAnimDelta(time, elapsed); // how far to move the anim (may be negative)
float overage;
hsBool done = curStage->MoveRelative(time, animDelta, overage, fAvMod);
bool done = curStage->MoveRelative(time, animDelta, overage, fAvMod);
if(done)
{
@ -404,7 +404,7 @@ hsBool plAvBrainGeneric::IProcessNormal(double time, float elapsed)
// IProcessFadeIn -------------------------------------------------
// ---------------
hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
bool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
{
plAnimStage *curStage = (*fStages)[fCurStage];
@ -437,7 +437,7 @@ hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
// IProcessFadeOut -------------------------------------------------
// ----------------
hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
bool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
{
plAnimStage *curStage = (*fStages)[fCurStage];
@ -478,7 +478,7 @@ hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
// ISwitchStages ---------------------------------------------------------------------------------------------------
// --------------
hsBool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, hsBool setTime, float newTime,
bool plAvBrainGeneric::ISwitchStages(int oldStageNum, int newStageNum, float delta, bool setTime, float newTime,
float fadeNew, float fadeOld, double worldTime)
{
#ifdef DEBUG_MULTISTAGE
@ -549,9 +549,9 @@ void plAvBrainGeneric::IExitMoveMode()
// MsgReceive -------------------------------------
// -----------
hsBool plAvBrainGeneric::MsgReceive(plMessage *msg)
bool plAvBrainGeneric::MsgReceive(plMessage *msg)
{
hsBool result = false;
bool result = false;
plAvBrainGenericMsg *genMsg = plAvBrainGenericMsg::ConvertNoRef(msg);
//plAvExitModeMsg *exitMsg = plAvExitModeMsg::ConvertNoRef(msg);
@ -589,11 +589,11 @@ hsBool plAvBrainGeneric::MsgReceive(plMessage *msg)
// IHandleGenBrainMsg -----------------------------------------------------
// -------------------
hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
{
hsBool setTime = msg->fSetTime;
bool setTime = msg->fSetTime;
float newTime = msg->fNewTime;
hsBool setDirection = msg->fSetDirection;
bool setDirection = msg->fSetDirection;
bool newDirection = msg->fNewDirection ? true : false;
double worldTime = hsTimer::GetSysSeconds();
@ -670,7 +670,7 @@ hsBool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
return true;
}
hsBool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg)
bool plAvBrainGeneric::IHandleTaskMsg(plAvTaskMsg *msg)
{
plAvTask *task = msg->GetTask();
plAvTaskBrain *brainTask = plAvTaskBrain::ConvertNoRef(task);
@ -782,7 +782,7 @@ void plAvBrainGeneric::Write(hsStream *stream, hsResMgr *mgr)
stream->WriteLE32(fType);
stream->WriteLE32(fExitFlags);
stream->WriteByte(fMode);
stream->Writebool(fForward);
stream->WriteBool(fForward);
if(fStartMessage) {
stream->WriteBool(true);
@ -826,7 +826,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr)
fType = static_cast<plAvBrainGeneric::BrainType>(stream->ReadLE32());
fExitFlags = stream->ReadLE32();
fMode = static_cast<Mode>(stream->ReadByte());
fForward = stream->Readbool();
fForward = stream->ReadBool();
if(stream->ReadBool()) {
fStartMessage = plMessage::ConvertNoRef(mgr->ReadCreatable(stream));
@ -854,7 +854,7 @@ void plAvBrainGeneric::Read(hsStream *stream, hsResMgr *mgr)
// LeaveAge ---------------------
// ---------
hsBool plAvBrainGeneric::LeaveAge()
bool plAvBrainGeneric::LeaveAge()
{
IExitMoveMode();

View File

@ -145,7 +145,7 @@ public:
/** Virtual destructor */
virtual ~plAvBrainGeneric();
static hsBool fForce3rdPerson;
static bool fForce3rdPerson;
/** Attaches our current stage and takes control of the armature. Note that
the brain may be in a "half-finished" state -- we may be receiving some
@ -154,7 +154,7 @@ public:
virtual void Activate(plArmatureModBase *avMod);
/** Advance the current stage and swap in a new stage if necessary. */
virtual hsBool Apply(double timeNow, float elapsed);
virtual bool Apply(double timeNow, float elapsed);
/** Remove all our stages and release control of the armature. */
virtual void Deactivate();
@ -168,9 +168,9 @@ public:
virtual bool RelayNotifyMsg(plNotifyMsg *msg);
/** We're leaving the age. Clean up. */
virtual hsBool LeaveAge();
virtual bool LeaveAge();
virtual hsBool IsRunningTask();
virtual bool IsRunningTask();
/** Compare the names of the anims in our stages.
Return true on a match (order matters). */
@ -256,7 +256,7 @@ public:
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
// plasma protocol
hsBool MsgReceive(plMessage *msg);
bool MsgReceive(plMessage *msg);
CLASSNAME_REGISTER( plAvBrainGeneric );
GETINTERFACE_ANY( plAvBrainGeneric, plArmatureBrain );
@ -271,19 +271,19 @@ protected:
//
/////////////////////////////////////////////////////////////////////////////////////
hsBool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg);
hsBool IHandleTaskMsg(plAvTaskMsg *msg);
bool IHandleGenBrainMsg(const plAvBrainGenericMsg *msg);
bool IHandleTaskMsg(plAvTaskMsg *msg);
bool IBrainIsCompatible(plAvBrainGeneric *otherBrain);
float IGetAnimDelta(double time, float elapsed); // how far should we move our animation this frame?
hsBool IProcessNormal(double time, float elapsed);
bool IProcessNormal(double time, float elapsed);
hsBool IProcessFadeIn(double time, float elapsed);
hsBool IProcessFadeOut(double time, float elapsed);
bool IProcessFadeIn(double time, float elapsed);
bool IProcessFadeOut(double time, float elapsed);
hsBool ISwitchStages(int oldStage, int newStage, float delta, hsBool setTime, float newTime,
bool ISwitchStages(int oldStage, int newStage, float delta, bool setTime, float newTime,
float fadeNew, float fadeOld, double worldTime);
void IEnterMoveMode(double time); // we've just entered and we're about to begin animating.

View File

@ -98,7 +98,7 @@ plAvBrainHuman::TurnCurve plAvBrainHuman::fRunTurnCurve = plAvBrainHuman::kTurnE
const float plAvBrainHuman::kAirTimePanicThreshold = 10; // seconds
void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk)
void plAvBrainHuman::SetTimeToMaxTurn(float time, bool walk)
{
if (walk)
fWalkTimeToMaxTurn = time;
@ -106,12 +106,12 @@ void plAvBrainHuman::SetTimeToMaxTurn(float time, hsBool walk)
fRunTimeToMaxTurn = time;
}
float plAvBrainHuman::GetTimeToMaxTurn(hsBool walk)
float plAvBrainHuman::GetTimeToMaxTurn(bool walk)
{
return (walk ? fWalkTimeToMaxTurn : fRunTimeToMaxTurn);
}
void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk)
void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, bool walk)
{
if (walk)
fWalkMaxTurnSpeed = radsPerSec;
@ -119,12 +119,12 @@ void plAvBrainHuman::SetMaxTurnSpeed(float radsPerSec, hsBool walk)
fRunMaxTurnSpeed = radsPerSec;
}
float plAvBrainHuman::GetMaxTurnSpeed(hsBool walk)
float plAvBrainHuman::GetMaxTurnSpeed(bool walk)
{
return (walk ? fWalkMaxTurnSpeed : fRunMaxTurnSpeed);
}
void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk)
void plAvBrainHuman::SetTurnCurve(TurnCurve curve, bool walk)
{
if (walk)
fWalkTurnCurve = curve;
@ -132,7 +132,7 @@ void plAvBrainHuman::SetTurnCurve(TurnCurve curve, hsBool walk)
fRunTurnCurve = curve;
}
plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(hsBool walk)
plAvBrainHuman::TurnCurve plAvBrainHuman::GetTurnCurve(bool walk)
{
return (walk ? fWalkTurnCurve : fRunTurnCurve);
}
@ -146,7 +146,7 @@ plAvBrainHuman::plAvBrainHuman(bool isActor /* = false */) :
{
}
hsBool plAvBrainHuman::Apply(double timeNow, float elapsed)
bool plAvBrainHuman::Apply(double timeNow, float elapsed)
{
#ifndef _DEBUG
try
@ -188,7 +188,7 @@ void plAvBrainHuman::Activate(plArmatureModBase *avMod)
plSceneObject *avSO = fAvMod->GetTarget(0);
hsBool isLocal = avSO->IsLocallyOwned();
bool isLocal = avSO->IsLocallyOwned();
if (fAvMod->GetClothingOutfit() && fAvMod->GetClothingOutfit()->fGroup != plClothingMgr::kClothingBaseNoOptions)
{
@ -366,7 +366,7 @@ void plAvBrainHuman::Resume()
plArmatureBrain::Resume();
}
hsBool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
{
ControlEventCode moveCode = msg->GetControlCode();
@ -432,7 +432,7 @@ void plAvBrainHuman::Read(hsStream *stream, hsResMgr *mgr)
fIsActor = stream->ReadBool();
}
hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
bool plAvBrainHuman::MsgReceive(plMessage * msg)
{
plControlEventMsg *ctrlMsg = plControlEventMsg::ConvertNoRef(msg);
if (ctrlMsg)
@ -490,7 +490,7 @@ hsBool plAvBrainHuman::MsgReceive(plMessage * msg)
return plArmatureBrain::MsgReceive(msg);
}
hsBool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
{
bool isStartClimb = msg->fCommand == plClimbMsg::kStartClimbing;
if(isStartClimb)
@ -596,7 +596,7 @@ float plAvBrainHuman::IGetTurnStrength(double timeNow)
return result;
}
hsBool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
bool plAvBrainHuman::IHandleTaskMsg(plAvTaskMsg *msg)
{
if(plAvSeekMsg * seekM = plAvSeekMsg::ConvertNoRef(msg))
{
@ -727,9 +727,9 @@ void plAvBrainHuman::IChatOff()
}
}
hsBool plAvBrainHuman::IInitAnimations()
bool plAvBrainHuman::IInitAnimations()
{
hsBool result = false;
bool result = false;
plAGAnim *idle = fAvMod->FindCustomAnim("Idle");
plAGAnim *walk = fAvMod->FindCustomAnim("Walk");
@ -821,7 +821,7 @@ hsBool plAvBrainHuman::IInitAnimations()
return result;
}
hsBool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed)
bool plAvBrainHuman::RunStandardBehaviors(double timeNow, float elapsed)
{
int i;
for (i = 0; i < fBehaviors.GetCount(); i++)
@ -866,7 +866,7 @@ void plAvBrainHuman::Spawn(double timeNow)
fAvMod->Compile(timeNow);
}
hsBool plAvBrainHuman::LeaveAge()
bool plAvBrainHuman::LeaveAge()
{
plPhysicalControllerCore* controller = fAvMod->GetController();
if(!controller->BehavingLikeAnAnimatedPhysical())
@ -958,7 +958,7 @@ plHBehavior::~plHBehavior()
{
}
void plHBehavior::Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain,
void plHBehavior::Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain,
plArmatureMod *body, float fadeIn, float fadeOut,
uint8_t index, uint32_t type /* = 0 */)
{
@ -1008,7 +1008,7 @@ void Idle::IStart()
}
}
hsBool Run::PreCondition(double time, float elapsed)
bool Run::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1019,7 +1019,7 @@ hsBool Run::PreCondition(double time, float elapsed)
return false;
}
hsBool Walk::PreCondition(double time, float elapsed)
bool Walk::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1030,7 +1030,7 @@ hsBool Walk::PreCondition(double time, float elapsed)
return false;
}
hsBool WalkBack::PreCondition(double time, float elapsed)
bool WalkBack::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1041,7 +1041,7 @@ hsBool WalkBack::PreCondition(double time, float elapsed)
return false;
}
hsBool StepLeft::PreCondition(double time, float elapsed)
bool StepLeft::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1053,7 +1053,7 @@ hsBool StepLeft::PreCondition(double time, float elapsed)
return false;
}
hsBool StepRight::PreCondition(double time, float elapsed)
bool StepRight::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1065,7 +1065,7 @@ hsBool StepRight::PreCondition(double time, float elapsed)
return false;
}
hsBool StandingTurnLeft::PreCondition(double time, float elapsed)
bool StandingTurnLeft::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1078,7 +1078,7 @@ hsBool StandingTurnLeft::PreCondition(double time, float elapsed)
return false;
}
hsBool StandingTurnRight::PreCondition(double time, float elapsed)
bool StandingTurnRight::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1097,7 +1097,7 @@ void MovingTurn::IStart()
fHuBrain->SetStartedTurning(hsTimer::GetSysSeconds());
}
hsBool MovingTurnLeft::PreCondition(double time, float elapsed)
bool MovingTurnLeft::PreCondition(double time, float elapsed)
{
if (fAvMod->GetTurnStrength() > 0)
{
@ -1108,7 +1108,7 @@ hsBool MovingTurnLeft::PreCondition(double time, float elapsed)
return false;
}
hsBool MovingTurnRight::PreCondition(double time, float elapsed)
bool MovingTurnRight::PreCondition(double time, float elapsed)
{
if (fAvMod->GetTurnStrength() < 0)
{
@ -1134,7 +1134,7 @@ void Jump::IStop()
plHBehavior::IStop();
}
hsBool StandingJump::PreCondition(double time, float elapsed)
bool StandingJump::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1162,7 +1162,7 @@ hsBool StandingJump::PreCondition(double time, float elapsed)
return false;
}
hsBool WalkingJump::PreCondition(double time, float elapsed)
bool WalkingJump::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1192,7 +1192,7 @@ hsBool WalkingJump::PreCondition(double time, float elapsed)
return false;
}
hsBool RunningJump::PreCondition(double time, float elapsed)
bool RunningJump::PreCondition(double time, float elapsed)
{
if (fAnim)
{
@ -1233,7 +1233,7 @@ static const float kMinAirTime = .5f;
RunningImpact::RunningImpact() : fDuration(0.0f) {}
hsBool RunningImpact::PreCondition(double time, float elapsed)
bool RunningImpact::PreCondition(double time, float elapsed)
{
if (fDuration > 0.0f)
fDuration = fDuration - elapsed;
@ -1261,7 +1261,7 @@ void RunningImpact::IStop()
GroundImpact::GroundImpact() : fDuration(0.0f) {}
hsBool GroundImpact::PreCondition(double time, float elapsed)
bool GroundImpact::PreCondition(double time, float elapsed)
{
bool result = false;
@ -1290,7 +1290,7 @@ void GroundImpact::IStop()
plHBehavior::IStop();
}
hsBool Fall::PreCondition(double time, float elapsed)
bool Fall::PreCondition(double time, float elapsed)
{
return !fHuBrain->fCallbackAction->IsOnGround() && fHuBrain->fCallbackAction->HitGroundInThisAge();
}
@ -1340,7 +1340,7 @@ void Push::Process(double time, float elapsed)
fHuBrain->fCallbackAction->SetTurnStrength(turnSpeed);
}
//hsBool PushIdle::PreCondition(double time, float elapsed)
//bool PushIdle::PreCondition(double time, float elapsed)
//{
// return (fHuBrain->fCallbackAction->GetPushingPhysical() &&
// fHuBrain->fCallbackAction->IsOnGround() &&
@ -1348,7 +1348,7 @@ void Push::Process(double time, float elapsed)
// && fAvMod->GetTurnStrength() == 0);
//}
hsBool PushWalk::PreCondition(double time, float elapsed)
bool PushWalk::PreCondition(double time, float elapsed)
{
return (fHuBrain->fCallbackAction->GetPushingPhysical() && fHuBrain->fCallbackAction->GetFacingPushingPhysical() &&
fHuBrain->fCallbackAction->IsOnGround() &&
@ -1421,7 +1421,7 @@ bool AvatarEmote(plArmatureMod *avatar, const char *emoteName)
plString fullName = avatar->MakeAnimationName(emoteName);
plAGAnim *anim = plAGAnim::FindAnim(fullName);
plEmoteAnim *emote = plEmoteAnim::ConvertNoRef(anim);
hsBool alreadyActive = avatar->FindAnimInstance(fullName) != nil;
bool alreadyActive = avatar->FindAnimInstance(fullName) != nil;
plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(avatar->FindBrainByClass(plAvBrainHuman::Index()));
// XXX

View File

@ -72,20 +72,20 @@ public:
CLASSNAME_REGISTER( plAvBrainHuman );
GETINTERFACE_ANY( plAvBrainHuman, plArmatureBrain );
virtual hsBool Apply(double timeNow, float elapsed);
virtual bool Apply(double timeNow, float elapsed);
virtual void Activate(plArmatureModBase *avMod);
virtual void Deactivate();
virtual void Suspend();
virtual void Resume();
virtual void Spawn(double timeNow);
virtual hsBool LeaveAge();
virtual bool LeaveAge();
bool IsActor() const {return fIsActor;}
void IsActor(bool isActor) {fIsActor = isActor;}
bool IsMovementZeroBlend();
void TurnToPoint(hsPoint3 point);
hsBool RunStandardBehaviors(double timeNow, float elapsed);
bool RunStandardBehaviors(double timeNow, float elapsed);
void SetStartedTurning(double when);
virtual bool IsMovingForward(); // we're either walking or running. doesn't account for sliding.
@ -96,7 +96,7 @@ public:
virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream *stream, hsResMgr *mgr);
virtual hsBool MsgReceive(plMessage *msg);
virtual bool MsgReceive(plMessage *msg);
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
// Hardwired Identifiers for all the canonical bones.
@ -154,12 +154,12 @@ public:
kHuBehaviorMax,
};
static void SetTimeToMaxTurn(float time, hsBool walk);
static float GetTimeToMaxTurn(hsBool walk);
static void SetMaxTurnSpeed(float radsPerSec, hsBool walk);
static float GetMaxTurnSpeed(hsBool walk);
static void SetTurnCurve(TurnCurve curve, hsBool walk);
static TurnCurve GetTurnCurve(hsBool walk);
static void SetTimeToMaxTurn(float time, bool walk);
static float GetTimeToMaxTurn(bool walk);
static void SetMaxTurnSpeed(float radsPerSec, bool walk);
static float GetMaxTurnSpeed(bool walk);
static void SetTurnCurve(TurnCurve curve, bool walk);
static TurnCurve GetTurnCurve(bool walk);
static const float kControlledFlightThreshold;
static const float kAirTimeThreshold;
@ -168,15 +168,15 @@ public:
protected:
plAGAnim *FindCustomAnim(const char *baseName);
virtual hsBool IHandleControlMsg(plControlEventMsg *ctrlMsg);
virtual hsBool IHandleClimbMsg(plClimbMsg *msg);
virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg);
virtual hsBool IInitAnimations();
virtual bool IHandleControlMsg(plControlEventMsg *ctrlMsg);
virtual bool IHandleClimbMsg(plClimbMsg *msg);
virtual bool IHandleTaskMsg(plAvTaskMsg *msg);
virtual bool IInitAnimations();
virtual void IInitBoneMap();
float IGetTurnStrength(double timeNow);
void IChatOn();
void IChatOff();
hsBool IValidateAnimations();
bool IValidateAnimations();
plAGModifier *fHandleAGMod; // the ag modifier that's attached to our top object
double fStartedTurning; // when did we start turning?
@ -236,9 +236,9 @@ public:
plHBehavior();
~plHBehavior();
void Init(plAGAnim *anim, hsBool loop, plAvBrainHuman *brain, plArmatureMod *body,
void Init(plAGAnim *anim, bool loop, plAvBrainHuman *brain, plArmatureMod *body,
float fadeIn, float fadeOut, uint8_t index, uint32_t type = 0);
virtual hsBool PreCondition(double time, float elapsed) { return true; }
virtual bool PreCondition(double time, float elapsed) { return true; }
uint32_t GetType() const { return fType; }
protected:
@ -264,43 +264,43 @@ class Idle : public plHBehavior
class Run : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class Walk : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class WalkBack : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class StepLeft : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class StepRight : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class StandingTurnLeft : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class StandingTurnRight : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class MovingTurn : public plHBehavior
@ -314,19 +314,19 @@ protected:
class MovingTurnLeft : public MovingTurn
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class MovingTurnRight : public MovingTurn
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class Jump : public plHBehavior
{
protected:
hsBool fReleased;
bool fReleased;
virtual void IStart();
virtual void IStop();
@ -337,26 +337,26 @@ public:
class StandingJump : public Jump
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class WalkingJump : public Jump
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class RunningJump : public Jump
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
class GroundImpact : public plHBehavior
{
public:
GroundImpact();
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
private:
virtual void IStop();
@ -367,7 +367,7 @@ class RunningImpact : public plHBehavior
{
public:
RunningImpact();
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
private:
virtual void IStop();
@ -377,7 +377,7 @@ private:
class Fall : public plHBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
virtual void Process(double time, float elapsed);
};
@ -390,13 +390,13 @@ public:
//class PushIdle : public Push
//{
//public:
// virtual hsBool PreCondition(double time, float elapsed);
// virtual bool PreCondition(double time, float elapsed);
//};
class PushWalk : public Push
{
public:
virtual hsBool PreCondition(double time, float elapsed);
virtual bool PreCondition(double time, float elapsed);
};
bool PushSimpleMultiStage(plArmatureMod *avatar, const char *enterAnim, const char *idleAnim,

View File

@ -72,7 +72,7 @@ void plAvBrainRideAnimatedPhysical::Deactivate()
{
plArmatureBrain::Deactivate();
}
hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
bool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
{
plRideAnimatedPhysMsg *ride = plRideAnimatedPhysMsg::ConvertNoRef(msg);
if(ride)
@ -88,9 +88,9 @@ hsBool plAvBrainRideAnimatedPhysical::MsgReceive(plMessage *msg)
}
return plArmatureBrain::MsgReceive(msg);
}
hsBool plAvBrainRideAnimatedPhysical::IInitAnimations()
bool plAvBrainRideAnimatedPhysical::IInitAnimations()
{
hsBool result = false;
bool result = false;
plAGAnim *idle = fAvMod->FindCustomAnim("Idle");
plAGAnim *walk = fAvMod->FindCustomAnim("Walk");
@ -180,11 +180,11 @@ hsBool plAvBrainRideAnimatedPhysical::IInitAnimations()
}
return result;
}
hsBool plAvBrainRideAnimatedPhysical::LeaveAge()
bool plAvBrainRideAnimatedPhysical::LeaveAge()
{
return plArmatureBrain::LeaveAge();
}
hsBool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed)
bool plAvBrainRideAnimatedPhysical::Apply(double timeNow, float elapsed)
{
if(this->fMode==kAbort) return false;
else return plAvBrainHuman::Apply(timeNow, elapsed);

View File

@ -56,10 +56,10 @@ public:
~plAvBrainRideAnimatedPhysical();
virtual void Activate(plArmatureModBase *avMod);
virtual void Deactivate();
virtual hsBool MsgReceive(plMessage *msg);
virtual hsBool LeaveAge();
virtual hsBool Apply(double timeNow, float elapsed);
virtual bool MsgReceive(plMessage *msg);
virtual bool LeaveAge();
virtual bool Apply(double timeNow, float elapsed);
protected:
hsBool IInitAnimations();
bool IInitAnimations();
mode fMode;
};

View File

@ -70,28 +70,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// still have effect on the armature; any messages which the top
// brain doesn't handle will propagate down to the next brain in line.
// */
// virtual hsBool Activate(plArmatureMod *avMod);
// virtual bool Activate(plArmatureMod *avMod);
//
// /** Has the brain resolved all its load-time dependencies? This is a mechanism
// to allow newly loading creatures to reach a known state before they
// are asked to load secondary state or to interact with the environment.
// */
// virtual hsBool IsReady();
// virtual bool IsReady();
//
// /** This brain has just been removed from its armature and is about to be destructed. */
// virtual hsBool Deactivate();
// virtual bool Deactivate();
//
// /** This is the top brain and it's time for it to evaluate. Called during eval
// time for the armature modifier. Only the topmost brain gets an apply
// call; others must do any necessary background work during MsgReceive. */
// virtual hsBool Apply(double timeNow, hsScalar elapsed);
// virtual bool Apply(double timeNow, hsScalar elapsed);
//
// /** Another brain has been pushed atop this brain. Drop into the background.
// We'll still receive any messages that the upper brain doesn't eat. */
// virtual hsBool Suspend();
// virtual bool Suspend();
//
// /** We were suspended, but now we're on top of the brain stack again. */
// virtual hsBool Resume();
// virtual bool Resume();
//
// // \name Spawning \{
// /** Do any necessary custom action upon spawning afresh in a new age.
@ -100,7 +100,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// virtual void Spawn(double timeNow) {};
//
// /** Custom behavior for entering an age. Binding the camera, audio source, etc. */
// virtual void EnterAge(hsBool reSpawn) {};
// virtual void EnterAge(bool reSpawn) {};
//
// /** Custom behavior for leaving an age. Free any attachments to camera, audio, etc. */
// virtual void LeaveAge() {};
@ -127,7 +127,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// virtual void SaveAux(hsStream *stream, hsResMgr *mgr);
// virtual void LoadAux(hsStream *stream, hsResMgr *mgr, double time);
//
// virtual hsBool MsgReceive(plMessage *msg);
// virtual bool MsgReceive(plMessage *msg);
//
//
//protected:
@ -139,9 +139,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// plAvTaskQueue fTaskQueue; // FIFO queue of tasks we're working on
// plAvTask *fCurTask; // the task we're working on right now
// // -- methods
// virtual hsBool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message
// virtual bool IHandleTaskMsg(plAvTaskMsg *msg); // respond to a task scheduling message
// void IProcessTasks(double time, hsScalar elapsed); // process current task and start new one if necessary
//
// hsBool fSuspended;
// bool fSuspended;
//};
//

View File

@ -91,14 +91,14 @@ public:
plSwimBehavior() : fAvMod(nil), fSwimBrain(nil) {}
virtual ~plSwimBehavior() {}
void Init(plAGAnim *anim, hsBool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index)
void Init(plAGAnim *anim, bool loop, plAvBrainSwim *brain, plArmatureMod *body, uint8_t index)
{
plArmatureBehavior::Init(anim, loop, brain, body, index);
fAvMod = body;
fSwimBrain = brain;
}
virtual hsBool PreCondition(double time, float elapsed) { return true; }
virtual bool PreCondition(double time, float elapsed) { return true; }
protected:
virtual void IStart()
@ -121,7 +121,7 @@ class SwimForward: public plSwimBehavior
{
public:
/** Walk key is down, fast key is not down */
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->ForwardKeyDown() && !fAvMod->FastKeyDown());
}
@ -130,7 +130,7 @@ public:
class SwimForwardFast: public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->ForwardKeyDown() && fAvMod->FastKeyDown());
}
@ -139,7 +139,7 @@ public:
class SwimBack : public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->BackwardKeyDown());
}
@ -152,7 +152,7 @@ class TreadWater: public plSwimBehavior
class SwimLeft : public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return ((fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) &&
!(fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) &&
@ -163,7 +163,7 @@ public:
class SwimRight : public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return ((fAvMod->StrafeRightKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnRightKeyDown())) &&
!(fAvMod->StrafeLeftKeyDown() || (fAvMod->StrafeKeyDown() && fAvMod->TurnLeftKeyDown())) &&
@ -199,7 +199,7 @@ public:
class SwimTurnLeft : public SwimTurn
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->GetTurnStrength() > 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown()));
}
@ -208,7 +208,7 @@ public:
class SwimTurnRight : public SwimTurn
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->GetTurnStrength() < 0 && (fAvMod->ForwardKeyDown() || fAvMod->BackwardKeyDown()));
}
@ -217,7 +217,7 @@ public:
class TreadTurnLeft : public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->TurnLeftKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown());
}
@ -226,7 +226,7 @@ public:
class TreadTurnRight : public plSwimBehavior
{
public:
virtual hsBool PreCondition(double time, float elapsed)
virtual bool PreCondition(double time, float elapsed)
{
return (fAvMod->TurnRightKeyDown() && !fAvMod->ForwardKeyDown() && !fAvMod->BackwardKeyDown());
}
@ -263,7 +263,7 @@ plAvBrainSwim::~plAvBrainSwim()
delete fBehaviors[i];
}
hsBool plAvBrainSwim::Apply(double time, float elapsed)
bool plAvBrainSwim::Apply(double time, float elapsed)
{
IProbeSurface();
if (fMode == kWalking)
@ -328,7 +328,7 @@ hsBool plAvBrainSwim::Apply(double time, float elapsed)
return plArmatureBrain::Apply(time, elapsed);
}
hsBool plAvBrainSwim::MsgReceive(plMessage *msg)
bool plAvBrainSwim::MsgReceive(plMessage *msg)
{
plLOSHitMsg *losHit = plLOSHitMsg::ConvertNoRef(msg);
if (losHit)
@ -495,7 +495,7 @@ void plAvBrainSwim::IStartSwimming(bool is2D)
}
}
hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
bool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
{
int i;
for (i = 0; i < fBehaviors.GetCount(); i++)
@ -515,13 +515,13 @@ hsBool plAvBrainSwim::IProcessSwimming2D(double time, float elapsed)
return true;
}
hsBool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed)
bool plAvBrainSwim::IProcessSwimming3D(double time, float elapsed)
{
fAvMod->ApplyAnimations(time, elapsed);
return true;
}
hsBool plAvBrainSwim::IInitAnimations()
bool plAvBrainSwim::IInitAnimations()
{
plAGAnim *treadWater = fAvMod->FindCustomAnim("SwimIdle");
plAGAnim *swimForward = fAvMod->FindCustomAnim("SwimSlow");
@ -631,7 +631,7 @@ void plAvBrainSwim::IProbeSurface()
fSurfaceProbeMsg->SendAndKeep();
}
hsBool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
{
ControlEventCode moveCode = msg->GetControlCode();
if (msg->ControlActivated())

View File

@ -62,12 +62,12 @@ public:
GETINTERFACE_ANY( plAvBrainSwim, plArmatureBrain );
virtual void Activate(plArmatureModBase *avMod);
hsBool Apply(double time, float elapsed);
bool Apply(double time, float elapsed);
virtual void Deactivate();
virtual void Suspend();
virtual void Resume();
virtual void DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt);
hsBool MsgReceive(plMessage *msg);
bool MsgReceive(plMessage *msg);
bool IsWalking();
bool IsWading();
bool IsSwimming();
@ -79,17 +79,17 @@ public:
protected:
void IStartWading();
void IStartSwimming(bool is2D);
hsBool IProcessSwimming2D(double time, float elapsed);
hsBool IProcessSwimming3D(double time, float elapsed);
hsBool IProcessWading(double time, float elapsed);
hsBool IProcessClimbingOut(double time, float elapsed);
hsBool IProcessBehaviors(double time, float elapsed);
bool IProcessSwimming2D(double time, float elapsed);
bool IProcessSwimming3D(double time, float elapsed);
bool IProcessWading(double time, float elapsed);
bool IProcessClimbingOut(double time, float elapsed);
bool IProcessBehaviors(double time, float elapsed);
virtual hsBool IInitAnimations();
virtual bool IInitAnimations();
bool IAttachAction();
bool IDetachAction();
void IProbeSurface();
hsBool IHandleControlMsg(plControlEventMsg* msg);
bool IHandleControlMsg(plControlEventMsg* msg);
float IGetTargetZ();
float fSurfaceDistance;

View File

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plPhysicalControllerCore.h"
// Generic geom utils.
static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat);
static float AngleRad2d (float x1, float y1, float x3, float y3);
inline hsVector3 GetYAxis(hsMatrix44 &mat)
@ -66,7 +66,7 @@ plAnimatedController::plAnimatedController(plSceneObject* rootObject, plAGApplic
{
}
void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim /* = true */)
void plAnimatedController::RecalcVelocity(double timeNow, double timePrev, bool useAnim /* = true */)
{
if (useAnim)
{
@ -120,7 +120,7 @@ plWalkingController::plWalkingController(plSceneObject* rootObject, plAGApplicat
fWalkingStrategy = nil;
}
void plWalkingController::RecalcVelocity(double timeNow, double timePrev, hsBool useAnim)
void plWalkingController::RecalcVelocity(double timeNow, double timePrev, bool useAnim)
{
if (!fHitGroundInThisAge && fController && fController->IsEnabled() && fWalkingStrategy->IsOnGround())
fHitGroundInThisAge = true; // if we're not pinned and we're not in an age yet, we are now.
@ -215,9 +215,9 @@ void plWalkingController::Update()
// double elapsed = time.asDouble() - getRefresh().asDouble();
// setRefresh(time);
//
// hsBool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned);
// bool isPhysical = !fPhysical->GetProperty(plSimulationInterface::kPinned);
// const Havok::Vector3 straightUp(0.0f, 0.0f, 1.0f);
// hsBool alreadyInAge = fHitGroundInThisAge;
// bool alreadyInAge = fHitGroundInThisAge;
//
// int numContacts = fPhysical->GetNumContacts();
// bool ground = false;
@ -490,7 +490,7 @@ static float AngleRad2d ( float x1, float y1, float x3, float y3 )
return value;
}
static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat)
static bool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prevMat, hsMatrix44 &curMat)
{
bool result = false;
@ -531,7 +531,7 @@ static hsBool LinearVelocity(hsVector3 &outputV, float elapsed, hsMatrix44 &prev
float yfabs = fabs(prev2Now.fY);
float zfabs = fabs(prev2Now.fZ);
static const float maxVel = 20.0f;
hsBool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel;
bool valid = xfabs < maxVel && yfabs < maxVel && zfabs < maxVel;
if (valid)
{
@ -552,13 +552,13 @@ static void AngularVelocity(float &outputV, float elapsed, hsMatrix44 &prevMat,
hsVector3 curForward = GetYAxis(curMat);
float angleSincePrev = AngleRad2d(curForward.fX, curForward.fY, prevForward.fX, prevForward.fY);
hsBool sincePrevSign = angleSincePrev > 0.0f;
bool sincePrevSign = angleSincePrev > 0.0f;
if (angleSincePrev > M_PI)
angleSincePrev = angleSincePrev - TWO_PI;
const hsVector3 startForward = hsVector3(0, -1.0, 0); // the Y orientation of a "resting" armature....
float angleSinceStart = AngleRad2d(curForward.fX, curForward.fY, startForward.fX, startForward.fY);
hsBool sinceStartSign = angleSinceStart > 0.0f;
bool sinceStartSign = angleSinceStart > 0.0f;
if (angleSinceStart > M_PI)
angleSinceStart = angleSinceStart - TWO_PI;

View File

@ -132,7 +132,7 @@ class plAnimatedController : public plAvatarController
public:
plAnimatedController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller);
virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true);
virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true);
void SetTurnStrength(float val) { fTurnStr = val; }
float GetTurnStrength() { return fTurnStr; }
virtual void ActivateController()=0;
@ -150,7 +150,7 @@ class plWalkingController : public plAnimatedController
public:
plWalkingController(plSceneObject* rootObject, plAGApplicator* rootApp, plPhysicalControllerCore* controller);
virtual ~plWalkingController();
virtual void RecalcVelocity(double timeNow, double timePrev, hsBool useAnim = true);
virtual void RecalcVelocity(double timeNow, double timePrev, bool useAnim = true);
void Reset(bool newAge);
bool IsControlledFlight() const { return fControlledFlight != 0; }
@ -199,8 +199,8 @@ public :
fSwimmingStrategy->SetSurface(region,surfaceHeight);
}
float GetBuoyancy() { return fSwimmingStrategy->GetBuoyancy(); }
hsBool IsOnGround() { return fSwimmingStrategy->IsOnGround(); }
hsBool HadContacts() { return fSwimmingStrategy->HadContacts();}
bool IsOnGround() { return fSwimmingStrategy->IsOnGround(); }
bool HadContacts() { return fSwimmingStrategy->HadContacts();}
void Enable(bool en){if (fController) fController->Enable(en);}
plPhysicalControllerCore* GetController(){return fController;}
virtual void ActivateController(){fSwimmingStrategy->RefreshConnectionToControllerCore();}

View File

@ -164,7 +164,7 @@ void plAvLadderMod::ITriggerSelf(plKey avKey)
}
// MSGRECEIVE
hsBool plAvLadderMod::MsgReceive(plMessage* msg)
bool plAvLadderMod::MsgReceive(plMessage* msg)
{
// Avatar is entering or exiting our detector box
plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg);
@ -337,8 +337,8 @@ void plAvLadderMod::Read(hsStream *stream, hsResMgr *mgr)
fType = stream->ReadLE32();
fLoops = stream->ReadLE32();
fGoingUp = stream->Readbool();
fEnabled = stream->Readbool();
fGoingUp = stream->ReadBool();
fEnabled = stream->ReadBool();
fLadderView.fX = stream->ReadLEScalar();
fLadderView.fY = stream->ReadLEScalar();
fLadderView.fZ = stream->ReadLEScalar();
@ -350,7 +350,7 @@ void plAvLadderMod::Write(hsStream *stream, hsResMgr *mgr)
stream->WriteLE32(fType);
stream->WriteLE32(fLoops);
stream->Writebool(fGoingUp);
stream->WriteBool(fGoingUp);
stream->WriteBool(fEnabled);
stream->WriteLEScalar(fLadderView.fX);
stream->WriteLEScalar(fLadderView.fY);

View File

@ -61,7 +61,7 @@ public:
GETINTERFACE_ANY( plAvLadderMod, plSingleModifier );
// virtual void AddTarget(plSceneObject* so) { SetTarget(so); }
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
@ -78,7 +78,7 @@ public:
void SetEnabled(bool enabled) { fEnabled = enabled; }
protected:
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return true;}
virtual bool IEval(double secs, float del, uint32_t dirty) {return true;}
bool IIsReadyToClimb();
void ITriggerSelf(plKey avKey);

View File

@ -82,11 +82,11 @@ public:
/** Start the task: set up initial conditions or wait for resources to become available.
Start will be called repeatedly until it returns true, indicating the task has begun. */
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** Run the task. Start is guaranteed to have returned true before Process() is called even once.
Returns false when the task has finished and epilogue code has been executed. */
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** Clean up the task. This is guaranteed to be called when Process returns false. */
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);

View File

@ -75,7 +75,7 @@ plAvTaskBrain::~plAvTaskBrain()
// Start ------------------------------------------------------------------------------------------
// ------
hsBool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
bool plAvTaskBrain::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
{
if(fBrain)
avatar->PushBrain(fBrain);

View File

@ -71,7 +71,7 @@ public:
virtual ~plAvTaskBrain();
// task protocol
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** dump descriptive stuff to the given debug text */

View File

@ -89,7 +89,7 @@ void MakeMatrixUpright(hsMatrix44 &mat);
#define kDefaultMaxSidleRange 4.0f
#define kDefaultMaxSidleAngle 0.2f
hsBool plAvTaskSeek::fLogProcess = false;
bool plAvTaskSeek::fLogProcess = false;
/////////////////////////////////////////////////////////////////////////////////////////
//
@ -203,7 +203,7 @@ void plAvTaskSeek::SetTarget(hsPoint3 &pos, hsPoint3 &lookAt)
// Start -----------------------------------------------------------------------------------------
// ------
hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
bool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
{
plAvBrainHuman *huBrain = plAvBrainHuman::ConvertNoRef(brain);
hsAssert(huBrain, "Seek task only works on human brains");
@ -243,7 +243,7 @@ hsBool plAvTaskSeek::Start(plArmatureMod *avatar, plArmatureBrain *brain, double
// Process -------------------------------------------------------------------------------------------
// --------
hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
bool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed)
{
if (fState == kSeekAbort)
return false;
@ -257,7 +257,7 @@ hsBool plAvTaskSeek::Process(plArmatureMod *avatar, plArmatureBrain *brain, doub
}
IAnalyze(avatar);
hsBool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed);
bool result = IMoveTowardsGoal(avatar, uBrain, time, elapsed);
if (fLogProcess)
DumpToAvatarLog(avatar);
return result;
@ -311,7 +311,7 @@ void plAvTaskSeek::LeaveAge(plArmatureMod *avatar)
// IAnalyze ----------------------------------------
// ---------
hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
bool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
{
avatar->GetPositionAndRotationSim(&fPosition, &fRotation);
hsScalarTriple tmp(fSeekPos - fPosition);
@ -350,7 +350,7 @@ hsBool plAvTaskSeek::IAnalyze(plArmatureMod *avatar)
// IMoveTowardsGoal --------------------------------------------------------------
// -----------------
hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain,
bool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain,
double time, float elapsed)
{
bool stillRunning = true;
@ -438,7 +438,7 @@ hsBool plAvTaskSeek::IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *bra
// ITRYFINISH
bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed)
{
hsBool animsDone = brain->IsMovementZeroBlend();
bool animsDone = brain->IsMovementZeroBlend();
hsPoint3 newPosition = fPosition;
hsQuat newRotation = fRotation;
@ -457,7 +457,7 @@ bool plAvTaskSeek::ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, doub
return fStillPositioning || fStillRotating || !animsDone;
}
hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
bool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
plArmatureMod *avatar, plAvBrainHuman *brain,
double time, float elapsed)
{
@ -493,7 +493,7 @@ hsBool plAvTaskSeek::IFinishPosition(hsPoint3 &newPosition,
// IFinishRotation --------------------------------------
// ----------------
hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
bool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
plArmatureMod *avatar, plAvBrainHuman *brain,
double time, float elapsed)
{
@ -504,7 +504,7 @@ hsBool plAvTaskSeek::IFinishRotation(hsQuat &newRotation,
// IUpdateObjective ----------------------------------------
// -----------------
hsBool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
bool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
{
// This is an entirely valid case. It just means our goal is fixed.
if (fSeekObject == nil)

View File

@ -56,7 +56,7 @@ class plSceneObject;
class plAvTaskSeek : public plAvTask
{
public:
static hsBool fLogProcess;
static bool fLogProcess;
enum State {
kSeekRunNormal,
@ -82,12 +82,12 @@ public:
/** Initiate the task; make sure we're running on the right type of brain, save off
user input state, and turn off any other running behaviors.*/
virtual hsBool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** Progress towards the goal using a combination of walking and cheating-via-sliding.
Returns true if we're still working on it; false if we're done. */
virtual hsBool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
virtual bool Process(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
/** Restore user input state, etc. */
virtual void Finish(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
@ -116,27 +116,27 @@ protected:
/** Make some observations about our current relation to our target.
Done every frame. */
hsBool IAnalyze(plArmatureMod *avatar);
bool IAnalyze(plArmatureMod *avatar);
/** Progress towards the goal. We get as close as we can by just pushing the same
buttons as the user (forward, turn, etc.) when we're really close we slide
around a bit so we can wind up on the *exact* initial orientation. */
hsBool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
bool IMoveTowardsGoal(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
/** Okay, we're in the pure cheating mode now. Try to wrap it up;
returns true when it's finally there. */
bool ITryFinish(plArmatureMod *avatar, plAvBrainHuman *brain, double time, float elapsed);
/** Final cheating for position */
hsBool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain,
bool IFinishPosition(hsPoint3 &newPosition, plArmatureMod *avatar, plAvBrainHuman *brain,
double time, float elapsed);
/** Final cheating for rotation */
hsBool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain,
bool IFinishRotation(hsQuat &newRotation, plArmatureMod *avatar, plAvBrainHuman *brain,
double time, float elapsed);
/** If our target's moving, cache its new position and orientation for later math */
hsBool IUpdateObjective(plArmatureMod *avatar);
bool IUpdateObjective(plArmatureMod *avatar);
/////////////////////////////////////////////////////////////////////////////////////
//
@ -163,11 +163,11 @@ protected:
// These are set to true once we EVER get close enough to the goal, so that if we fall out
// of range from the anim blend out, we don't later try and correct again, and get in a fun
// little back-and-forth loop.
hsBool fPosGoalHit;
hsBool fRotGoalHit;
bool fPosGoalHit;
bool fRotGoalHit;
hsBool fStillPositioning; // haven't yet reached the final position
hsBool fStillRotating; // haven't yet reached the final orientation
bool fStillPositioning; // haven't yet reached the final position
bool fStillRotating; // haven't yet reached the final orientation
hsVector3 fGoalVec; // vec from us to the goal
float fDistance; // how far to the goal?

View File

@ -111,7 +111,7 @@ plClothingItem::~plClothingItem()
delete [] fAccessoryName;
}
hsBool plClothingItem::CanWearWith(plClothingItem *item)
bool plClothingItem::CanWearWith(plClothingItem *item)
{
// For now, you can only wear one shirt, one pair of pants, etc.
// Except accessories, of which you're allowed one per tileset.
@ -121,7 +121,7 @@ hsBool plClothingItem::CanWearWith(plClothingItem *item)
//&& item->fTileset != fTileset));
}
hsBool plClothingItem::WearBefore(plClothingItem *item)
bool plClothingItem::WearBefore(plClothingItem *item)
{
// Accessories come last
// Face comes first
@ -142,7 +142,7 @@ hsBool plClothingItem::WearBefore(plClothingItem *item)
return myPri < otherPri;
}
hsBool plClothingItem::HasBaseAlpha()
bool plClothingItem::HasBaseAlpha()
{
int i;
for (i = 0; i < fElements.GetCount(); i++)
@ -155,7 +155,7 @@ hsBool plClothingItem::HasBaseAlpha()
return false;
}
hsBool plClothingItem::HasSameMeshes(plClothingItem *other)
bool plClothingItem::HasSameMeshes(plClothingItem *other)
{
int i;
for (i = 0; i < kMaxNumLODLevels; i++)
@ -293,7 +293,7 @@ void plClothingItem::Write(hsStream *s, hsResMgr *mgr)
}
}
hsBool plClothingItem::MsgReceive(plMessage* msg)
bool plClothingItem::MsgReceive(plMessage* msg)
{
plElementRefMsg *eMsg = plElementRefMsg::ConvertNoRef(msg);
if (eMsg)
@ -371,7 +371,7 @@ hsBool plClothingItem::MsgReceive(plMessage* msg)
/////////////////////////////////////////////////////////////////////////////
hsBool plClosetItem::IsMatch(plClosetItem *other)
bool plClosetItem::IsMatch(plClosetItem *other)
{
return (fItem == other->fItem && fOptions.IsMatch(&other->fOptions));
}
@ -407,7 +407,7 @@ void plClothingBase::Write(hsStream* s, hsResMgr* mgr)
s->WriteSafeString(fLayoutName);
}
hsBool plClothingBase::MsgReceive(plMessage* msg)
bool plClothingBase::MsgReceive(plMessage* msg)
{
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
if (refMsg)
@ -450,7 +450,7 @@ plClothingOutfit::~plClothingOutfit()
plgDispatch::Dispatch()->UnRegisterForExactType(plPreResourceMsg::Index(), GetKey());
}
void plClothingOutfit::AddItem(plClothingItem *item, hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */)
void plClothingOutfit::AddItem(plClothingItem *item, bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */)
{
if (fItems.Find(item) != fItems.kMissingIndex)
return;
@ -483,7 +483,7 @@ void plClothingOutfit::ForceUpdate(bool retry)
msg->Send(GetKey());
}
void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true */, hsBool netForce /* = false */)
void plClothingOutfit::RemoveItem(plClothingItem *item, bool update /* = true */, bool netForce /* = false */)
{
if (fItems.Find(item) == fItems.kMissingIndex)
return;
@ -502,8 +502,8 @@ void plClothingOutfit::RemoveItem(plClothingItem *item, hsBool update /* = true
}
void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, float blue,
hsBool update /* = true */, hsBool broadcast /* = true */, hsBool netForce /* = false */,
hsBool retry /* = true */, uint8_t layer /* = kLayerTint1 */)
bool update /* = true */, bool broadcast /* = true */, bool netForce /* = false */,
bool retry /* = true */, uint8_t layer /* = kLayerTint1 */)
{
plClothingMsg *msg = new plClothingMsg();
msg->AddReceiver(GetKey());
@ -526,7 +526,7 @@ void plClothingOutfit::TintItem(plClothingItem *item, float red, float green, fl
}
void plClothingOutfit::TintSkin(float red, float green, float blue,
hsBool update /* = true */, hsBool broadcast /* = true */)
bool update /* = true */, bool broadcast /* = true */)
{
plClothingMsg *msg = new plClothingMsg();
msg->AddReceiver(GetKey());
@ -541,7 +541,7 @@ void plClothingOutfit::TintSkin(float red, float green, float blue,
}
void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight,
hsBool retry /* = true */)
bool retry /* = true */)
{
plClothingMsg *msg = new plClothingMsg();
msg->AddReceiver(GetKey());
@ -555,12 +555,12 @@ void plClothingOutfit::MorphItem(plClothingItem *item, uint8_t layer, uint8_t de
plgDispatch::MsgSend(msg);
}
void plClothingOutfit::SetAge(float age, hsBool update /* = true */, hsBool broadcast /* = true */)
void plClothingOutfit::SetAge(float age, bool update /* = true */, bool broadcast /* = true */)
{
SetSkinBlend(age, plClothingElement::kLayerSkinBlend1, update, broadcast);
}
void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, hsBool update /* = true */, hsBool broadcast /* = true */)
void plClothingOutfit::SetSkinBlend(float blend, uint8_t layer, bool update /* = true */, bool broadcast /* = true */)
{
plClothingMsg *msg = new plClothingMsg();
msg->AddReceiver(GetKey());
@ -661,7 +661,7 @@ void plClothingOutfit::IRemoveItem(plClothingItem *item)
}
}
hsBool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer)
bool plClothingOutfit::ITintItem(plClothingItem *item, hsColorRGBA color, uint8_t layer)
{
uint32_t index = fItems.Find(item);
if (index != fItems.kMissingIndex)
@ -711,7 +711,7 @@ hsColorRGBA plClothingOutfit::GetItemTint(plClothingItem *item, uint8_t layer /*
return color;
}
hsBool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight)
bool plClothingOutfit::IMorphItem(plClothingItem *item, uint8_t layer, uint8_t delta, float weight)
{
uint32_t index = fItems.Find(item);
if (index != fItems.kMissingIndex)
@ -846,7 +846,7 @@ void plClothingOutfit::ReadFromVault()
rvn->DecRef();
}
void plClothingOutfit::SaveCustomizations(hsBool retry /* = true */)
void plClothingOutfit::SaveCustomizations(bool retry /* = true */)
{
plClothingMsg *msg = new plClothingMsg();
msg->AddReceiver(GetKey());
@ -1180,9 +1180,9 @@ void plClothingOutfit::WearRandomOutfit()
TintSkin(sRandom.RandZeroToOne(), sRandom.RandZeroToOne(), sRandom.RandZeroToOne());
}
hsBool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, hsBool broadcast /* = true */)
bool plClothingOutfit::ReadItems(hsStream* s, hsResMgr* mgr, bool broadcast /* = true */)
{
hsBool result = true;
bool result = true;
uint32_t numItems = s->ReadLE32();
int i;
for (i = 0; i < numItems; i++)
@ -1223,7 +1223,7 @@ void plClothingOutfit::WriteItems(hsStream *s, hsResMgr *mgr)
}
}
hsBool plClothingOutfit::MsgReceive(plMessage* msg)
bool plClothingOutfit::MsgReceive(plMessage* msg)
{
plPreResourceMsg *preMsg = plPreResourceMsg::ConvertNoRef(msg);
if (preMsg)
@ -1409,7 +1409,7 @@ hsBool plClothingOutfit::MsgReceive(plMessage* msg)
// TESTING SDL
// Send clothing sendState msg to object's plClothingSDLModifier
//
hsBool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
bool plClothingOutfit::DirtySynchState(const char* SDLStateName, uint32_t synchFlags)
{
plSynchEnabler ps(true); // make sure synching is enabled, since this happens during load
synchFlags |= plSynchedObject::kForceFullSend; // TEMP
@ -1427,7 +1427,7 @@ void plClothingOutfit::IInstanceSharedMeshes(plClothingItem *item)
if (fAvatar)
fAvatar->ValidateMesh();
hsBool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort");
bool partialSort = item->fCustomText && strstr(item->fCustomText, "NeedsSort");
int i;
for (i = 0; i < plClothingItem::kMaxNumLODLevels; i++)
{
@ -1702,7 +1702,7 @@ plClothingItem *plClothingMgr::GetLRMatch(plClothingItem *item)
return nil;
}
hsBool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2)
bool plClothingMgr::IsLRMatch(plClothingItem *item1, plClothingItem *item2)
{
if (!item1 || !item2)
return false;
@ -1775,7 +1775,7 @@ void plClothingMgr::DeInit()
}
}
hsBool plClothingMgr::MsgReceive(plMessage* msg)
bool plClothingMgr::MsgReceive(plMessage* msg)
{
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
if (refMsg)
@ -1800,7 +1800,7 @@ hsBool plClothingMgr::MsgReceive(plMessage* msg)
void plClothingMgr::IAddItem(plClothingItem *item)
{
hsBool allFound = true;
bool allFound = true;
int i, j;
for (i = 0; i < item->fElementNames.GetCount(); i++)
{

Some files were not shown because too many files have changed in this diff Show More