Skip to content

0x1C — stand_context

Stand-position/current-context helper. It reads stand-position data, calls GetAbstractionStandPosNumber when an operand requests abstraction resolution, and writes position/posture fields into the current global script context.

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

At a glance

Opcode0x1C (28)
HandlerCRadiScript::Command_1c
SignatureCRadiScript::Command_1c(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run0.cpp
Address— debug build; click for all 3
Handler size0x1EC (492 bytes)
Engine namestand_context
FamilyScript control, flags and values
Command size4 + extra_words * 4 bytes

Handler behaviour

Stand-position/current-context helper. It reads stand-position data, calls GetAbstractionStandPosNumber when an operand requests abstraction resolution, and writes position/posture fields into the current global script context.

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

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

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

FieldRoleMeaning
contextinputWhether this line sets the stand-position context value. Argument bit 0: Command_1c writes the operand's low bits into bits 0-9 of a global halfword, leaving its upper bits alone.
context_low10inputThe context value itself: the low 10 bits of stand_word.
positionderivedWhether the position fields are written into the current context.
posturederivedSet when a posture operand is included on this line.
standinputStand-position operand, resolved through GetAbstractionStandPosNumber.
stand_positioninputStand-position id resolved through GetAbstractionStandPosNumber.
stand_wordinputPacked stand-position word; the annotated parts beside it decode it.
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:

  • CRadiScript::GetAbstractionStandPosNumber(unsigned int&,CVector&,CVector&,const SCR_DATA*)

Bit masks

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

0xFFFF 0x003F 0x0003 0x0001 0x0002 0x03FF 0x0004 0x0008