Seite 1 von 1

Halbtransparenz

Verfasst: 25.02.2007 21:36
von Kekskiller
Hab mal ne kleine Halbtransparenzfunktion gecodet:

Code: Alles auswählen

Procedure.l AlphaHalf(c1.l, c2.l)
  
  If c1 & $800000 = $800000: c1 ! $800000: EndIf
  If c1 & $008000 = $008000: c1 ! $008000: EndIf
  If c1 & $000080 = $000080: c1 ! $000080: EndIf
  
  If c2 & $800000 = $800000: c2 ! $800000: EndIf
  If c2 & $008000 = $008000: c2 ! $008000: EndIf
  If c2 & $000080 = $000080: c2 ! $000080: EndIf
  
  ProcedureReturn c1 + c2
  
EndProcedure
Enfach 2 Farben angeben und sie werden miteinander vermischt...