2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-15 10:54:18 +00:00

Convert plUoid's object name to a plString

This commit is contained in:
2012-01-28 16:24:20 -08:00
parent 442a733fbb
commit e34414889f
122 changed files with 810 additions and 842 deletions

View File

@ -934,7 +934,7 @@ hsBool plAudioSystem::MsgReceive(plMessage* msg)
{
//if( fListener )
{
plProfile_BeginLap(AudioUpdate, this->GetKey()->GetUoid().GetObjectName());
plProfile_BeginLap(AudioUpdate, this->GetKey()->GetUoid().GetObjectName().c_str());
if(hsTimer::GetMilliSeconds() - fLastUpdateTimeMs > UPDATE_TIME_MS)
{
IUpdateSoftSounds( fCurrListenerPos );
@ -947,7 +947,7 @@ hsBool plAudioSystem::MsgReceive(plMessage* msg)
}
//fCommittedListenerPos = fCurrListenerPos;
}
plProfile_EndLap(AudioUpdate, this->GetKey()->GetUoid().GetObjectName());
plProfile_EndLap(AudioUpdate, this->GetKey()->GetUoid().GetObjectName().c_str());
}
return true;

View File

@ -141,10 +141,10 @@ void plSound::IPrintDbgMessage( const char *msg, hsBool isError )
if( isError )
// ourLog->AddLineF( plStatusLog::kRed, "ERROR: %s (%s)", msg, GetKey() ? GetKeyName() : "unkeyed" );
ourLog->AddLineS( "audio.log", plStatusLog::kRed, "ERROR: %s (%s)", msg, GetKey() ? GetKeyName() : "unkeyed" );
ourLog->AddLineS( "audio.log", plStatusLog::kRed, "ERROR: %s (%s)", msg, GetKey() ? GetKeyName().c_str() : "unkeyed" );
else
// ourLog->AddLineF( "%s (%s)", msg, GetKey() ? GetKeyName() : "unkeyed" );
ourLog->AddLineS( "audio.log", "%s (%s)", msg, GetKey() ? GetKeyName() : "unkeyed" );
ourLog->AddLineS( "audio.log", "%s (%s)", msg, GetKey() ? GetKeyName().c_str() : "unkeyed" );
}
///////////////////////////////////////////////////////////
@ -163,7 +163,7 @@ void plSound::IUpdateDebugPlate( void )
fDebugPlate->SetPosition( -0.5, 0 );
fDebugPlate->SetDataRange( 0, 100, 100 );
fDebugPlate->SetColors( 0x80202000 );
fDebugPlate->SetTitle( (char *)GetKeyName() ); // Bleah
fDebugPlate->SetTitle( _TEMP_CONVERT_TO_CONST_CHAR( GetKeyName() ) ); // Bleah
fDebugPlate->SetLabelText( "Desired", "Curr", "Soft", "Dist" );
}
@ -190,7 +190,7 @@ void plSound::SetCurrDebugPlate( const plKey soundKey )
{
fDebugPlate->ClearData();
fDebugPlate->SetVisible( true );
fDebugPlate->SetTitle( (char *)fCurrDebugPlateSound->GetKeyName() ); // Bleah
fDebugPlate->SetTitle( _TEMP_CONVERT_TO_CONST_CHAR( fCurrDebugPlateSound->GetKeyName() ) ); // Bleah
}
}
}

View File

@ -410,8 +410,7 @@ plVoiceSound::plVoiceSound()
fEAXSettings.SetRoomParams(-1200, -100, 0, 0);
fLastUpdate = 0;
char keyName[32];
snprintf(keyName, arrsize(keyName), "VoiceSound_%d", fCount);
plString keyName = plString::Format("VoiceSound_%d", fCount);
fCount++;
hsgResMgr::ResMgr()->NewKey(keyName, this, plLocation::kGlobalFixedLoc);
}

View File

@ -160,9 +160,8 @@ hsBool plWin32GroupedSound::LoadSound( hsBool is3D )
// We need it to be resident to read in
if( retVal == plSoundBuffer::kError)
{
char str[ 256 ];
sprintf( str, "Unable to open .wav file %s", fDataBufferKey ? fDataBufferKey->GetName() : "nil");
IPrintDbgMessage( str, true );
plString str = plString::Format("Unable to open .wav file %s", fDataBufferKey ? fDataBufferKey->GetName().c_str() : "nil");
IPrintDbgMessage( str.c_str(), true );
fFailed = true;
return false;
}
@ -229,9 +228,8 @@ hsBool plWin32GroupedSound::LoadSound( hsBool is3D )
IFillCurrentSound( 0 );
// Logging
char str[ 256 ];
sprintf( str, " Grouped %s %s allocated (%d msec).", buffer->GetFileName() != nil ? "file" : "buffer",
buffer->GetFileName() != nil ? buffer->GetFileName() : buffer->GetKey()->GetUoid().GetObjectName(),
plString str = plString::Format(" Grouped %s %s allocated (%d msec).", buffer->GetFileName() != nil ? "file" : "buffer",
buffer->GetFileName() != nil ? buffer->GetFileName() : buffer->GetKey()->GetUoid().GetObjectName().c_str(),
//fDSoundBuffer->IsHardwareAccelerated() ? "hardware" : "software",
//fDSoundBuffer->IsStaticVoice() ? "static" : "dynamic",
#ifdef PL_PROFILE_ENABLED
@ -239,11 +237,11 @@ hsBool plWin32GroupedSound::LoadSound( hsBool is3D )
#else
0 );
#endif
IPrintDbgMessage( str );
if( GetKey() != nil && GetKeyName() != nil && strstr( GetKeyName(), "Footstep" ) != nil )
IPrintDbgMessage( str.c_str() );
if( GetKey() != nil && GetKeyName().Find( "Footstep" ) >= 0 )
;
else
plStatusLog::AddLineS( "audioTimes.log", "%s (%s)", str, GetKey() ? GetKeyName() : "unkeyed" );
plStatusLog::AddLineS( "audioTimes.log", "%s (%s)", str, GetKey() ? GetKeyName().c_str() : "unkeyed" );
fTotalBytes = bufferSize;

View File

@ -168,7 +168,7 @@ void plWin32Sound::IActuallyStop()
{
if( fDSoundBuffer != nil && fDSoundBuffer->IsPlaying() )
{
plStatusLog::AddLineS( "audio.log", 0xffff0000, "WARNING: BUFFER FLAGGED AS STOPPED BUT NOT STOPPED - %s", GetKey() ? GetKeyName() : nil );
plStatusLog::AddLineS( "audio.log", 0xffff0000, "WARNING: BUFFER FLAGGED AS STOPPED BUT NOT STOPPED - %s", GetKey() ? GetKeyName().c_str() : nil );
fDSoundBuffer->Stop();
}
}

View File

@ -115,9 +115,8 @@ hsBool plWin32StaticSound::LoadSound( hsBool is3D )
if( retVal == plSoundBuffer::kError )
{
char str[ 256 ];
sprintf( str, "Unable to open .wav file %s", fDataBufferKey ? fDataBufferKey->GetName() : "nil");
IPrintDbgMessage( str, true );
plString str = plString::Format( "Unable to open .wav file %s", fDataBufferKey ? fDataBufferKey->GetName().c_str() : "nil");
IPrintDbgMessage( str.c_str(), true );
fFailed = true;
return false;
}