0x52 — camera_transform_param
Branches on handler_arg_byte and control bits, calls CCharacterCapture::Capture, CRLHCamera::AddAcceleration, CRLHCamera::SetRotate, and CAutoRateBase::SetParam for camera-related parameters.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x52 (82) |
|---|---|
| Handler | CRadiScript::Command_52 |
| Signature | CRadiScript::Command_52(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run5.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x5A0 (1440 bytes) |
| Engine name | camera_transform_param |
| Family | Background, map, landscape and camera |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Branches on handler_arg_byte and control bits, calls CCharacterCapture::Capture, CRLHCamera::AddAcceleration, CRLHCamera::SetRotate, and CAutoRateBase::SetParam for camera-related parameters.
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 | 0x52 |
+----------------+----------------+----------------+----------------+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
17 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 |
|---|---|---|
capture_before_rotate | derived | Control bit preserved from the command; its exact effect on the transform is untraced. |
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. |
control_flags | derived | Boolean options for control, packed one per bit. |
distance_scale | derived | Control bit preserved from the command; its exact effect on the transform is untraced. |
duration | derived | How long the transform takes. This is the value itself, not a rendering of another field. |
field20 | derived | Value written to the engine record at offset +0x20; the field's meaning is not yet named. |
field3c | derived | Value written to the engine record at offset +0x3c; the field's meaning is not yet named. |
field58_value | input | Value used for field58. |
flag2 | derived | Boolean option 2 taken from the handler's argument byte. |
flag3 | derived | Boolean option 3 taken from the handler's argument byte. |
flag4 | derived | Boolean option 4 taken from the handler's argument byte. |
initial_vec | input | Three-component vector (x, y, z) for initial. |
mode | derived | Handler path selector taken from the argument byte. The meaning is specific to each command. |
post_vec | input | Three-component vector (x, y, z) for post. |
rotate | derived | Set when rotation is included on this line. |
rotate_value | derived | Value used for rotate. |
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:
CAutoRateBase::SetParam(unsigned int,float,float,float)CCharaDispManager::SetInstantMode()CCharacterCapture::Capture()CCharacterManager::GetCharacterSubManager(int)CRLHCamera::AddAcceleration(float,bool)CRLHCamera::SetRotate(float,float)atan2fatan2f / fmodffmodf
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0001 0x0004 0x0008 0x0010 0x0003 0xFFFF 0x0002