Sprite3D Luminosity
Posted: Wed Jul 29, 2009 7:18 am
Hello
Why don't Add A function to change sprite3D Luminosity ?
under the Cpl.Bator's code to change sprite 3D luminosity on Windows...
regards
Thy
Why don't Add A function to change sprite3D Luminosity ?
under the Cpl.Bator's code to change sprite 3D luminosity on Windows...
regards
Thy
Code: Select all
;Thanks Cpl.Bator
Structure vertex
sx.f
sy.f
sz.f
rhw.f
Color.l
specular.l
tu.f
tv.f
EndStructure
Structure PB_Sprite3D
Texture.l
Vertice.vertex[4]
Width.w
Height.w
EndStructure
Macro RGBA(r,g,b,a)
a << 24 + b << 16 +g << 8 + r
EndMacro
Procedure SetSprite3DLuminosity(spriteid.l,lum.c)
Protected RGB_LUM.l,*S.PB_Sprite3D
;This function must between Start3D end Stop3D
; 255 = Full luminosity 0 = Black
LUM=0
RGB_LUM = RGBA(Lum,Lum,Lum,255)
*S=IsSprite3D(spriteid)
*S\Vertice[0]\Color = RGB_LUM
*S\Vertice[1]\Color = RGB_LUM
*S\Vertice[3]\Color = RGB_LUM
*S\Vertice[2]\Color = RGB_LUM
EndProcedure