random tilesets have not been set right.. we called first tileset_load and then init_map_tileset what should be in the other way.. even put all this into the game_start routine.

origin
stpohle 22 years ago
parent c84bca3eba
commit 6a9afa3ab5

@ -5,7 +5,6 @@ dnl Please disable it in the Anjuta project configuration
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(bomberclone, 0.11.0)
AM_CONFIG_HEADER
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.59 2003/11/09 03:56:56 stpohle Exp $
/* $Id: game.c,v 1.60 2003/11/12 00:28:04 stpohle Exp $
game.c - procedures for the game. */
#include <string.h>
@ -346,6 +346,7 @@ game_start ()
}
}
init_map_tileset ();
tileset_load (map.tileset);
gfx_load_players (gfx.block.x, gfx.block.y);
snd_load (map.tileset);

@ -230,7 +230,6 @@ host_multiplayer_game ()
net_new_game ();
net_send_servermode ();
game_start ();
init_map_tileset();
net_transmit_gamedata ();
if (bman.state == GS_ready || bman.state == GS_running) {
@ -268,9 +267,9 @@ join_multiplayer_game ()
wait_for_players ();
if (bman.p_nr != -1 && (GS_WAITRUNNING || bman.state == GS_update)) {
net_new_game ();
game_start ();
bman.state = GS_update;
net_new_game ();
net_transmit_gamedata ();
if (bman.state == GS_ready || bman.state == GS_running)

@ -1,4 +1,4 @@
/* $Id: single.c,v 1.49 2003/11/09 23:56:35 stpohle Exp $ */
/* $Id: single.c,v 1.50 2003/11/12 00:28:04 stpohle Exp $ */
/* single player */
#include "basic.h"
@ -604,9 +604,8 @@ single_playergame ()
bman.state = GS_ready;
while (!done && bman.state != GS_quit && bman.state != GS_startup) {
game_start ();
single_game_new ();
init_map_tileset ();
game_start ();
game_loop ();
game_end ();
}

@ -1,4 +1,4 @@
/* $Id: tileset.c,v 1.10 2003/11/08 06:27:59 stpohle Exp $ */
/* $Id: tileset.c,v 1.11 2003/11/12 00:28:04 stpohle Exp $ */
/* load and select tilesets */
#include "bomberclone.h"
@ -19,13 +19,14 @@ void tileset_random () {
max++;
sel = s_random (max);
d_printf ("Random Tileset %d of %d selected\n", sel, max);
for (max = 0, de = destart; max <= sel && de != NULL; de = de->next)
if (de->name[0] != '.' && (de->flags & DF_dir) == DF_dir) {
desel = de;
max++;
}
d_printf ("Random Tileset %s (%d on %d)\n", desel->name, sel, max);
d_printf (" %s\n", desel->name);
if (desel != NULL)
strncpy (map.tileset, desel->name, LEN_TILESETNAME);
@ -33,8 +34,6 @@ void tileset_random () {
}
/* load the tileset or if not present the files from the default folder */
void
tileset_load (char *tilesetname)

Loading…
Cancel
Save