³ò
¢Å)Mc        
   @   sn  d  d k  Z  d  d k l Z d e  i i i f d „  ƒ  YZ d „  Z d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ	 d d d d d
 „ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ 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 d d d d „ Z d d d „ Z d S(   iÿÿÿÿN(   t   rendert
   Transitionc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s]   
    This is the base class of most transitions. It takes care of event
    dispatching.
    c         K   s,   t  t |  ƒ i |   | |  _ t |  _ d  S(   N(   t   superR   t   __init__t   delayt   Truet   events(   t   selfR   t
   properties(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   0   s    	c         C   sH   |  i  p | i t i i i j o |  i i | | | | ƒ Sn d  Sd  S(   N(	   R   t   typet   renpyt   displayt   coret	   TIMEEVENTt
   new_widgett   eventt   None(   R   t   evt   xt   yt   st(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   5   s    #c         C   s   |  i  |  i g S(   N(   R   t
   old_widget(   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   visit<   s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   *   s   		c         C   s_   t  |  _ t i i i |  i | | | | ƒ } t i i i | i | i ƒ } | i	 | d ƒ | S(   Ni    (   i    i    (
   R   R   R
   R   R    R   t   Rendert   widtht   heightt   blit(   t   dR   R   R   t   att   surft   rv(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   null_render?   s    	t   NoTransitionc           B   s&   e  Z d  Z d d d „ Z d „  Z RS(   sø   
    This is a transition that doesn't do anything, and simply displays
    the new_widget for a specified amount of time. It's almost
    certainly not interesting by itself, but it may come in quite
    handy as part of a MultipleTransition.
    c         K   s8   t  t |  ƒ i | |  | |  _ | |  _ t |  _ d  S(   N(   R   R#   R   R   R   R   R   (   R   R   R   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   T   s    		c         C   s   t  |  | | | | ƒ S(   N(   R"   (   R   R   R   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR    [   s    N(   R   R   R   R   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR#   L   s   t   MultipleTransitionc           B   s/   e  Z d  Z d d d „ Z d „  Z d „  Z RS(   s¶  
    This is a transition that can sequence between multiple screens,
    showing a different transition between each.

    This must be supplied with a tuple containing an odd number of
    components. The first, third, and so on components are interpreted
    as screens that can be shown to the user, while the even components
    are transitions between those screens.

    A screen can be any displayable, but normally an Image or Solid is
    most appropriate. An screen can also be False to represent the screen
    we are transitioning from, or True to represent the screen we are
    transitioning to. Almost always, the first argument will be False
    and the last will be True.
    c            sv  t  | ƒ d d j p t  | ƒ d j  o t d ƒ ‚ n g  |  _ g  } | d d  d … D] } | t i i | ƒ q[ ~ |  _ ‡ ‡  f d †  } xu t |  i d | d d  d … |  i d ƒ D]F \ } } }	 | | ƒ } | |	 ƒ }	 |  i i | d | d |	 ƒ ƒ qÀ Wt	 t
 |  ƒ i t g  }
 |  i D] } |
 | i q*~
 ƒ ƒ d  |  _ d |  _ |  i d	 |  _ t |  _ d  S(
   Ni   i   i   sQ   MultipleTransition requires an odd number of arguments, and at least 3 arguments.i    c            s.   |  t  j o ˆ  Sn |  t j o ˆ Sn |  S(   N(   t   FalseR   (   t   w(   R   R   (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   oldnewz   s
    R   R   iÿÿÿÿ(   t   lent	   Exceptiont   transitionsR
   t   easyt   displayablet   screenst   zipt   appendR   R$   R   t   sumR   R   t   event_targett   time_offsetR   R%   R   (   R   t   argsR   R   t   _[1]t   iR'   t   oldt   transt   newt   _[2](    (   R   R   s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   p   s    *	=. #=		c         C   sF   g  } |  i  D]* } t | t i i i ƒ o | | q q ~ |  i S(   N(   R-   t
   isinstanceR
   R   R   t   DisplayableR*   (   R   R4   R5   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR      s    c   	      C   sT  t  i i o t |  | | | | ƒ Sn xx t op |  i d } | |  i } | | i j  o Pn t |  i ƒ d j o Pn |  i | i 7_ |  i i	 d ƒ q* Wt |  i ƒ d j o t |  _
 n | |  _ t  i i i | | | | | ƒ } | i ƒ  \ } } t  i i i | | ƒ } | i | d ƒ | d j o t  i i i |  | ƒ n | S(   Ni    i   (   i    i    (   R
   t   gamet   less_updatesR"   R   R*   R2   R   R(   t   popR   R1   R   R    t   get_sizeR   R   t   redraw(	   R   R   R   R   R   R7   t   stoffR    R!   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR    ”   s*    
	!N(   R   R   R   R   R   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR$   _   s    	c   
      C   sÞ   t  i i t ƒ } t  i i t ƒ } t  i i | ƒ } | o t  i i i | ƒ } n | p t  i i i d ƒ } n t	 | |  ƒ | g }	 | o |	 i
 | | ƒ | g ƒ n |	 i
 | | ƒ t g ƒ t |	 d | d | ƒS(   só  
    This returns an object that can be used as an argument to a with
    statement to fade the old scene into a solid color, waits for a
    given amount of time, and then fades from the solid color into
    the new scene.
    
    @param out_time:  The amount of time that will be spent
    fading from the old scene to the solid color. A float, given as
    seconds.
    
    @param hold_time:  The amount of time that will be spent
    displaying the solid color. A float, given as seconds.

    @param in_time:  The amount of time that will be spent
    fading from the solid color to the new scene. A float, given as
    seconds.
    
    @param color:  The solid color that will be fade to. A tuple containing
    three components, each between 0 or 255. This can also be None.

    @param widget: This is a widget that will be faded to, if color
    is None. This allows a fade to be to an image rather than just
    a solid color.

    If both color and widget are None, then the fade is to black.
    i    iÿ   R   R   (   i    i    i    iÿ   (   R
   t   curryt   DissolveR#   R+   t   displayable_or_noneR   t   imaget   SolidR%   t   extendR   R$   (
   t   out_timet	   hold_timet   in_timeR   R   t   colort   widgett   dissolvet   notransR3   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   Fade·   s    !t	   Pixellatec           B   s&   e  Z d  Z d d d „ Z d „  Z RS(   sµ   
    This pixellates out the old scene, and then pixellates in the new
    scene, taking the given amount of time and the given number of pixellate
    steps in each direction.
    c         K   sg   t  | ƒ } t t |  ƒ i | |  | |  _ | |  _ | |  _ | |  _ t |  _	 | d | |  _
 d  S(   Ni   (   t   floatR   RP   R   t   timet   stepsR   R   R%   R   t   quantum(   R   RR   RS   R   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   ô   s    					c         C   s‘  t  i i o t |  | | | | ƒ Sn | |  i j o& t |  _ t |  i | | | | ƒ Sn | |  i	 d } |  i
 } | |  i j o+ |  i d | d } |  i } t |  _ n t | | | | | ƒ } | i t ƒ } | i ƒ  }	 t  i i i |	 | ƒ }
 d | } t  i i i | |
 | | | | ƒ t  i i i |
 ƒ t  i i i | i | i ƒ } | i |
 d ƒ | i | ƒ t  i i i |  d ƒ | S(   Ni   i   i    (   i    i    (   R
   R<   R=   R"   RR   R   R   R    R   RT   R   RS   t   pygame_surfaceR%   R?   R   t   pgrendert   surfacet   modulet	   pixellatet   mutated_surfaceR   R   R   R   t
   depends_onR@   (   R   R   R   R   R   t   stept   visiblet   rdrR    t   sizet   newsurft   pxR!   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR      s.    			
"N(   R   R   R   R   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRP   í   s   RC   c           B   s8   e  Z d  Z d Z d „  Z d d e d „ Z d „  Z RS(   sÛ   
    This dissolves from the old scene to the new scene, by
    overlaying the new scene on top of the old scene and varying its
    alpha from 0 to 255.

    @param time: The amount of time the dissolve will take.
    i   c         C   s   | d j  o t  |  _ n d  S(   Ni   (   R%   t   alpha(   R   t   version(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   after_upgrade5  s    c         K   sJ   t  t |  ƒ i | |  | |  _ | |  _ | |  _ t |  _ | |  _ d  S(   N(	   R   RC   R   RR   R   R   R%   R   Rb   (   R   RR   R   R   Rb   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   9  s    				c   
         s  t  i i o t |  ˆ ˆ | | ƒ Sn | |  i j o& t |  _ t |  i ˆ ˆ | | ƒ Sn | |  i j  o t  i	 i i
 |  d ƒ n t d t d | |  i ƒ ƒ ‰ t |  i ˆ ˆ | | ƒ } t |  i ˆ ˆ | | ƒ } | i |  i ƒ ‰ | i |  i ƒ ‰  t | i | i ƒ ‰ t | i | i ƒ ‰ ‡  ‡ ‡ ‡ ‡ f d †  } |  i om t  i	 i i ˆ ˆ f t ƒ } | | d d ƒ t  i	 i i | ƒ t  i	 i i ˆ ˆ ƒ }	 |	 i | d ƒ n% t  i	 i i ˆ ˆ d | d t ƒ}	 |	 i | t ƒ |	 i | ƒ |	 S(   Ni    iÿ   c            s½   |  i  ƒ  \ } } t | ˆ | ƒ } t | ˆ | ƒ } | d j p | d j o d  Sn t i i i ˆ i | | | | f ƒ ˆ  i | | | | f ƒ |  i d d | | f ƒ ˆ ƒ d  S(   Ni    (   R?   t   minR
   R   RX   t   blendt
   subsurface(   t   destR   R   t   dwt   dhR&   t   h(   t   top_surfaceR   R   Rb   t   bottom_surface(    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   drawZ  s    t	   draw_funct   opaque(   i    i    (   R
   R<   R=   R"   RR   R   R   R    R   R   R@   Re   t   intR   RU   Rb   R   R   RV   RW   RZ   R   R   R[   (
   R   R   R   R   R   t   bottomt   topRn   R    R!   (    (   Rl   R   Rm   Rb   R   s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR    C  s2    	 
$N(	   R   R   R   t   __version__Rd   R   R%   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRC   *  s
   	
t   ImageDissolvec           B   sV   e  Z d  Z d Z d „  Z d „  Z d d d	 e e d	 d	 d „ Z d „  Z	 d „  Z
 RS(
   s  
    This dissolves the old scene into the new scene, using an image
    to control the dissolve process.

    A list of values is used to control this mapping. This list of
    values consists 256 fully transparent values, a ramp (of a
    specified number of steps) from full transparency to full opacity,
    and 256 fully opaque values. A 256 entry window is slid over this
    list, and the values found within are used to map the red channel
    of the image onto the opacity of the new scene.

    Basically, this means that while pixels come in first, black last,
    and the ramp controls the sharpness of the transition.
    
    @param image: The image that will be used to control this
    transition. The image should be the same size as the scene being
    dissolved.

    @param time: The amount of time the dissolve will take.

    @param ramplen: The number of pixels of ramp to use. This defaults
    to 8.

    @param ramptype: Type of alpha ramp. Possible types are: linear, cube,
    dcube, mcube. Default is linear. Non-linear types must have
    ramplen >= 8. "cube": Ease in, sharp out. "dcube": Sharp in, sharp out.
    "mcube": Ease in, ease out.

    @param ramp: If given, this is expected to be a sequence of
    integers in the range 0 to 255. This sequence explicitly gives the
    ramp to be used. If given, this overrides ramplen and ramptype.

    @param reverse: This reverses the ramp and the direction of the window
    slide. When True, black pixels dissolve in first, and while pixels come
    in last.    
    i   c         C   s   | d j  o t  |  _ n d  S(   Ni   (   R%   Rb   (   R   Rc   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRd   £  s    c         C   s|  d d } | d j	 o% x | D] } | t | ƒ 7} q Wnÿ| d j o’ | d j o{ g  } x) t | ƒ D] } | i | | | ƒ qi Wt | ƒ d } x< t | ƒ D]$ } | t t | | | ƒ ƒ 7} q¥ Wqúd } n | d j oà | d j oÉ g  } x8 t | d | | d ƒ D] } | i | | | ƒ qWt t | ƒ ƒ }	 x* t t | ƒ ƒ D] } | | c |	 7<q[Wt | ƒ d } x< t | ƒ D]$ } | t t | | | ƒ ƒ 7} q’Wqúd } n3| d	 j o%| d j o| d d } g  } x- t | d ƒ D] } | i | | | ƒ qW| d
 }	 g  }
 x | D] } |
 i | ƒ q=WxJ t d t | ƒ d ƒ D]/ } |
 i t | t | ƒ | |	 ƒ |	 ƒ qnW|
 } t | ƒ d } x< t | ƒ D]$ } | t t | | | ƒ ƒ 7} qÄWqúd } n | d j o3 x0 t | ƒ D] } | t d | | ƒ 7} qWn | d d 7} | o) t	 | ƒ } | i
 ƒ  d i | ƒ } n | S(   s'   
        Precomputes the ramp.
        t    i   t   cubei   g     ào@t   lineart   dcubei   t   mcubeiÿÿÿÿi   iÿ   s   ÿt    N(   R   t   chrt   rangeR/   t   maxRq   t   absRe   R(   t   listt   reverset   join(   R   t   ramplent   ramptypet   explicit_rampR   t   rampR5   t   tablet   scalet   adjt   tmptable(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   generate_ramp§  s|    
   &
   &
 
  - &
  
i   Rx   c
         K   s°   t  t |  ƒ i | |
  | |  _ | |  _ |	 |  _ t |  _ | |  _ t	 i
 i i | ƒ |  _ | d  j	 o t | ƒ } n |  i | | | | ƒ |  _ | d |  _ | |  _ d  S(   Ni   (   R   Ru   R   RR   R   R   R%   R   Rb   R
   R   t   imRE   R   R(   R‹   R†   RS   R   (   R   RE   RR   Rƒ   R„   R†   R   Rb   R   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   ö  s    					c         C   s   t  t |  ƒ i ƒ  |  i g S(   N(   R   Ru   R   RE   (   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR     s    c      	      sa  t  i i o t |  ˆ ˆ | | ƒ Sn | |  i j o& t |  _ t |  i ˆ ˆ | | ƒ Sn t  i	 i
 i i |  i ƒ ‰  | |  i j  o t  i	 i i |  d ƒ n t |  i | |  i ƒ } |  i o |  i | } n |  i | | d !‰ t |  i ˆ ˆ | | ƒ } t |  i ˆ ˆ | | ƒ } | i |  i ƒ ‰ | i |  i ƒ ‰ ˆ  i ƒ  \ } }	 t | i | i | ƒ ‰ t | i | i |	 ƒ ‰ ‡ ‡  ‡ ‡ ‡ ‡ f d †  }
 |  i om t  i	 i i ˆ ˆ f t ƒ } |
 | d d ƒ t  i	 i i | ƒ t  i	 i i ˆ ˆ ƒ } | i | d ƒ n% t  i	 i i ˆ ˆ d |
 d t ƒ} | i | t ƒ | i | ƒ | S(   Ni    i   c      	      sµ   |  i  ƒ  \ } } t | ˆ | ƒ } t | ˆ | ƒ } t i i i ˆ i | | | | f ƒ ˆ  i | | | | f ƒ |  i d d | | f ƒ ˆ i | | | | f ƒ ˆ ƒ d  S(   Ni    (   R?   Re   R
   R   RX   t
   imageblendRg   (   Rh   R   R   Ri   Rj   R&   Rk   (   Rl   RE   R†   R   R   Rm   (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRn   0  s    Ro   Rp   (   i    i    (    R
   R<   R=   R"   RR   R   R   R    R   R   RŒ   t   cachet   getRE   R@   Rq   RS   R   R†   R   RU   Rb   R?   Re   R   R   RV   RW   RZ   R   R   R[   (   R   R   R   R   R   R\   Rr   Rs   t   iwt   ihRn   R    R!   (    (   RE   R   R   Rl   Rm   R†   s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR      s<    	

$N(   R   R   R   Rt   Rd   R‹   R   R%   R   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRu   {  s   $		O	t   CropMovec        	   B   s8   e  Z d  Z d d d d d	 e d
 d
 d „ Z d „  Z RS(   s¯  
    The CropMove transition works by placing the old and the new image
    on two layers, called the top and the bottom. (Normally the new
    image is on the top, but that can be changed in some modes.) The
    bottom layer is always drawn in full. The top image is first
    cropped to a rectangle, and then that rectangle drawn onto
    the screen at a specified position. Start and end crop rectangles
    and positions can be selected by the supplied mode, or
    specified manually. The result is a surprisingly flexible
    transition.

    This transition has many modes, simplifying its use. We can group
    these modes into three groups: wipes, slides, and other.

    In a wipe, the image stays fixed, and more of it is revealed as
    the transition progresses. For example, in "wiperight", a wipe from left to right, first the left edge of the image is
    revealed at the left edge of the screen, then the center of the image,
    and finally the right side of the image at the right of the screen.
    Other supported wipes are "wipeleft", "wipedown", and "wipeup".

    In a slide, the image moves. So in a "slideright", the right edge of the
    image starts at the left edge of the screen, and moves to the right
    as the transition progresses. Other slides are "slideleft", "slidedown",
    and "slideup".

    There are also slideaways, in which the old image moves on top of
    the new image. Slideaways include "slideawayright", "slideawayleft",
    "slideawayup", and "slideawaydown".

    We also support a rectangular iris in with "irisin" and a
    rectangular iris out with "irisout". Finally, "custom" lets the
    user define new transitions, if these ones are not enough.
    t   fromleftg        g      ð?c
         K   sb  t  t |  ƒ i | |
  | |  _ | d j o" d } d } d } d } t } n…| d j o" d } d } d } d } t } nV| d j o" d } d } d } d  } t } n'| d j o" d! } d" } d# } d$ } t } nø| d j o" d% } d& } d' } d( } t } nÉ| d j o" d) } d* } d+ } d, } t } nš| d	 j o" d- } d. } d/ } d0 } t } nk| d
 j o" d1 } d2 } d3 } d4 } t } n<| d j o" d5 } d6 } d7 } d8 } t } n| d j o" d9 } d: } d; } d< } t } nÞ | d j o" d= } d> } d? } d@ } t } n¯ | d j o" dA } dB } dC } dD } t } n€ | d j o" dE } dF } dG } dH } t } nQ | d j o" dI } dJ } dK } dL } t } n" | d j o n t d | ƒ ‚ | |  _ | |  _ | |  _ | |  _	 | |  _
 | |  _ | |  _ | |  _ |	 |  _ t |  _ | o | |  _ |	 |  _ n |	 |  _ | |  _ d S(M   s£  
        @param time: The time that this transition will last for, in seconds.
 
        @param mode: One of the modes given above.

        The following parameters are only respected if the mode is "custom". 

        @param startcrop: The starting rectangle that is cropped out of the
        top image. A 4-element tuple containing x, y, width, and height. 
        
        @param startpos: The starting place that the top image is drawn
        to the screen at, a 2-element tuple containing x and y.

        @param endcrop: The ending rectangle that is cropped out of the
        top image. A 4-element tuple containing x, y, width, and height. 
        
        @param endpos: The ending place that the top image is drawn
        to the screen at, a 2-element tuple containing x and y.

        @param topnew: If True, the top layer contains the new
        image. Otherwise, the top layer contains the old image.
        t	   wiperightg        g      ð?t   wipeleftt   wipedownt   wipeupt
   sliderightt	   slideleftt   slideupt	   slidedownt   slideawayleftt   slideawayrightt   slideawaydownt   slideawayupt   irisoutg      à?t   irisint   customs$   Invalid mode %s passed into boxwipe.N(   g        g        (   g        g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g      ð?g        (   g      ð?g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g        g        g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g        g      ð?(   g        g      ð?g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g      ð?g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g      ð?g        (   g        g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g        g      ð?(   g        g        g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g        g      ð?g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g      ð?g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g      ð?g        (   g        g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g        g      ð?(   g        g        g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g        g      ð?g      ð?g        (   g        g        (   g        g        g      ð?g      ð?(   g      à?g      à?(   g      à?g      à?g        g        (   g        g        (   g        g        g      ð?g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g      à?g      à?(   g      à?g      à?g        g        (   R   R’   R   RR   R   R%   R)   R   t   startpost   endpost	   startcropt   endcropt   topnewR   R   R   Rr   Rs   (   R   RR   t   modeR¥   R£   R¦   R¤   R§   R   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR   r  sÐ    "	













												c            s  t  i i o t |  | | | | ƒ Sn d | |  i ‰ ˆ d j o& t |  _ t |  i | | | | ƒ Sn | | | | f ‰  ‡  ‡ f d †  } | |  i	 |  i
 ƒ } | |  i |  i ƒ } t |  i | | | | ƒ } t |  i | | | | ƒ }	 t |	 i | ƒ } t |	 i | ƒ } t  i i i | | ƒ }
 |
 i |	 d d |  i ƒ| i | d |  i ƒ} |
 i | | d |  i ƒt  i i i |  d ƒ |
 S(   Ng      ð?c      	      sT   t  g  } t |  | ˆ  ƒ D]0 \ } } } | t | | d ˆ | ˆ ƒ q ~ ƒ S(   Ng      ð?(   t   tupleR.   Rq   (   t   t0t   t1R4   t   at   bt   s(   t   scalesRR   (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   interpolate_tuple%  s    
i    t   focus(   i    i    (   R
   R<   R=   R"   RR   R   R   R    R   R¥   R¦   R£   R¤   Rs   Rr   Re   R   R   R   R   R   R§   Rg   R@   (   R   R   R   R   R   R°   t   cropt   posRs   Rr   R!   t   ss(    (   R¯   RR   s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR      s(    	(   g        g        g        g      ð?(   g        g        (   g        g        g      ð?g      ð?(   g        g        N(   R   R   R   R   R   R   R    (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyR’   O  s   !œc         C   s   |  i  ƒ  \ } } } } } } } | d  j o
 d } n | d  j o
 d } n | d  j o
 d } n | d  j o
 d } n | | | | f S(   Ni    (   t   get_placementR   (   R   t   xpost   ypost   xanchort   yanchort   xoffsett   yoffsett   subpixel(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   position>  s    !



c         K   s4   |  | j o | Sn t  i i i |  | | | |  S(   N(   R
   R   t   motiont   Move(   t   pos1t   pos2R   R   t   kwargs(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   MoveFactoryN  s    c         C   s   | S(   N(    (   R³   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   default_enter_factoryT  s    c         C   s   d  S(   N(   R   (   R³   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   default_leave_factoryW  s    c   	      K   sg   d „  } t  g  } t |  | ƒ D] \ } } | | | | ƒ q  ~ ƒ }  t i i i |  | | | |  S(   Nc         S   s   |  d  j o | Sn |  S(   N(   R   (   R¬   R­   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   aorb]  s    (   R©   R.   R
   R   R¾   R¿   (	   R³   RÀ   R   R   RÂ   RÆ   R4   R¬   R­   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   MoveIn[  s    	?c   	      K   sg   d „  } t  g  } t |  | ƒ D] \ } } | | | | ƒ q  ~ ƒ }  t i i i | |  | | |  S(   Nc         S   s   |  d  j o | Sn |  S(   N(   R   (   R¬   R­   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRÆ   g  s    (   R©   R.   R
   R   R¾   R¿   (	   R³   RÀ   R   R   RÂ   RÆ   R4   R¬   R­   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   MoveOute  s    	?c         K   s¤   | \ } } } }	 t  i i i }
 | d j o> |
 |  | | | d | d t d | d | d | d |	 | Sn5 |
 |  | | | d t d | d | d | d |	 | Sd  S(   Ng      ð?t   after_childRp   R¶   R·   R¸   R¹   (   R
   R   R¾   t
   FactorZoomR%   (   t   startt   endR³   R   R   RÂ   R¶   R·   R¸   R¹   RÊ   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt	   ZoomInOuto  s     c         K   s%   t  i i i |  | | | d | | S(   NR³   (   R
   R   R¾   t   Revolve(   RË   RÌ   R³   R   R   RÂ   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   RevolveInOut|  s    t   masterc   	         sˆ   ˆ d j o
 t ‰ n ˆ d j o
 t ‰ n ˆ d j o
 t ‰ n | ‰ ‡  ‡ ‡ ‡ ‡ ‡ ‡ f d †  ‰ ˆ | | ƒ } ˆ | _ | S(   s„  
    This transition 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.

    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.

    If you use this transition to slide an image off the side of the
    screen, remember to hide it when you are done.

    factory is a function that takes the old position, the new position, the
    delay time, and the displayable, and returns a new displayable that
    performs the move.
    c            s?  t  | t i i i ƒ p  | i d  j ok | i d  j o[ ˆ o
 |  } n | } t |  ƒ t | ƒ j o# ˆ t |  ƒ t | ƒ ˆ | ƒ Sq• | Sn | i o¾ t i i i d d ƒ } h  | _ x’ t i	 i D]„ } | i | } t  | t i i i ƒ o> | ˆ  j o1 | i
 d  j	 o! ˆ |  i | | i | ƒ } n | | i | <| i | ƒ qÍ W| Sn d „  } d „  } d „  } t ƒ  }	 g  }
 | i
 } x; | i
 D]0 } | | ƒ } | d  j	 o |	 i | ƒ q›q›Wx¡|  i
 D]–} | | ƒ } | | ƒ } | |	 j o^ ˆ t | ƒ ˆ | ƒ } | d  j o qÙn t i i i | ƒ } |
 i | | | ƒ ƒ qÙn x— | o | i d ƒ } | | ƒ } | | ƒ } |	 i | ƒ | | j o Pn ˆ t | ƒ ˆ | ƒ } | d  j o qen |
 i | | | ƒ ƒ qeqeW| | j of ˆ o
 | } n | } ˆ t | ƒ t | ƒ ˆ | ƒ } | d  j o qÙn |
 i | | | ƒ ƒ qÙqÙWxx | op | i d ƒ } | | ƒ } | | ƒ } ˆ t | ƒ ˆ | ƒ } | d  j o qvn |
 i | | | ƒ ƒ qvqvW| i } t i i i d d d | t i i i |  } | i |
 ƒ | | _ | S(   Nt   layoutt   fixedc         S   s.   |  \ } } } } } t  i i i | | | ƒ S(   N(   R
   R   RÑ   t   AdjustTimes(   t   slet   keyt   zorderR   R   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   wrapÒ  s    c         S   s-   |  d d  j o |  d } n |  d } | S(   Ni    i   (   R   (   RÔ   t   tag(    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRØ   Ö  s    
c         S   s   |  d |  d d |  d | f S(   Ni    i   i   (    (   RÔ   R   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   mergeÞ  s    i    R±   (   R:   R
   R   RÑ   t   MultiBoxt   layersR   t
   layer_nameR½   t   configt
   scene_listt   addt   sett   IgnoresEventsR/   R>   t   discardR<   t	   interfacet   layer_propertiest   append_scene_list(   R6   R8   t   childR!   t   layert   fR×   RØ   RÙ   t   new_tagst   rv_slt   new_scene_listt   new_slet   new_tagt   old_slet   old_tagt   old_dt   movet   new_d(   RÛ   t   factoryR   t   enter_factoryt   use_oldt   merge_slidet   leave_factory(    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyRö     s      
	
	 !				

 
 

!
	.	N(   R   RÃ   RÄ   RÅ   R   (	   R   R   R   Ró   Rô   R÷   R6   RÛ   R!   (    (   RÛ   Rô   R÷   Ró   R   Rõ   Rö   s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   MoveTransition€  s    


!›	c         C   sk   | d  j	 o | d | d | ƒ } n | } | d  j	 o | d | d | ƒ } n | } |  d | d | ƒ S(   NR   R   (   R   (   R7   t   beforet   afterR   R   R6   R8   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   ComposeTransition?  s    c      
   K   sÕ   |  \ } } } } t  i i i |  | ƒ }	 t  i i i |  | ƒ }
 | d |	 d |
 ƒ } | i } t  i i i | d | d | d d d d ƒ} t  i i i d d	 ƒ } | i | ƒ | i | ƒ t | d | d | ƒS(
   NR   R   R¶   R·   R¸   i    R¹   RÑ   RÒ   (	   R
   R   RÑ   t   LiveCropR   t   PositionRÚ   Rß   R#   (   t   rectR7   R   R   R   R   R   R&   Rk   R6   R8   t   innerR   Rè   (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pyt   SubTransitionL  s    	-(   R
   t   renpy.display.renderR    R   R   R;   R   R"   R#   R$   R   RO   RP   RC   Ru   R’   R½   RÃ   RÄ   RÅ   RÇ   RÈ   RÍ   RÏ   R%   Rø   Rû   R   (    (    (    s@   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\display\transition.pys   <module>&   s.   	Y3=QÔï					
	
		!¿