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

Convert custom HeadSpin integer types to standard types from stdint.h

This commit is contained in:
2012-01-19 21:19:26 -05:00
parent a0d54e2644
commit 5027b5a4ac
1301 changed files with 14497 additions and 14532 deletions

View File

@ -61,7 +61,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
hsBool plListener::fPrintDbgInfo = false;
hsBool plListener::IEval(double secs, hsScalar del, UInt32 dirty)
hsBool plListener::IEval(double secs, hsScalar del, uint32_t dirty)
{
// if (!plgAudioSys::Active())
// return true;
@ -69,7 +69,7 @@ hsBool plListener::IEval(double secs, hsScalar del, UInt32 dirty)
int y = 16 + 12, x = 400;
if( fPrintDbgInfo )
plDebugText::Instance().DrawString( x, 16, "Listener:", (UInt32)0xffffffff, plDebugText::kStyleBold );
plDebugText::Instance().DrawString( x, 16, "Listener:", (uint32_t)0xffffffff, plDebugText::kStyleBold );
// Get the avatar's SceneObject
plKey key = plNetClientMgr::GetInstance()->GetLocalPlayerKey();
@ -80,7 +80,7 @@ hsBool plListener::IEval(double secs, hsScalar del, UInt32 dirty)
{
// We don't have a position to init by, so do NOT eval yet!!!
if( fPrintDbgInfo )
plDebugText::Instance().DrawString( x, y, "Not eval-ing yet", (UInt32)0xffffffff );
plDebugText::Instance().DrawString( x, y, "Not eval-ing yet", (uint32_t)0xffffffff );
return true;
}
@ -165,7 +165,7 @@ hsBool plListener::IEval(double secs, hsScalar del, UInt32 dirty)
if( facingType == kInvalid || posType == kInvalid || velType == kInvalid )
{
if( fPrintDbgInfo )
plDebugText::Instance().DrawString( x, y, "Not eval-ing: missing one or more parameter bases", (UInt32)0xff0000ff );
plDebugText::Instance().DrawString( x, y, "Not eval-ing: missing one or more parameter bases", (uint32_t)0xff0000ff );
return true;
}
@ -184,19 +184,19 @@ hsBool plListener::IEval(double secs, hsScalar del, UInt32 dirty)
{
char str[ 256 ];
sprintf( str, "Direction: (%3.2f,%3.2f,%3.2f) from %s", dir.fX, dir.fY, dir.fZ, ( facingType == kObject ) ? pRefObject->GetKey()->GetUoid().GetObjectName() : "VCam" );
plDebugText::Instance().DrawString( x, y, str, (UInt32)0xffffffff );
plDebugText::Instance().DrawString( x, y, str, (uint32_t)0xffffffff );
y += 12;
sprintf( str, "Up: (%3.2f,%3.2f,%3.2f) from %s", up.fX, up.fY, up.fZ, ( facingType == kObject ) ? pRefObject->GetKey()->GetUoid().GetObjectName() : "VCam" );
plDebugText::Instance().DrawString( x, y, str, (UInt32)0xffffffff );
plDebugText::Instance().DrawString( x, y, str, (uint32_t)0xffffffff );
y += 12;
sprintf( str, "Position: (%3.2f,%3.2f,%3.2f) from %s", position.fX, position.fY, position.fZ, ( posType == kObject ) ? pRefObject->GetKey()->GetUoid().GetObjectName() : "VCam" );
plDebugText::Instance().DrawString( x, y, str, (UInt32)0xffffffff );
plDebugText::Instance().DrawString( x, y, str, (uint32_t)0xffffffff );
y += 12;
sprintf( str, "Velocity: (%3.2f,%3.2f,%3.2f) from %s", velocity.fX, velocity.fY, velocity.fZ, ( velType == kObject ) ? pRefObject->GetKey()->GetUoid().GetObjectName() : "VCam" );
plDebugText::Instance().DrawString( x, y, str, (UInt32)0xffffffff );
plDebugText::Instance().DrawString( x, y, str, (uint32_t)0xffffffff );
y += 12;
}
plgDispatch::MsgSend( msg );

View File

@ -63,9 +63,9 @@ public:
static void ShowDebugInfo( hsBool s ) { fPrintDbgInfo = s; }
// Get info for which object these things are attached to - camera or refObject
UInt8 GetAttachedPosType() { return (UInt8)fPosRatio; }
UInt8 GetAttachedFacingType() { return (UInt8)fFacingRatio; }
UInt8 GetAttachedVelType() { return (UInt8)fVelRatio; }
uint8_t GetAttachedPosType() { return (uint8_t)fPosRatio; }
uint8_t GetAttachedFacingType() { return (uint8_t)fFacingRatio; }
uint8_t GetAttachedVelType() { return (uint8_t)fVelRatio; }
enum
{
@ -88,7 +88,7 @@ protected:
static hsBool fPrintDbgInfo;
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty);
virtual hsBool IEval(double secs, hsScalar del, uint32_t dirty);
void ISetRef( const plKey &ref, hsBool binding, int type );
void ICheckAudio( void ) const;

View File

@ -66,7 +66,7 @@ void plRandomSoundModGroup::Read(hsStream *s)
{
fNumSounds = s->ReadLE16();
fGroupedIdx = s->ReadLE16();
fIndices = TRACKED_NEW UInt16[fNumSounds];
fIndices = TRACKED_NEW uint16_t[fNumSounds];
int i;
for (i = 0; i < fNumSounds; i++)
@ -127,7 +127,7 @@ void plRandomSoundMod::IStop()
else
{
if(fCurrent == -1) return;
UInt16 currentSndIdx = ( fGroups != nil ) ? fGroups[fCurrentGroup].fIndices[fCurrent] : fActiveList[fCurrent];
uint16_t currentSndIdx = ( fGroups != nil ) ? fGroups[fCurrentGroup].fIndices[fCurrent] : fActiveList[fCurrent];
plSoundMsg* snd = TRACKED_NEW plSoundMsg(GetKey(), GetTarget()->GetKey(), nil);
snd->SetCmd(plSoundMsg::kStop);
snd->fIndex = currentSndIdx;
@ -151,7 +151,7 @@ void plRandomSoundMod::IPlayNext()
}
int i;
UInt16 currentSndIdx;
uint16_t currentSndIdx;
int nSounds = (fGroups == nil ? ai->GetNumSounds() : fGroups[fCurrentGroup].fNumSounds);
fEndTimes.ExpandAndZero(nSounds);
plSound *pSound = nil;
@ -276,7 +276,7 @@ void plRandomSoundMod::IPlayNext()
}
}
void plRandomSoundMod::SetCurrentGroup(UInt16 group)
void plRandomSoundMod::SetCurrentGroup(uint16_t group)
{
hsAssert(group < fNumGroups, "Setting an invalid group on a random sound modifier");
@ -319,7 +319,7 @@ void plRandomSoundMod::Write(hsStream *s, hsResMgr *mgr)
void plRandomSoundMod::ForceSoundLoadState( hsBool loaded )
{
UInt16 i, j;
uint16_t i, j;
plAudioInterface* ai = IGetTargetAudioInterface(0);
if( ai == nil )

View File

@ -51,10 +51,10 @@ class plRandomSoundModGroup
{
public:
hsBitVector fExcluded;
Int8 fCurrent;
UInt16 fNumSounds;
UInt16 *fIndices;
Int16 fGroupedIdx; // Only used if we point to a groupedSound, in which case fIndices are indices into
int8_t fCurrent;
uint16_t fNumSounds;
uint16_t *fIndices;
int16_t fGroupedIdx; // Only used if we point to a groupedSound, in which case fIndices are indices into
// that sound. -1 if unused.
plRandomSoundModGroup();
@ -67,10 +67,10 @@ public:
class plRandomSoundMod : public plRandomCommandMod
{
protected:
UInt16 fCurrentGroup;
UInt16 fNumGroups;
uint16_t fCurrentGroup;
uint16_t fNumGroups;
plRandomSoundModGroup *fGroups;
std::vector<UInt16> fActiveList; // list of sounds we're allowed to choose
std::vector<uint16_t> fActiveList; // list of sounds we're allowed to choose
int fOldPriority; // old sound priority
hsBool fFirstTimePlay;
@ -91,14 +91,14 @@ public:
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
void SetCurrentGroup(UInt16 group);
void SetCurrentGroup(uint16_t group);
void ForceSoundLoadState( hsBool loaded );
hsBool MsgReceive(plMessage* msg);
float GetVolume();
// EXPORT ONLY
void SetGroupInfo(UInt16 numGroups, plRandomSoundModGroup *groups) { fNumGroups = numGroups; fGroups = groups; }
void SetGroupInfo(uint16_t numGroups, plRandomSoundModGroup *groups) { fNumGroups = numGroups; fGroups = groups; }
};
#endif // plRandomSoundMod_inc