Browse Source

Convert ReadSafe(W)String* to the plString variants, and remove the now

unneeded _TEMP variants.  All safe strings read from hsStreams are
now plStringified :)
Michael Hansen 11 years ago
parent
commit
d7fdf10455
  1. 2
      Sources/Plasma/Apps/plClient/winmain.cpp
  2. 46
      Sources/Plasma/CoreLib/hsStream.cpp
  3. 14
      Sources/Plasma/CoreLib/hsStream.h
  4. 2
      Sources/Plasma/CoreLib/plGeneric.cpp
  5. 4
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp
  6. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp
  7. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp
  8. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp
  9. 4
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp
  10. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp
  11. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp
  12. 4
      Sources/Plasma/FeatureLib/pfMessage/pfBackdoorMsg.h
  13. 2
      Sources/Plasma/FeatureLib/pfMessage/pfGameGUIMsg.h
  14. 4
      Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h
  15. 2
      Sources/Plasma/FeatureLib/pfMessage/pfMovieEventMsg.cpp
  16. 2
      Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp
  17. 2
      Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp
  18. 2
      Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp
  19. 4
      Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp
  20. 4
      Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp
  21. 2
      Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp
  22. 8
      Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp
  23. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp
  24. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.cpp
  25. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp
  26. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp
  27. 8
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp
  28. 12
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp
  29. 6
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp
  30. 2
      Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp
  31. 4
      Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp
  32. 2
      Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp
  33. 2
      Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp
  34. 2
      Sources/Plasma/PubUtilLib/plMessage/plAIMsg.cpp
  35. 6
      Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp
  36. 4
      Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp
  37. 4
      Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp
  38. 6
      Sources/Plasma/PubUtilLib/plMessage/plInputIfaceMgrMsg.h
  39. 4
      Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp
  40. 2
      Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp
  41. 4
      Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp
  42. 2
      Sources/Plasma/PubUtilLib/plMessage/plOneShotCallbacks.cpp
  43. 2
      Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp
  44. 4
      Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp
  45. 6
      Sources/Plasma/PubUtilLib/plResMgr/plPageInfo.cpp
  46. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp
  47. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp
  48. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp
  49. 6
      Sources/Plasma/PubUtilLib/plSDL/plVarDescriptor.cpp
  50. 2
      Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp
  51. 4
      Sources/Tools/MaxComponent/plMultistageStage.cpp

2
Sources/Plasma/Apps/plClient/winmain.cpp

@ -891,7 +891,7 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0) if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0)
{ {
temp = stream->ReadSafeString_TEMP(); temp = stream->ReadSafeString();
if (!temp.IsEmpty()) if (!temp.IsEmpty())
{ {

46
Sources/Plasma/CoreLib/hsStream.cpp

@ -158,7 +158,7 @@ uint32_t hsStream::WriteSafeWStringLong(const plString &string)
return 0; return 0;
} }
plString hsStream::ReadSafeStringLong_TEMP() plString hsStream::ReadSafeStringLong()
{ {
plStringBuffer<char> name; plStringBuffer<char> name;
uint32_t numChars = ReadLE32(); uint32_t numChars = ReadLE32();
@ -179,15 +179,7 @@ plString hsStream::ReadSafeStringLong_TEMP()
return name; return name;
} }
char *hsStream::ReadSafeStringLong() plString hsStream::ReadSafeWStringLong()
{
plString name = ReadSafeStringLong_TEMP();
char *buff = new char[name.GetSize() + 1];
memcpy(buff, name.c_str(), name.GetSize() + 1);
return buff;
}
plString hsStream::ReadSafeWStringLong_TEMP()
{ {
plStringBuffer<uint16_t> retVal; plStringBuffer<uint16_t> retVal;
uint32_t numChars = ReadLE32(); uint32_t numChars = ReadLE32();
@ -209,17 +201,6 @@ plString hsStream::ReadSafeWStringLong_TEMP()
return plString::FromUtf16(retVal); return plString::FromUtf16(retVal);
} }
wchar_t *hsStream::ReadSafeWStringLong()
{
// Horribly inefficient (convert to UTF-8 and then back to UTF-16), which
// is why this should go away completely after plString has taken over
// the world^H^H^H^H^HPlasma
plStringBuffer<wchar_t> retVal = ReadSafeWStringLong_TEMP().ToWchar();
wchar_t *buff = new wchar_t[retVal.GetSize() + 1];
memcpy(buff, retVal.GetData(), retVal.GetSize() + 1);
return buff;
}
uint32_t hsStream::WriteSafeString(const plString &string) uint32_t hsStream::WriteSafeString(const plString &string)
{ {
int len = string.GetSize(); int len = string.GetSize();
@ -261,7 +242,7 @@ uint32_t hsStream::WriteSafeWString(const plString &string)
return 0; return 0;
} }
plString hsStream::ReadSafeString_TEMP() plString hsStream::ReadSafeString()
{ {
plStringBuffer<char> name; plStringBuffer<char> name;
uint16_t numChars = ReadLE16(); uint16_t numChars = ReadLE16();
@ -293,15 +274,7 @@ plString hsStream::ReadSafeString_TEMP()
return name; return name;
} }
char *hsStream::ReadSafeString() plString hsStream::ReadSafeWString()
{
plString name = ReadSafeString_TEMP();
char *buff = new char[name.GetSize() + 1];
memcpy(buff, name.c_str(), name.GetSize() + 1);
return buff;
}
plString hsStream::ReadSafeWString_TEMP()
{ {
plStringBuffer<uint16_t> retVal; plStringBuffer<uint16_t> retVal;
uint32_t numChars = ReadLE16(); uint32_t numChars = ReadLE16();
@ -326,17 +299,6 @@ plString hsStream::ReadSafeWString_TEMP()
return plString::FromUtf16(retVal); return plString::FromUtf16(retVal);
} }
wchar_t *hsStream::ReadSafeWString()
{
// Horribly inefficient (convert to UTF-8 and then back to UTF-16), which
// is why this should go away completely after plString has taken over
// the world^H^H^H^H^HPlasma
plStringBuffer<wchar_t> retVal = ReadSafeWString_TEMP().ToWchar();
wchar_t *buff = new wchar_t[retVal.GetSize() + 1];
memcpy(buff, retVal.GetData(), retVal.GetSize() + 1);
return buff;
}
bool hsStream::Read4Bytes(void *pv) // Virtual, faster version in sub classes bool hsStream::Read4Bytes(void *pv) // Virtual, faster version in sub classes
{ {
int knt = this->Read(sizeof(uint32_t), pv); int knt = this->Read(sizeof(uint32_t), pv);

14
Sources/Plasma/CoreLib/hsStream.h

@ -55,7 +55,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define hsReadOnlyLoggingStream hsReadOnlyStream #define hsReadOnlyLoggingStream hsReadOnlyStream
#define LogRead(byteCount, buffer, desc) Read(byteCount, buffer) #define LogRead(byteCount, buffer, desc) Read(byteCount, buffer)
#define LogReadSafeString() ReadSafeString() #define LogReadSafeString() ReadSafeString()
#define LogReadSafeString_TEMP() ReadSafeString_TEMP()
#define LogReadSafeStringLong() ReadSafeStringLong(); #define LogReadSafeStringLong() ReadSafeStringLong();
#define LogSkip(deltaByteCount, desc) Skip(deltaByteCount) #define LogSkip(deltaByteCount, desc) Skip(deltaByteCount)
#define LogReadLE(value, desc) ReadLE(value) #define LogReadLE(value, desc) ReadLE(value)
@ -126,18 +125,13 @@ public:
uint32_t WriteSafeStringLong(const plString &string); // uses 4 bytes for length uint32_t WriteSafeStringLong(const plString &string); // uses 4 bytes for length
uint32_t WriteSafeWStringLong(const plString &string); uint32_t WriteSafeWStringLong(const plString &string);
char * ReadSafeStringLong(); plString ReadSafeStringLong();
wchar_t * ReadSafeWStringLong(); plString ReadSafeWStringLong();
uint32_t WriteSafeString(const plString &string); // uses 2 bytes for length uint32_t WriteSafeString(const plString &string); // uses 2 bytes for length
uint32_t WriteSafeWString(const plString &string); uint32_t WriteSafeWString(const plString &string);
char * ReadSafeString(); plString ReadSafeString();
wchar_t * ReadSafeWString(); plString ReadSafeWString();
plString ReadSafeStringLong_TEMP();
plString ReadSafeWStringLong_TEMP();
plString ReadSafeString_TEMP();
plString ReadSafeWString_TEMP();
bool GetToken(char *s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); bool GetToken(char *s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode);
bool ReadLn(char* s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode); bool ReadLn(char* s, uint32_t maxLen=uint32_t(-1), const char beginComment=kComment, const char endComment=kEolnCode);

2
Sources/Plasma/CoreLib/plGeneric.cpp

@ -144,7 +144,7 @@ int plGeneric::Read(hsStream* stream)
break; break;
case kString: case kString:
fStringVal = stream->ReadSafeWString_TEMP(); fStringVal = stream->ReadSafeWString();
break; break;
} }
return stream->GetPosition(); return stream->GetPosition();

4
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIButtonMod.cpp

@ -196,13 +196,13 @@ void pfGUIButtonMod::Read( hsStream *s, hsResMgr *mgr )
uint32_t i, count = s->ReadLE32(); uint32_t i, count = s->ReadLE32();
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
fAnimationKeys.Append( mgr->ReadKey( s ) ); fAnimationKeys.Append( mgr->ReadKey( s ) );
fAnimName = s->ReadSafeString_TEMP(); fAnimName = s->ReadSafeString();
fMouseOverAnimKeys.Reset(); fMouseOverAnimKeys.Reset();
count = s->ReadLE32(); count = s->ReadLE32();
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
fMouseOverAnimKeys.Append( mgr->ReadKey( s ) ); fMouseOverAnimKeys.Append( mgr->ReadKey( s ) );
fMouseOverAnimName = s->ReadSafeString_TEMP(); fMouseOverAnimName = s->ReadSafeString();
fNotifyType = s->ReadLE32(); fNotifyType = s->ReadLE32();
mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDraggable ), plRefFlags::kActiveRef ); mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, -1, kRefDraggable ), plRefFlags::kActiveRef );

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUICheckBoxCtrl.cpp

@ -96,7 +96,7 @@ void pfGUICheckBoxCtrl::Read( hsStream *s, hsResMgr *mgr )
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
fAnimationKeys.Append( mgr->ReadKey( s ) ); fAnimationKeys.Append( mgr->ReadKey( s ) );
fAnimName = s->ReadSafeString_TEMP(); fAnimName = s->ReadSafeString();
fChecked = s->ReadBool(); fChecked = s->ReadBool();
} }

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.cpp

@ -118,7 +118,7 @@ void pfGUIColorScheme::Read( hsStream *s )
fSelBackColor.Read( s ); fSelBackColor.Read( s );
fTransparent = s->ReadBOOL(); fTransparent = s->ReadBOOL();
fFontFace = s->ReadSafeString_TEMP(); fFontFace = s->ReadSafeString();
s->ReadLE( &fFontSize ); s->ReadLE( &fFontSize );
s->ReadLE( &fFontFlags ); s->ReadLE( &fFontFlags );
} }

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIKnobCtrl.cpp

@ -106,7 +106,7 @@ void pfGUIKnobCtrl::Read( hsStream *s, hsResMgr *mgr )
uint32_t i, count = s->ReadLE32(); uint32_t i, count = s->ReadLE32();
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
fAnimationKeys.Append( mgr->ReadKey( s ) ); fAnimationKeys.Append( mgr->ReadKey( s ) );
fAnimName = s->ReadSafeString_TEMP(); fAnimName = s->ReadSafeString();
fAnimTimesCalced = false; fAnimTimesCalced = false;

4
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListElement.cpp

@ -93,7 +93,7 @@ void pfGUIListText::Read( hsStream *s, hsResMgr *mgr )
{ {
pfGUIListElement::Read( s, mgr ); pfGUIListElement::Read( s, mgr );
fText = s->ReadSafeString_TEMP(); fText = s->ReadSafeString();
} }
void pfGUIListText::Write( hsStream *s, hsResMgr *mgr ) void pfGUIListText::Write( hsStream *s, hsResMgr *mgr )
@ -274,7 +274,7 @@ void pfGUIListTreeRoot::Read( hsStream *s, hsResMgr *mgr )
{ {
pfGUIListElement::Read( s, mgr ); pfGUIListElement::Read( s, mgr );
fText = s->ReadSafeString_TEMP(); fText = s->ReadSafeString();
} }
void pfGUIListTreeRoot::Write( hsStream *s, hsResMgr *mgr ) void pfGUIListTreeRoot::Write( hsStream *s, hsResMgr *mgr )

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIProgressCtrl.cpp

@ -108,7 +108,7 @@ void pfGUIProgressCtrl::Read( hsStream *s, hsResMgr *mgr )
uint32_t i, count = s->ReadLE32(); uint32_t i, count = s->ReadLE32();
for( i = 0; i < count; i++ ) for( i = 0; i < count; i++ )
fAnimationKeys.Append( mgr->ReadKey( s ) ); fAnimationKeys.Append( mgr->ReadKey( s ) );
fAnimName = s->ReadSafeString_TEMP(); fAnimName = s->ReadSafeString();
fAnimTimesCalced = false; fAnimTimesCalced = false;
} }

2
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp

@ -169,7 +169,7 @@ void pfGUITextBoxMod::Read( hsStream *s, hsResMgr *mgr )
fUseLocalizationPath = s->ReadBool(); fUseLocalizationPath = s->ReadBool();
if (fUseLocalizationPath) if (fUseLocalizationPath)
{ {
fLocalizationPath = s->ReadSafeWString_TEMP(); fLocalizationPath = s->ReadSafeWString();
} }
} }

4
Sources/Plasma/FeatureLib/pfMessage/pfBackdoorMsg.h

@ -74,8 +74,8 @@ class pfBackdoorMsg : public plMessage
virtual void Read(hsStream* s, hsResMgr* mgr) virtual void Read(hsStream* s, hsResMgr* mgr)
{ {
plMessage::IMsgRead( s, mgr ); plMessage::IMsgRead( s, mgr );
fTarget = s->ReadSafeString_TEMP(); fTarget = s->ReadSafeString();
fString = s->ReadSafeString_TEMP(); fString = s->ReadSafeString();
} }
virtual void Write(hsStream* s, hsResMgr* mgr) virtual void Write(hsStream* s, hsResMgr* mgr)

2
Sources/Plasma/FeatureLib/pfMessage/pfGameGUIMsg.h

@ -84,7 +84,7 @@ class pfGameGUIMsg : public plMessage
s->Read(sizeof(buffer), buffer); s->Read(sizeof(buffer), buffer);
buffer[GAME_GUI_MSG_STRING_SIZE - 1] = 0; buffer[GAME_GUI_MSG_STRING_SIZE - 1] = 0;
fString = buffer; fString = buffer;
fAge = s->ReadSafeString_TEMP(); fAge = s->ReadSafeString();
} }
virtual void Write(hsStream* s, hsResMgr* mgr) virtual void Write(hsStream* s, hsResMgr* mgr)

4
Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h

@ -188,9 +188,9 @@ class pfKIMsg : public plMessage
{ {
plMessage::IMsgRead( s, mgr ); plMessage::IMsgRead( s, mgr );
s->ReadLE( &fCommand ); s->ReadLE( &fCommand );
fUser = s->ReadSafeString_TEMP(); fUser = s->ReadSafeString();
fPlayerID = s->ReadLE32(); fPlayerID = s->ReadLE32();
fString = s->ReadSafeWString_TEMP(); fString = s->ReadSafeWString();
fFlags = s->ReadLE32(); fFlags = s->ReadLE32();
fDelay = s->ReadLEScalar(); fDelay = s->ReadLEScalar();
fValue = s->ReadLE32(); fValue = s->ReadLE32();

2
Sources/Plasma/FeatureLib/pfMessage/pfMovieEventMsg.cpp

@ -49,7 +49,7 @@ void pfMovieEventMsg::Read(hsStream* stream, hsResMgr* mgr)
fReason = (Reason)stream->ReadByte(); fReason = (Reason)stream->ReadByte();
fMovieName = stream->ReadSafeString_TEMP(); fMovieName = stream->ReadSafeString();
} }
void pfMovieEventMsg::Write(hsStream* stream, hsResMgr* mgr) void pfMovieEventMsg::Write(hsStream* stream, hsResMgr* mgr)

2
Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp

@ -2989,7 +2989,7 @@ void plPythonFileMod::Read(hsStream* stream, hsResMgr* mgr)
plMultiModifier::Read(stream, mgr); plMultiModifier::Read(stream, mgr);
// read in the compile python code (pyc) // read in the compile python code (pyc)
fPythonFile = stream->ReadSafeString_TEMP(); fPythonFile = stream->ReadSafeString();
// then read in the list of receivers that want to be notified // then read in the list of receivers that want to be notified
int nRcvs = stream->ReadLE32(); int nRcvs = stream->ReadLE32();

2
Sources/Plasma/FeatureLib/pfPython/plPythonPack.cpp

@ -148,7 +148,7 @@ bool plPythonPack::Open()
for (int i = 0; i < numFiles; i++) for (int i = 0; i < numFiles; i++)
{ {
// and pack the index into our own data structure // and pack the index into our own data structure
plString pythonName = fPackStream->ReadSafeString_TEMP(); plString pythonName = fPackStream->ReadSafeString();
uint32_t offset = fPackStream->ReadLE32(); uint32_t offset = fPackStream->ReadLE32();
plPackOffsetInfo offsetInfo; plPackOffsetInfo offsetInfo;

2
Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp

@ -169,7 +169,7 @@ void plUoid::Read(hsStream* s)
s->LogReadLE(&fClassType, "ClassType"); s->LogReadLE(&fClassType, "ClassType");
s->LogReadLE(&fObjectID, "ObjectID"); s->LogReadLE(&fObjectID, "ObjectID");
s->LogSubStreamPushDesc("ObjectName"); s->LogSubStreamPushDesc("ObjectName");
fObjectName = s->LogReadSafeString_TEMP(); fObjectName = s->LogReadSafeString();
// conditional cloneIDs read // conditional cloneIDs read
if (contents & kHasCloneIDs) if (contents & kHasCloneIDs)

4
Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.cpp

@ -1351,7 +1351,7 @@ void proVariableEventData::IWriteNumber(hsStream * stream) {
void proVariableEventData::IRead(hsStream* stream, hsResMgr* mgr) void proVariableEventData::IRead(hsStream* stream, hsResMgr* mgr)
{ {
fName = stream->ReadSafeString_TEMP(); fName = stream->ReadSafeString();
fDataType = stream->ReadLE32(); fDataType = stream->ReadLE32();
IReadNumber(stream); IReadNumber(stream);
fKey = mgr->ReadKey(stream); fKey = mgr->ReadKey(stream);
@ -1379,7 +1379,7 @@ void proVariableEventData::IReadVersion(hsStream* s, hsResMgr* mgr)
contentFlags.Read(s); contentFlags.Read(s);
if (contentFlags.IsBitSet(kProVariableName)) if (contentFlags.IsBitSet(kProVariableName))
fName = s->ReadSafeString_TEMP(); fName = s->ReadSafeString();
if (contentFlags.IsBitSet(kProVariableDataType)) if (contentFlags.IsBitSet(kProVariableDataType))
fDataType = s->ReadLE32(); fDataType = s->ReadLE32();
if (contentFlags.IsBitSet(kProVariableNumber)) if (contentFlags.IsBitSet(kProVariableNumber))

4
Sources/Plasma/NucleusLib/pnNetCommon/plGenericVar.cpp

@ -154,7 +154,7 @@ void plGenericType::Read(hsStream* s)
{ {
case kString: case kString:
case kAny: case kAny:
fS=s->ReadSafeString_TEMP(); fS=s->ReadSafeString();
break; break;
case kBool: case kBool:
{int8_t b; {int8_t b;
@ -219,7 +219,7 @@ void plGenericType::Write(hsStream* s)
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
void plGenericVar::Read(hsStream* s) void plGenericVar::Read(hsStream* s)
{ {
fName = s->ReadSafeString_TEMP(); fName = s->ReadSafeString();
fValue.Read(s); fValue.Read(s);
} }

2
Sources/Plasma/PubUtilLib/plAudioCore/plSoundBuffer.cpp

@ -219,7 +219,7 @@ void plSoundBuffer::Read( hsStream *s, hsResMgr *mgr )
s->ReadLE( &fFlags ); s->ReadLE( &fFlags );
s->ReadLE( &fDataLength ); s->ReadLE( &fDataLength );
fFileName = s->ReadSafeString_TEMP(); fFileName = s->ReadSafeString();
s->ReadLE( &fHeader.fFormatTag ); s->ReadLE( &fHeader.fFormatTag );
s->ReadLE( &fHeader.fNumChannels ); s->ReadLE( &fHeader.fNumChannels );

8
Sources/Plasma/PubUtilLib/plAvatar/plAGAnim.cpp

@ -217,7 +217,7 @@ void plAGAnim::Read(hsStream *stream, hsResMgr *mgr)
plSynchedObject::Read(stream, mgr); plSynchedObject::Read(stream, mgr);
// read in the name of the animation itself // read in the name of the animation itself
fName = stream->ReadSafeString_TEMP(); fName = stream->ReadSafeString();
fStart = stream->ReadLEScalar(); fStart = stream->ReadLEScalar();
fEnd = stream->ReadLEScalar(); fEnd = stream->ReadLEScalar();
@ -412,7 +412,7 @@ void plATCAnim::Read(hsStream *stream, hsResMgr *mgr)
int numMarkers = stream->ReadLE32(); int numMarkers = stream->ReadLE32();
for (i = 0; i < numMarkers; i++) for (i = 0; i < numMarkers; i++)
{ {
plString name = stream->ReadSafeString_TEMP(); plString name = stream->ReadSafeString();
float time = stream->ReadLEFloat(); float time = stream->ReadLEFloat();
fMarkers[name] = time; fMarkers[name] = time;
} }
@ -420,7 +420,7 @@ void plATCAnim::Read(hsStream *stream, hsResMgr *mgr)
int numLoops = stream->ReadLE32(); int numLoops = stream->ReadLE32();
for (i = 0; i < numLoops; i++) for (i = 0; i < numLoops; i++)
{ {
plString name = stream->ReadSafeString_TEMP(); plString name = stream->ReadSafeString();
float begin = stream->ReadLEScalar(); float begin = stream->ReadLEScalar();
float end = stream->ReadLEScalar(); float end = stream->ReadLEScalar();
fLoops[name] = std::pair<float,float>(begin,end); fLoops[name] = std::pair<float,float>(begin,end);
@ -681,7 +681,7 @@ void plAgeGlobalAnim::Read(hsStream *stream, hsResMgr *mgr)
{ {
plAGAnim::Read(stream, mgr); plAGAnim::Read(stream, mgr);
fGlobalVarName = stream->ReadSafeString_TEMP(); fGlobalVarName = stream->ReadSafeString();
} }
// Write --------------------------------------------------- // Write ---------------------------------------------------

2
Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.cpp

@ -138,7 +138,7 @@ void plAGApplicator::Read(hsStream *stream, hsResMgr *mgr)
fEnabled = stream->ReadBool(); fEnabled = stream->ReadBool();
fChannel = nil; // Whatever is reading this applicator in should know what channel to assign it fChannel = nil; // Whatever is reading this applicator in should know what channel to assign it
fChannelName = stream->ReadSafeString_TEMP(); fChannelName = stream->ReadSafeString();
} }
// IGETxI // IGETxI

2
Sources/Plasma/PubUtilLib/plAvatar/plAGChannel.cpp

@ -119,7 +119,7 @@ void plAGChannel::Read(hsStream *stream, hsResMgr *mgr)
{ {
plCreatable::Read(stream, mgr); plCreatable::Read(stream, mgr);
fName = stream->ReadSafeString_TEMP(); fName = stream->ReadSafeString();
} }
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////

2
Sources/Plasma/PubUtilLib/plAvatar/plAGModifier.cpp

@ -269,7 +269,7 @@ void plAGModifier::Read(hsStream *stream, hsResMgr *mgr)
plSingleModifier::Read(stream, mgr); plSingleModifier::Read(stream, mgr);
// read in the name of the modifier // read in the name of the modifier
fChannelName = stream->ReadSafeString_TEMP(); fChannelName = stream->ReadSafeString();
} }
// WRITE // WRITE

2
Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp

@ -741,7 +741,7 @@ void plAnimStage::DumpDebug(bool active, int &x, int &y, int lineHeight, plDebug
// READ // READ
void plAnimStage::Read(hsStream *stream, hsResMgr *mgr) void plAnimStage::Read(hsStream *stream, hsResMgr *mgr)
{ {
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fNotify = stream->ReadByte(); fNotify = stream->ReadByte();
fForwardType = (ForwardType)stream->ReadLE32(); fForwardType = (ForwardType)stream->ReadLE32();
fBackType = (BackType)stream->ReadLE32(); fBackType = (BackType)stream->ReadLE32();

8
Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp

@ -1756,7 +1756,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
fMeshKeys.push_back(mgr->ReadKey(stream)); fMeshKeys.push_back(mgr->ReadKey(stream));
// read the root name string // read the root name string
fRootName = stream->ReadSafeString_TEMP(); fRootName = stream->ReadSafeString();
// read in the brains // read in the brains
int nBrains = stream->ReadLE32(); int nBrains = stream->ReadLE32();
@ -1821,9 +1821,9 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
fPhysHeight = stream->ReadLEFloat(); fPhysHeight = stream->ReadLEFloat();
fPhysWidth = stream->ReadLEFloat(); fPhysWidth = stream->ReadLEFloat();
fAnimationPrefix = stream->ReadSafeString_TEMP(); fAnimationPrefix = stream->ReadSafeString();
fBodyAgeName = stream->ReadSafeString_TEMP(); fBodyAgeName = stream->ReadSafeString();
fBodyFootstepSoundPage = stream->ReadSafeString_TEMP(); fBodyFootstepSoundPage = stream->ReadSafeString();
plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey()); plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey());
} }

12
Sources/Plasma/PubUtilLib/plAvatar/plAvatarClothing.cpp

@ -160,14 +160,14 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr)
{ {
hsKeyedObject::Read(s, mgr); hsKeyedObject::Read(s, mgr);
fName = s->ReadSafeString_TEMP(); fName = s->ReadSafeString();
fGroup = s->ReadByte(); fGroup = s->ReadByte();
fType = s->ReadByte(); fType = s->ReadByte();
fTileset = s->ReadByte(); fTileset = s->ReadByte();
fSortOrder = s->ReadByte(); fSortOrder = s->ReadByte();
fCustomText = s->ReadSafeString_TEMP(); fCustomText = s->ReadSafeString();
fDescription = s->ReadSafeString_TEMP(); fDescription = s->ReadSafeString();
if (s->ReadBool()) if (s->ReadBool())
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); // thumbnail
@ -175,7 +175,7 @@ void plClothingItem::Read(hsStream *s, hsResMgr *mgr)
int i, j; int i, j;
for (i = 0; i < tileCount; i++) for (i = 0; i < tileCount; i++)
{ {
fElementNames.Append(s->ReadSafeString_TEMP()); fElementNames.Append(s->ReadSafeString());
int layerCount = s->ReadByte(); int layerCount = s->ReadByte();
for (j = 0; j < layerCount; j++) for (j = 0; j < layerCount; j++)
@ -375,10 +375,10 @@ void plClothingBase::Read(hsStream* s, hsResMgr* mgr)
{ {
hsKeyedObject::Read(s, mgr); hsKeyedObject::Read(s, mgr);
fName = s->ReadSafeString_TEMP(); fName = s->ReadSafeString();
if (s->ReadBool()) if (s->ReadBool())
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef); mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
fLayoutName = s->ReadSafeString_TEMP(); fLayoutName = s->ReadSafeString();
} }
void plClothingBase::Write(hsStream* s, hsResMgr* mgr) void plClothingBase::Write(hsStream* s, hsResMgr* mgr)

6
Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp

@ -465,7 +465,7 @@ void plAvAnimTask::LeaveAge(plArmatureMod *avatar)
// READ // READ
void plAvAnimTask::Read(hsStream *stream, hsResMgr *mgr) void plAvAnimTask::Read(hsStream *stream, hsResMgr *mgr)
{ {
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fInitialBlend = stream->ReadLEScalar(); fInitialBlend = stream->ReadLEScalar();
fTargetBlend = stream->ReadLEScalar(); fTargetBlend = stream->ReadLEScalar();
fFadeSpeed = stream->ReadLEScalar(); fFadeSpeed = stream->ReadLEScalar();
@ -802,8 +802,8 @@ void plAvOneShotLinkTask::Write(hsStream *stream, hsResMgr *mgr)
void plAvOneShotLinkTask::Read(hsStream *stream, hsResMgr *mgr) void plAvOneShotLinkTask::Read(hsStream *stream, hsResMgr *mgr)
{ {
plAvOneShotTask::Read(stream, mgr); plAvOneShotTask::Read(stream, mgr);
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fMarkerName = stream->ReadSafeString_TEMP(); fMarkerName = stream->ReadSafeString();
} }
void plAvOneShotLinkTask::SetMarkerName(const plString &name) void plAvOneShotLinkTask::SetMarkerName(const plString &name)

2
Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp

@ -398,7 +398,7 @@ void plCoopCoordinator::Read(hsStream *stream, hsResMgr *mgr)
else else
fGuestAcceptMsg = nil; fGuestAcceptMsg = nil;
fSynchBone = stream->ReadSafeString_TEMP(); fSynchBone = stream->ReadSafeString();
fAutoStartGuest = stream->ReadBool(); fAutoStartGuest = stream->ReadBool();
fInitiatorID = fHostBrain->GetInitiatorID(); fInitiatorID = fHostBrain->GetInitiatorID();

4
Sources/Plasma/PubUtilLib/plAvatar/plNPCSpawnMod.cpp

@ -128,8 +128,8 @@ void plNPCSpawnMod::Read(hsStream *stream, hsResMgr *mgr)
{ {
plSingleModifier::Read(stream, mgr); plSingleModifier::Read(stream, mgr);
fModelName = stream->ReadSafeString_TEMP(); fModelName = stream->ReadSafeString();
fAccountName = stream->ReadSafeString_TEMP(); fAccountName = stream->ReadSafeString();
fAutoSpawn = stream->ReadBool(); fAutoSpawn = stream->ReadBool();
if(stream->ReadBool()) if(stream->ReadBool())
fNotify = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(stream)); fNotify = plNotifyMsg::ConvertNoRef(mgr->ReadCreatable(stream));

2
Sources/Plasma/PubUtilLib/plAvatar/plOneShotMod.cpp

@ -154,7 +154,7 @@ void plOneShotMod::Read(hsStream *stream, hsResMgr *mgr)
plMultiModifier::Read(stream, mgr); plMultiModifier::Read(stream, mgr);
// read in the name of the animation itself // read in the name of the animation itself
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fSeekDuration = stream->ReadLEScalar(); fSeekDuration = stream->ReadLEScalar();
fDrivable = stream->ReadBool(); fDrivable = stream->ReadBool();
fReversable = stream->ReadBool(); fReversable = stream->ReadBool();

2
Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp

@ -89,7 +89,7 @@ void plClientResMgr::ILoadResources(const plFileName& resfile)
for (int i = 0; i < num_resources; i++) { for (int i = 0; i < num_resources; i++) {
plMipmap* res_data = NULL; plMipmap* res_data = NULL;
uint32_t res_size = 0; uint32_t res_size = 0;
plString res_name = in.ReadSafeStringLong_TEMP(); plString res_name = in.ReadSafeStringLong();
plString res_type = res_name.Substr(res_name.GetSize() - 4, 4); plString res_type = res_name.Substr(res_name.GetSize() - 4, 4);
// Version 1 doesn't encode format, so we'll try some simple // Version 1 doesn't encode format, so we'll try some simple

2
Sources/Plasma/PubUtilLib/plMessage/plAIMsg.cpp

@ -68,7 +68,7 @@ void plAIMsg::Read(hsStream* stream, hsResMgr* mgr)
{ {
plMessage::IMsgRead(stream, mgr); plMessage::IMsgRead(stream, mgr);
fBrainUserStr = stream->ReadSafeString_TEMP(); fBrainUserStr = stream->ReadSafeString();
} }
void plAIMsg::Write(hsStream* stream, hsResMgr* mgr) void plAIMsg::Write(hsStream* stream, hsResMgr* mgr)

6
Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp

@ -86,8 +86,8 @@ void plAnimCmdMsg::Read(hsStream* stream, hsResMgr* mgr)
stream->ReadLE(&fSpeedChangeRate); stream->ReadLE(&fSpeedChangeRate);
stream->ReadLE(&fTime); stream->ReadLE(&fTime);
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fLoopName = stream->ReadSafeString_TEMP(); fLoopName = stream->ReadSafeString();
} }
void plAnimCmdMsg::Write(hsStream* stream, hsResMgr* mgr) void plAnimCmdMsg::Write(hsStream* stream, hsResMgr* mgr)
@ -134,7 +134,7 @@ void plAGCmdMsg::Read(hsStream* stream, hsResMgr* mgr)
stream->ReadLE(&fAmp); stream->ReadLE(&fAmp);
stream->ReadLE(&fAmpRate); stream->ReadLE(&fAmpRate);
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
} }
void plAGCmdMsg::Write(hsStream* stream, hsResMgr* mgr) void plAGCmdMsg::Write(hsStream* stream, hsResMgr* mgr)

4
Sources/Plasma/PubUtilLib/plMessage/plAvatarMsg.cpp

@ -236,7 +236,7 @@ void plAvSeekMsg::Read(hsStream *stream, hsResMgr *mgr)
fDuration = stream->ReadLEScalar(); fDuration = stream->ReadLEScalar();
fSmartSeek = stream->ReadBool(); fSmartSeek = stream->ReadBool();
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fAlignType = static_cast<plAvAlignment>(stream->ReadLE16()); fAlignType = static_cast<plAvAlignment>(stream->ReadLE16());
fNoSeek = stream->ReadBool(); fNoSeek = stream->ReadBool();
fFlags = stream->ReadByte(); fFlags = stream->ReadByte();
@ -313,7 +313,7 @@ void plAvOneShotMsg::Read(hsStream *stream, hsResMgr *mgr)
{ {
plAvSeekMsg::Read(stream, mgr); plAvSeekMsg::Read(stream, mgr);
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fDrivable = stream->ReadBool(); fDrivable = stream->ReadBool();
fReversible = stream->ReadBool(); fReversible = stream->ReadBool();
} }

4
Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp

@ -216,7 +216,7 @@ void plDynamicTextMsg::Read( hsStream *s, hsResMgr *mgr )
fClearColor.Read( s ); fClearColor.Read( s );
fColor.Read( s ); fColor.Read( s );
fString = s->ReadSafeWString_TEMP(); fString = s->ReadSafeWString();
fImageKey = mgr->ReadKey( s ); fImageKey = mgr->ReadKey( s );
s->ReadLE( &fFlags ); s->ReadLE( &fFlags );
@ -301,7 +301,7 @@ void plDynamicTextMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
if (contentFlags.IsBitSet(kDynTextMsgColor)) if (contentFlags.IsBitSet(kDynTextMsgColor))
fColor.Read( s ); fColor.Read( s );
if (contentFlags.IsBitSet(kDynTextMsgString)) if (contentFlags.IsBitSet(kDynTextMsgString))
fString = s->ReadSafeWString_TEMP(); fString = s->ReadSafeWString();
if (contentFlags.IsBitSet(kDynTextMsgImageKey)) if (contentFlags.IsBitSet(kDynTextMsgImageKey))
fImageKey = mgr->ReadKey( s ); fImageKey = mgr->ReadKey( s );
if (contentFlags.IsBitSet(kDynTextMsgFlags)) if (contentFlags.IsBitSet(kDynTextMsgFlags))

6
Sources/Plasma/PubUtilLib/plMessage/plInputIfaceMgrMsg.h

@ -102,9 +102,9 @@ class plInputIfaceMgrMsg : public plMessage
plMessage::IMsgRead( s, mgr ); plMessage::IMsgRead( s, mgr );
s->ReadLE( &fCommand ); s->ReadLE( &fCommand );
s->ReadLE( &fPageID ); s->ReadLE( &fPageID );
ageName = s->ReadSafeString_TEMP(); ageName = s->ReadSafeString();
ageFileName = s->ReadSafeString_TEMP(); ageFileName = s->ReadSafeString();
spawnPoint = s->ReadSafeString_TEMP(); spawnPoint = s->ReadSafeString();
fAvKey = mgr->ReadKey(s); fAvKey = mgr->ReadKey(s);
} }

4
Sources/Plasma/PubUtilLib/plMessage/plLinkToAgeMsg.cpp

@ -79,7 +79,7 @@ void plLinkToAgeMsg::Read(hsStream* stream, hsResMgr* mgr)
plMessage::IMsgRead( stream, mgr ); plMessage::IMsgRead( stream, mgr );
fFlags = stream->ReadByte(); fFlags = stream->ReadByte();
fAgeLink.Read( stream, mgr ); fAgeLink.Read( stream, mgr );
fLinkInAnimName = stream->ReadSafeString_TEMP(); fLinkInAnimName = stream->ReadSafeString();
} }
void plLinkToAgeMsg::Write(hsStream* stream, hsResMgr* mgr) void plLinkToAgeMsg::Write(hsStream* stream, hsResMgr* mgr)
@ -106,7 +106,7 @@ void plLinkToAgeMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
if ( contentFlags.IsBitSet( kLinkToAgeAgeLinkStruct ) ) if ( contentFlags.IsBitSet( kLinkToAgeAgeLinkStruct ) )
fAgeLink.Read( s, mgr ); fAgeLink.Read( s, mgr );
if ( contentFlags.IsBitSet( kLinkToAgeLinkAnimName ) ) if ( contentFlags.IsBitSet( kLinkToAgeLinkAnimName ) )
fLinkInAnimName = s->ReadSafeString_TEMP(); fLinkInAnimName = s->ReadSafeString();
} }
void plLinkToAgeMsg::WriteVersion(hsStream* s, hsResMgr* mgr) void plLinkToAgeMsg::WriteVersion(hsStream* s, hsResMgr* mgr)

2
Sources/Plasma/PubUtilLib/plMessage/plLoadAgeMsg.cpp

@ -99,7 +99,7 @@ void plLoadAgeMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
if (contentFlags.IsBitSet(kLoadAgeAgeName)) if (contentFlags.IsBitSet(kLoadAgeAgeName))
{ {
// read agename // read agename
fAgeFilename = s->ReadSafeString_TEMP(); fAgeFilename = s->ReadSafeString();
} }
if (contentFlags.IsBitSet(kLoadAgeUnload)) if (contentFlags.IsBitSet(kLoadAgeUnload))

4
Sources/Plasma/PubUtilLib/plMessage/plLoadAvatarMsg.cpp

@ -93,7 +93,7 @@ void plLoadAvatarMsg::Read(hsStream* stream, hsResMgr* mgr)
{ {
fInitialTask = plAvTask::ConvertNoRef(mgr->ReadCreatable(stream)); fInitialTask = plAvTask::ConvertNoRef(mgr->ReadCreatable(stream));
} }
fUserStr = stream->ReadSafeString_TEMP(); fUserStr = stream->ReadSafeString();
} }
void plLoadAvatarMsg::Write(hsStream *stream, hsResMgr *mgr) void plLoadAvatarMsg::Write(hsStream *stream, hsResMgr *mgr)
@ -132,7 +132,7 @@ void plLoadAvatarMsg::ReadVersion(hsStream* stream, hsResMgr* mgr)
fSpawnPoint = mgr->ReadKey(stream); fSpawnPoint = mgr->ReadKey(stream);
if (contentFlags.IsBitSet(kLoadAvatarMsgUserStr)) if (contentFlags.IsBitSet(kLoadAvatarMsgUserStr))
fUserStr = stream->ReadSafeString_TEMP(); fUserStr = stream->ReadSafeString();
} }
void plLoadAvatarMsg::WriteVersion(hsStream* stream, hsResMgr* mgr) void plLoadAvatarMsg::WriteVersion(hsStream* stream, hsResMgr* mgr)

2
Sources/Plasma/PubUtilLib/plMessage/plOneShotCallbacks.cpp

@ -74,7 +74,7 @@ void plOneShotCallbacks::Read(hsStream* stream, hsResMgr* mgr)
fCallbacks.reserve(size); fCallbacks.reserve(size);
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
{ {
plString marker = stream->ReadSafeString_TEMP(); plString marker = stream->ReadSafeString();
plKey receiver = mgr->ReadKey(stream); plKey receiver = mgr->ReadKey(stream);
int16_t user = stream->ReadLE16(); int16_t user = stream->ReadLE16();

2
Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp

@ -59,7 +59,7 @@ plCloneSpawnModifier::plCloneSpawnModifier() : fExportTime(false)
void plCloneSpawnModifier::Read(hsStream *s, hsResMgr *mgr) void plCloneSpawnModifier::Read(hsStream *s, hsResMgr *mgr)
{ {
fTemplateName = s->ReadSafeString_TEMP(); fTemplateName = s->ReadSafeString();
plSingleModifier::Read(s, mgr); plSingleModifier::Read(s, mgr);
} }

4
Sources/Plasma/PubUtilLib/plPipeline/plDynamicEnvMap.cpp

@ -439,7 +439,7 @@ void plDynamicEnvMap::Read(hsStream* s, hsResMgr* mgr)
nVis = s->ReadLE32(); nVis = s->ReadLE32();
for( i = 0; i < nVis; i++) for( i = 0; i < nVis; i++)
{ {
plKey key = plKeyFinder::Instance().StupidSearch("", "", plVisRegion::Index(), s->ReadSafeString_TEMP()); plKey key = plKeyFinder::Instance().StupidSearch("", "", plVisRegion::Index(), s->ReadSafeString());
if (key) if (key)
hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef); hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
} }
@ -928,7 +928,7 @@ void plDynamicCamMap::Read(hsStream* s, hsResMgr* mgr)
nVis = s->ReadLE32(); nVis = s->ReadLE32();
for( i = 0; i < nVis; i++) for( i = 0; i < nVis; i++)
{ {
plKey key = plKeyFinder::Instance().StupidSearch("", "", plVisRegion::Index(), s->ReadSafeString_TEMP()); plKey key = plKeyFinder::Instance().StupidSearch("", "", plVisRegion::Index(), s->ReadSafeString());
if (key) if (key)
hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef); hsgResMgr::ResMgr()->AddViaNotify(key, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kRefVisSet), plRefFlags::kActiveRef);
} }

6
Sources/Plasma/PubUtilLib/plResMgr/plPageInfo.cpp

@ -133,10 +133,10 @@ void plPageInfo::Read( hsStream *s )
if (version >= 5) if (version >= 5)
{ {
fLocation.Read( s ); fLocation.Read( s );
fAge = s->ReadSafeString_TEMP(); fAge = s->ReadSafeString();
if (version < 6) if (version < 6)
s->ReadSafeString_TEMP(); // fChapter was never used, and always "District". s->ReadSafeString(); // fChapter was never used, and always "District".
fPage = s->ReadSafeString_TEMP(); fPage = s->ReadSafeString();
s->ReadLE( &fMajorVersion ); s->ReadLE( &fMajorVersion );

2
Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp

@ -403,7 +403,7 @@ bool plStateDataRecord::ReadStreamHeader(hsStream* s, plString* name, int* versi
return false; // bad version return false; // bad version
} }
*name = s->ReadSafeString_TEMP(); *name = s->ReadSafeString();
*version = s->ReadLE16(); *version = s->ReadLE16();
if (objUoid) if (objUoid)

2
Sources/Plasma/PubUtilLib/plSDL/plStateDescriptor.cpp

@ -94,7 +94,7 @@ bool plStateDescriptor::Read(hsStream* s)
IDeInit(); IDeInit();
fName = s->ReadSafeString_TEMP(); fName = s->ReadSafeString();
uint16_t version=s->ReadLE16(); uint16_t version=s->ReadLE16();
fVersion=version; fVersion=version;

2
Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

@ -107,7 +107,7 @@ public:
void plStateVarNotificationInfo::Read(hsStream* s, uint32_t readOptions) void plStateVarNotificationInfo::Read(hsStream* s, uint32_t readOptions)
{ {
uint8_t saveFlags=s->ReadByte(); // unused uint8_t saveFlags=s->ReadByte(); // unused
plString hint=s->ReadSafeString_TEMP(); plString hint=s->ReadSafeString();
if (!hint.IsNull() && !(readOptions & plSDL::kSkipNotificationInfo)) if (!hint.IsNull() && !(readOptions & plSDL::kSkipNotificationInfo))
fHintString = hint; fHintString = hint;
} }

6
Sources/Plasma/PubUtilLib/plSDL/plVarDescriptor.cpp

@ -157,7 +157,7 @@ bool plVarDescriptor::Read(hsStream* s)
return false; return false;
} }
fName=s->ReadSafeString_TEMP(); fName=s->ReadSafeString();
plMsgStdStringHelper::Peek(fDisplayOptions, s); plMsgStdStringHelper::Peek(fDisplayOptions, s);
@ -165,7 +165,7 @@ bool plVarDescriptor::Read(hsStream* s)
fType=(Type)s->ReadByte(); fType=(Type)s->ReadByte();
fDefault = s->ReadSafeString_TEMP(); fDefault = s->ReadSafeString();
fFlags = s->ReadLE32(); fFlags = s->ReadLE32();
return true; return true;
@ -372,7 +372,7 @@ bool plSDVarDescriptor::Read(hsStream* s)
if (!plVarDescriptor::Read(s)) if (!plVarDescriptor::Read(s))
return false; return false;
plString sdName=s->ReadSafeString_TEMP(); plString sdName=s->ReadSafeString();
uint16_t version = s->ReadLE16(); uint16_t version = s->ReadLE16();
plStateDescriptor* sd=plSDLMgr::GetInstance()->FindDescriptor(sdName, version); plStateDescriptor* sd=plSDLMgr::GetInstance()->FindDescriptor(sdName, version);
hsAssert( sd, plString::Format("Failed to find sdl descriptor: %s,%d. Missing legacy descriptor?", sdName.c_str(), version ).c_str() ); hsAssert( sd, plString::Format("Failed to find sdl descriptor: %s,%d. Missing legacy descriptor?", sdName.c_str(), version ).c_str() );

2
Sources/Plasma/PubUtilLib/plSurface/plLayerAnimation.cpp

@ -736,7 +736,7 @@ void plLayerSDLAnimation::Read(hsStream* s, hsResMgr* mgr)
{ {
plLayerAnimationBase::Read(s, mgr); plLayerAnimationBase::Read(s, mgr);
fVarName = s->ReadSafeString_TEMP(); fVarName = s->ReadSafeString();
} }
void plLayerSDLAnimation::Write(hsStream* s, hsResMgr* mgr) void plLayerSDLAnimation::Write(hsStream* s, hsResMgr* mgr)

4
Sources/Tools/MaxComponent/plMultistageStage.cpp

@ -96,7 +96,7 @@ plString plBaseStage::GetName()
void plBaseStage::Read(hsStream *stream) void plBaseStage::Read(hsStream *stream)
{ {
stream->ReadLE16(); stream->ReadLE16();
fName = stream->ReadSafeString_TEMP(); fName = stream->ReadSafeString();
} }
void plBaseStage::Write(hsStream *stream) void plBaseStage::Write(hsStream *stream)
@ -137,7 +137,7 @@ void plStandardStage::Read(hsStream *stream)
uint16_t version = stream->ReadLE16(); uint16_t version = stream->ReadLE16();
fAnimName = stream->ReadSafeString_TEMP(); fAnimName = stream->ReadSafeString();
fNumLoops = stream->ReadLE32(); fNumLoops = stream->ReadLE32();
fLoopForever = stream->ReadBool(); fLoopForever = stream->ReadBool();
fForward = stream->ReadByte(); fForward = stream->ReadByte();

Loading…
Cancel
Save