0x57 — position_vibration_vector
Position vibration helper. It allocates CVibrationVector records, calls CVibrationVector::SetParam, then dispatches virtual attach/start paths.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x57 (87) |
|---|---|
| Handler | CRadiScript::Command_57 |
| Signature | CRadiScript::Command_57(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run5.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x404 (1028 bytes) |
| Engine name | position_vibration_vector |
| Family | Background, map, landscape and camera |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Position vibration helper. It allocates CVibrationVector records, calls CVibrationVector::SetParam, then dispatches virtual attach/start paths.
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 | 0x57 |
+----------------+----------------+----------------+----------------+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
11 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 |
|---|---|---|
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. |
control_high | derived | Upper part of the matching packed value for control. |
control_low8 | derived | Low byte of control, shown for the handler's byte-wise test. |
control_target_mode | derived | Mode selector for control target; the handler branches on it. |
direct_float | input | Float parameter for direct. |
mode | input | Handler path selector taken from the argument byte. The meaning is specific to each command. |
params | input | The remaining operand words for this line, kept in order. |
start_slot0 | derived | Start/attach flag for the first slot, decoded from the mode bits. |
start_slot1 | derived | Start/attach flag for the second slot, decoded from the mode bits. |
target | input | What the command acts on or moves towards. |
target_slot | input | Destination index into a runtime table owned by this command's subsystem. |
Engine calls
Engine functions this handler was observed calling:
CVibrationVector::SetParam(POSVIB_ATTR,float,float,float,float,float,float,float)CVibrationVector::SetParam(POSVIB_ATTR,unsigned int,float,float,float,float,float,float)operator new(unsigned int,int,const char*)operator_new (PositionVib)
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0003 0x0001 0x0002