0x67 — fade_control
Branches on handler_arg_byte >> 4 and calls CRadiFade::SetColorFade, CRadiFade::SetDissolves, or CRadiFade::SetBattleInFade.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x67 (103) |
|---|---|
| Handler | CRadiScript::Command_67 |
| Signature | CRadiScript::Command_67(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run6.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x278 (632 bytes) |
| Engine name | fade_control |
| Family | Primitives, textures, sound and movies |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Branches on handler_arg_byte >> 4 and calls CRadiFade::SetColorFade, CRadiFade::SetDissolves, or CRadiFade::SetBattleInFade.
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 | 0x67 |
+----------------+----------------+----------------+----------------+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
10 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 |
|---|---|---|
bit4 | input | Single bit whose meaning is not yet traced; preserved so the command round-trips. |
color | input | Fade colour: black, white, current (the global fade colour), or an explicit 0xAARRGGBB word. |
control | input | Bitmask word choosing which optional payload words follow, in the order the handler tests them. Changing it changes how many words the command carries. |
curve | input | Interpolation curve index; the engine scales the duration through a per-curve table. |
direction | input | out fades the screen to the colour, in fades from it. Control bit 0 picks which end of the colour pair carries the alpha byte. |
dissolve_value | input | Value used for dissolve. |
duration | input | How long the fade takes. This is the value itself, not a rendering of another field. |
hold | derived | Keep the finished fade on screen instead of releasing it (control bit 1). A fade-to-black needs this or the screen uncovers itself. |
mode | input | Handler path selector taken from the argument byte. The meaning is specific to each command. |
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:
CRadiFade::SetBattleInFade(unsigned int,float,CVector*)CRadiFade::SetColorFade(unsigned int,unsigned int,float,unsigned int,unsigned char)CRadiFade::SetDissolves(unsigned int,unsigned int,float,unsigned int,float)
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0xFFFF 0x000F 0x0004