benilla-re systems structs docs

TexturePickAlternateFilename

function · gx · primitive

Address
0x44b320 · 115 bytes, up to 0x44b392
Meaning
Copies a file name, cuts it at its last dot and appends .BLP for type 1 or .TGA for type 2, returning 2 or 1
Confidence
verified, proof one
Name from
the community database (idb)
Finding
gx/textures#texture-file-name-builders

Finding: Texture file name builders in gx: textures

Callers that build a texture file name themselves do not all split it. 0x449610 splits the name with 0x449590 and then always appends .blp, so Foo.tga opens Foo.blp. 0x44b320(name, buffer, type, size) copies the name, cuts it at its last dot of any length (at the end when it has none), and appends .BLP for type 1 and returns 2, or .TGA for type 2 and returns 1; type 0 returns 0 with the copy uncut, and another type returns itself with the cut and no suffix. The builders that format a name append .blp to whatever they are given, with no split: a name ending in .tga gives <name>.tga.blp.

The derivation is in the doc.

Callers 2

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.