* Controls the drawing of the area of the life flask within the control panel. * First sets the fill amount then draws the empty flask cel portion then the filled * flask portion. */
| 637 | * flask portion. |
| 638 | */ |
| 639 | void UpdateLifeFlask() |
| 640 | { |
| 641 | int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; |
| 642 | plr[myplr]._pHPPer = filled; |
| 643 | |
| 644 | if (filled > 69) |
| 645 | filled = 69; |
| 646 | else if (filled < 0) |
| 647 | filled = 0; |
| 648 | if (filled != 69) |
| 649 | SetFlaskHeight(pLifeBuff, 16, 85 - filled, 96 + PANEL_X, PANEL_Y); |
| 650 | if (filled) |
| 651 | DrawPanelBox(96, 85 - filled, 88, filled, 96 + PANEL_X, PANEL_Y + 69 - filled); |
| 652 | } |
| 653 | |
| 654 | void DrawManaFlask() |
| 655 | { |
no test coverage detected