From: Holger Schemel Date: Sat, 13 Mar 2004 19:48:58 +0000 (+0100) Subject: rnd-20040313-2-src X-Git-Tag: 3.1.0^2~52 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=57f6ae0759f8f895ad1fc88a4eb2279404a8bb2c;p=rocksndiamonds.git rnd-20040313-2-src --- diff --git a/src/conftime.h b/src/conftime.h index ff34cb78..5189ebef 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-03-13 04:25]" +#define COMPILE_DATE_STRING "[2004-03-13 16:17]" diff --git a/src/files.c b/src/files.c index cd56a7c5..e78e7ab8 100644 --- a/src/files.c +++ b/src/files.c @@ -240,7 +240,7 @@ static void setLevelInfoToDefaults(struct LevelInfo *level) element_info[element].slippery_type = SLIPPERY_ANY_RANDOM; - element_info[element].explosion_delay = 18; + element_info[element].explosion_delay = 16; element_info[element].ignition_delay = 8; for (x = 0; x < 3; x++) diff --git a/src/game.c b/src/game.c index d90ff0c3..88e92d03 100644 --- a/src/game.c +++ b/src/game.c @@ -1629,23 +1629,32 @@ void InitGame() { if (!IS_CUSTOM_ELEMENT(i)) { - int num_phase = 9; - int delay = (game.emulation == EMU_SUPAPLEX ? 3 : 2); - int last_phase = num_phase * delay; + int num_phase = 8; + int delay = ((IS_SP_ELEMENT(i) && + game.engine_version >= VERSION_IDENT(3,1,0,0)) || + game.emulation == EMU_SUPAPLEX ? 3 : 2); + int last_phase = (num_phase + 1) * delay; int half_phase = (num_phase / 2) * delay; - element_info[i].explosion_delay = last_phase; + element_info[i].explosion_delay = last_phase - 1; element_info[i].ignition_delay = half_phase; +#if 0 + if (i == EL_BLACK_ORB) + element_info[i].ignition_delay = 0; +#else if (i == EL_BLACK_ORB) element_info[i].ignition_delay = 1; +#endif } - if (element_info[i].explosion_delay < 2) /* !!! check again !!! */ - element_info[i].explosion_delay = 2; +#if 0 + if (element_info[i].explosion_delay < 1) /* !!! check again !!! */ + element_info[i].explosion_delay = 1; if (element_info[i].ignition_delay < 1) /* !!! check again !!! */ element_info[i].ignition_delay = 1; +#endif } /* correct non-moving belts to start moving left */ @@ -2759,9 +2768,18 @@ void Explode(int ex, int ey, int phase, int mode) } #if 1 + +#if 1 + last_phase = element_info[center_element].explosion_delay + 1; +#else last_phase = element_info[center_element].explosion_delay; #endif +#if 0 + printf("::: %d -> %d\n", center_element, last_phase); +#endif +#endif + for (y = ey - 1; y <= ey + 1; y++) for (x = ex - 1; x <= ex + 1; x++) { int xx = x - ex + 1; @@ -2865,8 +2883,13 @@ void Explode(int ex, int ey, int phase, int mode) break; } +#if 1 + if (PLAYERINFO(ex, ey)->use_murphy_graphic) + Store[x][y] = EL_EMPTY; +#else if (game.emulation == EMU_SUPAPLEX) Store[x][y] = EL_EMPTY; +#endif } else if (center_element == EL_MOLE) Store[x][y] = EL_EMERALD_RED; @@ -2940,6 +2963,15 @@ void Explode(int ex, int ey, int phase, int mode) #if 1 ExplodeDelay[x][y] = last_phase; #endif + +#if 0 +#if 1 + GfxFrame[x][y] = 0; /* animation does not start until next frame */ +#else + GfxFrame[x][y] = -1; /* animation does not start until next frame */ +#endif +#endif + Stop[x][y] = TRUE; } @@ -2956,6 +2988,15 @@ void Explode(int ex, int ey, int phase, int mode) x = ex; y = ey; +#if 1 + if (phase == 1) + GfxFrame[x][y] = 0; /* restart explosion animation */ +#endif + +#if 0 + printf(":X: phase == %d [%d]\n", phase, GfxFrame[x][y]); +#endif + #if 1 last_phase = ExplodeDelay[x][y]; #endif @@ -2986,6 +3027,10 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_PLAYER(x, y)) border_element = StorePlayer[x][y]; +#if 0 + printf("::: phase == %d\n", phase); +#endif + if (phase == element_info[border_element].ignition_delay || phase == last_phase) { @@ -3146,7 +3191,20 @@ void Explode(int ex, int ey, int phase, int mode) stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON : IMG_SP_EXPLOSION); #endif +#if 1 + int frame = getGraphicAnimationFrame(graphic, GfxFrame[x][y]); +#else int frame = getGraphicAnimationFrame(graphic, phase - delay); +#endif + +#if 0 + printf("::: phase == %d [%d]\n", phase, GfxFrame[x][y]); +#endif + +#if 0 + printf("::: %d / %d [%d - %d]\n", + GfxFrame[x][y], phase - delay, phase, delay); +#endif #if 0 printf("::: %d ['%s'] -> %d\n", GfxElement[x][y], @@ -7562,7 +7620,7 @@ void GameActions() - rnd_equinox_tetrachloride 048 - rnd_equinox_tetrachloride_ii 096 - rnd_emanuel_schmieg 002 - - doctor_sloan_ww 020 + - doctor_sloan_ww 001, 020 */ if (stored_player[i].MovPos == 0) CheckGravityMovement(&stored_player[i]); diff --git a/src/init.c b/src/init.c index c4528006..480784b1 100644 --- a/src/init.c +++ b/src/init.c @@ -3447,7 +3447,7 @@ void InitElementPropertiesEngine(int engine_version) element_info[element].access_direction = MV_ALL_DIRECTIONS; - element_info[element].explosion_delay = 18; + element_info[element].explosion_delay = 17; element_info[element].ignition_delay = 8; } }