Initial Commit 2 (BE AWARE THIS ISNT FUNCTIONAL CODE YET DONT USE)

This commit is contained in:
Martin Dvořák 2026-05-29 08:21:40 +02:00
commit 06f265bdac
2 changed files with 84 additions and 0 deletions

7
render.py Normal file
View file

@ -0,0 +1,7 @@
import pygame
def load_sprite(sheet, x, y, width, height, screen_width, screen_height):
rect = pygame.Rect(x, y, width, height)
sprite = sheet.subsurface(rect)
scaled = pygame.transform.scale(sprite, (screen_width, screen_height))
return scaled