From 419e593a4c42b818410d6c72f8304d85f7161e76 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Nov 2022 08:31:45 +0100 Subject: [PATCH] - allow SNDINFO to declare sound mappings by using 'sounda = soundfle'. This works similar to MAPINFO: The first definition in a file declares the format, all later ones must be the same. This change in syntax increases robustness significantly because it avoids the problems with the original syntax not being able to detect badly formatted names. --- src/sound/s_advsound.cpp | 10 ++++++++++ wadsrc/static/menudef.txt | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sound/s_advsound.cpp b/src/sound/s_advsound.cpp index 2fd7428b3d1..b98549bf175 100644 --- a/src/sound/s_advsound.cpp +++ b/src/sound/s_advsound.cpp @@ -799,6 +799,7 @@ static void S_AddSNDINFO (int lump) auto &S_sfx = soundEngine->GetSounds(); bool skipToEndIf; TArray list; + int wantassigns = -1; FScanner sc(lump); skipToEndIf = false; @@ -1247,6 +1248,15 @@ static void S_AddSNDINFO (int lump) else { // Got a logical sound mapping FString name (sc.String); + if (wantassigns == -1) + { + wantassigns = sc.CheckString("="); + } + else if (wantassigns) + { + sc.MustGetStringName("="); + } + sc.MustGetString (); S_AddSound (name, sc.String, &sc); } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index c300e9b7884..8167ae5e40b 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -2822,7 +2822,7 @@ OptionValue "os_isanyof_values" OptionMenu "vkoptions" { Title "$VK_TITLE" - StaticText "$VK_WARNING" + //StaticText "$VK_WARNING" StaticText "$VK_RESTART" StaticText "" TextField "$VKMNU_DEVICE", vk_device