Add secret difficulty for a dragon.
Remove 2x speed mult from hardest skill(s) (causes glitches). Allow moths to still attack while following the lamp. (Still do not know what causes moths to print "asin domain error" to terminal).
This commit is contained in:
parent
802b0ea881
commit
f78b747ff7
7 changed files with 71 additions and 31 deletions
|
|
@ -782,6 +782,9 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
Font mFont;
|
||||
int mColor;
|
||||
int mColorSelected;
|
||||
bool kyni;
|
||||
double alph;
|
||||
bool isSel;
|
||||
|
||||
void Init( ListMenuDescriptor desc, String text, String hotkey, Name child, int param = 0 )
|
||||
{
|
||||
|
|
@ -791,6 +794,9 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
mColor = desc.mFontColor;
|
||||
mColorSelected = desc.mFontcolor2;
|
||||
mHotkey = hotkey.GetNextCodePoint(0);
|
||||
kyni = (text == "$SWWM_SKDRAGON");
|
||||
if ( kyni ) alph = 0.;
|
||||
else alph = 1.;
|
||||
}
|
||||
|
||||
void InitDirect( double x, double y, int height, int hotkey, String text, Font font, int color, int color2, Name child, int param = 0 )
|
||||
|
|
@ -801,6 +807,17 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
mColor = color;
|
||||
mColorSelected = color2;
|
||||
mHotkey = hotkey;
|
||||
kyni = (text == "$SWWM_SKDRAGON");
|
||||
if ( kyni ) alph = 0.;
|
||||
else alph = 1.;
|
||||
}
|
||||
|
||||
override void Ticker()
|
||||
{
|
||||
Super.Ticker();
|
||||
if ( !kyni ) return;
|
||||
if ( isSel ) alph = min(1.,alph+.05);
|
||||
else alph = 0.;
|
||||
}
|
||||
|
||||
override int GetWidth()
|
||||
|
|
@ -813,6 +830,8 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
|
||||
override void Draw( bool selected, ListMenuDescriptor desc )
|
||||
{
|
||||
isSel = selected;
|
||||
if ( kyni && !isSel ) return;
|
||||
int w = desc?desc.DisplayWidth():ListMenuDescriptor.CleanScale;
|
||||
int h = desc?desc.DisplayHeight():-1;
|
||||
String text = StringTable.Localize(mText);
|
||||
|
|
@ -841,7 +860,7 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
int ch;
|
||||
[ch, pos] = text.GetNextCodePoint(pos);
|
||||
double yy = y+4*sin(32*i+8*(Menu.MenuTime()+System.GetTimeFrac()))*CleanYFac_1;
|
||||
Screen.DrawChar(font,mColorSelected,xx,yy,ch,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl);
|
||||
Screen.DrawChar(font,kyni?Font.CR_BLACK:mColorSelected,xx,yy,ch,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl,DTA_Alpha,alph);
|
||||
xx += (font.GetCharWidth(ch)+kern)*CleanXFac_1*scl;
|
||||
}
|
||||
}
|
||||
|
|
@ -852,7 +871,7 @@ Class ListMenuItemSWWMTextItemM : ListMenuItemSelectable
|
|||
int ch;
|
||||
[ch, pos] = text.GetNextCodePoint(pos);
|
||||
double yy = y+4*sin(32*i+8*(Menu.MenuTime()+System.GetTimeFrac()));
|
||||
Screen.DrawChar(mFont,mColorSelected,xx,yy,ch,DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl);
|
||||
Screen.DrawChar(mFont,kyni?Font.CR_BLACK:mColorSelected,xx,yy,ch,DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph);
|
||||
xx += (font.GetCharWidth(ch)+kern)*scl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue