Skip to content

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

Opcode0x59 (89)
HandlerCRadiScript::Command_59
SignatureCRadiScript::Command_59(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run5.cpp
Address— debug build; click for all 3
Handler size0x328 (808 bytes)
Engine namecamera_color_anim
FamilyBackground, map, landscape and camera
Command size4 + 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.

FieldRoleMeaning
blend_flagderivedBoolean option controlling blend.
durationinputHuman-readable rendering of the command's duration word. Edit the underlying duration_word when it is listed as an input.
end_colorinputPacked RGBA8 end colour word; end_rgba8 beside it shows the four channels.
flagsinputCommand 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.
float0derivedFloat parameter 0 consumed by this command.
float1inputFloat parameter 1 consumed by this command.
float2inputFloat parameter 2 consumed by this command.
has_first_floatderivedWhether first float is present on this line.
has_start_colorderivedWhether start color is present on this line.
kindderivedWhich colour this line animates: fog or ambient.
lowinputLower part of the matching packed value.
modeinputHandler path selector taken from the argument byte. The meaning is specific to each command.
target_slotderivedDestination 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:

  • 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