Fix sprite loader... again

This commit is contained in:
Mike A. Trethewey
2021-01-08 03:17:46 -08:00
parent a3553e7860
commit bca36d79ac
3 changed files with 3 additions and 4 deletions

1
Gui.py
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import json import json
import os import os
import sys import sys

2
Rom.py
View File

@@ -342,7 +342,7 @@ def patch_enemizer(world, player, rom, baserom_path, enemizercli, random_sprite_
_sprite_table = {} _sprite_table = {}
def _populate_sprite_table(): def _populate_sprite_table():
if not _sprite_table: if not _sprite_table:
for dir in [local_path(os.path.join("data","sprites","official")), local_path(os.path.join("data","sprites","unofficial"))]: for dir in [local_path(os.path.join(".","resources","app","meta","sprites","official")), local_path(os.path.join(".","resources","app","meta","sprites","unofficial"))]:
for file in os.listdir(dir): for file in os.listdir(dir):
filepath = os.path.join(dir, file) filepath = os.path.join(dir, file)
if not os.path.isfile(filepath): if not os.path.isfile(filepath):

View File

@@ -235,7 +235,7 @@ class SpriteSelector(object):
@property @property
def local_official_sprite_dir(self): def local_official_sprite_dir(self):
return local_path(os.path.join("resources","app","meta","sprites","official")) return local_path(os.path.join(".","resources","app","meta","sprites","official"))
@property @property
def unofficial_sprite_dir(self): def unofficial_sprite_dir(self):
@@ -243,7 +243,7 @@ class SpriteSelector(object):
@property @property
def local_unofficial_sprite_dir(self): def local_unofficial_sprite_dir(self):
return local_path(os.path.join("resources","app","meta","sprites","unofficial")) return local_path(os.path.join(".","resources","app","meta","sprites","unofficial"))
def get_image_for_sprite(sprite): def get_image_for_sprite(sprite):