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

Fix Endian functions names in hsTypes and hsStream.

Function and macro names for endianness were previously vague,
and on big-endian systems entirely misleading.  The names are
now properly descriptive of what they actually do.
This commit is contained in:
2011-10-23 14:01:54 -07:00
committed by Darryl Pogue
parent ab37a4a486
commit e462ef04b3
255 changed files with 2676 additions and 2676 deletions

View File

@ -220,12 +220,12 @@ hsBool plCollisionDetector::MsgReceive(plMessage* msg)
void plCollisionDetector::Read(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Read(stream, mgr);
stream->ReadSwap(&fType);
stream->ReadLE(&fType);
}
void plCollisionDetector::Write(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Write(stream, mgr);
stream->WriteSwap(fType);
stream->WriteLE(fType);
}
/////////////////////////////////
@ -371,7 +371,7 @@ hsBool plCameraRegionDetector::MsgReceive(plMessage* msg)
void plCameraRegionDetector::Read(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Read(stream, mgr);
int n = stream->ReadSwap32();
int n = stream->ReadLE32();
fMessages.SetCountAndZero(n);
for(int i = 0; i < n; i++ )
{
@ -383,7 +383,7 @@ void plCameraRegionDetector::Read(hsStream* stream, hsResMgr* mgr)
void plCameraRegionDetector::Write(hsStream* stream, hsResMgr* mgr)
{
plDetectorModifier::Write(stream, mgr);
stream->WriteSwap32(fMessages.GetCount());
stream->WriteLE32(fMessages.GetCount());
for(int i = 0; i < fMessages.GetCount(); i++ )
mgr->WriteCreatable( stream, fMessages[i] );
@ -842,7 +842,7 @@ void plObjectInVolumeAndFacingDetector::Read(hsStream* stream, hsResMgr* mgr)
{
plObjectInVolumeDetector::Read(stream, mgr);
fFacingTolerance = stream->ReadSwapScalar();
fFacingTolerance = stream->ReadLEScalar();
fNeedWalkingForward = stream->Readbool();
}
@ -850,7 +850,7 @@ void plObjectInVolumeAndFacingDetector::Write(hsStream* stream, hsResMgr* mgr)
{
plObjectInVolumeDetector::Write(stream, mgr);
stream->WriteSwapScalar(fFacingTolerance);
stream->WriteLEScalar(fFacingTolerance);
stream->Writebool(fNeedWalkingForward);
}
@ -1088,8 +1088,8 @@ void plSwimDetector::Write(hsStream *stream, hsResMgr *mgr)
plSimpleRegionSensor::Write(stream, mgr);
stream->WriteByte(0);
stream->WriteSwapScalar(0);
stream->WriteSwapScalar(0);
stream->WriteLEScalar(0);
stream->WriteLEScalar(0);
}
void plSwimDetector::Read(hsStream *stream, hsResMgr *mgr)
@ -1097,8 +1097,8 @@ void plSwimDetector::Read(hsStream *stream, hsResMgr *mgr)
plSimpleRegionSensor::Read(stream, mgr);
stream->ReadByte();
stream->ReadSwapScalar();
stream->ReadSwapScalar();
stream->ReadLEScalar();
stream->ReadLEScalar();
}
hsBool plSwimDetector::MsgReceive(plMessage *msg)
{

View File

@ -75,7 +75,7 @@ public:
void Read(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Read(stream, mgr);
int n = stream->ReadSwap32();
int n = stream->ReadLE32();
fReceivers.Reset();
for(int i = 0; i < n; i++ )
{
@ -88,7 +88,7 @@ public:
void Write(hsStream* stream, hsResMgr* mgr)
{
plSingleModifier::Write(stream, mgr);
stream->WriteSwap32(fReceivers.GetCount());
stream->WriteLE32(fReceivers.GetCount());
for( int i = 0; i < fReceivers.GetCount(); i++ )
mgr->WriteKey(stream, fReceivers[i]);

View File

@ -89,15 +89,15 @@ void plPhysicalSndGroup::Read( hsStream *s, hsResMgr *mgr )
{
hsKeyedObject::Read( s, mgr );
s->ReadSwap( &fGroup );
s->ReadLE( &fGroup );
UInt32 i, count = s->ReadSwap32();
UInt32 i, count = s->ReadLE32();
fImpactSounds.Reset();
for( i = 0; i < count; i++ )
fImpactSounds.Append( mgr->ReadKey( s ) );
count = s->ReadSwap32();
count = s->ReadLE32();
fSlideSounds.Reset();
for( i = 0; i < count; i++ )
fSlideSounds.Append( mgr->ReadKey( s ) );
@ -108,14 +108,14 @@ void plPhysicalSndGroup::Write( hsStream *s, hsResMgr *mgr )
{
hsKeyedObject::Write( s, mgr );
s->WriteSwap( fGroup );
s->WriteLE( fGroup );
UInt32 i;
s->WriteSwap32( fImpactSounds.GetCount() );
s->WriteLE32( fImpactSounds.GetCount() );
for( i = 0; i < fImpactSounds.GetCount(); i++ )
mgr->WriteKey( s, fImpactSounds[ i ] );
s->WriteSwap32( fSlideSounds.GetCount() );
s->WriteLE32( fSlideSounds.GetCount() );
for( i = 0; i < fSlideSounds.GetCount(); i++ )
mgr->WriteKey( s, fSlideSounds[ i ] );
}