Tweaked so that it spits out an error for unsupported compression formats.

This commit is contained in:
Nevur 2017-05-02 19:20:29 +02:00
parent 0c73dae57d
commit b60010f0f1
2 changed files with 3 additions and 3 deletions

View File

@ -538,7 +538,7 @@ UINT16 W_LoadWadFile(const char *filename)
break;
default:
CONS_Alert(CONS_WARNING, "Lump has an unsupported compression type!\n");
lumpinfo[numlumps].compression = CM_NONE;
lumpinfo[numlumps].compression = CM_UNSUPPORTED;
break;
}
fseek(handle, eXFieldLen + eCommentLen, SEEK_CUR); // We skip to where we expect the next central directory entry or end marker to be.
@ -1122,7 +1122,7 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si
return size;
}
default:
return 0;
I_Error("wad %d, lump %d: unsupported compression type!", wad, lump);
}
}

View File

@ -35,7 +35,7 @@ typedef struct
} wadinfo_t;
// Available compression methods for lumps.
enum compmethod{CM_NONE, CM_DEFLATE, CM_LZF};
enum compmethod{CM_NONE, CM_DEFLATE, CM_LZF, CM_UNSUPPORTED};
// a memory entry of the wad directory
typedef struct