From: Holger Schemel Date: Mon, 10 Apr 2017 21:22:07 +0000 (+0200) Subject: changed level time units from 4-second-intervals to seconds (MM engine) X-Git-Tag: 4.1.0.0~121 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e84892f2b6b69147441c10ec8ae7304748162fb8;p=rocksndiamonds.git changed level time units from 4-second-intervals to seconds (MM engine) --- diff --git a/src/game_mm/mm_files.c b/src/game_mm/mm_files.c index 31e56633..8e6a72bd 100644 --- a/src/game_mm/mm_files.c +++ b/src/game_mm/mm_files.c @@ -151,6 +151,10 @@ static int LoadLevel_MM_HEAD(File *file, int chunk_size, level->time = getFile16BitInteger(file, BYTE_ORDER_BIG_ENDIAN); level->kettles_needed = getFile16BitInteger(file, BYTE_ORDER_BIG_ENDIAN); + // one time unit was equivalent to four seconds in level files up to 2.0.x + if (level->file_version <= MM_FILE_VERSION_2_0) + level->time *= 4; + for (i = 0; i < MAX_LEVEL_NAME_LEN; i++) level->name[i] = getFile8Bit(file); level->name[MAX_LEVEL_NAME_LEN] = 0; diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 8b0ba849..543be639 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -73,7 +73,7 @@ #define INIT_GAME_ACTIONS_DELAY (ONE_SECOND_DELAY / GAME_FRAME_DELAY) #define NUM_INIT_CYCLE_STEPS 16 #define PACMAN_MOVE_DELAY 12 -#define ENERGY_DELAY (4 * ONE_SECOND_DELAY / GAME_FRAME_DELAY) +#define ENERGY_DELAY (ONE_SECOND_DELAY / GAME_FRAME_DELAY) #define HEALTH_DEC_DELAY 3 #define HEALTH_INC_DELAY 9 #define HEALTH_DELAY(x) ((x) ? HEALTH_DEC_DELAY : HEALTH_INC_DELAY)