BBS: Inland Empire Archive Date: 11-14-92 (12:24) Number: 345 From: HARRY GISH Refer#: NONE To: DEREK BELL Recvd: NO Subj: FADE.OBJE Conf: (2) Quik_Bas
DB> Hey! Could you possibly post FADE.OBJ after you DB> find out how to use it so that you could give DB> instructions to use it too? I've been looking for DB> a way to fade a screen for a while. Fading (or reverse fading) a 256 color screen (it's vaguely possible in 16 color screens, though the results are not likely to be acceptable) is really quite simple, and it works in text color modes as well. What happens is this, you simply take the palette colors and decrement them all to zero. Technically the way it works is this: Each of the 256 colors has values between 0 and 63 stored in 3 registers (called DAC or Digital To Analog Conversion registers) ... in the 32K color / 24 BIT color schemes it's 0 to 255 ... They describe the Red, Green and Blue components of the given color. It's probably easiest for you to visualize this with the DEF COLOR statement in ZBasic. Let's say we want to "define" COLOR 42 to be Red level 10, Green level 31 and Blue level to 63. Simply issue DEF COLOR 42,10,31,63. Thus to execute a fade (let's say you have an image with something in COLOR 42, with those definitions, into a background which is set to 0,0,0) simply enter FOR X = 63 TO 0 STEP-1 DEFCOLOR 42,,,X NEXT FOR X = 31 TO 0 STEP-1 DEFCOLOR 42,,X, NEXT FOR X = 10 TO 0 STEP-1 DEFCOLOR 42,X,, NEXT --- Maximus/2 2.01wb * Origin: ACCESS BBS (1:124/2122)
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