ó
Ä‚Œ\c           @  s_   d  d l  m Z d  d l Z d a e ƒ  Z e a	 g  Z
 d „  Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   print_functionNc         C  s@   |  d k r d S|  t k r< t j |  ƒ |  j d „  ƒ n  d S(   sC   
    Called to predict that the displayable `d` will be shown.
    Nc         S  s
   |  j  ƒ  S(   N(   t   predict_one(   t   i(    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   <lambda>6   s    (   t   Nonet	   predictedt   addt	   visit_all(   t   d(    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   displayable,   s
    c         O  s   t  j |  | | f ƒ d S(   sd   
    Called to predict that the named screen is about to be shown
    with the given arguments.
    N(   t   screenst   append(   t   _screen_namet   argst   kwargs(    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   screen9   s    c           C  s$   t  j j j j a t j ƒ  t 2d  S(   N(	   t   renpyt   displayt   imt   cachet   get_texturet   imageR   t   clearR
   (    (    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   resetB   s    
c         c  sž  t  j j j j ƒ  t Vt  j j j j a t a x/ t  j	 j
 D]! } t | ƒ t a t Vt a q= Wx. t  j j ƒ  j ƒ  D] } t a t Vt a qx Wt t  j j ƒ d k rt  j j d j } xd | j j ƒ  D]2 } x) | D]! } y t | j ƒ WqÛ qÛ XqÛ WqÎ Wn x t  j j D] } | ƒ  qWt a x t Vs;q.q.WxV t  j	 j j ƒ  D]B \ } } | \ }	 }
 t  j j j | |	 |
 Ž t a t Vt a qOWt a y |  j d „  ƒ Wn n Xt a g  } xÍ t D]Å } x t VsâqÕqÕW| | k rõqÌn  | j | ƒ | \ } }	 }
 | j d ƒ r&qÌn  t a y t  j j j | |	 |
 Ž Wn? t  j j r‹t  j j  j! d | |
 ƒ t  j j  j" ƒ  q‹n Xt a qÌWd Vd S(   sÙ  
    The image prediction co-routine. This predicts the images that can
    be loaded in the near future, and passes them to the image cache's
    preload_image method to be queued up for loading.

    The .send should be called with True to do a expensive prediction,
    and with False to either do an inexpensive prediction or no
    prediction at all.

    Returns True if there's more predicting to be done, or False
    if there's no more predicting worth doing.
    i   iþÿÿÿc         S  s
   |  j  ƒ  S(   N(   t   predict_one_action(   R   (    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyR   œ   s    t   _s   While predicting screen %s %rN($   R   R   R   R   t   start_predictiont   Truet   preload_imageR   t
   predictingt   storet   _predict_setR	   t   Falset   gamet   contextt   predictt   lent   contextst   scene_listst   layerst
   itervaluest   configt   predict_callbackst   _predict_screent   itemsR   t   predict_screenR   R
   R   t
   startswitht   debug_image_cachet   ic_logt   writet	   exceptionR   (   t   root_widgetR   t   _it   slst   lt   sleR   t   namet   valueR   R   t   predicted_screenst   t(    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   prediction_coroutineI   sr    






(   t
   __future__R    t   renpy.displayR   R   R   t   setR   R    R   R
   R	   R   R   R<   (    (    (    sn   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\predict.pyt   <module>   s   					