X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Ffile.c;h=a66187c582f5d04f6b13dcbaea72a6d8036eec63;hb=HEAD;hp=4e8c9a8feb4b4d7949b5f01f980288f48546a427;hpb=12a8fd3a64d6bee5ca5f5b89e4a00b49d78bbd2c;p=rocksndiamonds.git diff --git a/src/game_sp/file.c b/src/game_sp/file.c index 4e8c9a8f..a66187c5 100644 --- a/src/game_sp/file.c +++ b/src/game_sp/file.c @@ -19,8 +19,6 @@ void setLevelInfoToDefaults_SP(void) char *empty_title = "-------- EMPTY --------"; int i, x, y; - native_sp_level.game_sp = &game_sp; - native_sp_level.width = SP_STD_PLAYFIELD_WIDTH; native_sp_level.height = SP_STD_PLAYFIELD_HEIGHT; @@ -258,7 +256,7 @@ static void LoadNativeLevelFromFileStream_SP(File *file, int width, int height, } if (i >= SP_MAX_TAPE_LEN) - Error(ERR_WARN, "SP demo truncated: size exceeds maximum SP demo size %d", + Warn("SP demo truncated: size exceeds maximum SP demo size %d", SP_MAX_TAPE_LEN); native_sp_level.demo.length = i; @@ -294,7 +292,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, if (!(file = openFile(filename, MODE_READ))) { if (!level_info_only) - Error(ERR_WARN, "cannot open file '%s' -- using empty level", filename); + Warn("cannot open file '%s' -- using empty level", filename); return FALSE; } @@ -310,8 +308,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, if (!strEqual(mpx_chunk_name, "MPX ")) { - Error(ERR_WARN, "cannot find MPX ID in file '%s' -- using empty level", - filename); + Warn("cannot find MPX ID in file '%s' -- using empty level", filename); return FALSE; } @@ -320,8 +317,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, if (mpx_version != 1) { - Error(ERR_WARN, "unknown MPX version in file '%s' -- using empty level", - filename); + Warn("unknown MPX version in file '%s' -- using empty level", filename); return FALSE; } @@ -330,16 +326,14 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, if (mpx_level_count < 1) { - Error(ERR_WARN, "no MPX levels found in file '%s' -- using empty level", - filename); + Warn("no MPX levels found in file '%s' -- using empty level", filename); return FALSE; } if (level_pos >= mpx_level_count) { - Error(ERR_WARN, "MPX level not found in file '%s' -- using empty level", - filename); + Warn("MPX level not found in file '%s' -- using empty level", filename); return FALSE; } @@ -365,7 +359,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, // position file stream to the requested level (in case of level package) if (seekFile(file, file_seek_pos, SEEK_SET) != 0) { - Error(ERR_WARN, "cannot fseek in file '%s' -- using empty level", filename); + Warn("cannot fseek in file '%s' -- using empty level", filename); return FALSE; } @@ -477,7 +471,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, if (multipart_xpos * SP_STD_PLAYFIELD_WIDTH > SP_MAX_PLAYFIELD_WIDTH || multipart_ypos * SP_STD_PLAYFIELD_HEIGHT > SP_MAX_PLAYFIELD_HEIGHT) { - Error(ERR_WARN, "multi-part level is too big -- ignoring part of it"); + Warn("multi-part level is too big -- ignoring part of it"); break; } @@ -507,7 +501,7 @@ boolean LoadNativeLevel_SP(char *filename, int level_pos, { setLevelInfoToDefaults_SP(); - Error(ERR_WARN, "single part of multi-part level -- using empty level"); + Warn("single part of multi-part level -- using empty level"); } if (reading_multipart_level) @@ -526,7 +520,7 @@ void SaveNativeLevel_SP(char *filename) if (!(file = fopen(filename, MODE_WRITE))) { - Error(ERR_WARN, "cannot save native level file '%s'", filename); + Warn("cannot save native level file '%s'", filename); return; }