ó
j$ËZc           @   sO   d  d l  Z d a e ƒ  Z e a g  Z d „  Z	 d „  Z
 d „  Z d „  Z d S(   iÿÿÿÿNc         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(    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyt   <lambda>4   s    (   t   Nonet	   predictedt   addt	   visit_all(   t   d(    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.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(    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyt   screen7   s    c           C   s$   t  j j j j a t j ƒ  t 2d  S(   N(	   t   renpyt   displayt   imt   cachet   gett   imageR   t   clearR	   (    (    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyt   reset@   s    
c         c   s‰  t  Vt j j j j ƒ  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 | ƒ | \ } }	 }
 t  a y t j j j | |	 |
 Ž Wn? t j j rvt j j j  d | |
 ƒ t j j j! ƒ  qvn Xt a qÌWt 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   (    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyR   š   s    s   While predicting screen %s %rN("   t   TrueR   R   R   R   t   start_predictiont   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   debug_image_cachet   ic_logt   writet	   exception(   t   root_widgetR   t   _it   slst   lt   sleR   t   namet   valueR   R   t   predicted_screenst   t(    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyt   prediction_coroutineG   sn    






(   t   renpy.displayR   R   R   t   setR   R   R   R	   R   R   R   R9   (    (    (    s=   E:\Version 1-0-7\Games\DDLC-1.1.1-pc\renpy\display\predict.pyt   <module>   s   					