'**** HEADER ************************************************************
'EXDISP02.PF3 (release .02)
'Copyright (c) 1990-1991 Applied Resource Technologies, Inc.
'P.O. Box 64381, Dallas, Texas 75206 U.S.A. (214) 855-0449
'Description: Demonstrates getdsacoord()
'**** FUNCTION DECLARATIONS *********************************************
'library
external vkeybox() getdsacoord()
'core
'**** VARIABLE DECLARATIONS *********************************************
'library
public   dsa ptstr
'core
'**** CODE **************************************************************

local    row r_off col c_off new_row new_col old_scn

load "\smartii\poptools\lib\displib.psl" in-memory
load "\smartii\poptools\lib\uintlib.psl" in-memory

repaint off
screen clear box 1 1 scrheight scrwidth 0 0 no-border
while TRUE
     vkeybox(8,35,"1Animate 1Terminate",NULL)
     if ptstr == "a"
     else
          exit while
     end if
     if getdsacoord() < 0
          exit while
     end if
     row   = value(group(ptstr,1))
     r_off = value(group(ptstr,2))
     col   = value(group(ptstr,3))
     c_off = value(group(ptstr,4))
     new_col = 1
     for new_row = 1 to (scrheight-r_off)-1
          screen save new_row new_col new_row+r_off new_col+c_off old_scn
          screen restore new_row new_col dsa
          milli-wait 50
          screen shortrestore old_scn
     end for
     for new_col = 1 to (scrwidth-c_off)-1
          screen save new_row new_col new_row+r_off new_col+c_off old_scn
          screen restore new_row new_col dsa
          milli-wait 25
          screen shortrestore old_scn
     end for
     for new_row = new_row to 2 step -1
          screen save new_row new_col new_row+r_off new_col+c_off old_scn
          screen restore new_row new_col dsa
          milli-wait 50
          screen shortrestore old_scn
     end for
     for new_col = new_col to 2 step -1
          screen save new_row new_col new_row+r_off new_col+c_off old_scn
          screen restore new_row new_col dsa
          milli-wait 25
          screen shortrestore old_scn
     end for
end while

unload "displib.psl"
unload "uintlib.psl"
