home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sauce 'n' Code 2
/
sauce-n-code-02.adf
/
ASCII_Source
/
Darken.asc
< prev
next >
Wrap
Text File
|
1995-07-02
|
1KB
|
65 lines
'* darken picture routine project x styleeee
'* its smoother when compiled.................
'* written by andy dobinson on 15 october 1993
' *************************************************************
' * Just load in an picture and this routine will darken it *
' * a little bit for you. A brilliant effect for use with the *
' * scrolling text over picture routines! *
' *************************************************************
If Length(10)=0
Load Iff Fsel$(""),0
Spack 0 To 10
Screen Close 0
End If
If Length(10)>0
Unpack 10 To 0
End If
Hide : Wait Vbl
_DARKENSCREEN[32,6]
Procedure _DARKENSCREEN[G,Q]
'
' G= THE NUMBER OF COLOURS
' Q= HOW DARK THE PICTURE YOU WANT
Dim RGB(2)
AD=0
For Y=1 To Q
ST:
'
'* the next 3 lines find out what the rgb's are set to
'
RGB(0)=(Colour(AD)/256)
RGB(1)=(Colour(AD)/16 mod 16)
RGB(2)=(Colour(AD) mod 16)
'
'* this bit subtracts 1 from r,g,b *
'
For X=0 To 2
RGB(X)=RGB(X)-1
If RGB(X)<0 Then RGB(X)=0
Next X
'
'* this bit now displays the darker colour
'
Colour AD,RGB(0)*256+RGB(1)*16+RGB(2)
Inc AD
If AD<G Then Goto ST
AD=0
Next Y
End Proc