display-name: "Games/Syndicate"
meta: {"Working": ["Tiles", "Text tables"], "Thanks to": "Jon Skeet"}

if (file.name like "hblk*.dat")
{
	folder: "Map tiles"

	compressed "RNC"

	image-layout-width: 32 * 16
	image-layout
	{
		loop (512)
		{
			image-layout-width: 32
			image-layout
			{
				loop (3)
				{
					unsigned32 imageLocation

					if (imageLocation == 0)
					{
						imageLocation: 6144
					}			

					at imageLocation
					{
						image
						{	
							format: "A1I4"
							width: 32
							height: 16
							bit-stride: width					
							palette: "hpalette.dat"
							alpha-mask: 1
						}
					}
				}
			}
		}
	}
}

if (file.name like ["hpalette.dat", "mselect.pal", "hpal*.dat"])
{
	compressed "RNC"
	palette
	{
		size: 256
		format: "R6G6B6"
	}
}

if (file.name like "map*.dat")
{
	folder: "Maps"

	compressed "RNC"	
}

mission-language-table:
{
	["miss??.dat"]:	"Mission text\\English",
	["miss1??.dat"]:	"Mission text\\French",
	["miss2??.dat"]:	"Mission text\\Italian",
	["miss3??.dat"]:	"Mission text\\German"
}

if (file.name like "mis*.dat")
{
	folder: mission-language-table[file.name] //TODO: per-file different, time for DEEP DIVE

	compressed "RNC"
	text
}

if (file.name like ["col01.dat", "game*.dat", "hreq.dat", "hpal*", "hfnt*", "hele-0.ani", "hfra-0.ani", "hpointer.dat", "hspr*", "hsta*", "mlogos.dat", "mmapblk.dat", "mminlogo.dat", "mspr*", "sound*"])
{
	compressed "RNC"
}

if (file.name like ["mlos*.dat", "mmapout.dat", "mmult*.dat", "mopt*.dat", "mresout.dat", "mresrch.dat", "mlosegam.dat", "mtitle.dat", "mmap.dat", "mscrenup.dat", "msel*.dat", "mgamewin.dat", "mend*.dat", "mbrie*.dat", "mconf*.dat", "mdebrief.dat", "mdeout.dat", "intro.dat"])
{
	folder: "Animations"
	interpret-as "animation-flic"
}

if (file.name like "mconscr.dat")
{
	image
	{
		format: "I8"
		palette: "mselect.pal"
		width: 320
		height: 200
	}
}