Some broader support for old map author text handling.
This commit is contained in:
parent
7b8111c40d
commit
4000d095df
4 changed files with 38 additions and 14 deletions
|
|
@ -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-";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue