diff --git a/Adventures in Lestoria/Monster.cpp b/Adventures in Lestoria/Monster.cpp index 444d61ca..9e4d9917 100644 --- a/Adventures in Lestoria/Monster.cpp +++ b/Adventures in Lestoria/Monster.cpp @@ -328,7 +328,29 @@ void Monster::Draw(){ } void Monster::DrawReflection(float drawRatioX,float multiplierX){ game->SetDecalMode(DecalMode::ADDITIVE); - game->view.DrawPartialRotatedDecal(GetPos()+vf2d{drawRatioX*GetFrame().GetSourceRect().size.x,GetZ()+(GetFrame().GetSourceRect().size.y-16)*GetSizeMult()},GetFrame().GetSourceImage()->Decal(),0,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,vf2d(GetSizeMult()*(GetFacingDirection()==RIGHT?-1:1)*multiplierX,GetSizeMult()*-1),GetBuffs(BuffType::SLOWDOWN).size()>0?Pixel{uint8_t(255*abs(sin(1.4*GetBuffs(BuffType::SLOWDOWN)[0].duration))),uint8_t(255*abs(sin(1.4*GetBuffs(BuffType::SLOWDOWN)[0].duration))),uint8_t(128+127*abs(sin(1.4*GetBuffs(BuffType::SLOWDOWN)[0].duration)))}:WHITE); + + vf2d defaultPos=GetPos()+vf2d{drawRatioX*GetFrame().GetSourceRect().size.x,GetZ()+(GetFrame().GetSourceRect().size.y-16)*GetSizeMult()}; + vf2d spriteSize=GetFrame().GetSourceRect().size/1.5f*GetSizeMult(); + + float bottomExpansionAmount=abs(util::radToDeg(spriteRot))/10; + + //BL is in TR, BR is in TL, TR is in BL and TL is in BR. + std::arraypoints={ + vf2d{defaultPos+vf2d{-spriteSize.x/2,spriteSize.y}-vf2d{bottomExpansionAmount,0}}, //BL + vf2d{defaultPos-spriteSize.x/2}, //TL + vf2d{defaultPos+vf2d{spriteSize.x/2,-spriteSize.y/2}}, //TR + vf2d{defaultPos+spriteSize/2+vf2d{bottomExpansionAmount,0}}, //BR + }; + if(GetFacingDirection()==RIGHT){ + points={ + vf2d{defaultPos+spriteSize/2+vf2d{bottomExpansionAmount,0}}, //BR + vf2d{defaultPos+vf2d{spriteSize.x/2,-spriteSize.y/2}}, //TR + vf2d{defaultPos-spriteSize.x/2}, //TL + vf2d{defaultPos+vf2d{-spriteSize.x/2,spriteSize.y}-vf2d{bottomExpansionAmount,0}}, //BL + }; + } + + game->view.DrawPartialWarpedDecal(GetFrame().GetSourceImage()->Decal(),points,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size); game->SetDecalMode(DecalMode::NORMAL); } void Monster::Collision(Player*p){ diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index 1820c734..7cee6682 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -14,8 +14,6 @@ Settings Menu - XP Bar -- Fix reflections for rotated monsters. - January 31st ============ Make new unlocked nodes more obvious, made neighboring nodes more obvious diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index b417256e..80e38f6b 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 6238 +#define VERSION_BUILD 6261 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/1_5.tmx b/Adventures in Lestoria/assets/Campaigns/1_5.tmx index 93220e51..ea1d01ca 100644 --- a/Adventures in Lestoria/assets/Campaigns/1_5.tmx +++ b/Adventures in Lestoria/assets/Campaigns/1_5.tmx @@ -1,5 +1,5 @@ - + diff --git a/Adventures in Lestoria/assets/monsters/Frog.png b/Adventures in Lestoria/assets/monsters/Frog.png index 5a5d27cc..f87d0426 100644 Binary files a/Adventures in Lestoria/assets/monsters/Frog.png and b/Adventures in Lestoria/assets/monsters/Frog.png differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 61f0661f..e3c196ea 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ