Author Topic: diffuse sprite  (Read 4991 times)

Offline phaelax

  • Mc. Print
  • *
  • Posts: 36
    • View Profile
diffuse sprite
« on: 2010-Sep-22 »
Unless there's already a way to change to the change the overall tint of a sprite.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: diffuse sprite
« Reply #1 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