One texture stage of a material.
The structure is 0x60 bytes and emits no RTTI descriptor. Its member names come from the labels the stage text dump writes, "\n\tblend:", " coordIndex:", " genMode:", " xfm:", "useXfm:", " wrap:", " mat:", and " tex:". The dump writes the material reference before the texture reference even though the texture is stored first.
| Rnd::Mat::Stage::Stage |
( |
| ) |
|
Construct a stage with the default surface.
The blend becomes kBlendModeMultiply, the coordinate set and the generation mode zero, the transform the identity, the wrap kWrapModeRepeat, and both references null.
- Ghidra address:
- NTSC-U/C: 0x004dd020
- Ghidra address:
- PAL: 0x0051b5c0
| void Rnd::Mat::Stage::Load |
( |
Stream & | stream | ) |
|
Load the stage.
Rnd::g_nRndMatLoadVersion decides the layout. From revision 3 the blend arrives as a BlendMode. Below that it arrives as two words, of which only the first is used, mapped 0, 1, 2, 3, 4, 5, and 6 to kBlendModeDest, kBlendModeSrc, kBlendModeMultiply, kBlendModeAdd, kBlendModeDestAlpha, kBlendModeSrcAlpha, and kBlendModeInvDestAlpha, and any other value leaves the blend as it was. A revision 0 record then names the material the stage belongs to, and every revision ends with the texture.
- Parameters
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x004d2a20
- Ghidra address:
- PAL: 0x00510e70