
    &h	                         S r SSKrSSKrSSKJr  SSKr\R                  R                  \R                  R                  \
5      5      S   rS r\S:X  a  \" 5         \R                  " 5         g)a&  pygame.examples.liquid

This example demonstrates a simplish water effect of an
image. It attempts to create a hardware display surface that
can use pageflipping for faster updates. Note that the colormap
from the loaded GIF image is copied to the colormap for the
display surface.

This is based on the demo named F2KWarp by Brad Graham of Freedom2000
done in BlitzBasic. I was just translating the BlitzBasic code to
pygame to compare the results. I didn't bother porting the text and
sound stuff, that's an easy enough challenge for the reader :]
    N)sinc            
      h   [         R                  " 5         [         R                  R                  S[         R                  [         R
                  -  5      n [        R                  R                  [        SS5      n[         R                  R                  U5      n[         R                  R                  U5      n[         R                  R                  U5      nU R                  5       S:X  a   U R                  UR!                  5       5        OUR#                  5       nSn[%        SSS5      n[%        SS	S5      n[         R&                  [         R(                  [         R*                  4n [         R,                  R/                  5        H  nUR0                  U;   d  M    g    US
-   nU HU  nU[3        X8S-  -   5      S-  -   S-   n	U H3  n
U
[3        X:S-  -   5      S-  -   S-   nU R5                  X(U
4XSS45        M5     MW     [         R                  R7                  5         [8        R:                  " S5        M  )N)    dataz
liquid.bmp   g        r   r      r   g{Gz?g{Gz?   )pginitdisplayset_mode	HWSURFACE	DOUBLEBUFospathjoinmain_dirimageload	transformscale2xget_bitsizeset_paletteget_paletteconvertrangeQUITKEYDOWNMOUSEBUTTONDOWNeventgettyper   blitfliptimesleep)screen	imagenamebitmapanimxblocksyblocks
stopeventsexxposyyposs               N/var/www/auris/envauris/lib/python3.13/site-packages/pygame/examples/liquid.pymainr5      s   GGIZZ  R\\BLL-HIF Xv|<IXX]]9%F\\!!&)F\\!!&)F q 6--/0! D AsBGAsBG"**b&8&88J
Avv#   d{ATH_-23r9DSD1B672=FFTR,@A   	



4     __main__)__doc__pygamer   r   mathr   r&   r   splitabspath__file__r   r5   __name__quit r6   r4   <module>rA      s_     	  77==23A6%P zFGGIr6   