cs_shivan
Messages postés363Date d'inscriptionjeudi 20 décembre 2001StatutMembreDernière intervention25 août 2003
-
15 janv. 2002 à 23:25
shadowmoy
Messages postés340Date d'inscriptionjeudi 25 juillet 2002StatutMembreDernière intervention25 août 2007
-
10 mai 2007 à 13:17
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
shadowmoy
Messages postés340Date d'inscriptionjeudi 25 juillet 2002StatutMembreDernière intervention25 août 2007 10 mai 2007 à 13:17
CreateColorRGBA ne fonctionne plus sous Vista apparament il faut se coder une fonction equivalente pour remplacer celle ci
pas bien grave mais c'est chiant pour tester les sources dx7 sous vista il faut remplacer par:
Public Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef dest As Any, ByRef src As Any, ByVal dwLen As Long)
'Entrée : un Long RGB pour windows
'sortie : un long BGR pour dx
Public Function LongToDxColor(ByVal pColor As Long) As Long
Dim pRGBentry As RGBColor
Dim s As Byte
CopyMemory pRGBentry, pColor, 3
'swap windowscolor to directxcolors inverse red and blue values
s = pRGBentry.Red
pRGBentry.Red = pRGBentry.Blue
pRGBentry.Blue = s
LongToDxColor = RGB(pRGBentry.Red, pRGBentry.Green, pRGBentry.Blue)
TheRedman
Messages postés24Date d'inscriptionvendredi 22 août 2003StatutMembreDernière intervention29 juin 2004 25 avril 2004 à 10:25
Chez moi ça ne marche pas :-(
Ma couleur : 110 80 52 donc je mets ck.low rgb2dx(110,80,52) et ck.high rgb2dx(110,80,52) mais le brun reste brun...
J'ai bien mis SurfacePersos.SetColorKey DDCKEY_SRCBLT, CK et quand je blitte je mets encore BackBuffer.Blt DDRect(100, 100, 200, 200), SurfacePersos, DDRect(0, 0, 0, 0), DDBLT_WAIT Or DDBLT_KEYSRC. Mais rien ne se passe...
Help ?!
cs_Kaya
Messages postés7Date d'inscriptionjeudi 25 juillet 2002StatutMembreDernière intervention16 août 2002 29 juil. 2002 à 03:25
Bien entendu sous directx8 la fonction est deja declarer
D3DColorXRGB(r As Integer, g As Integer, b As Integer) As Long
chao ;)
cs_shivan
Messages postés363Date d'inscriptionjeudi 20 décembre 2001StatutMembreDernière intervention25 août 2003 15 janv. 2002 à 23:25
ben voila, j'en apprend encore un peu sur directx !!! merci !! 8/10
10 mai 2007 à 13:17
pas bien grave mais c'est chiant pour tester les sources dx7 sous vista il faut remplacer par:
Public Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef dest As Any, ByRef src As Any, ByVal dwLen As Long)
'Entrée : un Long RGB pour windows
'sortie : un long BGR pour dx
Public Function LongToDxColor(ByVal pColor As Long) As Long
Dim pRGBentry As RGBColor
Dim s As Byte
CopyMemory pRGBentry, pColor, 3
'swap windowscolor to directxcolors inverse red and blue values
s = pRGBentry.Red
pRGBentry.Red = pRGBentry.Blue
pRGBentry.Blue = s
LongToDxColor = RGB(pRGBentry.Red, pRGBentry.Green, pRGBentry.Blue)
End Function
'pour ton exemple :
ck.low =LongToDxColor(rgb(110,80,52))
ck.Hight =LongToDxColor(rgb(110,80,52))
25 avril 2004 à 10:25
Ma couleur : 110 80 52 donc je mets ck.low rgb2dx(110,80,52) et ck.high rgb2dx(110,80,52) mais le brun reste brun...
J'ai bien mis SurfacePersos.SetColorKey DDCKEY_SRCBLT, CK et quand je blitte je mets encore BackBuffer.Blt DDRect(100, 100, 200, 200), SurfacePersos, DDRect(0, 0, 0, 0), DDBLT_WAIT Or DDBLT_KEYSRC. Mais rien ne se passe...
Help ?!
29 juil. 2002 à 03:25
D3DColorXRGB(r As Integer, g As Integer, b As Integer) As Long
chao ;)
15 janv. 2002 à 23:25