0x62 — sprite_config
Reads a bitfield word and consumes variable operands to configure one CSpriteG_Base slot. Proven fields include halfword coordinate/rect values, texture page setup through CSpriteG_Base::MakeTexturePage, floats at sprite offsets 0x24/0x28, and virtual sprite methods from vtable offsets 0x14, 0x1C, 0x3C, 0x48, and 0x4C.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x62 (98) |
|---|---|
| Handler | CRadiScript::Command_62 |
| Signature | CRadiScript::Command_62(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run6.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x3E0 (992 bytes) |
| Engine name | sprite_config |
| Family | Primitives, textures, sound and movies |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Reads a bitfield word and consumes variable operands to configure one CSpriteG_Base slot. Proven fields include halfword coordinate/rect values, texture page setup through CSpriteG_Base::MakeTexturePage, floats at sprite offsets 0x24/0x28, and virtual sprite methods from vtable offsets 0x14, 0x1C, 0x3C, 0x48, and 0x4C.
Encoding
The command header is one 32-bit word, as described in §3 Instruction encoding:
31 24 23 16 15 8 7 0
+----------------+----------------+----------------+----------------+
| flags | argument byte | extra words | 0x62 |
+----------------+----------------+----------------+----------------+Bits 8–15 give the number of 32-bit operand words that follow. Bits 16–23 are handed to the handler as a bitfield; on character commands bit 0 normally says whether a character selector word is present. Bit 31 is the keep-going bit.
Operand fields
16 documented fields. input fields are read from the command's operand words; derived fields are computed from other fields rather than stored separately.
| Field | Role | Meaning |
|---|---|---|
arg | input | Raw handler argument byte from the command header. It is printed only when it differs from the value the named fields already imply, so seeing it means the command uses an unusual argument encoding. |
blend_alpha | input | Blend parameters applied when the sprite is drawn. |
color | input | Packed colour word written to the sprite slot. |
control | derived | Bitmask word choosing which optional payload words follow, in the order the handler tests them. Changing it changes how many words the command carries. |
corner_offset | input | Offset applied to corner. |
mask | derived | Bitmask selecting which parts of the command apply. |
rotate | input | Set when rotation is included on this line. |
scale | input | Set when scale is animated by this line; the scale values follow. |
size | input | Sprite size as width,height. |
sprite_index | input | Index selecting which sprite to act on. |
status_bits | input | Names of the bits set in the matching packed value. |
texture_page | input | Which texture page and palette the sprite draws from. |
time_base | input | Timing base word for the sprite's animation. |
trailing | input | Words left after the decoded operands, preserved verbatim. |
xy | input | Top-left corner of the sprite, as x,y screen coordinates. |
yield | derived | Pause the script here for one game frame; the next command runs on the following update. Lines without it keep running immediately. |
Engine calls
Engine functions this handler was observed calling:
CSpriteG_Base::MakeTexturePage(unsigned int,unsigned int,unsigned int,int)vtable: color / rotation / blend / size / UV
Bit masks
Masks the handler applies to its argument byte or operand words:
0x00FF 0x0003 0x0001 0x0002 0x0004 0x0008 0x000F 0x0010 0x0020 0x0040