Skip to content

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

Opcode0x54 (84)
HandlerCRadiScript::Command_54
SignatureCRadiScript::Command_54(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run5.cpp
Address— debug build; click for all 3
Handler size0x6EC (1772 bytes)
Engine namecamera_move_etc
FamilyBackground, map, landscape and camera
Command size4 + 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.

FieldRoleMeaning
durationinputHow long the camera move takes. This is the value itself, not a rendering of another field.
flag0inputBoolean option 0 taken from the handler's argument byte.
flag1inputBoolean option 1 taken from the handler's argument byte.
sourcederivedWhere the command reads its operand from.
source_characterinputSource-side character, as opposed to the destination.
source_character_typeinputWhich kind of source character this is; the handler branches on it.
source_controlinputBitmask controlling which optional source values follow.
source_explicit_charderivedSource-side explicit char, as opposed to the destination.
source_kindderivedWhich kind of source this line uses.
source_name_sourcederivedWhere source name is read from.
source_pointinputSource-side point, as opposed to the destination.
source_vecinputThree-component vector (x, y, z) for source.
target_offset_vecinputThree-component vector (x, y, z) for target offset.
target_slotinputDestination index into a runtime table owned by this command's subsystem.
yieldderivedPause 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*) const
  • GetCameraObject / GetCameraTargetObject
  • VU0 cop2 matrix transforms

Bit masks

Masks the handler applies to its argument byte or operand words:

0x0003 0x0001 0xFFFF 0x0007 0x00FF