display-name: "Games/Clyde's Revenge"
meta: {"Working":["Packed file extraction", "Most images"], "Thanks to": "Frenkel Smeijers"}

if (file.name == "c2.db")
{
	unsigned32 file-count

	file [file-count]
	{
		fixed-string(16) name
		unsigned32 offset
		unsigned32 size
	}
}

if (file.name like "*.pcx")
{
	interpret-as "image-PCX"
}

if (file.name == "stnd8x8a.fnt")
{
	data(512) unknown //a header of some sort
	image
	{
		format: "I8"
		width: 7
		height: 8
		tiles-across: 10
		palette: "c2.pal"
		data-size: file.remaining-bytes
	}
}

if (file.name like "*.til")
{
	unsigned32 something
	data(8) zeroes

	image-layout-width: 320
	image-layout
	{
		loop (file.remaining-bytes / (16 * 16 + 8))
		{
			image
			{
				width: 16
				height: 16
				format: "I8"
				palette: "c2.pal"
				interlaced: 4
			}
			data(8) unknown
		}
	}
}

if (file.name like "*.voc")
{
	interpret-as "sound-VOC"
}


if (file.name like "*.mid")
{
	folder: "Music"
}

if (file.name like ["*.doc", "*.frm"])
{
	text
}

if (file.name like "*.pcs")
{
	folder: "Sound (PC speaker, not working)"
}

if (file.name == "numbers.dat")
{
	image
	{
		format: "I8"
		width: 8
		height: 11
		palette: "c2.pal"
		tiles-across:13
		data-size: file.size
	}
}

if (file.name == "clyde.dat")
{
	data(14) unknown
	image
	{
		format: "I8"
		width: 24
		height: 31
		interlaced: 4
		tiles-across: 23
		palette: "c2.pal"
		data-size: file.size
	}
}

if (file.name like "*.pal")
{
	palette
	{
		format: "R6G6B6"
		size: 256
	}
}

if (file.name like ["1*", "2*", "3*", "4*"])
{
	folder: "Level data"
}

if (file.size == 4000)
{
	b800-text
}