From 668e1cc9fdab96a1ce10d93c3452a82d77bf6242 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Sat, 3 Feb 2024 14:48:45 +1000 Subject: [PATCH] Remove Ketmarese synonyms for yes/no --- src/engine/e_sound_sdl.inc | 4 ++-- src/flexui/fui_ctls.pas | 5 ++--- src/flexui/fui_style.pas | 4 ++-- src/game/g_console.pas | 7 +++---- src/game/g_holmes_cmd.inc | 4 ++-- src/shared/xdynrec.pas | 4 ++-- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index f71805e..b8d3d07 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -758,11 +758,11 @@ begin chan := Channel; if chan < 0 then begin - //e_WriteLog(Format('IsPlaying: FID=%u; ONA', [FID]), TMsgType.Warning); + //e_WriteLog(Format('IsPlaying: FID=%u; FALSE', [FID]), TMsgType.Warning); Exit; end; //Result := (Mix_Playing(chan) > 0) - //e_WriteLog(Format('IsPlaying: FID=%u; TAN', [FID]), TMsgType.Warning); + //e_WriteLog(Format('IsPlaying: FID=%u; TRUE', [FID]), TMsgType.Warning); Result := True; end else if e_isMusic(FID) then diff --git a/src/flexui/fui_ctls.pas b/src/flexui/fui_ctls.pas index 12f710c..10fcdea 100644 --- a/src/flexui/fui_ctls.pas +++ b/src/flexui/fui_ctls.pas @@ -1290,11 +1290,10 @@ function TUIControl.parseBool (par: TTextParser): Boolean; begin result := par.eatIdOrStrCI('true') or - par.eatIdOrStrCI('yes') or - par.eatIdOrStrCI('tan'); + par.eatIdOrStrCI('yes'); if not result then begin - if (not par.eatIdOrStrCI('false')) and (not par.eatIdOrStrCI('no')) and (not par.eatIdOrStrCI('ona')) then + if (not par.eatIdOrStrCI('false')) and (not par.eatIdOrStrCI('no')) then begin par.error('boolean value expected'); end; diff --git a/src/flexui/fui_style.pas b/src/flexui/fui_style.pas index e28aea7..251265c 100644 --- a/src/flexui/fui_style.pas +++ b/src/flexui/fui_style.pas @@ -738,12 +738,12 @@ procedure TUIStyle.parse (par: TTextParser); //writeln(' r=', v.r, '; g=', v.g, '; b=', v.b); par.skipToken(); end - else if (par.eatId('true')) or (par.eatId('tan')) then + else if (par.eatId('true')) or (par.eatId('yes')) then begin v.vtype := v.TType.Bool; v.bval := true; end - else if (par.eatId('false')) or (par.eatId('ona')) then + else if (par.eatId('false')) or (par.eatId('no')) then begin v.vtype := v.TType.Bool; v.bval := false; diff --git a/src/game/g_console.pas b/src/game/g_console.pas index f7998c7..1fc4df6 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -240,7 +240,7 @@ begin if (idx < 0) or (idx > High(p)) then begin result := -1; exit; end; result := 0; if (p[idx] = '1') or (CompareText(p[idx], 'on') = 0) or (CompareText(p[idx], 'true') = 0) or - (CompareText(p[idx], 'tan') = 0) or (CompareText(p[idx], 'yes') = 0) then result := 1 + (CompareText(p[idx], 'yes') = 0) then result := 1 else if (CompareText(p[idx], 'toggle') = 0) or (CompareText(p[idx], 'switch') = 0) or (CompareText(p[idx], 't') = 0) then result := 666; end; @@ -267,7 +267,7 @@ procedure boolVarHandler (me: PCommand; p: SSArray); if flag <> old then g_Console_WriteGameConfig(); if (Length(msg) = 0) then msg := p[0] else msg += ':'; - if flag then conwritefln('%s tan', [msg]) else conwritefln('%s ona', [msg]); + if flag then conwritefln('%s true', [msg]) else conwritefln('%s false', [msg]); end; end; begin @@ -489,8 +489,7 @@ begin begin if me.cheat and (not conIsCheatsEnabled) then begin conwriteln('not available'); exit; end; if (CompareText(p[1], 'default') = 0) or (CompareText(p[1], 'def') = 0) or - (CompareText(p[1], 'd') = 0) or (CompareText(p[1], 'off') = 0) or - (CompareText(p[1], 'ona') = 0) then + (CompareText(p[1], 'd') = 0) or (CompareText(p[1], 'off') = 0) then begin pv.val^ := pv.def; end diff --git a/src/game/g_holmes_cmd.inc b/src/game/g_holmes_cmd.inc index 93f0301..c58816a 100644 --- a/src/game/g_holmes_cmd.inc +++ b/src/game/g_holmes_cmd.inc @@ -77,8 +77,8 @@ begin begin if (pr.tokType <> pr.TTEOF) then begin - if pr.eatId('true') or pr.eatId('tan') or pr.eatId('yes') then a := 1 - else if pr.eatId('false') or pr.eatId('ona') or pr.eatId('no') then a := 0 + if pr.eatId('true') or pr.eatId('yes') then a := 1 + else if pr.eatId('false') or pr.eatId('no') then a := 0 else begin conwritefln('%s: invalid argument', [name]); exit; end; if (pr.tokType <> pr.TTEOF) then begin conwritefln('%s: too many arguments', [name]); exit; end; end; diff --git a/src/shared/xdynrec.pas b/src/shared/xdynrec.pas index 511c82d..1a23086 100644 --- a/src/shared/xdynrec.pas +++ b/src/shared/xdynrec.pas @@ -2042,8 +2042,8 @@ begin case mType of TType.TBool: begin - if pr.eatId('true') or pr.eatId('tan') or pr.eatId('yes') then mIVal := 1 - else if pr.eatId('false') or pr.eatId('ona') or pr.eatId('no') then mIVal := 0 + if pr.eatId('true') or pr.eatId('yes') then mIVal := 1 + else if pr.eatId('false') or pr.eatId('no') then mIVal := 0 else raise TDynParseException.CreateFmt(pr, 'invalid bool value for field ''%s''', [mName]); mDefined := true; pr.expectDelim(';'); -- 2.11.4.GIT