mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +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:
@ -64,7 +64,7 @@ void plAnimEventModifier::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Read(stream, mgr);
|
||||
|
||||
int numReceivers = stream->ReadSwap32();
|
||||
int numReceivers = stream->ReadLE32();
|
||||
fReceivers.Expand(numReceivers);
|
||||
for (int i = 0; i < numReceivers; i++)
|
||||
fReceivers.Push(mgr->ReadKey(stream));
|
||||
@ -86,7 +86,7 @@ void plAnimEventModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
plSingleModifier::Write(stream, mgr);
|
||||
|
||||
int numReceivers = fReceivers.Count();
|
||||
stream->WriteSwap32(numReceivers);
|
||||
stream->WriteLE32(numReceivers);
|
||||
for (int i = 0; i < numReceivers; i++)
|
||||
mgr->WriteKey(stream, fReceivers[i]);
|
||||
|
||||
|
@ -93,24 +93,24 @@ void plDecalEnableMod::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Read(stream, mgr);
|
||||
|
||||
int n = stream->ReadSwap32();
|
||||
int n = stream->ReadLE32();
|
||||
fDecalMgrs.SetCount(n);
|
||||
int i;
|
||||
for( i = 0; i < n; i++ )
|
||||
fDecalMgrs[i] = mgr->ReadKey(stream);
|
||||
|
||||
fWetLength = stream->ReadSwapScalar();
|
||||
fWetLength = stream->ReadLEScalar();
|
||||
}
|
||||
|
||||
void plDecalEnableMod::Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Write(stream, mgr);
|
||||
|
||||
stream->WriteSwap32(fDecalMgrs.GetCount());
|
||||
stream->WriteLE32(fDecalMgrs.GetCount());
|
||||
|
||||
int i;
|
||||
for( i = 0; i < fDecalMgrs.GetCount(); i++ )
|
||||
mgr->WriteKey(stream, fDecalMgrs[i]);
|
||||
|
||||
stream->WriteSwapScalar(fWetLength);
|
||||
stream->WriteLEScalar(fWetLength);
|
||||
}
|
||||
|
@ -91,13 +91,13 @@ void plExcludeRegionModifier::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Read(stream, mgr);
|
||||
|
||||
int numPoints = stream->ReadSwap32();
|
||||
int numPoints = stream->ReadLE32();
|
||||
for (int i = 0; i < numPoints; i++)
|
||||
{
|
||||
fSafePoints.push_back(mgr->ReadKey(stream));
|
||||
}
|
||||
fSeek = stream->ReadBool();
|
||||
fSeekTime = stream->ReadSwapScalar();
|
||||
fSeekTime = stream->ReadLEScalar();
|
||||
}
|
||||
|
||||
void plExcludeRegionModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
@ -105,13 +105,13 @@ void plExcludeRegionModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
plSingleModifier::Write(stream, mgr);
|
||||
|
||||
int numPoints = fSafePoints.size();
|
||||
stream->WriteSwap32(numPoints);
|
||||
stream->WriteLE32(numPoints);
|
||||
for (int i = 0; i < numPoints; i++)
|
||||
{
|
||||
mgr->WriteKey(stream,fSafePoints[i]);
|
||||
}
|
||||
stream->WriteBool(fSeek);
|
||||
stream->WriteSwapScalar(fSeekTime);
|
||||
stream->WriteLEScalar(fSeekTime);
|
||||
}
|
||||
|
||||
void plExcludeRegionModifier::ISetPhysicalState(bool cleared)
|
||||
|
@ -85,8 +85,8 @@ void plGameMarkerModifier::Read(hsStream* stream, hsResMgr* mgr)
|
||||
fRedAnimKey = mgr->ReadKey(stream);
|
||||
fOpenAnimKey = mgr->ReadKey(stream);
|
||||
fBounceAnimKey = mgr->ReadKey(stream);
|
||||
fPlaceSndIdx = stream->ReadSwap16();
|
||||
fHitSndIdx = stream->ReadSwap16();
|
||||
fPlaceSndIdx = stream->ReadLE16();
|
||||
fHitSndIdx = stream->ReadLE16();
|
||||
}
|
||||
|
||||
void plGameMarkerModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
@ -97,6 +97,6 @@ void plGameMarkerModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fRedAnimKey);
|
||||
mgr->WriteKey(stream, fOpenAnimKey);
|
||||
mgr->WriteKey(stream, fBounceAnimKey);
|
||||
stream->WriteSwap16(fPlaceSndIdx);
|
||||
stream->WriteSwap16(fHitSndIdx);
|
||||
stream->WriteLE16(fPlaceSndIdx);
|
||||
stream->WriteLE16(fHitSndIdx);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ void plImageLibMod::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Read(stream, mgr);
|
||||
|
||||
UInt32 i, count = stream->ReadSwap32();
|
||||
UInt32 i, count = stream->ReadLE32();
|
||||
fImages.SetCountAndZero( count );
|
||||
for( i = 0; i < count; i++ )
|
||||
mgr->ReadKeyNotifyMe( stream, TRACKED_NEW plGenRefMsg( GetKey(), plRefMsg::kOnCreate, i, kRefImage ), plRefFlags::kActiveRef );
|
||||
@ -95,7 +95,7 @@ void plImageLibMod::Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Write(stream, mgr);
|
||||
|
||||
stream->WriteSwap32( fImages.GetCount() );
|
||||
stream->WriteLE32( fImages.GetCount() );
|
||||
UInt32 i;
|
||||
for( i = 0; i < fImages.GetCount(); i++ )
|
||||
mgr->WriteKey( stream, fImages[ i ]->GetKey() );
|
||||
|
@ -58,7 +58,7 @@ plInterfaceInfoModifier::~plInterfaceInfoModifier()
|
||||
void plInterfaceInfoModifier::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Read(s, mgr);
|
||||
int i = s->ReadSwap32();
|
||||
int i = s->ReadLE32();
|
||||
for (int x = 0; x < i; x++)
|
||||
fKeyList.Append(mgr->ReadKey(s));
|
||||
}
|
||||
@ -66,7 +66,7 @@ void plInterfaceInfoModifier::Read(hsStream* s, hsResMgr* mgr)
|
||||
void plInterfaceInfoModifier::Write(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plSingleModifier::Write(s, mgr);
|
||||
s->WriteSwap32(fKeyList.Count());
|
||||
s->WriteLE32(fKeyList.Count());
|
||||
for (int i = 0; i < fKeyList.Count(); i++)
|
||||
mgr->WriteKey(s, fKeyList[i]);
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ void plLogicModifier::Read(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plLogicModBase::Read(stream, mgr);
|
||||
plCondRefMsg* refMsg;
|
||||
int n = stream->ReadSwap32();
|
||||
int n = stream->ReadLE32();
|
||||
fConditionList.SetCountAndZero(n);
|
||||
int i;
|
||||
for(i = 0; i < n; i++ )
|
||||
@ -247,16 +247,16 @@ void plLogicModifier::Read(hsStream* stream, hsResMgr* mgr)
|
||||
refMsg = TRACKED_NEW plCondRefMsg(GetKey(), i);
|
||||
mgr->ReadKeyNotifyMe(stream,refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
fMyCursor = stream->ReadSwap32();
|
||||
fMyCursor = stream->ReadLE32();
|
||||
}
|
||||
|
||||
void plLogicModifier::Write(hsStream* stream, hsResMgr* mgr)
|
||||
{
|
||||
plLogicModBase::Write(stream, mgr);
|
||||
stream->WriteSwap32(fConditionList.GetCount());
|
||||
stream->WriteLE32(fConditionList.GetCount());
|
||||
for( int i = 0; i < fConditionList.GetCount(); i++ )
|
||||
mgr->WriteKey(stream, fConditionList[i]);
|
||||
stream->WriteSwap32(fMyCursor);
|
||||
stream->WriteLE32(fMyCursor);
|
||||
}
|
||||
|
||||
void plLogicModifier::AddCondition(plConditionalObject* c)
|
||||
|
@ -60,11 +60,11 @@ void plMaintainersMarkerModifier::RemoveTarget(plSceneObject* so)
|
||||
void plMaintainersMarkerModifier::Read(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMultiModifier::Read(stream, mgr);
|
||||
stream->ReadSwap(&fCalibrated);
|
||||
stream->ReadLE(&fCalibrated);
|
||||
}
|
||||
|
||||
void plMaintainersMarkerModifier::Write(hsStream *stream, hsResMgr *mgr)
|
||||
{
|
||||
plMultiModifier::Write(stream, mgr);
|
||||
stream->WriteSwap(fCalibrated);
|
||||
stream->WriteLE(fCalibrated);
|
||||
}
|
||||
|
Reference in New Issue
Block a user