TextureCreateFromFile
function · gx · orchestration
- Address
0x449610· 470 bytes, up to0x4497e5- Signature
void * __fastcall (const char *path, uint32_t format, uint32_t loose)- Meaning
- Opens path with .blp appended and returns an HTEXTURE handle whose pixels decode when the async read completes
- Confidence
- verified, proof one
- Finding
- gx/textures#texture-file-creation
Finding: Texture file creation in gx: textures
0x449610(path, format, loose) opens path split by 0x449590 with .blp (0x83524c) appended through SFile::OpenEx(0, name, loose != 0, &handle) (storm/mount#loose-files), returns 0 on failure, else allocates a CTexture, sets bit 0x2 of +0x110 for loose, copies the name, stores format at +0x118 and 0 at +0x120, and takes an async record from 0x4438b0: record +0 the file, +8 its size, +0xc the texture, +0x10 the completion callback 0x4497f0. When the file's size fits in what remains of 2 MiB (counter 0xb05d18) the record's buffer is the next slice of the static area at 0x905be4 and 0x443ae0 queues the read; otherwise the record joins the waiting list. 0x44a310 does the same for a name with its extension, callback 0x44a500.
The derivation is in the doc.
Callers 8
- CGlueMgr::InitCursor glue
- TextureCacheLoad gx
- LoadCursorImages ui
- SetCursorPictureCoin ui
- SetCursorPictureFromPath ui
- SetCursorPictureFromItem ui
- SetCursorPictureFromDisplayId ui
- SetCustomCursor ui
Callees 10
- CreateHandle base
- 0x4438b0 client
- 0x443ae0 client
- CTexture::CTexture gx
- TextureSplitExtension gx
- SMemAlloc storm
- SFile::OpenEx storm
- SFile::GetFileSize storm
- SStrCopy storm
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.