Posts: 77
Threads: 15
Joined: Mar 2004
Ok, so after discovering that I can use this so-called magical color as an invisible color, I got excited. I make a test picture with MS Paint and paint it mostly 255, 0, 255(magic pink). I hurriedly save it to the directory of my most recent project and load up the program. Unfortunately, the magical pink color isn't invisible but just pink. I should have known better than to expect FB to do the work for me.
Is there a way to make this color live up to its reputation? Is there some keywork or value I have to set? Am I just retarded?
nd remember kids, only you can provoke forest fires!
Posts: 336
Threads: 4
Joined: Nov 2004
well the magic pink will only act as a transparent color when you use it with put with the trans flag set.
i would give more detail but i really haven't used the built in gfx lib i'm more of a sdl person
Posts: 77
Threads: 15
Joined: Mar 2004
Ah, I see. How would I go about setting this flag, anyone?
nd remember kids, only you can provoke forest fires!
Posts: 780
Threads: 49
Joined: Dec 2001
If you use 16/24/32 bit screen modes, then instead of Black, the TRANS mode of PUT will use magic-pink, &hFF00FF or, RGB(255, 0, 255).
Posts: 61
Threads: 6
Joined: Jan 2005
This shoud work(untested code):
Code:
'set 640x480x16bit
screen 18, 16, 2
'load some sprite
dim sprite(1000) as ushort 'make sure this is big enugh width*height+4
bload "sprite.bmp", varptr(sprite(0))
put (x,y), sprite(0), trans
lillo has just fixed a bug with the transparnt color in 32bit, but Im not sure if that was in PUT
Posts: 268
Threads: 9
Joined: Dec 2004
The bug was in BLOAD when loading BMPs while in 32bit mode... The bright pink color test would fail there in 0.12. This doesn't happen when you BLOAD a truecolor BMP while in 16bit mode.
Bug is fixed in CVS.
Posts: 77
Threads: 15
Joined: Mar 2004
Thanks, I got it to work and it's wonderful. I had to change it to 16 bit, but that's ok. 32 bit was unnecessarily high, anyway.
nd remember kids, only you can provoke forest fires!