aplied serval patches from the debian bomberclone maintainer

origin
steffen 10 years ago
parent c0abc11c56
commit bc6404789c

@ -1,9 +1,15 @@
$Id: ChangeLog,v 1.136 2015/07/07 20:57:06 steffen Exp $
$Id: ChangeLog,v 1.137 2015/07/10 21:59:37 steffen Exp $
06.07.2015: serval patches from Peter Spiess-Knafl applied
- changed: Numpad enter key works in menus
- fixed spelling
10.07.2015: serval patches from Peter Spiess-Knafl applied
- changed: enter key on the numpad works now also in menus
- fixed: spelling
- deleted: inline calls and changed configure.ac file to newser version,
also Werror and Wall flag is now set at the end of configure.ac
- fixed: segfault within paket handling, ct_pkg is not checked for NULL
also the check for invalid playernumber could cause a segfault.
28.03.2015:
- fixed: buffer overflow in send_mapinfo, found by sourceforge user whiteduck.

@ -14,7 +14,6 @@ AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_INLINE
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(vsnprintf)

@ -1,4 +1,4 @@
/* $Id: bomb.h,v 1.8 2009/05/11 20:51:25 stpohle Exp $
/* $Id: bomb.h,v 1.9 2015/07/10 21:59:37 steffen Exp $
* bomb include file
*/
@ -49,7 +49,7 @@ struct {
// for the bomb..
extern void bomb_loop ();
extern void bomb_explode (_bomb * bomb, int net);
extern inline void bomb_action (_bomb * bomb);
extern void bomb_action (_bomb * bomb);
extern void bomb_move (_bomb * bomb);
extern void bomb_kicked (_bomb * bomb);
extern void get_bomb_on (float x, float y, _point bombs[]);

@ -1,4 +1,4 @@
/* $Id: gfx.h,v 1.10 2005/04/09 18:22:40 stpohle Exp $ */
/* $Id: gfx.h,v 1.11 2015/07/10 21:59:37 steffen Exp $ */
#ifndef _GFX_H_
#define _GFX_H_
@ -104,8 +104,8 @@ extern void gfxengine_init ();
extern void gfx_blitdraw ();
extern void gfx_blit (SDL_Surface *srci, SDL_Rect *srcr, SDL_Surface *desti, SDL_Rect *destr, int y);
extern void gfx_blitsort ();
extern inline void gfx_blitsortclear ();
extern inline void gfx_blitupdaterectclear ();
extern void gfx_blitsortclear ();
extern void gfx_blitupdaterectclear ();
extern void gfx_blitupdaterectdraw ();
extern void gfx_blitupdaterectadd (SDL_Rect *rect);

@ -1,4 +1,4 @@
/* $Id: menu.h,v 1.13 2004/09/25 10:57:50 stpohle Exp $
/* $Id: menu.h,v 1.14 2015/07/10 21:59:37 steffen Exp $
* GUI for menuhandling
*/
@ -86,10 +86,10 @@ extern int menu_event_loop (_menu *menu, SDL_Event *event, int eventstate);
extern void menu_draw (_menu *menu);
extern void menu_draw_border (_menu *menu);
extern void menu_draw_background (_menu *menu, SDL_Rect *dest);
extern inline void menu_draw_menuitem (_menuitem *m);
extern void menu_draw_menuitem (_menuitem *m);
extern void menu_del_menuitem (_menuitem *m);
extern void menu_reload (_menu *menu);
extern inline void menu_reload_menuitem (_menuitem *m);
extern void menu_reload_menuitem (_menuitem *m);
extern void menu_focus_next (_menu *menu);
extern void menu_focus_prev (_menu *menu);
extern void menu_focus_id (_menu *menu, int id);

@ -1,4 +1,4 @@
/* $Id: player.h,v 1.12 2009/05/11 20:51:25 stpohle Exp $
/* $Id: player.h,v 1.13 2015/07/10 21:59:37 steffen Exp $
* playerinclude file
*/
@ -168,7 +168,7 @@ extern void team_choose (_player *pl);
// for the playerinput handling
extern void playerinput_loop (int pl_nr);
extern void playerinput_keyb_loop (int pl_nr);
extern inline void playerinput_keyb_read (int pk_offset, int pl_nr);
extern void playerinput_keyb_read (int pk_offset, int pl_nr);
/* playermenu.c */
extern void playernamemenu ();

@ -1,4 +1,4 @@
/* $Id: single.h,v 1.6 2004/11/07 04:13:09 stpohle Exp $
/* $Id: single.h,v 1.7 2015/07/10 21:59:37 steffen Exp $
* single player */
// single.c
@ -9,8 +9,8 @@ extern void single_playergame (int second_player, int ai_players);
extern void single_menu ();
extern int single_select_player ();
extern int ai_choosedir (int dir, int nearbomb, int oldpos);
extern inline int ai_invertdir (int dir);
extern inline int ai_checkpos (_player * pl, _point * pos);
extern int ai_invertdir (int dir);
extern int ai_checkpos (_player * pl, _point * pos);
extern int ai_findnearbombs (_point pos);
extern int ai_findbestbombdir (_point pos, int dir, int range);
extern int ai_bombpoints (_point pos, int range);

@ -1,4 +1,4 @@
/* $Id: sysfunc.h,v 1.9 2007/12/09 22:13:03 stpohle Exp $ */
/* $Id: sysfunc.h,v 1.10 2015/07/10 21:59:37 steffen Exp $ */
/* include some system near functions */
#ifndef _SYSFUNC_H_
@ -34,8 +34,8 @@ extern char *s_gethomedir ();
extern int s_countbits (int nbomb, int nr);
extern char* getfilename(char* path);
extern inline Sint16 s_swap16 (Sint16 i);
extern inline Sint32 s_swap32 (Sint32 i);
extern Sint16 s_swap16 (Sint16 i);
extern Sint32 s_swap32 (Sint32 i);
extern _direntry *s_getdir (char *path);
extern _direntry *s_dirfilter (_direntry *dirstart, signed char dirflags);
@ -50,7 +50,7 @@ extern _direntry *s_dirfilter (_direntry *dirstart, signed char dirflags);
#ifndef HAVE_RINTF
#ifndef HAVE_RINT
extern inline float rintf (float f);
extern float rintf (float f);
#else
#define rintf(__x) ((float)rint(double)__x)
#endif
@ -68,7 +68,7 @@ extern _direntry *s_dirfilter (_direntry *dirstart, signed char dirflags);
#define vsnprintf _vsnprintf
#endif
extern inline void s_calctimesync ();
extern void s_calctimesync ();
extern void rect_clipping (SDL_Rect *src, SDL_Rect *dest, SDL_Rect *window, SDL_Rect *csrc, SDL_Rect *cdest);
extern void charlist_fillarraypointer (_charlist *list, int c);
extern _charlist *charlist_findtext (_charlist *list, char *text);

@ -1,4 +1,4 @@
/* $Id: bomb.c,v 1.72 2012/01/28 21:53:19 steffen Exp $ */
/* $Id: bomb.c,v 1.73 2015/07/10 21:59:37 steffen Exp $ */
/* everything what have to do with the bombs */
#include "bomberclone.h"
@ -525,8 +525,7 @@ void bomb_kicked (_bomb * bomb) {
};
inline void bomb_action (_bomb * bomb)
{
void bomb_action (_bomb * bomb) {
switch (bomb->mode) {
case (BM_moving):
case (BM_liquid):

@ -1,4 +1,4 @@
/* $Id: configuration.c,v 1.85 2009/11/28 13:11:51 stpohle Exp $
/* $Id: configuration.c,v 1.86 2015/07/10 21:59:37 steffen Exp $
* configuration */
#include <SDL.h>
@ -734,7 +734,7 @@ ReadPrgArgs (int argc, char **argv)
printf (" Bug Report to :\n");
printf (" http://sourceforge.net/tracker/?group_id=79449&atid=556629\n");
printf (" Other Comments: steffen@bomberclone.de\n");
printf ("\nProgramm options:\n");
printf ("\nProgram options:\n");
printf (" -name PLAYERNAME - set the Playername\n");
printf (" -name2 PLAYERNAME - set the Playername for the second player\n");
printf (" -gamename GAMENAME - set the name of the game\n");

@ -1,4 +1,4 @@
/* $Id: field.c,v 1.60 2006/12/15 18:41:45 stpohle Exp $ */
/* $Id: field.c,v 1.61 2015/07/10 21:59:37 steffen Exp $ */
/* field.c - procedures which are needed to control the field */
#include "bomberclone.h"
@ -63,7 +63,7 @@ _stonelist_add (int x, int y, int recursive)
};
inline void
void
stonelist_add (int x, int y)
{
_stonelist_add (x, y, 1);

@ -1,4 +1,4 @@
/* $Id: gfxengine.c,v 1.7 2005/07/06 13:11:55 stpohle Exp $ */
/* $Id: gfxengine.c,v 1.8 2015/07/10 21:59:37 steffen Exp $ */
/* GFX Game Engine */
#include "bomberclone.h"
@ -30,7 +30,7 @@ void gfx_blitsort () {
/* delete sorted order of gfx updates */
inline void gfx_blitsortclear () {
void gfx_blitsortclear () {
register int i;
for (i = 0; i < MAX_BLITRECTS; i++)
sortblitdb[i] = NULL;
@ -38,7 +38,7 @@ inline void gfx_blitsortclear () {
/* delete all updaterect entrys */
inline void gfx_blitupdaterectclear () {
void gfx_blitupdaterectclear () {
register int i;
for (i = 0; i < MAX_BLITRECTS; i++)
blitrects[i].x = blitrects[i].y = blitrects[i].h = blitrects[i].w = -1;

@ -1,4 +1,4 @@
/* $Id: gfxpixelimage.c,v 1.14 2012/01/28 21:53:19 steffen Exp $ */
/* $Id: gfxpixelimage.c,v 1.15 2015/07/10 21:59:37 steffen Exp $ */
/* gfx pixel manipulation and image manipulation */
#include "bomberclone.h"
@ -54,7 +54,7 @@ getpixel (SDL_Surface * surface, int x, int y)
};
static inline Uint32
static Uint32
getpixel32 (SDL_Surface * surface, int x, int y)
{
/* Here p is the address to the pixel we want to retrieve */
@ -63,7 +63,7 @@ getpixel32 (SDL_Surface * surface, int x, int y)
};
static inline Uint32
static Uint32
getpixel24 (SDL_Surface * surface, int x, int y)
{
/* Here p is the address to the pixel we want to retrieve */
@ -76,7 +76,7 @@ getpixel24 (SDL_Surface * surface, int x, int y)
};
static inline Uint32
static Uint32
getpixel16 (SDL_Surface * surface, int x, int y)
{
/* Here p is the address to the pixel we want to retrieve */
@ -86,7 +86,7 @@ getpixel16 (SDL_Surface * surface, int x, int y)
/* putpixel seperated for every BPP version */
inline void
void
putpixel (SDL_Surface * surface, int x, int y, Uint32 pixel)
{
/* Here p is the address to the pixel we want to set */
@ -119,7 +119,7 @@ putpixel (SDL_Surface * surface, int x, int y, Uint32 pixel)
};
static inline void
static void
putpixel32 (SDL_Surface * surface, int x, int y, Uint32 pixel)
{
/* Here p is the address to the pixel we want to set */
@ -128,7 +128,7 @@ putpixel32 (SDL_Surface * surface, int x, int y, Uint32 pixel)
};
static inline void
static void
putpixel24 (SDL_Surface * surface, int x, int y, Uint32 pixel)
{
/* Here p is the address to the pixel we want to set */
@ -145,7 +145,7 @@ putpixel24 (SDL_Surface * surface, int x, int y, Uint32 pixel)
};
static inline void
static void
putpixel16 (SDL_Surface * surface, int x, int y, Uint32 pixel)
{
/* Here p is the address to the pixel we want to set */

@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.54 2012/01/28 21:53:19 steffen Exp $
/* $Id: menu.c,v 1.55 2015/07/10 21:59:37 steffen Exp $
* Menuhandling */
#include "basic.h"
@ -214,7 +214,7 @@ menu_draw (_menu * menu)
/* draw an item on the screen */
inline void
void
menu_draw_menuitem (_menuitem * m)
{
_menu *menu;
@ -275,7 +275,7 @@ menu_reload (_menu * menu)
/* reload variable into menuelement */
inline void
void
menu_reload_menuitem (_menuitem * m)
{
switch (m->type) {

@ -1,4 +1,4 @@
/* $Id: playerinput.c,v 1.3 2004/09/13 22:15:57 stpohle Exp $
/* $Id: playerinput.c,v 1.4 2015/07/10 21:59:37 steffen Exp $
* playerinput
*
* the playerinput system will only set some values and flags of the player
@ -55,7 +55,7 @@ playerinput_keyb_loop (int pl_nr)
};
inline void playerinput_keyb_read (int pk_offset, int pl_nr) {
void playerinput_keyb_read (int pk_offset, int pl_nr) {
if (keyb_gamekeys.state[pk_offset + BCPK_up]) {
players[pl_nr].d = up;
players[pl_nr].m = 1;

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.87 2012/01/28 21:53:19 steffen Exp $ */
/* $Id: single.c,v 1.88 2015/07/10 21:59:37 steffen Exp $ */
/* single player */
#include "basic.h"
@ -81,7 +81,7 @@ void ai_team_choosegfx () {
inline int
int
ai_checkfield (int x, int y)
{
return ((map.field[x][y].type == FT_nothing || map.field[x][y].type == FT_fire
@ -400,7 +400,7 @@ ai_findnearbombs (_point pos)
/* check if we are still running and fill out the position
return == 0 we're still walking ... else we have reached a point */
inline int
int
ai_checkpos (_player * pl, _point * pos)
{
_pointf _p;
@ -454,7 +454,7 @@ ai_choosedir (int dir, int nearbomb, int oldpos)
};
inline int
int
ai_invertdir (int dir)
{
int idir;
@ -476,7 +476,7 @@ ai_invertdir (int dir)
};
inline int
int
ai_checknewpos (_point pos, int d)
{
_point m;

@ -1,4 +1,4 @@
/* $Id: sysfunc.c,v 1.26 2007/12/09 22:13:03 stpohle Exp $
/* $Id: sysfunc.c,v 1.27 2015/07/10 21:59:37 steffen Exp $
sysfunc.c - this file hold some routines for the system functions..
like d_delay
*/
@ -54,7 +54,7 @@ s_random (int maxnr)
#if !defined(HAVE_RINTF) && !defined(HAVE_RINT)
inline float rintf (float f) {
float rintf (float f) {
if (CUTINT (f) < 0.5f)
return (floorf (f));
else
@ -219,7 +219,7 @@ char* getfilename(char* path)
/* swap 16bit integers, needed for
little and big endian convert */
inline Sint16 s_swap16 (Sint16 i) {
Sint16 s_swap16 (Sint16 i) {
Sint16 r;
char *z1 = (char *)&i;
char *z2 = (char *)&r;
@ -233,7 +233,7 @@ inline Sint16 s_swap16 (Sint16 i) {
/* swap 32bit integers, needed for
little and big endian convert */
inline Sint32 s_swap32 (Sint32 i) {
Sint32 s_swap32 (Sint32 i) {
Sint32 r;
int j;
char *z1 = (char *) &i;
@ -248,7 +248,7 @@ inline Sint32 s_swap32 (Sint32 i) {
extern Uint32 game_timediff, game_timediff1;
inline void s_calctimesync () {
void s_calctimesync () {
Uint32 timeloop1;
// calculate time sync.

Loading…
Cancel
Save