snd_umx.c: support umx files from unreal 1997/98 beta version.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@878 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2013-10-23 18:57:18 +00:00
parent 3b2e101cbe
commit 8d6e912c2a

View file

@ -182,7 +182,9 @@ static int read_export (fshandle_t *f, const struct upkg_hdr *hdr,
if (FS_fread(buf, 4, 10, f) < 10) if (FS_fread(buf, 4, 10, f) < 10)
return -1; return -1;
if (hdr->file_version < 40) idx += 8; /* 00 00 00 00 00 00 00 00 */
get_fci(&buf[idx], &idx); /* skip junk */ get_fci(&buf[idx], &idx); /* skip junk */
if (hdr->file_version < 60) idx += 16; /* 00 00 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 */
t = get_fci(&buf[idx], &idx); /* type_name */ t = get_fci(&buf[idx], &idx); /* type_name */
if (hdr->file_version > 61) idx += 4; /* skip export size */ if (hdr->file_version > 61) idx += 4; /* skip export size */
*objsize = get_fci(&buf[idx], &idx); *objsize = get_fci(&buf[idx], &idx);
@ -238,7 +240,7 @@ static int probe_umx (fshandle_t *f, const struct upkg_hdr *hdr,
FS_fread(buf, 1, 64, f); FS_fread(buf, 1, 64, f);
get_fci(&buf[idx], &idx); /* skip class_index */ get_fci(&buf[idx], &idx); /* skip class_index */
idx += 4; /* skip int32 package_index */ if (hdr->file_version >= 60) idx += 4; /* skip int32 package_index */
get_fci(&buf[idx], &idx); /* skip super_index */ get_fci(&buf[idx], &idx); /* skip super_index */
get_fci(&buf[idx], &idx); /* skip object_name */ get_fci(&buf[idx], &idx); /* skip object_name */
idx += 4; /* skip int32 object_flags */ idx += 4; /* skip int32 object_flags */
@ -296,6 +298,8 @@ static int32_t probe_header (void *header)
} }
switch (hdr->file_version) { switch (hdr->file_version) {
case 35: case 37: /* Unreal beta - */
case 40: case 41: /* 1998 */
case 61:/* Unreal */ case 61:/* Unreal */
case 62:/* Unreal Tournament */ case 62:/* Unreal Tournament */
case 63:/* Return to NaPali */ case 63:/* Return to NaPali */