SetPortraitTexture
function · ui · primitive
- Address
0x525d30· 589 bytes, up to0x525f7c- Signature
void __fastcall (CSimpleTexture *texture, const char *name)- Meaning
- Sets a texture to the cached 64 by 64 portrait of an image with its alpha replaced by the circular mask
- Confidence
- verified, proof one
- Finding
- ui/portraittextures#portrait-sink
Finding: Portrait sink in ui: portrait textures
0x525d30(texture, name) sets a texture to the circular portrait of an image. An empty name does nothing. The cache
0xc0ce30 is looked up by the Storm hash of the name (0x64b3f0, which folds case and /) with a case-sensitive
compare; a hit sets the cached texture. A miss inserts the entry first, then loads <name>.blp (appending .blp
whatever the name ends in) and decodes mip 0 as 32-bit. It keeps exactly 64 by 64 texels (4096), copied unchanged,
replaces every texel's alpha byte with the mask byte at the same index, creates a 64 by 64 texture named Portrait2,
and sets it. Names that differ only in case get separate entries.
The derivation is in the doc.
Callers 3
- Script::SetPortraitToTexture ui
- Script::SetInventoryPortaitTexture ui
- Script::SetBagPortaitTexture ui
Callees 15
- TextureCreateWithCallback gx
- GetPortraitAlphaMask ui
- 0x525f80 ui
- GrowArrayBy526930 ui
- 0x527010 ui
- LinkOrEnd527410 ui
- CGxTexFlags::CGxTexFlags gx
- BlpReset image
- BlpOpen image
- BlpDecodeLevel image
- BlpFreeScratch image
- SStrCmp storm
- SStrPrintf storm
- SStrHashHT storm
- CSimpleTexture::SetImage ui
Calls and jumps by a bare address, from tables/calls.tsv.