home *** CD-ROM | disk | FTP | other *** search
- #include "health.h"
- #include "gfx.h"
-
- void Health::initialize()
- {
- load_gfxlib( "ss.gfx" );
- }
-
- void Health::minus( int PercentLoss, boolean UpdateScreen )
- {
- percent-=PercentLoss;
- if ( UpdateScreen )
- draw();
- }
-
- void Health::draw(void)
- {
- int x=4;
- int ColorId=percent>20 ? HEALTH_GREEN:percent>10 ? HEALTH_YELLOW:HEALTH_RED;
- for ( int i=0; i<percent; i++ )
- show_image( x++, 4, ColorId );
- }
-
-