Commit bb4bd0dd authored by Christian Steigies's avatar Christian Steigies

Imported Debian patch 1.0.3-28

parent 505cbabe
circuslinux (1.0.3-15) unstable; urgency=low
Since version 1.0.3-5 Circuslinux! uses a shared score file.
From now on highscores will no longer be saved in ~/.circuslinux but in
/var/games/circuslinux/scorefile. For configuration options the new file
~/.circuslinuxrc will be used.
To merge all players' old highscores into one file, you can run:
bash /usr/share/doc/circuslinux/merge_scorefiles.sh as root.
Each player can then, _after_ playing this version of Circuslinux! at
least once, delete his ~/.circuslinux file, since his configuration
options will be saved in ~/.circuslinuxrc. If the player decides not to
delete ~/.circuslinux, he can still use a version of circuslinux which was
compiled without shared scorefile support without loosing his old score-
and config file. Circuslinux! with shared scorefile support will only read
the old config file to get the players options if ~/.circuslinuxrc does
not exist, but never write to this file.
In short: don't worry, play Circuslinux! If you run low on diskspace and
every block counts, you might tell your users to remove the old config
file.
Note: this used to be a debconf message, by placing it into NEWS.Debian,
the translations are lost.
-- Christian T. Steigies <cts@debian.org> Fri, 12 Aug 2005 23:11:12 +0200
This diff is collapsed.
AUTHORS
FAQ.txt
README
usr/share/games/circuslinux
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH CIRCUSLINUX 6 "November 10, 2004"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
circuslinux \- The clowns are trying to pop balloons to score points!
.SH SYNOPSIS
.B circuslinux [--disable-sound] [--fullscreen] [--low] | [--digital] [--paddle] [--help | --usage] [--version]
.SH DESCRIPTION
This manual page was written for the Debian GNU/Linux distribution
because the original program does not have a manual page.
Instead, it has documentation in /usr/share/doc/circuslinux/README.txt.gz
.PP
\fB"Circus Linux!"\fP is based on the Atari 2600 game "Circus Atari" by Atari,
released in 1980. Gameplay is similar to "Breakout" and "Arkanoid"- you
slide a device left and right to bounce objects into the air which destroy
a wall.
.SH OPTIONS
.TP
.B --disable-sound
If sound support was compiled in, this will
disable it for this session of the game.
.B --fullscreen
Run in fullscreen mode.
.B --low
Disable some features so that the game might run
better on low-end hardware. Titlescreen ballons
and game backgrounds are disabled, and the game
screen refreshes every 1/15th of a second instead
of 1/30th of a second.
.B --digital
When using a joystick, left and right cause the
teeter-totter to move incrementally. (This is
as opposed to the default mode, where the analog
position of the joystick is used literally.)
Useful for playing with a digital gamepad.
.B --paddle
For using real Atari 2600 paddles connected to
a your PC's joystick port.
.B --help
Display a help message summarizing command-line
options, copyright, and game controls.
.B --usage
Display a brief message summarizing command-line
options.
.B --version
Display the version of Circus Linux! you're
running.
.SH CONTROL
.B Controlling the Teeter-Totter
Move the mouse left and right to move the teeter-totter left and right.
If a clown is in the air, you can also click any of the mouse buttons
to flip the teeter-totter. (This causes the low and high ends of the
teeter-totter to change places, useful when the teeter-totter is at a
far side of the screen and the low end is on the outside.)
.B Pausing
To pause the game, you can press either the [SPACE], [TAB] or [P]
key. To unpause, press one of those keys again.
.B Quitting
To quit the current game, you can press [ESCAPE]. This forfeits your game
(as though you ran out of lives).
To quit Circus Linux! altogether, you can use your window manager's
close command or press EXIT on the title screen.
.SH AUTHOR
This manual page was written by Christian T. Steigies <cts@debian.org>,
for the Debian GNU/Linux system (but may be used by others).
#! /bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Old scorefile
#if [ ! -e /var/games/circuslinux/scorefile ]; then
# db_input high circuslinux/shared_score_file || true
# db_go
# db_input high circuslinux/merge_score_files || true
# db_go
#else
# db_input high circuslinux/score_file_exists || true
# db_go
#fi
[Desktop Entry]
Version=1.0
Type=Application
Name=Circus Linux!
GenericName=Circus Linux
Comment=Throw the clowns before they fall and hit the balloons with them
Comment[ca]=Llana els pallassos abans de que caiguin i peta els globus amb ells
Comment[de]=Werfe die Clowns bevor sie fallen und treffe die Ballone mit ihnen
Icon=circuslinux-icon.xpm
Exec=circuslinux
Terminal=false
StartupNotify=false
Categories=Application;Game;ArcadeGame;
usr/games
usr/share/applications
usr/share/games/circuslinux/data/images
usr/share/games/circuslinux/data/music
usr/share/games/circuslinux/data/sounds
usr/share/man/man6
usr/share/pixmaps
var/games
var/games/circuslinux
AUTHORS
FAQ.txt
README
README-SDL.txt
debian/merge_scorefiles.pl
debian/merge_scorefiles.sh
#!/bin/bash
set -e
#export DEBCONF_DEBUG=developer
# do not use debconf anymore only to display a message
# Source debconf library anyhow to prevent a lintian warning
. /usr/share/debconf/confmodule
#db_get circuslinux/shared_score_file
#db_get circuslinux/merge_score_files
#if [ "$RET" = "true" ]; then
# if [ ! -e /var/games/circuslinux/scorefile ]; then
# bash /usr/share/games/circuslinux/merge_scorefiles.sh
# else
# db_get circuslinux/score_file_exists
# fi
#fi
if [ ! -d /var/games/circuslinux ]; then
mkdir -p /var/games/circuslinux
fi
chown root:root /var/games/circuslinux
chmod 755 /var/games/circuslinux
touch /var/games/circuslinux/scorefile
chown root:games /var/games/circuslinux/scorefile
chmod 775 /var/games/circuslinux/scorefile
#DEBHELPER#
#!/bin/bash
set -e
if [ "$1" = purge ] && [ -e /var/games/circuslinux/scorefile ]; then
rm /var/games/circuslinux/scorefile
fi
#DEBHELPER#
Template: circuslinux/shared_score_file
Type: note
_Description: Shared scorefile
This version of Circuslinux! uses a shared score file. From now on
highscores will no longer be saved in ~/.circuslinux but in
/var/games/circuslinux/scorefile. For configuration options the new file
~/.circuslinuxrc will be used.
.
To merge all players' old highscores into one file, you can run:
bash /usr/share/doc/circuslinux/merge_scorefiles.sh
as root.
.
Each player can then, _after_ playing this version of Circuslinux! at
least once, delete his ~/.circuslinux file, since his configuration
options will be saved in ~/.circuslinuxrc. If the player decides not to
delete ~/.circuslinux, he can still use a version of circuslinux which was
compiled without shared scorefile support without loosing his old score-
and config file. Circuslinux! with shared scorefile support will only read
the old config file to get the players options if ~/.circuslinuxrc does
not exist, but never write to this file.
.
In short: don't worry, play Circuslinux! If you run low on diskspace and
every block counts, you might tell your users to remove the old config
file.
Template: circuslinux/merge_score_files
Type: boolean
_Description: Merge score files?
Do you want me to run the merge_scorefile script for you?
Template: circuslinux/score_file_exists
Type: boolean
_Description: Scorefile exists
A merged scorefile in /var/games/circuslinux already exists!
Source: circuslinux
Section: games
Priority: optional
Maintainer: Christian T. Steigies <cts@debian.org>
Standards-Version: 3.9.2
Homepage: http://www.newbreedsoftware.com/circus-linux/
Build-Depends: debhelper (>= 8.0.0), libsdl1.2-dev (>= 1.2.2-3.1), libsdl-mixer1.2-dev (>= 1.2.0-1.1), libsdl-image1.2-dev (>= 1.2.0-1.1), automake, devscripts
Vcs-Bzr: http://bzr.debian.org/bzr/users/cts/circuslinux/trunk
Vcs-Browser: http://bzr.debian.org/loggerhead/users/cts/circuslinux/trunk/files
Package: circuslinux
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, circuslinux-data
Description: Clowns are trying to pop balloons to score points!
"Circus Linux!" is based on the Atari 2600 game "Circus Atari" by Atari,
released in 1980. Gameplay is similar to "Breakout" and "Arkanoid" - you
slide a device left and right to bounce objects into the air which destroy
a wall.
Package: circuslinux-data
Architecture: all
Depends: ${misc:Depends}
Replaces: circuslinux (<< 1.0.3-9)
Description: data files for circuslinux
"Circus Linux!" is based on the Atari 2600 game "Circus Atari" by Atari,
released in 1980. Gameplay is similar to "Breakout" and "Arkanoid" - you
slide a device left and right to bounce objects into the air which destroy
a wall.
.
This package contains sound and image files for circuslinux.
This package was debianized by Christian T. Steigies <cts@debian.org> on
Thu, 10 Feb 2000 20:15:15 +0100.
It was downloaded from ftp.sonic.net:/pub/users/nbs/unix/x/circus-linux
See also http://www.newbreedsoftware.com/
Upstream Author and Copyright: William (Bill) Kendrick <bill@newbreedsoftware.com>
Copyright (c) 2000 - 2001 Bill Kendrick
Circus Linux! is distributed under the GNU GENERAL PUBLIC LICENSE.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License is found in `/usr/share/common-licenses/GPL'.
?package(circuslinux):\
needs="x11" \
section="Games/Action" \
longtitle="Circus Linux!" \
title="Circus Linux" \
command="/usr/games/circuslinux --fullscreen" \
icon="/usr/share/pixmaps/circuslinux-icon.xpm"
#!/usr/bin/perl -w
# Copyright (c) 2003 Christian T. Steigies
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# merge multiple /home/<user>/.circuslinux files into one
# /var/games/circuslinux/scores files
#
# usage:
# merge_scorefiles.pl /home/<user1>/.circuslinux ... /home/<usern>.circuslinux
# mv merged_score /var/games/circuslinux/scores
# each user should remove his ~/.circuslinux file _after_ running circuslinux
# his config will be saved in ~/.circuslinuxrc by circuslinux
my $i=0;
my @line = ("# Circus Linux! options file" , "", "# Highscores:", "");
my @highscore;
my @highscorer;
my $filename = "/var/games/circuslinux/scorefile";
if ($#ARGV < 0) {
die "no scorefiles given, please pass at least one scorefile as argument.\n";
}
if (-e $filename) {
die "scorefile exists already, please move it out of the way.\n";
}
open OUT, ">".$filename
or die "can not open scorefile for output!\n";
for ($i = 0; $i < 8; $i++) {
$highscore[$i] = -1;
$score[$i] = -1;
}
while (@ARGV) {
$this = shift(@ARGV);
# print "$this\n";
open INPUT, $this
or die "can not open input file $this";
# while (defined($_ = <INPUT>)) {
for ($i = 0; $i < 4; $i++) {
$_ = <INPUT>;
chomp;
if ($_ eq $line[$i]) {
# print "line$i found\n";
} else {
die "not a valid score file!\n";
}
}
for ($i = 0; $i < 8; $i++) {
$_ = <INPUT>;
chomp;
if (substr($_, 0, 11) eq ("highscore".$i."=")) {
$score[$i] = substr($_, 11);
# print "score $score[$i]\n";
}
$_ = <INPUT>;
chomp;
if (substr($_, 0, 12) eq ("highscorer".$i."=")) {
$scorer[$i] = substr($_, 12);
# print "scorer $scorer[$i]\n";
}
$_ = <INPUT>;
# chomp;
# if ($_ eq "") {
# print "newline\n";
# }
if ($score[$i] > $highscore[$i]) {
$highscore[$i] = $score[$i];
$highscorer[$i] = $scorer[$i];
}
}
# print "|$_|\n"
# check first 4 lines if its a score file
# read highscore, highscorer 0..7, newline
# check for max and save
# write out new scorefile after reading all input files
}
for ($i = 0; $i < 4; $i++) {
printf (OUT "%s\n", $line[$i]);
}
for ($i = 0; $i < 8; $i++) {
printf (OUT "highscore%i=%s\n", $i, $highscore[$i]);
printf (OUT "highscorer%i=%s\n\n", $i, $highscorer[$i]);
}
printf (OUT "\n# (File automatically created.)\n");
#!/bin/bash
# Copyright (c) 2003 Christian T. Steigies
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
find /home -name .circuslinux -print0 | \
xargs -0 perl /usr/share/doc/circuslinux/merge_scorefiles.pl
chown root.games /var/games/circuslinux/scorefile
chmod 664 /var/games/circuslinux/scorefile
From: "Christian T. Steigies" <cts@debian.org>
Date: Sun, 23 Oct 2011 22:32:42 +0200
Subject: configure.version
---
configure.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 584b2b0..783f2cb 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,7 @@ AC_INIT(README.txt)
dnl Setup for automake
-AM_INIT_AUTOMAKE(circuslinux,1.0.2)
+AM_INIT_AUTOMAKE(circuslinux,1.0.3)
dnl Detect host info
AC_CANONICAL_HOST
--
From: "Christian T. Steigies" <cts@debian.org>
Date: Sun, 23 Oct 2011 22:32:42 +0200
Subject: configure.hurd
---
configure.in | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure.in b/configure.in
index 783f2cb..3733ebd 100644
--- a/configure.in
+++ b/configure.in
@@ -72,14 +72,18 @@ AC_SUBST(JOY)
dnl Target
-case "$target" in
- *-*-linux*)
+case "$target_os" in
+ *linux-gnu | linux* | k*bsd*-gnu | gnu*)
TARGET_DEF=LINUX
;;
- *-*-cygwin* | *-*-mingw32*)
+ cygwin* | mingw32*)
TARGET_DEF=WIN32
;;
+
+ *)
+ echo Unidentified $target_os
+ ;;
esac
AC_SUBST(TARGET_DEF)
--
From: "Christian T. Steigies" <cts@debian.org>
Date: Sun, 23 Oct 2011 22:32:42 +0200
Subject: Makefile.am
---
Makefile.am | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index a9a2e2d..4410a19 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,16 +21,16 @@ JOY=@JOY@
TARGET_DEF=@TARGET_DEF@
-CFLAGS = @CFLAGS@ -Wall -O2 -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
- -D$(TARGET_DEF) -DJOY_$(JOY)
-LIBS = @LIBS@
+AM_CFLAGS = -Wall -O2 -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
+ -D$(TARGET_DEF) -DJOY_$(JOY) -DSHARED_SCOREFILE_$(SHARED_SCOREFILE)
+AM_LIBS = @LIBS@
bin_PROGRAMS = circuslinux
circuslinux_SOURCES = circuslinux.c
-circuslinux_CFLAGS = CFLAGS
-circuslinux_LIBS = LIBS
+circuslinux_CFLAGS = $(AM_CFLAGS)
+circuslinux_LIBS = $(AM_LIBS)
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
--
From: "Christian T. Steigies" <cts@debian.org>
Date: Sun, 23 Oct 2011 22:32:42 +0200
Subject: choppy_sound
[...]
Actually, change that "4096" -- "1024" seems to skip just a little bit on
my PIII-800 box.
The "4096" is 4096 bytes, which translates into a 23 ms buffer
(4096/(44100*4) = .0232 s), which is still quite small. Even with that, I
still couldn't detect any lag in the sound.
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=188863
Author: Dwayne Litzenberger <dlitz@dlitz.net>
Reviewed-by: Christian T. Steigies <cts@debian.org>
Last-Update: 2003-04-14
---
circuslinux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/circuslinux.c b/circuslinux.c
index 313d89b..201adcf 100644
--- a/circuslinux.c
+++ b/circuslinux.c
@@ -2809,7 +2809,7 @@ void setup(void)
#ifndef NOSOUND
if (use_sound == 1)
{
- if (Mix_OpenAudio(44100, AUDIO_S16, 2, 256) < 0)
+ if (Mix_OpenAudio(44100, AUDIO_S16, 2, 4096) < 0)
{
fprintf(stderr,
"\nWarning: I could not set up audio for 44100 Hz "
--
From: "Christian T. Steigies" <cts@debian.org>
Date: Sun, 23 Oct 2011 22:32:42 +0200
Subject: shared_scorefile
---
Makefile.am | 1 +
circuslinux.c | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
configure.in | 9 +++
3 files changed, 156 insertions(+), 19 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4410a19..9632734 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,7 @@ VERSION = @VERSION@
CC=@CC@
DATA_PREFIX=$(pkgdatadir)/data/
JOY=@JOY@
+SHARED_SCOREFILE=@SHARED_SCOREFILE@
TARGET_DEF=@TARGET_DEF@
diff --git a/circuslinux.c b/circuslinux.c
index 201adcf..13c887c 100644
--- a/circuslinux.c
+++ b/circuslinux.c
@@ -15,6 +15,11 @@
December 11, 1999 - April 28, 2001
*/
+#ifndef SHARED_SCOREFILE_YES
+#ifndef SHARED_SCOREFILE_NO
+#error something went wrong in configure, either SHARED_SCOREFILE_YES or SHARED_SCOREFILE_NO must be defined. Please tell cts@debian.org how you did this.
+#endif
+#endif
/* Constraints: */
@@ -430,6 +435,9 @@ void drawtext(int x, int y, char * str);
void drawfuzz(int x, int y, int w, int h);
void seticon(void);
void usage(int ret);
+#ifdef SHARED_SCOREFILE_YES
+FILE * open_score_file(char * mode);
+#endif
FILE * open_option_file(char * mode);
void addscore(int player, int inc);
int highscorescreen(void);
@@ -579,7 +587,37 @@ int main(int argc, char * argv[])
strcpy(highscorer[i], "TUX");
}
+
+#ifdef SHARED_SCOREFILE_YES
+ fi = open_score_file("r");
+ if (fi != NULL) {
+ do {
+ fgets(temp, sizeof(temp), fi);
+
+ if (!feof(fi)) {
+ temp[strlen(temp) - 1] = '\0';
+
+ /* Parse each line: */
+
+ if (strstr(temp, "highscore") == temp &&
+ temp[9] >= '0' && temp[9] <= '7' &&
+ temp[10] == '=') {
+ highscore[temp[9] - '0'] = atoi(temp + 11);
+ } else if (strstr(temp, "highscorer") == temp &&
+ temp[10] >= '0' && temp[10] <= '7' &&
+ temp[11] == '=') {
+ highscorer[temp[10] - '0'][0] = temp[12];
+ highscorer[temp[10] - '0'][1] = temp[13];
+ highscorer[temp[10] - '0'][2] = temp[14];
+ }
+ }
+ } while (!feof(fi));
+
+ fclose(fi);
+ }
+#endif /* SHARED_SCOREFILE_YES */
+
/* Load options: */
fi = open_option_file("r");
@@ -597,7 +635,20 @@ int main(int argc, char * argv[])
/* Parse each line: */
- if (strstr(temp, "highscore") == temp &&
+ if (strstr(temp, "effects=") == temp)
+ {
+ sfx_vol = atoi(temp + 8);
+ if (sfx_vol > 3 || sfx_vol < 0)
+ sfx_vol = 3;
+ }
+ else if (strstr(temp, "music=") == temp)
+ {
+ music_vol = atoi(temp + 6);
+ if (music_vol > 3 || music_vol < 0)
+ music_vol = 3;
+ }
+#ifdef SHARED_SCOREFILE_NO
+ else if (strstr(temp, "highscore") == temp &&
temp[9] >= '0' && temp[9] <= '7' &&
temp[10] == '=')
{
@@ -611,18 +662,7 @@ int main(int argc, char * argv[])
highscorer[temp[10] - '0'][1] = temp[13];
highscorer[temp[10] - '0'][2] = temp[14];
}
- else if (strstr(temp, "effects=") == temp)
- {
- sfx_vol = atoi(temp + 8);
- if (sfx_vol > 3 || sfx_vol < 0)
- sfx_vol = 3;
- }
- else if (strstr(temp, "music=") == temp)
- {
- music_vol = atoi(temp + 6);
- if (music_vol > 3 || music_vol < 0)
- music_vol = 3;
- }
+#endif /* SHARED_SCOREFILE_NO */
}
}
while (!feof(fi));
@@ -667,8 +707,36 @@ int main(int argc, char * argv[])
while (!done);
+ /* Save scores: */
+
+#ifdef SHARED_SCOREFILE_YES
+ fi = open_score_file("w");
+ if (fi != NULL) {
+ /* Comment at the top (I wish _everyone_ did this!) */
+
+ fprintf(fi, "# Circus Linux! score file\n\n");
+
+ /* High scores: */
+
+ fprintf(fi, "# Highscores:\n\n");
+
+ for (i = 0; i < 8; i++) {
+ fprintf(fi, "highscore%d=%d\n", i, highscore[i]);
+ fprintf(fi, "highscorer%d=%s\n\n", i, highscorer[i]);
+ }
+
+ fprintf(fi, "\n");
+
+ /* The end! */
+
+ fprintf(fi, "# (File automatically created.)\n");
+
+ fclose(fi);
+ }
+#endif /* SHARED_SCOREFILE_YES */
+
/* Save options: */
-
+
fi = open_option_file("w");
if (fi != NULL)
{
@@ -677,6 +745,7 @@ int main(int argc, char * argv[])
fprintf(fi, "# Circus Linux! options file\n\n");
+#ifdef SHARED_SCOREFILE_NO
/* High scores: */
fprintf(fi, "# Highscores:\n\n");