Fix bullet offsets. Division by two integers instead of a float and an integer causing incorrect rendering positions. Change damage number color to include a background color. Release Build 10176.

This commit is contained in:
sigonasr2 2024-07-19 17:25:27 -05:00
parent 2907fc9865
commit 8abb9e64af
4 changed files with 5 additions and 5 deletions

View File

@ -1990,11 +1990,11 @@ void AiL::RenderHud(){
switch(dn->type){ switch(dn->type){
case HEALTH_LOSS:{ case HEALTH_LOSS:{
std::string text=std::to_string(dn->damage); std::string text=std::to_string(dn->damage);
DrawDamageNumber(NumberScalesWithDamage,text,{DARK_RED,VERY_DARK_RED},{RED,VERY_DARK_GREY}); DrawDamageNumber(NumberScalesWithDamage,text,{DARK_RED,{255,160,160}},{RED,VERY_DARK_GREY});
}break; }break;
case HEALTH_GAIN:{ case HEALTH_GAIN:{
std::string text="+"+std::to_string(dn->damage); std::string text="+"+std::to_string(dn->damage);
DrawDamageNumber(NormalNumber,text,{DARK_GREEN,VERY_DARK_GREEN},{GREEN,VERY_DARK_GREY}); DrawDamageNumber(NormalNumber,text,{DARK_GREEN,BLACK},{GREEN,VERY_DARK_GREY});
}break; }break;
case MANA_GAIN:{ case MANA_GAIN:{
std::string text="+"+std::to_string(dn->damage); std::string text="+"+std::to_string(dn->damage);

View File

@ -182,8 +182,8 @@ void Bullet::Draw(const Pixel blendCol)const{
if(animated){ if(animated){
game->view.DrawPartialRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY,GetFrame().GetSourceImage()->Decal(),rotates?atan2(vel.y,vel.x)-PI/2+image_angle:image_angle,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,scale,blendCol); game->view.DrawPartialRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY,GetFrame().GetSourceImage()->Decal(),rotates?atan2(vel.y,vel.x)-PI/2+image_angle:image_angle,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,scale,blendCol);
}else{ }else{
game->view.DrawRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY-GFX["circle.png"].Sprite()->Size()*scale/2,GFX["circle.png"].Decal(),image_angle,GFX["circle.png"].Sprite()->Size()/2,scale,blendCol); game->view.DrawRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY,GFX["circle.png"].Decal(),image_angle,GFX["circle.png"].Sprite()->Size()/2.f,scale,blendCol);
game->view.DrawRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY-GFX["circle.png"].Sprite()->Size()*scale/2,GFX["circle_outline.png"].Decal(),image_angle,GFX["circle.png"].Sprite()->Size()/2,scale,Pixel{WHITE.r,WHITE.g,WHITE.b,blendCol.a}); game->view.DrawRotatedDecal(pos-vf2d{0,GetZ()}+drawOffsetY,GFX["circle_outline.png"].Decal(),image_angle,GFX["circle.png"].Sprite()->Size()/2.f,scale,Pixel{WHITE.r,WHITE.g,WHITE.b,blendCol.a});
} }
} }

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 3 #define VERSION_PATCH 3
#define VERSION_BUILD 10172 #define VERSION_BUILD 10176
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a