Skip to content

0x8B — talk_bustup_display

Talk bustup display. Argument bit 0 selects either the current script character at SCR_DATA+0x10/+0x12 or an explicit stream word, resolves it through GetAbstractionCharacterNumber, calls CCharacterManager::GetCharacterClass2, then dispatches CTalkBustupTotalControl::BustupDisp.

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

At a glance

Opcode0x8B (139)
HandlerCRadiScript::Command_8b
SignatureCRadiScript::Command_8b(int,SCR_DATA*,unsigned int,unsigned int)
Translation unitr_script_run8.cpp
Address— debug build; click for all 3
Handler size0x13C (316 bytes)
Engine nametalk_bustup_display
FamilyVibration, dialogue and text
Command size4 + extra_words * 4 bytes

Handler behaviour

Talk bustup display. Argument bit 0 selects either the current script character at SCR_DATA+0x10/+0x12 or an explicit stream word, resolves it through GetAbstractionCharacterNumber, calls CCharacterManager::GetCharacterClass2, then dispatches CTalkBustupTotalControl::BustupDisp.

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

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

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

FieldRoleMeaning
actioninputWhat to do with the portrait, from (arg >> 6). CTalkBustupTotalControl::BustupDisp branches on exactly three values: 0 hides it (CTalkBustup::SetVisiblity(false)), 1 creates or reinitialises it (Create), 2 erases it (EraseStart). Any other value does nothing.
characterinputThe packed 32-bit character selector word. Its low half is the character id and byte 2 is a secondary class/variant input; see character_number and character_variant.
character_numberderivedLow 16 bits of the character selector: the character/actor id.
character_variantderivedByte 2 of the character selector: a secondary character/class input passed alongside the id.
has_erase_durationderivedArgument bit 2: whether an erase_duration float follows on this line.
portrait_slotinputWhich of the two portrait slots this acts on, from (arg >> 1) & 1. Create indexes the pointer array at controller + 0x3C + slot * 4 with it.
portrait_variantinputPresentation variant, from (arg >> 4) & 3, forwarded to Create, CTalkBustup::Init and ReInit. Which variant each value selects is not established -- only that it is not the hide/create/erase action.

Engine calls

Engine functions this handler was observed calling:

  • CCharacterManager::GetCharacterClass2(int,unsigned int,const CCharacter*,unsigned int)
  • CRadiScript::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)
  • CTalkBustupTotalControl::BustupDisp(CCharacter*,unsigned char,unsigned char,unsigned char,float)

Bit masks

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

0x0001 0x00FF 0xFFFF 0x0003 0x0004