home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / pascal / passrc / gembox.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-10-16  |  2.7 KB  |  110 lines

  1. (* gembox.pas - Grow-, shrink-, drag-, and rubber-box calls. *)
  2.  
  3. (*$M+,E+,R-*)
  4. PROGRAM Gem_Box ;
  5.  
  6.   CONST
  7.     (*$I gemconst.pas*)
  8.  
  9.   TYPE
  10.     (*$I gemtype.pas*)
  11.     (*$I gemhtype.pas*)
  12.  
  13.   (*$I gemhdr.pas*)
  14.  
  15.  
  16.  
  17.   (*$E-*)(* Next routine is private! *)
  18.  
  19.   PROCEDURE Box_Cmd( cmd, i1, i2, i3, i4, i5, i6, i7, i8 : integer ;
  20.                         VAR out1, out2 : integer ) ;
  21.  
  22.     VAR
  23.       int_in   : Int_In_Parms ;
  24.       int_out  : Int_Out_Parms ;
  25.       addr_in  : Addr_In_Parms ;
  26.       addr_out : Addr_Out_Parms ;
  27.  
  28.     BEGIN
  29.       int_in[0] := i1 ;
  30.       int_in[1] := i2 ;
  31.       int_in[2] := i3 ;
  32.       int_in[3] := i4 ;
  33.       int_in[4] := i5 ;
  34.       int_in[5] := i6 ;
  35.       int_in[6] := i7 ;
  36.       int_in[7] := i8 ;
  37.       AES_Call( cmd, int_in, int_out, addr_in, addr_out ) ;
  38.       out1 := int_out[1] ;
  39.       out2 := int_out[2] ;
  40.     END ;
  41.  
  42.   (*$E+*)(* Back to public routines! *)
  43.  
  44.   PROCEDURE Rubber_Box( x, y, min_w, min_h : integer ; VAR w, h : integer ) ;
  45.  
  46.     BEGIN
  47.       Box_Cmd( 70, x, y, min_w, min_h, 0, 0, 0, 0, w, h ) ;
  48.     END ;
  49.  
  50.   PROCEDURE Drag_Box( w, h, x0, y0, x_max, y_max, w_max, h_max : integer ;
  51.                         VAR x, y : integer ) ;
  52.  
  53.     BEGIN
  54.       Box_Cmd( 71, w, h, x0, y0, x_max, y_max, w_max, h_max, x, y ) ;
  55.     END ;
  56.  
  57.  
  58.  
  59.   (*$E-*)(* Another private routine! *)
  60.  
  61.   PROCEDURE Grow_Shrink( cmd, small_x, small_y, small_w, small_h,
  62.                         big_x, big_y, big_w, big_h : integer ) ;
  63.  
  64.     VAR
  65.       int_in   : Int_In_Parms ;
  66.       int_out  : Int_Out_Parms ;
  67.       addr_in  : Addr_In_Parms ;
  68.       addr_out : Addr_Out_Parms ;
  69.  
  70.     BEGIN
  71.       int_in[0] := small_x ;
  72.       int_in[1] := small_y ;
  73.       int_in[2] := small_w ;
  74.       int_in[3] := small_h ;
  75.       int_in[4] := big_x ;
  76.       int_in[5] := big_y ;
  77.       int_in[6] := big_w ;
  78.       int_in[7] := big_h ;
  79.       AES_Call( cmd, int_in, int_out, addr_in, addr_out ) ;
  80.     END ;
  81.  
  82.   (*$E+*)(* Back to the public routines! *)
  83.  
  84.   PROCEDURE Grow_Box( small_x, small_y, small_w, small_h,
  85.                         big_x, big_y, big_w, big_h : integer ) ;
  86.  
  87.     BEGIN
  88.       Grow_Shrink( 73, small_x, small_y, small_w, small_h,
  89.                 big_x, big_y, big_w, big_h ) ;
  90.     END ;
  91.  
  92.   PROCEDURE Shrink_Box( big_x, big_y, big_w, big_h,
  93.                         small_x, small_y, small_w, small_h : integer ) ;
  94.  
  95.     BEGIN
  96.       Grow_Shrink( 74, small_x, small_y, small_w, small_h,
  97.                 big_x, big_y, big_w, big_h ) ;
  98.     END ;
  99.  
  100.   PROCEDURE Move_Box( w, h, x, y, new_x, new_y : integer ) ;
  101.  
  102.     BEGIN
  103.       Grow_Shrink( 72, w, h, x, y, new_x, new_y, 0, 0 ) ;
  104.     END ;
  105.  
  106.   BEGIN
  107.   END.
  108.  
  109. (* End of gembox.pas *)
  110.