From 4041983385c68a1b2823a0700e239d05e4cd7685 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 13 Sep 2025 14:44:19 -0400 Subject: [PATCH] Finally got it, I think. The path to the end.ogg file was constructed differently from other sounds loaded by libstormgames. Because the libstormgames version works, just use it here too. --- wicked_quest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wicked_quest.py b/wicked_quest.py index c1eb72f..faa12f6 100755 --- a/wicked_quest.py +++ b/wicked_quest.py @@ -445,10 +445,9 @@ class WickedQuest: # Game complete - use gameStartTime for total totalTime = pygame.time.get_ticks() - self.gameStartTime if self.player.xPos >= self.currentLevel.rightBoundary: - # Check for end of game scene - gamePath = get_game_dir_path(self.currentGame) + # Check for end of game scene using relative path like other sounds for ext in ['.wav', '.ogg', '.mp3']: - endFile = os.path.join(gamePath, f'end{ext}') + endFile = os.path.join("levels", self.currentGame, f'end{ext}') if os.path.exists(endFile): self.get_sounds()['end_scene'] = pygame.mixer.Sound(endFile) cut_scene(self.get_sounds(), 'end_scene')