Graf - Whats the deal with this RIFF in w_wad.cpp
Posted: Fri Nov 11, 2005 19:09
I found these lines in the w_wad.cpp containing refrences to the BLOOD RIFF format
[spoiler][/spoiler]
You have any idea why its there? I remember a while back Randy posted a joke screenshot of Blood's caranval level. Why is the RIFF support in there? I thought Blood used the Build engine, like Duke3d does. You have any insight on this? Or should I ask Randy?[/code]
[spoiler]
Code: Select all
else if (header.magic == RFF_ID)
{ // This is a Blood RFF file
rfflump_t *lumps, *rff_p;
int skipped = 0;
header.rff.NumLumps = LONG(header.rff.NumLumps);
header.rff.DirOfs = LONG(header.rff.DirOfs);
lumps = new rfflump_t[header.rff.NumLumps];
wadinfo->Seek (header.rff.DirOfs, SEEK_SET);
wadinfo->Read (lumps, header.rff.NumLumps * sizeof(rfflump_t));
BloodCrypt (lumps, header.rff.DirOfs, header.rff.NumLumps * sizeof(rfflump_t));
NumLumps += header.rff.NumLumps;
LumpInfo = (LumpRecord *)Realloc (LumpInfo, NumLumps*sizeof(LumpRecord));
lump_p = &LumpInfo[startlump];
for (i = 0, rff_p = lumps; i < header.rff.NumLumps; ++i, ++rff_p)
{
if (rff_p->Extension[0] == 'S' && rff_p->Extension[1] == 'F' &&
rff_p->Extension[2] == 'X')
{
lump_p->namespc = ns_bloodsfx;
}
else if (rff_p->Extension[0] == 'R' && rff_p->Extension[1] == 'A' &&
rff_p->Extension[2] == 'W')
{
lump_p->namespc = ns_bloodraw;
}
else
{
//lump_p->namespc = ns_bloodmisc;
--NumLumps;
++skipped;
continue;
}
uppercopy (lump_p->name, rff_p->Name);
lump_p->wadnum = (WORD)NumWads;
lump_p->position = LONG(rff_p->FilePos);
lump_p->size = LONG(rff_p->Size);
lump_p->flags = (rff_p->Flags & 0x10) >> 4;
lump_p++;
}
delete[] lumps;
if (skipped != 0)
{
LumpInfo = (LumpRecord *)Realloc (LumpInfo, NumLumps*sizeof(LumpRecord));
}
}
You have any idea why its there? I remember a while back Randy posted a joke screenshot of Blood's caranval level. Why is the RIFF support in there? I thought Blood used the Build engine, like Duke3d does. You have any insight on this? Or should I ask Randy?[/code]