From: Holger Schemel Date: Fri, 30 Apr 2004 18:20:55 +0000 (+0200) Subject: rnd-20040430-2-src X-Git-Tag: 3.1.0^2~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=cdafb9798eaecbeddc70b3d84b4bb0c81013d282;p=rocksndiamonds.git rnd-20040430-2-src --- diff --git a/src/conftime.h b/src/conftime.h index 2c0f43fc..273c2edd 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-04-30 01:05]" +#define COMPILE_DATE_STRING "[2004-04-30 08:31]" diff --git a/src/game.c b/src/game.c index 8dd2407d..da79bbf9 100644 --- a/src/game.c +++ b/src/game.c @@ -3050,13 +3050,24 @@ void Explode(int ex, int ey, int phase, int mode) continue; #endif +#if 1 + if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y)) && + (game.engine_version < VERSION_IDENT(3,1,0,0) || + (x == ex && y == ey))) +#else if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y))) +#endif { if (IS_ACTIVE_BOMB(element)) { /* re-activate things under the bomb like gate or penguin */ +#if 1 + Feld[x][y] = (Back[x][y] ? Back[x][y] : EL_EMPTY); + Back[x][y] = 0; +#else Feld[x][y] = (Store[x][y] ? Store[x][y] : EL_EMPTY); Store[x][y] = 0; +#endif } continue; @@ -3254,8 +3265,13 @@ void Explode(int ex, int ey, int phase, int mode) #if 1 border_element = Store2[x][y]; +#if 1 + if (IS_PLAYER(x, y) && !PLAYER_EXPLOSION_PROTECTED(x, y)) + border_element = StorePlayer[x][y]; +#else if (IS_PLAYER(x, y)) border_element = StorePlayer[x][y]; +#endif #if 0 printf("::: phase == %d\n", phase); @@ -3267,7 +3283,12 @@ void Explode(int ex, int ey, int phase, int mode) boolean border_explosion = FALSE; #if 1 +#if 1 + if (IS_PLAYER(x, y) && PLAYERINFO(x, y)->present && + !PLAYER_EXPLOSION_PROTECTED(x, y)) +#else if (IS_PLAYER(x, y) && PLAYERINFO(x, y)->present) +#endif #else if (IS_PLAYER(x, y)) #endif diff --git a/src/tools.c b/src/tools.c index 7e8b6921..da54ef18 100644 --- a/src/tools.c +++ b/src/tools.c @@ -40,6 +40,24 @@ static int el_act2crm(int, int); static struct GadgetInfo *tool_gadget[NUM_TOOL_BUTTONS]; static int request_gadget_id = -1; +static char *print_if_not_empty(int element) +{ + static char *s = NULL; + char *token_name = element_info[element].token_name; + + if (s != NULL) + free(s); + + s = checked_malloc(strlen(token_name) + 10 + 1); + + if (element != EL_EMPTY) + sprintf(s, "%d\t['%s']", element, token_name); + else + sprintf(s, "%d", element); + + return s; +} + void DumpTile(int x, int y) { int sx = SCREENX(x); @@ -57,12 +75,12 @@ void DumpTile(int x, int y) return; } - printf(" Feld: %d ['%s']\n", Feld[x][y], + printf(" Feld: %d\t['%s']\n", Feld[x][y], element_info[Feld[x][y]].token_name); - printf(" Back: %d\n", Back[x][y]); - printf(" Store: %d\n", Store[x][y]); - printf(" Store2: %d\n", Store2[x][y]); - printf(" StorePlayer: %d\n", StorePlayer[x][y]); + printf(" Back: %s\n", print_if_not_empty(Back[x][y])); + printf(" Store: %s\n", print_if_not_empty(Store[x][y])); + printf(" Store2: %s\n", print_if_not_empty(Store2[x][y])); + printf(" StorePlayer: %s\n", print_if_not_empty(StorePlayer[x][y])); printf(" MovPos: %d\n", MovPos[x][y]); printf(" MovDir: %d\n", MovDir[x][y]); printf(" MovDelay: %d\n", MovDelay[x][y]);