0x76 — stop_sound_effect
Sound-effect stop helper. It resolves optional character abstractions and calls CSoundManager::FadeoutAllSE or CRadiSound::StopSe.
proven— handler traced, and exercised by at least one shipped script.
At a glance
| Opcode | 0x76 (118) |
|---|---|
| Handler | CRadiScript::Command_76 |
| Signature | CRadiScript::Command_76(int,SCR_DATA*,unsigned int,unsigned int) |
| Translation unit | r_script_run7.cpp |
| Address | — debug build; click for all 3 |
| Handler size | 0x230 (560 bytes) |
| Engine name | stop_sound_effect |
| Family | Primitives, textures, sound and movies |
| Command size | 4 + extra_words * 4 bytes |
Handler behaviour
Sound-effect stop helper. It resolves optional character abstractions and calls CSoundManager::FadeoutAllSE or CRadiSound::StopSe.
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 | 0x76 |
+----------------+----------------+----------------+----------------+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.
| Field | Role | Meaning |
|---|---|---|
bank | input | Sound bank byte passed to CRadiSound::StopSe. |
explicit_flag | derived | Boolean option controlling explicit. |
mode | input | Handler path selector taken from the argument byte. The meaning is specific to each command. |
selector | input | Sub-selector byte choosing which variant of the command's behaviour runs. |
sound_id | input | Identifier selecting which sound to use. |
stop_mode | input | Mode selector for stop; the handler branches on it. |
yield | derived | Pause 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::GetAbstractionCharacterNumber(unsigned int&,unsigned int&,const SCR_DATA*)CRadiSound::StopSe(unsigned int,unsigned int,int)CSoundManager::FadeoutAllSE(int)
Bit masks
Masks the handler applies to its argument byte or operand words:
0xFFFF 0x00FF 0x0003 0x0001 0x000F 0x007F 0x1FFF