REM Project: Writing
REM Created: 10/4/2006 9:39:06 PM
REM
REM ***** Main Source File *****
REM
Set display mode 640,480,32
 
Sync On
 
Ink RGB(255,255,255),1
 
` Variables
LoX = Screen Width() ; HiX = 0
LoY = Screen Height() ; HiY = 0
Borders = 0
Bact = 0
 
` Main Loop
 
 
Do
   ink RGB(0,0,0),1
   box 0,0,90,70
   ink RGB(255,255,255),1
   Set Cursor 10,10
   print "LoX = " ; LoX
   Set Cursor 10,20
   print "HiX = " ; HiX
   Set Cursor 10,30
   print "LoY = " ; LoY
   Set Cursor 10,40
   print "HiY = " ; HiY
   Set Cursor 10,50
   print x
 
   if Borders = 1
      line LoX,LoY,HiX,LoY
      line LoX,LoY,LoX,HiY
      line LoX,HiY,HiX,HiY
      line HiX,LoY,HiX,HiY
 
      x=x+1
      Get Image 1,LoX,LoY,HiX,HiY
      REM Reset Border Values
      LoX = Screen Width() ; HiX = 0
      LoY = Screen Height() ; HiY = 0
      Borders = 0
      Bact = 0
   endif
   if mouseclick() = 3
      line OldMouseX,OldMouseY,MouseX(),MouseY()
      line OldMouseX,OldMouseY+1,MouseX(),MouseY()+1
      line OldMouseX+1,OldMouseY,MouseX()+1,MouseY()
      OldMouseX = MouseX() ; OldMouseY = MouseY()
      if OldMouseX < LoX Then LoX = OldMouseX
      if OldMouseX > HiX Then HiX = OldMouseX
      if OldMouseY < LoY Then LoY = OldMouseY
      if OldMouseY > HiY Then HiY = OldMouseY
      Bact = 1
   endif
 
   if mouseclick() < 3
      OldMouseX = MouseX() ; OldMouseY = MouseY()
      if Bact = 1
         Borders = 1
      endif
   endif
   sync
Loop