Changeset 58:04e83cf43329


Ignore:
Timestamp:
Apr 3, 2011, 7:41:43 PM (9 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
rebase_source:
6080b23ffa383ab17e6ed5594285addcee34314b
Message:

Add convert_alpha to load_image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/data.py

    r8 r58  
    1212
    1313import pygame.image
     14import pygame.display
    1415
    1516
     
    3738    if filename not in IMAGES:
    3839        IMAGES[filename] = pygame.image.load(load(filename))
     40        if pygame.display.get_init():
     41            IMAGES[filename] = IMAGES[filename].convert_alpha(pygame.display.get_surface())
    3942    return IMAGES[filename]
    4043
Note: See TracChangeset for help on using the changeset viewer.