|
|
|
@ -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; |
|
|
|
*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); |
|
|
|
const uint16_t animationWidth = GetPlayerSpriteWidth(cls, graphic, animWeaponId); |
|
|
|
animationData.sprites = LoadCl2Sheet(pszName, animationWidth); |
|
|
|
animationData.sprites = LoadCl2Sheet(pszName, animationWidth); |
|
|
|
std::optional<std::array<uint8_t, 256>> trn = GetClassTRN(player); |
|
|
|
std::optional<std::array<uint8_t, 256>> graphicTRN = GetPlayerGraphicTRN(pszName); |
|
|
|
if (trn) { |
|
|
|
if (graphicTRN) { |
|
|
|
ClxApplyTrans(*animationData.sprites, trn->data()); |
|
|
|
ClxApplyTrans(*animationData.sprites, graphicTRN->data()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
std::optional<std::array<uint8_t, 256>> classTRN = GetClassTRN(player); |
|
|
|
|
|
|
|
if (classTRN) { |
|
|
|
|
|
|
|
ClxApplyTrans(*animationData.sprites, classTRN->data()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|