benilla-re systems structs docs

M2DrawSetTextures

function · models · primitive

Address
0x70b740 · 935 bytes, up to 0x70bae6
Meaning
Binds an element's textures, combines and texture coordinate sources to the device stages
Confidence
verified, proof one
Finding
models/render#texture-stages

Finding: Texture stages in models: drawing

An element of kind 0 to 2 binds a stage per texture of its unit. Stage k binds the instance texture +0xa4[i], i the header's texture lookup entry at unit +0x10 + k, or 0 for a null handle, combine 0x811f8c by blend mode (0, 1, 1, 1, 1, 5, 5), or for version 0x101 the array +0x148 at k, and the scene float +0x14. Stages from the count up to 1 bind 0; other kinds bind 0 with combine 1 on stages 0 and 1. A lookup entry of 0x8000 or more is inverted into a texture frame state index, but zero-extended first, so the word read lies 0x100014 to 0x1ffff4 bytes before those states and indexes +0xa4 unbounded.

The derivation is in the doc.

Callers 3

Callees 6

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