GLBasic forum

Feature request => 2D => Topic started by: phaelax on 2010-Sep-22

Title: diffuse sprite
Post by: phaelax on 2010-Sep-22
Unless there's already a way to change to the change the overall tint of a sprite.
Title: Re: diffuse sprite
Post by: Kitty Hello on 2010-Sep-28
no, there's not. You want to fade to grey, right?
Way is:
-SPRITE2MEM
-convert pixels to greyscale
-MEM2SPRITE (to new sprite slot)
-fade from colourd sprite to greyscale sprite:
for pos = -0.01 to -1 step -0.1 // better with timer
alphamode pos
drawsprite grey, 0,0
alphamode -1-pos
drawsprite colour
showscreen
next
-free temp, grey sprite: grabsprite grey, 0,0,0,0