Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Graphics in mode 20
#1
Does anyone know how to draw lines in different colors in screen 20 ?

Screen 20,24,,1
line (0,0)-(200,200),7
sleep

This doesn't work, only a black screen.

Screen 20,,,1
line (0,0)-(200,200),4
sleep

This works, but i also want to load a 24 bpp pictures
Reply
#2
True color modes don't have indexed colors. It's blitting the line, but 7 is pretty close to black. Try the RGB macro:

line (0, 0)-(319, 199), rgb(128, 128, 255)

Also, use a 32 bit depth. It's faster, trust me, and you can still display 24bbp images.
Reply
#3
Great, that's it!!!!!!!!!!!!!!!

Thank you very, very much
Reply
#4
Now i have another problem:

How to place text in color?

It seems that all the text is in white?

Screen 20,32,,1
bload "brain.bmp"
line (0, 0)-(319, 199), rgb(255, 255, 255)
Color 3 <- this doesn't work
Print "hallo"
sleep
Reply
#5
You would use the RGB macro again. Color 3 is cyan. In RGB, rgb(0, 255, 255).

color rgb(0,255,255)
print "hallo"
sleep
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Reply
#6
yep

It was'nt that clear in the manual.

Think we can close this topic now.

Thanks to all who helped me with this one!!

Hope to help someone else in the future.
I used to program in Visual Basic before Freebasic.

Think we can close this topic now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)