Qbasicnews.com

Full Version: Changing palette colours in UGL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't understand how to do this at all. I tried a few things and none worked. I need a good example on how to do it... But Blitz didn't write an example for it!! Sad
Code:
OUT &H3C8, attribute
OUT &H3C9, red
OUT &H3C9, green
OUT &H3C9, blue

^ it doesnt *stop* working when you use ugl, does it?
Remember only 8 bit modes use palettes!

I think some SVGA cards don't accept the OUT commands for changing palettes, you must call interrupt 10h to do it..
Actually it does stop working, some cards have 6 bit dac, others have 8 bit dac. You can't possibly know that. So you have to use ugls routines. It expects all the color components to be in the range 0-255. And it takes a far pointer to the palette. That's it.
make if they want to ask their DAC how many bits it supports. (I'm just not where I can look it up right now.)
It has in my opnion excellent routines for change the pal, we don't think letting them know such stuff is needed