debian/0000755000000000000000000000000012223001430007151 5ustar debian/postinst0000644000000000000000000000227312223001046010766 0ustar #!/bin/sh # postinst script for gweled # set -e case "$1" in configure) if [ -f /var/games/gweled.easy.scores ]; then if [ ! -f /var/games/gweled.Normal.scores ]; then mv /var/games/gweled.easy.scores /var/games/gweled.Normal.scores; else rm /var/games/gweled.easy.scores; fi fi if [ -f /var/games/gweled.timed.scores ]; then if [ ! -f /var/games/gweled.Timed.scores ]; then mv /var/games/gweled.timed.scores /var/games/gweled.Timed.scores; else rm /var/games/gweled.timed.scores; fi fi if [ -f /var/games/gweled.hard.scores ]; then rm /var/games/gweled.hard.scores; fi for scorefile in Normal Timed; do [ ! -f /var/games/gweled.${scorefile}.scores ] && \ touch /var/games/gweled.${scorefile}.scores; chown root:games /var/games/gweled.${scorefile}.scores; chmod 664 /var/games/gweled.${scorefile}.scores; done dpkg-statoverride --remove /usr/games/gweled >/dev/null 2>&1 || true dpkg-statoverride --update --add root games 02755 /usr/games/gweled ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 debian/watch0000644000000000000000000000012512223001046010203 0ustar version=3 https://launchpad.net/gweled/ .*/gweled-(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz)) debian/copyright0000644000000000000000000000240712223001046011112 0ustar This package was debianized by Ondřej Surý on Sat, 14 Aug 2004 10:12:36 +0200. It was downloaded from https://launchpad.net/gweled Upstream Authors: Sebastien Delestaing (up to 0.7) Daniele Napolitano (0.8 onwards) Copyright: Copyright (C) 2003-2005 Sebastien Delestaing Copyright (C) 2010 Daniele Napolitano License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GPL can be found in /usr/share/common-licenses/GPL. debian/dirs0000644000000000000000000000007612223001046010043 0ustar usr/games usr/share/gweled usr/share/pixmaps/gweled var/games debian/source/0000755000000000000000000000000012223001046010454 5ustar debian/source/format0000644000000000000000000000001412223001046011662 0ustar 3.0 (quilt) debian/repack.sh0000755000000000000000000000116712223001046010765 0ustar #!/bin/bash set -e if [ ! -f "$3" ] && [ ! -f "$1" ]; then echo "This script must be run via uscan or by manually specifying the tarball" >&2 exit 1 fi tarball= [ -f "$3" ] && tarball="$3" [ -z "$tarball" -a -f "$1" ] && tarball="$1" fname="$(basename "$tarball")" tarball="$(readlink -f "$tarball")" tdir="$(mktemp -d)" trap '[ ! -d "$tdir" ] || rm -r "$tdir"' EXIT zcat "$tarball" | tar --wildcards --delete '*/autom4te.cache/*' --delete '*/autom4te.cache/' > "$tdir/${fname/.gz}" #touch -m -r "$tarball" "$tdir/${fname/.gz}" gzip -9 "$tdir/${fname/.gz}" mv "$tarball" "$tarball.bkp" mv "$tdir/$fname" "$tarball" debian/changelog0000644000000000000000000000777312223001046011044 0ustar gweled (0.9.1-3) unstable; urgency=low * Update watch file * Use dh-autoreconf (Closes: #724917) -- Ondřej Surý Wed, 02 Oct 2013 13:23:14 +0200 gweled (0.9.1-2) unstable; urgency=low * Change homepage and add libesd0-dev build dependency -- Ondřej Surý Fri, 01 Apr 2011 16:04:27 +0200 gweled (0.9.1-1) unstable; urgency=low * Imported Upstream version 0.9.1 (Closes: #610915) -- Ondřej Surý Fri, 01 Apr 2011 13:49:09 +0200 gweled (0.9-1) unstable; urgency=low * Imported Upstream version 0.9 (Closes: #610915) * Debian packaging: + Add a watch file -- Ondřej Surý Mon, 24 Jan 2011 14:00:10 +0100 gweled (0.8.repack-5) unstable; urgency=medium * Add autoreconf call after patching src/Makefile.am to use sound.{h,c} * Make intltool-update ignore files in quilt .pc/ directory * Only remove the content of /var/games, not the directory itself (Closes: #595590) * Bump standards version to 3.9.1 -- Ondřej Surý Mon, 13 Sep 2010 14:31:54 +0200 gweled (0.8.repack-4) unstable; urgency=low * Add /var/games to debian/dirs (Closes: #591597) -- Ondřej Surý Wed, 04 Aug 2010 09:28:45 +0200 gweled (0.8.repack-3) unstable; urgency=low * Fix bashism and typo in debian/postrm -- Ondřej Surý Sun, 11 Jul 2010 19:03:10 +0200 gweled (0.8.repack-2) unstable; urgency=low * Capitalize GNOME to shut-up lintian (Closes: #585797) * Remove autotools dependency, leave only intltool * Add handling of score files (Closes: #587043) * Remove /var/games before packing the package -- Ondřej Surý Sun, 11 Jul 2010 18:57:02 +0200 gweled (0.8.repack-1) unstable; urgency=low * Imported Upstream version 0.8.repack (now for real) (Closes: #582829) * Fix extra line in debian/rules * Change debhelper compatibility level to 7 * Update build dependencies to include only GTK+, rsvg2 and mikmod. -- Ondřej Surý Mon, 24 May 2010 16:26:14 +0200 gweled (0.8-1) unstable; urgency=low * New upstream version 0.8 (Closes: #582028) * New upstream author: Daniele Napolitano * Regenerate control. (Closes: #554070, #523541) * All patches merged upstream, all Debian bugs fixed. Closes: #398250, #406884, #402169 -- Ondřej Surý Tue, 18 May 2010 11:42:59 +0200 gweled (0.7-2) unstable; urgency=low * Disable disk writer driver in MikMod initialization (Closes: #401727, #401375) * Fix double free when exiting (Closes: #401730) -- Ondřej Surý Tue, 5 Dec 2006 18:20:44 +0100 gweled (0.7-1) unstable; urgency=low * New upstream release. (Closes: #392973) + Removed some patches merged upstream. * Added -rdynamic CFLAG (Closes: #392971) -- Ondřej Surý Mon, 23 Oct 2006 14:14:41 +0200 gweled (0.6-2) unstable; urgency=low * Fix missing DESTDIR in scoredir (Closes: #307643) -- Ondřej Surý Fri, 6 May 2005 21:25:38 +0200 gweled (0.6-1) unstable; urgency=low * New upstream release. * Apply patch to fix timed game speed not resetting (Closes: #286874) - credits to Neil Moore * Apply patch to fix FTBFS on amd64 (Closes: #286956) - credits to Andreas Jochens -- Ondřej Surý Tue, 3 May 2005 20:48:13 +0200 gweled (0.5-2) unstable; urgency=low * Fix PPC runtime error, credits to Michael Klein (Closes: #280506) -- Ondřej Surý Wed, 10 Nov 2004 12:37:17 +0100 gweled (0.5-1) unstable; urgency=low * New upstream release. * Remove upstream score file from package. * Move binary to /usr/games and make it setgid games (Closes: #268682) * Create debian menu entry (Closes: #268682) -- Ondřej Surý Thu, 2 Sep 2004 09:34:12 +0200 gweled (0.4-1) unstable; urgency=low * Initial Release. (Closes: #225711) -- Ondřej Surý Thu, 19 Aug 2004 08:58:17 +0200 debian/control0000644000000000000000000000156012223001046010561 0ustar Source: gweled Section: games Priority: optional Maintainer: Ondřej Surý Build-Depends: debhelper (>= 9), quilt, libesd0-dev, libgtk2.0-dev (>= 2.14), librsvg2-dev, libmikmod2-dev, intltool, hardening-wrapper, dh-autoreconf Standards-Version: 3.9.1 Homepage: http://gweled.org/ Vcs-Browser: http://git.debian.org/?p=users/ondrej/gweled.git Vcs-Git: git://git.debian.org/users/ondrej/gweled.git Package: gweled Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: A "Diamond Mine" puzzle game Gweled is a GNOME version of a popular PalmOS/Windows/Java game called "Bejeweled" or "Diamond Mine". The aim of the game is to make alignment of 3 or more gems, both vertically or horizontally by swapping adjacent gems. The game ends when there are no possible moves left. debian/docs0000644000000000000000000000000512223001046010022 0ustar NEWS debian/rules0000755000000000000000000000055612223001046010242 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DH_OPTIONS export DEB_BUILD_HARDENING=1 %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --bindir=\$${prefix}/games --localstatedir=/var override_dh_auto_install: dh_auto_install rm -rf $(CURDIR)/debian/gweled/var/games/* debian/patches/0000755000000000000000000000000012223001046010603 5ustar debian/patches/002-release-sound-if-not-used.patch0000644000000000000000000004014012223001046017020 0ustar === modified file 'src/Makefile.am' --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ gweled_SOURCES = \ graphic_engine.c graphic_engine.h \ sge_core.c sge_core.h \ sge_utils.c sge_utils.h \ - music.c music.h \ + sound.c sound.h \ games-score.c games-score.h \ games-scores.c games-scores.h \ games-scores-backend.c games-scores-backend.h \ --- a/src/board_engine.c +++ b/src/board_engine.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "games-scores.h" @@ -39,6 +38,7 @@ #include "sge_core.h" #include "board_engine.h" #include "graphic_engine.h" +#include "sound.h" #define FIRST_BONUS_AT 100 // needs tweaking #define NB_BONUS_GEMS 8 // same @@ -62,8 +62,6 @@ typedef struct s_alignment { gint length; } T_Alignment; -SAMPLE *swap_sfx; - gint gi_score, gi_current_score, gi_game_running, gi_game_paused; gint gi_total_gems_removed; @@ -595,8 +593,8 @@ board_engine_loop (gpointer data) sge_object_move_to (g_gem_objects[x2][y2], x1 * prefs.tile_size, y1 * prefs.tile_size); - if(swap_sfx && prefs.sounds_on == TRUE) - Sample_Play(swap_sfx, 0, 0); + if(prefs.sounds_on == TRUE) + sound_play_sample(SWAP_EVENT); gi_state = _SECOND_GEM_CLICKED; } else if((x1 == x2) && (y1 == y2)) { if (cursor[1]) --- a/src/callbacks.c +++ b/src/callbacks.c @@ -24,10 +24,9 @@ #include #include -#include #include "main.h" -#include "music.h" +#include "sound.h" #include "sge_core.h" #include "board_engine.h" #include "graphic_engine.h" @@ -43,6 +42,8 @@ extern GtkWidget *g_score_window; extern GtkWidget *g_drawing_area; extern GdkPixmap *g_buffer_pixmap; extern GtkWidget *g_menu_pause; +extern GtkWidget *g_pref_music_button; +extern GtkWidget *g_pref_sounds_button; extern gint gi_gem_clicked; extern gint gi_x_click; @@ -55,8 +56,6 @@ extern gint gi_y_drag; extern guint board_engine_id; extern GweledPrefs prefs; -SAMPLE *click_sfx; - static gint gi_dragging = 0; void @@ -207,8 +206,8 @@ drawing_area_button_event_cb (GtkWidget gi_gem_clicked = -1; gi_dragging = -1; - if(click_sfx && prefs.sounds_on == TRUE) - Sample_Play(click_sfx, 0, 0); + if(prefs.sounds_on) + sound_play_sample(CLICK_EVENT); } break; @@ -385,10 +384,20 @@ void on_music_checkbutton_toggled (GtkToggleButton * togglebutton, gpointer user_data) { if (gtk_toggle_button_get_active (togglebutton)) { - music_play(); - } - else { - music_stop(); + prefs.music_on = TRUE; + if(sound_get_enabled() == FALSE) { + sound_init(); + if(sound_get_enabled() == FALSE) { + gtk_widget_set_sensitive(g_pref_music_button, FALSE); + gtk_widget_set_sensitive(g_pref_sounds_button, FALSE); + } + } + sound_music_play(); + } else { + prefs.music_on = FALSE; + sound_music_stop(); + if(prefs.sounds_on == FALSE) + sound_destroy(); } } @@ -396,9 +405,19 @@ void on_sounds_checkbutton_toggled (GtkToggleButton * togglebutton, gpointer user_data) { if (gtk_toggle_button_get_active (togglebutton)) { - prefs.sounds_on = TRUE; - } - else { + prefs.sounds_on = TRUE; + if(sound_get_enabled() == FALSE) { + sound_init(); + if(sound_get_enabled() == FALSE) { + gtk_widget_set_sensitive(g_pref_music_button, FALSE); + gtk_widget_set_sensitive(g_pref_sounds_button, FALSE); + } + } + sound_load_samples(); + } else { prefs.sounds_on = FALSE; - } + sound_unload_samples(); + if(prefs.music_on == FALSE) + sound_destroy(); + } } --- a/src/main.c +++ b/src/main.c @@ -33,13 +33,10 @@ #include "games-scores.h" #include "games-scores-dialog.h" -#include -#include - #include "sge_core.h" #include "board_engine.h" #include "graphic_engine.h" -#include "music.h" +#include "sound.h" #include "main.h" // GLOBALS @@ -53,13 +50,14 @@ GtkWidget *g_progress_bar; GtkWidget *g_score_label; GtkWidget *g_bonus_label; GtkWidget *g_menu_pause; +GtkWidget *g_pref_music_button; +GtkWidget *g_pref_sounds_button; GdkPixmap *g_buffer_pixmap = NULL; GRand *g_random_generator; guint board_engine_id; GweledPrefs prefs; -pthread_t thread; static const GamesScoresCategory scorecats[] = { {"Normal", NC_("game type", "Normal") }, @@ -68,8 +66,6 @@ static const GamesScoresCategory scoreca GamesScores *highscores; -SAMPLE *swap_sfx, *click_sfx; - extern gint gi_game_running; void save_preferences(void) @@ -262,14 +258,6 @@ show_hiscores (gint pos, gboolean endofg return result; } -void mikmod_thread(void *ptr) -{ - while (1) { - g_usleep(10000); - MikMod_Update(); - } -} - int main (int argc, char **argv) { GError* error = NULL; @@ -294,7 +282,6 @@ int main (int argc, char **argv) gtk_window_set_default_icon_name ("gweled"); - music_init (); sge_init (); g_random_generator = g_rand_new_with_seed (time (NULL)); @@ -312,6 +299,8 @@ int main (int argc, char **argv) g_score_label = GTK_WIDGET (gtk_builder_get_object (gweled_xml, "scoreLabel")); g_drawing_area = GTK_WIDGET (gtk_builder_get_object (gweled_xml, "boardDrawingarea")); g_menu_pause = GTK_WIDGET (gtk_builder_get_object (gweled_xml, "pause1")); + g_pref_music_button = GTK_WIDGET (gtk_builder_get_object (gweled_xml, "music_checkbutton")); + g_pref_sounds_button = GTK_WIDGET (gtk_builder_get_object (gweled_xml, "sounds_checkbutton")); load_preferences(); init_pref_window(); @@ -339,29 +328,20 @@ int main (int argc, char **argv) gi_game_running = 0; - // load sound fx - swap_sfx = Sample_Load(DATADIR "/sounds/gweled/swap.wav"); - if (!swap_sfx) { - g_warning("Could not load swap.wav, reason: %s", MikMod_strerror(MikMod_errno)); - - } - click_sfx = Sample_Load(DATADIR "/sounds/gweled/click.wav"); - if (!click_sfx) { - g_warning("Could not load click.wav, reason: %s", MikMod_strerror(MikMod_errno)); - } - - MikMod_SetNumVoices(-1, 4); - Voice_SetVolume(0, 255); - Voice_SetVolume(1, 255); - Voice_SetVolume(2, 255); - Voice_SetVolume(3, 255); + if(prefs.music_on || prefs.sounds_on) { + sound_init(); + if(sound_get_enabled() == FALSE) { + gtk_widget_set_sensitive(g_pref_music_button, FALSE); + gtk_widget_set_sensitive(g_pref_sounds_button, FALSE); + } + } - MikMod_EnableOutput(); - pthread_create(&thread, NULL, (void *)&music_thread, NULL); + if (prefs.sounds_on) + sound_load_samples(); if (prefs.music_on) - music_play(); + sound_music_play(); sge_set_drawing_area (g_drawing_area, g_buffer_pixmap, BOARD_WIDTH * prefs.tile_size, @@ -372,7 +352,7 @@ int main (int argc, char **argv) gtk_main (); - MikMod_DisableOutput(); + sound_destroy(); sge_destroy (); if(board_engine_id) @@ -380,15 +360,6 @@ int main (int argc, char **argv) g_rand_free (g_random_generator); g_object_unref(G_OBJECT(gweled_xml)); - music_stop(); - - if(swap_sfx) - Sample_Free(swap_sfx); - if(click_sfx) - Sample_Free(click_sfx); - - MikMod_Exit(); - return 0; } --- a/src/music.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Gweled - * - * Copyright (C) 2003-2005 Sebastien Delestaing - * Copyright (C) 2010 Daniele Napolitano - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include - -#include "music.h" -#include "board_engine.h" - -extern GweledPrefs prefs; -extern pthread_t thread; - -static MODULE *module; -static gboolean is_playing; - -void music_init() -{ - /* register all the drivers */ - MikMod_RegisterDriver(&drv_AF); - MikMod_RegisterDriver(&drv_esd); - MikMod_RegisterDriver(&drv_alsa); - MikMod_RegisterDriver(&drv_oss); - MikMod_RegisterDriver(&drv_nos); - - /* register all the module loaders */ - MikMod_RegisterAllLoaders(); - - /* initialize the library */ - if (MikMod_Init("")) - { - fprintf(stderr, "Could not initialize sound, reason: %s\n", MikMod_strerror(MikMod_errno)); - //return; don't fail on sound problems - } - is_playing = FALSE; - -} - -void music_thread(void *ptr) -{ - while (1) { - g_usleep(10000); - MikMod_Update(); - } -} - -void music_play() -{ - if (!music_isplaying()) - { - // load module - module = Player_Load(DATADIR "/sounds/gweled/autonom.s3m", 64, 0); - if (module) { - Player_Start(module); - Player_SetVolume(64); - pthread_create(&thread, NULL, (void *)&music_thread, NULL); - prefs.music_on = TRUE; - is_playing = TRUE; - - } else - fprintf(stderr, "Could not load module, reason: %s\n", MikMod_strerror(MikMod_errno)); - } -} - -void music_stop() -{ - if (music_isplaying()){ - if (module) - { - Player_Stop(); - Player_Free(module); - pthread_cancel(thread); - pthread_join(thread, NULL); - prefs.music_on = FALSE; - is_playing = FALSE; - } - } - -} - -gboolean music_isplaying() -{ - return is_playing; -} - --- /dev/null +++ b/src/sound.c @@ -0,0 +1,168 @@ +/* Gweled + * + * Copyright (C) 2003-2005 Sebastien Delestaing + * Copyright (C) 2010 Daniele Napolitano + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +#include "sound.h" +#include "board_engine.h" + +static pthread_t thread; + +static MODULE *module; +static SAMPLE *swap_sfx = NULL; +static SAMPLE *click_sfx = NULL; + +static gboolean is_playing; +static gboolean sound_available; + +void sound_thread(void *ptr) +{ + while (1) { + g_usleep(10000); + MikMod_Update(); + } +} + +void sound_init() +{ + /* register all the drivers */ + MikMod_RegisterDriver(&drv_esd); + MikMod_RegisterDriver(&drv_alsa); + MikMod_RegisterDriver(&drv_oss); + MikMod_RegisterDriver(&drv_nos); + + /* register all the module loaders */ + MikMod_RegisterAllLoaders(); + + /* initialize the library */ + if (MikMod_Init("")) { + g_printerr("Could not initialize sound, reason: %s\n", MikMod_strerror(MikMod_errno)); + MikMod_Exit(); + sound_available = FALSE; + } else { + sound_available = TRUE; + MikMod_EnableOutput(); + pthread_create(&thread, NULL, (void *)&sound_thread, NULL); + g_print("Audio driver choosen: %s\n", md_driver->Name); + } + + is_playing = FALSE; + +} + +void sound_music_play() +{ + if (!is_playing && sound_available) { + // load module + module = Player_Load(DATADIR "/sounds/gweled/autonom.s3m", 64, 0); + if (module) { + Player_Start(module); + Player_SetVolume(64); + is_playing = TRUE; + + } else + fprintf(stderr, "Could not load module, reason: %s\n", MikMod_strerror(MikMod_errno)); + } +} + +void sound_music_stop() +{ + if (is_playing && sound_available) { + if (module) + { + Player_Stop(); + Player_Free(module); + is_playing = FALSE; + } + } +} + +// load sound fx +void sound_load_samples() +{ + if (sound_available == FALSE) + return; + + if (!swap_sfx) + swap_sfx = Sample_Load(DATADIR "/sounds/gweled/swap.wav"); + if (!swap_sfx) + g_warning("Could not load swap.wav, reason: %s", MikMod_strerror(MikMod_errno)); + + if (!click_sfx) + click_sfx = Sample_Load(DATADIR "/sounds/gweled/click.wav"); + if (!click_sfx) + g_warning("Could not load click.wav, reason: %s", MikMod_strerror(MikMod_errno)); + + MikMod_SetNumVoices(-1, 2); +} + +void sound_unload_samples() +{ + if (swap_sfx) { + Sample_Free(swap_sfx); + swap_sfx = NULL; + } + if (click_sfx) { + Sample_Free(click_sfx); + click_sfx = NULL; + } +} + +// play sound fx +void sound_play_sample(gweled_sound_samples sample) +{ + if (sound_available == FALSE) + return; + + switch (sample) { + case CLICK_EVENT: + if(click_sfx) + Sample_Play(click_sfx, 0, 0); + break; + case SWAP_EVENT: + if(swap_sfx) + Sample_Play(swap_sfx, 0, 0); + break; + } +} + +void sound_destroy() +{ + if (sound_available) { + sound_music_stop(); + + pthread_cancel(thread); + pthread_join(thread, NULL); + + sound_unload_samples(); + + MikMod_DisableOutput(); + MikMod_Exit(); + + sound_available = FALSE; + } +} + +gboolean sound_get_enabled() +{ + return sound_available; +} --- a/src/music.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Gweled - * - * Copyright (C) 2003-2005 Sebastien Delestaing - * Copyright (C) 2010 Daniele Napolitano - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include - -void music_init(); -void music_thread(void *ptr); -void music_play(); -void music_stop(); -int music_isplaying(); --- /dev/null +++ b/src/sound.h @@ -0,0 +1,41 @@ +/* Gweled + * + * Copyright (C) 2003-2005 Sebastien Delestaing + * Copyright (C) 2010 Daniele Napolitano + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef _SOUND_H_ +#define _SOUND_H_ + +#include + +typedef enum e_gweled_sound_samples +{ + CLICK_EVENT, + SWAP_EVENT +} gweled_sound_samples; + +void sound_init(void); +void sound_music_play(void); +void sound_music_stop(void); +void sound_load_samples(void); +void sound_unload_samples(void); +void sound_play_sample(gweled_sound_samples sample); +void sound_destroy(void); +gboolean sound_get_enabled(); + +#endif debian/patches/series0000644000000000000000000000010312223001046012012 0ustar 001-potfiles.patch 003-intools-update_ignore_quilt_directory.patch debian/patches/001-potfiles.patch0000644000000000000000000000030012223001046013740 0ustar --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -6,3 +6,4 @@ src/board_engine.c src/games-scores-dialog.c [type: gettext/glade]data/gweled.ui data/gweled.desktop.in +src/games-scores-dialog.c debian/patches/003-intools-update_ignore_quilt_directory.patch0000644000000000000000000000007112223001046021736 0ustar --- /dev/null +++ b/po/POTFILES.skip @@ -0,0 +1 @@ +.pc/ debian/gbp.conf0000644000000000000000000000025412223001046010574 0ustar [DEFAULT] debian-branch = debian-sid debian-tag = debian/%(version)s upstream-branch = upstream upstream-tag = upstream/%(version)s pristine-tar = True [git-dch] meta = 1 debian/compat0000644000000000000000000000000212223001046010352 0ustar 9 debian/postrm0000644000000000000000000000057212223001046010427 0ustar #!/bin/sh # postrm script for #PACKAGE# set -e case "$1" in purge) for scorefile in easy hard Normal Timed; do rm -f /var/games/gweled.${scorefile}.scores; done ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0