diff --git a/CMakeLists.txt b/CMakeLists.txt index aa19d1f58..fc50da9da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,6 +716,7 @@ set(devilutionx_assets data/health.pcx data/panel8buc.pcx data/panel8bucp.pcx + data/monstertags.pcx data/resistance.pcx data/talkbutton.pcx data/xpbar.pcx diff --git a/Packaging/resources/assets/data/monstertags.pcx b/Packaging/resources/assets/data/monstertags.pcx new file mode 100644 index 000000000..b43dcf95a Binary files /dev/null and b/Packaging/resources/assets/data/monstertags.pcx differ diff --git a/Source/qol/monhealthbar.cpp b/Source/qol/monhealthbar.cpp index f2519f242..a18bcafcb 100644 --- a/Source/qol/monhealthbar.cpp +++ b/Source/qol/monhealthbar.cpp @@ -17,6 +17,7 @@ namespace { Art healthBox; Art resistance; Art health; +Art playerExpTags; } // namespace @@ -28,6 +29,7 @@ void InitMonsterHealthBar() LoadMaskedArt("data\\healthbox.pcx", &healthBox, 1, 1); LoadArt("data\\health.pcx", &health); LoadMaskedArt("data\\resistance.pcx", &resistance, 6, 1); + LoadMaskedArt("data\\monstertags.pcx", &playerExpTags, 5, 1); if ((healthBox.surface == nullptr) || (health.surface == nullptr) @@ -134,6 +136,16 @@ void DrawMonsterHealthBar(const Surface &out) } } } + + int tagOffset = 5; + for (int i = 0; i < MAX_PLRS; i++) { + if (1 << i & monster.mWhoHit) { + DrawArt(out, position + Displacement { tagOffset, height - 31 }, &playerExpTags, i + 1); + } else if (Players[i].plractive) { + DrawArt(out, position + Displacement { tagOffset, height - 31 }, &playerExpTags, 0); + } + tagOffset += playerExpTags.w(); + } } } // namespace devilution