#include "SpritePart.h"

///SpritePart.cpp

string SpritePart::get_partName()
{
	return partName;
}
unsigned int SpritePart::get_partNumber()
{
	return partNumber;
}

SpritePart* SpritePart::get_parent()
{
	return parent;
}
unsigned short SpritePart::get_source_X()
{
	return source_X;
}
unsigned short SpritePart::get_source_Y()
{
	return source_Y;
}
unsigned short SpritePart::get_h()
{
	return h;
}
unsigned short SpritePart::get_w()
{
	return w;
}


 short SpritePart::get_offSet_X()
{
	return offSet_X;
}
 short SpritePart::get_offSet_Y()
{
	return offSet_Y;
}
unsigned short SpritePart::get_dest_X()
{
	if( parent != NULL )
	{
		dest_X = (offSet_X + (parent->get_dest_X()));

	}
	return dest_X;
}
unsigned short SpritePart::get_dest_Y()
{
if( parent != NULL )
	{
		dest_Y = (offSet_Y + (parent->get_dest_Y()));

	}

	return dest_Y;
}
unsigned short SpritePart::get_partColor()
{
	return partColor;
}
unsigned short SpritePart::get_charSetNumber()
{
	return charSetNumber;
}

	void SpritePart::set_parent(SpritePart* nname)
	{
		parent = nname;
	}
	void SpritePart::set_partName(string nname)
	{
		partName = nname;
	}
	void SpritePart::set_partNumber(unsigned int npnum)
	{
		partNumber	= npnum;
	}
	void SpritePart::set_source_X(unsigned short nsx)
	{
		source_X = nsx;
	}
	void SpritePart::set_source_Y(unsigned short nsy)
	{
		source_Y = nsy;
	}
	void SpritePart::set_h(unsigned short nh)
	{
		h = nh;
	}
	void SpritePart::set_w(unsigned short nw)
	{
		w = nw;
	}
	void SpritePart::set_dest_X(unsigned short nx)
	{
		dest_X = nx;
	}
	void SpritePart::set_dest_Y(unsigned short ny)
	{
		dest_Y = ny;
	}

	void SpritePart::set_offSet_X( short oset)
	{
		offSet_X = oset;
	}

	void SpritePart::set_offSet_Y( short oset)
	{
		offSet_Y = oset;
	}

	void SpritePart::set_partColor(unsigned short ncl)
	{
		partColor = ncl;
	}
	void SpritePart::set_charSetNumber(unsigned short nnum)
	{
		charSetNumber = nnum;
	}
	SpritePart::SpritePart()
	{

		offSet_X=0;
		offSet_Y=0;
		parent = NULL;
		partName = "";
		partNumber = 6;
		source_X = 1;
		source_Y = 1;
		h = 32;
		w = 32;
		dest_X = 100;
		dest_Y = 100;
		partColor = 1;
		charSetNumber =3;
	}