Wow I am impressed! That's a pretty neat function you've got there. I tested to see if it was
really making transparent text by adding a 3D object and it was...
set display mode 800,600,32
sync on
sync rate 60
backdrop on
create bitmap 1,100,100
box 0,0,100,100,rgb(255,0,0),rgb(0,255,0),rgb(0,0,255),rgb(255,255,0)
get image 1,0,0,100,100
delete bitmap 1
make object cube 1,-100
texture object 1,1
r = 255
g = 255
b = 255
a = 255
c as dword
do
turn object left 1,1
set cursor 0,0
t = timer()
for x = 1 to 100000
c = rgba(r,g,b,a)
next x
t = timer()-t
t# = t/100000.0
ink c,0
print "FPS: ", screen fps()
print "Time needed: ", str$(t#,5), "ms"
rem Color-Bars
print "R: ", r
print "G: ", g
print "B: ", b
print "A: ", a
print "Change colors by pressing the character's key (uppercase to increase, lower to decrease)"
i$ = inkey$()
f = (i$=upper$(i$))*2-1
select lower$(i$)
case "r": inc r, f : if r > 255 : r = 255 : endif : if r < 0 : r = 0 : endif : endcase
case "g": inc g, f : if g > 255 : g = 255 : endif : if g < 0 : g = 0 : endif : endcase
case "b": inc b, f : if b > 255 : b = 255 : endif : if b < 0 : b = 0 : endif : endcase
case "a": inc a, f : if a > 255 : a = 255 : endif : if a < 0 : a = 0 : endif : endcase
endselect
sync
loop
function RGBA(r as byte, g as byte, b as byte, a as byte)
rgba_value as dword
rgba_value = 16777216*a + 65536*r + 256*g + b
endfunction rgba_value