anchor.diff:      endcase
   ;
   
  -: F16
  -    16 lshift
  -;
  -
  -: rotate_around ( x y a -- )
  +: rotate_around ( x y a -- ) \ rotate sprite around (x, y)
       >r
  -    swap F16 swap F16
  +    swap 65536 * swap 65536 *
       GD.cmd_loadidentity
       2dup GD.cmd_translate
       r> GD.cmd_rotate
  
positive.code:     swap 16 + swap
  ;
  
  : turtleanim
      t 5 rshift 3 mod 50 +
  ;
  
  : turtle3  ( x y -- )
      turtleanim >r
      2dup r@ sprite
      r1 2dup r@ sprite
      r1 r> sprite
  ;
  
  : turtle2  ( x y -- )
      turtleanim >r
      2dup r@ sprite
      swap 16 + swap r> sprite
  ;
  
  : log1  ( x y -- )
      2dup            86 sprite
      r1 2dup         87 sprite
      r1              88 sprite
  ;
  
  : log ( length x y -- )
  
negative.code:     GD.calibrate
  
      game_setup
      begin
          gameloop
      again
  