display-name: "Games/Sink or Swim"
meta: {"Working": ["All graphics", "Sounds", "Levels (no objects)"]}

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

if (file.size == 61440)
{
	image
	{
		format: "I8"
		palette: "pal.dat"
		width: 32
		height: 32
		data-size: file.size
		tiles-across: 20

		if (file.name like "sprite*")
		{
			transparent-index: 0
		}
	}
}

if (file.size == 15360)
{
	image
	{
		format: "I8"
		palette: "pal.dat"
		width: 16
		height: 16
		data-size: file.size
		tiles-across: 30
	}
}

tileset: {
	0: ["graphics/blockl1a.dat", "graphics/blockl1b.dat", "graphics/blockl1c.dat"],
	1: ["graphics/ice1.dat", "graphics/ice2.dat", "graphics/ice3.dat"],
	2: ["graphics/fire1.dat", "graphics/fire2.dat", "graphics/fire3.dat"],
	3: ["graphics/red1.dat", "graphics/red2.dat", "graphics/red3.dat"],	
	4: ["graphics/green1.dat", "graphics/green2.dat", "graphics/green3.dat"]	
}

if (file.name like "map??.dat")
{
	folder: "Levels"

	data(4) signature //MAP\u2e
	unsigned16 width
	unsigned16 _height
	height: _height + 5
	unsigned16 tileset-id

	level
	{
		grid-x: 32
		grid-y: 32

		layer-start: file.position

		level-layer
		{
			layer-name: "Tiles"
			data-type: "unsigned16"
			order: 0
			mask: 0xFF
			layer-image: tileset[tileset-id] 
		}
	}
}

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

if (file.name like ["*.lbm", "file0??.dat", "sunk.dat", "s2f?"])
{
	interpret-as "image-ILBM"
}

if (file.name like "*.txt")
{
	interpret-as "text"
}