diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index 9f1f9b71..248bd9c1 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -114,7 +114,7 @@ bool Crawler::OnUserCreate(){ LoadLevel(LEVEL_NAMES["starting_map"_S]); InitializeClasses(); ChangePlayerClass(WARRIOR); - Warrior::ability4=Ranger::ability1; //Class ability swapping demonstration. + //Warrior::ability4=Ranger::ability1; //Class ability swapping demonstration. return true; } @@ -998,33 +998,34 @@ void Crawler::RenderHud(){ return newName; }; std::vectorcooldowns{ - player->GetRightClickAbility(), player->GetAbility1(), player->GetAbility2(), player->GetAbility3(), player->GetAbility4(), }; - std::vectoractiveCooldowns{}; - std::copy_if(cooldowns.begin(),cooldowns.end(),std::back_inserter(activeCooldowns),[](Ability&a){ - return a.cooldown>0; - }); - std::sort(activeCooldowns.begin(),activeCooldowns.end(),[&](Ability&a1,Ability&a2){ - return a1.cooldown0.1){ - FillRectDecal(vf2d{10,ScreenHeight()-22.f}-vf2d{0,float(offset)},{64,6},BLACK); - FillRectDecal(vf2d{11,ScreenHeight()-21.f}-vf2d{0,float(offset)},{62,4},DARK_GREY); - GradientFillRectDecal(vf2d{10,ScreenHeight()-22.f}-vf2d{0,float(offset)},{(a.cooldown/a.COOLDOWN_TIME)*64,6},a.barColor1,a.barColor1,a.barColor2,a.barColor2); - DrawRotatedShadowStringPropDecal(vf2d{8,ScreenHeight()-20.f}+vf2d{1,1}-vf2d{0,float(offset)},capitalize(a.name),-PI/64,{0,0},WHITE,BLACK,{0.4,0.4},0.5); - std::stringstream cooldownTimeDisplay; - cooldownTimeDisplay<0.1){ + DrawPie(pos+vf2d{12,12},12,360-(a.cooldown/a.COOLDOWN_TIME)*360,PixelLerp(a.barColor1,a.barColor2,(a.cooldown/a.COOLDOWN_TIME))); + std::stringstream cooldownTimeDisplay; + cooldownTimeDisplay<GetRightClickAbility()); + if(GetPlayer()->GetCastInfo().castTimer>0){ FillRectDecal(vf2d{ScreenWidth()/2-92.f,ScreenHeight()-90.f},{184,20},BLACK); FillRectDecal(vf2d{ScreenWidth()/2-90.f,ScreenHeight()-88.f},{180,16},DARK_GREY); @@ -1058,9 +1059,6 @@ void Crawler::RenderHud(){ DrawShadowStringDecal({0,128},player->GetPos().str()); DrawShadowStringDecal({0,136},"Spd: "+std::to_string(player->GetMoveSpdMult())); } - - - DrawPie({120,120},20,90,BLUE); } void Crawler::AddEffect(std::unique_ptrforeground,std::unique_ptr background){ @@ -1542,5 +1540,5 @@ void Crawler::SpawnMonster(vf2d pos,MonsterData*data,bool upperLevel){ } void Crawler::DrawPie(vf2d center,float radius,float degreesCut,Pixel col){ - DrawPolygonDecal(nullptr,circleCooldownPoints,circleCooldownPoints,int(degreesCut/4),center,radius,col); + DrawPolygonDecal(nullptr,circleCooldownPoints,circleCooldownPoints,std::max(1,int(degreesCut/4)),center,radius,col); } \ No newline at end of file diff --git a/Crawler/Version.h b/Crawler/Version.h index d6b84e93..f3df0b8b 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -2,7 +2,7 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 1484 +#define VERSION_BUILD 1504 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Crawler/assets/config/classes/Ranger.txt b/Crawler/assets/config/classes/Ranger.txt index 96858460..d46a4095 100644 --- a/Crawler/assets/config/classes/Ranger.txt +++ b/Crawler/assets/config/classes/Ranger.txt @@ -21,9 +21,9 @@ Ranger # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -42,9 +42,9 @@ Ranger # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -72,9 +72,9 @@ Ranger # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0.3 Casting Range = 0 @@ -100,9 +100,9 @@ Ranger # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 diff --git a/Crawler/assets/config/classes/Thief.txt b/Crawler/assets/config/classes/Thief.txt index 8a36b51b..6f55b820 100644 --- a/Crawler/assets/config/classes/Thief.txt +++ b/Crawler/assets/config/classes/Thief.txt @@ -10,9 +10,9 @@ Thief # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -26,9 +26,9 @@ Thief # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -42,9 +42,9 @@ Thief # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -58,9 +58,9 @@ Thief # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 diff --git a/Crawler/assets/config/classes/Trapper.txt b/Crawler/assets/config/classes/Trapper.txt index 70341563..e338a98c 100644 --- a/Crawler/assets/config/classes/Trapper.txt +++ b/Crawler/assets/config/classes/Trapper.txt @@ -10,9 +10,9 @@ Trapper # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -26,9 +26,9 @@ Trapper # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -42,9 +42,9 @@ Trapper # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -58,9 +58,9 @@ Trapper # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 diff --git a/Crawler/assets/config/classes/Warrior.txt b/Crawler/assets/config/classes/Warrior.txt index d5309a41..ec9f687a 100644 --- a/Crawler/assets/config/classes/Warrior.txt +++ b/Crawler/assets/config/classes/Warrior.txt @@ -20,9 +20,9 @@ Warrior # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -44,9 +44,9 @@ Warrior # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -88,9 +88,9 @@ Warrior # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -118,9 +118,9 @@ Warrior # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 diff --git a/Crawler/assets/config/classes/Witch.txt b/Crawler/assets/config/classes/Witch.txt index efef1555..1e6356c2 100644 --- a/Crawler/assets/config/classes/Witch.txt +++ b/Crawler/assets/config/classes/Witch.txt @@ -10,9 +10,9 @@ Witch # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -26,9 +26,9 @@ Witch # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -42,9 +42,9 @@ Witch # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -58,9 +58,9 @@ Witch # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 diff --git a/Crawler/assets/config/classes/Wizard.txt b/Crawler/assets/config/classes/Wizard.txt index d71c79cb..12b1005b 100644 --- a/Crawler/assets/config/classes/Wizard.txt +++ b/Crawler/assets/config/classes/Wizard.txt @@ -33,9 +33,9 @@ Wizard # Whether or not this ability cancels casts. CancelCast = 1 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 0, 0, 64, 255 - Cooldown Bar Color 2 = 0, 0, 128, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 0, 0, 64, 192 + Cooldown Bar Color 2 = 0, 0, 128, 192 Precast Time = 0 Casting Range = 0 @@ -71,9 +71,9 @@ Wizard # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -135,9 +135,9 @@ Wizard # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 0 Casting Range = 0 @@ -189,9 +189,9 @@ Wizard # Whether or not this ability cancels casts. CancelCast = 0 - #RGB Values. Color 1 is the left side of the bar, Color 2 is the right side. - Cooldown Bar Color 1 = 64, 0, 0, 255 - Cooldown Bar Color 2 = 128, 0, 0, 255 + #RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. + Cooldown Bar Color 1 = 64, 0, 0, 192 + Cooldown Bar Color 2 = 128, 0, 0, 192 Precast Time = 1.5 Casting Range = 900 diff --git a/Crawler/assets/config/gfx/gfx.txt b/Crawler/assets/config/gfx/gfx.txt index a2956f0b..88e76fc2 100644 --- a/Crawler/assets/config/gfx/gfx.txt +++ b/Crawler/assets/config/gfx/gfx.txt @@ -36,4 +36,5 @@ Images GFX_Warrior_Sheet = nico-warrior.png GFX_Wizard_Sheet = nico-wizard.png GFX_SlimeKing_Cast = monsters/Slime King - Cast.png + GFX_SkillOverlayIcon = skill_overlay_icon.png } \ No newline at end of file diff --git a/Crawler/assets/skill_overlay_icon.png b/Crawler/assets/skill_overlay_icon.png new file mode 100644 index 00000000..a9438bb2 Binary files /dev/null and b/Crawler/assets/skill_overlay_icon.png differ