mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
Fix brightness of whu casting animations
This commit is contained in:
@@ -148,6 +148,9 @@ set(devilutionx_assets
|
||||
nlevels/cutl6w.clx
|
||||
nlevels/l5data/cornerstone.dun
|
||||
nlevels/l5data/uberroom.dun
|
||||
plrgfx/warrior/whu/whufm.trn
|
||||
plrgfx/warrior/whu/whulm.trn
|
||||
plrgfx/warrior/whu/whuqm.trn
|
||||
txtdata/Experience.tsv
|
||||
txtdata/classes/barbarian/attributes.tsv
|
||||
txtdata/classes/bard/attributes.tsv
|
||||
|
||||
@@ -65,4 +65,16 @@ std::optional<std::array<uint8_t, 256>> GetClassTRN(Player &player)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<std::array<uint8_t, 256>> GetPlayerGraphicTRN(const char *pszName)
|
||||
{
|
||||
char path[MaxMpqPathSize];
|
||||
*BufCopy(path, pszName, ".trn") = '\0';
|
||||
|
||||
std::array<uint8_t, 256> trn;
|
||||
if (LoadOptionalFileInMem(path, &trn[0], 256)) {
|
||||
return trn;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
} // namespace devilution
|
||||
|
||||
@@ -16,5 +16,6 @@ uint8_t *GetInfravisionTRN();
|
||||
uint8_t *GetStoneTRN();
|
||||
uint8_t *GetPauseTRN();
|
||||
std::optional<std::array<uint8_t, 256>> GetClassTRN(Player &player);
|
||||
std::optional<std::array<uint8_t, 256>> GetPlayerGraphicTRN(const char *pszName);
|
||||
|
||||
} // namespace devilution
|
||||
|
||||
+7
-3
@@ -2134,9 +2134,13 @@ void LoadPlrGFX(Player &player, player_graphic graphic)
|
||||
*fmt::format_to(pszName, R"(plrgfx\{0}\{1}\{1}{2})", path, std::string_view(prefix, 3), szCel) = 0;
|
||||
const uint16_t animationWidth = GetPlayerSpriteWidth(cls, graphic, animWeaponId);
|
||||
animationData.sprites = LoadCl2Sheet(pszName, animationWidth);
|
||||
std::optional<std::array<uint8_t, 256>> trn = GetClassTRN(player);
|
||||
if (trn) {
|
||||
ClxApplyTrans(*animationData.sprites, trn->data());
|
||||
std::optional<std::array<uint8_t, 256>> graphicTRN = GetPlayerGraphicTRN(pszName);
|
||||
if (graphicTRN) {
|
||||
ClxApplyTrans(*animationData.sprites, graphicTRN->data());
|
||||
}
|
||||
std::optional<std::array<uint8_t, 256>> classTRN = GetClassTRN(player);
|
||||
if (classTRN) {
|
||||
ClxApplyTrans(*animationData.sprites, classTRN->data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user