Page 1 of 1

Problems with change PALETTE

Posted: Mon Feb 14, 2005 9:53 am
by Meerschweinchen
Hi All,
may somebody can help me.
I don't know how to change PALETTE colors on SCREEN 12.
I have always the standard 16 colors.

My routine to load a BMP File ist very fast but only with standard Colors :(
PALETTE 1, mycolor doesnt works realy. :(

Dateikopf$ = SPACE$(54)
SCREEN 12

OPEN "test.bmp" FOR BINARY AS #2

GET #2, 1, Dateikopf$

BildBreite = CVL(MID$(Dateikopf$, 19, 4))
BildHoehe = CVL(MID$(Dateikopf$, 23, 4))
SEEK #2, CVL(MID$(Dateikopf$, 11, 4)) + 1
Daten$ = SPACE$(BildBreite / 2)
Laenge = (BildBreite \ 2) - 1

FOR Y = (BildHoehe - 1) TO 0 STEP -1
GET #2, , Daten$
FOR X = 0 TO Laenge
byte = ASC(MID$(Daten$, X + 1, 1))
PSET (X * 2, Y), byte \ 16
PSET (X * 2 + 1, Y), byte AND 15
NEXT
NEXT

CLOSE #2

Posted: Tue Feb 15, 2005 5:26 am
by Ralph
While in QuickBASIC 4.5, click on Help, then doubale click on Index, select Palette, and, there, select Details, and go to the end of that window, where it shows the colors available for the various screen modes. You will see that SCREEN 12 only has 16 colors available, namely, 0 to 15.