X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ffiles.c;h=1cb235ced68f5daa059138da80c795251f411423;hb=ed7060de23a6fd0c296d97717ae3b703efa410fc;hp=7b851893f1ab6eea1d5cd808fade44b29f72da5b;hpb=82b69c59921e29a1e121709e5cacbaf13f4be2e1;p=rocksndiamonds.git diff --git a/src/files.c b/src/files.c index 7b851893..1cb235ce 100644 --- a/src/files.c +++ b/src/files.c @@ -6196,7 +6196,6 @@ static void LoadLevelFromFileInfo_SB(struct LevelInfo *level, boolean invalid_playfield_char = FALSE; boolean load_xsb_to_ces = check_special_flags("load_xsb_to_ces"); int file_level_nr = 0; - int line_nr = 0; int x = 0, y = 0; // initialized to make compilers happy last_comment[0] = '\0'; @@ -6238,10 +6237,6 @@ static void LoadLevelFromFileInfo_SB(struct LevelInfo *level, if (!getStringFromFile(file, line, MAX_LINE_LEN)) break; - // check if line was completely read and is terminated by line break - if (strlen(line) > 0 && line[strlen(line) - 1] == '\n') - line_nr++; - // cut trailing line break (this can be newline and/or carriage return) for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--) if ((*line_ptr == '\n' || *line_ptr == '\r') && *(line_ptr + 1) == '\0') @@ -11987,7 +11982,7 @@ static int get_anim_action_parameter_value(char *token) { if (isURL(token)) { - result = get_hash_from_key(token); // unsigned int => int + result = get_hash_from_string(token); // unsigned int => int result = ABS(result); // may be negative now result += (result < MAX_IMAGE_FILES ? MAX_IMAGE_FILES : 0); @@ -12089,7 +12084,7 @@ int get_parameter_value(char *value_raw, char *suffix, int type) else if (strEqual(suffix, ".class")) { result = (strEqual(value, ARG_UNDEFINED) ? ARG_UNDEFINED_VALUE : - get_hash_from_key(value)); + get_hash_from_string(value)); } else if (strEqual(suffix, ".style")) {