From a64952035364c82f778381f39e221be0c4ee1415 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Nov 2026 06:15:43 +0400 Subject: feat(runtime): resolve mission objectives and outcome --- apps/fparkan-game/src/audio.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'apps/fparkan-game/src/audio.rs') diff --git a/apps/fparkan-game/src/audio.rs b/apps/fparkan-game/src/audio.rs index 5f7001d4..80cf97f9 100644 --- a/apps/fparkan-game/src/audio.rs +++ b/apps/fparkan-game/src/audio.rs @@ -998,8 +998,25 @@ impl GameAudio { .map_err(|error| error.to_string())?; let (archive, file) = voice_resource(&mission, &symbol)? .ok_or_else(|| format!("voice resource {symbol} is missing in {mission_cfg}"))?; + self.queue_voice_asset(&archive, &file) + } + + pub(crate) fn queue_game_voice(&mut self, symbol: &str) -> Result { + let path = normalize_relative(b"ui/game_resources.cfg", PathPolicy::StrictLegacy) + .expect("valid game resources path"); + let bytes = self + .library + .vfs + .read(&path) + .map_err(|error| error.to_string())?; + let (archive, file) = voice_resource(&bytes, symbol)? + .ok_or_else(|| format!("voice resource {symbol} is missing in {}", path.as_str()))?; + self.queue_voice_asset(&archive, &file) + } + + fn queue_voice_asset(&mut self, archive: &str, file: &str) -> Result { let asset = self - .dynamic_sound(&archive, &file) + .dynamic_sound(archive, file) .map_err(|error| error.to_string())?; self.mission_voice .append(decoder_for(&asset).map_err(|error| error.to_string())?); -- cgit v1.2.3