0x59 — camera_color_anim
Branches on handler_arg_byte >> 4. Modes 0..7 call CRadiCameraSystem::MoveCameraEtc2; mode 0xE calls CRadiCameraSystem::PlayFogColorAnim; mode 0xF calls CBackGround::PlayAmbientColorAnim.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x59 (89) |
|---|---|
| Handler | CRadiScript::Command_59 |
| Signature | CRadiScript::Command_59(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run5.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x328 (808 bytes) |
| Engine name | camera_color_anim |
| Family | Background, map, landscape and camera |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Branches on handler_arg_byte >> 4. Modes 0..7 call CRadiCameraSystem::MoveCameraEtc2; mode 0xE calls CRadiCameraSystem::PlayFogColorAnim; mode 0xF calls CBackGround::PlayAmbientColorAnim.
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 | 0x59 |
+----------------+----------------+----------------+----------------+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
14 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 |
|---|---|---|
blend_flag | derived | Boolean option controlling blend. |
duration | input | Human-readable rendering of the command's duration word. Edit the underlying duration_word when it is listed as an input. |
end_color | input | Packed RGBA8 end colour word; end_rgba8 beside it shows the four channels. |
flags | input | Command header flag byte. Bit 0x80 is the keep-going bit: set (the hidden default), the next command runs in the same frame; clear (printed as yield=1), the script pauses until the next game update. Other bits are rare and stay as an explicit flags= byte. |
float0 | derived | Float parameter 0 consumed by this command. |
float1 | input | Float parameter 1 consumed by this command. |
float2 | input | Float parameter 2 consumed by this command. |
has_first_float | derived | Whether first float is present on this line. |
has_start_color | derived | Whether start color is present on this line. |
kind | derived | Which colour this line animates: fog or ambient. |
low | input | Lower part of the matching packed value. |
mode | input | Handler path selector taken from the argument byte. The meaning is specific to each command. |
target_slot | derived | Destination index into a runtime table owned by this command's subsystem. |
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:
CBackGround::PlayAmbientColorAnim(unsigned int,float,const CVector*,const CVector*)CRadiCameraSystem::MoveCameraEtc2(unsigned int,unsigned int,float,float,float)CRadiCameraSystem::PlayFogColorAnim(unsigned int,float,const CVector*,const CVector*)PlayFogColorAnim
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0x00FF 0x0008 0x000F