| 381 | } |
| 382 | |
| 383 | void DrawInvBelt() |
| 384 | { |
| 385 | int i, frame, frame_width, color; |
| 386 | BYTE fi, ff; |
| 387 | |
| 388 | if (talkflag) { |
| 389 | return; |
| 390 | } |
| 391 | |
| 392 | DrawPanelBox(205, 21, 232, 28, PANEL_X + 205, PANEL_Y + 5); |
| 393 | |
| 394 | for (i = 0; i < MAXBELTITEMS; i++) { |
| 395 | if (plr[myplr].SpdList[i]._itype == ITYPE_NONE) { |
| 396 | continue; |
| 397 | } |
| 398 | |
| 399 | InvDrawSlotBack(InvRect[i + SLOTXY_BELT_FIRST].X + SCREEN_X, InvRect[i + SLOTXY_BELT_FIRST].Y + SCREEN_Y - 1, 28, 28); |
| 400 | frame = plr[myplr].SpdList[i]._iCurs + CURSOR_FIRSTITEM; |
| 401 | frame_width = InvItemWidth[frame]; |
| 402 | |
| 403 | if (pcursinvitem == i + INVITEM_BELT_FIRST) { |
| 404 | color = ICOL_WHITE; |
| 405 | if (plr[myplr].SpdList[i]._iMagical) |
| 406 | color = ICOL_BLUE; |
| 407 | if (!plr[myplr].SpdList[i]._iStatFlag) |
| 408 | color = ICOL_RED; |
| 409 | if (!sgbControllerActive || invflag) |
| 410 | CelBlitOutline(color, InvRect[i + SLOTXY_BELT_FIRST].X + SCREEN_X, InvRect[i + SLOTXY_BELT_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width); |
| 411 | } |
| 412 | |
| 413 | if (plr[myplr].SpdList[i]._iStatFlag) { |
| 414 | CelClippedDraw(InvRect[i + SLOTXY_BELT_FIRST].X + SCREEN_X, InvRect[i + SLOTXY_BELT_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width); |
| 415 | } else { |
| 416 | CelDrawLightRed(InvRect[i + SLOTXY_BELT_FIRST].X + SCREEN_X, InvRect[i + SLOTXY_BELT_FIRST].Y + SCREEN_Y - 1, pCursCels, frame, frame_width, 1); |
| 417 | } |
| 418 | |
| 419 | if (AllItemsList[plr[myplr].SpdList[i].IDidx].iUsable |
| 420 | && plr[myplr].SpdList[i]._iStatFlag |
| 421 | && plr[myplr].SpdList[i]._itype != ITYPE_GOLD) { |
| 422 | fi = i + 49; |
| 423 | ff = fontframe[gbFontTransTbl[fi]]; |
| 424 | PrintChar(InvRect[i + SLOTXY_BELT_FIRST].X + SCREEN_X + 28 - fontkern[ff], InvRect[i + SLOTXY_BELT_FIRST].Y + SCREEN_Y - 1, ff, 0); |
| 425 | } |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | BOOL AutoPlace(int pnum, int ii, int sx, int sy, BOOL saveflag) |
| 430 | { |
no test coverage detected