diff --git a/language.version b/language.version index d227f9e5f..0ca9841a9 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r709 \cu(Mon 26 Dec 23:22:30 CET 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r709 \cu(2022-12-26 23:22:30)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r710 \cu(Wed 28 Dec 11:44:29 CET 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r710 \cu(2022-12-28 11:44:29)\c-"; diff --git a/zscript/hud/swwm_hud_topstuff.zsc b/zscript/hud/swwm_hud_topstuff.zsc index c6b3a809d..330f131b4 100644 --- a/zscript/hud/swwm_hud_topstuff.zsc +++ b/zscript/hud/swwm_hud_topstuff.zsc @@ -822,8 +822,9 @@ extend Class SWWMStatusBar { int label = am_showmaplabel; String ln = level.levelname; - int iof = ln.IndexOf(" - by: "); - if ( iof != -1 ) ln.Truncate(iof); + int iof; + if ( ((iof = ln.RightIndexOf(" - by: ")) != -1) || ((iof = ln.RightIndexOf(" - by ")) != -1) || ((iof = ln.RightIndexOf(" - ")) != -1) ) + ln.Truncate(iof); if ( !label || ((level.clusterflags&level.CLUSTER_HUB) && (label == 2)) ) str = ln; else str = String.Format("%s - %s",level.mapname.MakeUpper(),ln); Screen.DrawText(mSmallFontOutline,tclabel,xx-mSmallFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); diff --git a/zscript/hud/swwm_hudextra.zsc b/zscript/hud/swwm_hudextra.zsc index b253e24b7..52e3d5ad3 100644 --- a/zscript/hud/swwm_hudextra.zsc +++ b/zscript/hud/swwm_hudextra.zsc @@ -701,6 +701,22 @@ Class DSMapTitle : HUDMessageBase txtsub = level.authorname; if ( txt.Left(1) == "$" ) txt = StringTable.Localize(txt); if ( txtsub.Left(1) == "$" ) txtsub = StringTable.Localize(txtsub); + int sep; + if ( (sep = txt.RightIndexOf(" - by: ")) != -1 ) // 20 heretics, spooktober + { + txtsub = txt.Mid(sep+7); + txt.Truncate(sep); + } + else if ( (sep = txt.RightIndexOf(" - by ")) != -1 ) // variation seen in DOOMIUM + { + txtsub = txt.Mid(sep+6); + txt.Truncate(sep); + } + else if ( (sep = txt.RightIndexOf(" - ")) != -1 ) // hexmas and many others (may cause false positives?) + { + txtsub = txt.Mid(sep+3); + txt.Truncate(sep); + } tics = -10; holdtics = 140; fadeintics = 20; diff --git a/zscript/menu/swwm_inter.zsc b/zscript/menu/swwm_inter.zsc index 1d2cae2ee..207952872 100644 --- a/zscript/menu/swwm_inter.zsc +++ b/zscript/menu/swwm_inter.zsc @@ -16,17 +16,24 @@ Class SWWMStatScreen : StatusScreen abstract Super.Start(wbstartstruct); mSmallFont = Font.GetFont('TewiFont'); // support for old author text style - int iof = lnametexts[0].IndexOf(" - by: "); - if ( iof != -1 ) + int iof; + for ( int i=0; i<=1; i++ ) { - authortexts[0] = lnametexts[0].Mid(iof+7); - lnametexts[0].Truncate(iof); - } - iof = lnametexts[1].IndexOf(" - by: "); - if ( iof != -1 ) - { - authortexts[1] = lnametexts[1].Mid(iof+7); - lnametexts[1].Truncate(iof); + if ( (iof = lnametexts[i].RightIndexOf(" - by: ")) != -1 ) // 20 heretics, spooktober + { + authortexts[i] = lnametexts[i].Mid(iof+7); + lnametexts[i].Truncate(iof); + } + else if ( (iof = lnametexts[i].RightIndexOf(" - by ")) != -1 ) // variation seen in DOOMIUM + { + authortexts[i] = lnametexts[i].Mid(iof+6); + lnametexts[i].Truncate(iof); + } + else if ( (iof = lnametexts[i].RightIndexOf(" - ")) != -1 ) // hexmas and many others (may cause false positives?) + { + authortexts[i] = lnametexts[i].Mid(iof+3); + lnametexts[i].Truncate(iof); + } } } override void StartMusic()