Initial Commit 2 (BE AWARE THIS ISNT FUNCTIONAL CODE YET DONT USE)
This commit is contained in:
parent
f6107b1745
commit
06f265bdac
2 changed files with 84 additions and 0 deletions
7
render.py
Normal file
7
render.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue