mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Crops a texture to one cell of an evenly divided grid, which is the arithmetic every sprite-sheet call site would otherwise repeat. It is the primitive behind raid target markers, whose eight icons share one 4x4 sheet, and this client already ships the FrameXML helper (SetRaidTargetIconTexture) that wants it. `cell` is 1-based and counts left to right then top to bottom — Blizzard types the argument `luaIndex`, and its own callers pass GetRaidTargetIndex straight through without adjusting it. cellWidth and cellHeight are accepted and ignored. Both call sites in Blizzard's UI pass the three-argument form, and the grid alone already fixes each cell's coordinates, so honoring them would mean guessing at their meaning. The coordinates go through the engine's own SetTexCoord handler, so this module contributes only the grid math.