r6570 - in packages/trunk/biniax2/debian: . patches

Miriam Ruiz baby-guest at alioth.debian.org
Tue Apr 15 16:32:09 UTC 2008


Author: baby-guest
Date: 2008-04-15 16:32:09 +0000 (Tue, 15 Apr 2008)
New Revision: 6570

Added:
   packages/trunk/biniax2/debian/patches/sound.patch
Modified:
   packages/trunk/biniax2/debian/biniax2.6
   packages/trunk/biniax2/debian/biniax2.install
   packages/trunk/biniax2/debian/patches/series
   packages/trunk/biniax2/debian/rules
Log:
Start the game even if no sound subsystem is available



Modified: packages/trunk/biniax2/debian/biniax2.6
===================================================================
--- packages/trunk/biniax2/debian/biniax2.6	2008-04-15 15:31:30 UTC (rev 6569)
+++ packages/trunk/biniax2/debian/biniax2.6	2008-04-15 16:32:09 UTC (rev 6570)
@@ -8,7 +8,18 @@
 
 Playing the game is really simple: you move a single tile around a field of pairs of tiles. You can remove a pair from the game board if one of the tiles is similar to your own. When you do that, your tile changes into the other tile that was part of the pair you just removed. You have to do this quickly, otherwise the pairs will pile on top of you and take you to the Game Over screen.
 .SH "SEE ALSO"
-Homepage of the game: http://biniax.com
+.TP 
+Homepage of the game:
+http://biniax.com
+.br 
+.TP 
+User Configuration File:
+~/.biniax2
+.br 
+.TP 
+User Configuration Example:
+/usr/share/doc/biniax2/config.bnx2
+
 .SH "AUTHOR"
 Biniax 2 was written by Jordan Tuzsuzov <jordan at biniax.com>.
 .PP 

Modified: packages/trunk/biniax2/debian/biniax2.install
===================================================================
--- packages/trunk/biniax2/debian/biniax2.install	2008-04-15 15:31:30 UTC (rev 6569)
+++ packages/trunk/biniax2/debian/biniax2.install	2008-04-15 16:32:09 UTC (rev 6570)
@@ -1,3 +1,4 @@
 src/biniax2 usr/games/
 debian/*.xpm usr/share/pixmaps/
 debian/*.desktop usr/share/applications/
+config.bnx2 usr/share/doc/biniax2/

Modified: packages/trunk/biniax2/debian/patches/series
===================================================================
--- packages/trunk/biniax2/debian/patches/series	2008-04-15 15:31:30 UTC (rev 6569)
+++ packages/trunk/biniax2/debian/patches/series	2008-04-15 16:32:09 UTC (rev 6570)
@@ -1 +1,2 @@
 datadir.patch
+sound.patch

Added: packages/trunk/biniax2/debian/patches/sound.patch
===================================================================
--- packages/trunk/biniax2/debian/patches/sound.patch	                        (rev 0)
+++ packages/trunk/biniax2/debian/patches/sound.patch	2008-04-15 16:32:09 UTC (rev 6570)
@@ -0,0 +1,151 @@
+# Copyright (C) 2008 by Miriam Ruiz <little_miry at yahoo.es>
+# Distributed under the same license as the game. See debian/copyright
+
+Index: biniax2/src/biniax.c
+===================================================================
+--- biniax2.orig/src/biniax.c	2008-04-15 16:20:53.000000000 +0000
++++ biniax2/src/biniax.c	2008-04-15 16:25:47.000000000 +0000
+@@ -100,13 +100,27 @@
+ 	cfgInit();
+ 	hofInit();
+ 	if ( gfxInit() == BNX_FALSE )
++	{
++		fprintf(stderr, "Error in Graphics Initialization\n");
+ 		return -1;
++	}
+ 	if ( sysInit() == BNX_FALSE )
++	{
++		fprintf(stderr, "Error in System Initialization\n");
+ 		return -2;
++	}
+ 	if ( inpInit() == BNX_FALSE )
++	{
++		fprintf(stderr, "Error in Input Initialization\n");
+ 		return -3;
++	}
+ 	if ( sndInit() == BNX_FALSE )
+-		return -4;
++	{
++		fprintf(stderr, "Error in Sound Initialization\n");
++		cfgSetSound(BNX_FALSE);
++		cfgSetMusic(BNX_FALSE);
++		/* return -4; */
++	}
+ 	
+ 	/******************************************************************
+ 	SHOW INITIAL WELCOME SCREEN                                                
+Index: biniax2/src/desktop/cfg.c
+===================================================================
+--- biniax2.orig/src/desktop/cfg.c	2008-04-15 16:20:53.000000000 +0000
++++ biniax2/src/desktop/cfg.c	2008-04-15 16:23:16.000000000 +0000
+@@ -30,6 +30,17 @@
+ 
+ #include "inc.h"
+ 
++#ifndef _WIN32
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <unistd.h>
++#include <limits.h>
++#include <pwd.h>
++#include <fcntl.h>
++#include <sys/stat.h>
++#include <sys/types.h>
++#endif
+ 
+ /******************************************************************************
+ FUNCTIONS
+@@ -52,13 +63,38 @@
+ 	char	buffer[ _Cfg_Buffer ];
+ 	int		nTemp;
+ 
++#ifndef _WIN32
++	char filename[PATH_MAX];
++	char *home;	
++	struct passwd *passwd;
++	if (!getuid() || !(home = getenv("HOME")))
++	{
++		passwd = getpwuid (getuid());
++		home=passwd->pw_dir;
++		if (!home)
++		{
++			fprintf(stderr, "$HOME is not defined.n");
++			return BNX_FALSE;
++		}
++	}
++	if (strlen(home) > PATH_MAX - sizeof("/.biniax2"))
++	{
++		fprintf(stderr, "$HOME is excessively long.n");
++		return BNX_FALSE;
++	}
++	snprintf(filename, sizeof(filename), "%s/.biniax2", home);
++#else
++	char filename[] = "./config.bnx2";
++#endif
++	
+ 	_Cfg.sound = BNX_TRUE;
+ 	_Cfg.music = BNX_TRUE;
+ 	_Cfg.fullscreen = BNX_FALSE;
+ 
+-	f = fopen( "config.bnx2", "rt" );
++	f = fopen( filename, "rt" );
+ 	if ( f == 0 )
+ 	{
++		fprintf( stderr,"Configuration file \"%s\" not found\n", filename );
+ 		return BNX_FALSE;
+ 	}
+ 
+@@ -76,6 +112,10 @@
+ 
+ 	fclose( f );
+ 
++	fprintf( stderr, _Cfg.sound ? "Sound On\n" : "Sound Off\n" );
++	fprintf( stderr, _Cfg.music ? "Music On\n" : "Music Off\n" );
++	fprintf( stderr, _Cfg.fullscreen ? "Fullscreen On\n" : "Fullscreen Off\n" );
++
+ 	return BNX_TRUE;
+ }
+ 
+@@ -84,12 +124,28 @@
+ 	return _Cfg.sound;
+ }
+ 
++void cfgSetSound(BNX_BOOL b)
++{
++	_Cfg.sound = b;
++}
++
++
+ BNX_BOOL cfgGetMusic()
+ {
+ 	return _Cfg.music;
+ }
+ 
++void cfgSetMusic(BNX_BOOL b)
++{
++	_Cfg.music = b;
++}
++
+ BNX_BOOL cfgGetFullscreen()
+ {
+ 	return _Cfg.fullscreen;
+ }
++
++void cfgSetFullscreen(BNX_BOOL b)
++{
++	_Cfg.fullscreen = b;
++}
+Index: biniax2/src/desktop/cfg.h
+===================================================================
+--- biniax2.orig/src/desktop/cfg.h	2008-04-15 16:23:30.000000000 +0000
++++ biniax2/src/desktop/cfg.h	2008-04-15 16:24:10.000000000 +0000
+@@ -43,4 +43,8 @@
+ BNX_BOOL cfgGetMusic();
+ BNX_BOOL cfgGetFullscreen();
+ 
++void cfgSetSound(BNX_BOOL);
++void cfgSetMusic(BNX_BOOL);
++void cfgSetFullscreen(BNX_BOOL);
++                                             
+ #endif

Modified: packages/trunk/biniax2/debian/rules
===================================================================
--- packages/trunk/biniax2/debian/rules	2008-04-15 15:31:30 UTC (rev 6569)
+++ packages/trunk/biniax2/debian/rules	2008-04-15 16:32:09 UTC (rev 6570)
@@ -1,13 +1,7 @@
 #!/usr/bin/make -f
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -ggdb
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
-else
-        CFLAGS += -O2
-endif
-
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
@@ -56,7 +50,7 @@
 	dh_desktop
 	dh_installman debian/biniax2.6
 	dh_link
-	dh_strip
+#	dh_strip
 	dh_compress
 	dh_fixperms
 	dh_installdeb




More information about the Pkg-games-commits mailing list