summaryrefslogtreecommitdiff
path: root/src/loader.py
blob: 02da9e0452f33cc5a609b772dab0a55a5ef5dd29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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]

def unload_intro():
    global texture_map
    del texture_map