mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-11 02:41:35 -10:00
inventory items rendering cleanup (#1938)
This commit is contained in:
1 parent
8ac9047b4f
commit
89c40eaa7b
4 files changed
+37
-39
No files matched your search
+3
-7
@@ -186,17 +186,13 @@ static void DrawCursor(const CelOutputBuffer &out)
|
||||
|
||||
const auto &sprite = GetInvItemSprite(pcurs);
|
||||
const int frame = GetInvItemFrame(pcurs);
|
||||
bool usable = true;
|
||||
if (pcurs >= CURSOR_FIRSTITEM) {
|
||||
const auto &heldItem = plr[myplr].HoldItem;
|
||||
CelBlitOutlineTo(out, GetOutlineColor(heldItem, true), MouseX, MouseY + cursH - 1, sprite, frame, false);
|
||||
if (heldItem._iStatFlag) {
|
||||
CelClippedDrawSafeTo(out, MouseX, MouseY + cursH - 1, sprite, frame);
|
||||
} else {
|
||||
CelDrawLightRedSafeTo(out, MouseX, MouseY + cursH - 1, sprite, frame, 1);
|
||||
}
|
||||
} else {
|
||||
CelClippedDrawSafeTo(out, MouseX, MouseY + cursH - 1, sprite, frame);
|
||||
usable = heldItem._iStatFlag;
|
||||
}
|
||||
CelDrawItem(usable, out, MouseX, MouseY + cursH - 1, sprite, frame);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user