diff options
Diffstat (limited to 'src/loader.py')
-rw-r--r-- | src/loader.py | 12 |
1 files changed, 12 insertions, 0 deletions
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] |