mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Convert many of the now-deprecated plString::Format calls to plFormat
This commit is contained in:
@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plDXEnumerate.h"
|
||||
#include "plPipeline/hsG3DDeviceSelector.h"
|
||||
#include "hsGDirect3D.h"
|
||||
#include "plFormat.h"
|
||||
|
||||
|
||||
//// Local Typedefs ///////////////////////////////////////////////////////////
|
||||
@ -84,12 +85,12 @@ HRESULT hsGDirect3DTnLEnumerate::SelectFromDevMode(const hsG3DDeviceRecord* devR
|
||||
}
|
||||
}
|
||||
}
|
||||
plString errStr = plString::Format("Can't find requested device - %s:%s:%s:%s:%s",
|
||||
plString errStr = plFormat("Can't find requested device - {}:{}:{}:{}:{}",
|
||||
devRec->GetG3DDeviceTypeName(),
|
||||
devRec->GetDriverDesc().c_str(),
|
||||
devRec->GetDriverName().c_str(),
|
||||
devRec->GetDriverVersion().c_str(),
|
||||
devRec->GetDeviceDesc().c_str());
|
||||
devRec->GetDriverDesc(),
|
||||
devRec->GetDriverName(),
|
||||
devRec->GetDriverVersion(),
|
||||
devRec->GetDeviceDesc());
|
||||
|
||||
DWORD enumFlags = 0;
|
||||
int width = devMode->GetWidth();
|
||||
|
@ -141,7 +141,7 @@ bool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height)
|
||||
plRenderTarget* rt = new plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
|
||||
|
||||
static int idx=0;
|
||||
plString buff = plString::Format("tRT%d", idx++);
|
||||
plString buff = plFormat("tRT{}", idx++);
|
||||
hsgResMgr::ResMgr()->NewKey(buff, rt, ack->GetUoid().GetLocation());
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ bool plCaptureRender::IProcess(plPipeline* pipe, const plKey& ack, plRenderTarge
|
||||
static int currentCapIndex = 0;
|
||||
|
||||
// Mipmap isn't created with a key so let's give it one now
|
||||
plString buff = plString::Format("CaptureRender_%d", currentCapIndex++);
|
||||
plString buff = plFormat("CaptureRender_{}", currentCapIndex++);
|
||||
|
||||
hsgResMgr::ResMgr()->NewKey(buff, mipMap, plLocation::kGlobalFixedLoc);
|
||||
mipMap->Ref();
|
||||
|
@ -160,7 +160,7 @@ void plPlate::SetTexture(plBitmap *texture)
|
||||
plString keyName;
|
||||
|
||||
material = new hsGMaterial();
|
||||
keyName = plString::Format( "PlateBlank#%d", fMagicUniqueKeyInt++ );
|
||||
keyName = plFormat("PlateBlank#{}", fMagicUniqueKeyInt++);
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, material, plLocation::kGlobalFixedLoc );
|
||||
layer = material->MakeBaseLayer();
|
||||
layer->SetShadeFlags( layer->GetShadeFlags() | hsGMatState::kShadeNoShade | hsGMatState::kShadeWhite | hsGMatState::kShadeReallyNoFog );
|
||||
@ -207,14 +207,14 @@ plMipmap *plPlate::CreateMaterial( uint32_t width, uint32_t height, bool with
|
||||
/// Create a new bitmap
|
||||
fMipmap = new plMipmap( width, height, withAlpha ? plMipmap::kARGB32Config : plMipmap::kRGB32Config, 1 );
|
||||
memset( fMipmap->GetImage(), 0xff, height * fMipmap->GetRowBytes() );
|
||||
keyName = plString::Format( "PlateBitmap#%d", fMagicUniqueKeyInt++ );
|
||||
keyName = plFormat("PlateBitmap#{}", fMagicUniqueKeyInt++);
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, fMipmap, plLocation::kGlobalFixedLoc );
|
||||
fMipmap->SetFlags( fMipmap->GetFlags() | plMipmap::kDontThrowAwayImage );
|
||||
}
|
||||
|
||||
/// NOW create a layer wrapper and a material for that layer
|
||||
material = new hsGMaterial();
|
||||
keyName = plString::Format( "PlateBlank#%d", fMagicUniqueKeyInt++ );
|
||||
keyName = plFormat("PlateBlank#{}", fMagicUniqueKeyInt++);
|
||||
hsgResMgr::ResMgr()->NewKey( keyName, material, plLocation::kGlobalFixedLoc );
|
||||
layer = material->MakeBaseLayer();
|
||||
layer->SetShadeFlags( layer->GetShadeFlags() | hsGMatState::kShadeNoShade | hsGMatState::kShadeWhite | hsGMatState::kShadeReallyNoFog );
|
||||
@ -245,7 +245,7 @@ void plPlate::CreateFromResource(const plString& resName)
|
||||
plMipmap* resTexture = new plMipmap;
|
||||
resTexture->CopyFrom(plClientResMgr::Instance().getResource(resName));
|
||||
|
||||
plString keyName = plString::Format( "PlateResource#%d", fMagicUniqueKeyInt++ );
|
||||
plString keyName = plFormat("PlateResource#{}", fMagicUniqueKeyInt++);
|
||||
hsgResMgr::ResMgr()->NewKey(keyName, resTexture, plLocation::kGlobalFixedLoc);
|
||||
CreateMaterial(resTexture->GetWidth(), resTexture->GetHeight(), true, resTexture);
|
||||
}
|
||||
|
Reference in New Issue
Block a user