[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Problem surfaces
Ops...it works...
i forgot to blit the backgound on the screen...
:)
bye
> Hi
>
> I wrote this function to create a list of surfaces containig only par
t
> of a give image...I look at azazel post and I saw thi function was
> similar to it...but I got a problem: it doesn't work...
>
> Can anyone give me help??
>
> Here it is:
> def tile_array(img_tile):
> tiles = pygame.image.load(os.path.join("img",img_tile)).convert()
> image_map = []
> for a in range(len(tile_map)):
> surface = pygame.Surface((32,50))
> t = tile_map[a]
> rect = Rect(t[0],0,32,50)
> surface.blit(tiles,(0,0),rect)
> image_map.append(surface)
> return image_map
>
> ____________________________________
> pygame mailing list
> pygame-users@seul.org
> http://pygame.seul.org
>
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org