Finally fixed sprite caching. For now it works only for one map, need to develop mapmanager and have a list of cached sprites for each map.

This commit is contained in:
shiva404
2026-02-16 02:46:28 +03:00
parent f89e0a86c4
commit 0e0bf1f84e
7 changed files with 57 additions and 57 deletions

View File

@@ -5,12 +5,6 @@ from dataclasses import dataclass, field
from copy import deepcopy
import pygame
def scale_image(image, n):
orig_size = image.get_size()
new_size = (int(orig_size[0] * n), int(orig_size[1] * n))
return pygame.transform.smoothscale(image, new_size)
def path_exists(data, path):
current = data
for key in path: