diff --git a/ChangeLog b/ChangeLog index 443f5ee..7dd6872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,19 @@ -$Id: ChangeLog,v 1.52 2004/01/07 23:47:32 patty21 Exp $ +$Id: ChangeLog,v 1.53 2004/01/22 20:54:58 stpohle Exp $ - Added: Kick Bombs special + - Fixed: Network initialization at quit removed +- Fixed: packets.c: do/send_playermove tunnelto wasn't + converted into network arch. + +- Fixed: packets.h: pkg_playermove speed changed to Sint16 +- Fixed: gfxpixelimage.c colors on bigendian Systems Red + and Blue mask was switched +- Fixed: network.h: NET_CANSEND fixed, didn't checked right + for the server Version 0.11.0 diff --git a/TODO b/TODO index 6f0347f..aaa4c0c 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,9 @@ -$Id: TODO,v 1.35 2004/01/06 20:49:57 stpohle Exp $ +$Id: TODO,v 1.36 2004/01/22 20:55:16 stpohle Exp $ + +* start settings for Speed, Ticking time of the bombs. + How many bombs and so on. + +* bug: which creates just some explosions on the field. - support for more player on one keyboard diff --git a/include/network.h b/include/network.h index 88f1d88..7807d24 100644 --- a/include/network.h +++ b/include/network.h @@ -1,4 +1,4 @@ -/* $Id: network.h,v 1.9 2004/01/03 02:12:33 stpohle Exp $ +/* $Id: network.h,v 1.10 2004/01/22 20:55:23 stpohle Exp $ * network.h file... for everything what have to do with the network stuff */ @@ -27,7 +27,8 @@ #define GS_WAITRUNNING (bman.state == GS_wait || bman.state == GS_ready || bman.state == GS_running) #define GS_RUNNING (bman.state == GS_ready || bman.state == GS_running) -#define NET_CANSEND(__pl) (( __pl == 0 || GT_MP_PTPM || (players[__pl].net.flags & NETF_firewall) == 0)) +/* check if we can send to the player */ +#define NET_CANSEND(__pl) ( __pl == bman.p_servnr || GT_MP_PTPM || (((players[__pl].net.flags & NETF_firewall) == 0) && !bman.firewall)) /* Little / Big Endian Convert */ #if SDL_BYTEORDER == SDL_BIG_ENDIAN diff --git a/include/packets.h b/include/packets.h index 6f73c4c..efa1aab 100644 --- a/include/packets.h +++ b/include/packets.h @@ -157,7 +157,7 @@ struct pkg_playermove { signed char p_nr; signed char m; signed char d; - signed char speed; + Sint16 speed; Sint16 tunnelto; _point pos; }; diff --git a/src/debug.c b/src/debug.c index c020721..ea5a6aa 100644 --- a/src/debug.c +++ b/src/debug.c @@ -68,7 +68,7 @@ void d_fatal (char *fmt,...) { void debug_ingameinfo() { - int i, j; + int i; float fl; char text[255]; @@ -83,11 +83,7 @@ void debug_ingameinfo() { sprintf (text, "P:"); for (i = 0; i < MAX_PLAYERS; i++) if (PS_IS_playing (players[i].state)) { - for (j = 0, fl = 0.0f; j < PI_max; j++) - if (fl < players[i].ill[j].to) - fl = players[i].ill[j].to; - - sprintf (text, "%s TO:%2.2f ", text, fl); + sprintf (text, "%s Pos:%f,%f ", text, players[i].pos.x, players[i].pos.y); } font_gfxdraw (0, gfx.res.y-font[0].size.y*2, text, 0, 0, (map.size.y*256)+10); diff --git a/src/gfxpixelimage.c b/src/gfxpixelimage.c index 4623735..4bb47b1 100644 --- a/src/gfxpixelimage.c +++ b/src/gfxpixelimage.c @@ -1,4 +1,4 @@ -/* $Id: gfxpixelimage.c,v 1.6 2004/01/03 23:57:13 stpohle Exp $ */ +/* $Id: gfxpixelimage.c,v 1.7 2004/01/22 20:55:39 stpohle Exp $ */ /* gfx pixel manipulation and image manipulation */ #include "bomberclone.h" @@ -43,7 +43,6 @@ getpixel (SDL_Surface * surface, int x, int y) case 3: if (SDL_BYTEORDER == SDL_BIG_ENDIAN) return p[0] << 16 | p[1] << 8 | p[2]; - else return p[0] | p[1] << 8 | p[2] << 16; case 4: @@ -213,11 +212,10 @@ scale_image (SDL_Surface *orginal, int newx, int newy) short int ypattern[SCALE_MAXRES]; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; + rmask = 0x0000ff00; gmask = 0x00ff0000; - bmask = 0x0000ff00; + bmask = 0xff000000; amask = 0x000000ff; - #else /* */ rmask = 0x00ff0000; gmask = 0x0000ff00; @@ -302,9 +300,9 @@ makegray_image (SDL_Surface * org) gray; #if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; + rmask = 0x0000ff00; gmask = 0x00ff0000; - bmask = 0x0000ff00; + bmask = 0xff000000; amask = 0x000000ff; #else rmask = 0x00ff0000; diff --git a/src/packets.c b/src/packets.c index 0c9b138..9b5cd38 100644 --- a/src/packets.c +++ b/src/packets.c @@ -667,6 +667,7 @@ send_ill (_net_addr * addr, int p_nr, _player * pl) send_pkg ((struct pkg *) &ill, addr); }; + /*** *** Packettype: playermove ***/ @@ -685,7 +686,7 @@ send_playermove (_net_addr * addr, int p_nr, _player * pl) p_dat.d = pl->d; p_dat.p_nr = p_nr; p_dat.speed = HTON16 (FTOI16(pl->speed)); - p_dat.tunnelto = HTON16 (pl->tunnelto); + p_dat.tunnelto = HTON16 (FTOI16 (pl->tunnelto)); send_pkg ((struct pkg *) &p_dat, addr); };