X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ffiles.c;h=49ed450ee1a8da045e2ba4be474aaa7c9f5da455;hp=28ae73a23b4b70f06b59f5c892cbb3160d94b8cb;hb=7f87d0a871432b2ed2fc1a7f3c30fc2c4ecf2dcf;hpb=f7f534a6f25f89d3df87e26e50d472995f3971b4 diff --git a/src/files.c b/src/files.c index 28ae73a2..49ed450e 100644 --- a/src/files.c +++ b/src/files.c @@ -258,6 +258,12 @@ static struct LevelFileConfigInfo chunk_config_INFO[] = &li.solved_by_one_player, FALSE }, + { + -1, -1, + TYPE_INTEGER, CONF_VALUE_8_BIT(12), + &li.time_score_base, 1 + }, + { -1, -1, -1, -1, @@ -308,6 +314,11 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] = TYPE_BOOLEAN, CONF_VALUE_8_BIT(15), &li.lazy_relocation, FALSE }, + { + EL_PLAYER_1, -1, + TYPE_BOOLEAN, CONF_VALUE_8_BIT(16), + &li.finish_dig_collect, TRUE + }, // (these values are different for each player) { @@ -3711,6 +3722,9 @@ static void CopyNativeLevel_EM_to_RND(struct LevelInfo *level) if (jx != -1 && jy != -1) level->field[jx][jy] = EL_PLAYER_1 + nr; } + + // time score is counted for each 10 seconds left in Emerald Mine levels + level->time_score_base = 10; } @@ -5728,6 +5742,9 @@ static void LoadLevelFromFileStream_DC(File *file, struct LevelInfo *level, // Diamond Caves has the same (strange) behaviour as Emerald Mine that gems // can slip down from flat walls, like normal walls and steel walls level->em_slippery_gems = TRUE; + + // time score is counted for each 10 seconds left in Diamond Caves levels + level->time_score_base = 10; } static void LoadLevelFromFileInfo_DC(struct LevelInfo *level, @@ -6251,7 +6268,7 @@ static void LoadLevel_InitVersion(struct LevelInfo *level) if (level->game_version < VERSION_IDENT(3,2,0,5)) { // time bonus score was given for 10 s instead of 1 s before 3.2.0-5 - level->score[SC_TIME_BONUS] /= 10; + level->time_score_base = 10; } if (leveldir_current->latest_engine) @@ -6423,6 +6440,10 @@ static void LoadLevel_InitVersion(struct LevelInfo *level) // only Sokoban fields (but not objects) had to be solved before 4.1.1.1 if (level->game_version < VERSION_IDENT(4,1,1,1)) level->sb_objects_needed = FALSE; + + // CE actions were triggered by unfinished digging/collecting up to 4.2.2.0 + if (level->game_version <= VERSION_IDENT(4,2,2,0)) + level->finish_dig_collect = FALSE; } static void LoadLevel_InitStandardElements(struct LevelInfo *level)