From e54ac640f1d3f7071a48032e924b04529cbd358f Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 31 Aug 2023 21:00:30 +0200 Subject: Initial commit --- src/loader.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/loader.py (limited to 'src/loader.py') diff --git a/src/loader.py b/src/loader.py new file mode 100644 index 0000000..b6eab51 --- /dev/null +++ b/src/loader.py @@ -0,0 +1,12 @@ +import pygame +from math import floor + +texture_map = pygame.image.load('./assets/textures/intro_atlas.png') +preloaded = [] + +for i in range(8): + for j in range(8): + preloaded.append(texture_map.subsurface((360 * j, 360 * i, 360, 360))) + +def draw_texture(id): + return preloaded[id] -- cgit