home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 18
/
CD_ASCQ_18_111294_W.iso
/
dos
/
prg
/
pas
/
pscrn55
/
basic.exe
/
DEMOFADE.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-10-09
|
3KB
|
86 lines
'======================================================= DemoFade.Bas
'
' DemoFade.BAS Copyright 1994, Rob W. Smetana
' A P-Screen support module.
'
' Requires: PScreen.Inc (declarations), PScreen.Obj (required routines)
' and Demo.Obj (contains examples of "callable" screens).
'
' Purpose: Demonstrate how to "fade" text-mode screens in!
'
' VGA ONLY! On non-VGA screens, the palette routines
' do nothing. That means that on non-VGA screens,
' your screens will POP up instead of fading in.
'
' Demonstrate how to use several P-Screen routines:
'
' psColorsOff turn all colors OFF
' psFadeIn fade in screens
' psFadeOut fade screens out
' psGetPalette () preserve existing palette
' psSetPalette (...) set any/all color registers
'
' Notes:
'
' You should ALWAYS call GetPalette BEFORE calling SetPalette.
' This preserves the current palette -- before you cream it.
' But... If you don't, calling SetPalette will do it for you!
' In other words, GetPalette sets an internal flag once you've
' preserved the palette. If, when you call SetPalette, that
' flag is NOT set, SetPalette will call GetPalette for you.
'
' ALSO: Before displaying a screen, turn OFF all colors (see
' psColorsOff below) so your screen will NOT appear as you display
' it. Once your screen has been "displayed" (but is invisible),
' use psFadeIn (or psSetPalette) to bring your screen to life!
'
'======================================================= DemoFade.Bas
DEFINT A-Z
'$INCLUDE: 'PScreen.INC'
DECLARE SUB Frog () '...a callable ASM/OBJ screen!
'=======================================================
' PowerBASIC users: Un-rem the next line(s).
'=======================================================
''$Include "PScreen.Inc"
''$Link "pscreen.obj"
''$Link "demo.obj"
'=======================================================
' END PowerBASIC users
'=======================================================
CLS
CALL psInitialize: CLS '...for SHAREWARE versions ONLY
SCREEN 0, 0, 0 '...for safety: helps ensure that
' a mistake doesn't render your
' screen invisible.
CALL psGetPalette '...ALWAYS begin by SAVING the palette
'...Turn all colors *OFF* so our screen does NOT appear when we display it!
CALL psColorsOff '...turn OFF all colors!!!
'...here's another way to turn OFF all colors.
'CALL psSetPalette(0, 0, 255)
CALL Frog '...display our "callable" ASM/OBJ screen
CALL psFadeIn '...fade our screen in!!!
'...Here's another way to fade IN the screen. This approach gives
' YOU control over the speed. Use "Step" values of 1-3. Values
' above 5-10 are too fast.
' FOR A = 0 TO 255 STEP 3: CALL psSetPalette(A, 0, 255): NEXT
CALL psFadeOut '...fade our screen Out!!!
CALL psFadeIn '...fade it back in again!!!