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