Browse Source

Alright, this _TEMP_CONVERT_ stuff was a stupid idea

Michael Hansen 12 years ago
parent
commit
b219c3c3cc
  1. 2
      Sources/Plasma/Apps/plClient/plClient.cpp
  2. 10
      Sources/Plasma/Apps/plClient/winmain.cpp
  3. 62
      Sources/Plasma/CoreLib/hsStream.cpp
  4. 12
      Sources/Plasma/CoreLib/hsStream.h
  5. 62
      Sources/Plasma/CoreLib/plGeneric.cpp
  6. 15
      Sources/Plasma/CoreLib/plGeneric.h
  7. 22
      Sources/Plasma/CoreLib/plString.h
  8. 6
      Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.cpp
  9. 4
      Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp
  10. 2
      Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp
  11. 2
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp
  12. 4
      Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp
  13. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogMod.cpp
  14. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp
  15. 2
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.cpp
  16. 26
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.cpp
  17. 5
      Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h
  18. 4
      Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp
  19. 18
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp
  20. 15
      Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.cpp
  21. 31
      Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h
  22. 4
      Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
  23. 28
      Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp
  24. 4
      Sources/Plasma/FeatureLib/pfPython/pyGameScoreMsg.cpp
  25. 4
      Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp
  26. 8
      Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h
  27. 2
      Sources/Plasma/FeatureLib/pfPython/pyPlayerGlue.cpp
  28. 2
      Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp
  29. 6
      Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp
  30. 4
      Sources/Plasma/FeatureLib/pfPython/pyVault.cpp
  31. 2
      Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp
  32. 2
      Sources/Plasma/NucleusLib/pnKeyedObject/hsKeyedObject.cpp
  33. 73
      Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp
  34. 2
      Sources/Plasma/NucleusLib/pnUUID/pnUUID_Unix.cpp
  35. 2
      Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp
  36. 4
      Sources/Plasma/PubUtilLib/plAudio/plSound.cpp
  37. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h
  38. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAGMasterMod.cpp
  39. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAnimStage.cpp
  40. 16
      Sources/Plasma/PubUtilLib/plAvatar/plArmatureMod.cpp
  41. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainClimb.cpp
  42. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp
  43. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainHuman.cpp
  44. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvTaskSeek.cpp
  45. 6
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp
  46. 4
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarTasks.cpp
  47. 2
      Sources/Plasma/PubUtilLib/plAvatar/plSittingModifier.cpp
  48. 4
      Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp
  49. 2
      Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp
  50. 2
      Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h
  51. 20
      Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.cpp
  52. 12
      Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h
  53. 4
      Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.cpp
  54. 10
      Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h
  55. 2
      Sources/Plasma/PubUtilLib/plModifier/plCloneSpawnModifier.cpp
  56. 2
      Sources/Plasma/PubUtilLib/plModifier/plResponderModifier.cpp
  57. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp
  58. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp
  59. 8
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrShow.cpp
  60. 6
      Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp
  61. 2
      Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp
  62. 4
      Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp
  63. 26
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  64. 2
      Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp
  65. 2
      Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp
  66. 2
      Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp
  67. 4
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp
  68. 8
      Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSDLModifier.cpp
  69. 6
      Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp
  70. 6
      Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp
  71. 8
      Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp
  72. 6
      Sources/Plasma/PubUtilLib/plSDL/plStateDataRecord.cpp
  73. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp
  74. 10
      Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp
  75. 12
      Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp
  76. 8
      Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.cpp
  77. 2
      Sources/Plasma/PubUtilLib/plSurface/hsGMaterial.cpp
  78. 4
      Sources/Tools/MaxComponent/plAnimComponent.cpp
  79. 8
      Sources/Tools/MaxComponent/plAudioComponents.cpp
  80. 6
      Sources/Tools/MaxComponent/plAvatarComponent.cpp
  81. 2
      Sources/Tools/MaxComponent/plClickDragComponent.cpp
  82. 2
      Sources/Tools/MaxComponent/plFootstepComponent.cpp
  83. 4
      Sources/Tools/MaxComponent/plGUIComponents.cpp
  84. 4
      Sources/Tools/MaxComponent/plMaxAnimUtils.cpp
  85. 6
      Sources/Tools/MaxComponent/plPythonFileComponent.cpp
  86. 3
      Sources/Tools/MaxComponent/plResponderMtl.cpp
  87. 2
      Sources/Tools/MaxConvert/hsControlConverter.cpp
  88. 2
      Sources/Tools/MaxConvert/hsConverterUtils.cpp
  89. 30
      Sources/Tools/MaxConvert/hsMaterialConverter.cpp
  90. 4
      Sources/Tools/MaxConvert/plBitmapCreator.cpp
  91. 2
      Sources/Tools/MaxMain/plTextureExportLog.cpp
  92. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp
  93. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp
  94. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp
  95. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp
  96. 2
      Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp
  97. 6
      Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp

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

@ -1286,7 +1286,7 @@ void plClient::IRoomUnloaded(plSceneNode* node)
void plClient::IReadKeyedObjCallback(plKey key)
{
fInstance->IIncProgress(1, _TEMP_CONVERT_TO_CONST_CHAR(key->GetName()));
fInstance->IIncProgress(1, key->GetName().c_str());
}
//============================================================================

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

@ -998,15 +998,15 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
memset(cryptKey, 0, sizeof(cryptKey));
GetCryptKey(cryptKey, arrsize(cryptKey));
plString theUser = _TEMP_CONVERT_FROM_LITERAL(pLoginParam->username);
plString thePass = (_TEMP_CONVERT_FROM_LITERAL(password)).Left(kMaxPasswordLength);
plString theUser = pLoginParam->username;
plString thePass = plString(password).Left(kMaxPasswordLength);
// if the password field is the fake string then we've already
// loaded the namePassHash from the file
if (thePass.Compare(FAKE_PASS_STRING) != 0)
{
wchar_t domain[15];
PathSplitEmail(_TEMP_CONVERT_TO_WCHAR_T(theUser), nil, 0, domain, arrsize(domain), nil, 0, nil, 0, 0);
PathSplitEmail(theUser.ToWchar(), nil, 0, domain, arrsize(domain), nil, 0, nil, 0, 0);
if (StrLen(domain) == 0 || StrCmpI(domain, L"gametap") == 0) {
plSHA1Checksum shasum(StrLen(password) * sizeof(password[0]), (uint8_t*)password);
@ -1026,7 +1026,7 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
}
}
NetCommSetAccountUsernamePassword(_TEMP_CONVERT_TO_WCHAR_T(theUser), pLoginParam->namePassHash);
NetCommSetAccountUsernamePassword(theUser.ToWchar(), pLoginParam->namePassHash);
if (TGIsCider)
NetCommSetAuthTokenAndOS(nil, L"mac");
else
@ -1436,7 +1436,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
if (!eventExists) // if it is missing, assume patcher wasn't launched
{
cmdLine << _TEMP_CONVERT_FROM_WCHAR_T(s_patcherExeName);
cmdLine << plString::FromWchar(s_patcherExeName);
GetAuthSrvHostnames(&addrs);
if(strlen(addrs[0]))

62
Sources/Plasma/CoreLib/hsStream.cpp

@ -139,40 +139,36 @@ uint32_t hsStream::WriteFmtV(const char * fmt, va_list av)
return Write( buf.length(), buf.data() );
}
uint32_t hsStream::WriteSafeStringLong(const char *string)
uint32_t hsStream::WriteSafeStringLong(const plString &string)
{
uint32_t len = 0;
if (string)
len = strlen(string);
uint32_t len = string.GetSize();
WriteLE32(len);
if (len > 0)
{
char *buff = new char[len+1];
const char *buffp = string.c_str();
int i;
for (i = 0; i < len; i++)
{
buff[i] = ~string[i];
WriteByte(~buffp[i]);
}
buff[len] = '\0';
uint32_t result = Write(len, buff);
delete [] buff;
return result;
return static_cast<uint32_t>(i);
}
else
return 0;
}
uint32_t hsStream::WriteSafeWStringLong(const wchar_t *string)
uint32_t hsStream::WriteSafeWStringLong(const plString &string)
{
uint32_t len = wcslen(string);
plStringBuffer<wchar_t> wbuff = string.ToWchar();
uint32_t len = wbuff.GetSize();
WriteLE32(len);
if (len > 0)
{
int i;
const wchar_t *buffp = wbuff.GetData();
for (i=0; i<len; i++)
{
wchar_t buff = ~string[i];
WriteLE16((uint16_t)buff);
WriteLE16((uint16_t)~buffp[i]);
}
WriteLE16((uint16_t)L'\0');
}
@ -224,35 +220,31 @@ wchar_t *hsStream::ReadSafeWStringLong()
return retVal;
}
uint32_t hsStream::WriteSafeString(const char *string)
uint32_t hsStream::WriteSafeString(const plString &string)
{
int len = 0;
if (string)
len = strlen(string);
hsAssert(len<0xf000, xtl::format("string len of %d is too long for WriteSafeString %s, use WriteSafeStringLong",
string, len).c_str() );
int len = string.GetSize();
hsAssert(len<0xf000, plString::Format("string len of %d is too long for WriteSafeString %s, use WriteSafeStringLong",
len, string.c_str()).c_str() );
WriteLE16(len | 0xf000);
if (len > 0)
{
char *buff = new char[len+1];
int i;
const char *buffp = string.c_str();
for (i = 0; i < len; i++)
{
buff[i] = ~string[i];
WriteByte(~buffp[i]);
}
buff[len] = '\0';
uint32_t result = Write(len, buff);
delete [] buff;
return result;
return static_cast<uint32_t>(i);
}
else
return 0;
}
uint32_t hsStream::WriteSafeWString(const wchar_t *string)
uint32_t hsStream::WriteSafeWString(const plString &string)
{
int len = wcslen(string);
plStringBuffer<wchar_t> wbuff = string.ToWchar();
int len = wbuff.GetSize();
hsAssert(len<0xf000, xtl::format("string len of %d is too long for WriteSafeWString, use WriteSafeWStringLong",
len).c_str() );
@ -260,10 +252,10 @@ uint32_t hsStream::WriteSafeWString(const wchar_t *string)
if (len > 0)
{
int i;
const wchar_t *buffp = wbuff.GetData();
for (i=0; i<len; i++)
{
wchar_t buff = ~string[i];
WriteLE16((uint16_t)buff);
WriteLE16((uint16_t)~buffp[i]);
}
WriteLE16((uint16_t)L'\0');
}
@ -328,16 +320,6 @@ wchar_t *hsStream::ReadSafeWString()
return retVal;
}
uint32_t hsStream::WriteSafeString(const plString &string)
{
return WriteSafeString(_TEMP_CONVERT_TO_CONST_CHAR(string));
}
uint32_t hsStream::WriteSafeWString(const plString &string)
{
return WriteSafeWString(_TEMP_CONVERT_TO_WCHAR_T(string));
}
plString hsStream::ReadSafeString_TEMP()
{
char *buffer = ReadSafeString();

12
Sources/Plasma/CoreLib/hsStream.h

@ -124,22 +124,20 @@ public:
virtual bool IsCompressed() { return false; }
uint32_t WriteString(const char cstring[]);
uint32_t WriteString(const plString & string) { return WriteString(_TEMP_CONVERT_TO_CONST_CHAR(string)); }
uint32_t WriteString(const plString & string) { return WriteString(string.c_str()); }
uint32_t WriteFmt(const char * fmt, ...);
uint32_t WriteFmtV(const char * fmt, va_list av);
uint32_t WriteSafeStringLong(const char *string); // uses 4 bytes for length
uint32_t WriteSafeWStringLong(const wchar_t *string);
uint32_t WriteSafeStringLong(const plString &string); // uses 4 bytes for length
uint32_t WriteSafeWStringLong(const plString &string);
char * ReadSafeStringLong();
wchar_t * ReadSafeWStringLong();
uint32_t WriteSafeString(const char *string); // uses 2 bytes for length
uint32_t WriteSafeWString(const wchar_t *string);
uint32_t WriteSafeString(const plString &string); // uses 2 bytes for length
uint32_t WriteSafeWString(const plString &string);
char * ReadSafeString();
wchar_t * ReadSafeWString();
uint32_t WriteSafeString(const plString &string); // uses 2 bytes for length
uint32_t WriteSafeWString(const plString &string);
plString ReadSafeString_TEMP();
plString ReadSafeWString_TEMP();

62
Sources/Plasma/CoreLib/plGeneric.cpp

@ -50,24 +50,7 @@ plGeneric::plGeneric(const int& val): fType(kInt), fBoolVal(false), fIntVal(val)
plGeneric::plGeneric(const double& val): fType(kFloat), fBoolVal(false), fIntVal(0), fFloatVal(val) {}
plGeneric::plGeneric(const char* val): fType(kString), fBoolVal(false), fIntVal(0), fFloatVal(0.0)
{
wchar_t* temp = hsStringToWString(val);
fStringVal = temp;
delete [] temp;
}
plGeneric::plGeneric(const std::string& val): fType(kString), fBoolVal(false), fIntVal(0), fFloatVal(0.0)
{
wchar_t* temp = hsStringToWString(val.c_str());
fStringVal = temp;
delete [] temp;
}
plGeneric::plGeneric(const wchar_t* val): fType(kString), fBoolVal(false), fIntVal(0), fFloatVal(0.0),
fStringVal(val) {}
plGeneric::plGeneric(const std::wstring& val): fType(kString), fBoolVal(false), fIntVal(0), fFloatVal(0.0),
plGeneric::plGeneric(const plString& val): fType(kString), fBoolVal(false), fIntVal(0), fFloatVal(0.0),
fStringVal(val) {}
void plGeneric::IReset()
@ -76,7 +59,7 @@ void plGeneric::IReset()
fBoolVal = false;
fIntVal = 0;
fFloatVal = 0.0;
fStringVal = L"";
fStringVal = plString();
}
plGeneric& plGeneric::operator=(const bool& val)
@ -103,35 +86,7 @@ plGeneric& plGeneric::operator=(const double& val)
return *this;
}
plGeneric& plGeneric::operator=(const char* val)
{
IReset();
fType = kString;
wchar_t* temp = hsStringToWString(val);
fStringVal = temp;
delete [] temp;
return *this;
}
plGeneric& plGeneric::operator=(const std::string& val)
{
IReset();
fType = kString;
wchar_t* temp = hsStringToWString(val.c_str());
fStringVal = temp;
delete [] temp;
return *this;
}
plGeneric& plGeneric::operator=(const wchar_t* val)
{
IReset();
fType = kString;
fStringVal = val;
return *this;
}
plGeneric& plGeneric::operator=(const std::wstring& val)
plGeneric& plGeneric::operator=(const plString& val)
{
IReset();
fType = kString;
@ -161,7 +116,7 @@ int plGeneric::Write(hsStream* stream)
break;
case kString:
stream->WriteSafeWString(fStringVal.c_str());
stream->WriteSafeWString(fStringVal);
break;
}
return stream->GetPosition();
@ -189,14 +144,7 @@ int plGeneric::Read(hsStream* stream)
break;
case kString:
{
wchar_t* temp = stream->ReadSafeWString();
if (temp)
{
fStringVal = temp;
delete [] temp;
}
}
fStringVal = stream->ReadSafeWString_TEMP();
break;
}
return stream->GetPosition();

15
Sources/Plasma/CoreLib/plGeneric.h

@ -62,7 +62,7 @@ private:
bool fBoolVal;
int fIntVal;
double fFloatVal;
std::wstring fStringVal;
plString fStringVal;
void IReset();
@ -71,19 +71,13 @@ public:
plGeneric(const bool& val);
plGeneric(const int& val);
plGeneric(const double& val);
plGeneric(const char* val);
plGeneric(const std::string& val);
plGeneric(const wchar_t* val);
plGeneric(const std::wstring& val);
plGeneric(const plString& val);
void SetToNull() {IReset();}
plGeneric& operator=(const bool& val);
plGeneric& operator=(const int& val);
plGeneric& operator=(const double& val);
plGeneric& operator=(const char* val);
plGeneric& operator=(const std::string& val);
plGeneric& operator=(const wchar_t* val);
plGeneric& operator=(const std::wstring& val);
plGeneric& operator=(const plString& val);
// the cast functions will NOT cast from one type to another, use
// GetType() to determine the type of parameter, then cast it to that type
@ -91,8 +85,7 @@ public:
operator bool() const {return fBoolVal;}
operator int() const {return fIntVal;}
operator double() const {return fFloatVal;}
operator const wchar_t*() const {return fStringVal.c_str();}
operator std::wstring() const {return fStringVal;}
operator plString() const {return fStringVal;}
int Write(hsStream* stream);
int Read(hsStream* stream);

22
Sources/Plasma/CoreLib/plString.h

@ -46,16 +46,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include <stddef.h>
/* NOTE & TODO:
* These macros are intentionally annoyingly named, to mark what code
* needs to be cleaned up after a larger portion of Plasma is converted
* to plString.
*/
#define _TEMP_CONVERT_FROM_LITERAL(x) plString::FromUtf8((x))
#define _TEMP_CONVERT_FROM_WCHAR_T(x) plString::FromWchar((x))
#define _TEMP_CONVERT_TO_CONST_CHAR(x) ((x).c_str())
#define _TEMP_CONVERT_TO_WCHAR_T(x) ((x).ToWchar().GetData())
typedef unsigned int UniChar;
#define SSO_CHARS (16)
@ -173,13 +163,15 @@ private:
public:
plString() { }
//plString(const char *utf8) { IConvertFromUtf8(utf8, kSizeAuto, false); }
//plString(const wchar_t *wstr) { IConvertFromWchar(wstr, kSizeAuto); }
#ifndef PLSTRING_POLLUTE_ASCII_CAST
plString(const char *ascii) { IConvertFromUtf8(ascii, kSizeAuto); }
#endif
plString(const plString &copy) : fUtf8Buffer(copy.fUtf8Buffer) { }
plString(const plStringBuffer<char> &init) { operator=(init); }
//plString &operator=(const char *utf8) { IConvertFromUtf8(utf8, kSizeAuto, false); return *this; }
//plString &operator=(const wchar_t *wstr) { IConvertFromWchar(wstr, kSizeAuto); return *this; }
#ifndef PLSTRING_POLLUTE_ASCII_CAST
plString &operator=(const char *ascii) { IConvertFromUtf8(ascii, kSizeAuto); return *this; }
#endif
plString &operator=(const plString &copy) { fUtf8Buffer = copy.fUtf8Buffer; return *this; }
plString &operator=(const plStringBuffer<char> &init);
@ -213,8 +205,10 @@ public:
return str;
}
#ifndef PLSTRING_POLLUTE_C_STR
const char *c_str(const char *substitute = "") const
{ return IsEmpty() ? substitute : fUtf8Buffer.GetData(); }
#endif
char CharAt(size_t position) const { return c_str()[position]; }

6
Sources/Plasma/FeatureLib/pfAnimation/plAnimDebugList.cpp

@ -127,7 +127,7 @@ void plAnimDebugList::ShowReport()
str = plString::Format("%s: %s %.3f (%.3f)", mat->GetKeyName().c_str(), layerAnim->GetKeyName().c_str(),
layerAnim->GetTimeConvert().CurrentAnimTime(),
layerAnim->GetTimeConvert().WorldToAnimTimeNoUpdate(hsTimer::GetSysSeconds()));
txt.DrawString(x, y, _TEMP_CONVERT_TO_CONST_CHAR(str));
txt.DrawString(x, y, str.c_str());
y += yOff;
}
layer = layer->GetOverLay();
@ -149,7 +149,7 @@ void plAnimDebugList::ShowReport()
continue;
str = plString::Format(" %s", so->GetKeyName().c_str());
txt.DrawString(x, y, _TEMP_CONVERT_TO_CONST_CHAR(str));
txt.DrawString(x, y, str.c_str());
y += yOff;
for (j = 0; j < mod->GetNumATCAnimations(); j++)
@ -158,7 +158,7 @@ void plAnimDebugList::ShowReport()
str = plString::Format(" %s: %.3f (%.3f)", anim->GetAnimation()->GetName().c_str(),
anim->GetTimeConvert()->CurrentAnimTime(),
anim->GetTimeConvert()->WorldToAnimTimeNoUpdate(hsTimer::GetSysSeconds()));
txt.DrawString(x, y, _TEMP_CONVERT_TO_CONST_CHAR(str));
txt.DrawString(x, y, str.c_str());
y += yOff;
}
}

4
Sources/Plasma/FeatureLib/pfCharacter/pfMarkerInfo.cpp

@ -77,7 +77,7 @@ void pfMarkerInfo::Init()
plLocation markerLoc = plKeyFinder::Instance().FindLocation("GlobalMarkers", "Markers");
if (markerLoc.IsValid())
fMarkerUoid = plUoid(markerLoc, plSceneObject::Index(), _TEMP_CONVERT_FROM_LITERAL("MarkerRoot"));
fMarkerUoid = plUoid(markerLoc, plSceneObject::Index(), "MarkerRoot");
else
fMarkerUoid.Invalidate();
}
@ -101,7 +101,7 @@ void pfMarkerInfo::Spawn(MarkerType type)
plLocation markerLoc = plKeyFinder::Instance().FindLocation("GlobalMarkers", "Markers");
if (markerLoc.IsValid())
fMarkerUoid = plUoid(markerLoc, plSceneObject::Index(), _TEMP_CONVERT_FROM_LITERAL("MarkerRoot"));
fMarkerUoid = plUoid(markerLoc, plSceneObject::Index(), "MarkerRoot");
else
{
hsAssert(false, "Unable to spawn markers because the marker age was not loaded or found");

2
Sources/Plasma/FeatureLib/pfConsole/pfAvatarConsoleCommands.cpp

@ -173,7 +173,7 @@ PF_CONSOLE_CMD( Avatar_Spawn, Show, "", "Print a list of spawn points.")
const plSpawnModifier * spawn = mgr->GetSpawnPoint(i);
if(spawn)
{
plString soName = _TEMP_CONVERT_FROM_LITERAL("(none)");
plString soName = "(none)";
if (spawn->GetNumTargets() > 0)
{

2
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp

@ -6980,7 +6980,7 @@ PF_CONSOLE_CMD( Python,
args = plString::Format("(%s,)", tmp);
}
else
args = _TEMP_CONVERT_FROM_LITERAL("()");
args = "()";
PythonInterface::RunFunctionSafe("xCheat", params[0], args.c_str());

4
Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommandsNet.cpp

@ -231,12 +231,12 @@ PF_CONSOLE_CMD( Net, // groupName
{
// send chat text
plString text=plNetClientMgr::GetInstance()->GetPlayerName();
text += _TEMP_CONVERT_FROM_LITERAL(":");
text += ":";
int i;
for(i=0;i<numParams;i++)
{
text += plString::FromUtf8( (char*)params[i] );
text += _TEMP_CONVERT_FROM_LITERAL(" ");
text += " ";
}
plConsoleMsg *cMsg = new plConsoleMsg( plConsoleMsg::kAddLine, text.c_str() );
cMsg->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce);

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

@ -498,7 +498,7 @@ static bool showBounds = false;
if( showBounds )
{
const hsBounds3 &bnds = fMousedCtrl->GetBounds();
plDebugText::Instance().DrawString( (uint16_t)(bnds.GetMins().fX), (uint16_t)(bnds.GetMins().fY), _TEMP_CONVERT_TO_CONST_CHAR( fMousedCtrl->GetKeyName() ), (uint32_t)0xffffff00 );
plDebugText::Instance().DrawString( (uint16_t)(bnds.GetMins().fX), (uint16_t)(bnds.GetMins().fY), fMousedCtrl->GetKeyName().c_str(), (uint32_t)0xffffff00 );
}
#endif

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

@ -388,7 +388,7 @@ bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
{
if (key == KEY_C)
{
plClipboard::GetInstance().SetClipboardText(_TEMP_CONVERT_FROM_WCHAR_T(fBuffer));
plClipboard::GetInstance().SetClipboardText(plString::FromWchar(fBuffer));
}
else if (key == KEY_V)
{

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

@ -1113,7 +1113,7 @@ bool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, p
// Too lazy to worry about that...
if (key == KEY_C)
{
plClipboard::GetInstance().SetClipboardText(_TEMP_CONVERT_FROM_WCHAR_T(fBuffer.AcquireArray()));
plClipboard::GetInstance().SetClipboardText(plString::FromWchar(fBuffer.AcquireArray()));
}
else if (key == KEY_V)
{

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

@ -121,8 +121,8 @@ void pfGUITextBoxMod::IUpdate( void )
fDynTextMap->ClearToColor( GetColorScheme()->fBackColor );
std::wstring drawStr;
if (fUseLocalizationPath && !fLocalizationPath.empty() && pfLocalizationMgr::InstanceValid())
drawStr = pfLocalizationMgr::Instance().GetString(fLocalizationPath.c_str());
if (fUseLocalizationPath && !fLocalizationPath.IsEmpty() && pfLocalizationMgr::InstanceValid())
drawStr = pfLocalizationMgr::Instance().GetString(fLocalizationPath.ToWchar().GetData());
else
{
if( fText != nil )
@ -170,9 +170,7 @@ void pfGUITextBoxMod::Read( hsStream *s, hsResMgr *mgr )
fUseLocalizationPath = s->ReadBool();
if (fUseLocalizationPath)
{
wchar_t* temp = s->ReadSafeWString();
fLocalizationPath = temp;
delete [] temp;
fLocalizationPath = s->ReadSafeWString_TEMP();
}
}
@ -192,11 +190,11 @@ void pfGUITextBoxMod::Write( hsStream *s, hsResMgr *mgr )
// Make sure we only write out to use localization path if the box is checked
// and the path isn't empty
bool useLoc = fUseLocalizationPath && !fLocalizationPath.empty();
bool useLoc = fUseLocalizationPath && !fLocalizationPath.IsEmpty();
s->WriteBool(useLoc);
if (useLoc)
s->WriteSafeWString(fLocalizationPath.c_str());
s->WriteSafeWString(fLocalizationPath);
}
//// HandleMouseDown/Up //////////////////////////////////////////////////////
@ -240,22 +238,12 @@ void pfGUITextBoxMod::SetText( const wchar_t *text )
IUpdate();
}
void pfGUITextBoxMod::SetLocalizationPath(const wchar_t* path)
void pfGUITextBoxMod::SetLocalizationPath(const plString& path)
{
if (path)
if (!path.IsNull())
fLocalizationPath = path;
}
void pfGUITextBoxMod::SetLocalizationPath(const char* path)
{
if (path)
{
wchar_t* wPath = hsStringToWString(path);
fLocalizationPath = wPath;
delete [] wPath;
}
}
void pfGUITextBoxMod::SetUseLocalizationPath(bool use)
{
fUseLocalizationPath = use;

5
Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h

@ -59,7 +59,7 @@ class pfGUITextBoxMod : public pfGUIControlMod
protected:
wchar_t *fText;
std::wstring fLocalizationPath;
plString fLocalizationPath;
bool fUseLocalizationPath;
@ -99,8 +99,7 @@ class pfGUITextBoxMod : public pfGUIControlMod
void SetText( const char *text );
void SetText( const wchar_t *text );
void SetLocalizationPath(const wchar_t* path);
void SetLocalizationPath(const char* path);
void SetLocalizationPath(const plString& path);
void SetUseLocalizationPath(bool use);
virtual void UpdateColorScheme() { IPostSetUpDynTextMap(); IUpdate(); }

4
Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.cpp

@ -143,7 +143,7 @@ static void OnScoreCreate(
int32_t value
) {
ScoreUpdateParam* p = (ScoreUpdateParam*)param;
pfGameScore* score = new pfGameScore(scoreId, ownerId, _TEMP_CONVERT_FROM_LITERAL(gameName), gameType, value);
pfGameScore* score = new pfGameScore(scoreId, ownerId, gameName, gameType, value);
pfGameScoreUpdateMsg* msg = new pfGameScoreUpdateMsg(result, score, value);
msg->Send(p->fReceiver);
delete p;
@ -165,7 +165,7 @@ static void OnScoreFound(
for (uint32_t i = 0; i < scoreCount; ++i)
{
const NetGameScore ngs = scores[i];
vec[i] = new pfGameScore(ngs.scoreId, ngs.ownerId, _TEMP_CONVERT_FROM_WCHAR_T(ngs.gameName), ngs.gameType, ngs.value);
vec[i] = new pfGameScore(ngs.scoreId, ngs.ownerId, plString::FromWchar(ngs.gameName), ngs.gameType, ngs.value);
}
ScoreFindParam* p = (ScoreFindParam*)param;

18
Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp

@ -472,7 +472,7 @@ pfBookData::pfBookData(const plString &guiName /* = nil */)
if (!guiName.IsEmpty())
fGUIName = guiName;
else
fGUIName = _TEMP_CONVERT_FROM_LITERAL("BkBook");
fGUIName = "BkBook";
}
pfBookData::~pfBookData()
@ -1140,9 +1140,9 @@ std::map<plString,pfBookData*> pfJournalBook::fBookGUIs;
void pfJournalBook::SingletonInit( void )
{
fBookGUIs[_TEMP_CONVERT_FROM_LITERAL("BkBook")] = new pfBookData(); // load the default book data object
hsgResMgr::ResMgr()->NewKey(_TEMP_CONVERT_FROM_LITERAL("BkBook"),fBookGUIs[_TEMP_CONVERT_FROM_LITERAL("BkBook")],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation());
fBookGUIs[_TEMP_CONVERT_FROM_LITERAL("BkBook")]->LoadGUI();
fBookGUIs["BkBook"] = new pfBookData(); // load the default book data object
hsgResMgr::ResMgr()->NewKey("BkBook",fBookGUIs["BkBook"],pfGameGUIMgr::GetInstance()->GetKey()->GetUoid().GetLocation());
fBookGUIs["BkBook"]->LoadGUI();
}
void pfJournalBook::SingletonShutdown( void )
@ -1207,7 +1207,7 @@ pfJournalBook::pfJournalBook( const char *esHTMLSource, plKey coverImageKey, plK
if (!guiName.IsEmpty())
fCurBookGUI = guiName;
else
fCurBookGUI = _TEMP_CONVERT_FROM_LITERAL("BkBook");
fCurBookGUI = "BkBook";
if (fBookGUIs.find(fCurBookGUI) == fBookGUIs.end())
{
fBookGUIs[fCurBookGUI] = new pfBookData(fCurBookGUI);
@ -1243,7 +1243,7 @@ pfJournalBook::pfJournalBook( const wchar_t *esHTMLSource, plKey coverImageKey,
if (!guiName.IsEmpty())
fCurBookGUI = guiName;
else
fCurBookGUI = _TEMP_CONVERT_FROM_LITERAL("BkBook");
fCurBookGUI = "BkBook";
if (fBookGUIs.find(fCurBookGUI) == fBookGUIs.end())
{
fBookGUIs[fCurBookGUI] = new pfBookData(fCurBookGUI);
@ -1292,7 +1292,7 @@ void pfJournalBook::SetGUI( const plString &guiName )
if (!guiName.IsEmpty())
fCurBookGUI = guiName;
if (fBookGUIs.find(fCurBookGUI) == fBookGUIs.end())
fCurBookGUI = _TEMP_CONVERT_FROM_LITERAL("BkBook"); // requested GUI isn't loaded, so use default GUI
fCurBookGUI = "BkBook"; // requested GUI isn't loaded, so use default GUI
SetEditable(fWantEditing); // make sure that if we want editing, to set it
ICompileSource(fUncompiledSource.c_str(), fDefLoc); // recompile the source to be safe
}
@ -2506,9 +2506,9 @@ plKey pfJournalBook::IGetMipmapKey( const wchar_t *name, const plLocation &loc
// facilitate fast prototyping
plMipmap *mip;
if( cName.Find( ".png" ) >= 0 )
mip = plPNG::Instance().ReadFromFile( _TEMP_CONVERT_TO_CONST_CHAR( cName ) );
mip = plPNG::Instance().ReadFromFile( cName.c_str() );
else
mip = plJPEG::Instance().ReadFromFile( _TEMP_CONVERT_TO_CONST_CHAR( cName ) );
mip = plJPEG::Instance().ReadFromFile( cName.c_str() );
hsgResMgr::ResMgr()->NewKey( cName, mip, loc );
return mip->GetKey();

15
Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.cpp

@ -49,18 +49,3 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
const char* pfKIMsg::kChronicleKILevel = "PlayerKILevel";
void pfKIMsg::SetString( const char *str )
{
wchar_t *temp = hsStringToWString( str );
fString = temp;
delete [] temp;
}
std::string pfKIMsg::GetString( void )
{
char *temp = hsWStringToString( fString.c_str() );
std::string retVal = temp;
delete [] temp;
return retVal;
}

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

@ -67,7 +67,7 @@ class pfKIMsg : public plMessage
// for the hack chat message thingy
char *fUser;
uint32_t fPlayerID;
std::wstring fString;
plString fString;
// for the SetChatFadeDelay
float fDelay;
@ -78,7 +78,7 @@ class pfKIMsg : public plMessage
void IInit()
{
fCommand = kNoCommand;
fString = L"";
fString = plString();
fUser = nil;
fPlayerID = 0;
fFlags = 0;
@ -192,14 +192,7 @@ class pfKIMsg : public plMessage
s->ReadLE( &fCommand );
fUser = s->ReadSafeString();
fPlayerID = s->ReadLE32();
wchar_t *temp = s->ReadSafeWString();
if (temp) // apparently ReadSafeWString can return null, which std::wstring doesn't like being assigned
fString = temp;
else
fString = L"";
delete [] temp;
fString = s->ReadSafeWString_TEMP();
fFlags = s->ReadLE32();
fDelay = s->ReadLEScalar();
fValue = s->ReadLE32();
@ -211,31 +204,29 @@ class pfKIMsg : public plMessage
s->WriteLE( fCommand );
s->WriteSafeString( fUser );
s->WriteLE32( fPlayerID );
s->WriteSafeWString( fString.c_str() );
s->WriteSafeWString( fString );
s->WriteLE32( fFlags );
s->WriteLEScalar(fDelay);
s->WriteLE32( fValue );
}
uint8_t GetCommand( void ) const { return fCommand; }
uint8_t GetCommand( void ) const { return fCommand; }
void SetString( const char *str );
void SetString( const wchar_t *str ) { fString = str; }
std::string GetString( void );
std::wstring GetStringU( void ) { return fString; }
void SetString( const plString &str ) { fString = str; }
plString GetString( void ) { return fString; }
void SetUser( const char *str, uint32_t pid=0 ) { fUser = hsStrcpy( str ); fPlayerID = pid; }
const char *GetUser( void ) { return fUser; }
uint32_t GetPlayerID( void ) { return fPlayerID; }
uint32_t GetPlayerID( void ) { return fPlayerID; }
void SetFlags( uint32_t flags ) { fFlags = flags; }
uint32_t GetFlags( void ) const { return fFlags; }
uint32_t GetFlags( void ) const { return fFlags; }
void SetDelay( float delay ) { fDelay = delay; }
float GetDelay( void ) { return fDelay; }
float GetDelay( void ) { return fDelay; }
void SetIntValue( int32_t value ) { fValue = value; }
int32_t GetIntValue( void ) { return fValue; }
int32_t GetIntValue( void ) { return fValue; }
#endif // def KI_CONSTANTS_ONLY
};

4
Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp

@ -1127,7 +1127,7 @@ uint32_t cyMisc::SendRTChat(pyPlayer& from, const std::vector<pyPlayer*> & tolis
{
// create the messge that will contain the chat message
pfKIMsg *msg = new pfKIMsg( pfKIMsg::kHACKChatMsg );
msg->SetString( message );
msg->SetString( plString::FromWchar(message) );
msg->SetUser( from.GetPlayerName(), from.GetPlayerID() );
msg->SetFlags( flags );
msg->SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce);
@ -1199,7 +1199,7 @@ void cyMisc::SendKIMessageS(uint32_t command, const wchar_t* value)
// create the mesage to send
pfKIMsg *msg = new pfKIMsg( (uint8_t)command );
msg->SetString( value );
msg->SetString( plString::FromWchar( value ) );
// send it off
plgDispatch::MsgSend( msg );

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

@ -1862,7 +1862,7 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
// yes...
// find the value that would go with a command
PyObject* value;
std::wstring str;
plStringBuffer<wchar_t> str;
switch (pkimsg->GetCommand())
{
case pfKIMsg::kSetChatFadeDelay:
@ -1873,8 +1873,8 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
break;
case pfKIMsg::kYesNoDialog:
value = PyTuple_New(2);
str = pkimsg->GetStringU();
PyTuple_SetItem(value, 0, PyUnicode_FromWideChar(str.c_str(), str.length()));
str = pkimsg->GetString().ToWchar();
PyTuple_SetItem(value, 0, PyUnicode_FromWideChar(str, str.GetSize()));
PyTuple_SetItem(value, 1, pyKey::New(pkimsg->GetSender()));
break;
case pfKIMsg::kGZInRange:
@ -1884,23 +1884,23 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
break;
case pfKIMsg::kRateIt:
value = PyTuple_New(3);
str = pkimsg->GetStringU();
str = pkimsg->GetString().ToWchar();
PyTuple_SetItem(value,0,PyString_FromString(pkimsg->GetUser()));
PyTuple_SetItem(value,1,PyUnicode_FromWideChar(str.c_str(), str.length()));
PyTuple_SetItem(value,1,PyUnicode_FromWideChar(str, str.GetSize()));
PyTuple_SetItem(value,2,PyLong_FromLong(pkimsg->GetIntValue()));
break;
case pfKIMsg::kRegisterImager:
value = PyTuple_New(2);
str = pkimsg->GetStringU();
PyTuple_SetItem(value, 0, PyUnicode_FromWideChar(str.c_str(), str.length()));
str = pkimsg->GetString().ToWchar();
PyTuple_SetItem(value, 0, PyUnicode_FromWideChar(str, str.GetSize()));
PyTuple_SetItem(value, 1, pyKey::New(pkimsg->GetSender()));
break;
case pfKIMsg::kAddPlayerDevice:
case pfKIMsg::kRemovePlayerDevice:
{
str = pkimsg->GetStringU();
if ( str.length() > 0 )
value = PyUnicode_FromWideChar(str.c_str(), str.length());
str = pkimsg->GetString().ToWchar();
if ( str.GetSize() > 0 )
value = PyUnicode_FromWideChar(str, str.GetSize());
else
{
Py_INCREF(Py_None);
@ -1915,8 +1915,8 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
case pfKIMsg::kKIOKDialogNoQuit:
case pfKIMsg::kGZFlashUpdate:
case pfKIMsg::kKICreateMarkerNode:
str = pkimsg->GetStringU();
value = PyUnicode_FromWideChar(str.c_str(), str.length());
str = pkimsg->GetString().ToWchar();
value = PyUnicode_FromWideChar(str, str.GetSize());
break;
case pfKIMsg::kMGStartCGZGame:
case pfKIMsg::kMGStopCGZGame:
@ -2905,7 +2905,7 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
void plPythonFileMod::ReportError()
{
plString objectName = this->GetKeyName();
objectName += _TEMP_CONVERT_FROM_LITERAL(" - ");
objectName += " - ";
PythonInterface::WriteToStdErr(objectName.c_str());
@ -3050,4 +3050,4 @@ void plPythonFileMod::Write(hsStream* stream, hsResMgr* mgr)
//// kGlobalNameKonstant /////////////////////////////////////////////////
// My continued attempt to spread the CORRECT way to spell konstant. -mcn
plString plPythonFileMod::kGlobalNameKonstant = _TEMP_CONVERT_FROM_LITERAL("VeryVerySpecialPythonFileMod");
plString plPythonFileMod::kGlobalNameKonstant("VeryVerySpecialPythonFileMod");

4
Sources/Plasma/FeatureLib/pfPython/pyGameScoreMsg.cpp

@ -61,8 +61,8 @@ PyObject* pyGameScoreMsg::CreateFinal(pfGameScoreMsg* msg)
plString pyGameScoreMsg::GetError() const
{
if (fMsg)
return _TEMP_CONVERT_FROM_WCHAR_T(NetErrorToString(fMsg->GetResult()));
return _TEMP_CONVERT_FROM_LITERAL("pfGameScoreMsg is NULL");
return plString::FromWchar(NetErrorToString(fMsg->GetResult()));
return "pfGameScoreMsg is NULL";
}
bool pyGameScoreMsg::IsValid() const

4
Sources/Plasma/FeatureLib/pfPython/pyImageGlue.cpp

@ -291,7 +291,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadJPEGFromDisk, args, "Params: filename,widt
if (PyString_CheckEx(filenameObj))
{
plString text = PyString_AsStringEx(filenameObj);
PyObject* ret = pyImage::LoadJPEGFromDisk(_TEMP_CONVERT_TO_WCHAR_T(text), width, height);
PyObject* ret = pyImage::LoadJPEGFromDisk(text.ToWchar(), width, height);
return ret;
}
else
@ -313,7 +313,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadPNGFromDisk, args, "Params: filename,width
if (PyString_CheckEx(filenameObj))
{
plString text = PyString_AsStringEx(filenameObj);
PyObject* ret = pyImage::LoadPNGFromDisk(_TEMP_CONVERT_TO_WCHAR_T(text), width, height);
PyObject* ret = pyImage::LoadPNGFromDisk(text.ToWchar(), width, height);
return ret;
}
else

8
Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h

@ -84,8 +84,8 @@ public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptBook);
static PyObject *New(std::string htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = _TEMP_CONVERT_FROM_LITERAL(""));
static PyObject *New(std::wstring htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = _TEMP_CONVERT_FROM_LITERAL(""));
static PyObject *New(std::string htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
static PyObject *New(std::wstring htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyJournalBook object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyJournalBook); // converts a PyObject to a pyJournalBook (throws error if not correct type)
@ -94,8 +94,8 @@ public:
static void AddPlasmaConstantsClasses(PyObject *m);
// Deletes the existing book and re-creates it, for use by the python glue
void MakeBook(std::string esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = _TEMP_CONVERT_FROM_LITERAL(""));
void MakeBook(std::wstring esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = _TEMP_CONVERT_FROM_LITERAL(""));
void MakeBook(std::string esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
void MakeBook(std::wstring esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
// Interface functions per book
virtual void Show( bool startOpened );

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

@ -103,7 +103,7 @@ PYTHON_INIT_DEFINITION(ptPlayer, args, keywords)
PYTHON_RETURN_INIT_ERROR;
}
self->fThis->Init(key, _TEMP_CONVERT_TO_CONST_CHAR(name), pid, distSeq);
self->fThis->Init(key, name.c_str(), pid, distSeq);
PYTHON_RETURN_INIT_OK;
}

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

@ -223,7 +223,7 @@ plString pySceneObject::GetName()
{
if ( fSceneObjects.Count() > 0 )
return fSceneObjects[0]->GetName();
return _TEMP_CONVERT_FROM_LITERAL("");
return plString();
}
PyObject* pySceneObject::findObj(const plString& name)

6
Sources/Plasma/FeatureLib/pfPython/pyStatusLog.cpp

@ -72,7 +72,7 @@ bool pyStatusLog::Open(plString logName, uint32_t numLines, uint32_t flags)
// create a status log guy for this
fICreatedLog = true;
fLog = plStatusLogMgr::GetInstance().CreateStatusLog( (uint8_t)numLines, _TEMP_CONVERT_TO_CONST_CHAR(logName), flags );
fLog = plStatusLogMgr::GetInstance().CreateStatusLog( (uint8_t)numLines, logName.c_str(), flags );
if (fLog)
{
fLog->SetForceLog(true);
@ -85,7 +85,7 @@ bool pyStatusLog::Write(plString text)
{
if (fLog)
{
fLog->AddLine(_TEMP_CONVERT_TO_CONST_CHAR(text));
fLog->AddLine(text.c_str());
return true;
}
@ -100,7 +100,7 @@ bool pyStatusLog::WriteColor(plString text, pyColor& color)
((uint32_t)(color.getRed()*255)<<16) +
((uint32_t)(color.getGreen()*255)<<8) +
((uint32_t)(color.getBlue()*255));
fLog->AddLine( _TEMP_CONVERT_TO_CONST_CHAR(text), st_color );
fLog->AddLine( text.c_str(), st_color );
return true;
}

4
Sources/Plasma/FeatureLib/pfPython/pyVault.cpp

@ -673,8 +673,8 @@ void pyVault::CreateNeighborhood()
plUUID guid(GuidGenerate());
link.GetAgeInfo()->SetAgeInstanceGuid(&guid);
link.GetAgeInfo()->SetAgeUserDefinedName( _TEMP_CONVERT_TO_CONST_CHAR(title) );
link.GetAgeInfo()->SetAgeDescription( _TEMP_CONVERT_TO_CONST_CHAR(desc) );
link.GetAgeInfo()->SetAgeUserDefinedName( title.c_str() );
link.GetAgeInfo()->SetAgeDescription( desc.c_str() );
VaultRegisterOwnedAge(&link);
}

2
Sources/Plasma/NucleusLib/pnDispatch/plDispatch.cpp

@ -341,7 +341,7 @@ void plDispatch::IMsgDispatch()
uint32_t rcvTicks = hsTimer::GetPrecTickCount();
// Object could be deleted by this message, so we need to log this stuff now
plString keyname = _TEMP_CONVERT_FROM_LITERAL("(unknown)");
plString keyname = "(unknown)";
const char* className = "(unknown)";
uint32_t clonePlayerID = 0;
if (plDispatchLogBase::IsLoggingLong())

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

@ -70,7 +70,7 @@ plString hsKeyedObject::GetKeyName() const
if (fpKey)
return fpKey->GetName();
else
return _TEMP_CONVERT_FROM_LITERAL("(unknown)");
return "(unknown)";
}
hsKeyedObject::~hsKeyedObject()

73
Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp

@ -82,48 +82,47 @@ struct plKeySeed
// 2) Be sure your ClassIndex CLASS_INDEX(plSceneObject) matches the type of object you want to have the fixedKey
// 3) Make sure the Obj is unique for this location/Type Combo... (validated at runtime)
#define _TCFL _TEMP_CONVERT_FROM_LITERAL
plKeySeed SeedList[] = {
// Key Enum Type Obj
{ kFirst_Fixed_KEY, CLASS_INDEX_SCOPED( plSceneObject ), _TCFL("kFirst_Fixed_KEY") },
{ kLOSObject_KEY, CLASS_INDEX_SCOPED( plLOSDispatch ), _TCFL("kLOSObject_KEY"), },
{ kTimerCallbackManager_KEY, CLASS_INDEX_SCOPED( plTimerCallbackManager ), _TCFL("kTimerCallbackManager_KEY"), },
{ kConsoleObject_KEY, CLASS_INDEX_SCOPED( pfConsole ), _TCFL("kConsoleObject_KEY"), },
{ kAudioSystem_KEY, CLASS_INDEX_SCOPED( plAudioSystem ), _TCFL("kAudioSystem_KEY"), },
{ kInput_KEY, CLASS_INDEX_SCOPED( plInputManager ), _TCFL("kInput_KEY"), },
{ kClient_KEY, CLASS_INDEX_SCOPED( plClient ), _TCFL("kClient_KEY"), },
{ kNetClientMgr_KEY, CLASS_INDEX_SCOPED( plNetClientMgr ), _TCFL("kNetClientMgr_KEY"), },
{ kListenerMod_KEY, CLASS_INDEX_SCOPED( plListener ), _TCFL("kListenerMod_KEY"), },
{ kTransitionMgr_KEY, CLASS_INDEX_SCOPED( plTransitionMgr ), _TCFL("kTransitionMgr_KEY"), },
{ kLinkEffectsMgr_KEY, CLASS_INDEX_SCOPED( plLinkEffectsMgr ), _TCFL("kLinkEffectsMgr_KEY"), },
{ kGameGUIMgr_KEY, CLASS_INDEX_SCOPED( pfGameGUIMgr ), _TCFL("kGameGUIMgr_KEY"), },
{ kGameGUIDynamicDlg_KEY, CLASS_INDEX_SCOPED( plSceneNode ), _TCFL("kGameGUIDynamicDlg_KEY"), },
{ kVirtualCamera1_KEY, CLASS_INDEX_SCOPED( plVirtualCam1 ), _TCFL("kVirtualCamera_KEY"), },
{ kDefaultCameraMod1_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), _TCFL("kDefaultCameraMod1_KEY"), },
{ kKIGUIGlue_KEY, CLASS_INDEX_SCOPED( pfKI ), _TCFL("kKIGUIGlue_KEY"), },
{ kClothingMgr_KEY, CLASS_INDEX_SCOPED( plClothingMgr ), _TCFL("kClothingMgr_KEY"), },
{ kInputInterfaceMgr_KEY, CLASS_INDEX_SCOPED( plInputInterfaceMgr ), _TCFL("kInputInterfaceMgr_KEY"), },
{ kAVIWriter_KEY, CLASS_INDEX_SCOPED( plAVIWriter ), _TCFL("kAVIWriter_KEY"), },
{ kResManagerHelper_KEY, CLASS_INDEX_SCOPED( plResManagerHelper ), _TCFL("kResManagerHelper_KEY"), },
{ kAvatarMgr_KEY, CLASS_INDEX_SCOPED( plAvatarMgr ), _TCFL("kAvatarMgr_KEY"), },
{ kSimulationMgr_KEY, CLASS_INDEX_SCOPED( plSimulationMgr ), _TCFL("kSimulationMgr_KEY"), },
{ kTransitionCamera_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), _TCFL("kTransitionCamera_KEY"), },
{ kCCRMgr_KEY, CLASS_INDEX_SCOPED( plCCRMgr ), _TCFL("kCCRMgr_KEY"), },
{ kNetClientCloneRoom_KEY, CLASS_INDEX_SCOPED( plSceneNode ), _TCFL("kNetClientCloneRoom_KEY"), },
{ kMarkerMgr_KEY, CLASS_INDEX_SCOPED( pfMarkerMgr ), _TCFL("kMarkerMgr_KEY"), },
{ kAutoProfile_KEY, CLASS_INDEX_SCOPED( plAutoProfile ), _TCFL("kAutoProfile_KEY"), },
{ kGlobalVisMgr_KEY, CLASS_INDEX_SCOPED( plVisMgr ), _TCFL("kGlobalVisMgr_KEY"), },
{ kFontCache_KEY, CLASS_INDEX_SCOPED( plFontCache ), _TCFL("kFontCache_KEY"), },
{ kRelevanceMgr_KEY, CLASS_INDEX_SCOPED( plRelevanceMgr ), _TCFL("kRelevanceMgr_KEY"), },
{ kJournalBookMgr_KEY, CLASS_INDEX_SCOPED( pfJournalBook ), _TCFL("kJournalBookMgr_KEY") },
{ kAgeLoader_KEY, CLASS_INDEX_SCOPED( plAgeLoader), _TCFL("kAgeLoader_KEY") },
{ kBuiltIn3rdPersonCamera_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), _TCFL("kBuiltIn3rdPersonCamera_KEY"), },
{ kSecurePreloader_KEY, CLASS_INDEX_SCOPED( pfSecurePreloader ), _TCFL("kSecurePreloader_KEY"), },
{ kFirst_Fixed_KEY, CLASS_INDEX_SCOPED( plSceneObject ), "kFirst_Fixed_KEY", },
{ kLOSObject_KEY, CLASS_INDEX_SCOPED( plLOSDispatch ), "kLOSObject_KEY", },
{ kTimerCallbackManager_KEY, CLASS_INDEX_SCOPED( plTimerCallbackManager ), "kTimerCallbackManager_KEY", },
{ kConsoleObject_KEY, CLASS_INDEX_SCOPED( pfConsole ), "kConsoleObject_KEY", },
{ kAudioSystem_KEY, CLASS_INDEX_SCOPED( plAudioSystem ), "kAudioSystem_KEY", },
{ kInput_KEY, CLASS_INDEX_SCOPED( plInputManager ), "kInput_KEY", },
{ kClient_KEY, CLASS_INDEX_SCOPED( plClient ), "kClient_KEY", },
{ kNetClientMgr_KEY, CLASS_INDEX_SCOPED( plNetClientMgr ), "kNetClientMgr_KEY", },
{ kListenerMod_KEY, CLASS_INDEX_SCOPED( plListener ), "kListenerMod_KEY", },
{ kTransitionMgr_KEY, CLASS_INDEX_SCOPED( plTransitionMgr ), "kTransitionMgr_KEY", },
{ kLinkEffectsMgr_KEY, CLASS_INDEX_SCOPED( plLinkEffectsMgr ), "kLinkEffectsMgr_KEY", },
{ kGameGUIMgr_KEY, CLASS_INDEX_SCOPED( pfGameGUIMgr ), "kGameGUIMgr_KEY", },
{ kGameGUIDynamicDlg_KEY, CLASS_INDEX_SCOPED( plSceneNode ), "kGameGUIDynamicDlg_KEY", },
{ kVirtualCamera1_KEY, CLASS_INDEX_SCOPED( plVirtualCam1 ), "kVirtualCamera_KEY", },
{ kDefaultCameraMod1_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), "kDefaultCameraMod1_KEY", },
{ kKIGUIGlue_KEY, CLASS_INDEX_SCOPED( pfKI ), "kKIGUIGlue_KEY", },
{ kClothingMgr_KEY, CLASS_INDEX_SCOPED( plClothingMgr ), "kClothingMgr_KEY", },
{ kInputInterfaceMgr_KEY, CLASS_INDEX_SCOPED( plInputInterfaceMgr ), "kInputInterfaceMgr_KEY", },
{ kAVIWriter_KEY, CLASS_INDEX_SCOPED( plAVIWriter ), "kAVIWriter_KEY", },
{ kResManagerHelper_KEY, CLASS_INDEX_SCOPED( plResManagerHelper ), "kResManagerHelper_KEY", },
{ kAvatarMgr_KEY, CLASS_INDEX_SCOPED( plAvatarMgr ), "kAvatarMgr_KEY", },
{ kSimulationMgr_KEY, CLASS_INDEX_SCOPED( plSimulationMgr ), "kSimulationMgr_KEY", },
{ kTransitionCamera_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), "kTransitionCamera_KEY", },
{ kCCRMgr_KEY, CLASS_INDEX_SCOPED( plCCRMgr ), "kCCRMgr_KEY", },
{ kNetClientCloneRoom_KEY, CLASS_INDEX_SCOPED( plSceneNode ), "kNetClientCloneRoom_KEY", },
{ kMarkerMgr_KEY, CLASS_INDEX_SCOPED( pfMarkerMgr ), "kMarkerMgr_KEY", },
{ kAutoProfile_KEY, CLASS_INDEX_SCOPED( plAutoProfile ), "kAutoProfile_KEY", },
{ kGlobalVisMgr_KEY, CLASS_INDEX_SCOPED( plVisMgr ), "kGlobalVisMgr_KEY", },
{ kFontCache_KEY, CLASS_INDEX_SCOPED( plFontCache ), "kFontCache_KEY", },
{ kRelevanceMgr_KEY, CLASS_INDEX_SCOPED( plRelevanceMgr ), "kRelevanceMgr_KEY", },
{ kJournalBookMgr_KEY, CLASS_INDEX_SCOPED( pfJournalBook ), "kJournalBookMgr_KEY", },
{ kAgeLoader_KEY, CLASS_INDEX_SCOPED( plAgeLoader), "kAgeLoader_KEY", },
{ kBuiltIn3rdPersonCamera_KEY, CLASS_INDEX_SCOPED( plCameraModifier1 ), "kBuiltIn3rdPersonCamera_KEY", },
{ kSecurePreloader_KEY, CLASS_INDEX_SCOPED( pfSecurePreloader ), "kSecurePreloader_KEY", },
{ kLast_Fixed_KEY, CLASS_INDEX_SCOPED( plSceneObject ), _TCFL("kLast_Fixed_KEY"), }
{ kLast_Fixed_KEY, CLASS_INDEX_SCOPED( plSceneObject ), "kLast_Fixed_KEY", }
};
#undef _TCFL

2
Sources/Plasma/NucleusLib/pnUUID/pnUUID_Unix.cpp

@ -112,7 +112,7 @@ bool plUUID::ToString( plString & out ) const
plUUIDHelper::CopyToNative( g, this );
char buf[40];
uuid_unparse( g, buf );
out = _TEMP_CONVERT_FROM_LITERAL( buf );
out = buf;
return true;
}

2
Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp

@ -90,7 +90,7 @@ bool plUUID::FromString( const char * str )
bool plUUID::ToString( plString & out ) const
{
out = _TEMP_CONVERT_FROM_LITERAL("");
out = plString();
unsigned char * ubuf;
RPC_STATUS s;
s = UuidToString( (GUID *) this, &ubuf );

4
Sources/Plasma/PubUtilLib/plAudio/plSound.cpp

@ -163,7 +163,7 @@ void plSound::IUpdateDebugPlate( void )
fDebugPlate->SetPosition( -0.5, 0 );
fDebugPlate->SetDataRange( 0, 100, 100 );
fDebugPlate->SetColors( 0x80202000 );
fDebugPlate->SetTitle( _TEMP_CONVERT_TO_CONST_CHAR( GetKeyName() ) ); // Bleah
fDebugPlate->SetTitle( GetKeyName().c_str() ); // Bleah
fDebugPlate->SetLabelText( "Desired", "Curr", "Soft", "Dist" );
}
@ -190,7 +190,7 @@ void plSound::SetCurrDebugPlate( const plKey soundKey )
{
fDebugPlate->ClearData();
fDebugPlate->SetVisible( true );
fDebugPlate->SetTitle( _TEMP_CONVERT_TO_CONST_CHAR( fCurrDebugPlateSound->GetKeyName() ) ); // Bleah
fDebugPlate->SetTitle( fCurrDebugPlateSound->GetKeyName().c_str() ); // Bleah
}
}
}

4
Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h

@ -104,10 +104,6 @@ public:
void SetChannelName(const plString &name);
plString GetChannelName();
// TEMP plString REVISIT
// Because I'm TOO LAZY to keep converting all these calls to SetChannelName
void SetChannelName(const char *name) { SetChannelName(_TEMP_CONVERT_FROM_LITERAL(name)); }
/** Optionally suppress the action of this applicator.
The applicator can still be forced to apply using the force
paramater of the Apply function. */

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

@ -631,7 +631,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
plString targetName = cmdMsg->GetAnimName();
if (targetName.IsNull())
targetName = _TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME);
targetName = ENTIRE_ANIMATION_NAME;
plAGAnimInstance *inst = FindAnimInstance(targetName);
if (inst != nil)

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

@ -277,7 +277,7 @@ plAGAnimInstance * plAnimStage::Attach(plArmatureMod *armature, plArmatureBrain
if(fAnimInstance)
{
fAnimInstance->Stop(); // we'll be setting the time directly.
fAnimatedHandle = (fAnimInstance->GetAnimation()->GetChannel(_TEMP_CONVERT_FROM_LITERAL("Handle")) != nil);
fAnimatedHandle = (fAnimInstance->GetAnimation()->GetChannel("Handle") != nil);
fAttached = true;
// this is too early to send the enter notify. we're attached, but we may not
// have faded in yet.

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

@ -663,7 +663,7 @@ void plArmatureMod::IInitDefaults()
fDontPanicLink = false;
fBodyAgeName = "GlobalAvatars";
fBodyFootstepSoundPage = "Audio";
fAnimationPrefix = _TEMP_CONVERT_FROM_LITERAL("Male");
fAnimationPrefix = "Male";
fUserStr = "";
}
@ -1034,7 +1034,7 @@ void plArmatureMod::PanicLink(bool playLinkOutAnim /* = true */)
plString animName = MakeAnimationName("FallingLinkOut");
task->SetAnimName(animName);
task->SetMarkerName(_TEMP_CONVERT_FROM_LITERAL("touch"));
task->SetMarkerName("touch");
plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task);
taskMsg->Send();
@ -1057,7 +1057,7 @@ void plArmatureMod::PersonalLink()
plAvOneShotLinkTask *task = new plAvOneShotLinkTask;
plString animName = MakeAnimationName("PersonalLink");
task->SetAnimName(animName);
task->SetMarkerName(_TEMP_CONVERT_FROM_LITERAL("touch"));
task->SetMarkerName("touch");
plAvTaskMsg *taskMsg = new plAvTaskMsg(GetKey(), GetKey(), task);
taskMsg->SetBCastFlag(plMessage::kNetPropagate);
@ -1781,7 +1781,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
if (gLoc.IsValid())
{
const plUoid &myUoid = GetKey()->GetUoid();
plUoid SOUoid(gLoc, plSceneObject::Index(), _TEMP_CONVERT_FROM_LITERAL("FootstepSoundObject"));
plUoid SOUoid(gLoc, plSceneObject::Index(), "FootstepSoundObject");
fFootSoundSOKey = mgr->FindKey(SOUoid);
if (fFootSoundSOKey)
{
@ -1791,7 +1791,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
}
// Add the effect to our effects manager
plUoid effectUoid(gLoc, plArmatureEffectFootSound::Index(), _TEMP_CONVERT_FROM_LITERAL("FootstepSounds") );
plUoid effectUoid(gLoc, plArmatureEffectFootSound::Index(), "FootstepSounds");
plKey effectKey = mgr->FindKey(effectUoid);
if (effectKey)
{
@ -1802,7 +1802,7 @@ void plArmatureMod::Read(hsStream * stream, hsResMgr *mgr)
mgr->AddViaNotify(effectKey, new plGenRefMsg(effectMgrKey, plRefMsg::kOnCreate, -1, -1), plRefFlags::kActiveRef);
// Get the linking sound
plUoid LinkUoid(gLoc, plSceneObject::Index(), _TEMP_CONVERT_FROM_LITERAL("LinkSoundSource"));
plUoid LinkUoid(gLoc, plSceneObject::Index(), "LinkSoundSource");
fLinkSoundSOKey = mgr->FindKey(LinkUoid);
if (fLinkSoundSOKey)
{
@ -1896,7 +1896,7 @@ void plArmatureMod::ICustomizeApplicator()
{
plArmatureModBase::ICustomizeApplicator();
const plAGModifier *agMod = GetChannelMod(_TEMP_CONVERT_FROM_LITERAL("Bone_Root"), true);
const plAGModifier *agMod = GetChannelMod("Bone_Root", true);
if (agMod)
{
// are there any applicators that manipulate the transform?
@ -2379,7 +2379,7 @@ bool plArmatureMod::FindMatchingGenericBrain(const char *names[], int count)
plString plArmatureMod::MakeAnimationName(const char *baseName) const
{
return fAnimationPrefix + _TEMP_CONVERT_FROM_LITERAL(baseName);
return fAnimationPrefix + baseName;
}
plString plArmatureMod::GetRootName()

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

@ -714,7 +714,7 @@ void plAvBrainClimb::ICalcProbeLengths()
hsAssert(up, "Couldn't find ClimbUp animation.");
if(up)
{
GetStartToEndTransform(up, &upMove, nil, _TEMP_CONVERT_FROM_LITERAL("Handle"));
GetStartToEndTransform(up, &upMove, nil, "Handle");
fVerticalProbeLength = upMove.GetTranslate().fZ;
} else
fVerticalProbeLength = 4.0f; // guess
@ -722,7 +722,7 @@ void plAvBrainClimb::ICalcProbeLengths()
hsAssert(left, "Couldn't find ClimbLeft animation.");
if(left)
{
GetStartToEndTransform(left, &leftMove, nil, _TEMP_CONVERT_FROM_LITERAL("Handle"));
GetStartToEndTransform(left, &leftMove, nil, "Handle");
fHorizontalProbeLength = leftMove.GetTranslate().fX;
} else
fHorizontalProbeLength = 3.0f; // guess

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

@ -300,7 +300,7 @@ std::string plAvBrainCritter::BehaviorName(int behavior) const
plString plAvBrainCritter::AnimationName(int behavior) const
{
if ((behavior >= fBehaviors.Count()) || (behavior < 0))
return _TEMP_CONVERT_FROM_LITERAL("");
return plString();
return ((CritterBehavior*)fBehaviors[behavior])->AnimName();
}

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

@ -309,7 +309,7 @@ void plAvBrainHuman::IInitBoneMap()
for(int i = 0; i < numTuples; i++)
{
HumanBoneID id = tupleMap[i].fID;
plString name = _TEMP_CONVERT_FROM_LITERAL(tupleMap[i].fName);
plString name = tupleMap[i].fName;
const plSceneObject * bone = this->fAvMod->FindBone(name);
if( bone )

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

@ -535,7 +535,7 @@ bool plAvTaskSeek::IUpdateObjective(plArmatureMod *avatar)
plAGAnim *anim = avatar->FindCustomAnim(fAnimName);
// don't need to do this every frame; the animation doesn't change.
// *** cache the adjustment;
GetStartToEndTransform(anim, nil, &adjustment, _TEMP_CONVERT_FROM_LITERAL("Handle")); // actually getting end-to-start
GetStartToEndTransform(anim, nil, &adjustment, "Handle"); // actually getting end-to-start
// ... but we do still need to multiply by the (potentially changed) target
targL2W = targL2W * adjustment;
}

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

@ -199,9 +199,9 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is
const plLocation& loc = (globalLoc.IsValid() ? globalLoc : custLoc.IsValid() ? custLoc : maleLoc);
#endif
plString theName = _TEMP_CONVERT_FROM_LITERAL(name);
plString theName = name;
if ( loc == maleLoc )
theName = _TEMP_CONVERT_FROM_LITERAL("Male");
theName = "Male";
if (loc.IsValid())
{
@ -1012,7 +1012,7 @@ void plAvatarMgr::OfferLinkingBook(plKey hostKey, plKey guestKey, plMessage *lin
brainG->AddStage(guestAccept);
brainG->AddStage(guestAcceptIdle);
plCoopCoordinator *coord = new plCoopCoordinator(hostKey, guestKey, brainH, brainG, _TEMP_CONVERT_FROM_LITERAL("Convergence"), 1, 1, linkMsg, true);
plCoopCoordinator *coord = new plCoopCoordinator(hostKey, guestKey, brainH, brainG, "Convergence", 1, 1, linkMsg, true);
plAvCoopMsg *coMg = new plAvCoopMsg(hostKey, coord);

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

@ -249,7 +249,7 @@ bool plAvSeekTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, double t
{
hsMatrix44 adjustment;
plAGAnim *anim = avatar->FindCustomAnim(fAnimName);
GetStartToEndTransform(anim, nil, &adjustment, _TEMP_CONVERT_FROM_LITERAL("Handle")); // actually getting end-to-start
GetStartToEndTransform(anim, nil, &adjustment, "Handle"); // actually getting end-to-start
targetL2W = targetL2W * adjustment;
}
break;
@ -624,7 +624,7 @@ bool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, doubl
plgDispatch::MsgSend( pMsg ); // whoosh... off it goes
}
fMoveHandle = (fAnimInstance->GetAnimation()->GetChannel(_TEMP_CONVERT_FROM_LITERAL("Handle")) != nil);
fMoveHandle = (fAnimInstance->GetAnimation()->GetChannel("Handle") != nil);
if(fMoveHandle)
{
plMatrixDifferenceApp *differ = avatar->GetRootAnimator();

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

@ -279,7 +279,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis
// The first step is to get the transform from the end to the beginning of the
// animation. That's what this next line is doing. It's a bit unintuitive
// until you look at the parameter definitions.
GetStartToEndTransform(anim, nil, &animEndToStart, _TEMP_CONVERT_FROM_LITERAL("Handle"));
GetStartToEndTransform(anim, nil, &animEndToStart, "Handle");
hsMatrix44 candidateGoal = sitGoal * animEndToStart;
hsPoint3 distP = candidateGoal.GetTranslate() - curPosition;
hsVector3 distV(distP.fX, distP.fY, distP.fZ);

4
Sources/Plasma/PubUtilLib/plDrawable/plProxyGen.cpp

@ -161,7 +161,7 @@ hsGMaterial* plProxyGen::IMakeProxyMaterial() const
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_Material", GetKey()->GetName().c_str());
else
buff = _TEMP_CONVERT_FROM_LITERAL("ProxyMaterial");
buff = "ProxyMaterial";
hsgResMgr::ResMgr()->NewKey( buff, retVal, GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
plLayer *lay = retVal->MakeBaseLayer();
@ -236,7 +236,7 @@ void plProxyGen::IGenerateProxy()
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_ProxyDrawable", GetKey()->GetName().c_str());
else
buff = _TEMP_CONVERT_FROM_LITERAL("ProxyDrawable");
buff = "ProxyDrawable";
hsgResMgr::ResMgr()->NewKey( buff, fProxyDrawables[ idx ], GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
}

2
Sources/Plasma/PubUtilLib/plGImage/plMipmap.cpp

@ -2138,7 +2138,7 @@ void plMipmap::IAddToMemRecord( plMipmap *mip, plRecord::Method method )
if( mip->GetKey() )
newRecord->fKeyName = mip->GetKeyName();
else
newRecord->fKeyName = _TEMP_CONVERT_FROM_LITERAL( "<noKey>" );
newRecord->fKeyName = "<noKey>";
if( mip->fCompressionType != kDirectXCompression )
newRecord->fUncompressedInfo.fType = mip->fUncompressedInfo.fType;
else

2
Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h

@ -189,7 +189,7 @@ public:
static bool GetInverted() { return plMouseDevice::bInverted; }
static void SetInverted(bool inverted) { plMouseDevice::bInverted = inverted; }
static void AddNameToCursor(const char* name);
static void AddNameToCursor(const plString& name) { AddNameToCursor(_TEMP_CONVERT_TO_CONST_CHAR(name)); }
static void AddNameToCursor(const plString& name) { AddNameToCursor(name); }
static void AddIDNumToCursor(uint32_t idNum);
static void AddCCRToCursor();

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

@ -56,26 +56,6 @@ void plAnimCmdMsg::ClearCmd()
fCmd.Clear();
}
void plAnimCmdMsg::SetAnimName(const plString &name)
{
fAnimName = name;
}
plString plAnimCmdMsg::GetAnimName()
{
return fAnimName;
}
void plAnimCmdMsg::SetLoopName(const plString &name)
{
fLoopName = name;
}
plString plAnimCmdMsg::GetLoopName()
{
return fLoopName;
}
bool plAnimCmdMsg::CmdChangesAnimTime()
{
return (Cmd(kContinue) ||

12
Sources/Plasma/PubUtilLib/plMessage/plAnimCmdMsg.h

@ -111,16 +111,12 @@ public:
bool Cmd(int n) const { return fCmd.IsBitSet(n); }
void SetCmd(int n) { fCmd.SetBit(n); }
void ClearCmd();
void SetAnimName(const plString &name);
plString GetAnimName();
void SetAnimName(const plString &name) { fAnimName = name; }
plString GetAnimName() { return fAnimName; }
bool CmdChangesAnimTime(); // Will this command cause an update to the current anim time?
// TEMP plString REVISIT
// Because I'm TOO LAZY to keep converting all these calls to SetAnimName
void SetAnimName(const char *name) { SetAnimName(_TEMP_CONVERT_FROM_LITERAL(name)); }
void SetLoopName(const plString &name);
plString GetLoopName();
void SetLoopName(const plString &name) { fLoopName = name; }
plString GetLoopName() { return fLoopName; }
float fBegin;
float fEnd;

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

@ -253,7 +253,7 @@ void plDynamicTextMsg::Write( hsStream *s, hsResMgr *mgr )
fClearColor.Write( s );
fColor.Write( s );
s->WriteSafeWString( fString );
s->WriteSafeWString( plString::FromWchar(fString) );
mgr->WriteKey( s, fImageKey );
s->WriteLE( fFlags );
@ -360,7 +360,7 @@ void plDynamicTextMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
fColor.Write( s );
// kDynTextMsgString
s->WriteSafeWString( fString );
s->WriteSafeWString( plString::FromWchar(fString) );
// kDynTextMsgImageKey
mgr->WriteKey( s, fImageKey );

10
Sources/Plasma/PubUtilLib/plMessage/plDynamicTextMsg.h

@ -59,13 +59,13 @@ class plDynamicTextMsg : public plMessage
friend class plDynamicTextMap;
protected:
uint16_t fCmd;
uint16_t fCmd;
// Position (fX is also used for font size)
int16_t fX, fY;
int16_t fX, fY;
// A rectangle
uint16_t fLeft, fTop, fRight, fBottom;
uint16_t fLeft, fTop, fRight, fBottom;
// Colors
hsColorRGBA fClearColor;
@ -78,10 +78,10 @@ protected:
plKey fImageKey;
// Misc flags field
uint32_t fFlags;
uint32_t fFlags;
bool fBlockRGB;
int16_t fLineSpacing;
int16_t fLineSpacing;
public:
plDynamicTextMsg() : plMessage( nil, nil, nil ) { fCmd = 0; fString = nil; fImageKey = nil; fFlags = 0; fBlockRGB = false; }

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

@ -106,7 +106,7 @@ plKey plCloneSpawnModifier::SpawnClone(const char* cloneName, const char* cloneA
const plLocation& loc = plKeyFinder::Instance().FindLocation(cloneAge, "BuiltIn");
// Find the clone template key
plUoid objUoid(loc, plSceneObject::Index(), _TEMP_CONVERT_FROM_LITERAL(cloneName));
plUoid objUoid(loc, plSceneObject::Index(), cloneName);
plKey key = resMgr->FindKey(objUoid);
if (key)

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

@ -775,7 +775,7 @@ void plResponderModifier::ILog(uint32_t color, const char* format, ...)
if (!format || *format == '\0')
return;
const char* keyName = _TEMP_CONVERT_TO_CONST_CHAR(GetKeyName());
const char* keyName = GetKeyName().c_str();
// Make sure this key isn't in our list of keys to deny
for (int i = 0; i < gNoLogStrings.size(); i++)

2
Sources/Plasma/PubUtilLib/plNetClient/plNetCliAgeJoiner.cpp

@ -181,7 +181,7 @@ void plNCAgeJoiner::IDispatchMsgReceiveCallback () {
void plNCAgeJoiner::IResMgrProgressBarCallback (plKey key) {
#ifndef PLASMA_EXTERNAL_RELEASE
if (s_instance)
s_instance->progressBar->SetStatusText(_TEMP_CONVERT_TO_CONST_CHAR(key->GetName()));
s_instance->progressBar->SetStatusText(key->GetName().c_str());
#endif
}

2
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrSend.cpp

@ -159,7 +159,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg)
char buffy[20];
sprintf( buffy, "%lu", GetPlayerID() );
info.AddValue( "Petition", "PlayerID", buffy );
info.AddValue( "Petition", "PlayerName", _TEMP_CONVERT_TO_CONST_CHAR(GetPlayerName()) );
info.AddValue( "Petition", "PlayerName", GetPlayerName().c_str() );
// write config info formatted like an ini file to a buffer
hsRAMStream ram;

8
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgrShow.cpp

@ -231,8 +231,8 @@ void plNetClientMgr::IShowRelevanceRegions()
//
uint32_t maxPlayerName = 0;
txt.DrawString(x, y, _TEMP_CONVERT_TO_CONST_CHAR(GetPlayerName()));
maxPlayerName = hsMaximum(maxPlayerName, txt.CalcStringWidth(_TEMP_CONVERT_TO_CONST_CHAR(GetPlayerName())));
txt.DrawString(x, y, GetPlayerName().c_str());
maxPlayerName = hsMaximum(maxPlayerName, txt.CalcStringWidth(GetPlayerName().c_str()));
y += yOff;
int i;
@ -244,8 +244,8 @@ void plNetClientMgr::IShowRelevanceRegions()
continue;
const plString& name = mbr->GetPlayerName();
txt.DrawString(x, y, _TEMP_CONVERT_TO_CONST_CHAR(name));
maxPlayerName = hsMaximum(maxPlayerName, txt.CalcStringWidth(_TEMP_CONVERT_TO_CONST_CHAR(name)));
txt.DrawString(x, y, name.c_str());
maxPlayerName = hsMaximum(maxPlayerName, txt.CalcStringWidth(name.c_str()));
y += yOff;
}

6
Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

@ -947,7 +947,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
title = plString::Format("%s'", nc->GetPlayerName().c_str());
else
title = plString::Format("%s's", nc->GetPlayerName().c_str());
info->SetAgeUserDefinedName(_TEMP_CONVERT_TO_CONST_CHAR(title));
info->SetAgeUserDefinedName(title.c_str());
}
if (!info->HasAgeDescription())
{
@ -986,7 +986,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
title = plString::Format("%s'", nc->GetPlayerName().c_str());
else
title = plString::Format("%s's", nc->GetPlayerName().c_str());
info->SetAgeUserDefinedName(_TEMP_CONVERT_TO_CONST_CHAR(title));
info->SetAgeUserDefinedName(title.c_str());
}
if (!info->HasAgeDescription())
@ -998,7 +998,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
desc = plString::Format("%s' %s", nc->GetPlayerName().c_str(), info->GetAgeInstanceName());
else
desc = plString::Format("%s's %s", nc->GetPlayerName().c_str(), info->GetAgeInstanceName());
info->SetAgeDescription( _TEMP_CONVERT_TO_CONST_CHAR(desc) );
info->SetAgeDescription( desc.c_str() );
}
if (!info->HasAgeInstanceGuid()) {

2
Sources/Plasma/PubUtilLib/plNetClient/plNetObjectDebugger.cpp

@ -130,7 +130,7 @@ bool plNetObjectDebugger::DebugObject::ObjectMatches(const hsKeyedObject* obj)
if ((fFlags & kPageMatch)==0)
{
// match based on object name only
return StringMatches(_TEMP_CONVERT_TO_CONST_CHAR(obj->GetKeyName()));
return StringMatches(obj->GetKeyName().c_str());
}
return (obj->GetKey()->GetUoid().GetLocation()==fLoc);

4
Sources/Plasma/PubUtilLib/plNetCommon/plNetServerSessionInfo.cpp

@ -663,11 +663,11 @@ plString plNetServerSessionInfo::AsLogString() const
const char* spacer = kSemicolon;
plStringStream ss;
plString typeName = _TEMP_CONVERT_FROM_LITERAL("");
plString typeName;
if (HasServerType())
{
typeName = _TEMP_CONVERT_FROM_LITERAL(plNetServerConstants::GetServerTypeStr(fServerType));
typeName = plNetServerConstants::GetServerTypeStr(fServerType);
}
if (HasServerName())

26
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -2196,7 +2196,7 @@ static bool Recv_ServerAddr (
s_active->token = msg.token;
s_active->addr.SetHost(msg.srvAddr);
plString logmsg = _TEMP_CONVERT_FROM_LITERAL("SrvAuth addr: ");
plString logmsg = "SrvAuth addr: ";
logmsg += s_active->addr.GetHostString();
LogMsg(kLogPerf, L"SrvAuth addr: %s", logmsg.c_str());
}
@ -2789,8 +2789,8 @@ bool AgeRequestTrans::Recv (
//============================================================================
AccountCreateRequestTrans::AccountCreateRequestTrans (
const wchar_t accountName[],
const wchar_t password[],
const wchar_t accountName[],
const wchar_t password[],
unsigned accountFlags,
unsigned billingType,
FNetCliAuthAccountCreateRequestCallback callback,
@ -2804,8 +2804,8 @@ AccountCreateRequestTrans::AccountCreateRequestTrans (
StrCopy(m_accountName, accountName, arrsize(m_accountName));
CryptHashPassword(
_TEMP_CONVERT_FROM_WCHAR_T(m_accountName),
_TEMP_CONVERT_FROM_WCHAR_T(password),
plString::FromWchar(m_accountName),
plString::FromWchar(password),
m_namePassHash
);
}
@ -2859,8 +2859,8 @@ bool AccountCreateRequestTrans::Recv (
//============================================================================
AccountCreateFromKeyRequestTrans::AccountCreateFromKeyRequestTrans (
const wchar_t accountName[],
const wchar_t password[],
const wchar_t accountName[],
const wchar_t password[],
const Uuid & key,
unsigned billingType,
FNetCliAuthAccountCreateFromKeyRequestCallback callback,
@ -2874,8 +2874,8 @@ AccountCreateFromKeyRequestTrans::AccountCreateFromKeyRequestTrans (
StrCopy(m_accountName, accountName, arrsize(m_accountName));
CryptHashPassword(
_TEMP_CONVERT_FROM_WCHAR_T(m_accountName),
_TEMP_CONVERT_FROM_WCHAR_T(password),
plString::FromWchar(m_accountName),
plString::FromWchar(password),
m_namePassHash
);
}
@ -3161,8 +3161,8 @@ bool SetPlayerRequestTrans::Recv (
//============================================================================
AccountChangePasswordRequestTrans::AccountChangePasswordRequestTrans (
const wchar_t accountName[],
const wchar_t password[],
const wchar_t accountName[],
const wchar_t password[],
FNetCliAuthAccountChangePasswordRequestCallback callback,
void * param
) : NetAuthTrans(kAccountChangePasswordRequestTrans)
@ -3172,8 +3172,8 @@ AccountChangePasswordRequestTrans::AccountChangePasswordRequestTrans (
StrCopy(m_accountName, accountName, arrsize(m_accountName));
CryptHashPassword(
_TEMP_CONVERT_FROM_WCHAR_T(m_accountName),
_TEMP_CONVERT_FROM_WCHAR_T(password),
plString::FromWchar(m_accountName),
plString::FromWchar(password),
m_namePassHash
);
}

2
Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp

@ -1104,7 +1104,7 @@ int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
if (bytes)
{
// FIX ME to something nice
fMemberInfo.GetClientGuid()->SetClientKey(_TEMP_CONVERT_FROM_LITERAL(""));
fMemberInfo.GetClientGuid()->SetClientKey(plString());
fMemberInfo.GetClientGuid()->SetAccountUUID(plUUID());
fMemberInfo.Poke(stream, peekOptions);
stream->WriteByte(fAddMember);

2
Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp

@ -505,7 +505,7 @@ int plNetMsgMemberListHelper::Poke(hsStream* stream, const uint32_t peekOptions)
int i;
for(i=0;i<numMembers;i++)
{
fMembers[i]->GetClientGuid()->SetClientKey(_TEMP_CONVERT_FROM_LITERAL(""));
fMembers[i]->GetClientGuid()->SetClientKey(plString());
fMembers[i]->GetClientGuid()->SetAccountUUID(plUUID());
fMembers[i]->Poke(stream, peekOptions);
}

2
Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.cpp

@ -77,7 +77,7 @@ plString plNetTransportMember::AsString() const
{
if (IsServer())
{
return _TEMP_CONVERT_FROM_LITERAL("(server)");
return "(server)";
}
else
{

4
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysical.cpp

@ -616,7 +616,7 @@ bool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg)
plKey ourKey = GetKey();
PhysRefType refType = PhysRefType(refMsg->fType);
plString refKeyName = refKey ? refKey->GetName() : _TEMP_CONVERT_FROM_LITERAL("MISSING");
plString refKeyName = refKey ? refKey->GetName() : "MISSING";
if (refType == kPhysRefWorld)
{
@ -694,7 +694,7 @@ plPhysical& plPXPhysical::SetProperty(int prop, bool status)
case plSimulationInterface::kNoSynchronize: propName = "kNoSynchronize"; break;
}
plString name = _TEMP_CONVERT_FROM_LITERAL("(unknown)");
plString name = "(unknown)";
if (GetKey())
name = GetKeyName();
if (plSimulationMgr::fExtraProfile)

8
Sources/Plasma/PubUtilLib/plPhysical/plPhysicalSDLModifier.cpp

@ -220,22 +220,22 @@ void plPhysicalSDLModifier::ILogState(const plStateDataRecord* state, bool useDi
if (isPosSet)
log += plString::Format(" Pos=%.1f %.1f %.1f", pos.fX, pos.fY, pos.fZ);
else
log += _TEMP_CONVERT_FROM_LITERAL(" Pos=None");
log += " Pos=None";
if (isLinVSet)
log += plString::Format(" LinV=%.1f %.1f %.1f", linV.fX, linV.fY, linV.fZ);
else
log += _TEMP_CONVERT_FROM_LITERAL(" LinV=None");
log += " LinV=None";
if (isAngVSet)
log += plString::Format(" AngV=%.1f %.1f %.1f", angV.fX, angV.fY, angV.fZ);
else
log += _TEMP_CONVERT_FROM_LITERAL(" AngV=None");
log += " AngV=None";
if (isRotSet)
log += plString::Format(" Rot=%.1f %.1f %.1f %.1f", rot.fX, rot.fY, rot.fZ, rot.fW);
else
log += _TEMP_CONVERT_FROM_LITERAL(" Rot=None");
log += " Rot=None";
IGetLog()->AddLine(log.c_str(), color);
}

6
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

@ -1341,10 +1341,10 @@ bool plDXPipeline::ICreateDeviceObjects()
/// Ok, we're done now
#if MCN_BOUNDS_SPANS
fBoundsSpans = new plDrawableSpans();
hsgResMgr::ResMgr()->NewKey( _TEMP_CONVERT_FROM_LITERAL("BoundsSpans"), fBoundsSpans, plLocation::kGlobalFixedLoc );
hsgResMgr::ResMgr()->NewKey( "BoundsSpans", fBoundsSpans, plLocation::kGlobalFixedLoc );
fBoundsSpans->SetNativeProperty( plDrawable::kPropVolatile, true );
fBoundsMat = new hsGMaterial();
hsgResMgr::ResMgr()->NewKey( _TEMP_CONVERT_FROM_LITERAL("BoundsMaterial"), fBoundsMat, plLocation::kGlobalFixedLoc );
hsgResMgr::ResMgr()->NewKey( "BoundsMaterial", fBoundsMat, plLocation::kGlobalFixedLoc );
plLayer *lay = fBoundsMat->MakeBaseLayer();
lay->SetMiscFlags( hsGMatState::kMiscWireFrame | hsGMatState::kMiscTwoSided );
lay->SetShadeFlags( lay->GetShadeFlags() | hsGMatState::kShadeWhite );
@ -9375,7 +9375,7 @@ void plDXPipeline::IMakeOcclusionSnap()
ident.Reset();
hsGMaterial* mat = new hsGMaterial;
hsgResMgr::ResMgr()->NewKey( _TEMP_CONVERT_FROM_LITERAL("OcclusionSnapMat"), mat, plLocation::kGlobalFixedLoc );
hsgResMgr::ResMgr()->NewKey( "OcclusionSnapMat", mat, plLocation::kGlobalFixedLoc );
plLayer *lay = mat->MakeBaseLayer();
lay->SetZFlags(hsGMatState::kZNoZWrite);
lay->SetPreshadeColor(hsColorRGBA().Set(1.f, 0.5f, 0.5f, 1.f));

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

@ -109,7 +109,7 @@ bool NameMatches(const char* obName, const char* pKName, bool subString)
}
else
{
if (_TEMP_CONVERT_FROM_LITERAL(p).Find(o, plString::kCaseInsensitive) >= 0)
if (plString(p).Find(o, plString::kCaseInsensitive) >= 0)
return true;
}
@ -264,12 +264,12 @@ void plKeyFinder::IGetNames(std::vector<plString>& names, const plString& search
void plKeyFinder::GetResponderNames(std::vector<plString>& names)
{
IGetNames(names, _TEMP_CONVERT_FROM_LITERAL(""), CLASS_INDEX_SCOPED(plResponderModifier));
IGetNames(names, plString(), CLASS_INDEX_SCOPED(plResponderModifier));
}
void plKeyFinder::GetActivatorNames(std::vector<plString>& names)
{
IGetNames(names, _TEMP_CONVERT_FROM_LITERAL(""), CLASS_INDEX_SCOPED(plLogicModifier));
IGetNames(names, plString(), CLASS_INDEX_SCOPED(plLogicModifier));
}
class plKeyFinderIterator : public plRegistryKeyIterator, public plRegistryPageIterator

8
Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

@ -536,9 +536,9 @@ inline plKeyImp* IFindKeyLocalized(const plUoid& uoid, plRegistryPageNode* page)
if ((!objectName.IsNull()) && plLocalization::IsLocalized())
{
char localName[256];
if (plLocalization::GetLocalized(_TEMP_CONVERT_TO_CONST_CHAR(objectName), localName))
if (plLocalization::GetLocalized(objectName.c_str(), localName))
{
plKeyImp* localKey = page->FindKey(uoid.GetClassType(), _TEMP_CONVERT_FROM_LITERAL(localName));
plKeyImp* localKey = page->FindKey(uoid.GetClassType(), localName);
if (localKey != nil)
return localKey;
}
@ -921,7 +921,7 @@ plKey plResManager::ICloneKey(const plUoid& objUoid, uint32_t playerID, uint32_t
fCurCloneID = cloneID;
fCurClonePlayerID = playerID;
plKey cloneKey = ReRegister(_TEMP_CONVERT_FROM_LITERAL(""), objUoid);
plKey cloneKey = ReRegister(plString(), objUoid);
fCurClonePlayerID = 0;
fCurCloneID = 0;
@ -1272,7 +1272,7 @@ public:
{
if (stricmp(page->GetPageInfo().GetAge(), fAgeName) == 0)
{
plUoid uoid(page->GetPageInfo().GetLocation(), 0, _TEMP_CONVERT_FROM_LITERAL(""));
plUoid uoid(page->GetPageInfo().GetLocation(), 0, plString());
fLocations.push_back(uoid.GetLocation());
}
return true;

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

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetMessage/plNetMessage.h"
#include "pnNetCommon/plNetApp.h"
const plString plSDL::kAgeSDLObjectName = _TEMP_CONVERT_FROM_LITERAL("AgeSDLHook");
const plString plSDL::kAgeSDLObjectName = "AgeSDLHook";
// static
const uint8_t plStateDataRecord::kIOVersion=6;
@ -737,7 +737,7 @@ void plStateDataRecord::DumpToObjectDebugger(const char* msg, bool dirtyOnly, in
plString pad;
int i;
for(i=0;i<level; i++)
pad += _TEMP_CONVERT_FROM_LITERAL(" ");
pad += " ";
int numVars = dirtyOnly ? GetNumDirtyVars() : GetNumUsedVars();
int numSDVars = dirtyOnly ? GetNumDirtySDVars() : GetNumUsedSDVars();
@ -808,7 +808,7 @@ void plStateDataRecord::DumpToStream(hsStream* stream, const char* msg, bool dir
}
}
logStr = _TEMP_CONVERT_FROM_LITERAL("\n");
logStr = "\n";
stream->Write(logStr.GetSize(), logStr.c_str());
}

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

@ -1790,7 +1790,7 @@ plString plSimpleStateVariable::GetKeyName(int idx) const
}
}
hsAssert(false, "passing wrong value type to SDL variable");
return _TEMP_CONVERT_FROM_LITERAL("(nil)");
return "(nil)";
}
#pragma optimize( "g", off ) // disable float optimizations

10
Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp

@ -222,7 +222,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s)
plRegionInfo *info = new plRegionInfo;
regions.Append(info);
info->fName = hsStrcpy(buff);
info->fIndex = GetIndex(_TEMP_CONVERT_FROM_LITERAL(buff));
info->fIndex = GetIndex(buff);
}
}
else // parsing actual settings.
@ -231,7 +231,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s)
if (!toke.Next(buff, kBufSize))
continue;
int rowIndex = GetIndex(_TEMP_CONVERT_FROM_LITERAL(buff));
int rowIndex = GetIndex(buff);
int column = 0;
while (toke.Next(buff, kBufSize) && column < regions.GetCount())
{
@ -252,20 +252,20 @@ plString plRelevanceMgr::GetRegionNames(hsBitVector regions)
{
plString retVal;
if (regions.IsBitSet(0))
retVal = _TEMP_CONVERT_FROM_LITERAL("-Nowhere (0)-");
retVal = "-Nowhere (0)-";
for (int i = 0; i < fRegions.GetCount(); ++i)
{
if (regions.IsBitSet(i + 1))
{
if (!retVal.IsEmpty())
retVal += _TEMP_CONVERT_FROM_LITERAL(", ");
retVal += ", ";
if (fRegions[i])
retVal += fRegions[i]->GetKeyName();
}
}
if (retVal.IsEmpty())
retVal = _TEMP_CONVERT_FROM_LITERAL("<NONE>");
retVal = "<NONE>";
return retVal;
}

12
Sources/Plasma/PubUtilLib/plStatGather/plAutoProfile.cpp

@ -219,7 +219,7 @@ void plAutoProfileImp::INextProfile()
if (!fLastSpawnPointName.IsNull())
{
const char * ageName = NetCommGetAge()->ageDatasetName;
plProfileManagerFull::Instance().LogStats(ageName, _TEMP_CONVERT_TO_CONST_CHAR(fLastSpawnPointName));
plProfileManagerFull::Instance().LogStats(ageName, fLastSpawnPointName.c_str());
plMipmap mipmap;
if (plClient::GetInstance()->GetPipeline()->CaptureScreen(&mipmap))
@ -276,8 +276,8 @@ bool plAutoProfileImp::INextAge()
link.SetLinkingRules(plNetCommon::LinkingRules::kBasicLink);
plNetLinkingMgr::GetInstance()->LinkToAge(&link);
fStatusMessage = _TEMP_CONVERT_FROM_LITERAL("Linking to age ");
fStatusMessage += _TEMP_CONVERT_FROM_LITERAL(ageName);
fStatusMessage = "Linking to age ";
fStatusMessage += ageName;
return true;
}
@ -299,7 +299,7 @@ bool plAutoProfileImp::INextSpawnPoint()
if (fLastSpawnPointName.CompareN(kPerfSpawnPrefix, kPerfSpawnLen) == 0)
{
fStatusMessage = _TEMP_CONVERT_FROM_LITERAL("Profiling spawn point ");
fStatusMessage = "Profiling spawn point ";
fStatusMessage += fLastSpawnPointName;
foundGood = true;
@ -312,7 +312,7 @@ bool plAutoProfileImp::INextSpawnPoint()
if (!foundGood)
{
fLastSpawnPointName = plString::Null;
fStatusMessage = _TEMP_CONVERT_FROM_LITERAL("No profile spawn point found");
fStatusMessage = "No profile spawn point found";
return false;
}
@ -368,7 +368,7 @@ bool plAutoProfileImp::MsgReceive(plMessage* msg)
ms);
}
fStatusMessage = _TEMP_CONVERT_FROM_LITERAL("Age loaded. Preparing to profile.");
fStatusMessage = "Age loaded. Preparing to profile.";
// Age is loaded, start profiling in 5 seconds (to make sure the avatar is linked in all the way)
plTimerCallbackMsg* timerMsg = new plTimerCallbackMsg(GetKey());

8
Sources/Plasma/PubUtilLib/plStatusLog/plLoggable.cpp

@ -121,22 +121,22 @@ bool plLoggable::LogV( const char * fmt, va_list args ) const
bool plLoggable::DebugMsgV(const char* fmt, va_list args) const
{
return Log(_TEMP_CONVERT_FROM_LITERAL("DBG: ") + plString::IFormat(fmt, args));
return Log(plString("DBG: ") + plString::IFormat(fmt, args));
}
bool plLoggable::ErrorMsgV(const char* fmt, va_list args) const
{
return Log(_TEMP_CONVERT_FROM_LITERAL("ERR: ") + plString::IFormat(fmt, args));
return Log(plString("ERR: ") + plString::IFormat(fmt, args));
}
bool plLoggable::WarningMsgV(const char* fmt, va_list args) const
{
return Log(_TEMP_CONVERT_FROM_LITERAL("WRN: ") + plString::IFormat(fmt, args));
return Log(plString("WRN: ") + plString::IFormat(fmt, args));
}
bool plLoggable::AppMsgV(const char* fmt, va_list args) const
{
return Log(_TEMP_CONVERT_FROM_LITERAL("APP: ") + plString::IFormat(fmt, args));
return Log(plString("APP: ") + plString::IFormat(fmt, args));
}
///////////////////////////////////////////////////////////////

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

@ -136,7 +136,7 @@ plLayer* hsGMaterial::MakeBaseLayer()
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_Layer", GetKey()->GetName().c_str());
else
buff = _TEMP_CONVERT_FROM_LITERAL("Layer");
buff = "Layer";
hsgResMgr::ResMgr()->NewKey( buff, newLay, GetKey() != nil ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
// Add layer so we have it now.

4
Sources/Tools/MaxComponent/plAnimComponent.cpp

@ -719,7 +719,7 @@ bool plAnimComponentBase::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg)
plString animName = plString::FromUtf8(fCompPB->GetStr(kAnimName));
if (animName.IsEmpty())
animName = _TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME);
animName = ENTIRE_ANIMATION_NAME;
if (fCompPB->GetInt(ParamID(kAnimUseGlobal)))
{
@ -995,7 +995,7 @@ plString plAnimComponentBase::GetIfaceSegmentName( bool allowNil )
plString name = GetAnimName();
if( allowNil || !name.IsNull() )
return name;
return _TEMP_CONVERT_FROM_LITERAL( ENTIRE_ANIMATION_NAME );
return ENTIRE_ANIMATION_NAME;
}
//// Hit Callback for Animations /////////////////////////////////////////////

8
Sources/Tools/MaxComponent/plAudioComponents.cpp

@ -622,7 +622,7 @@ plSoundBuffer *plBaseSoundEmitterComponent::IGetSourceBuffer( const char *file
char tempPath[ MAX_PATH ];
strncpy(tempPath, fileName, MAX_PATH);
::PathStripPath( tempPath );
keyName = _TEMP_CONVERT_FROM_LITERAL( tempPath );
keyName = tempPath;
// TEMP HACK until we get packed sounds:
// Given the source filename, we check to see if it's in our plasma game directory. If not, or if
@ -638,7 +638,7 @@ plSoundBuffer *plBaseSoundEmitterComponent::IGetSourceBuffer( const char *file
plFileUtils::CreateDir( fullPath );
// Now finish the path...
strcat( fullPath, _TEMP_CONVERT_TO_CONST_CHAR( keyName ) );
strcat( fullPath, keyName.c_str() );
// Check filestamp
WIN32_FILE_ATTRIBUTE_DATA oldFileAttrib, newFileAttrib;
@ -667,9 +667,9 @@ plSoundBuffer *plBaseSoundEmitterComponent::IGetSourceBuffer( const char *file
// Additional info for the keyName--need some flag mangling, specifically for the left/right channel mangling
if( srcBufferFlags & plSoundBuffer::kOnlyLeftChannel )
keyName += _TEMP_CONVERT_FROM_LITERAL( ":L" );
keyName += ":L";
else if( srcBufferFlags & plSoundBuffer::kOnlyRightChannel )
keyName += _TEMP_CONVERT_FROM_LITERAL( ":R" );
keyName += ":R";
key = srcNode->FindPageKey( plSoundBuffer::Index(), keyName );
if( key != nil )

6
Sources/Tools/MaxComponent/plAvatarComponent.cpp

@ -264,11 +264,11 @@ bool plArmatureComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg)
{
// MakeCharacterHierarchy will attach agmodifiers to all the bones in the hierarchy;
// have to manually add any for non-bone objects...
agMod = new plAGModifier(_TEMP_CONVERT_FROM_LITERAL("Handle")); // the player root is known as the handle
agMod = new plAGModifier("Handle"); // the player root is known as the handle
node->AddModifier(agMod, IGetUniqueName(node));
}
agMod->SetChannelName(_TEMP_CONVERT_FROM_LITERAL("Handle"));
agMod->SetChannelName("Handle");
// Get the position and radius of the head and torso physicals
if (ClassID() == AVATAR_CLASS_ID || ClassID() == LOD_AVATAR_CLASS_ID)
@ -685,7 +685,7 @@ bool plCompoundCtrlComponent::Convert(plMaxNode* node, plErrorMsg *pErrMsg)
plString name = node->GetKey()->GetName();
node->MakeCharacterHierarchy(pErrMsg);
node->SetupBonesAliasesRecur(_TEMP_CONVERT_TO_CONST_CHAR(name));
node->SetupBonesAliasesRecur(name.c_str());
// create and register the player modifier

2
Sources/Tools/MaxComponent/plClickDragComponent.cpp

@ -453,7 +453,7 @@ bool plClickDragComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
{
//pMsg->SetAnimName(ENTIRE_ANIMATION_NAME);
pMsg->SetAnimName(pAnim->GetModKey(node)->GetName());
pAxis->SetAnimLabel(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
pAxis->SetAnimLabel(ENTIRE_ANIMATION_NAME);
}
else
{

2
Sources/Tools/MaxComponent/plFootstepComponent.cpp

@ -115,7 +115,7 @@ bool plFootstepSoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
plArmatureEffectFootSound *effect = new plArmatureEffectFootSound();
// Note: MUST be a hard-coded keyname, since we search for same name in plArmatureMod.cpp
hsgResMgr::ResMgr()->NewKey( _TEMP_CONVERT_FROM_LITERAL("FootstepSounds"), effect, node->GetLocation());
hsgResMgr::ResMgr()->NewKey( "FootstepSounds", effect, node->GetLocation());
int i;
for (i = 0; i < plArmatureEffectsMgr::kMaxSurface; i++)

4
Sources/Tools/MaxComponent/plGUIComponents.cpp

@ -2728,7 +2728,7 @@ bool plGUIKnobCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
plAGMasterMod *master = node->GetAGMasterMod();
hsTArray<plKey> keys;
keys.Append( master->GetKey() );
ctrl->SetAnimationKeys( keys, _TEMP_CONVERT_FROM_LITERAL( ENTIRE_ANIMATION_NAME ) );
ctrl->SetAnimationKeys( keys, ENTIRE_ANIMATION_NAME );
}
if( fCompPB->GetInt( kRefOrientation ) == 1 )
@ -4450,7 +4450,7 @@ bool plGUIProgressCtrlComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
plAGMasterMod *master = node->GetAGMasterMod();
hsTArray<plKey> keys;
keys.Append( master->GetKey() );
ctrl->SetAnimationKeys( keys, _TEMP_CONVERT_FROM_LITERAL( ENTIRE_ANIMATION_NAME ) );
ctrl->SetAnimationKeys( keys, ENTIRE_ANIMATION_NAME );
}
const char *errMsg = ISetSoundIndex( kRefAnimateSound, kRefAnimateSoundComp, pfGUIProgressCtrl::kAnimateSound, node );

4
Sources/Tools/MaxComponent/plMaxAnimUtils.cpp

@ -210,8 +210,8 @@ void GetSegment(const char *note, float time, SegmentMap *segMap, plErrorMsg *pE
int matchedFields = sscanf(note, " %[^@] @ %s ", segName, segSuffix);
plString name = _TEMP_CONVERT_FROM_LITERAL(segName);
plString suffix = _TEMP_CONVERT_FROM_LITERAL(segSuffix);
plString name = segName;
plString suffix = segSuffix;
if (matchedFields == 2)
{

6
Sources/Tools/MaxComponent/plPythonFileComponent.cpp

@ -457,7 +457,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
break;
case plAutoUIParam::kTypeString:
pyParam.SetToString(_TEMP_CONVERT_FROM_LITERAL(param->GetString(pb)));
pyParam.SetToString(param->GetString(pb));
mod->AddParameter(pyParam);
break;
@ -807,7 +807,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
// save out the animation name first
plString tempAnimName = animcomp->GetAnimName();
if (tempAnimName.IsNull())
pyParam.SetToAnimationName(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
pyParam.SetToAnimationName(ENTIRE_ANIMATION_NAME);
else
pyParam.SetToAnimationName(tempAnimName);
mod->AddParameter(pyParam);
@ -929,7 +929,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
break;
case plAutoUIParam::kTypeDropDownList:
pyParam.SetToString(_TEMP_CONVERT_FROM_LITERAL(param->GetString(pb)));
pyParam.SetToString(param->GetString(pb));
mod->AddParameter(pyParam);
break;

3
Sources/Tools/MaxComponent/plResponderMtl.cpp

@ -276,10 +276,9 @@ void ISearchLayerRecur(plLayerInterface *layer, const plString &segName, hsTArra
int ISearchLayerRecur(hsGMaterial* mat, const plString &segName, hsTArray<plKey>& keys)
{
plString name = segName.IsNull() ? _TEMP_CONVERT_FROM_LITERAL("") : segName;
int i;
for( i = 0; i < mat->GetNumLayers(); i++ )
ISearchLayerRecur(mat->GetLayer(i), name, keys);
ISearchLayerRecur(mat->GetLayer(i), segName, keys);
return keys.GetCount();
}

2
Sources/Tools/MaxConvert/hsControlConverter.cpp

@ -2158,7 +2158,7 @@ void hsControlConverter::IExportAnimatedCameraFOV(plMaxNode* node, hsTArray <hsG
pMsg->AddReceiver(pCamMod->GetKey());
pMsg->SetSender(pAnim->GetModKey(node));
pMsg->SetCmd(plAnimCmdMsg::kAddCallbacks);
pMsg->SetAnimName(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
pMsg->SetAnimName(ENTIRE_ANIMATION_NAME);
pMsg->fTime = kfArray[0][i].fFrame / MAX_FRAMES_PER_SEC;
pMsg->AddCallback(pCall);
hsRefCnt_SafeUnRef(pCall);

2
Sources/Tools/MaxConvert/hsConverterUtils.cpp

@ -346,7 +346,7 @@ INode* hsConverterUtils::FindINodeFromKeyedObject(hsKeyedObject* obj)
{
hsGuardBegin("hsConverterUtils::FindINodeFromKeyedObject");
INode* retVal = FindINodeFromMangledName(_TEMP_CONVERT_TO_CONST_CHAR(obj->GetKey()->GetName()));
INode* retVal = FindINodeFromMangledName(obj->GetKey()->GetName().c_str());
if( retVal )
return (retVal);

30
Sources/Tools/MaxConvert/hsMaterialConverter.cpp

@ -762,7 +762,7 @@ hsMaterialConverter::CreateMaterialArray(Mtl *maxMaterial, plMaxNode *node, uint
if (maxMaterial)
name = plString::FromUtf8(maxMaterial->GetName());
else
name = _TEMP_CONVERT_FROM_LITERAL("nil");
name = "nil";
/// Get the material
bool isMultiMat = IsMultiMat( maxMaterial );
@ -1183,7 +1183,7 @@ hsGMaterial *hsMaterialConverter::IProcessMaterial(Mtl *mtl, plMaxNode *node, co
plLayer* hLay = new plLayer;
hLay->InitToDefault();
hsgResMgr::ResMgr()->NewKey(name + _TEMP_CONVERT_FROM_LITERAL("_DefLay"), hLay, nodeLoc);
hsgResMgr::ResMgr()->NewKey(name + "_DefLay", hLay, nodeLoc);
IAddLayerToMaterial(hMat, hLay);
}
@ -1337,7 +1337,7 @@ hsGMaterial *hsMaterialConverter::IAddDefaultMaterial(plMaxNode *node)
plLayer *layer = new plLayer;
layer->InitToDefault();
hsgResMgr::ResMgr()->NewKey(hMat->GetKeyName() + _TEMP_CONVERT_FROM_LITERAL("_DefLay"), layer, loc);
hsgResMgr::ResMgr()->NewKey(hMat->GetKeyName() + "_DefLay", layer, loc);
DWORD color = node->GetWireColor();
float r = float(GetRValue(color)) / 255.f;
@ -1353,8 +1353,8 @@ hsGMaterial *hsMaterialConverter::IAddDefaultMaterial(plMaxNode *node)
plMipmap *hsMaterialConverter::IGetUVTransTexture(plMaxNode *node, bool useU /* = true */)
{
plString texName = (useU ? _TEMP_CONVERT_FROM_LITERAL("ALPHA_BLEND_FILTER_U2ALPHA_TRANS_64x4")
: _TEMP_CONVERT_FROM_LITERAL("ALPHA_BLEND_FILTER_V2ALPHA_TRANS_4x64") );
plString texName = (useU ? "ALPHA_BLEND_FILTER_U2ALPHA_TRANS_64x4"
: "ALPHA_BLEND_FILTER_V2ALPHA_TRANS_4x64" );
int w = (useU ? 64 : 4);
int h = (useU ? 4 : 64);
@ -1412,7 +1412,7 @@ void hsMaterialConverter::IInsertSingleBlendLayer(plMipmap *texture, hsGMaterial
plLayer* layer = new plLayer;
layer->InitToDefault();
hsgResMgr::ResMgr()->NewKey(underLay->GetKeyName() + _TEMP_CONVERT_FROM_LITERAL("_AlphaBlend"), layer, node->GetLocation());
hsgResMgr::ResMgr()->NewKey(underLay->GetKeyName() + "_AlphaBlend", layer, node->GetLocation());
hsgResMgr::ResMgr()->AddViaNotify(texture->GetKey(), new plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture), plRefFlags::kActiveRef);
layer->SetAmbientColor(hsColorRGBA().Set(1.f, 1.f, 1.f, 1.f));
// layer->SetZFlags(hsGMatState::kZNoZWrite | hsGMatState::kZIncLayer);
@ -1848,7 +1848,7 @@ plLayerAnimation *IConvertNoteTrackAnims(plLayerAnimation *animLayer, SegmentMap
void ISetDefaultAnim(plPassMtlBase* mtl, plAnimTimeConvert& tc, SegmentMap* segMap)
{
plString animName = _TEMP_CONVERT_FROM_LITERAL( mtl->GetAnimName() );
plString animName = mtl->GetAnimName();
if( segMap && !animName.IsNull() && (segMap->find(animName) != segMap->end()) )
{
SegmentSpec *spec = (*segMap)[animName];
@ -1997,12 +1997,12 @@ static plLayerInterface* IProcessLayerMovie(plPassMtlBase* mtl, plLayerTex* layT
if (isBink)
{
movieLayer = new plLayerBink;
moviePostfix = _TEMP_CONVERT_FROM_LITERAL("_bink");
moviePostfix = "_bink";
}
else if (isAvi)
{
movieLayer = new plLayerAVI;
moviePostfix = _TEMP_CONVERT_FROM_LITERAL("_avi");
moviePostfix = "_avi";
}
plString movieKeyName = layerIFace->GetKeyName() + moviePostfix;
@ -2075,8 +2075,8 @@ plLayerInterface* IProcessLayerAnimation(plPassMtlBase* mtl, plLayerTex* layTex,
plString segName = stealth->GetSegmentName();
bool isDefault = ( segName.IsNull() || segName.Compare( ENTIRE_ANIMATION_NAME ) == 0 ) ? true : false;
plString animName = name + ( ( isDefault ) ? _TEMP_CONVERT_FROM_LITERAL( "_LayerAnim_" )
: ( _TEMP_CONVERT_FROM_LITERAL("_LayerAnim") + segName ) );
plString animName = name + ( ( isDefault ) ? "_LayerAnim_"
: ( plString("_LayerAnim") + segName ) );
hsgResMgr::ResMgr()->NewKey( animName, noteAnim, node->GetLocation() );
StdUVGen *uvGen = (StdUVGen *)layTex->GetTheUVGen();
@ -2191,8 +2191,8 @@ plLayerInterface* IProcessAnimation(plPassMtlBase *mtl, plMaxNode *node, const p
plString segName = stealth->GetSegmentName();
bool isDefault = ( segName.IsNull() || segName.Compare( ENTIRE_ANIMATION_NAME ) == 0 ) ? true : false;
plString animName = name + ( ( isDefault ) ? _TEMP_CONVERT_FROM_LITERAL( "_anim" )
: ( _TEMP_CONVERT_FROM_LITERAL("_anim_") + segName ) );
plString animName = name + ( ( isDefault ) ? "_anim"
: ( plString("_anim_") + segName ) );
hsgResMgr::ResMgr()->NewKey( animName, noteAnim, node->GetLocation() );
plController *noteColCtl = cc.MakeColorController( maxColCtl, node );
@ -3128,7 +3128,7 @@ void hsMaterialConverter::IAppendFunkyLayer(plMaxNode* node, Texmap* texMap, hsG
plBitmap* hsMaterialConverter::IGetFunkyRamp(plMaxNode* node, uint32_t funkyType)
{
plString funkName = funkyType & kFunkyAdd ? _TEMP_CONVERT_FROM_LITERAL("FunkyRampAdd") : _TEMP_CONVERT_FROM_LITERAL("FunkyRampMult");
plString funkName = funkyType & kFunkyAdd ? "FunkyRampAdd" : "FunkyRampMult";
const int kLUTWidth = 16;
const int kLUTHeight = 16;
@ -3510,7 +3510,7 @@ BitmapTex* hsMaterialConverter::GetBumpLayer(plMaxNode* node, Mtl* mtl)
plMipmap *hsMaterialConverter::IGetBumpLutTexture(plMaxNode *node)
{
const plString texName = _TEMP_CONVERT_FROM_LITERAL("BumpLutTexture");
const plString texName = "BumpLutTexture";
//#define FUNKYBUMP
#ifndef FUNKYBUMP

4
Sources/Tools/MaxConvert/plBitmapCreator.cpp

@ -548,8 +548,8 @@ plBitmap *plBitmapCreator::ICreateTexture( plBitmapData *bd, const plLocation &l
else
name = plString::Format( "%s*%x", temp, bd->texFlags );
if( bd->invertAlpha )
name += _TEMP_CONVERT_FROM_LITERAL( "_inva" );
name += _TEMP_CONVERT_FROM_LITERAL( ".hsm" );
name += "_inva";
name += ".hsm";
// Has this texture been used before?

2
Sources/Tools/MaxMain/plTextureExportLog.cpp

@ -146,7 +146,7 @@ void plTextureExportLog::Write( void )
plRenderTarget* rend = plRenderTarget::ConvertNoRef( node->fBitmap );
// Name
IWriteTabbedString( stream, _TEMP_CONVERT_TO_CONST_CHAR( node->fBitmap->GetKeyName() ), dynText != nil ? 8 : 4 );
IWriteTabbedString( stream, node->fBitmap->GetKeyName().c_str(), dynText != nil ? 8 : 4 );
// Size, formatted
size = node->fBitmap->GetTotalSize();

2
Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthConvert.cpp

@ -83,7 +83,7 @@ static void ISearchLayerRecur( plLayerInterface *layer, const plString &segName,
static int ISearchLayerRecur(hsGMaterial* mat, const plString &segName, hsTArray<plKey>& keys)
{
plString name = (segName.IsNull() || segName.Compare( ENTIRE_ANIMATION_NAME ) == 0 ) ? _TEMP_CONVERT_FROM_LITERAL( "" ) : segName;
plString name = ( segName.Compare( ENTIRE_ANIMATION_NAME ) == 0 ) ? "" : segName;
int i;
for( i = 0; i < mat->GetNumLayers(); i++ )
ISearchLayerRecur(mat->GetLayer(i), name, keys);

2
Sources/Tools/MaxPlasmaMtls/Materials/plAnimStealthNode.cpp

@ -254,7 +254,7 @@ plString plAnimStealthNode::GetSegmentName( void ) const
{
const char *str = fParamBlock->GetStr( (ParamID)kPBName );
if( str == nil || str[ 0 ] == 0 )
return _TEMP_CONVERT_FROM_LITERAL( ENTIRE_ANIMATION_NAME );
return ENTIRE_ANIMATION_NAME;
return plString::FromUtf8(str);
}

2
Sources/Tools/MaxPlasmaMtls/Materials/plBumpMtl.cpp

@ -86,7 +86,7 @@ plBumpMtl::plBumpMtl(BOOL loading) : plPassMtlBase( loading )
// If we do this later (like, when the dialog loads) something blows up,
// somewhere in Max. It didn't in 4, it does in 7. This seems to fix it.
if (!loading)
IVerifyStealthPresent(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
IVerifyStealthPresent(ENTIRE_ANIMATION_NAME);
}
ParamDlg* plBumpMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp)

2
Sources/Tools/MaxPlasmaMtls/Materials/plDecalMtl.cpp

@ -93,7 +93,7 @@ plDecalMtl::plDecalMtl(BOOL loading) : plPassMtlBase( loading )
// If we do this later (like, when the dialog loads) something blows up,
// somewhere in Max. It didn't in 4, it does in 7. This seems to fix it.
if (!loading)
IVerifyStealthPresent(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
IVerifyStealthPresent(ENTIRE_ANIMATION_NAME);
}
ParamDlg* plDecalMtl::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp)

2
Sources/Tools/MaxPlasmaMtls/Materials/plPassMtl.cpp

@ -96,7 +96,7 @@ plPassMtl::plPassMtl(BOOL loading) : plPassMtlBase( loading )
// If we do this later (like, when the dialog loads) something blows up,
// somewhere in Max. It didn't in 4, it does in 7. This seems to fix it.
if (!loading)
IVerifyStealthPresent(_TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME));
IVerifyStealthPresent(ENTIRE_ANIMATION_NAME);
}
plPassMtl::~plPassMtl()

6
Sources/Tools/MaxPlasmaMtls/Materials/plPassMtlBase.cpp

@ -215,7 +215,7 @@ plAnimStealthNode *plPassMtlBase::IVerifyStealthPresent( const plString &animN
// New segment, add a new stealth node
stealth = (plAnimStealthNode *)GetCOREInterface()->CreateInstance( HELPER_CLASS_ID, ANIMSTEALTH_CLASSID );
INode *node = GetCOREInterface()->CreateObjectNode( stealth );
stealth->SetSegment( ( animName.Compare(ENTIRE_ANIMATION_NAME) != 0 ) ? _TEMP_CONVERT_TO_CONST_CHAR(animName) : nil );
stealth->SetSegment( ( animName.Compare(ENTIRE_ANIMATION_NAME) != 0 ) ? animName.c_str() : nil );
stealth->SetNodeName( GetName() );
node->Freeze( true );
@ -277,7 +277,7 @@ void plPassMtlBase::IUpdateAnimNodes( void )
fStealthsChanged = false;
// Verify one for "entire animation"
plAnimStealthNode *stealth = IVerifyStealthPresent( _TEMP_CONVERT_FROM_LITERAL(ENTIRE_ANIMATION_NAME) );
plAnimStealthNode *stealth = IVerifyStealthPresent( ENTIRE_ANIMATION_NAME );
goodNodes.Append( stealth );
// Verify segment nodes
@ -519,7 +519,7 @@ void plPassMtlBase::PostLoadAnimPBFixup( void )
plAnimStealthNode *node = (plAnimStealthNode *)fAnimPB->GetReferenceTarget( (ParamID)kPBAnimStealthNodes, 0, i );
plString name = node->GetSegmentName();
node->SetAutoStart( false );
node->SetLoop( true, _TEMP_CONVERT_FROM_LITERAL( ENTIRE_ANIMATION_NAME ) );
node->SetLoop( true, ENTIRE_ANIMATION_NAME );
node->SetEaseIn( plAnimEaseTypes::kNoEase, 1.f, 1.f, 1.f );
node->SetEaseOut( plAnimEaseTypes::kNoEase, 1.f, 1.f, 1.f );
}

Loading…
Cancel
Save