³ò
¾¢vMc           @   s0  d  d k  l Z d  d k l Z l Z d  d k i Z d  d k Z d  d k Z d  d k	 Z	 d  d k
 Z
 d  d k Z d  d k Z d „  Z d „  Z d „  Z d „  Z d „  Z d	 „  Z e
 i d
 ƒ Z d d d „ Z d „  Z d „  Z e a d „  Z d e f d „  ƒ  YZ d „  Z d „  Z d e f d „  ƒ  YZ  d e i! f d „  ƒ  YZ" d e# f d „  ƒ  YZ$ d e i% f d „  ƒ  YZ& e& ƒ  Z' d e i# i( f d „  ƒ  YZ) d e i# i( f d  „  ƒ  YZ* e+ d! „ Z, e+ e- d" „ Z. d# „  Z/ e- e- d$ „ Z0 d% „  Z1 d& „  Z2 d  d k3 Z3 d  d k4 Z4 e3 i5 e4 i6 e1 e2 ƒ d S('   iÿÿÿÿ(   t   parse(   t   ModuleCodeGeneratort   ExpressionCodeGeneratorNc         C   sú   | o | ƒ  n t  |  ƒ } | | j o d Sn d | | <y1 x* t |  ƒ i ƒ  D] } t | | | ƒ qS WWn n Xy? t |  t ƒ p+ x( |  i ƒ  D] } t | | | ƒ q˜ Wn Wn n Xy+ x$ |  i ƒ  D] } t | | | ƒ qÑ WWn n Xd S(   s³   
    @param obj: The object that was reached.
    @param path: The path from the store via which it was reached.
    @param reachable: A map from reachable object id to path.
    Ni   (   t   idt   varst
   itervaluest   reachedt
   isinstancet
   basestringt   __iter__(   t   objt	   reachablet   waitt   idobjt   v(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR   ,   s2    
   c      	   C   s£   x$ |  i  ƒ  D] } t | | | ƒ q Wxu t i i D]g } t | i | | ƒ t | i | | ƒ x8 | i D]- } x$ | i  ƒ  D] } t | | | ƒ q} Wqj Wq4 Wd S(   s)  
    Marks everything reachable from the variables in the store
    or from the context info objects as reachable.
    
    @param store: A map from variable name to variable value.
    @param reachable: A dictionary mapping reached object ids to
    the path by which the object was reached.
    N(   R   R   t   renpyt   gamet   contextst   infot   musict   dynamic_stack(   t   storeR   R   R   t   ct   d(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   reached_vars[   s    
  
  c      	   C   s›   t  |  t i t i f ƒ o4 t i d t i d ƒ d |  g d d d d ƒ }  nH t  |  t i ƒ o4 t i d t i d ƒ d |  g d d d d ƒ }  n |  S(   s‚   
    Replaces literal lists and dictionaries, and list comprehensions,
    with calls to the appropriate Ren'Py constructors.
    t   nodet   __renpy__list__t   argst	   star_argst
   dstar_argst   __renpy__dict__N(   R   t   astt   Listt   ListCompt   CallFunct   Namet   Nonet   Dict(   t   n(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt	   wrap_noder   s    		c         C   sÜ   t  |  t ƒ o, g  } |  D] } | t | | ƒ q ~ Sn t  |  t ƒ o2 t g  } |  D] } | t | | ƒ qZ ~ ƒ Sn t  |  t i ƒ oG x6 t |  ƒ D]( } t |  | t t |  | ƒ | ƒ ƒ qž W| |  ƒ Sn |  S(   s“   
    Walks through a compiler AST, calling the supplied function when a
    node is encountered, and replacing the node with the return value.
    (	   R   t   listt   recursively_replacet   tupleR   t   NodeR   t   setattrt   getattr(   t   ot   funct   _[1]t   it   _[2]t   k(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR)   ‰   s    ,2 &c         C   sw   | g } xg | o_ | i  d ƒ } |  | _ t | d d ƒ } | d j	 o | | | _ n | i | i ƒ  ƒ q Wd S(   s<   Set the filename attribute to filename on every node in treei    t   linenoN(   t   popt   filenameR-   R$   R4   t   extendt   getChildNodes(   R6   t   offsett   treet   worklistR   R4   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   set_filename   s    	
	c         C   s   |  i  d ƒ } d | j o | Sn |  i  d ƒ } |  i  d ƒ } |  i  d ƒ } d | j o d | j o d | } n | | | | } | S(   sZ   
    If the string s contains a unicode character, make it into a
    unicode string.
    i    s   \ui   i   i   t   ut   U(   t   group(   t   mt   st   prefixt   sept   bodyt   rv(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   make_unicode«   s    s*   ([uU]?[rR]?)("""|"|\'\'\'|\')((\\.|.)*?)\2s   <none>i   c   
      C   s“  t  |  t i i ƒ o |  i } |  i } n |  } |  i d d ƒ }  |  i d ƒ }  d |  j o t i	 t
 |  ƒ }  n | d j o d |  }  d } n d } y t |  | ƒ } Wnx t j
 ol } | i d j	 oP d	 | i | | | f } t |  ƒ d
 j  o | d | 7} n t | ƒ ‚ q+‚  n Xt | t ƒ | d j o$ t | | | | ƒ t | ƒ }	 n! t | | | | ƒ t | ƒ }	 |	 i ƒ  S(   s‚  
    Compiles the given source code using the supplied codegenerator.
    Lists, List Comprehensions, and Dictionaries are wrapped when
    appropriate.

    @param source: The sourccode, as a string.

    @param mode: 'exec' or 'eval'.

    @param filename: The filename that the source code is taken from.

    @param lineno: The line number of the first line of the source code.
    s   t    t   raw_unicode_escapes   \ut   execs&   from __future__ import with_statement
i   i   s   Syntax error on line %d of %si€   s   :
    N(   R   R   R   t   PyExprR6   t
   linenumbert   replacet   encodet	   string_ret   subRF   R    t   SyntaxErrorR4   R$   t   lent	   ExceptionR)   R'   R<   R   R   t   getCode(
   t   sourcet   modeR6   R4   t   orig_sourcet   line_offsetR:   t   et   msgt   cg(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt
   py_compileÄ   s8    	

c         K   s   t  |  d |  } t i | ƒ S(   NRI   (   R[   t   marshalt   dumps(   RT   t   kwargst   code(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_compile_exec_bytecodeý   s    c         K   s+   |  i  ƒ  }  t |  d |  } t i | ƒ S(   Nt   eval(   t   stripR[   R\   R]   (   RT   R^   R_   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_compile_eval_bytecode  s    c            s   ‡  f d †  } | S(   Nc            sa   t  i i i } t |  ƒ | j o/ t i |  ƒ |  i ƒ  f | t |  ƒ <t a	 n ˆ  |  | | Ž S(   N(
   R   R   t   logt   mutatedR   t   weakreft   reft   get_rollbackt   Truet   mutate_flag(   t   selfR   R^   Re   (   t   method(    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   do_mutation  s
    %
(    (   Rl   Rm   (    (   Rl   s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   mutator  s    t   RevertableListc           B   s  e  Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i	 ƒ Z	 e e i
 ƒ Z
 e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z d  „  Z e e i ƒ Z e e i ƒ Z e e i ƒ Z [ d „  Z d „  Z RS(   c            s   ‡  f d †  } | S(   Nc             s   t  ˆ  |  | Ž  ƒ S(   N(   Ro   (   R   R^   (   Rl   (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt	   newmethod/  s    (    (   Rl   Rp   (    (   Rl   s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   wrapper.  s    c         C   s   |  S(   N(    (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRh   :  s    c         C   s   | |  (d  S(   N(    (   Rk   t   old(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   rollback=  s    (   t   __name__t
   __module__Rn   R(   t   __delitem__t   __delslice__t   __setitem__t   __iadd__t   __imul__t   appendR7   t   insertR5   t   removet   reverset   sortRq   t   __add__t   __getslice__t   __mul__Rh   Rs   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRo     s&   		c          G   s   t  t |  Œ  ƒ S(   N(   Ro   t   range(   R   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   revertable_range@  s    c          O   s   t  t |  | Ž  ƒ S(   N(   Ro   t   sorted(   R   R^   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   revertable_sortedC  s    t   RevertableDictc           B   s¶   e  Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i ƒ Z e e i	 ƒ Z	 d  „  Z
 e
 e i ƒ Z e
 e i ƒ Z e
 e i ƒ Z [
 d „  Z d „  Z d „  Z RS(   c            s   ‡  f d †  } | S(   Nc             s   t  ˆ  |  | Ž  ƒ S(   N(   Ro   (   R   R^   (   Rl   (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRp   P  s    (    (   Rl   Rp   (    (   Rl   s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   list_wrapperO  s    c         C   s   t  ƒ  } | i |  ƒ | S(   N(   R‡   t   update(   Rk   RE   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   copy[  s    	c         C   s
   |  i  ƒ  S(   N(   t   items(   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRh   `  s    c         C   s/   |  i  ƒ  x | D] \ } } | |  | <q Wd  S(   N(   t   clear(   Rk   Rr   R3   R   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRs   c  s    
 (   Rt   Ru   Rn   t   dictRv   Rx   RŒ   R5   t   popitemt
   setdefaultRˆ   t   keyst   valuesR‹   RŠ   Rh   Rs   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR‡   F  s   			t   RevertableSetc           B   sè  e  Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i	 ƒ Z	 e e i i
 ƒ Z
 e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z d  „  Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z e e i i ƒ Z [ d „  Z d „  Z  RS(   c            s   ‡  f d †  } | S(   Nc             s8   ˆ  |  | Ž  } t  | t i ƒ o t | ƒ Sn | Sd  S(   N(   R   t   setst   SetR’   (   R   R^   RE   (   Rl   (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRp   {  s    (    (   Rl   Rp   (    (   Rl   s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRq   z  s    c         C   s
   t  |  ƒ S(   N(   R(   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRh   ’  s    c         C   s'   t  i i |  ƒ t  i i |  | ƒ d  S(   N(   R“   R”   RŒ   R‰   (   Rk   Rr   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRs   •  s    (!   Rt   Ru   Rn   R“   R”   t   __iand__t   __ior__t   __isub__t   __ixor__t   addRŒ   t   difference_updatet   discardt   intersection_updateR5   R}   t   symmetric_difference_updatet   union_updateR‰   Rq   t   __and__t   __copy__t   __deepcopy__t   __sub__t   __xor__t   __or__RŠ   t
   differencet   intersectiont   symmetric_differencet   unionRh   Rs   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR’   i  s:   	
	t   RevertableObjectc           B   sD   e  Z d  „  Z d „  Z e e ƒ Z e e ƒ Z d „  Z d „  Z RS(   c         C   s   t  i |  | | ƒ d  S(   N(   t   objectt   __setattr__(   Rk   t   attrt   value(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR«   œ  s    c         C   s   t  i |  | ƒ d  S(   N(   Rª   t   __delattr__(   Rk   R¬   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR®   Ÿ  s    c         C   s   |  i  i ƒ  S(   N(   t   __dict__RŠ   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRh   ¥  s    c         C   s!   |  i  i ƒ  |  i  i | ƒ d  S(   N(   R¯   RŒ   R‰   (   Rk   Rr   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRs   ¨  s    (   Rt   Ru   R«   R®   Rn   Rh   Rs   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR©   š  s   			t	   DetRandomc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s    t  t |  ƒ i ƒ  g  |  _ d  S(   N(   t   superR°   t   __init__t   stack(   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR²   °  s    c         C   sO   |  i  o |  i  i ƒ  } n t t |  ƒ i ƒ  } t i i i i i	 | ƒ | S(   N(
   R³   R5   R±   R°   t   randomR   R   Rd   t   currentR{   (   Rk   RE   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR´   ´  s
    
c         C   s%   | } | i  ƒ  |  i i | ƒ d S(   su   
        Pushes the random numbers in l onto the stack so they will be generated
        in the order given.
        N(   R~   R³   R7   (   Rk   t   lt   ll(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   pushback¾  s    
c         C   s   g  |  _  d S(   sI   
        Resets the RNG, removing all of the pushbacked numbers.
        N(   R³   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   resetÉ  s    (   Rt   Ru   R²   R´   R¸   R¹   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR°   ®  s   		
	t   Rollbackc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s<  
    Allows the state of the game to be rolled back to the point just
    before a node began executing.

    @ivar context: A shallow copy of the context we were in before
    we started executing the node. (Shallow copy also includes
    a copy of the associated SceneList.)

    @ivar objects: A list of tuples, each containing an object and a
    token of information that, when passed to the rollback method on
    that object, causes that object to rollback.

    @ivar store: A list of updates to store that will cause the state
    of the store to be rolled back to the start of node
    execution. This is a list of tuples, either (key, value) tuples
    representing a value that needs to be assigned to a key, or (key,)
    tuples that mean the key should be deleted.

    @ivar checkpoint: True if this is a user-visible checkpoint,
    false otherwise.

    @ivar purged: True if purge_unreachable has already been called on
    this Rollback, False otherwise.

    @ivar random: A list of random numbers that were generated during the
    execution of this element.
    c         C   sf   t  t |  ƒ i ƒ  t i i d i ƒ  |  _ g  |  _ g  |  _	 t
 |  _ t
 |  _ g  |  _ d  |  _ d  S(   Ni    (   R±   Rº   R²   R   R   R   t   rollback_copyt   contextt   objectsR   t   Falset
   checkpointt   purgedR´   R$   t   forward(   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR²   ò  s    					c   
   	   C   s:  |  i  o t Sn t |  _  xG |  i D]< } t | ƒ d j o q% n | \ } } t | | | ƒ q% Wt |  i i | | ƒ x; |  i i D]- } x$ | i	 ƒ  D] } t | | | ƒ q› Wqˆ Wg  } xk |  i
 D]` \ } }	 t | ƒ | j o' | i | |	 f ƒ t |	 | | ƒ qÉ t i i o d G| GHqÉ qÉ W| |  _
 t S(   s\  
        Adds objects that are reachable from the store of this
        rollback to the set of reachable objects, and purges
        information that is stored about totally unreachable objects.

        Returns True if this is the first time this method has been
        called, or False if it has already been called once before.        
        i   s   Removing unreachable:(   RÀ   R¾   Ri   R   RQ   R   R¼   R   R   R   R½   R   R{   R   t   configt   debug(
   Rk   R   R   R1   R3   R   R   t   new_objectsR.   t   rb(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   purge_unreachableþ  s4    

	
   
 		c         C   s°   x$ |  i  D] \ } } | i | ƒ q
 Wx` |  i D]U } t | ƒ d j o# | \ } } | t t i ƒ | <q1 | \ } t t i ƒ | =q1 W|  i g t i _ t	 i
 |  i ƒ d S(   sr   
        This reverts the game state to the state it was in when this
        Rollback was first created.
        i   N(   R½   Rs   R   RQ   R   R   R¼   R   R   t   rngR¸   R´   (   Rk   R
   t   rollt   tR3   R   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRs   .  s    
 
 	(   Rt   Ru   t   __doc__R²   RÆ   Rs   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRº   Õ  s   		0t   RollbackLogc           B   s­   e  Z d  Z d d g Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z
 d	 „  Z d
 „  Z d e d „ Z d „  Z e d d „ Z d d „ Z d „  Z d d „ Z RS(   sÊ  
    This class manages the list of Rollback objects.

    @ivar log: The log of rollback objects.

    @ivar current: The current rollback object. (Equivalent to
    log[-1])

    @ivar ever_been_changed: A dictionary containing a key for each
    variable in the store that has ever been changed. (These variables
    become the roots of what is changed or rolled-back.)

    @ivar rollback_limit: The number of steps left that we can
    interactively rollback.

    Not serialized:
    
    @ivar old_store: A copy of the store as it was when begin was
    last called.

    @ivar mutated: A dictionary that maps object ids to a tuple of
    (weakref to object, information needed to rollback that object)
    t	   old_storeRe   c         C   si   t  t |  ƒ i ƒ  g  |  _ d  |  _ h  |  _ h  |  _ d |  _ g  |  _	 h  |  _
 t |  _ t i ƒ  d  S(   Ni    (   R±   RË   R²   Rd   R$   Rµ   Re   t   ever_been_changedt   rollback_limitRÁ   RÌ   R¾   t   rolled_forwardRÇ   R¹   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR²   ^  s    								c         C   s   h  |  _  t |  _ d  S(   N(   Re   R¾   RÏ   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   after_setstatep  s    	c         C   s×   t  i i d i i ƒ  p d Sn t |  i ƒ t  i i j oI |  i t  i i } t	 | i
 i t ƒ o |  i t  i i |  _ q‡ n t ƒ  |  _ |  i i |  i ƒ h  |  _ t  i i i ƒ  |  _ t a t |  _ d S(   s~   
        Called before a node begins executing, to indicate that the
        state needs to be saved for rollbacking.
        i    N(   R   R   R   t   scene_listst   transient_is_emptyRQ   Rd   RÂ   t   rollback_lengthR   R¼   Rµ   R   Rº   R{   Re   R   R¯   RŠ   RÌ   Ri   Rj   R¾   RÏ   (   Rk   RÅ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   beginu  s    		c         C   s.  t  i i } g  } x_ |  i i ƒ  D]N \ } } | | j p | | | j	 o$ | i | | f ƒ t |  i | <q" q" Wx? | D]7 } | |  i j o! | i | f ƒ t |  i | <q{ q{ W| |  i _ g  |  i _	 xY |  i
 i ƒ  D]H \ } \ } } | ƒ  } | d j o qÞ n |  i i	 i | | f ƒ qÞ Wd S(   s,  
        Called after a node is finished executing, before a save
        begins, or right before a rollback is attempted. This may be
        called more than once between calls to begin, and should always
        be called after an update to the store but before a rollback
        occurs.
        N(   R   R   R¯   RÌ   t	   iteritemsR{   Ri   RÍ   Rµ   R½   Re   R$   (   Rk   t	   new_storeR   R3   R   Rg   RÈ   R
   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   complete—  s(    	   	c         C   sR   h  } t  t i ƒ } x6 |  i i ƒ  D]% } | | j o | | | | <q% q% W| S(   s  
        Return a map giving the current roots of the store. This is a
        map from a variable name in the store to the value of that
        variable. A variable is only in this map if it has ever been
        changed since the init phase finished.
        (   R   R   R   RÍ   R   (   Rk   RE   R   R3   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt	   get_rootsÀ  s     c         C   sW   h  } t  | | | ƒ |  i } | i ƒ  x& | D] } | i | | ƒ p Pq1 q1 Wd S(   s  
        This is called to purge objects that are unreachable from the
        roots from the object rollback lists inside the Rollback entries.

        This should be called immediately after complete(), so that there
        are no changes queued up.
        N(   R   Rd   R~   RÆ   (   Rk   t   rootsR   R   t   revlogR1   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRÆ   Ò  s    	

 c         C   s   |  i  o t Sn t Sd  S(   N(   RÁ   Ri   R¾   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   in_rollbackæ  s    
c         C   sC   |  i  o5 |  i  d \ } } |  i i i | j o | Sq? n d S(   s;   
        Returns the current forward info, if any.
        i    N(   RÁ   Rµ   R¼   R$   (   Rk   t   namet   data(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   forward_infoì  s
    
c         C   s  |  i  i o d Sn t t i i ƒ d j o d Sn |  i t i i j  o |  i d 7_ n t	 |  i  _ | d j	 o‰ |  i oo |  i d \ } } |  i  i i  | j o2 | | j o% | p
 |  i o |  i i d ƒ qñ |  i i d ƒ n | |  i  _ n d S(   s˜   
        Called to indicate that this is a checkpoint, which means
        that the user may want to rollback to just before this
        node.
        Ni   i    (   Rµ   R¿   RQ   R   R   R   RÎ   RÂ   t   hard_rollback_limitRi   R$   RÁ   R¼   RÏ   R5   (   Rk   RÝ   t   keep_rollbackt   fwd_namet   fwd_data(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyR¿   ù  s     
c         C   s   d |  _  d S(   sr   
        Called to indicate that the user should not be able to rollback
        through this checkpoint.
        i    N(   RÎ   (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   block  s    c         C   s¥  |  i  d j o | o d Sn |  i |  i ƒ  ƒ g  } x¾ |  i oy |  i i ƒ  } | i | ƒ | i o | d 8} |  i  d 8_  n | d j o% t i i	 i
 | i i ƒ o Pq¼ q= q= W| o t d ƒ ‚ n d GH| i ƒ  |  i | |  _ d SxN | D]F } | i ƒ  | i d j	 o& |  i i d | i i | i f ƒ qqWt t i i _ | o t i ƒ  g  |  _ n t t i _ t i i t i i | ƒ ‚ d S(   s5  
        This rolls the system back to the first valid rollback point
        after having rolled back past the specified number of checkpoints.

        If we're currently executing code, it's expected that complete()
        will be called before a rollback is attempted.

        force makes us throw an exception if we can't find a place to stop
        rolling back, otherwise if we run out of log this call has no
        effect.

        @param label: The label that is jumped to in the game script
        after rollback has finished, if it exists.
        i    Ni   s^   Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?s4   Can't find a place to rollback to. Not rolling back.(   RÎ   RÆ   RØ   Rd   R5   R{   R¿   R   R   t   scriptt	   has_labelR¼   Rµ   RR   R~   Rs   RÁ   R$   R|   Ri   t	   interfacet   suppress_transitionRÇ   R¹   t   after_rollbackt   RestartExceptionR   (   Rk   t   checkpointst   forcet   labelRÚ   RÅ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRs   '  s<    


 
*
c         C   s9   |  i  ƒ  |  i ƒ  } |  i | d | ƒt |  i _ | S(   s
  
        This is called to freeze the store and the log, in preparation
        for serialization. The next call on log should either be
        unfreeze (called after a serialization reload) or discard_freeze()
        (called after the save is complete). 
        R   (   R×   RØ   RÆ   R¾   Rµ   RÀ   (   Rk   R   RÙ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   freezek  s
    
c         C   s   d S(   sa   
        Called to indicate that we will not be restoring from the
        frozen state.
        N(    (   Rk   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   discard_freeze|  s    c         C   s‹   |  t  i _ t  i i } | i ƒ  | i t  i i ƒ x) |  i D] } | | j o | | =q? q? W| i | ƒ |  i	 d d t
 d | ƒd S(   s…  
        Used to unfreeze the game state after a load of this log
        object. This call will always throw an exception. If we're
        lucky, it's the one that indicates load was successful.

        @param roots: The roots returned from freeze.
        
        @param label: The label that is jumped to in the game script
        after rollback has finished, if it exists.
        i    Rë   Rì   N(   R   R   Rd   R   R¯   RŒ   R‰   t   clean_storeRÍ   Rs   Ri   (   Rk   RÙ   Rì   R   R3   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   unfreeze‚  s    

 N(   Rt   Ru   RÊ   t   nosaveR²   RÐ   RÔ   R×   RØ   R$   RÆ   RÛ   RÞ   R¾   R¿   Rã   Rs   Rí   Rî   Rð   (    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRË   C  s    			"	)			&	D	c         B   s=   e  e i ƒ } | o
 h  } n | } e i |  ƒ | | Ud  S(   N(   R   R   R   R\   t   loads(   t   bytecodet   hideR   t   locals(    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_exec_bytecode¡  s
    
c         B   sN   | d  j o e e i ƒ } n | o
 h  } n | } e |  d ƒ | | Ud  S(   NRI   (   R$   R   R   R   R[   (   RT   Rô   R   Rõ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_exec­  s    
c         C   s   t  t i |  ƒ t t i ƒ ƒ S(   N(   Ra   R\   Rò   R   R   R   (   Ró   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_eval_bytecode¹  s    c         C   sM   | d  j o t i i } n | d  j o
 | } n t t |  d ƒ | | ƒ S(   NRa   (   R$   R   R   R¯   Ra   R[   (   RT   t   globalsRõ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   py_eval½  s
    
c         C   s?   |  i  i } |  i } | d  j o |  i } n t | | f f S(   N(   t   im_funcRt   t   im_selfR$   t   im_classt   method_unpickle(   Rl   RÜ   R
   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyt   method_pickleÍ  s
    	c         C   s   t  |  | ƒ S(   N(   R-   (   R
   RÜ   (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pyRþ   ×  s    (7   t   compilerR    t   compiler.pycodegenR   R   t   compiler.astR   R\   R´   Rf   t   reR“   R   R   R   R'   R)   R<   RF   t   compileRN   R[   R`   Rc   Ri   Rj   Rn   R(   Ro   R„   R†   R   R‡   R”   R’   Rª   R©   t   RandomR°   RÇ   t   ObjectRº   RË   R¾   Rö   R$   R÷   Rø   Rú   Rÿ   Rþ   t   copy_regt   typest   picklet
   MethodType(    (    (    s4   D:\Version 1-0-7\Games\Katawa Shoujo\renpy\python.pys   <module>   sP   	/					9			!		#1"	nÿ _		
	