Graf - Whats the deal with this RIFF in w_wad.cpp

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
nwbeeman
Posts: 146
Joined: Mon Oct 17, 2005 1:18
Location: Tampa

Graf - Whats the deal with this RIFF in w_wad.cpp

Post by nwbeeman »

I found these lines in the w_wad.cpp containing refrences to the BLOOD RIFF format
[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));
		}
	}
[/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]
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Are you sure that screenshot was a joke? Zdoom can load build maps although it's really not an awful lot of use as they won't play and many of the build features aren't supported. Zdoom can also load and use the Blood "Blood Bath Announcer" as an alternative deathmatch commentary.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

That's indeed for loading Blood resource files. The screenshot was not a joke, btw. All the code necessary to do it is in the engine.
User avatar
nwbeeman
Posts: 146
Joined: Mon Oct 17, 2005 1:18
Location: Tampa

Post by nwbeeman »

wow. pretty cool. I always thought that screenshot was a joke. Guess it wasn't.
Locked

Return to “GZDoom”