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

@ -189,8 +189,8 @@ hsKeyedObject* plKeyImp::VerifyLoaded()
void plKeyImp::Read(hsStream* s)
{
fUoid.Read(s);
s->ReadSwap(&fStartPos);
s->ReadSwap(&fDataLen);
s->ReadLE(&fStartPos);
s->ReadLE(&fDataLen);
plProfile_NewMem(KeyMem, CalcKeySize(this));
@ -204,15 +204,15 @@ void plKeyImp::SkipRead(hsStream* s)
{
plUoid tempUoid;
tempUoid.Read(s);
s->ReadSwap32();
s->ReadSwap32();
s->ReadLE32();
s->ReadLE32();
}
void plKeyImp::Write(hsStream* s)
{
fUoid.Write(s);
s->WriteSwap(fStartPos);
s->WriteSwap(fDataLen);
s->WriteLE(fStartPos);
s->WriteLE(fDataLen);
if (fStartPos == (UInt32)-1)
int foo = 0;
}

View File

@ -75,7 +75,7 @@ void plMsgForwarder::Read(hsStream* s, hsResMgr* mgr)
{
hsKeyedObject::Read(s, mgr);
int numKeys = s->ReadSwap32();
int numKeys = s->ReadLE32();
fForwardKeys.Reset();
fForwardKeys.Expand(numKeys);
fForwardKeys.SetCount(numKeys);
@ -91,7 +91,7 @@ void plMsgForwarder::Write(hsStream* s, hsResMgr* mgr)
hsKeyedObject::Write(s, mgr);
int numKeys = fForwardKeys.Count();
s->WriteSwap32(numKeys);
s->WriteLE32(numKeys);
for (int i = 0; i < numKeys; i++)
mgr->WriteKey(s, fForwardKeys[i]);
}

View File

@ -59,14 +59,14 @@ plLocation::plLocation(const plLocation& toCopyFrom)
void plLocation::Read(hsStream* s)
{
s->LogReadSwap(&fSequenceNumber, "Location Sequence Number");
s->LogReadSwap(&fFlags, "Location Flags");
s->LogReadLE(&fSequenceNumber, "Location Sequence Number");
s->LogReadLE(&fFlags, "Location Flags");
}
void plLocation::Write(hsStream* s) const
{
s->WriteSwap(fSequenceNumber);
s->WriteSwap(fFlags);
s->WriteLE(fSequenceNumber);
s->WriteLE(fFlags);
}
plLocation& plLocation::operator=(const plLocation& rhs)
@ -175,18 +175,18 @@ void plUoid::Read(hsStream* s)
else
fLoadMask.SetAlways();
s->LogReadSwap(&fClassType, "ClassType");
s->LogReadSwap(&fObjectID, "ObjectID");
s->LogReadLE(&fClassType, "ClassType");
s->LogReadLE(&fObjectID, "ObjectID");
s->LogSubStreamPushDesc("ObjectName");
fObjectName = s->LogReadSafeString();
// conditional cloneIDs read
if (contents & kHasCloneIDs)
{
s->LogReadSwap( &fCloneID ,"CloneID");
s->LogReadLE( &fCloneID ,"CloneID");
UInt16 dummy;
s->LogReadSwap(&dummy, "dummy"); // To avoid breaking format
s->LogReadSwap( &fClonePlayerID ,"ClonePlayerID");
s->LogReadLE(&dummy, "dummy"); // To avoid breaking format
s->LogReadLE( &fClonePlayerID ,"ClonePlayerID");
}
else
{
@ -209,17 +209,17 @@ void plUoid::Write(hsStream* s) const
if (contents & kHasLoadMask)
fLoadMask.Write(s);
s->WriteSwap( fClassType );
s->WriteSwap( fObjectID );
s->WriteLE( fClassType );
s->WriteLE( fObjectID );
s->WriteSafeString( fObjectName );
// conditional cloneIDs write
if (contents & kHasCloneIDs)
{
s->WriteSwap(fCloneID);
s->WriteLE(fCloneID);
UInt16 dummy = 0;
s->WriteSwap(dummy); // to avoid breaking format
s->WriteSwap(fClonePlayerID);
s->WriteLE(dummy); // to avoid breaking format
s->WriteLE(fClonePlayerID);
}
}