inventory items rendering cleanup (#1938)

This commit is contained in:
qndel 2021-05-14 12:46:16 +02:00 committed by GitHub
commit 89c40eaa7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 39 deletions

View file

@ -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);
}
/**