* Draws the top dome of the life flask (that part that protrudes out of the control panel). * First it draws the empty flask cel and then draws the filled part on top if needed. */
| 615 | * First it draws the empty flask cel and then draws the filled part on top if needed. |
| 616 | */ |
| 617 | void DrawLifeFlask() |
| 618 | { |
| 619 | int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; |
| 620 | plr[myplr]._pHPPer = filled; |
| 621 | |
| 622 | if (filled > 80) |
| 623 | filled = 80; |
| 624 | filled = 80 - filled; |
| 625 | if (filled > 11) |
| 626 | filled = 11; |
| 627 | filled += 2; |
| 628 | |
| 629 | DrawFlask(pLifeBuff, 88, 277, gpBuffer, SCREENXY(PANEL_LEFT + 109, PANEL_TOP - 13), filled); |
| 630 | if (filled != 13) |
| 631 | DrawFlask(pBtmBuff, PANEL_WIDTH, PANEL_WIDTH * (filled + 3) + 109, gpBuffer, SCREENXY(PANEL_LEFT + 109, PANEL_TOP - 13 + filled), 13 - filled); |
| 632 | } |
| 633 | |
| 634 | /** |
| 635 | * Controls the drawing of the area of the life flask within the control panel. |