From 2be37b90e35d2343ab8947952887e2cb3c9009b3 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 23 Oct 2013 18:57:18 +0000 Subject: [PATCH] snd_umx.c: support umx files from unreal 1997/98 beta version. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@878 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/snd_umx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Quake/snd_umx.c b/Quake/snd_umx.c index edfec0a5..7373d5e1 100644 --- a/Quake/snd_umx.c +++ b/Quake/snd_umx.c @@ -182,7 +182,9 @@ static int read_export (fshandle_t *f, const struct upkg_hdr *hdr, if (FS_fread(buf, 4, 10, f) < 10) return -1; + if (hdr->file_version < 40) idx += 8; /* 00 00 00 00 00 00 00 00 */ 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 */ if (hdr->file_version > 61) idx += 4; /* skip export size */ *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); 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 object_name */ idx += 4; /* skip int32 object_flags */ @@ -296,6 +298,8 @@ static int32_t probe_header (void *header) } switch (hdr->file_version) { + case 35: case 37: /* Unreal beta - */ + case 40: case 41: /* 1998 */ case 61:/* Unreal */ case 62:/* Unreal Tournament */ case 63:/* Return to NaPali */