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

Alright, this _TEMP_CONVERT_ stuff was a stupid idea

This commit is contained in:
2012-11-13 01:02:23 -08:00
parent 075c535e2c
commit b219c3c3cc
97 changed files with 314 additions and 466 deletions

View File

@ -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
}
}
}

View File

@ -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. */

View File

@ -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)

View File

@ -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.

View File

@ -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()

View File

@ -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

View File

@ -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();
}

View File

@ -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 )

View File

@ -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;
}

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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 );
}

View File

@ -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

View File

@ -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();

View File

@ -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) ||

View File

@ -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;

View File

@ -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 );

View File

@ -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; }

View File

@ -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)

View File

@ -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++)

View File

@ -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
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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()) {

View File

@ -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);

View File

@ -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())

View File

@ -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
);
}

View File

@ -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);

View File

@ -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);
}

View File

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

View File

@ -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)

View File

@ -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);
}

View File

@ -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));

View File

@ -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

View File

@ -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;

View File

@ -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());
}

View File

@ -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

View File

@ -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;
}

View File

@ -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());

View File

@ -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));
}
///////////////////////////////////////////////////////////////

View File

@ -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.