Skip to content

0x0D — marker_seek

Marker seek. Selector bits in the handler argument choose where the marker index comes from — a direct operand, a run of config/event flags, an event value, or the in-game clock. The marker is located through GetMarkerAddress and the resolved address is written to SCR_DATA+0x0C.

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

At a glance

Opcode0x0D (13)
HandlerCRadiScript::Command_0d
SignatureCRadiScript::Command_0d(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run0.cpp
Address— debug build; click for all 3
Handler size0x258 (600 bytes)
Engine namemarker_seek
FamilyScript control, flags and values
Command size4 + extra_words * 4 bytes

Handler behaviour

Marker seek. Selector bits in the handler argument choose where the marker index comes from — a direct operand, a run of config/event flags, an event value, or the in-game clock. The marker is located through GetMarkerAddress and the resolved address is written to SCR_DATA+0x0C.

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

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

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

FieldRoleMeaning
advance_if_lowerderivedScan-direction flag decoded from the selector word; preserved exactly.
event_valueinputScript event-value id that the condition or command reads.
marker_typeinputWhich kind of marker this is; the handler branches on it.
selectorinputSub-selector byte choosing which variant of the command's behaviour runs.

Engine calls

Engine functions this handler was observed calling:

  • CRadiApp::GetConfigEventFlag(unsigned int) const
  • CRadiScript::GetEventValueForScript(int,const SCR_DATA*)
  • CRadiScript::GetMarkerAddress(const EVDFILE_HEAD*,int)

Bit masks

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

0x0007 0x0001 0xFFFF 0x00FF