X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fconvert.c;h=b119d0e16106c82ea8fe584bdab1afd72c134d97;hb=b180608242f0190c6c8b31772e4dcfce2e9af47c;hp=5a143a698886e668040920b4d460f3b2d7e89bee;hpb=51dcb2097c619c5f9ba924a7edb4a3bdd6a6986e;p=rocksndiamonds.git diff --git a/src/game_em/convert.c b/src/game_em/convert.c index 5a143a69..b119d0e1 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -134,8 +134,12 @@ int cleanup_em_level(unsigned char *src, int length) for (i = 2112; i < 2148; i++) src[i] = src[i - 64]; } +#if 0 + else if (length >= 2106) /* !!! TEST ONLY: SHOW BROKEN LEVELS !!! */ +#else else if (length >= 2106 && src[1983] == 116) +#endif { /* ---------- this cave has V4 file format ---------- */ file_version = FILE_VERSION_EM_V4; @@ -378,7 +382,8 @@ int cleanup_em_level(unsigned char *src, int length) length = 2172; #if 1 - printf("::: EM level file version: %d\n", file_version); + if (options.debug) + printf("::: EM level file version: %d\n", file_version); #endif return file_version; @@ -897,7 +902,11 @@ void prepare_em_level(void) for (x = 0; x < WIDTH; x++) Draw[y][x] = Cave[y][x]; +#if 1 + lev.time_initial = lev.time_seconds; +#else lev.time_initial = (lev.time_seconds * 50 + 7) / 8; +#endif lev.time = lev.time_initial; lev.required = lev.required_initial; @@ -920,14 +929,16 @@ void prepare_em_level(void) lev.wheel_x = lev.wheel_x_initial; lev.wheel_y = lev.wheel_y_initial; - lev.wind_cnt = lev.wind_cnt_initial; lev.wind_direction = lev.wind_direction_initial; + lev.wind_cnt = lev.wind_cnt_initial; lev.wonderwall_state = lev.wonderwall_state_initial; lev.wonderwall_time = lev.wonderwall_time_initial; lev.home = lev.home_initial; + lev.killed_out_of_time = FALSE; + ply1.num = 0; ply1.alive = ply1.alive_initial; ply1.dynamite = 0; @@ -936,7 +947,7 @@ void prepare_em_level(void) ply1.anim = 0; ply1.oldx = ply1.x = ply1.x_initial; ply1.oldy = ply1.y = ply1.y_initial; - ply1.last_move_dir = MV_NO_MOVING; + ply1.last_move_dir = MV_NONE; ply1.joy_n = ply1.joy_e = ply1.joy_s = ply1.joy_w = 0; ply1.joy_snap = ply1.joy_drop = 0; ply1.joy_stick = ply1.joy_spin = 0; @@ -949,7 +960,7 @@ void prepare_em_level(void) ply2.anim = 0; ply2.oldx = ply2.x = ply2.x_initial; ply2.oldy = ply2.y = ply2.y_initial; - ply2.last_move_dir = MV_NO_MOVING; + ply2.last_move_dir = MV_NONE; ply2.joy_n = ply2.joy_e = ply2.joy_s = ply2.joy_w = 0; ply2.joy_snap = ply1.joy_drop = 0; ply2.joy_stick = ply2.joy_spin = 0;