VGA fadeout routine

 BBS: Inland Empire Archive
Date: 10-23-93 (15:04)             Number: 227
From: JOHN WOODGATE                Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: VGA fadeout routine            Conf: (2) Quik_Bas
Hello All!

I've recently written VGA Fade In/Out routines in QB and thought I'd
share them with ya...


'>>> Page 1 of PALDEMO.BAS begins here. TYPE:BAS
DEFINT A-Z

DECLARE SUB VGAFadeOut ()
DECLARE SUB VGAFadeIn ()
DECLARE SUB ScreenOut ()
DECLARE SUB ScreenIn ()

DIM SHARED Pal&(0 TO 15)

SCREEN 12  ' VGA Required
X = 1: Y = 20
FOR a = 0 TO 7
 LINE (X, Y)-(X + 50, Y + 70), a, BF
 X = X + 65
NEXT a

X = 1: Y = 120
FOR a = 8 TO 15
 LINE (X, Y)-(X + 50, Y + 70), a, BF
 X = X + 65
NEXT a
LOCATE 15, 20: PRINT "You can set all the colors to black, Draw"+_
" Somthing"
SLEEP 2
CALL ScreenOut
LOCATE 15, 20: PRINT "and then set the colors back to normal.          "+_
" "
SLEEP 2
CALL ScreenIn

SLEEP 4

LOCATE 15, 20: PRINT "You can also fade out the screen, draw somthing  "+_
" "
SLEEP 2
CALL VGAFadeOut
LOCATE 15, 20: PRINT "And then fade back in                            "+_
" "
SLEEP 2
CALL VGAFadeIn
SLEEP 3
SCREEN 0: PRINT "Isn't BASIC Neat......."

SUB ScreenIn

PALETTE
END SUB

SUB ScreenOut

PALETTE USING Pal&(0)
END SUB

SUB VGAFadeIn

FOR a = 1 TO 63
  IF a <= 43 THEN
   clr& = 65536 * 0 + 256 * 0 + a
   PALETTE 4, clr&
   clr& = 65536 * a + 256 * 0 + 0
   PALETTE 1, clr&
   clr& = 65536 * 0 + 256 * a + 0
   PALETTE 2, clr&
   clr& = 65536 * a + 256 * a + a
   PALETTE 7, clr&
   clr& = 65536 * a + 256 * a + 0
   PALETTE 3, clr&
   clr& = 65536 * a + 256 * 0 + a
   PALETTE 5, clr&
  END IF
  IF a <= 21 THEN
   clr& = 65536 * a + 256 * a + a
   PALETTE 8, clr&
  END IF
  IF a <= 41 THEN
   IF a <= 20 THEN
    clr& = 65536 * a + 256 * a + a
    PALETTE 6, clr&
   ELSE
    clr& = 65536 * 20 + 256 * 20 + a
    PALETTE 6, clr&
   END IF
  END IF
'>>> Page 1 of PALDEMO.BAS ends here. Continued on next page.

 * JABBER v1.1 * A seminar on Time Travel will be held 2 weeks ago

--- GEcho 1.01+
 * Origin: WALK in the SHADOWs of the NIGHT 612-825-0595 (1:282/105)
Outer Court
Echo Basic Postings

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