Commit 124e7928 authored by Andreas Tille's avatar Andreas Tille

Import Upstream version 2.2.2

Michael Speck <>
**** Contributions ****
Modifications to make LBreakout2 compileable on
Win32 with MinGW. - Claudio Chimera
Fix for the bug where the bonus floor disappeared to slow
on fast machines. - Trevor Spiteri
New explosions, various backgrounds, ideas and graphics for
extras and bricks:
Fix for a bug where balls where attached to the wall
instead of the paddle when paddle and brick where hit
in the same programme cycle. - Patrick Hohmeyer
Also thanks to all guys that made suggestions to
improve LBreakout2!!!
\ No newline at end of file
This diff is collapsed.
-LBreakout2 is now compileable with MinGW for Win32
(thanks to Claudio Chimera)
-if a ball has an invalid target it returns to the paddle
(instead of exiting the program)
-own graphics and sounds my be used as theme
-autoreturn of balls is now optional
-updated trouble-shooting
-fixed a bug where the bonus floor didn't disappear after the bonus
expired (thanks to Trevor Spiteri)
-added another animation level
-if a ball didn't hit a destructible brick or the paddle within
ten seconds it moves back to the paddle to prevent 'endless
-changed the ball's size to 12x12 which is supposed to fix most
of the remaining reflection bugs (thanks to Linus Gasser)
-moved the level 'Be Smart!' from second to tenth position in
levelset AddOn-2
-corrected a check up in line_intersect() (thanks to Linus Gasser)
-when a level is completed it's the next player's turn
(thanks to Linus Gasser)
-added some icons
-grown bricks are not removed when reinitating level
-all highlighted chart entries are cleared before adding players to chart
-new levelset AddOn-2 using the new extras (10 levels)
-new animations
-new extras (thanks to Dante):
-TIME_ADD: adds 7 seconds to the duration of all active bonuses/maluses
-DISABLE: disables all active bonuses/maluses
-EXPLOSIVE BALL: if ball touches a brick it explodes and destroys it's
-BONUS/MALUS MAGNET: either bonuses or maluses are attracted by the paddle
-WEAK BALL: if active there is a 40% chance that a brick isn't damaged
-new bricks:
-CHAOS BRICK: chaotic reflection of balls (thanks to Dante)
-REGENERATIVE BRICKS: this brick will restore one point duration
within 4 seconds if not hit again (thanks to Dante)
-SHIELDED BRICK: indestructible even for energy balls
-new beautiful explosions (thanks to Dante)
-added quick hint system
-lbreakout2-level directory is created properly
-highscore is not overwritten when updating
-/var/lib/games is created when not existing
-disabled double-click for confirmation
-increased sensitivity of the reflection check-up introduced in 2.1.1
-fixed a bug that caused reflection on an already removed brick (and
propably some crashes)
-added a grid to the editor for easier editing
-added advanced option 'Key Speed' to modify speed of keyboard input
-energy balls pulsate faster
-'exploding brick' list cleared when initiating next level
-using new backgrounds from the Arianne project (thanks to Dante)
-added an important check up for ball reflection to fix a bug that
caused a crash when using a 'bonus floor' or a 'growing brick'
-new levelset with 15 levels
-fixed a nasty reflection bug where the ball got stuck at the bottom
of the screen making a loud noise
-fixed a bug where the ball was attached to the wall instead of the
paddle (Thanks to Patrick Hohmeyer!)
-invisible bricks
-explosive bricks
-fixed a bug in the menu
-added a 'quick help'
-modified bonus times
-manual updated
-'blue' balls are fading in and out
-two more colored bricks (gray, white)
-added three new maluses:
-'Lights Out!': total darkness (except ball, paddle and bonuses)
-'Ghostly Paddle': paddle disappears when not moving
(won't reflect balls)
-'Chaos': balls are reflected randomly at bricks
-attached balls keep contact with paddle while resizing
-each levelset got it's own highscore chart
-jumping of paddle after smooth resize fixed
-new optimized reflection algorithm (supposed to fix all
remaining bugs)
-reflection bug fixes:
-stated another (less) important break condition for
multiball reflection
-range tolerance for edge reflection increased
-additional checkup for 'neighbored bricks'
-player scores modified correctly in the end of the game
-fixed bonus floor deadlock
-fixed a reflection bug
-you may also quit a running game by 'q' now
-faster paddle movement when keys are used
-added dummy array to config file so no corruptions will
occur when new options are initiated
-ball is drawn correctly when moving up/left
-modified paddle reflection conditions
-normed the perpendicular vector of brick edges
-balls are properly reset when destroying a brick
with the 'metal' bonus (and no reflection occurs)
-highscore chart saved directly after game over
-new advanced option: ball below/above bonuses
-fullscreen/windowed switch by 'f' now allowed everywhere
-added a spec file for RPMs (thanks to Dennis Bjorklund)
-added some very important range checks for reflection
-smooth paddle resize
-bonus shadows drawed correctly (doesn't overlap other bonuses)
-modified brick reflection and hopefully fixed
the 'through walls like a ghost' bug
-fixed the wrong color key of frame (thanks to Andre Trindade)
-restart is allowed even with no life left if you got enough points to
buy a continue
-added a missing include in config.c and fixed some newline warnings
-bit depth is adjusted to the settings of your desktop (instead of 16bit
-correct color key for paddle and balls at bit depth > 16
-major code redesign and clean-ups
-C++ -> C
-structured source
-resolution changed from 512x288 to 640x480 (no black frame in fullscreen)
-up to 4 players (alternate)
-fading improved
-score counting improved
-optional constant frame rate (to prevent LBreakout from
consuming 100% CPU time)
-event handling improved:
-paddle does not slow down if framerate drops
-moving paddle and firing weapon at the same time now works for Linux
(problems with Mac and BeOS - therefore added an --enable-warp
option - see the README for more)
-usage of 'invert mouse' and 'motion modifier' improved
-shadow added
-graphics improved
-ball velocity specified by difficulty instead of level
-added a grab option to keep mouse in window (thanks to Mark Rowe)
-time of a bonus (if any limit) is added to current time (instead of
setting it)
-new bonuses:
'End Of The Rainbow': while this is active each brick without
a bonus will release 1000 points
'Joker': destroys all malus' and collects all bonus on screen
doubling time limit and score (if any)
-added and changed sounds
-new menu
-fixed a bug in shot handling (wrong bricks removed)
-the global highscore path is no longer hard-coded in the configure
script (option: --with-highscore-path)
-improved the paddle:
-works perfect! (balls won't go through the paddle)
-real convex behaviour
-improved the brick reflection (though edges need a better reflection
-in the menu ESCAPE takes back to the previous menu instead of
leaving the game
-integrated feature-packed level editor
-PNG is used for graphics (to beat the 1MB limit of the SDL competition)
-new documentation
-when a blue metal ball destroys a wall its score is no longer
uninitialized (No chance anymore to get a BILLION points within minutes! ;)
-twinkling of bricks is disabled when animations are turned off
-fixed a bug occuring when loading own levels
-score is counted faster
-better example of own level in the manual (added as single
file 'test.lbr' as well)
-two charts: 'Highest Scores' and 'Highest Levels'
(thanks to Jean-Philippe Martin)
-added 5 new levels
-remaining time of a bonus is displayed (optional)
-added speed-up/speed-down bonuses
-a blue ball now goes through indestructible walls as well
-freeze duration now is one second instead of two seconds
-changed the logo (thanks to marko kjellgren)
-when paused resume game only if 'p' is pressed
-mouse invert option
-random starting angle (-60 to 60 degree) of a ball (optional)
-if starting angle is not random press left mouse button to fire the ball
to the left (right button to fire to the right)
-paddle can shrink below its original size (absolute minimum of 30 pixels)
-changed the indestructible bricks from level 03 to destructible ones
-moved option 'Paddle' from menu 'Controls' to 'Game'
-fixed some bugs
-$(DESTDIR) now is used in (thanks to daniel burrows and lauri korts-parn)
-spec file improved
-highscore path changed to /var/lib/games
-selecting fullscreen via menu works again
-added a spec file for redhat linux (thanks to lauri korts-parn)
-paddle works much better
-'shrink paddle' and 'expand paddle' bonuses can be distinguished better
-you can choose between a 'flat surface' and a 'convex surface' paddle
-position of a ball will be reset when it is attached
-fixed various bugs
-checks for SDL and pthread libs now
-timer improved
-removed some more egcs 2.91.66 problems
-sound is default (configure)
-added --disable-install option (configure)
-if SDL 1.1.5 is found -DSDL_1_1_5 is defined automatically (configure)
-if the paddle is resized attached balls will keep contact
-levels changed (25 now)
-weapon fires continuously while 'Fire' is pressed
-mouse pointer hidden when playing in fullscreen mode
-resolution no longer changed everytime entering a new level (in fullscreen
-you can enable/disable sound and transparancy, set the
animation level and turn on/off 'Fullscreen' while playing
-if a ball hits two bricks at the same time both will be removed
-paddle works better
-works with egcs 2.91.66 now
-mouse pointer hidden when only keyboard is used
-high score chart installed correctly
-no request for SDL_INIT_AUDIO if -DSOUND undefined
-improved the installation process
-works with SDL version 1.1.5 (or better), too
-fixed the 'infinite loop' bug
-added a fullscreen option
-source path correctly set now
-changed some levels
-initial public release
Basic Installation
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `' is used to create `configure' by a program
called `autoconf'. You only need `' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
Installation Names
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/' if it exists, then
`PREFIX/etc/' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
`configure' recognizes the following options to control how it
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
Print a summary of the options to `configure', and exit.
Do not print messages saying which checks are being made.
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README TODO lbreakout2.spec touchall comp.bat
This diff is collapsed.
a breakout-style arcade game for Linux
by Michael Speck
I. Requirements
II. Installation
III. Documentation
IV. Troubleshooting
V. Resources
VI. Feedback
I. Requirements
LBreakout runs in X and uses SDL (any version though >= 1.1.4
is recommended) and SDL_mixer (optional for sound). Both libraries
can be found at The graphical stuff requires PNG
which is usually included to a distro. If not check out
II. Installation
Enter your favorite shell and type in the following stuff (in the
directory you extracted the LBreakout source)
> ./configure [--disable-sound] [--disable-install] [--enable-warp]
[--with-highscore-path=HPATH] [--with-doc-path=DPATH]
--disable-sound: no sound
--disable-install: no installation; play from source directory
--enable-warp: nescessary for non-Unices to use relative
mouse motion for inverting or modify mouse
--with-highscore-path: write global highscore chart lbreakout.hscr
to the specified directory
DEFAULT: /var/lib/games
--with-doc-path: install documentation to $DPATH/lbreakout2
DEFAULT: /usr/doc
> make
> su (become root)
> make install (if install wasn't disabled)
> exit (become user again)
> lbreakout2 (run game)
!!! NOTE: Since 2.1.2 the config directory is ~/.lgames instead
of ~/.lbreakout2. If you created levelsets with a previous version
you'll have to copy these sets from ~/.lbreakout2/levels to
~/.lgames/lbreakout2-levels !!!
The directory ~/.lbreakout2 is obsolete and may be deleted.
III. Documentation
If you have any questions about options, game play or editor
please check the documentation and see if you
can find an answer there. I will not respond to any eMails concerning
questions easily answered by the manual (/usr/doc/lbreakout2).
However, if you have any other problems or suggestions or you found a
bug please contact me:
IV. Troubleshooting
The solution for relative mouse motion (nescessary when inverting or
slowing down mouse by motion modifier) works fine for Linux and
Win32 but fails for other non-Unices. Current solution is to warp the
mouse (by using configure option --enable-warp). Unfortunately, this
will handicap events when trying to fire weapon or release balls AND
move the paddle at the same time. This means it may happen that a weapon
is not fired or doesn't stop fire, balls keep being attached and so
Disabling sound while playing seems to result in loosing various
sound channels when some sounds were actually mixed.
For my system 1.4 is 1.399978 instad of 1.4 so wrong score
is added in the end. Sorry, not my fault. If anyone got a cool idea
to tell gcc this obvious point let me know.
Someone reported that he had problems with PNG (configure script
didn't find it) if it was installed to /usr/local/lib.
Setting a link in /usr/lib fixes this.
If you have SDL_mixer installed but configure tells you that it can't
find it, remember that you have to install the development package
for compiling!
If you can't compile because LBreakout2' timestamps are slightly in
the future run 'touchall' (found in the configure directory).
If 'fullscreen' just adds a black frame around the game but does
not change the solution make sure that you have 640x480 available
as resolution in your Xconfig.
If the SDL sound seems to be out of sync set
V. Resources
Some graphics and sounds has been taken and modified from other
non-copyrighted resources:
Sounds: "Web Clip Empire 50.000", NovaMedia Verlag, Germany
Thanks to all of these guys for there free stuff!
VI. Feedback
LGames URL:
-shadow surface for zoom
-lower corner sensitivity
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl Get the cflags and libraries from the sdl-config script
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
if test "$SDL_CONFIG" = "no" ; then
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
rm -f conf.sdltest
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
my_strdup (char *str)
char *new_str;
if (str)
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
new_str = NULL;
return new_str;
int main (int argc, char *argv[])
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");