ó

ƒŒ\c        
   @  sØ   d  d l  m Z d  d l Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z d d d d d e d g d „ Z d e j j j f d „  ƒ  YZ d d d d e d g d d d d „	 Z d S(   iÿÿÿÿ(   t   print_functionNc         C  s…   |  j  ƒ  \ } } } } } } } | d  k r6 d } n  | d  k rK d } n  | d  k r` d } n  | d  k ru d } n  | | | | f S(   Ni    (   t   get_placementt   None(   t   dt   xpost   ypost   xanchort   yanchort   _xoffsett   _yoffsett	   _subpixel(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   position"   s    !				c         C  sG   |  j  ƒ  \ } } } } } } } t j j r? i | d 6| d 6Si  Sd  S(   Nt   xoffsett   yoffset(   R   t   renpyt   configt   movetransition_respects_offsets(   R   t   _xpost   _ypost   _xanchort   _yanchorR   R   R
   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   offsets2   s    !c         K  s/   |  | k r | St  j j j |  | | | |  S(   N(   R   t   displayt   motiont   Move(   t   pos1t   pos2t   delayR   t   kwargs(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   MoveFactory=   s    c         K  s   | S(   N(    (   t   posR   R   R   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   default_enter_factoryD   s    c         K  s   d  S(   N(   R   (   R   R   R   R   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   default_leave_factoryH   s    c         K  s_   d „  } t  g  t |  | ƒ D] \ } } | | | ƒ ^ q ƒ }  t j j j |  | | | |  S(   Nc         S  s   |  d  k r | S|  S(   N(   R   (   t   at   b(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   aorbP   s    (   t   tuplet   zipR   R   R   R   (   R   R   R   R   R   R#   R!   R"   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   MoveInN   s    	7c         K  s_   d „  } t  g  t |  | ƒ D] \ } } | | | ƒ ^ q ƒ }  t j j j | |  | | |  S(   Nc         S  s   |  d  k r | S|  S(   N(   R   (   R!   R"   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR#   [   s    (   R$   R%   R   R   R   R   (   R   R   R   R   R   R#   R!   R"   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   MoveOutY   s    	7c         K  sŸ   | \ } } } }	 t  j j j }
 | d k rg |
 |  | | | d | d t d | d | d | d |	 | S|
 |  | | | d t d | d | d | d |	 | Sd  S(   Ng      ð?t   after_childt   opaqueR   R   R   R   (   R   R   R   t
   FactorZoomt   False(   t   startt   endR   R   R   R   R   R   R   R   R*   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt	   ZoomInOutd   s    c         K  s%   t  j j j |  | | | d | | S(   NR   (   R   R   R   t   Revolve(   R,   R-   R   R   R   R   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   RevolveInOutr   s    t   masterc   	        s‚   ˆ d k r t ‰ n  ˆ d k r* t ‰ n  ˆ d k r? t ‰ n  | ‰ ‡  ‡ ‡ ‡ ‡ ‡ ‡ f d †  ‰ ˆ | | ƒ } ˆ  | _ | S(   s  
    Returns a transition that attempts to find images that have changed
    position, and moves them from the old position to the new transition, taking
    delay seconds to complete the move.

    If `factory` is given, it is expected to be a function that takes as
    arguments: an old position, a new position, the delay, and a
    displayable, and to return a displayable as an argument. If not
    given, the default behavior is to move the displayable from the
    starting to the ending positions. Positions are always given as
    (xpos, ypos, xanchor, yanchor) tuples.

    If `enter_factory` or `leave_factory` are given, they are expected
    to be functions that take as arguments a position, a delay, and a
    displayable, and return a displayable. They are applied to
    displayables that are entering or leaving the scene,
    respectively. The default is to show in place displayables that
    are entering, and not to show those that are leaving.

    If `old` is True, then factory moves the old displayable with the
    given tag. Otherwise, it moves the new displayable with that
    tag.

    `layers` is a list of layers that the transition will be applied
    to.

    Images are considered to be the same if they have the same tag, in
    the same way that the tag is used to determine which image to
    replace or to hide. They are also considered to be the same if
    they have no tag, but use the same displayable.

    Computing the order in which images are displayed is a three-step
    process. The first step is to create a list of images that
    preserves the relative ordering of entering and moving images. The
    second step is to insert the leaving images such that each leaving
    image is at the lowest position that is still above all images
    that were below it in the original scene. Finally, the list
    is sorted by zorder, to ensure no zorder violations occur.

    If you use this transition to slide an image off the side of the
    screen, remember to hide it when you are done. (Or just use
    a leave_factory.)
    c           sx  t  | t j j j ƒ s7 | j d  k r“ | j d  k r“ ˆ rF |  } n | } t |  ƒ } t | ƒ } | | k rŒ ˆ | | ˆ | t	 | ƒ  S| Sn  | j rRt j j j d d ƒ } i  | _ xŽ t j
 j D]€ } | j | } t  | t j j j ƒ r0| ˆ	 k r0| j d  k	 r0ˆ |  j | | j | ƒ } n  | | j | <| j | ƒ qÊ W| Sd „  ‰ d „  ‰ d „  ‰  ‡ ‡ ‡  ‡ ‡ ‡ f d †  } ‡ ‡
 ‡  ‡ ‡ ‡ f d †  }	 ‡ ‡ ‡  ‡ ‡ ‡ f d †  }
 |  j } | j } g  ‰ t ‡ f d	 †  | Dƒ ƒ } t ‡ f d
 †  | Dƒ ƒ } t ƒ  } xï | s1| r| r¥| d ‰ ˆ ˆ ƒ } | | k rl| j d ƒ q%n  | | k r¥|	 ˆ ƒ | j | ƒ | j d ƒ q%q¥n  | j d ƒ ‰ ˆ ˆ ƒ } | | k rö| | ‰ |
 ˆ ˆ ƒ | j | ƒ q%q%| ˆ ƒ | j | ƒ q%q%Wˆ j d d „  ƒ | j } t j j j d d d | t j j j |  } | j ˆ ƒ | | _ | S(   Nt   layoutt   fixedc         S  s"   t  j j j |  j |  j |  j ƒ S(   N(   R   R   R2   t   AdjustTimest   displayablet	   show_timet   animation_time(   t   sle(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   wrapå   s    c         S  s   |  j  p |  j S(   N(   t   tagR5   (   R8   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR:   è   s    c         S  s"   |  j  ƒ  } d | _ | | _ | S(   Ni    (   t   copyR6   R5   (   R8   R   t   rv(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   mergeë   s    		c           sW   ˆ ˆ ƒ } ˆ t  | ƒ ˆ  | t | ƒ  } | d  k r= d  Sˆ j ˆ ˆ | ƒ ƒ d  S(   N(   R   R   R   t   append(   R8   t   new_dt   move(   R   t   enter_factoryR=   t   new_slet   rv_slR9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   enteringñ   s
    !c           sl   ˆ |  ƒ } ˆ t  | ƒ ˆ  | t | ƒ  } | d  k r= d  St j j j | ƒ } ˆ j ˆ ˆ | ƒ ƒ d  S(   N(   R   R   R   R   R   R2   t   IgnoresEventsR>   (   R8   t   old_dR@   (   R   t   leave_factoryR=   t   old_sleRC   R9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   leavingú   s    !c           s   ˆ |  ƒ } ˆ | ƒ } ˆ r' | } n | } ˆ t  | ƒ t  | ƒ ˆ  | t | ƒ  } | d  k rg d  Sˆ j ˆ | | ƒ ƒ d  S(   N(   R   R   R   R>   (   RH   RB   RF   R?   t   childR@   (   R   t   factoryR=   RC   t   use_oldR9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   moving  s    	*c         3  s-   |  ]# } | d  k	 r ˆ  | ƒ | f Vq d  S(   N(   R   (   t   .0t   i(   R:   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pys	   <genexpr>  s    c         3  s'   |  ] } | d  k	 r ˆ  | ƒ Vq d  S(   N(   R   (   RN   RO   (   R:   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pys	   <genexpr>  s    i    t   keyc         S  s   |  j  S(   N(   t   zorder(   R!   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   <lambda>G  s    t   focus(   t
   isinstanceR   R   R2   t   MultiBoxt   layersR   t
   layer_nameR   R   R   t
   scene_listt   addt   dictt   sett   popt   sortt   gamet	   interfacet   layer_propertiest   append_scene_list(   t   oldt   newRJ   t   old_post   new_posR<   t   layert   fRD   RI   RM   t   old_slt   new_slt   old_mapt   new_tagst   rv_tagst   old_tagt   new_tag(   R   RA   RK   RV   RG   t   merge_slideRL   (   R=   RB   RH   RC   R:   R9   su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRo   ®   s„    			 				


	

	

	.	N(   R   R   R   R    R   (	   R   t
   old_widgett
   new_widgetRK   RA   RG   Rb   RV   R<   (    (   R   RA   RK   RV   RG   Ro   RL   su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   OldMoveTransitionv   s    -			!¤	t   MoveInterpolatec           B  s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s‡   
    This displayable has two children. It interpolates between the positions
    of its two children to place them on the screen.
    c         C  sq   t  t |  ƒ j ƒ  | |  _ | |  _ | |  _ | |  _ d |  _ d |  _ d |  _	 d |  _
 | |  _ d |  _ d  S(   Ni    (   t   superRs   t   __init__Rb   Rc   RL   t	   time_warpt   screen_widtht   screen_heightt   child_widtht   child_heightR   t   st(   t   selfR   Rb   Rc   RL   Rv   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRu   a  s    									c         C  sÂ   | |  _  | |  _ t j j j |  j | | | | ƒ } t j j j |  j | | | | ƒ } |  j rl | } n | } | j ƒ  \ |  _	 |  _
 | |  _ |  j |  j k  r¾ t j j j |  d ƒ n  | S(   Ni    (   Rw   Rx   R   R   t   renderRb   Rc   RL   t   get_sizeRy   Rz   R{   R   t   redraw(   R|   t   widtht   heightR{   t   att   old_rt   new_rt   cr(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR}   z  s    		$$			c   
      C  s‹   d „  } | j  ƒ  \ } } } } } } }	 | | |  j ƒ } | | |  j ƒ } | | |  j ƒ } | | |  j ƒ } | | | | | | |	 f S(   Nc         S  sK   |  d  k r d St |  t ƒ r# |  St |  t j j j ƒ r? |  S|  | Sd  S(   Ni    (   R   RT   t   intR   R   t   coret   absolute(   t   vt   base(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   based  s    (   R   Rw   Rx   Ry   Rz   (
   R|   RJ   R‹   R   R   R   R   R   R   t   subpixel(    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   child_placementŽ  s    	
!c           s:  |  j  |  j k r d ‰ n |  j  |  j ‰ |  j d  k	 rL |  j ˆ ƒ ‰ n  t j j j ‰  ‡  ‡ f d †  } |  j |  j	 ƒ \ } } } } } } } |  j |  j
 ƒ \ }	 }
 } } } } } | | |	 ƒ } | | |
 ƒ } | | | ƒ } | | | ƒ } | | | ƒ } | | | ƒ } | p| } | | | | | | | f S(   Ng      ð?c           s   ˆ  |  ˆ | |  ƒ S(   N(    (   R!   R"   (   Rˆ   t   done(    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   I¯  s    (   R{   R   Rv   R   R   R   R‡   Rˆ   R   Rb   Rc   (   R|   R   t   old_xpost   old_ypost   old_xanchort   old_yanchort   old_xoffsett   old_yoffsett   old_subpixelt   new_xpost   new_ypost   new_xanchort   new_yanchort   new_xoffsett   new_yoffsett   new_subpixelR   R   R   R   R   R   RŒ   (    (   Rˆ   RŽ   su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR   £  s"    	''(   t   __name__t
   __module__t   __doc__Ru   R}   R   R   (    (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRs   [  s
   			c
           sI   | ‰ ‡  ‡ ‡ ‡ ‡ ‡ ‡ ‡ f d †  }
 |
 | | |
 ƒ } ˆ  | _  | S(   s  
    :doc: transition function
    :args: (delay, enter=None, leave=None, old=False, layers=['master'], time_warp=None, enter_time_warp=None, leave_time_warp=None)
    :name: MoveTransition

    Returns a transition that interpolates the position of images (with the
    same tag) in the old and new scenes.

    `delay`
        The time it takes for the interpolation to finish.

    `enter`
        If not None, images entering the scene will also be moved. The value
        of `enter` should be a transform that is applied to the image to
        get its starting position.

    `leave`
        If not None, images leaving the scene will also be move. The value
        of `leave` should be a transform that is applied to the image to
        get its ending position.

    `old`
        If true, the old image will be used in preference to the new one.

    `layers`
        A list of layers that moves are applied to.

    `time_warp`
        A time warp function that's applied to the interpolation. This
        takes a number between 0.0 and 1.0, and should return a number in
        the same range.

    `enter_time_warp`
        A time warp function that's applied to images entering the scene.

    `leave_time_warp`
        A time warp function that's applied to images leaving the scene.

    c           sE  t  | t j j j ƒ s7 | j d  k r` | j d  k r` |  | k rG | St ˆ |  | ˆ ˆ ƒ Sn  | j r"t j j j d d ƒ } i  | _ x‘ t j	 j D]ƒ } | j | } t  | t j j j ƒ r | ˆ	 k r | j
 d  k	 r | |  j | | j | | ƒ } n  | | j | <| j | ƒ q— W| Sd „  ‰ d „  ‰ d „  ‰  ‡ ‡ ‡ ‡  ‡ ‡ ‡ f d †  } ‡ ‡
 ‡ ‡  ‡ ‡ ‡ f d †  } ‡ ‡  ‡ ‡ ‡ ‡ f d †  } |  j
 }	 | j
 }
 g  ‰ t ‡ f d	 †  |	 Dƒ ƒ } t ‡ f d
 †  |
 Dƒ ƒ } t ƒ  } xï |	 s|
 ré|	 r{|	 d ‰ ˆ ˆ ƒ } | | k rB|	 j d ƒ qûn  | | k r{| ˆ ƒ | j | ƒ |	 j d ƒ qûq{n  |
 j d ƒ ‰ ˆ ˆ ƒ } | | k rÌ| | ‰ | ˆ ˆ ƒ | j | ƒ qûqû| ˆ ƒ | j | ƒ qûqûWˆ j d d „  ƒ | j } t j j j d d d | t j j j |  } | j ˆ ƒ | S(   NR2   R3   c         S  s"   t  j j j |  j |  j |  j ƒ S(   N(   R   R   R2   R4   R5   R6   R7   (   R8   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR9     s    c         S  s   |  j  p |  j S(   N(   R:   R5   (   R8   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR:     s    c         S  s"   |  j  ƒ  } d | _ | | _ | S(   Ni    (   R;   R6   R5   (   R8   R   R<   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyR=     s    		c           sN   ˆ s
 d  Sˆ ˆ ƒ } t  ˆ  ˆ | ƒ | t ˆ ƒ } ˆ j ˆ ˆ | ƒ ƒ d  S(   N(   Rs   R+   R>   (   R8   R?   R@   (   R   t   entert   enter_time_warpR=   RB   RC   R9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRD   $  s
    c           sc   ˆ s
 d  Sˆ |  ƒ } t  ˆ  | ˆ | ƒ t ˆ ƒ } t j j j | ƒ } ˆ j ˆ ˆ | ƒ ƒ d  S(   N(   Rs   t   TrueR   R   R2   RE   R>   (   R8   RF   R@   (   R   t   leavet   leave_time_warpR=   RH   RC   R9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRI   -  s    c           sm   |  j  | j  k r# ˆ j | ƒ d  Sˆ |  ƒ } ˆ | ƒ } t ˆ  | | ˆ ˆ ƒ } ˆ j ˆ | | ƒ ƒ d  S(   N(   R5   R>   Rs   (   RH   RB   RF   R?   R@   (   R   R=   RC   Rv   RL   R9   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRM   7  s    c         3  s-   |  ]# } | d  k	 r ˆ  | ƒ | f Vq d  S(   N(   R   (   RN   RO   (   R:   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pys	   <genexpr>J  s    c         3  s'   |  ] } | d  k	 r ˆ  | ƒ Vq d  S(   N(   R   (   RN   RO   (   R:   (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pys	   <genexpr>K  s    i    RP   c         S  s   |  j  S(   N(   RQ   (   R!   (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRR   x  s    RS   (   RT   R   R   R2   RU   RV   R   RW   Rs   R   RX   RY   RZ   R[   R\   R]   R^   R_   R`   Ra   (   Rb   Rc   Ro   R<   Rf   Rg   RD   RI   RM   Rh   Ri   Rj   Rk   Rl   Rm   Rn   (   R   R¡   R¢   RV   R¤   R¥   Rv   RL   (   R=   RB   RH   RC   R:   R9   su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyRo   ë  sp    
		#			!	!


	

	

	.(   R   (   R   Rp   Rq   R¡   R¤   Rb   RV   Rv   R¢   R¥   Ro   R<   (    (   R   R¡   R¢   RV   R¤   R¥   Rv   RL   su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   MoveTransitionÀ  s
    )$–	(   t
   __future__R    t   renpy.displayR   R   R   R   R   R    R&   R'   R.   R0   R   R+   Rr   R   R‡   t   DisplayableRs   R¦   (    (    (    su   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\movetransition.pyt   <module>   s   									!åe