
characterFinger = 
{
	Image = "Icons.jpg",
	Animation  =
	{        
		FramesList =
		{	
			{602, 398, 642, 462},
			{643, 398, 684, 462},
			{685, 398, 725, 462},
			{725, 398, 765, 462},
			{685, 398, 725, 462},
			{643, 398, 684, 462},
			{602, 398, 642, 462},
		}
	}
};

hintType = {};

hintType.bottomRight	= 0;
hintType.bottomLeft		= 1;
hintType.topRight		= 2;
hintType.topLeft		= 3;

emptyObj = nil;

function copy(obj, template)
	obj = {};
	for key, value in pairs(template) do
		if(type(value) == 'table') then
			obj[key] = copy(obj[key], template[key]);
		else
			obj[key] = value;
		end 
	end
	
	return obj;
end

--[[{156, 78, 196, 113},--рыжий
	{196, 78, 236, 113},--черненькая
	{236, 78, 276, 113},--принц
	{276, 78, 316, 113},--соня
	{316, 78, 356, 113},--солдат
	{356, 78, 396, 113},--вонючка
	{396, 78, 436, 113},--профессор
	{436, 78, 476, 113},--музыкант в красной шапке
	{476, 78, 516, 113},--толстый в синей шапке
	{516, 78, 556, 113},--прнцесса
	{556, 78, 596, 113},--колдун с седой бородой
	{596, 78, 636, 113},--толстяк с русыми волосами
	{636, 78, 676, 113},--мадама
	{676, 78, 716, 113}--бабуля	
]]

CharacterMovingTypeRects = 
{
	{294, 149, 431, 184},--1
	{157, 149, 294, 184},--2
	{294, 114, 431, 149},--3
	{157, 114, 294, 149},--4
};

hintCorners = 
{
	Image = "Icons.jpg",
	Animation  =
	{        
		FramesList =
		{	
			{553, 398, 602, 453}
		}
	}
};

buySkillSprites = 
{
	{157, 184, 183, 210}, -- покупка 1 товара
	{183, 184, 209, 210}, -- покупка 2 товаров
	{209, 184, 235, 210}, -- покупка 3 товаров
	{235, 184, 261, 210}, -- покупка 4 товаров
	{261, 184, 287, 210}  -- покупка 5 товаров
};


CharacterHintTemplate = 
{
	--hint window settings
	windowStyle =
	{
		SrcRect          = {0, 313, 152, 465},
		Image            = "Icons.jpg",
		WinSize          = {250, 240},
		AngleScrSize     = {25, 25},
	},
	--character's moving type
	state = 
	{
		dataType		= "image",
		Image			= "Icons.jpg",
		Pos				= {63-6, 185},
		SrcRect			= {0, 0, 0, 0},
	},
	--character's name
	name = 
	{
		dataType		= "text",
		Caption 		= "Enter your caption here",
		Font			= "font05.fnt",
		TextArea		= {20, 15, 220, 35},
		Colour			= {0.27843, 0.0941, 0, 1},
		SRatio 			= 0.8,
		HRatio 			= 0.65,
		HAlign			= "left",
		VAlign			= "center",
		SizeW			= 1,
		SizeH			= 1,
	},
	--character's description
	description = 
	{
		dataType		= "text",
		Caption			= "",
		Font			= "font05.fnt",
		TextArea		= {20, 40, 230, 150},
		Colour			= {0, 0.0941, 0.27843, 1},
		HAlign			= "left",
		--VAlign			= "center",
		SRatio 			= 0.8,
		HRatio 			= 0.83,
		SizeW			= 1,
		SizeH			= 1
	},

	--корзина
	stuffGoodsCart = 
	{
		dataType		= "image",
		Image			= "Icons.jpg",
		Pos				= {200, 11},
		SrcRect			= {735, 477, 773, 510},
	},

	--amount of stuff the character is able to buy
	stuffAmount = 
	{
		dataType		= "image",
		Image			= "Icons.jpg",
		Pos				= {210, 0},
		SrcRect			= {0, 0, 0, 0},
	},

};

--Мужичок
BuyBarbateManHint = {};
BuyBarbateManHint.data = copy(emptyObj, CharacterHintTemplate);
BuyBarbateManHint.data.name.Caption = "charhint_Peasant";
BuyBarbateManHint.data.description.Caption = "charhint_Peasant_txt";
BuyBarbateManHint.data.state.SrcRect = CharacterMovingTypeRects[4];
BuyBarbateManHint.data.stuffAmount.SrcRect = buySkillSprites[2];

--Девочка
BuyBrunetGirlHint = {};
BuyBrunetGirlHint.data = copy(emptyObj, CharacterHintTemplate);
BuyBrunetGirlHint.data.name.Caption = "charhint_Girl";
BuyBrunetGirlHint.data.description.Caption = "charhint_Girl_txt";
BuyBrunetGirlHint.data.state.SrcRect = CharacterMovingTypeRects[3];
BuyBrunetGirlHint.data.stuffAmount.SrcRect = buySkillSprites[1];

--Принц
BuyBlondManHint = {};
BuyBlondManHint.data = copy(emptyObj, CharacterHintTemplate);
BuyBlondManHint.data.name.Caption = "charhint_Prince";
BuyBlondManHint.data.description.Caption = "charhint_Prince_txt";
BuyBlondManHint.data.state.SrcRect = CharacterMovingTypeRects[3];
BuyBlondManHint.data.stuffAmount.SrcRect = buySkillSprites[2];

--Соня
BuySleeperBoyHint = {};
BuySleeperBoyHint.data = copy(emptyObj, CharacterHintTemplate);
BuySleeperBoyHint.data.name.Caption = "charhint_sliper";
BuySleeperBoyHint.data.description.Caption = "charhint_sliper_txt";
BuySleeperBoyHint.data.state.SrcRect = CharacterMovingTypeRects[4];
BuySleeperBoyHint.data.stuffAmount.SrcRect = buySkillSprites[1];

--Генерал
BuySoldierHint = {};
BuySoldierHint.data = copy(emptyObj, CharacterHintTemplate);
BuySoldierHint.data.name.Caption = "charhint_General";
BuySoldierHint.data.description.Caption = "charhint_General_txt";
BuySoldierHint.data.state.SrcRect = CharacterMovingTypeRects[3];
BuySoldierHint.data.stuffAmount.SrcRect = buySkillSprites[1];

--Вонючка
BuySkunkHint = {};
BuySkunkHint.data = copy(emptyObj, CharacterHintTemplate);
BuySkunkHint.data.name.Caption = "charhint_Skunk";
BuySkunkHint.data.description.Caption = "charhint_Skunk_txt";
BuySkunkHint.data.state.SrcRect = CharacterMovingTypeRects[4];
BuySkunkHint.data.stuffAmount.SrcRect = buySkillSprites[1];

--Профессор
BuyNosyManHint = {};
BuyNosyManHint.data = copy(emptyObj, CharacterHintTemplate);
BuyNosyManHint.data.name.Caption = "charhint_Professor";
BuyNosyManHint.data.description.Caption = "charhint_Professor_txt";
BuyNosyManHint.data.state.SrcRect = CharacterMovingTypeRects[4];
BuyNosyManHint.data.stuffAmount.SrcRect = buySkillSprites[3];

--Музыкант
BuyRedHeatHint = {};
BuyRedHeatHint.data = copy(emptyObj, CharacterHintTemplate);
BuyRedHeatHint.data.name.Caption = "charhint_Music";
BuyRedHeatHint.data.description.Caption = "charhint_Music_txt";
BuyRedHeatHint.data.state.SrcRect = CharacterMovingTypeRects[3];
BuyRedHeatHint.data.stuffAmount.SrcRect = buySkillSprites[1];

--Толстяк большой в синей кепке
BuyBlueHatFatManHint = {};
BuyBlueHatFatManHint.data = copy(emptyObj, CharacterHintTemplate);
BuyBlueHatFatManHint.data.name.Caption = "charhint_BigFatMan";
BuyBlueHatFatManHint.data.description.Caption = "charhint_BigFatMan_txt";
BuyBlueHatFatManHint.data.state.SrcRect = CharacterMovingTypeRects[2];
BuyBlueHatFatManHint.data.stuffAmount.SrcRect = buySkillSprites[3];

--Принцесса
BuyPrincessHint = {};
BuyPrincessHint.data = copy(emptyObj, CharacterHintTemplate);
BuyPrincessHint.data.name.Caption = "charhint_Princess";
BuyPrincessHint.data.description.Caption = "charhint_Princess_txt";
BuyPrincessHint.data.state.SrcRect = CharacterMovingTypeRects[2];
BuyPrincessHint.data.stuffAmount.SrcRect = buySkillSprites[3];

--Волшебник
BuyWizardHint = {};
BuyWizardHint.data = copy(emptyObj, CharacterHintTemplate);
BuyWizardHint.data.name.Caption = "Волшебник";
BuyWizardHint.data.description.Caption = "Любит колдавать, в свободное время.";
BuyWizardHint.data.state.SrcRect = CharacterMovingTypeRects[4];
BuyWizardHint.data.stuffAmount.SrcRect = buySkillSprites[2];

--Толстяк мальчик
BuyFairHint = {};
BuyFairHint.data = copy(emptyObj, CharacterHintTemplate);
BuyFairHint.data.name.Caption = "charhint_FatManboy";
BuyFairHint.data.description.Caption = "charhint_FatManboy_txt";
BuyFairHint.data.state.SrcRect = CharacterMovingTypeRects[3];
BuyFairHint.data.stuffAmount.SrcRect = buySkillSprites[2];

--Богачка
BuyBigLadyHint = {};
BuyBigLadyHint.data = copy(emptyObj, CharacterHintTemplate);
BuyBigLadyHint.data.name.Caption = "charhint_richwoman";
BuyBigLadyHint.data.description.Caption = "charhint_richwoman_txt";
BuyBigLadyHint.data.state.SrcRect = CharacterMovingTypeRects[1];
BuyBigLadyHint.data.stuffAmount.SrcRect = buySkillSprites[4];

--Старушка
BuyWomanInGlassesHint = {};
BuyWomanInGlassesHint.data = copy(emptyObj, CharacterHintTemplate);
BuyWomanInGlassesHint.data.name.Caption = "charhint_Oldwoman";
BuyWomanInGlassesHint.data.description.Caption = "charhint_Oldwoman_txt";
BuyWomanInGlassesHint.data.state.SrcRect = CharacterMovingTypeRects[1];
BuyWomanInGlassesHint.data.stuffAmount.SrcRect = buySkillSprites[2];

HintList = 
{
	"BuyBarbateManHint",
	"BuyBrunetGirlHint",
	"BuyBlondManHint",
	"BuySleeperBoyHint",
	"BuySoldierHint",
	"BuySkunkHint",
	"BuyNosyManHint",
	"BuyRedHeatHint",
	"BuyBlueHatFatManHint",
	"BuyPrincessHint",
	"BuyWizardHint",
	"BuyFairHint",
	"BuyBigLadyHint",
	"BuyWomanInGlassesHint",
};

