blob: 75d7701e132132c22f15f25633958bb6c9e6defc (
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').convert_alpha()
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
|