Couldn't beat graphic bugs with sprite caching. Returned to old way. Need to create branch with sprite caching and try to finish it.

This commit is contained in:
shiva404
2026-02-16 00:30:17 +03:00
parent f679dde81f
commit 2e6e75866b
8 changed files with 55 additions and 33 deletions

View File

@@ -9,4 +9,13 @@ 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)
return pygame.transform.smoothscale(image, new_size)
def path_exists(data, path):
current = data
for key in path:
if isinstance(current, dict) and key in current:
current = current[key]
else:
return False
return True