'
'                  Pixel Reader V1.1 
'                    by Ivor King
'
'      Read the DOCS on disk for more information
'
'Screen Close 0
Break Off 
Global COOL,F$,DY,MOUSE,LEED
MOUSE=2
LEED=False
DY=289
Change Mouse MOUSE
Screen Open 1,640,20,16,Hires
Colour 1,0 : Curs Pen 0 : Writing 0 : Curs Off 
Screen Display 1,143,DY,640,10
Home 
Pen 4
Print ">> PIXEL READER V1.0 <<"
Locate 27,0
Pen 8
Print "by Ivor King... press HELP for info (MB to continue)"
Repeat : Until Mouse Key : Cls 
LODER
Home 
Pen 5
Print "Colour:"
Locate 15,0
Print "Register:"
Locate 32,0
Print "Total scr cols:"
Locate 57,0
Print "Free:"
Locate 72,0
Pen 6
Print "King\92"
Pen 2
SCR_SETUP
Do 
   Repeat 
      K$=Inkey$
      If K$<>""
         If K$="p"
            Lprint "Colour value: ";C;"       Present register: ";U
         Else 
            Gosub HELPME
         End If 
      End If 
   Until Mouse Key
   Screen 0
   X=X Mouse
   Y=Y Mouse
   XM=X Screen(X)
   YM=Y Screen(Y)
   U=Point(XM,YM)
   C=Colour(U)
   Screen 1
   Home 
   Locate 7,0
   Print C;"   "
   Locate 24,0
   Print U;"   "
Loop 
HELPME:
   If Asc(K$)=0 Then INFO
   If K$="l"
      Screen 0
      LODER
      If F$<>""
         SCR_SETUP
      End If 
   End If 
   If K$="m" Then MOUSE_CHANGE
   If Asc(K$)=31 Then SCR_DOWN
   If Asc(K$)=30 Then SCR_UP
   If K$="q" Then FINALE_ROUTINE
Return 
'  
Procedure LODER
   On Error Goto ROP
   WAL:
      F$=Fsel$("","","Select an IFF picture","(e.g. the type used by Deluxe Paint)")
      If F$="" and LEED=False
         Screen Close 1
         End 
      End If 
      If F$="" and LEED=True Then Goto NOB
      Load Iff F$,0
      Limit Mouse 0,0 To 700,600
      Screen 0
      COOL=Screen Colour
      Goto NOB
   ROP:
      Screen 1 : Cls : Pen 2 : Home : Print "Choose an IFF picture!"
      Pen 4 : Locate 62,0 : Print "(MB to try again)"
      Repeat : Until Mouse Key
      Cls 
      Resume WAL
   NOB:
      Screen 1
      Screen To Front 1
      LEED=True
End Proc
'
Procedure SCR_SETUP
   Screen 1
   Locate 8,0
   Print "0    "
   Locate 25,0
   Print "0    "
   Locate 47,0
   Pen 2
   Print COOL;"   "
   Pen 2
   Locate 62,0
   Print Chip Free
End Proc
'
Procedure INFO
   Screen Hide 0
   DY=289
   Screen Display 1,143,DY,640,10
   Screen Open 3,320,200,32,Lowres
   Colour 1,0
   Curs Off 
   Screen To Front 3
   Screen 3
   Wind Open 1,40,40,30,16,1
   Colour 1,3
   Curs Pen 1
   Colour 4,4085
   Colour 5,3618
   Colour 7,3725
   Colour 6,2446
   Colour 11,15
   Pen 4
   Under On 
   Centre "Help and Information"
   Under Off 
   Cdown : Cdown : Cdown 
   Pen 7
   Centre "PIXEL READER V1.0"
   Cdown : Cdown 
   Pen 5
   Centre "by Ivor King" : Cdown 
   Centre "completed 13/7/92"
   Cdown : Cdown 
   Pen 6
   Centre "Please spread this disk"
   Cdown : Centre "around as much as possible"
   Cdown : Centre "It is Public Domain, and was"
   Centre "programmed in"
   Pen 5 : Cdown 
   Centre "AMOS"
   Repeat : Until Mouse Key
   Clw 
   Pen 4
   Under On 
   Home 
   Print "Keypress..."
   Under Off 
   Cdown 
   Pen 6
   Centre "`p' - print colour stats"
   Cdown : Centre "`m' - change mouse type"
   Cdown : Centre "`l' - load another picture"
   Cdown : Centre "HELP - help and info (this)"
   Cdown : Centre "Up Arrow - move info bar up"
   Cdown : Centre "Down Arrow - move it down"
   Cdown : Centre "`q' - to quit"
   Cdown : Cdown 
   Repeat : Wait 2 : Until Mouse Key
   Clw 
   Pen 4
   Cdown : Cdown : Cdown 
   Centre "NOTE: if you press `p', to"
   Cdown : Centre "print a value to the"
   Cdown : Centre "printer, make sure your"
   Cdown : Centre "printer is READY, or the"
   Cdown : Centre "computer will FREEZE UP!"
   Repeat 
      Wait 2
   Until Mouse Key
   Clw 
   Pen 5
   Cdown : Cdown : Cdown 
   Centre "Read the DOCS on disk "
   Cdown : Centre "for more info, and please"
   Cdown : Centre "make sure they STAY on the"
   Cdown : Centre "disk with THIS PROGRAM!"
   Repeat 
      Wait 2
   Until Mouse Key
   Clw 
   Pen 4
   Centre "Contact me at:"
   Cdown : Centre "23 Waterford ave. Waterford"
   Cdown : Centre "W.A. 6152, ph. (09) 4505495"
   Cdown : Cdown 
   Pen 11
   Centre "I hope you find this program"
   Cdown : Centre "very useful!"
   Cdown : Cdown : Cdown : Centre "MB to go on..."
   Repeat 
      Wait 2
   Until Mouse Key
   Wind Close 
   Screen Close 3
   Screen Show 0
End Proc
'
Procedure SCR_UP
   If DY-10>35
      DY=DY-10
      Screen Display 1,143,DY,640,10
   End If 
End Proc
'
Procedure MOUSE_CHANGE
   If MOUSE+1=4
      MOUSE=0
   End If 
   Inc MOUSE
   Change Mouse MOUSE
End Proc
'
Procedure SCR_DOWN
   If DY+10<299
      DY=DY+10
      Screen Display 1,143,DY,640,10
   End If 
End Proc
'
Procedure FINALE_ROUTINE
   Screen Close 1
   Screen Close 3
   If LEED Then Screen Close 0
   End 
End Proc
'
End 
'
'
'(C) 1992 KING Software
