View Single Post
 
Old 06-29-2008, 06:25 AM
Brick Brick is offline
Programmer
PSP Smarty
 
Join Date: Mar 2008
Posts: 145
Brick User Has a Beginner Reputation
Default

This will do exactly the same :P

Code:
SPRITE    fillImage,bgImage; (size: 1x10)



max battery life = 100
min batterry life = 0

for ( int i =min batterry life ; i<=max battery life; i++)
	{
		//battery bar background
		drawSprite(bgImage,head_x_point + (i* sprite width),head_y_point);
                //actual percentage
		drawSprite(fillImage,( head_x_point +( (i%getBatteryLife)*sprite width) ) ,head_y_point);
	}
Another option :
Instead of 2 sprites , use a stretched quad or something.
Apply some nice filters , and voila!...
Reply With Quote