Skip to content

0x4C — background_runtime_field

Background runtime field update. It validates gpBackGround, then writes optional fields including a 64-bit value, a float scaled by 120.0f, and Radi+0x180.

proven— handler traced, and exercised by at least one shipped script.

At a glance

Opcode0x4C (76)
HandlerCRadiScript::Command_4c
SignatureCRadiScript::Command_4c(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run4.cpp
Address— debug build; click for all 3
Handler size0xEC (236 bytes)
Engine namebackground_runtime_field
FamilyBackground, map, landscape and camera
Command size4 + extra_words * 4 bytes

Handler behaviour

Background runtime field update. It validates gpBackGround, then writes optional fields including a 64-bit value, a float scaled by 120.0f, and Radi+0x180.

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   |  0x4C          |
+----------------+----------------+----------------+----------------+

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

1 documented field. input fields are read from the command's operand words; derived fields are computed from other fields rather than stored separately.

FieldRoleMeaning
scaled_120_sourceinputWhere scaled 120 is read from.

Engine calls

Engine functions this handler was observed calling:

  • (inline setters)

Bit masks

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

0x0002 0x0004 0x0008