"use strict";
/*
* baseline container class for any non-interactive visual decoration
*
* tilesheet: the sheet containing this decoration's frame images.
* name: convenient value to check a decoration's identity.  May be null.
* 
*/
var Decoration = function(tilesheet,name){
	this.x=0;
	this.y=0;
	this.frame=0;
	this.tile_sheet=tilesheet;
	this.name=name;

	this.map_room = null;

	// a hack, yes.
	// [backgrounds]
	// 0
	// [sprites]
	// 1
	// [foregrounds]
	// 2
	// [waterplane]
	// 3
	this.layer = 0;

	this.animate = noop;

	this._heap = {};
};

	Decoration.prototype.drawIntoCanvas = function(canvas){
		if (this.tile_sheet){
			this.tile_sheet.drawIntoCanvas(canvas,this.frame,this.x,this.y);
		}
	};