From 73ed351144666b6cd8bf96e0a26c498692f5f54f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 13 Feb 2017 23:24:31 +0100 Subject: [PATCH 1/3] - don't error out on unknown CVars for optional parameters in menu items. --- src/menu/menudef.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index 9aff4350a..057f544c5 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -796,7 +796,10 @@ static void ParseOptionMenuBody(FScanner &sc, DOptionMenuDescriptor *desc) auto cv = FindCVar(sc.String, nullptr); if (cv == nullptr && *sc.String) { - sc.ScriptError("Unknown CVar %s", sc.String); + if (func->Variants[0].ArgFlags[i] & VARF_Optional) + sc.ScriptMessage("Unknown CVar %s", sc.String); + else + sc.ScriptError("Unknown CVar %s", sc.String); } params.Push(cv); } From 08bf08f297ae42395dce30a44bf50c4769104e8f Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 14 Feb 2017 12:33:27 +0200 Subject: [PATCH 2/3] Restored effect of negative horizontal texture scale in software renderer --- src/r_segs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index ccf6ccf20..0873cb373 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -2046,11 +2046,11 @@ void PrepWall(float *vstep, fixed_t *upos, double walxrepeat, int x1, int x2) float invZ = WallT.InvZorg + WallT.InvZstep * (float)(x1 + 0.5 - CenterX); float uGradient = WallT.UoverZstep; float zGradient = WallT.InvZstep; - float xrepeat = (float)walxrepeat; + float xrepeat = (float)fabs(walxrepeat); float depthScale = (float)(WallT.InvZstep * WallTMapScale2); float depthOrg = (float)(-WallT.UoverZstep * WallTMapScale2); - if (xrepeat < 0.0f) + if (walxrepeat < 0.0) { for (int x = x1; x < x2; x++) { @@ -2084,9 +2084,9 @@ void PrepLWall(fixed_t *upos, double walxrepeat, int x1, int x2) float invZ = WallT.InvZorg + WallT.InvZstep * (float)(x1 + 0.5 - CenterX); float uGradient = WallT.UoverZstep; float zGradient = WallT.InvZstep; - float xrepeat = (float)walxrepeat; + float xrepeat = (float)fabs(walxrepeat); - if (xrepeat < 0.0f) + if (walxrepeat < 0.0f) { for (int x = x1; x < x2; x++) { From 443ac50887c76c41eeb3e7d1f0d8b96afe8100fd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 14 Feb 2017 13:18:57 +0100 Subject: [PATCH 3/3] - fixed: DMenu::CallTicker called the Drawer methods of the menu instead of the Ticker methods. --- src/menu/menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 041b1195e..25506a877 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -381,7 +381,7 @@ void DMenu::Ticker () DEFINE_ACTION_FUNCTION(DMenu, Ticker) { PARAM_SELF_PROLOGUE(DMenu); - self->Drawer(); + self->Ticker(); return 0; } @@ -392,7 +392,7 @@ void DMenu::CallTicker() VMValue params[] = { (DObject*)this }; GlobalVMStack.Call(func, params, 1, nullptr, 0, nullptr); } - else Drawer(); + else Ticker(); }