end sequence of the game will now work fine.. without problems... maybe timeouts have to be raised up alittle.

origin
stpohle 22 years ago
parent abc50df9c2
commit 31b48aedc7

@ -1,8 +1,14 @@
$Id: ChangeLog,v 1.32 2003/07/25 12:28:50 stpohle Exp $
$Id: ChangeLog,v 1.33 2003/07/27 14:34:37 stpohle Exp $
Version 0.9.10
==============
- added: two ways the game can end now. the old Bomberman
style with getting the size of the gamefield down and
another one with putting in the game alot of powerups.
the game even have a timeout of 10 minutes + the
2 minutes of the end game sequenze.
- Makefile.am fixed in the data direktory. Added
${prefix}/ and changed @PREFIX_PACKAGE_DATA_DIR@ to
@NO_PREFIX_PACKAGE_DATA_DIR@ . So debian packages
@ -378,4 +384,3 @@ Version 0.1
the bombs are exploding.
- Basic Graphics, just some experiments within the game

10
TODO

@ -1,6 +1,4 @@
$Id: TODO,v 1.18 2003/07/25 21:44:47 stpohle Exp $
- player selection screen for the single player
$Id: TODO,v 1.19 2003/07/27 14:34:38 stpohle Exp $
- more specials (Kicking Bomb, Pushing Bomb Ver.2)
@ -16,8 +14,10 @@ $Id: TODO,v 1.18 2003/07/25 21:44:47 stpohle Exp $
- add musicfiles with type of mp3, mod, xm, s3m and
mid (but i don't know how i can do this)
- animated fire
- better animated fire
- more gfx players to select?
- more players
- team mode
- we need some more sound for picking up items.

@ -1,4 +1,4 @@
/* $Id: bomb.c,v 1.37 2003/07/23 02:10:47 stpohle Exp $ */
/* $Id: bomb.c,v 1.38 2003/07/27 14:34:39 stpohle Exp $ */
/* everything what have to do with the bombs */
#include "bomberclone.h"
@ -198,6 +198,9 @@ bomb_loop ()
return b;
};
/* check if on the givin place is a bomb
bombs[].x = player, bombs[].y = bombnumber */
void
get_bomb_on (short int x, short int y, _point bombs[])
{

@ -1,4 +1,4 @@
/* $Id: bomberclone.h,v 1.48 2003/07/27 13:29:25 stpohle Exp $ */
/* $Id: bomberclone.h,v 1.49 2003/07/27 14:34:40 stpohle Exp $ */
/* bomberclone.h */
#ifndef _BOMBERCLONE_H_
@ -213,6 +213,7 @@ extern void player_ilness_loop (int pl_nr);
extern void player_check_powerup (int p_nr);
extern void player_set_gfx (_player *p, signed char gfx_nr);
extern int player_findfreebomb (_player *player);
extern int player_checkpos (int x, int y);
// for the bomb..
extern int bomb_loop ();

@ -1,4 +1,4 @@
/* $Id: field.c,v 1.39 2003/07/27 13:29:25 stpohle Exp $ */
/* $Id: field.c,v 1.40 2003/07/27 14:34:40 stpohle Exp $ */
/* field.c - procedures which are needed to control the field */
#include "bomberclone.h"
@ -386,6 +386,7 @@ void
field_hurrysize ()
{
int i;
_point old;
if (fieldhurry_to-- <= 0 || fieldhurry_to > FIELDHURRYSIZE) {
fieldhurry_to = FIELDHURRYSIZE;
@ -396,7 +397,8 @@ field_hurrysize ()
}
else if (fieldhurrypos.x > 0) {
bman.timeout = GAME_TIMEOUTHURRY-1;
old = fieldhurrypos; /* save old value in case that there
is an explosion or a bomb */
switch (fieldhurryd) {
case (right):
if (fieldhurrypos.x + 1 >= map.size.x - fieldhurrypos.y) {
@ -443,12 +445,31 @@ field_hurrysize ()
/* check if we have finished sizing down everything */
if (fieldhurrypos.x > 0) {
_point bombs[MAX_PLAYERS*MAX_BOMBS];
int i, d;
/* check if a bomb is at this position, if so let the bomb explode
and wait untill the explosion is over */
for (i = 0, d = 0; d < 4; d++)
if (map.field[fieldhurrypos.x][fieldhurrypos.y].ex[d].count > 0)
i++;
get_bomb_on (fieldhurrypos.x << 8, fieldhurrypos.y << 8, bombs);
if (i)
fieldhurrypos = old;
else if (bombs[0].y != -1 && bombs[0].x != -1) {
fieldhurrypos = old;
bomb_explode (bombs[0].x, bombs[0].y, 1);
}
else {
/* set the block on the position */
map.field[fieldhurrypos.x][fieldhurrypos.y].type = FT_block;
map.field[fieldhurrypos.x][fieldhurrypos.y].special = FT_nothing;
map.field[fieldhurrypos.x][fieldhurrypos.y].frame = 0;
stonelist_add (fieldhurrypos.x, fieldhurrypos.y);
if (GT_MP_PTPM)
net_game_send_field (fieldhurrypos.x, fieldhurrypos.y);
}
}
}
};

@ -1,4 +1,4 @@
/* $Id: map.c,v 1.3 2003/07/22 18:29:08 stpohle Exp $ */
/* $Id: map.c,v 1.4 2003/07/27 14:34:40 stpohle Exp $ */
/* map handling, like generate and load maps. */
#include "bomberclone.h"
@ -83,8 +83,12 @@ map_new (char *filename)
// map_fillitems (FT_sp_kick, GAME_SPECIAL_ITEMSKICK);
}
void map_genrandom () {
int x, y, d;
void
map_genrandom ()
{
int x,
y,
d;
/* if we can't load the map check first the fieldsize settings */
if (map.size.x < MIN_FIELDSIZE_X)
@ -249,14 +253,20 @@ map_set_playerposition (int usermap)
PLY = PLY << 8;
}
};
#undef PLX
#undef PLY
/* load a random map */
void map_random () {
_direntry *destart, *de, *desel;
void
map_random ()
{
_direntry *destart,
*de,
*desel;
char path[LEN_PATHFILENAME];
int max, sel;
int max,
sel;
sprintf (path, "%s/maps", bman.datapath);
desel = destart = s_getdir (path);
@ -280,7 +290,8 @@ void map_random () {
// Init the game according to options
void init_map_tileset()
void
init_map_tileset ()
{
switch (map.map_selection) {
case (0):

@ -89,8 +89,7 @@ restore_players_screen ()
if ((PS_IS_used (bman.players[i].state)) && bman.players[i].old.x != -1) {
if ((bman.players[i].old.x >> 8) < 0 || (bman.players[i].old.x >> 8) >= map.size.x
|| (bman.players[i].old.y >> 8) < 0
|| (bman.players[i].old.y >> 8) >= map.size.y)
|| (bman.players[i].old.y >> 8) < 0 || (bman.players[i].old.y >> 8) >= map.size.y)
d_printf ("FATAL: Restore Player out of range : playernr %d [%d,%d]\n", i,
(bman.players[i].old.x >> 8), (bman.players[i].old.y >> 8));
else {
@ -229,11 +228,17 @@ check_field (short int x, short int y)
int
stepmove_player (int pl_nr)
{
_point bomb1[MAX_PLAYERS * MAX_BOMBS], bomb2[MAX_PLAYERS * MAX_BOMBS];
_point bomb1[MAX_PLAYERS * MAX_BOMBS],
bomb2[MAX_PLAYERS * MAX_BOMBS];
_player *p = &bman.players[pl_nr];
int speed = 0, i, j, f;
int speed = 0,
i,
j,
f;
_point fpos, // field position
_pos, // position inside the field
d;
if (p->m == 1) {
@ -269,13 +274,17 @@ stepmove_player (int pl_nr)
// check the new field position
d.x = d.y = 0;
if (p->d == left && _pos.y == 0 && ((_pos.x == 0 && check_field (fpos.x - 1, fpos.y)) || (_pos.x > 0)))
if (p->d == left && _pos.y == 0
&& ((_pos.x == 0 && check_field (fpos.x - 1, fpos.y)) || (_pos.x > 0)))
d.x = -speed;
if (p->d == right && _pos.y == 0 && ((_pos.x == 0 && check_field (fpos.x + 1, fpos.y)) || (_pos.x > 0)))
if (p->d == right && _pos.y == 0
&& ((_pos.x == 0 && check_field (fpos.x + 1, fpos.y)) || (_pos.x > 0)))
d.x = speed;
if (p->d == up && _pos.x == 0 && ((_pos.y == 0 && check_field (fpos.x, fpos.y - 1)) || (_pos.y > 0)))
if (p->d == up && _pos.x == 0
&& ((_pos.y == 0 && check_field (fpos.x, fpos.y - 1)) || (_pos.y > 0)))
d.y = -speed;
if (p->d == down && _pos.x == 0 && ((_pos.y == 0 && check_field (fpos.x, fpos.y + 1)) || (_pos.y > 0)))
if (p->d == down && _pos.x == 0
&& ((_pos.y == 0 && check_field (fpos.x, fpos.y + 1)) || (_pos.y > 0)))
d.y = speed;
// check if we can move and if there is any bomb
@ -313,6 +322,27 @@ stepmove_player (int pl_nr)
};
/* check if the givin position is oky
1 = ok, 0 = bad */
int
player_checkpos (int x, int y)
{
int i,
d;
for (i = 0, d = 0; d < 4; d++)
if (map.field[x][y].ex[d].count > 0)
i++;
if (map.field[x][y].type == FT_block || i > 0)
return 0;
else
return 1;
};
/* move the player if he have to move AND check if we are on a block
or over fire */
void
move_player (int pl_nr)
{
@ -344,6 +374,21 @@ move_player (int pl_nr)
net_game_send_playermove (pl_nr, 1);
p->old_m = p->m; // save the old state
p->m = 0;
/* check the players position */
if ((p->pos.x & 0xFF) > EXPLOSION_SAVE_DISTANCE && (p->d == left || p->d == right))
if (!check_field ((p->pos.x >> 8) + 1, (p->pos.y >> 8)))
player_died (p, -1);
if ((p->pos.y & 0xFF) > EXPLOSION_SAVE_DISTANCE && (p->d == up || p->d == down))
if (!check_field ((p->pos.x >> 8), (p->pos.y >> 8) + 1))
player_died (p, -1);
if (((p->pos.x & 0xFF) < (0x100 - EXPLOSION_SAVE_DISTANCE)
&& (p->d == left || p->d == right))
|| ((p->pos.y & 0xFF) < (0x100 - EXPLOSION_SAVE_DISTANCE)
&& (p->d == up || p->d == down)))
if (!check_field (p->pos.x >> 8, p->pos.y >> 8))
player_died (p, -1);
};
@ -757,8 +802,13 @@ player_set_gfx (_player * p, signed char gfx_nr)
/* find a free bomb */
int player_findfreebomb (_player *player) {
int i, bombused = 0, res = -1, nr;
int
player_findfreebomb (_player * player)
{
int i,
bombused = 0,
res = -1,
nr;
/* check every free bomb from next entry of the last
exploded bomb to the last exploded bomb */

Loading…
Cancel
Save