0x54 — camera_move_etc
Camera movement command. It resolves camera objects, target objects, character/SSF targets, stand positions, and calls CRadiCameraSystem::MoveCameraEtc.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x54 (84) |
|---|---|
| Handler | CRadiScript::Command_54 |
| Signature | CRadiScript::Command_54(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run5.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x6EC (1772 bytes) |
| Engine name | camera_move_etc |
| Family | Background, map, landscape and camera |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Camera movement command. It resolves camera objects, target objects, character/SSF targets, stand positions, and calls CRadiCameraSystem::MoveCameraEtc.
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 | 0x54 |
+----------------+----------------+----------------+----------------+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
15 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 |
|---|---|---|
duration | input | How long the camera move takes. This is the value itself, not a rendering of another field. |
flag0 | input | Boolean option 0 taken from the handler's argument byte. |
flag1 | input | Boolean option 1 taken from the handler's argument byte. |
source | derived | Where the command reads its operand from. |
source_character | input | Source-side character, as opposed to the destination. |
source_character_type | input | Which kind of source character this is; the handler branches on it. |
source_control | input | Bitmask controlling which optional source values follow. |
source_explicit_char | derived | Source-side explicit char, as opposed to the destination. |
source_kind | derived | Which kind of source this line uses. |
source_name_source | derived | Where source name is read from. |
source_point | input | Source-side point, as opposed to the destination. |
source_vec | input | Three-component vector (x, y, z) for source. |
target_offset_vec | input | Three-component vector (x, y, z) for target offset. |
target_slot | input | 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:
CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)CQuaternion::Euler(const CVector&)CRadiCameraSystem::GetCameraObject(unsigned int,unsigned int)CRadiCameraSystem::GetCameraTargetObject(unsigned int,unsigned int)CRadiCameraSystem::MoveCameraEtc(unsigned int,unsigned int,int,const RCM_MVINFO*)CRadiScript::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)CRadiScript::GetAbstractionStandPosNumber(unsigned int&,CVector&,CVector&,const SCR_DATA*)CSsfHandler::SearchName(const char*) constGetCameraObject / GetCameraTargetObjectVU0 cop2 matrix transforms
Bit masks
Masks the handler applies to its argument byte or operand words:
0x0003 0x0001 0xFFFF 0x0007 0x00FF