1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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