spele/plagiats/utils.py

13 lines
409 B
Python

import pygame
from pygame import image, Surface
def load_image(settings, image_path: str) -> Surface:
s = settings
i = image.load(image_path)
return pygame.transform.scale(i, (s.block_size, s.block_size))
def load_entity_image(settings, image_path: str) -> Surface:
s = settings
i = image.load(image_path)
return pygame.transform.scale(i, (s.entity_size, s.entity_size))