³ò
bætMc           @   s«   d  d k  Z  e e d d „ Z h  h  h  e d e h  h  h  d d d „ Z d e f d „  ƒ  YZ e d e d „ Z e ƒ  Z	 d e f d „  ƒ  YZ
 e	 d d	 „ Z d
 „  Z d S(   iÿÿÿÿNc   
      K   sØ   g  }	 d | j o |	 i  | d ƒ n$ |	 i  t t i i | d ƒ i ƒ | o |	 i  t i i i i ƒ n | o4 | d j o# |	 i  t i i i	 |  t
 ƒ ƒ qª n | o# |	 i  t i i i	 | t
 ƒ ƒ n |	 S(   s  
    This is the default function used by Character to predict images that
    will be used by show_display_say. It's called with more-or-less the
    same parameters as show_display_say, and it's expected to return a
    list of images used by show_display_say.
    t
   backgroundt   styles	   <Dynamic>(   t   appendt   getattrt   renpyt   gameR   R    t   say_who_windowt   displayt   imt   imaget   True(
   t   whot   whatt   who_argst	   what_argst   window_argsR	   t
   two_windowt
   side_imaget   kwargst   rv(    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   predict_show_display_say   s    #'#c            sW  ‡  ‡ ‡ f d †  } ‡ f d †  } ‡ f d †  } | ˆ ƒ ‰ | | ƒ } | | ƒ } | o t  i i | ƒ n | o= t  i i | d | ƒ   t  i i | d |	 ƒ   | ƒ  n t  i i |   t  i i | d |
 ƒ   | p | ƒ  n t  i i | |  } t  i i ƒ  | o t  i i ƒ  n | o t  i i | ƒ n t  i i	 ƒ  | S(   sA  
    This is called (by default) by renpy.display_say to add the
    widgets corresponding to a screen of dialogue to the user. It is
    not expected to be called by the user, but instead to be called by
    display_say, or by a function passed as the show_function argument
    to Character or display_say.

    @param who: The name of the character that is speaking, or None to
    not show this name to the user.

    @param what: What that character is saying. Please not that this
    may not be a string, as it can also be a list containing both text
    and displayables, suitable for use as the first argument of ui.text().

    @param who_args: Additional keyword arguments intended to be
    supplied to the ui.text that creates the who widget of this dialogue.

    @param what_args: Additional keyword arguments intended to be
    supplied to the ui.text that creates the what widget of this dialogue.

    @param window_args: Additional keyword arguments intended to be
    supplied to the ui.window that creates the who widget of this
    dialogue.

    @param image: If True, then who should be interpreted as an image
    or displayable rather than a text string.

    @param kwargs: Additional keyword arguments should be ignored.

    This function is required to return the ui.text() widget
    displaying the what text.
    c              sU   ˆ oJ ˆ  o, t  i i t  i i i ˆ d t ˆ ƒ qQ t  i i ˆ ˆ  n d  S(   Nt   loose(   R   t   uit   addR   R   R	   R
   t   text(    (   R	   R   R   (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt
   handle_who^   s    ,c            s‚   t  |  t ƒ o t t i i |  ƒ }  n ˆ  d  j	 o |  ˆ  }  n t i i ƒ  o |  d }  n t	 d |  ƒ } | i
 | ƒ | S(   Nt   rollbackR   (   t
   isinstancet
   basestringR   R   t   storeR   t   Nonet   exportst   in_rollbackt   dictt   update(   R   t
   propertiesR   (   t   variant(    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   merge_stylee   s    c            s¹   d |  j o |  Sn t  i i ƒ  } | o ˆ  o |  Sn |  i ƒ  }  |  d } t | t ƒ oI t t  i i | ƒ } ˆ  d  j	 o | ˆ  } n | o | d } q« n | |  d <|  S(   NR   R   (
   R   R   R    t   copyR   R   R   R   R   R   (   t   dR    R   (   R$   (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt
   style_argst   s    

t   say_two_window_vboxR   t   say_vbox(
   R   R   t   att   vboxt   windowR   t   closeR	   R   t   shown_window(   R   R   R   R   R   R	   R   R   t   two_window_vbox_propertiest   who_window_propertiest   say_vbox_propertiest	   transformR$   R   R   R%   R(   R   (    (   R	   R   R$   R   s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   show_display_say5   s0    )t   SlowDonec           B   s   e  Z d  „  Z d „  Z RS(   c         C   s:   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ d  S(   N(   t   ctct   ctc_positiont   callbackt   interactt   typet   cb_args(   t   selfR6   R7   R8   R9   R:   R;   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   __init__¹   s    					c         C   sx   |  i  o4 |  i d j o$ t i i |  i  ƒ t i i ƒ  n x3 |  i D]( } | d d |  i d |  i	 |  i
 qH Wd  S(   Nt   fixedt	   slow_doneR9   R:   (   R6   R7   R   R   R   R   t   restart_interactionR8   R9   R:   R;   (   R<   t   c(    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   __call__Á   s    
 (   t   __name__t
   __module__R=   RB   (    (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyR5   ¸   s   	c         C   s°  | o+ t  i i d j o t  i i d  ƒ d  Sn |
 d  j o* t  i i o t  i i g }
 qi g  }
 n t |
 t ƒ p |
 g }
 n t  i i	 |
 }
 x' |
 D] } | d d | d | | q Wt  i i
 ƒ  o
 t } n d  } t  i i } | o
 t } nA t  i i o3 t  i i i p t  i i ƒ  i t ƒ o
 t } n | p
 t } n | o
 d  } n d } t } t } d } x| o…| o t  i i d t  i i ƒ } n d  } x' |
 D] } | d d | d | | q´W|  ƒ  } | d  j	 o? | | i j  o/ | i | d  j	 o | p | } q2| } n | } | p | p
 d  } n t  i i | ƒ } | d  j	 o | i d d ƒ } n t | | |
 | | | ƒ } | | _ | | _ | | _ | | _ | | _  | o* | d	 j o | i! i" d
 | f g ƒ n | i# d t ƒ | i$ } | | i% O} | o d  | _& n x' |
 D] } | d d | d | | q9W| o" | o | i' | i( ƒ  | ƒ n | o7 t  i i) d d d | d | ƒ } | t j o PqÃn | i* ƒ  } | o, | d 7} x t  i i+ D] } | ƒ  qíWqzqzW| ot | p | o t  i i, t ƒ q@n | t  i _ |	 d  j o t  i i- }	 n |	 o t  i i. i/ d  d  ƒ q‚n x' |
 D] } | d d | d | | q‰Wd  S(   Nt   fastt   beginR9   R:   i    t   allow_dismisst   showR6   t   nestledt   widgett
   retokenizet	   show_donet   mouset   sayt   roll_forwardi   t   end(   s   ctc(    (0   R   t   configt   skippingR   t   with_statementR   t   character_callbackR   t   listt   all_character_callbackst   roll_forward_infot   FalseR   t   after_rollbackt   preferencest   skip_unseent   contextt   seen_currentR
   R   t   saybehaviort   say_allow_dismisst   pausest   pause_lengthst   easyt   displayable_or_nonet   parameterizeR5   t   slowt
   slow_paramR?   t
   slow_startt   pauset   tokensR   R"   t   keep_pausingt   no_waitR6   t   set_afm_lengtht   get_simple_lengthR9   t   get_laidout_lengtht   say_sustain_callbackst
   checkpointt   implicit_with_nonet	   interfacet   do_with(   t   show_functionR9   Re   t   afmR6   t	   ctc_pauseR7   t   all_at_onceR;   t	   with_noneR8   R:   Rp   t   ctc_timedpauset	   ctc_forceRA   RO   RY   Rh   Rk   t   keep_interactingRg   t   behaviort	   what_textt   what_ctcR?   R   t   i(    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   display_sayÍ   s²    
 





 	

						 !	
  t   ADVCharacterc           B   s†   e  Z d  Z d d d d d g Z e d d „ Z e d „ Z d „  Z d	 „  Z	 d
 „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sE  
    The character object contains information about a character. When
    passed as the first argument to a say statement, it can control
    the name that is displayed to the user, and the style of the label
    showing the name, the text of the dialogue, and the window
    containing both the label and the dialogue.
    t   what_prefixt   what_suffixt
   who_prefixt
   who_suffixRt   c   	         s…  ˆ  d  j o t i i ‰  n | t j	 o | ˆ d <n ‡ ‡  f d †  } ‡  ‡ f d †  } | d ƒ |  _ | d ƒ |  _ | d ƒ |  _ | d ƒ |  _ | d ƒ |  _	 | d ƒ |  _
 | d	 ƒ |  _ | d
 ƒ |  _ | d ƒ |  _ t d | d ƒ d | d ƒ d | d ƒ d t i i | d ƒ ƒ d t i i | d ƒ ƒ d t i i | d ƒ ƒ d | d ƒ d | d ƒ d | d ƒ d | d ƒ d | d ƒ ƒ |  _ ˆ  o^ ˆ  i i ƒ  |  _ ˆ  i i ƒ  |  _ ˆ  i i ƒ  |  _ ˆ  i i ƒ  |  _ ˆ  i i ƒ  |  _ n. h  |  _ h  |  _ h  |  _ h  |  _ h  |  _ d ˆ j o ˆ i d ƒ |  i d <n d ˆ j o ˆ i d ƒ |  i d <n xt ˆ ƒ D]ù } d | j oÕ | i d d ƒ \ } } | d j o ˆ | |  i | <q„ql| d j o ˆ | |  i | <q„ql| d j o ˆ | |  i | <q„ql| d j o ˆ | |  i | <q„ql| d j o ˆ | |  i | <q„qln ˆ | |  i | <q„Wd  S(    Nt   namec            s/   |  ˆ  j o ˆ  i  |  ƒ Sn t ˆ |  ƒ Sd  S(   N(   t   popR   (   t   n(   R#   t   kind(    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   v™  s    c            s-   |  ˆ j o ˆ i  |  ƒ Sn ˆ  i |  Sd  S(   N(   R‡   t   display_args(   Rˆ   (   R‰   R#   (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyR'   ¡  s    R„   R…   R‚   Rƒ   Rt   t   predict_functiont	   conditiont   dynamicR9   Re   Ru   R6   Rv   Ry   R7   Rw   Rx   R8   R:   R	   t   slow_abortablet   _i   RH   t   cbR   R-   R   (   R   R   R   t   advt   NotSetR†   R„   R…   R‚   Rƒ   Rt   RŒ   R   RŽ   R!   Rb   Rc   R‹   R   R&   R   R   t	   show_argsR;   R‡   RU   t   split(	   R<   R†   R‰   R#   RŠ   R'   t   kt   prefixt   suffix(    (   R‰   R#   s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyR=   ‹  s|    					 c         K   s   t  |  ƒ | d |  | S(   NR‰   (   R:   (   R<   R†   R#   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyR&   í  s    c         C   s   d  S(   N(    (   R<   R   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   do_addò  s    c      
   C   s1   |  i  | | d |  i d |  i d |  i |  i S(   NR   R   R   (   Rt   R   R   R   R”   (   R<   R   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   do_show÷  s    		c         C   s   d  S(   N(    (   R<   R   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   do_done  s    c         C   s   d  S(   N(    (   R<   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt	   do_extend  s    c            s    t  ‡ ‡ ‡  f d †  |  d  S(   Nc              s   ˆ  i  ˆ ˆ ƒ S(    (   Rš   (    (   R<   R   R   (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   <lambda>  s    (   R€   (   R<   R   R   R‹   (    (   R   R<   R   s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt
   do_display
  s    c      
   C   s1   |  i  | | d |  i d |  i d |  i |  i S(   NR   R   R   (   RŒ   R   R   R   R”   (   R<   R   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt
   do_predict  s    		c         K   s=  |  i  d  j p t i i |  i  ƒ p t Sn |  i i ƒ  } | i | ƒ |  i	 } |  i
 o t i i | ƒ } n | d  j	 o |  i | |  i } n |  i | |  i } |  i | | ƒ |  i | | d |  i | |  i | | ƒ | o* t | t t f ƒ o t i i | ƒ n t i i | ƒ t i i d ƒ d  S(   NR;   t    (   R   R   R   t   pythont   py_evalR
   R‹   R&   R"   R†   RŽ   R„   R…   R‚   Rƒ   R™   Rž   R;   R›   R   t   strt   unicodeR   t   log(   R<   R   R   R‹   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyRB     s"    &	
c         C   s-   |  i  o
 d } n
 |  i } |  i | | ƒ S(   Ns	   <Dynamic>(   RŽ   R†   RŸ   (   R<   R   R   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   predictA  s    

	N(   RC   RD   t   __doc__t   special_propertiesR“   R   R=   R&   R™   Rš   R›   Rœ   Rž   RŸ   RB   R¦   (    (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyR   w  s"   	_		
						'c         K   s6   | d  j o t i i } n t | ƒ |  d | | S(   NR‰   (   R   R   R   R’   R:   (   R†   R‰   R#   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt	   CharacterJ  s    c         K   s   t  |  d t | S(   NRŽ   (   R©   R
   (   t	   name_exprR#   (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pyt   DynamicCharacterQ  s    (   R   RX   R   R   R4   t   objectR5   R
   R€   R“   R   R©   R«   (    (    (    s7   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\character.pys   <module>   s    		}!š	Ó