Sub drawHealth (Health As Int) As Bitmap
Dim b As Bitmap
Dim newBMP As Bitmap
Dim brect As Rect
Dim barRect As Rect
Dim healthRect As Rect
Dim orgHealth As Int
b = LoadBitmap(File.DirAssets, "chest.png")
newBMP.InitializeMutable(b.Width,b.Width)
brect.Initialize(0,0,b.Width, b.Height)
barRect.Initialize(0,0,b.Width-1,4.5dip)
c.Initialize2(newBMP)
c.DrawBitmap(b,Null,brect)
c.DrawRect(barRect,Colors.Black,False,1)
Health = (Health/100)*(b.Width-2)
healthRect.Initialize(2,2,Health,4.5dip -1)
c.DrawRect(healthRect,Colors.RGB(2.55 * (1 - orgHealth),2.55 * orgHealth, 0),True,1)
'c.DrawBitmap(newBMP, Null, brect)
Return c.Bitmap
End Sub