26 int32_t sound_selector = 0;
27 uint8_t *operand_cursor = &(*script_cursor_inout)[1];
29 *script_cursor_inout = operand_cursor;
34 sound_selector = (uint8_t)(operand_cursor[-1]);
43 if (sound_selector < 0)
62 int32_t sound_selector = 0;
63 uint8_t *operand_cursor = (*script_cursor_inout + 1);
65 *script_cursor_inout = operand_cursor;
70 sound_selector = (uint8_t)(operand_cursor[-1]);
79 if (sound_selector < 0)
99 uint8_t *operand_cursor = (*script_cursor_inout + 1);
101 *script_cursor_inout = (operand_cursor);
103 uint8_t music_transition_id = operand_cursor[-1];
105 *script_cursor_inout = (&operand_cursor[4]);
107 int32_t volume_percent = (uint32_t)(*(uint8_t *)operand_cursor) << 24;
109 volume_percent |= (uint32_t)(operand_cursor[1]) << 16;
110 volume_percent |= (uint32_t)(operand_cursor[2]) << 8;
111 volume_percent |= operand_cursor[3];
112 *script_cursor_inout = (&operand_cursor[5]);
114 uint8_t mode_byte = operand_cursor[4];
119 *script_cursor_inout = (&operand_cursor[0x11]);
120 __builtin_memset(&music_transition_timing, 0,
sizeof(music_transition_timing));
122 &music_transition_timing, volume_percent);
127 *script_cursor_inout = (&operand_cursor[9]);
129 int32_t start_delay = (uint32_t)(operand_cursor[5]) << 24;
131 start_delay |= (uint32_t)(operand_cursor[7]) << 8;
132 start_delay |= (uint32_t)(operand_cursor[6]) << 16;
133 start_delay |= operand_cursor[8];
134 *script_cursor_inout = (&operand_cursor[0xd]);
139 int32_t mid_duration = (uint32_t)(operand_cursor[0xb]) << 8;
141 mid_duration |= (uint32_t)(operand_cursor[9]) << 24;
142 mid_duration |= (uint32_t)(operand_cursor[0xa]) << 16;
143 mid_duration |= operand_cursor[0xc];
146 *script_cursor_inout = (&operand_cursor[0x11]);
148 int32_t end_duration = (uint32_t)(operand_cursor[0xd]) << 24;
150 end_duration |= (uint32_t)(operand_cursor[0xf]) << 8;
151 end_duration |= (uint32_t)(operand_cursor[0xe]) << 16;
152 end_duration |= operand_cursor[0x10];
155 &music_transition_timing, volume_percent);
163 uint8_t *operand_cursor = (*script_cursor_inout + 1);
165 *script_cursor_inout = operand_cursor;
167 char enable_flag = operand_cursor[-1];
169 *script_cursor_inout = &operand_cursor[4];
171 int32_t volume_percent = (uint32_t)(*(uint8_t *)operand_cursor) << 24;
173 volume_percent |= (uint32_t)(operand_cursor[2]) << 8;
187 volume_percent |= (uint32_t)(operand_cursor[1]) << 16;
188 volume_percent |= operand_cursor[3];
189 *script_cursor_inout = &operand_cursor[5];
191 int32_t fade_duration_raw;
193 if (operand_cursor[4])
195 *script_cursor_inout = &operand_cursor[9];
197 int32_t fade_duration = (uint32_t)(operand_cursor[5]) << 24;
199 fade_duration |= (uint32_t)(operand_cursor[7]) << 8;
200 fade_duration |= (uint32_t)(operand_cursor[6]) << 16;
201 fade_duration |= operand_cursor[8];
202 fade_duration_raw = fade_duration;
206 *script_cursor_inout = &operand_cursor[9];
207 fade_duration_raw = 0;
220 uint32_t block_delta = 0;
221 int32_t sound_selector_raw = 0;
222 uint8_t *operand_cursor = (*script_cursor_inout + 2);
224 *script_cursor_inout = operand_cursor;
226 block_delta = (uint32_t)(operand_cursor[-2]) << 8;
227 block_delta |= operand_cursor[-1];
229 uint8_t *block_end = &operand_cursor[block_delta];
232 *script_cursor_inout = &operand_cursor[1];
238 sound_selector_raw = (uint8_t)(*(uint8_t *)operand_cursor);
242 int32_t sound_selector = sound_selector_raw;
255 if (sound_selector < 0)
268 uint8_t sound_flags = sound_list[sound_selector].
flags;
279 *script_cursor_inout = block_end;
288 *script_cursor_inout = block_end;