"use strict";
/*
Sea shrine, fully submerged.  Before the (chaper 3) advent of the water layer,
if I thought I might want to use the same tiles for aquatic and air,
I needed to make 2 palette defs.
This variant replaces all the air tiles/pixels in the original shrine tileset with water.
*/
var DATA_SDS_PALETTE_INIT = DATA_SDS_PALETTE_INIT || {};
DATA_SDS_PALETTE_INIT["shrine_water"] = function(a,w,g,d,n){ // the name of the palette and the corresponding terrain sheet png
	return {
		width : 3, // pow(2,width) = tiles in a row
		height : 3, // pow(2,height) = tiles in a column; <= width
		sheetImg: "shrine_trans", // override name of the terrain sheet image, if needed
		detailMaps : [ // terrain detail maps used by tiles in this palette
			[	// chipped corner top-right
				[g,g,g,g,g,g,g,g,g,g,g,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g]
			],
			[	// chipped corner bottom-right
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,w],

				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,g,w,w,w,w],
				[g,g,g,g,g,g,g,g,g,g,g,w,w,w,w,w]
			],
			[	// chipped corner bottom-left
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,g,g,g,g,g,g,g,g,g,g,g]
			],
			[	// chipped corner top-left
				[w,w,w,w,w,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],
				[w,w,w,w,g,g,g,g,g,g,g,g,g,g,g,g],

				[w,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g]
			],

			[	// halfblock bottom
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],

				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g]
			],
			[	// halfblock left
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],

				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],

				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],

				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w],
				[g,g,g,g,g,g,g,g,w,w,w,w,w,w,w,w]
			],
			[	// halfblock top
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],
				[g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g],

				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],

				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],
				[w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w]
			],
			[	// halfblock right
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],

				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],

				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],

				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g],
				[w,w,w,w,w,w,w,w,g,g,g,g,g,g,g,g]
			]
		],
		terrain : [ // the terrain values of each tile in this palette
			w,w,w,w,w,w,w,w,
			w,w,w,w,w,w,w,w,
			g,w,g,g,g,g,g,g,
			d,d,d,d,g,g,g,g,
			w,w,w,w,d,d,d,d,
			g,w,g,g,g,g,g,g,
			d,d,d,d,g,g,g,g,
			w,w,w,w,d,d,d,d
		],
		detail : [ // the detail map indices (into detailMaps), if any, for each tile in this palette
			n,n,n,n,n,n,n,n,
			n,n,n,n,n,n,n,n,
			n,n,n,n,n,n,n,n,
			0,1,2,3,n,n,n,n,
			n,n,n,n,4,5,6,7,
			n,n,n,n,n,n,n,n,
			0,1,2,3,n,n,n,n,
			n,n,n,n,4,5,6,7
		]
	};
};