@ -1106,8 +1106,11 @@ void AiL::RenderWorld(float fElapsedTime){
if ( player - > IsInvisible ( ) ) return ;
vf2d playerScale = vf2d ( player - > GetSizeMult ( ) , player - > GetSizeMult ( ) ) ;
int count = 0 ;
std : : reference_wrapper < const Animate2D : : Frame > animationFrame { player - > GetFrame ( ) } ;
if ( player - > CatFormActive ( ) ) animationFrame = player - > GetCatFrame ( ) ;
for ( vf2d & pos : player - > ghostPositions ) {
view . DrawPartialRotatedDecal ( pos , player - > GetFrame ( ) . GetSourceImage ( ) - > Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , player - > GetFrame ( ) . GetSourceRect ( ) . pos , player - > GetFrame ( ) . GetSourceRect ( ) . size , playerScale , { 0 , 0 , 0 , uint8_t ( float ( count ) / player - > RETREAT_GHOST_FRAMES * 255 ) } ) ;
view . DrawPartialRotatedDecal ( pos , animationFrame . get ( ) . GetSourceImage ( ) - > Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , animationFrame . get ( ) . GetSourceRect ( ) . pos , animationFrame . get ( ) . GetSourceRect ( ) . size , playerScale , { 0 , 0 , 0 , uint8_t ( float ( count ) / player - > RETREAT_GHOST_FRAMES * 255 ) } ) ;
count + + ;
}
if ( player - > teleportAnimationTimer > 0 ) {
@ -1123,10 +1126,12 @@ void AiL::RenderWorld(float fElapsedTime){
if ( attackBuffs . size ( ) > 0 ) playerCol = { 255 , uint8_t ( 255 * abs ( sin ( 1.4f * attackBuffs [ 0 ] . duration ) ) ) , uint8_t ( 255 * abs ( sin ( 1.4f * attackBuffs [ 0 ] . duration ) ) ) } ;
else if ( adrenalineRushBuffs . size ( ) > 0 ) playerCol = { uint8_t ( 255 * abs ( sin ( 6.f * adrenalineRushBuffs [ 0 ] . duration ) ) ) , 255 , uint8_t ( 255 * abs ( sin ( 6.f * adrenalineRushBuffs [ 0 ] . duration ) ) ) } ;
else if ( movespeedBuffs . size ( ) > 0 ) playerCol = { uint8_t ( 255 * abs ( sin ( 2.f * movespeedBuffs [ 0 ] . duration ) ) ) , 255 , uint8_t ( 255 * abs ( sin ( 2.f * movespeedBuffs [ 0 ] . duration ) ) ) } ;
if ( damageReductionBuffs . size ( ) > 0 ) view . DrawPartialSquishedRotatedDecal ( pos + vf2d { 0 , - player - > GetZ ( ) * ( std : : signbit ( scale . y ) ? - 1 : 1 ) } , player - > playerOutline . Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , player - > GetFrame ( ) . GetSourceRect ( ) . pos , player - > GetFrame ( ) . GetSourceRect ( ) . size , playerScale * scale + 0.1f , { 1.f , player - > ySquishFactor } , { 210 , 210 , 210 , uint8_t ( util : : lerp ( 0 , 255 , abs ( sin ( ( PI * GetRunTime ( ) ) / 1.25f ) ) ) ) } ) ;
view . DrawPartialSquishedRotatedDecal ( pos + vf2d { 0 , - player - > GetZ ( ) * ( std : : signbit ( scale . y ) ? - 1 : 1 ) } , player - > GetFrame ( ) . GetSourceImage ( ) - > Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , player - > GetFrame ( ) . GetSourceRect ( ) . pos , player - > GetFrame ( ) . GetSourceRect ( ) . size , playerScale * scale , { 1.f , player - > ySquishFactor } , playerCol ) ;
DrawAfterImage : view . DrawRotatedDecal ( player - > afterImagePos , player - > afterImage . Decal ( ) , 0.f , player - > afterImage . Sprite ( ) - > Size ( ) / 2 , { player - > GetSizeMult ( ) , player - > GetSizeMult ( ) } , { 0xFFDCDA } ) ;
if ( damageReductionBuffs . size ( ) > 0 ) view . DrawPartialSquishedRotatedDecal ( pos + vf2d { 0 , - player - > GetZ ( ) * ( std : : signbit ( scale . y ) ? - 1 : 1 ) } , player - > playerOutline . Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , animationFrame . get ( ) . GetSourceRect ( ) . pos , animationFrame . get ( ) . GetSourceRect ( ) . size , playerScale * scale + 0.1f , { 1.f , player - > ySquishFactor } , { 210 , 210 , 210 , uint8_t ( util : : lerp ( 0 , 255 , abs ( sin ( ( PI * GetRunTime ( ) ) / 1.25f ) ) ) ) } ) ;
view . DrawPartialSquishedRotatedDecal ( pos + vf2d { 0 , - player - > GetZ ( ) * ( std : : signbit ( scale . y ) ? - 1 : 1 ) } , animationFrame . get ( ) . GetSourceImage ( ) - > Decal ( ) , player - > GetSpinAngle ( ) , { 12 , 12 } , animationFrame . get ( ) . GetSourceRect ( ) . pos , animationFrame . get ( ) . GetSourceRect ( ) . size , playerScale * scale , { 1.f , player - > ySquishFactor } , playerCol ) ;
DrawAfterImage : view . DrawRotatedDecal ( player - > afterImagePos , player - > afterImage . Decal ( ) , 0.f , player - > afterImage . Sprite ( ) - > Size ( ) / 2 , { player - > GetSizeMult ( ) , player - > GetSizeMult ( ) } , Pixel { 0xFFDCDA } ) ;
SetDecalMode ( DecalMode : : NORMAL ) ;
if ( player - > GetState ( ) = = State : : BLOCK | | player - > GetShield ( ) > 0 ) {
view . DrawDecal ( player - > GetPos ( ) + vf2d { 0 , - player - > GetZ ( ) * ( std : : signbit ( scale . y ) ? - 1 : 1 ) } - vf2d { 12 , 12 } , GFX [ " block.png " ] . Decal ( ) ) ;
@ -1960,7 +1965,6 @@ void AiL::RenderHud(){
const vf2d & bossIndicator = bossIndicatorPos . value ( ) ;
const bool BossIsOutsideView = ! geom2d : : overlaps ( geom2d : : rect < float > { view . GetWorldTL ( ) , view . GetWorldVisibleArea ( ) } , bossIndicator ) ;
if ( BossIsOutsideView ) {
const bool flicker = sinf ( GetRunTime ( ) ) > 0.5f & & sinf ( GetRunTime ( ) ) < 0.55f ;
# pragma region Side Indicators
@ -2011,8 +2015,7 @@ void AiL::RenderHud(){
if ( GetPlayer ( ) - > GetCastInfo ( ) . castTimer > 0 ) {
RenderCastbar ( GetPlayer ( ) - > GetCastInfo ( ) ) ;
} else
if ( GetPlayer ( ) - > GetEndZoneStandTime ( ) > 0 ) {
} else if ( GetPlayer ( ) - > GetEndZoneStandTime ( ) > 0 ) {
RenderCastbar ( CastInfo { " Exiting Level... " , GetPlayer ( ) - > GetEndZoneStandTime ( ) , " Player.End Zone Wait Time " _F } ) ;
}
@ -2041,20 +2044,20 @@ void AiL::RenderHud(){
DrawShadowStringPropDecal ( { 24 , 23 } , text_mana , manaCounter . GetDisplayColor ( ) , BLACK , { 1.5f , 1.5f } , { 1.45f , 1.45f } , INFINITE ) ;
# pragma region Show Max Health / Max Mana
if ( GameSettings : : ShowMaxHealth ( ) ) {
vf2d healthTextSize = GetTextSizeProp ( text ) * vf2d { 2.f , 2.f } ;
if ( GameSettings : : ShowMaxHealth ( ) ) {
vf2d healthTextSize = GetTextSizeProp ( text ) * vf2d { 2.f , 2.f } ;
std : : string maxHealthText = " / " + std : : to_string ( int ( player - > GetMaxHealth ( ) ) ) ;
float maxHealthTextHeight = GetTextSizeProp ( maxHealthText ) . y ;
DrawShadowStringPropDecal ( vf2d { 20 , 3 } + healthTextSize + vf2d { 1.f , - maxHealthTextHeight } , maxHealthText , { 200 , 200 , 200 , 255 } , healthOutlineCol , { 1.f , 1.f } , { 1.f , 1.f } , INFINITE ) ;
}
if ( GameSettings : : ShowMaxMana ( ) ) {
vf2d manaTextSize = GetTextSizeProp ( text_mana ) * vf2d { 1.5f , 1.5f } ;
std : : string maxHealthText = " / " + std : : to_string ( int ( player - > GetMaxHealth ( ) ) ) ;
float maxHealthTextHeight = GetTextSizeProp ( maxHealthText ) . y ;
DrawShadowStringPropDecal ( vf2d { 20 , 3 } + healthTextSize + vf2d { 1.f , - maxHealthTextHeight } , maxHealthText , { 200 , 200 , 200 , 255 } , healthOutlineCol , { 1.f , 1.f } , { 1.f , 1.f } , INFINITE ) ;
}
if ( GameSettings : : ShowMaxMana ( ) ) {
vf2d manaTextSize = GetTextSizeProp ( text_mana ) * vf2d { 1.5f , 1.5f } ;
std : : string maxManaText = " / " + std : : to_string ( player - > GetMaxMana ( ) ) ;
float maxManaTextHeight = GetTextSizeProp ( maxManaText ) . y ;
DrawShadowStringPropDecal ( vf2d { 24 , 23 } + manaTextSize + vf2d { 1.f , - maxManaTextHeight } , maxManaText , { 200 , 200 , 255 , 255 } , BLACK , { 1.f , 1.f } , { 1.f , 1.f } , INFINITE ) ;
}
std : : string maxManaText = " / " + std : : to_string ( player - > GetMaxMana ( ) ) ;
float maxManaTextHeight = GetTextSizeProp ( maxManaText ) . y ;
DrawShadowStringPropDecal ( vf2d { 24 , 23 } + manaTextSize + vf2d { 1.f , - maxManaTextHeight } , maxManaText , { 200 , 200 , 255 , 255 } , BLACK , { 1.f , 1.f } , { 1.f , 1.f } , INFINITE ) ;
}
# pragma endregion
if ( player - > notEnoughManaDisplay . second > 0 ) {
@ -2170,7 +2173,7 @@ void AiL::RenderCooldowns(){
if ( itemAmt > 0 ) {
std : : string amtString = " x " + std : : to_string ( itemAmt ) ;
vf2d qtySize = vf2d { GetTextSize ( amtString ) } * vf2d { 0.5f , 0.75f } ;
DrawShadowStringDecal ( pos + vf2d { 20 , 20 } - qtySize / 2 , amtString , 0xE0E0E0 , BLACK , { 0.5f , 0.75f } , { 0.5f , 0.75f } ) ;
DrawShadowStringDecal ( pos + vf2d { 20 , 20 } - qtySize / 2 , amtString , Pixel { 0xE0E0E0 } , BLACK , { 0.5f , 0.75f } , { 0.5f , 0.75f } ) ;
} else {
DrawDecal ( pos , GFX [ " square_skill_overlay_icon_empty.png " ] . Decal ( ) , { 1 , 1 } , DARK_RED ) ;
shortNameCol = RED ;