Adapt to new CL changes.

This commit is contained in:
Marisa the Magician 2023-12-13 20:44:38 +01:00
parent 1aaa22c9bc
commit 2d3300dc2c
20 changed files with 204 additions and 66 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 146 B

BIN
graphics/HUD/KirinFace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 148 B

View File

@ -136,7 +136,7 @@ KIRIN_INTERTIP14 = "The Rykha can be overcharged temporarily, with quite shockin
KIRIN_INTERTIP15 = "Holding the cast button allows you to visualize where Boundary Break will send you.";
KIRIN_INTERTIP16 = "Combining ice and fire magic can result in amplified damage if done just right.";
KIRIN_INTERTIP17 = "Mana Stimulants taste like bad medicine, but they'll refill your mana quickly.";
KIRIN_INTERTIP18 = "Rings of Protection stack up to eight times, making you almost invincible.";
KIRIN_INTERTIP18 = "Rings of Protection stack up to four times, making you almost invincible.";
KIRIN_INTERTIP19 = "Even Kirin knows of the great health benefits of Red Oni Milk.";
KIRIN_INTERTIP20 = "No ammunition is ever wasted. Don't forget you can refill at leftover pickups.";
KIRIN_INTERTIP21 = "The Devastation Sigil will magnify all your damage. Careful not to hurt yourself.";

View File

@ -115,7 +115,7 @@ KIRIN_INTERTIP14 = "La Rykha puede sobrecargarse temporalmente, con efectos bast
KIRIN_INTERTIP15 = "Mantener el botón de conjuro te permite visualizar donde te llevará la Rotura de Frontera.";
KIRIN_INTERTIP16 = "Combinar magia de hielo y fuego puede resultar en daño amplificado si se hace de la forma correcta.";
KIRIN_INTERTIP17 = "Los Estimulantes de Maná saben a mala medicina, pero recuperan tu maná rápidamente.";
KIRIN_INTERTIP18 = "Los Anillos de Protección se acoplan hasta ocho veces, volviéndote casi invencible.";
KIRIN_INTERTIP18 = "Los Anillos de Protección se acoplan hasta cuatro veces, volviéndote casi invencible.";
KIRIN_INTERTIP19 = "Incluso Kirin conoce los grandes efectos beneficiosos de la Leche Oni Rojo.";
KIRIN_INTERTIP20 = "La munición nunca se echa a perder. No olvides que puedes recuperar la munición que queda atrás.";
KIRIN_INTERTIP21 = "La Marca de Devastación magnifica todo tu daño. Ten cuidado de no hacértelo a ti.";

View File

@ -1,3 +1,3 @@
[default]
KIRIN_MODVER="\cxRED STAR OF INNOCENCE\c- \cw0.1a r118 \cu(Mon 11 Dec 11:04:22 CET 2023)\c-";
KIRIN_SHORTVER="\cw0.1a r118 \cu(2023-12-11 11:04:22)\c-";
KIRIN_MODVER="\cxRED STAR OF INNOCENCE\c- \cw0.1a r119 \cu(Wed 13 Dec 20:44:38 CET 2023)\c-";
KIRIN_SHORTVER="\cw0.1a r119 \cu(2023-12-13 20:44:38)\c-";

View File

@ -2,7 +2,7 @@
Class KirinStatusBar : SWWMStatusBar
{
TextureID StatusTex, AmmoTex[12], InvExtraTex, WeaponTex, BarTex[8], IconTex[5], GenTex[3];
TextureID StatusTex, AmmoTex[12], InvExtraTex, WeaponTex, BarTex[8], GenTex[3], FaceTex[4];
int AmmoFlash[3]; // flash when new ammo is received
int AmmoOldAmounts[3]; // to detect when to flash
Class<SWWMAmmo> AmmoSlots[3]; // ammo type on each slot
@ -47,14 +47,15 @@ Class KirinStatusBar : SWWMStatusBar
BarTex[5] = TexMan.CheckForTexture("graphics/HUD/HealthBarPulse.png");
BarTex[6] = TexMan.CheckForTexture("graphics/HUD/HealthBarThin.png");
BarTex[7] = TexMan.CheckForTexture("graphics/HUD/BarLag.png");
IconTex[0] = TexMan.CheckForTexture("graphics/HUD/HealthInvul.png");
IconTex[1] = TexMan.CheckForTexture("graphics/HUD/HealthFlash.png");
IconTex[2] = TexMan.CheckForTexture("graphics/HUD/ManaFlash.png");
IconTex[3] = TexMan.CheckForTexture("graphics/HUD/HealthEx.png");
IconTex[4] = TexMan.CheckForTexture("graphics/HUD/HealthPulse.png");
GenTex[0] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxL.png");
GenTex[1] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxM.png");
GenTex[2] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxR.png");
FaceTex[0] = TexMan.CheckForTexture("graphics/HUD/KirinFace.png");
FaceTex[1] = TexMan.CheckForTexture("graphics/HUD/KirinFace_Flash.png");
FaceTex[2] = TexMan.CheckForTexture("graphics/HUD/KirinFace_Barrier.png");
FaceTex[3] = TexMan.CheckForTexture("graphics/HUD/KirinFace_Angery.png");
mugw = 28;
mugh = 34;
tclabel = mhudfontcol[MCR_KIRINHUD];
tcvalue = mhudfontcol[MCR_WHITE];
tcextra = mhudfontcol[MCR_IBUKIHUD];

View File

@ -47,85 +47,133 @@ extend Class KirinStatusBar
LagMana[i] = LagMana[i-1];
}
override int GetFaceTex( SWWMPlayer demo )
{
let facestate = demo.facestate;
let paindir = demo.paindir;
let facetimer = demo.facetimer;
let blinktime = demo.blinktime;
if ( CPlayer.Health <= 0 ) return 15;
if ( isInvulnerable() && (facestate >= FS_LOPAIN) ) return 4;
if ( facestate == FS_OUCH ) return (paindir==-1)?13:(paindir==1)?14:12;
if ( facestate == FS_HIPAIN ) return (paindir==-1)?10:(paindir==1)?11:9;
if ( facestate == FS_LOPAIN ) return (paindir==-1)?7:(paindir==1)?8:6;
if ( facestate == FS_GRIN ) return 4;
if ( facestate == FS_SAD ) return 5;
if ( blinktime < 0 ) return 3;
return demo.lookdir;
}
override int DrawMugshot()
{
int xx = xmargin+(36-mugw)/2;
int yy = ymargin+35;
let demo = SWWMPlayer(CPlayer.mo);
if ( !demo ) return 64;
double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/double(GameTicRate),0.,1.);
rss = MSTime()*128;
double noiz = min(demo.lastdamage*.5*paintime,3.);
Vector2 shake = (RandomShiver(),RandomShiver())*noiz;
int idx = GetFaceTex(demo);
Screen.DrawTexture(FaceTex[0],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
if ( CPlayer.mo.FindInventory("AngeryPower") )
Screen.DrawTexture(FaceTex[3],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
Screen.DrawTexture(FaceTex[1],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz),DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
if ( (CPlayer.Health > 0) && isInvulnerable() )
Screen.DrawTexture(FaceTex[1],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic),DTA_SrcWidth,mugw,DTA_SrcHeight,mugh,DTA_DestWidth,mugw,DTA_DestHeight,mugh,DTA_SrcX,mugw*(idx%4),DTA_SrcY,mugh*(idx/4));
if ( CPlayer.mo.FindInventory("BarrierPower") ) Screen.DrawTexture(FaceTex[2],false,xx+shake.x,ss.y-yy+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.5,DTA_LegacyRenderStyle,STYLE_Add);
return 67;
}
override int DrawStatus()
{
Screen.DrawTexture(StatusTex,false,xmargin,ss.y-(ymargin+22),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
double xx = xmargin+36;
double yy = ss.y-(ymargin+29);
Screen.DrawTexture(StatusTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
double ht = clamp(HealthInter.GetValue(fractic),0,999);
String str = String.Format("%3d",round(ht));
double hw = min(ht,100);
Screen.DrawTexture(BarTex[0],false,xmargin+15,ss.y-(ymargin+17),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,0xFF000000);
bool invul = isInvulnerable();
Screen.DrawTexture(BarTex[invul?2:0],false,xmargin+14,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
int dcnt = 2-int(Log10(clamp(round(ht),1,999)));
for ( int j=0; j<dcnt; j++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[invul?MCR_WHITE:MCR_RED],xmargin+119+j*4,ss.y-(ymargin+18),0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[invul?MCR_WHITE:MCR_RED],xmargin+119,ss.y-(ymargin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( invul ) Screen.DrawTexture(IconTex[0],false,xmargin+2,ss.y-(ymargin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(BarTex[0],false,xx+3,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,0xFF000000);
if ( isInvulnerable() )
{
Screen.DrawTexture(BarTex[2],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
int dcnt = 2-int(Log10(clamp(round(ht),1,999)));
for ( int j=0; j<dcnt; j++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[MCR_WHITE],xx+107+j*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_WHITE],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
else
{
Screen.DrawTexture(BarTex[0],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
int dcnt = 2-int(Log10(clamp(round(ht),1,999)));
for ( int j=0; j<dcnt; j++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[MCR_RED],xx+107+j*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_RED],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( ht > 100 )
{
double alph = max((ht-100)/100.,0.)**.5;
Screen.DrawTexture(IconTex[3],false,xmargin+2,ss.y-(ymargin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
Screen.DrawTexture(BarTex[4],false,xmargin+14,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_BRASS],xmargin+119,ss.y-(ymargin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
Screen.DrawTexture(BarTex[4],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_BRASS],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
}
if ( (CPlayer.Health > 0) && (CPlayer.Health <= 25) && (PulsePhase <= 15) )
if ( (CPlayer.health > 0) && (CPlayer.health <= 25) && (PulsePhase <= 15) )
{
double alph = clamp(sin((PulsePhase-FracTic)*12.),0.,1.);
Screen.DrawTexture(IconTex[4],false,xmargin+2,ss.y-(ymargin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_LegacyRenderStyle,STYLE_Add);
Screen.DrawTexture(BarTex[5],false,xmargin+14,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph,DTA_LegacyRenderStyle,STYLE_Add);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_REDFLASH],xmargin+119,ss.y-(ymargin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_LegacyRenderStyle,STYLE_Add);
Screen.DrawTexture(BarTex[5],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_REDFLASH],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
}
}
int f = HealthFlash;
if ( f && (gametic < f) )
{
double alph = max((f-(gametic+FracTic))/25.,0.)**1.5;
Screen.DrawTexture(BarTex[3],false,xmargin+14,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xmargin+119,ss.y-(ymargin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawTexture(IconTex[1],false,xmargin+2,ss.y-(ymargin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawTexture(BarTex[3],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
ht = clamp(LagHealthInter.GetValue(fractic),0,1000);
double hwl = min(ht,100);
if ( hwl > hw )
{
Screen.DrawTexture(BarTex[7],false,xx+3,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,hw,DTA_WindowRightF,hwl,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[7],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,hw,DTA_WindowRightF,hwl);
}
ht = clamp(LagHealthInter.GetValue(fractic),0,999);
double lhw = min(ht,100);
if ( lhw > hw ) Screen.DrawTexture(BarTex[7],false,xmargin+14,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,hw,DTA_WindowRightF,lhw);
double tht = clamp(ThinHealthInter.GetValue(fractic),0,100);
if ( tht < 100 )
{
Screen.DrawTexture(BarTex[0],false,xmargin+15+tht,ss.y-(ymargin+17),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[6],false,xmargin+14+tht,ss.y-(ymargin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht);
Screen.DrawTexture(BarTex[0],false,xx+3+tht,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[6],false,xx+2+tht,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,100.-tht);
}
yy += 12;
Screen.DrawTexture(StatusTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
double mt = clamp(ManaInter.GetValue(fractic),0,999);
str = String.Format("%3d",round(mt));
double mw = min(mt,100);
Screen.DrawTexture(BarTex[1],false,xmargin+15,ss.y-(ymargin+7),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[1],false,xmargin+14,ss.y-(ymargin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw);dcnt = 2-int(Log10(clamp(round(ht),1,999)));
dcnt = 2-int(Log10(clamp(round(mt),1,999)));
for ( int j=0; j<dcnt; j++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[MCR_MANA],xmargin+119+j*4,ss.y-(ymargin+8),0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_MANA],xmargin+119,ss.y-(ymargin+8),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(BarTex[1],false,xx+3,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[1],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw);
int dcnt = 2-int(Log10(clamp(round(mt),1,999)));
for ( int i=0; i<dcnt; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[MCR_MANA],xx+107+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_MANA],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
f = ManaFlash;
if ( f && (gametic < f) )
{
double alph = max((f-(gametic+FracTic))/25.,0.)**1.5;
Screen.DrawTexture(BarTex[3],false,xmargin+14,ss.y-(ymargin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xmargin+119,ss.y-(ymargin+8),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawTexture(IconTex[2],false,xmargin+2,ss.y-(ymargin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawTexture(BarTex[3],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,mw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xx+107,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
mt = clamp(LagManaInter.GetValue(fractic),0,999);
double lmw = min(mt,100);
if ( lmw > mw )
{
Screen.DrawTexture(BarTex[7],false,xmargin+15,ss.y-(ymargin+7),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[7],false,xmargin+14,ss.y-(ymargin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw);
Screen.DrawTexture(BarTex[7],false,xx+3,yy+3,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw,DTA_ColorOverlay,0xFF000000);
Screen.DrawTexture(BarTex[7],false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,mw,DTA_WindowRightF,lmw);
}
// extra, draw additional stuff next to inventory box
bAlwaysAboveInv = false;
double xx = xmargin+28;
xx += 36;
let gren = CPlayer.mo.FindInventory("KirinBombAmmo");
if ( gren && gren.Amount )
{
bAlwaysAboveInv = true;
bool sel = (CPlayer.ReadyWeapon is 'KirinBomb');
double yy = ss.y-(ymargin+46);
double yy = ss.y-(ymargin+51);
Screen.DrawTexture(InvExtraTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(gren.Icon,false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
str = String.Format("%2d",clamp(gren.Amount,0,99));
@ -136,12 +184,12 @@ extend Class KirinStatusBar
if ( bean && bean.Amount )
{
bAlwaysAboveInv = true;
double yy = ss.y-(ymargin+46);
double yy = ss.y-(ymargin+51);
Screen.DrawTexture(InvExtraTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(bean.Icon,false,xx+2,yy+2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
str = String.Format("%2d",clamp(bean.Amount,0,99));
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_WHITE],xx+10,yy+12,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
return 48;
return 63;
}
}

View File

@ -24,11 +24,11 @@ extend Class KirinStatusBar
override void DrawWeapons()
{
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeapon(FracTic,ss.x-(xmargin+56),ss.y-(ymargin+14),hs,ss);
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeapon(FracTic,ss.x-(xmargin+54),ss.y-(ymargin+12),hs,ss);
else if ( CPlayer.ReadyWeapon )
{
// generic display
double xx = ss.x-(xmargin+58), yy = ss.y-(ymargin+24);
double xx = ss.x-(xmargin+56), yy = ss.y-(ymargin+22);
String str;
int dlen, dcnt;
if ( CPlayer.ReadyWeapon.Ammo2 && (CPlayer.ReadyWeapon.Ammo2 != CPlayer.ReadyWeapon.Ammo1) )
@ -44,11 +44,11 @@ extend Class KirinStatusBar
}
Screen.DrawTexture(GenTex[0],false,xx-2,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
dcnt = (dlen-1)-int(Log10(max(1,CPlayer.ReadyWeapon.Ammo2.Amount)));
for ( int i=0; i<dlen; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
for ( int i=0; i<dcnt; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
yy += 10;
}
xx = ss.x-(xmargin+58);
xx = ss.x-(xmargin+56);
if ( CPlayer.ReadyWeapon.Ammo1 )
{
dlen = 1+int(Log10(max(1,CPlayer.ReadyWeapon.Ammo1.MaxAmount)));
@ -61,7 +61,7 @@ extend Class KirinStatusBar
}
Screen.DrawTexture(GenTex[0],false,xx-2,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
dcnt = (dlen-1)-int(Log10(max(1,CPlayer.ReadyWeapon.Ammo1.Amount)));
for ( int i=0; i<dlen; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
for ( int i=0; i<dcnt; i++ ) Screen.DrawChar(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx+i*4,yy+2,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,0xA0000000);
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
}
@ -122,7 +122,7 @@ extend Class KirinStatusBar
int ncolor = mhudfontcol[(i==(selslot+6))?MCR_CYANBLU:MCR_SILVER];
Screen.DrawText(MiniHUDFont,ncolor,xx,yy,String.Format("%d",(i%10)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
yy = ss.y-(ymargin+14);
yy = ss.y-(ymargin+12);
let omga = KirinSniperAmmo(CPlayer.mo.FindInventory("KirinSniperAmmo"));
if ( omga && (gameinfo.gametype&GAME_Doom) ) yy -= 30;
let ball = KirinBallistaAmmo(CPlayer.mo.FindInventory("KirinBallistaAmmo"));

View File

@ -9,16 +9,16 @@ Class KirinStatScreen : SWWMStatScreen
override void Start( wbstartstruct wbstartstruct )
{
Super.Start(wbstartstruct);
lnamecolor = Font.CR_FIRE;
lauthcolor = Font.CR_GOLD;
lsubcolor = Font.CR_ORANGE;
statbasecolor = Font.CR_ORANGE;
statcolor0 = Font.CR_WHITE;
statcolor1 = Font.CR_GOLD;
statcolor2 = Font.CR_RED;
tipcolor0 = Font.CR_ORANGE;
tipcolor1 = Font.CR_GOLD;
glarecolor = "Gold";
lnamecolor = Font.FindFontColor('MiniWhite');
lauthcolor = Font.FindFontColor('MiniKirinHUD');
lsubcolor = Font.FindFontColor('MiniFire');
statbasecolor = Font.FindFontColor('MiniKirinHUD');
statcolor0 = Font.FindFontColor('MiniWhite');
statcolor1 = Font.FindFontColor('MiniBrass');
statcolor2 = Font.FindFontColor('MiniRed');
tipcolor0 = Font.FindFontColor('MiniKirinHUD');
tipcolor1 = Font.FindFontColor('MiniWhite');
glarecolor = 0xFFFFA000;
}
override void StartMusic()
@ -29,7 +29,7 @@ Class KirinStatScreen : SWWMStatScreen
override String StatCnt( int a, int b )
{
if ( b <= 0 ) return "N/A";
return String.Format("%s \cu/\c- %s \cu(\c-%3d%%\cu)",SWWMUtility.ThousandsNum(max(a,0)),SWWMUtility.ThousandsNum(b),GetPct(a,b));
return String.Format("%s \c[MiniIbukiHUD]/\c- %s \c[MiniIbukiHUD](\c-%3d%%\c[MiniIbukiHUD])",SWWMUtility.ThousandsNum(max(a,0)),SWWMUtility.ThousandsNum(b),GetPct(a,b));
}
override String TimeStr( int secs )
@ -38,8 +38,8 @@ Class KirinStatScreen : SWWMStatScreen
int h = secs/3600;
int m = (secs/60)%60;
int s = secs%60;
if ( h ) return String.Format("%d\cu:\c-%02d\cu:\c-%02d",h,m,s);
if ( m ) return String.Format("%d\cu:\c-%02d",m,s);
if ( h ) return String.Format("%d\c[MiniIbukiHUD]:\c-%02d\c[MiniIbukiHUD]:\c-%02d",h,m,s);
if ( m ) return String.Format("%d\c[MiniIbukiHUD]:\c-%02d",m,s);
return String.Format("%d",s);
}

View File

@ -1,5 +1,16 @@
// Bless the cute emperor 🍑
Enum EKirinFaceState
{
FS_DEFAULT,
FS_GRIN,
FS_SAD,
FS_LOPAIN,
FS_HIPAIN,
FS_OUCH,
FS_DEAD // UNUSED
};
Class KirinPlayer : SWWMPlayer
{
int SpellSel;
@ -35,6 +46,84 @@ Class KirinPlayer : SWWMPlayer
+SWWMPLAYER.CANLONGJUMP;
}
// stuck in here for now, to do the mugshot
override void UpdateFace()
{
// damage handling
if ( facedamage )
{
if ( lastdamage > 50 )
{
facestate = FS_OUCH;
facetimer = (lastdamagetimer-gametic)+10;
}
else if ( facestate < FS_OUCH )
{
facestate = (lastdamage>5)?FS_HIPAIN:FS_LOPAIN;
facetimer = (lastdamagetimer-gametic)+10;
}
paindir = 0;
// paraphrased from vanilla, with some tweaks
if ( player.attacker && (player.attacker != self) )
{
double atkang = AngleTo(player.attacker);
double angdiff = deltaangle(angle,atkang);
if ( abs(angdiff) < 135 )
{
if ( angdiff > 45 ) paindir = -1;
else if ( angdiff < -45 ) paindir = 1;
}
}
}
facedamage = false;
if ( facegrin && (facestate < FS_SAD) )
{
facestate = FS_GRIN;
facetimer = 50;
}
facegrin = false;
if ( facesad && (facestate <= FS_SAD) )
{
facestate = FS_SAD;
facetimer = 50;
}
facesad = false;
if ( facetimer > 0 )
{
facetimer--;
if ( facetimer <= 0 )
{
facestate = FS_DEFAULT;
blinktime = 30;
}
}
if ( !(gametic&1) )
{
if ( blinktime <= 0 )
{
blinktime--;
if ( blinktime < -2 )
{
rss = MSTime();
blinktime = (abs(GetRandom())%10)?(40+abs(GetRandom())%40):6;
looktime = 0;
}
}
else
{
blinktime--;
looktime++;
if ( looktime >= 8 )
{
looktime = 0;
rss = MSTime();
lookdir = abs(GetRandom())%3;
}
}
}
// TODO: update the actual texture on the model
}
override void GiveDefaultInventory()
{
Super.GiveDefaultInventory();