From 8de0dc60400c5fbb421ecd07ee3d65b0a60b7884 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Sat, 20 Dec 2003 17:43:17 +0000 Subject: [PATCH] Fixed sound loading bug. ji_turn.it was hardcoded. SVN-Revision: 29 --- data/levels/level1.dat | 2 +- src/gameloop.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/levels/level1.dat b/data/levels/level1.dat index d92c3da7b..650ecf8c8 100644 --- a/data/levels/level1.dat +++ b/data/levels/level1.dat @@ -1,7 +1,7 @@ Antarctica antarctica 255 -j_turn.it +ji_turn.it 128 192 255 diff --git a/src/gameloop.c b/src/gameloop.c index fbcc86080..3bc9ca228 100644 --- a/src/gameloop.c +++ b/src/gameloop.c @@ -562,9 +562,10 @@ int gameloop(void) /* Either way, (re-)load the (next) level... */ loadlevel(); - unloadlevelgfx(); loadlevelgfx(); + unloadlevelsong(); + loadlevelsong(); } /* Move tux: */ @@ -2243,6 +2244,7 @@ void loadlevel(void) /* (Song file for this level) */ fgets(str, 20, fi); strcpy(song_title, str); + song_title[strlen(song_title)-1] = '\0'; /* (Level background color) */ fgets(str, 10, fi); @@ -2399,7 +2401,7 @@ void loadlevelsong(void) sprintf(song_path, "%s/music/%s", DATA_PREFIX, song_title); - song = load_song(DATA_PREFIX "/music/ji_turn.it"); + song = load_song(song_path); free(song_path); } -- 2.11.0