Ñò
D¾QLc           @   s   d  „  Z  d S(   c   	      C   s­   |  i  ƒ  } | i | } | i | } | d j p | d j o d Sg  } x[ t d | ƒ D]J } xA t d | ƒ D]0 } | i |  i | | | | | | f ƒ ƒ qq Wq[ W| S(   s÷   
    Takes a sprite sheet and splits it into sprites of size (sprite_width, sprite_height).
    sprite_width and sprite_height must divide evenly into the surface's width/height
    Returns a list of sprites or None if the bounds are not sane
    i    N(   t   get_rectt   ht   wt   Nonet   ranget   appendt
   subsurface(	   t   surfacet   sprite_widtht   sprite_heightt   rectt   rowst   colst   spritest   yt   x(    (    s3   C:\Python26\knight_game\knight_game\spriteloader.pyt   get_sprites   s      2N(   R   (    (    (    s3   C:\Python26\knight_game\knight_game\spriteloader.pyt   <module>   s    