From 702e4c671de1ea21fbd112129274930f95fdba4c Mon Sep 17 00:00:00 2001 From: stpohle Date: Tue, 29 Jul 2003 23:20:13 +0000 Subject: [PATCH] Musicplay added Random Music Selection will follow soon --- ChangeLog | 7 ++++++- data/Makefile.am | 8 ++++---- src/game.c | 5 +++-- src/sound.c | 11 ++++------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa8d7df..3416801 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -$Id: ChangeLog,v 1.35 2003/07/27 21:47:22 patty21 Exp $ +$Id: ChangeLog,v 1.36 2003/07/29 23:20:13 stpohle Exp $ + +- the first music file added to the game made by + Digital_D + + Version 0.10.0 ============== diff --git a/data/Makefile.am b/data/Makefile.am index 4c42c4f..2d52cd7 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -20,10 +20,10 @@ install: @if test ! -d ${DESTDIR}@PACKAGE_DATA_DIR@; then \ mkdir ${DESTDIR}@PACKAGE_DATA_DIR@; \ fi; - cp player ${DESTDIR}@PACKAGE_DATA_DIR@ -rf - cp maps ${DESTDIR}@PACKAGE_DATA_DIR@ -rf - cp gfx ${DESTDIR}@PACKAGE_DATA_DIR@ -rf - cp tileset ${DESTDIR}@PACKAGE_DATA_DIR@ -rf + cp -rf player ${DESTDIR}@PACKAGE_DATA_DIR@ + cp -rf maps ${DESTDIR}@PACKAGE_DATA_DIR@ + cp -rf gfx ${DESTDIR}@PACKAGE_DATA_DIR@ + cp -rf tileset ${DESTDIR}@PACKAGE_DATA_DIR@ uninstall: rm -rf ${DESTDIR}@PACKAGE_DATA_DIR@ diff --git a/src/game.c b/src/game.c index 7d6c2dc..ca2c081 100644 --- a/src/game.c +++ b/src/game.c @@ -1,4 +1,4 @@ -/* $Id: game.c,v 1.50 2003/07/27 21:09:57 stpohle Exp $ +/* $Id: game.c,v 1.51 2003/07/29 23:20:14 stpohle Exp $ game.c - procedures for the game. */ #include @@ -254,6 +254,7 @@ game_end () { int i; + snd_music_stop (); gfx_free_players (); tileset_free (); snd_free (); @@ -286,7 +287,7 @@ game_start () tileset_load (map.tileset); gfx_load_players (gfx.block.x, gfx.block.y); snd_load (map.tileset); - + snd_music_start (); map.state = MS_normal; bman.timeout = GAME_TIMEOUT; }; diff --git a/src/sound.c b/src/sound.c index faafce4..1289347 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,4 +1,4 @@ -/* $Id: sound.c,v 1.1 2003/05/26 20:35:43 stpohle Exp $ */ +/* $Id: sound.c,v 1.2 2003/07/29 23:20:14 stpohle Exp $ */ /* sound */ #include "sound.h" @@ -100,12 +100,9 @@ snd_load (char *tilesetname) } /* try loading the music from the tileset or the default */ - sprintf (fullname, "%s/tileset/%s/music.ogg", bman.datapath, tilesetname); - if ((snd.music = Mix_LoadMUS (fullname)) == NULL) { - sprintf (fullname, "%s/tileset/default/music.ogg", bman.datapath); - if ((snd.music = Mix_LoadMUS (fullname)) == NULL) - d_printf ("Couldn't load %s: %s\n", fullname, SDL_GetError ()); - } + sprintf (fullname, "%s/music/bc-by-digital_d.xm", bman.datapath); + if ((snd.music = Mix_LoadMUS (fullname)) == NULL) + d_printf ("Couldn't load %s: %s\n", fullname, SDL_GetError ()); #endif return;