09-06-2005, 11:44 PM
Pages: 1 2
09-07-2005, 01:35 AM
i believe the OUT "hack" should be able to do it.
i'll see if i can remember it:
that code may be completely wrong, though
sorry - can't find a copy of the actual code
oz~
i'll see if i can remember it:
Code:
OUT &h3a9, col_id%
OUT &h3a8, r%
OUT &h3a8, b%
OUT &h3a8, g%
that code may be completely wrong, though
sorry - can't find a copy of the actual code
oz~
09-07-2005, 02:01 AM
The ports are a bit wrong...
Port &H3C8 is auto-incrementing.
Code:
Out &H3C8, col_id
Out &H3C9, red
Out &H3C9, green
Out &H3C9, blue
09-07-2005, 02:06 AM
Quote:The ports are a bit wrong...
Port &H3C8 is auto-incrementing.Code:Out &H3C8, col_id
Out &H3C9, red
Out &H3C9, green
Out &H3C9, blue
thanks for the correction
oz~
09-07-2005, 04:39 PM
If you were using fb could'nt you use the RGB(r,g,b) command
09-07-2005, 07:39 PM
Hi,
There is a PALETTE statement in QBASIC (and Quick BASIC) .
c = blue * 65536 + green * 256 + red
PALETTE 15, c
blue, green and red are numbers in the range of 0 to 63 inclusive.
The 15 is just the color of the default printing etc. and is usually bright white. It can be any of the 16 (0 - 15) colors available in screen 12.
There is a PALETTE statement in QBASIC (and Quick BASIC) .
c = blue * 65536 + green * 256 + red
PALETTE 15, c
blue, green and red are numbers in the range of 0 to 63 inclusive.
The 15 is just the color of the default printing etc. and is usually bright white. It can be any of the 16 (0 - 15) colors available in screen 12.
09-07-2005, 08:09 PM
Isn't the default printing color 7?
09-07-2005, 08:29 PM
Hi,
Try this.
SCREEN 12
PRINT "this is a test"
LINE (100, 100)-(300, 300), , BF
SLEEP
FOR x = 0 TO 63
c = x * 65536 + x * 256 + x
PALETTE 15, c
t = TIMER
WHILE TIMER - t < .1
WEND
NEXT
Try this.
SCREEN 12
PRINT "this is a test"
LINE (100, 100)-(300, 300), , BF
SLEEP
FOR x = 0 TO 63
c = x * 65536 + x * 256 + x
PALETTE 15, c
t = TIMER
WHILE TIMER - t < .1
WEND
NEXT
09-07-2005, 08:30 PM
I have tried the above examples but i cannot get them to work when i use &H3C9 i can only change the border.
I will try and give you an idea of what i want
in the program the user can pick a colour from the list, but i do not want to use the default colours, i want to make my own and show them on screen.
I will try and give you an idea of what i want
in the program the user can pick a colour from the list, but i do not want to use the default colours, i want to make my own and show them on screen.
09-07-2005, 09:17 PM
You mean you don't want to use the colors 0 to 15?
That's impossible in screen 12 because of the size of the
screen memory or something like that.
If you "need" more than 16 colors I would suggest that you either
get some vesa routines (through a library like future library, or by
executing some asm code manually) or continue the developing in
freebasic, which supports hi-res graphics natively.
That's impossible in screen 12 because of the size of the
screen memory or something like that.
If you "need" more than 16 colors I would suggest that you either
get some vesa routines (through a library like future library, or by
executing some asm code manually) or continue the developing in
freebasic, which supports hi-res graphics natively.
Pages: 1 2