Skip to content

0x43 — background_delete_data

Calls CBackGround::DeleteData(unsigned int) with slot/index handler_arg_byte & 3.

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

At a glance

Opcode0x43 (67)
HandlerCRadiScript::Command_43
SignatureCRadiScript::Command_43(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run4.cpp
Address— debug build; click for all 3
Handler size0x28 (40 bytes)
FamilyBackground, map, landscape and camera
Command size4 + extra_words * 4 bytes

Documented forms

This opcode is documented under more than one name, one per branch of the handler. They are the same opcode and the same handler; which branch runs is chosen by the argument byte or a control word.

FormEngine nameWhat it does
background_delete_data—Unloads background data that was loaded earlier.
delete_background—Deletes loaded background data.

Handler behaviour

Calls CBackGround::DeleteData(unsigned int) with slot/index handler_arg_byte & 3.

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

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

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

FieldRoleMeaning
arginputRaw handler argument byte from the command header. It is printed only when it differs from the value the named fields already imply, so seeing it means the command uses an unusual argument encoding.
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.
slotinputIndex into a runtime table owned by this command's subsystem.

Engine calls

Engine functions this handler was observed calling:

  • CBackGround::DeleteData(unsigned int)

Bit masks

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

0x0003