Commit d7287121 authored by Andreas Tille's avatar Andreas Tille

Import Upstream version 2.6

parent 9f08202b
This diff is collapsed.
2.6:
- added XDG desktop file (09/10/26 PT)
- fixed compiling on Fedora (09/10/26 SG)
- fixed GNU_SOURCE warning (09/10/26 MS)
- added new levelsets (09/10/26 MS)
- added hidden config option badspeech to disable swearing by default
(09/10/26 MS)
- improved french translation (08/08/24 K.C.)
- drop group rights on startup (linux only) to improve security (access
to highscore) (08/03/29 HG)
- bugfix: update levelset tooltip when changing selection with left/right
arrows (08/03/29 HG)
- added improved spec file for building RPMs (07/10/10 SG)
- configure now works for win32 (07/01/20 DY)
2.6beta-7:
- french translation added (06/08/27 K.C.)
2.6beta-6:
- added a hint for building on OS/2 to the README (06/05/27 DY)
- improved some german translations (06/05/26 MS)
- create some server bots per default (06/05/26 MS)
- adjusted fcntl call in net.c to work with kernel 2.6+ (and hopefully still
for lower versions... if not use SDL_net) (06/05/26 MS)
- use text from server option "-m" directly as welcome message if a file
by that name was not found (06/05/26 MS)
- read highscores file before adding new scores for usage with NFS
(06/05/12 netfab)
- inline removed from function declarations to ensure global access
(06/04/01 PM)
- removed -Wall from CC arguments for better portability
(06/04/01 PM)
2.6beta-5:
- i18n for yes/no confirmation by y/n (05/11/29 M.S.)
- added some more missing strings to i18n (05/11/20 M.S.)
- leaving game by window manager's close button works in quick help
(05/11/20 M.S.)
- switching fullscreen/windowed mode works in quick help (05/11/20 M.S.)
- added gettext-comments for those strings that use % but not as format
modifiers to prevent errors when making gmo files (05/11/20 M.S.)
2.6beta-4:
- added german localization (05/11/13 R.S.)
- removed client/client_game.c from POTFILES.in (05/10/31 M.S.)
- changed 'src' to 'client' directory in POTFILES.in (05/10/31 M.S.)
2.6beta-3:
- added missing common/gettext.h (05/10/20 M.S.)
2.6beta-2:
- i18n support for client (05/10/19 M.S.)
- fixed some more s(n)printf bugs (05/05/22 U.H.)
2.6beta:
- added several new levelsets (05/05/15 M.S.)
- disabled AC_PROG_STRIP from win32 build process since autotools in SuSE
does not like it??? (05/05/15 M.S.)
- moved AC_CANONICAL_HOST to beginning of configure.in (05/05/15 M.S.)
- finished bonus level DEFENDER (05/05/15 M.S.)
- added bonus level DEFENDER (05/04/6 M.S.)
- added bonus level HUNTER (05/04/01 M.S.)
- freakout levelset has bonus levels (05/04/01 M.S.)
- original levelset has bonus levels (05/04/01 M.S.)
- added bonus level SITTING_DUCKS (05/03/31 M.S.)
- made additional bonus levels optional (05/03/30 M.S.)
- normal levelsets get a bonus level every four normal levels
(05/03/30 M.S.)
- setting sound volume has effect (05/03/28 M.S.)
- added bonus levels JUMPING_JACK, OUTBREAK and BARRIER
(05/03/28 M.S.)
- security issue fixed: bad sprintf/scanf calls could lead to crashes
or potential security problems (05/02/14 U.H.)
2.5.2:
- added a different sound for balls reflected from the paddle
(05/01/13 M.S.)
......
# Anjuta Version 0.1.7
Compatibility Level: 1
<PROJECT_DESCRIPTION_START>
<PROJECT_DESCRIPTION_END>
<CONFIG_PROGS_START>
<CONFIG_PROGS_END>
<CONFIG_LIBS_START>
<CONFIG_LIBS_END>
<CONFIG_HEADERS_START>
<CONFIG_HEADERS_END>
<CONFIG_CHARACTERISTICS_START>
<CONFIG_CHARACTERISTICS_END>
<CONFIG_LIB_FUNCS_START>
<CONFIG_LIB_FUNCS_END>
<CONFIG_ADDITIONAL_START>
<CONFIG_ADDITIONAL_END>
<CONFIG_FILES_START>
<CONFIG_FILES_END>
<MAKEFILE_AM_START>
<MAKEFILE_AM_END>
props.file.type=project
anjuta.version=0.1.7
anjuta.compatibility.level=1
project.name=LBreakout2
project.type=GENERIC
project.target.type=EXECUTABLE
project.version=2.0alpha-2
project.author=Michael Speck
project.source.target=lbreakout2
project.has.gettext=0
project.programming.language=C
project.menu.entry=LBreakout2 Version (null)
project.menu.group=Applications
project.menu.comment=LBreakout2 Version (null)
project.menu.icon=lbreakout2_icon.(null)
project.menu.need.terminal=0
project.configure.options=
anjuta.program.arguments=
project.config.disable.overwriting=1 1 1 1 1 1 1 1 1
project.config.extra.modules.before=
project.config.extra.modules.after=
module.incude.name=include
module.incude.type=
module.incude.expanded=0
module.incude.files=
module.source.name=src
module.source.type=
module.source.expanded=1
module.source.files=\
credit.c shine.c extras.c balls.c shrapnells.c \
shots.c event.c paddle.c frame.c misc.c bricks.c difficulty.c \
player.c game.c file.c levels.c config.c \
item.c menu.c manager.c value.c chart.c \
editor.c help.c \
main.c \
credit.h shine.h extras.h balls.h shrapnells.h \
shots.h event.h paddle.h frame.h misc.h bricks.h difficulty.h \
player.h game.h file.h levels.h config.h \
item.h menu.h manager.h value.h chart.h \
editor.h lbreakout.h help.h \
hint.c hint.h client.c client.h comm.c comm.h \
client_recv.c client_data.h client_data.c \
client_handlers.h client_handlers.c client_game.c \
slot.h \
theme.c theme.h\
display.c display.h \
input.c input.h \
../common/net.h ../common/net.c \
../common/list.h ../common/list.c \
../common/tools.h ../common/tools.c \
../common/parser.h ../common/parser.c \
../common/messages.h \
../gui/stk.h ../gui/stk.c \
../gui/gui.h ../gui/gui.c \
../gui/gui_widget.h ../gui/gui_widget.c \
../gui/gui_box.h ../gui/gui_box.c \
../gui/gui_button.h ../gui/gui_button.c \
../gui/gui_label.h ../gui/gui_label.c \
../gui/gui_icon.h ../gui/gui_icon.c \
../gui/gui_progressbar.h ../gui/gui_progressbar.c \
../gui/gui_scrollbar.h ../gui/gui_scrollbar.c \
../gui/gui_list.h ../gui/gui_list.c \
../gui/gui_edit.h ../gui/gui_edit.c \
../gui/gui_radiogroup.h ../gui/gui_radiogroup.c \
../gui/gui_spinbutton.h ../gui/gui_spinbutton.c \
../server/server.h ../server/server.c \
../server/server_game.c ../server/server_game.h \
../game/balls.h ../game/comm.h ../game/game.h \
../game/levels.h ../game/paddle.h ../game/bricks.h \
../game/extras.h ../game/gamedefs.h ../game/mathfuncs.h \
../game/shots.h \
../game/balls.c ../game/comm.c ../game/game.c ../game/mathfuncs.c \
../game/shots.c ../game/bricks.c ../game/extras.c \
../game/levels.c ../game/paddle.c
module.pixmap.name=pixmaps
module.pixmap.type=
module.pixmap.expanded=0
module.pixmap.files=
module.data.name=data
module.data.type=
module.data.expanded=0
module.data.files=
module.help.name=help
module.help.type=
module.help.expanded=0
module.help.files=
module.doc.name=doc
module.doc.type=
module.doc.expanded=0
module.doc.files=
module.po.expanded=0
module.po.files=
compiler.options.supports=
compiler.options.include.paths=
compiler.options.library.paths=
compiler.options.libraries=
compiler.options.libraries.selected=
compiler.options.defines=
compiler.options.warning.buttons=0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1
compiler.options.optimize.buttons=0 1 0 0
compiler.options.other.buttons=1 0
compiler.options.other.c.options=
compiler.options.other.l.options=
project.source.paths=
SUBDIRS = common gui game server client docs
SUBDIRS = intl m4 po common gui game server client docs
EXTRA_DIST = config.rpath AUTHORS COPYING ChangeLog INSTALL README \
README-SDL.txt TODO lbreakout2.spec touchall lbreakout32.gif \
lbreakout48.gif lbreakout2.desktop.in win32_mancomp win32_preparchive
desktopdir = $(datadir)/applications
desktop_DATA = lbreakout2.desktop
icondir = $(datadir)/icons
icon_DATA = lbreakout48.gif
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
TODO lbreakout2.spec touchall lbreakout32.gif lbreakout48.gif \
LBreakout2.prj win32_mancomp win32_preparchive
WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
TODO lbreakout2.spec
TODO lbreakout2.spec ABOUT-NLS
WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll zlib.dll libpng.dll
WIN32_SYS_DLL = msvcrt.dll
AUTOMAKE_OPTIONS = foreign
# We can't use static desktop file because of icon location. Is this
# the right way to handle it? At least it works... as long as $datadir
# does not contain plus signs. :-)
lbreakout2.desktop:
@sed -e "s+Icon=+Icon=$(datadir)/icons/lbreakout48.gif+" \
< lbreakout2.desktop.in > lbreakout2.desktop
win32text: $(WIN32_TEXT)
@echo Converting text files for win32 installer
@-rm -rf ./win32text
......@@ -38,17 +51,10 @@ win32-installer-script: @win32_inst_script@
@echo "[Tasks]" >> $@
@echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
@echo "[Files]" >> $@
@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do \
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; \
done)
@(cd win32dlls; for file in $(WIN32_SYS_DLL); do \
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; \
done)
@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; done)
@(cd win32dlls; for file in $(WIN32_SYS_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; done)
@echo "Source: \"win32text\\*.*\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@;
@list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir \
&& $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
done
@list='$(SUBDIRS)'; for subdir in $$list; do (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); done
@echo "[Icons]" >> $@
@echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
@echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\docs\\index.html\"" >> $@
......@@ -64,3 +70,5 @@ win32-installer: win32-installer-script
@mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
@-rm -rf win32text
@echo "Installer created: $(PACKAGE)-$(VERSION)-win32.exe"
ACLOCAL_AMFLAGS = -I m4
This diff is collapsed.
......@@ -10,8 +10,9 @@ II. Installation
III. Network Server
IV. Documentation
V. Troubleshooting
VI. Resources
VII. Feedback
VI. Localization
VII. Resources
VIII. Feedback
********************
********************
......@@ -21,7 +22,7 @@ LBreakout runs in X and uses SDL (any version though >= 1.1.4
is recommended), SDL_mixer (optional for sound) and SDL_net
(optional for networking on non-Unices). These libraries
can be found at http://libsdl.org. The graphical stuff requires PNG
which is usually included to a distro. If not check out
which is usually included in a distro. If not check out
http://www.libpng.org/pub/png/libpng.html.
********************
......@@ -47,15 +48,19 @@ directory you extracted the LBreakout source)
REPLACES --with-highscore-path TO COMPLY
WITH AUTOCONF; THE DEFAULT LOCATION NOW
DEPENDS ON YOUR DISTRIBUTION: PREVIOUSLY
IT WAS /var/lib/games. USE
--localstatedir=/var/lib/games
FOR EXISTING HIGHSCORES.
IT WAS /var/lib/games. USE
--localstatedir=/var/lib/games FOR EXISTING
HIGHSCORES.
> make
> su (become root)
> make install (if install wasn't disabled)
> exit (become user again)
> lbreakout2 (run client/non-network game)
Note: Swearing is disabled in version >= 2.6. To enable it you have to
edit ~/.lgames/lbreakout2.conf manually and set the hidden option badspeech
to 1. If you cannot find the option start and quit LBreakout2 once.
Building on Win32
-----------------
There might be an easier way to get things to work but at least
......@@ -113,6 +118,12 @@ without any options but at least I could connect to it successfully.
Lee Read added some scripting to create a standalone installer. This
scripting is broken right now, but hopefully fixed soon.
Building on OS/2
----------------
On OS/2 GCC creates windowed console apps by default. There are various
solutions, see http://www.edm2.com/index.php/SDL#General_tips_and_tricks
or run 'emxbind -e -p lbreakout2.exe' after building. - Dave Yeo
********************
III. Network Server
********************
......@@ -182,7 +193,34 @@ to modify the audio buffer size in ~/.lgames/lbreakout2.conf.
If this fails set SDL_AUDIODRIVER to dma (export SDL_AUDIODRIVER=dma).
********************
VI. Resources
VI. Localization
********************
This game now supports i18n. If you want to add l10n for your native language,
please contact me first, to prevent overlapping translations. A thorough
documentation can be found at
http://www.gnu.org/software/gettext/manual/html_mono/gettext.html
Basically, you will have to do the following:
1) cd po
2) add your language code (e.g., de for German) to the existing line in
LINGUAS merely separated from the other languages by a blank
3) run `msginit -o <LL>.po` with <LL> replaced by your language code
4) translate the english message IDs in <LL>.po
5) run make <LL>.gmo
Whenever you change something in your translation you'll have to repeat
step 5). I strongly recommend to configure the program with --disable-install
while working on a translation. Otherwise you'd have to copy and rename the
.gmo file as root every time you want to see your changes. If the source has
been compiled without installation, only step 5) and simply running the game
is required. (Of course, the enviroment variable LANG must be set to your
locale.)
This should suffice. If not, please read the excellent documentation at
gnu.org. The fonts do only contain the basic latin letters. No special letters
(like the german umlauts or any accents for example) are supported, so a l10n
should not use them. If a string has a single %, meant as a percent sign,
you'll have to manually remove the 'format' comment above the id (if any).
********************
VII. Resources
********************
Some graphics and sounds has been taken and modified from other
non-copyrighted resources:
......@@ -191,8 +229,7 @@ Sounds: "Web Clip Empire 50.000", NovaMedia Verlag, Germany
Thanks to all of these guys for there free stuff!
********************
VII. Feedback
VIII. Feedback
********************
LGames URL: http://www.lgames.sf.net
e-Mail: kulkanie@gmx.net
- i18n of y/n in game.c und misc.c desinitgration
- fonts with special letters
- info file for theme
- replace swearing
- allow themes to have several 'between level' screens
- udp flooding after game finished
- allow additional weapon graphic/animation planted on top
......@@ -5,4 +9,3 @@
- improve pre-calculation of networked ball movement (dummy reflect)
- joystick as input
- shadow surface for zoom
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef HAVE_LIBSM
#undef PACKAGE_LOCALE_DIR
#undef PACKAGE_DOC_DIR
#undef PACKAGE_DATA_DIR
#undef PACKAGE_PIXMAPS_DIR
#undef PACKAGE_HELP_DIR
#undef PACKAGE_MENU_DIR
#undef PACKAGE_SOURCE_DIR
dnl SDL Stuff
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
......@@ -10,7 +8,7 @@ dnl SDL Stuff
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN(AM_PATH_SDL,
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
......@@ -34,7 +32,9 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
fi
fi
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
AC_REQUIRE([AC_CANONICAL_TARGET])
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
......@@ -107,6 +107,12 @@ int main (int argc, char *argv[])
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
......@@ -136,6 +142,11 @@ int main (int argc, char *argv[])
AC_TRY_LINK([
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
......@@ -162,26 +173,3 @@ int main (int argc, char *argv[])
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])
dnl
dnl Search for specific programs
dnl
dnl zip to pakcage win32 installer
AC_DEFUN(AC_PROG_ZIP,[
AC_CHECK_PROG(ZIP, zip, zip)
test -z "${ZIP}" && AC_MSG_ERROR(zip was not found on this system)
])
dnl strip reduces executable size by getting rid of extreneous symbols
AC_DEFUN(AC_PROG_STRIP,[
AC_CHECK_PROG(STRIP, strip, strip)
test -z "${STRIP}" && AC_MSG_ERROR(strip was not found on this system)
])
dnl Inno Setup 2 iscc is the win32 installer script compiler
AC_DEFUN(AC_PROG_ISCC,[
AC_CHECK_PROG(ISCC, iscc, iscc)
test -z "${ISCC}" && AC_MSG_ERROR(Inno Setup 2 iscc was not found on this system)
])
This diff is collapsed.
DEFS = @network_flag@ @sdlnet_flag@ @arch_flag@ @warp_flag@ @audio_flag@ @inst_flag@ @hi_inst_flag@ @DEFS@
DEFS = @network_flag@ @sdlnet_flag@ @arch_flag@ @warp_flag@ @audio_flag@ @inst_flag@ @hi_inst_flag@ @locdir_flag@ @DEFS@
lbreakout2res.o: win32.ico
@echo "1 VERSIONINFO" > $(PACKAGE).rc
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ Locals
/* remove a brick and release the extra (which will have no effect
* on collection) update the graphics. no growth or explosions
* of other bricks are initiated as these are send by network */
void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle )
void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle, int no_sound )
{
int px, py, w, h, i, j, shadow, anim_brick_id;
int dir;
......@@ -53,6 +53,7 @@ void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle )
exp_create( mx * BRICK_WIDTH + ( BRICK_WIDTH >> 1 ),
my * BRICK_HEIGHT + ( BRICK_HEIGHT >> 1 ) );
#ifdef AUDIO_ENABLED
if (!no_sound)
stk_sound_play_x( mx * BRICK_WIDTH + ( BRICK_WIDTH >> 1 ), wav_boom );
#endif
type = SHR_BY_EXPL; /* WITH_EXPL is not known */
......@@ -82,10 +83,8 @@ void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle )
* flag is set to avoid releasing 'ghost' extras due to latency. */
dir = ( paddle->type == PADDLE_TOP ) ? -1 : 1;
if ( game->bricks[mx][my].extra != EX_NONE ) {
if ( game->diff->allow_maluses ||
!extra_is_malus( game->bricks[mx][my].extra ) )
list_add( game->extras,
extra_create( game->bricks[mx][my].extra, px, py, dir ) );
if ( game->diff->allow_maluses || !extra_is_malus( game->bricks[mx][my].extra ) )
list_add( game->extras, extra_create( game->bricks[mx][my].extra, px, py, dir ) );
}
game->bricks[mx][my].extra = EX_NONE;
game->bricks[mx][my].extra_c = ' ';
......@@ -93,6 +92,7 @@ void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle )
/* in case of darkness no (graphical) remove nescessary */
if ( game->extra_active[EX_DARKNESS] ) {
#ifdef AUDIO_ENABLED
if (!no_sound)
stk_sound_play_x( px, wav_boom );
#endif
return;
......@@ -124,7 +124,8 @@ void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle )
stk_surface_blit( offscreen, px, py, w, h, stk_display, px, py );
stk_display_store_drect();
#ifdef AUDIO_ENABLED
stk_sound_play_x( px, wav_boom );
if (!no_sound)
stk_sound_play_x( px, wav_boom );
#endif
}
......@@ -139,13 +140,18 @@ static void client_brick_heal( int x, int y )
}
}
static void client_brick_grow( int x, int y )
static void client_brick_grow( int x, int y, int id )
{
Brick *brick = &game->bricks[x][y];
int px, py;
int isReplace = 0;
if (game->bricks[x][y].type!=MAP_EMPTY)
isReplace = 1;
/* add brick */
brick->id = RANDOM( BRICK_GROW_FIRST, BRICK_GROW_LAST );
//brick->id = RANDOM( BRICK_GROW_FIRST, BRICK_GROW_LAST );
brick->id = id;
brick->brick_c = brick_get_char( brick->id );
brick->type = MAP_BRICK;
brick->score = game->diff->score_mod * BRICK_SCORE / 10;
......@@ -153,12 +159,15 @@ static void client_brick_grow( int x, int y )
/* keep the extra that is already assigned to this position */
brick->exp_time = -1;
brick->heal_time = -1;
game->bricks_left++;
if (!isReplace) game->bricks_left++;
if ( !game->extra_active[EX_DARKNESS] ) {
px = x * BRICK_WIDTH;
py = y * BRICK_HEIGHT;
brick_draw_complex( x, y, px, py );
if (isReplace)
brick_draw( offscreen, x, y, 0 );
else
brick_draw_complex( x, y, px, py );
stk_surface_blit( offscreen, px, py,
BRICK_WIDTH + shadow_size,
BRICK_HEIGHT + shadow_size,
......@@ -301,11 +310,11 @@ void client_handle_brick_hit( BrickHit *hit )
case HT_REMOVE:
if (hit->draw_explosion)
hit->dest_type = SHR_BY_EXPL_WITH_EXPL;
client_brick_remove( hit->x, hit->y, hit->dest_type, imp, paddle );
client_brick_remove( hit->x, hit->y, hit->dest_type, imp, paddle, hit->no_sound );
/* gold shower extra */
if ( hit->gold_shower )
list_add( game->extras,
extra_create( EX_SCORE1000,
extra_create( EX_SCORE1000,
hit->x*BRICK_WIDTH, hit->y*BRICK_HEIGHT,
(hit->paddle==PADDLE_TOP)?-1:1 ) );
break;
......@@ -313,8 +322,21 @@ void client_handle_brick_hit( BrickHit *hit )
client_brick_heal( hit->x, hit->y );
break;
case HT_GROW:
client_brick_grow( hit->x, hit->y );
client_brick_grow( hit->x, hit->y, hit->brick_id );
break;
}
}
/* redraw all bricks (leaving shadows in transparent frame parts) */
void client_redraw_all_bricks()
{
stk_surface_blit( bkgnd, BRICK_WIDTH, BRICK_HEIGHT,
stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT,
offscreen, BRICK_WIDTH, BRICK_HEIGHT );
bricks_draw();
stk_surface_blit( offscreen, BRICK_WIDTH, BRICK_HEIGHT,
stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT,
stk_display, BRICK_WIDTH, BRICK_HEIGHT );
// stk_display_update( STK_UPDATE_ALL );
stk_display_store_drect();
}
......@@ -38,3 +38,5 @@ void brick_draw( SDL_Surface *surf, int map_x, int map_y, int shadow );
/* handle a received brick action */
void client_handle_brick_hit( BrickHit *hit );
/* redraw all bricks */
void client_redraw_all_bricks();
......@@ -28,10 +28,10 @@ int chart_loaded = 0; /* true if highscore succesfully loaded */
SDL_Rect chart_pos; /* used to store size. x,y is set when drawing */
int chart_gap = 10;
int chart_level_offset = 0; /* level offset (name's left aligned, score's right aligned) */
char *cheader = "Name Level Score";
extern SDL_Surface *stk_display;
extern Config config;
extern StkFont *cfont, *chfont, *ccfont; /* normal, highlight and caption font */
extern FILE *hi_dir_chart_file;
/*
====================================================================
......@@ -122,8 +122,16 @@ int chart_load_from_path( char *path )
sprintf( file_name, "%s/%s", path, CHART_FILE_NAME );
/* clear chart list */
list_clear( charts );
/* open file */
file = fopen( file_name, "rb" );
if (!strcmp(path, HI_DIR) && hi_dir_chart_file) {
file = hi_dir_chart_file;
rewind(hi_dir_chart_file);
}
else {
/* open file */
file = fopen( file_name, "rb" );
}
if ( file ) {
/* test if it's new format or old one. */
fread( aux, sizeof( char ), 3, file ); aux[3] = 0;
......@@ -138,7 +146,7 @@ int chart_load_from_path( char *path )
if ( aux[0] != '>' ) break;
chart = calloc( 1, sizeof( Set_Chart ) );
/* get name: >>>name */
fscanf( file, ">>>%s\n", setname );
fscanf( file, ">>>%1023s\n", setname );
chart->name = strdup( setname );
/* entries */
chart_read_entries( file, file_name, chart );
......@@ -148,25 +156,28 @@ int chart_load_from_path( char *path )
}
else {
/* old format: load single chart as 'Original' */
fprintf( stderr, "Converting highscore chart as format changed.\n