set maxcall on
;;; set debug on
  ;   video and mem checks
  ;TEST HERE FOR HIGHEST VIDEO MODE - FOR VGA, USE MODE "L"
  ifvideo l vidmcheck
	novideo:
	clearscr 0
	color 7 0
	set center on
text 0 14 "Your computer does not support VGA graphics"
text 0 13 "which are required to run the ScreenSaver."
text 0 12 "Please try another PC with VGA Graphics"
waitkey 100
color 15 0
text 0 9 "Press [Enter] to exit." 1
set center off
waitkey
exit

vidmcheck:

; TEST HERE FOR AVAILABLE RAM, USUALLY 510 kb
video 1
clearscr 0
ifmem 450000 okvga
note 250 50 20
color 7 0
set center on
text 0 15 "The system does not have enough memory to run the ScreenSaver."
text 0 14 "The User Interface requires about 450K free RAM"
text 0 13 "Please unload any unused or infrequently used TSRs and try again"
text 0 11 "Or try booting from a DOS back-up system diskette"
text 0 10 "with no, or minimal CONFIG.SYS and AUTOEXEC.BAT files"

waitkey 100
color 15 0
text 0 8 "Press [Enter] to exit." 1
set center off
waitkey

color 0 0
pfade 20 0 200
waitkey 50
exit


okvga:
;;;;video m                  ;  no go cause of palettes 


;;LI'L GUY DELIVERS A PACKAGE
;;Designed, developed and created by Jeff Scott DiBartolo
;;October 19, 1993  
;;Copyright (c) Jeff Scott DiBartolo
;;All rights reserved

;;set maxcall on
set esc
set space off
;;;set esc ctrl-q
video m
set k ""
pload walkpal 2
palette 2
pfree 2

databegin 
ww_gift1 1 ww_gift2 2 ww_walk3 3 ww_walk4 4 ww_walk5 5 ww_walk6 6 
ww_stop 7 turn111 8 turn222 9 turn33 10 turn44 11 
WL11 12 WL22 13 WL33 14 WL44 15 WL55 16 WL66 17 
drop1 18 drop2 19 drop3 20 wl555 21 wl666 22
HAND01 23 HAND02 24 HAND03 25 HAND04 26 HAND05 27 
HAND06 28 HAND07 29 HAND08 30 HAND09 31 HAND10 32 HAND11 33
MISSING 34 MISSING2 35
dataend
mark 35
cload @ @ 1
loop

top:
clearscr 0

WALKIN
STOP_DROP
WALKLEFT

GLOBAL BUF 23
MARK 11
getkey k
 if len(@k)>0
 break finish
 endif
PUTUP 0 0 @BUF
SET BUF @BUF+1
WAITKEY 5
LOOP

WALKIN2
STOP_DROP
WALKLEFT

GLOBAL BUF 23
MARK 11
getkey k
 if len(@k)>0
 break finish
 endif
PUTUP 0 0 @BUF
SET BUF @BUF+1
WAITKEY 5
LOOP
CFREE 1 - 35

WALKIN3
CFREE 1 - 10


link SNOW3

WALKIN:
global y -200
global num 1

mark 6
 if len(@k)>0
 break finish
 endif
data 8 4 16 5 24 6 16 1 16 2 32 3 
mark 6
getkey k
 if len(@k)>0
 break finish
 endif
global y @y+@
putup @y 64 @
	if @num==3||@num==6
	waitkey 10
	goto fast
	endif
	waitkey 10 
	fast:
	if @num<=5
		global num @num+1
	else
		global num 1
	endif
loop
loop
RETURN

WALKIN2:
global y -200
global num 1

mark 2
data 8 4 16 5 24 6 16 1 16 2 32 3 
mark 6
global y @y+@
putup @y 64 @
	if @num==3||@num==6
	waitkey 10
	goto fast4
	endif
	waitkey 10 
	fast4:
	if @num<=5
		global num @num+1
	else
		global num 1
	endif
loop
loop

getkey k
 if len(@k)>0
 goto finish
 endif
putup @y 64 7				;PAUSE AFTER 2 - LOOK SUPPRISED???
waitkey 50
PUTUP @y+24 137 34
waitkey 200
PUTUP @y+24 137 35
waitkey 100

mark 4
getkey k
 if len(@k)>0
 break finish
 endif
data 8 4 16 5 24 6 16 1 16 2 32 3 
mark 6
getkey k
 if len(@k)>0
 break finish
 endif

global y @y+@
putup @y 64 @
	if @num==3||@num==6
	waitkey 10
	goto fast5
	endif
	waitkey 10 
	fast5:
	if @num<=5
		global num @num+1
	else
		global num 1
	endif
loop
loop

RETURN



WALKLEFT:

data 16 21 16 22 32 12 16 13 16 14 24 15
mark 6

getkey k
 if len(@k)>0
 break finish
 endif

global y @y-@
putup @y 64 @
WL_CHECK

loop

mark 5
getkey k
 if len(@k)>0
 break finish
 endif

data 16 16 16 17 32 12 16 13 16 14 24 15
mark 6

getkey k
 if len(@k)>0
 break finish
 endif


global y @y-@
putup @y 64 @

WL_CHECK

loop
loop
RETURN

WL_CHECK:
	if @num==3||@num==6
	waitkey 10
	goto fast3
	endif
	waitkey 10 
	fast3:
	if @num<=5
		global num @num+1
	else
		global num 1
	endif
getkey k
 if len(@k)>0
 goto finish
 endif
RETURN


STOP_DROP:
getkey k
 if len(@k)>0
 goto finish
 endif
putup @y 64 7
waitkey 50
putup @y 64 18
waitkey 10
putup @y+64 65 19
waitkey 10
putup @y+24 65 20
waitkey 10

putup @y 65 8
waitkey 10
putup @y 57 9
waitkey 50
putup @y+16 134 10
waitkey 50
putup @y+32 142 11
waitkey 50
putup @y+16 134 10
RETURN


WALKIN3:
databegin 
ww11 1 ww22 2 ww33 3 ww44 4 ww55 5 ww66 6 
turn11 7 turn22 8 turn33 9 HAND12 10
dataend
mark 10
cload @ @ 1
loop

global y -200
global num 1

mark 8
getkey k
 if len(@k)>0
 break finish
 endif
data 8 4 16 5 24 6 16 1 16 2 32 3 
mark 6
getkey k
 if len(@k)>0
 break finish
 endif

global y @y+@
putup @y 64 @
	if @num==3||@num==6
	waitkey 10
	goto fast7
	endif
	waitkey 10 
	fast7:
	if @num<=5
		global num @num+1
	else
		global num 1
	endif
loop
loop

;putup 256 64 7
;waitkey 10
;putup 264 56 8
;waitkey 50
;putup 280 133 9
;waitkey 50

;GLOBAL X 40		;EMPTY HAND
;MARK 5
;PUTUP @X 0 10
;SET X @X-8
;WAITKEY 5
;LOOP
;WAITKEY 50

;MARK 6
;SET X @X+8
;PUTUP @X 0 10
;WAITKEY 5
;LOOP

return

finish:
 cfree 1 - 128
 pfree 1 - 4
  exit







