fix skin loading

This commit is contained in:
Anthony Samms
2025-12-23 21:02:56 -05:00
parent 2a123bce6f
commit 5c7e759385
9 changed files with 16 additions and 26 deletions

View File

@@ -116,7 +116,7 @@ class GameScreen(Screen):
def load_hitsounds(self):
"""Load the hit sounds"""
sounds_dir = Path("Sounds")
sounds_dir = Path(f"Skins/{global_data.config["paths"]["skin"]}/Sounds")
if global_data.hit_sound == -1:
audio.load_sound(Path('none.wav'), 'hitsound_don_1p')
audio.load_sound(Path('none.wav'), 'hitsound_kat_1p')

View File

@@ -58,7 +58,7 @@ class LoadScreen(Screen):
global_data.font_codepoints.add(character)
codepoint_count = ray.ffi.new('int *', 0)
codepoints = ray.load_codepoints(''.join(global_data.font_codepoints), codepoint_count)
global_data.font = ray.load_font_ex(str(Path('Graphics/Modified-DFPKanteiryu-XB.ttf')), 40, codepoints, len(global_data.font_codepoints))
global_data.font = ray.load_font_ex(str(Path(f'Skins/{global_data.config["paths"]["skin"]}/Graphics/Modified-DFPKanteiryu-XB.ttf')), 40, codepoints, len(global_data.font_codepoints))
def _load_navigator(self):
"""Background thread function to load navigator"""

View File

@@ -25,16 +25,11 @@ class State:
class TitleScreen(Screen):
def __init__(self, name: str):
super().__init__(name)
#normalize to accept both stings and lists in toml
#maybe normalize centrally? but it's used only here
vp = global_data.config["paths"]["video_path"]
video_paths = [vp] if isinstance(vp, str) else vp
self.op_video_list = []
self.attract_video_list = []
for base in video_paths:
base = Path(base)
self.op_video_list += list((base/"op_videos").glob("**/*.mp4"))
self.attract_video_list += list((base/"attract_videos").glob("**/*.mp4"))
base = Path(f"Skins/{global_data.config["paths"]["skin"]}/Videos")
self.op_video_list += list((base/"op_videos").glob("**/*.mp4"))
self.attract_video_list += list((base/"attract_videos").glob("**/*.mp4"))
self.coin_overlay = CoinOverlay()
self.allnet_indicator = AllNetIcon()
self.entry_overlay = EntryOverlay()

View File

@@ -23,7 +23,7 @@ class TwoPlayerGameScreen(GameScreen):
def load_hitsounds(self):
"""Load the hit sounds"""
sounds_dir = Path("Sounds")
sounds_dir = Path(f"Skins/{global_data.config["paths"]["skin"]}/Sounds")
# Load hitsounds for 1P
if global_data.hit_sound[PlayerNum.P1] == -1: