ó
V%¤\c           @  sª   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d a
 e a e j ƒ  a e j j d ƒ Z d „  Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   print_functionNt   PRESPLASHEVENTc           C  sD   t  j j t d ƒ x t r, t  j j ƒ  q Wt  j j t d ƒ d S(   s9   
    Disposes of events while the window is running.
    i   i    N(   t   pygame_sdl2t   timet	   set_timerR   t   keep_runningt   eventt   wait(    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\presplash.pyt   run_event_thread0   s    	c         C  sµ  d t  j k r d Sd d g } x2 | D]& } | | } t  j j | ƒ r& Pq& q& Wd St j r’ d d l } d d l m } m } | j	 j
 j ƒ  n  t j j ƒ  t j j | | ƒ } t j j d ƒ } | j ƒ  \ }	 }
 | d | d d |	 d } | d	 | d
 d |
 d } t j j t j d | j ƒ  d t j d | | f ƒa | j t j ƒ  ƒ } t j ƒ  j | d ƒ t j ƒ  t j d t ƒ a t  t _! t j" ƒ  t# j# ƒ  a$ d S(   s9   
    Called to display the presplash when necessary.
    t   RENPY_LESS_UPDATESNs   /presplash.pngs   /presplash.jpgiÿÿÿÿ(   t   c_void_pt   c_inti    i   i   i   t   flagst   post   target(   i    i    (%   t   ost   environt   patht   existst   renpyt   windowst   ctypesR
   R   t   windllt   user32t   SetProcessDPIAwareR   t   displayt   initt   imaget   loadt   get_display_boundst   get_sizet   Windowt   syst   argvt   WINDOW_BORDERLESSt   windowt   convert_alphat   get_surfacet   blitt   updatet	   threadingt   ThreadR   t   event_threadt   Truet   daemont   startR   t
   start_time(   t   basedirt   gamedirt	   filenamest   fnR   R
   R   t   imgt   boundst   swt   sht   xt   y(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\presplash.pyR-   =   s<    
		
	
	
c          C  sY   t  j r% d d l }  |  j d ƒ n  t d k r5 d St a t j ƒ  t j	 ƒ  d a d S(   sM   
    Called just before we initialize the display to hide the presplash.
    iÿÿÿÿNs   presplashEnd();(
   R   t
   emscriptent
   run_scriptR#   t   Nonet   FalseR   R*   t   joint   destroy(   R9   (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\presplash.pyt   endu   s    		

c          C  sM   t  p t j s d St t j j t j ƒ  }  |  d k rI t j |  ƒ n  d S(   s<   
    Sleep to the end of config.minimum_presplash_time.
    Ni    (   R#   R   t   mobileR.   t   configt   minimum_presplash_timeR   t   sleep(   t	   remaining(    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\presplash.pyRC      s
    (   t
   __future__R    R(   R   t   os.pathR   R    R   R   R;   R#   R<   R   R.   R   t   registerR   R   R-   R?   RC   (    (    (    sp   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\display\presplash.pyt   <module>   s   		8	