BBS: Inland Empire Archive Date: 03-24-92 (20:38) Number: 147 From: SCOTT DRYSDALE Refer#: NONE To: THOMAS DELUCA Recvd: NO Subj: Gifs And Stuff... Conf: (2) Quik_Bas
Ok,
I think I can handle this one without checking my source files. Here's one
thing you WON'T find in any of those QB text books. So you want it from a
different file eh? That's good, because it's alot easier for me to explain.
Try this: In the GIFREAD.BAS file (I presume you have :-
) type the following line right after it opens your GIF
as #1:
OPEN "pallette.pal" FOR OUTPUT AS #2
Then you'll notice the part that loads the Palette, it's a block if looks
like "IF colormap then". What you do there is right before
the ELSE, and also before the END IF insert:
? #2, i, pal&
Now this is your personal PaletSav.Bas Routine. It'll
work provided that you convert the GIF you used to a
.BLD, and use that .PAL on that .BLD.
How you load it is:
DIM SHARED palet(0 to 255) AS LONG
OPEN "pallette.pal" FOR INPUT AS #2
.
.
.
LoadPal:
FOR i = 1 to 255: Rem I think there is 255 lines or
Rem you could do WHILE NOT EOF(2), WEND loop
INPUT #2, i, pal&
palet(i) = pal&
NEXT i
PALETTE USING palet(0)
Rem It is now end of this routine, you might put a RETURN
here if you're Rem GOSUBing. B.T.W I know ' means REM but
I'm just tradional.
This SHOULD help you and others encountering the same problem.
--- Maximus 2.00
* Origin: Tron 2: TROFF - this time it's personal! (1:249/105)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET