loads an image, prepares it for play
(file)
| 52 | |
| 53 | |
| 54 | def load_image(file): |
| 55 | """loads an image, prepares it for play""" |
| 56 | file = os.path.join(main_dir, "data", file) |
| 57 | try: |
| 58 | surface = pygame.image.load(file) |
| 59 | except pygame.error: |
| 60 | msg = f'Could not load image "{file}" {pygame.get_error()}' |
| 61 | raise SystemExit(msg) |
| 62 | return surface.convert() |
| 63 | |
| 64 | |
| 65 | def load_sound(file): |