示例#1
0
文件: Vigia.cpp 项目: Atridas/biogame
void CVigia::InitTemplate(CXMLTreeNode& _XMLParams)
{
  CEnemy::InitTemplate(_XMLParams);
  m_fAlarmActivate = (_XMLParams.GetBoolProperty("alarm_activate",false));
  m_fEscudoActivate = (_XMLParams.GetBoolProperty("escudo_activate",false));
  CEnemy::InitTemplate(_XMLParams);
	m_fAlarmActivate = (_XMLParams.GetBoolProperty("alarm_activate",false));
	m_fEscudoActivate = (_XMLParams.GetBoolProperty("escudo_activate",false));
}
示例#2
0
void CGUIWindow::LoadSlider (CSlider** slider_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<Slider	name="debug_fps" posx="0" posy="2" height="10" width="10" visible="true" active="true" value="0.5" buttonH="10" buttonW="10"
	// button_normal="blabla" button_over="bla" button_clicked"bla" button_deactivated="bla" quad="bla"
	// OnOverAction="" OnClickedAction="" OnChangeValue="" OnSaveValue="blabl" OnLoadValue="" Literal="blabla" widthOffset="" heightOffset=""/>

  CSlider* slider;

	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w										= pNewNode.GetFloatProperty("width", 50.f);
	float 			h										= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible							= pNewNode.GetBoolProperty("visible", true);
	bool 				activated						= pNewNode.GetBoolProperty("active", true);
	float 			value								= pNewNode.GetFloatProperty("value", 0.f);
	float 			buttonH							= pNewNode.GetFloatProperty("buttonH", 10.f);
	float 			buttonW							= pNewNode.GetFloatProperty("buttonW", 10.f);
	std::string button_normal				= pNewNode.GetPszProperty("button_normal", "");
	std::string button_over					= pNewNode.GetPszProperty("button_over", "");
	std::string button_clicked			= pNewNode.GetPszProperty("button_clicked", "");
	std::string button_deactivated	= pNewNode.GetPszProperty("button_deactivated", "");
	std::string quad								= pNewNode.GetPszProperty("quad", "");
	std::string OnChangeValue				= pNewNode.GetPszProperty("OnChangeValue", "");
	std::string OnClickedAction			= pNewNode.GetPszProperty("OnClickedAction", "");
	std::string OnOverAction				= pNewNode.GetPszProperty("OnOverAction", "");
	std::string OnSaveValue					= pNewNode.GetPszProperty("OnSaveValue", "");
	std::string OnLoadValue					= pNewNode.GetPszProperty("OnLoadValue", "");
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	CTexture* normal	= tm->GetTexture(button_normal);
	CTexture* over		= tm->GetTexture(button_over);
	CTexture* deac		= tm->GetTexture(button_deactivated);
	CTexture* clicked	= tm->GetTexture(button_clicked);
	CTexture* back		= tm->GetTexture(quad);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	slider = new CSlider(	screenResolution.y, screenResolution.x, h, w, Vect2f(posx,posy), buttonW, buttonH, value, 
												l_literal, heightOffset, widthOffset, visible, activated);
	slider->SetName(name);
	slider->SetButtonTextures(normal, over, clicked, deac);
	slider->SetBackGroundTexture(back);
	slider->SetOnChangeValueAction(OnChangeValue);
	slider->SetOnClickedAction(OnClickedAction);
	slider->SetOnOverAction(OnOverAction);
	slider->SetOnLoadValueAction(OnLoadValue);
	slider->SetOnSaveValueAction(OnSaveValue);

  *slider_aux = slider;
}
示例#3
0
void	CGUIWindow::LoadDialogBox			(CDialogBox** dialogBox_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<DialogBox name="debug_fps" posx="0" posy="2" height="10" width="10" visible="true" active="true" buttonH="10" buttonW="10"
	// buttonClose_normal="blabla" buttonClose_over="bla" buttonClose_clicked"bla"  buttonClose_deactivated"bla" buttonMove_normal="blabla" buttonMove_over="bla"
	// buttonMove_clicked"bla" buttonMove_deactivated"bla" quad="bla" Literal="blabla" widthOffset="" heightOffset=""/>

  CDialogBox* dialogBox;

	std::string name										= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx										= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy										= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w												= pNewNode.GetFloatProperty("width", 50.f);
	float 			h												= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible									= pNewNode.GetBoolProperty("visible", true);
	bool 				activated								= pNewNode.GetBoolProperty("active", true);
	float 			buttonH									= pNewNode.GetFloatProperty("buttonH", 10.f);
	float 			buttonW									= pNewNode.GetFloatProperty("buttonW", 10.f);
	std::string buttonClose_normal			= pNewNode.GetPszProperty("buttonClose_normal", "");
	std::string buttonClose_over				= pNewNode.GetPszProperty("buttonClose_over", "");
	std::string buttonClose_clicked			= pNewNode.GetPszProperty("buttonClose_clicked", "");
	std::string buttonClose_deactivated	= pNewNode.GetPszProperty("buttonClose_deactivated", "");
	std::string buttonMove_normal				= pNewNode.GetPszProperty("buttonMove_normal", "");
	std::string buttonMove_over					= pNewNode.GetPszProperty("buttonMove_over", "");
	std::string buttonMove_clicked			= pNewNode.GetPszProperty("buttonMove_clicked", "");
	std::string buttonMove_deactivated	= pNewNode.GetPszProperty("buttonMove_deactivated", "");
	std::string quad										= pNewNode.GetPszProperty("quad");
	std::string l_literal								= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent			= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent			= pNewNode.GetFloatProperty("heightOffset", 0.f);

	CTexture* Close_normal			= tm->GetTexture(buttonClose_normal);
	CTexture* Close_over				= tm->GetTexture(buttonClose_over);
	CTexture* Close_clicked			= tm->GetTexture(buttonClose_clicked);
	CTexture* Close_deactivated	= tm->GetTexture(buttonClose_deactivated);
	CTexture* Move_normal				= tm->GetTexture(buttonMove_normal);
	CTexture* Move_over					= tm->GetTexture(buttonMove_over);
	CTexture* Move_clicked			= tm->GetTexture(buttonMove_clicked);
	CTexture* Move_deactivated	= tm->GetTexture(buttonMove_deactivated);
	CTexture* back							= tm->GetTexture(quad);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	dialogBox = new CDialogBox(	screenResolution.y,screenResolution.x, h, w, Vect2f(posx,posy), buttonW, buttonH, l_literal, 
															heightOffset, widthOffset, visible, activated);
	dialogBox->SetName(name);
	dialogBox->SetCloseButtonTextures(Close_normal, Close_over, Close_clicked, Close_deactivated);
	dialogBox->SetMoveButtonTextures(Move_normal, Move_over, Move_clicked, Move_deactivated);
	dialogBox->SetDialogTexture(back);

  *dialogBox_aux = dialogBox;
}
示例#4
0
void CGUIWindow::LoadCheckButton (CCheckButton** checkButton_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<CheckButton name="debug_thps" posx="0" posy="2" height="10" width="10" visible="true" active="true" isOn="true"
	// texture_on="blabla" texture_off="bla" texture_deactivated"bla"
	// OnCheckOn="blabla" OnCheckOff="blabla" OnOverButton="blabla"
	// OnSaveValue="blabl" OnLoadValue="" Literal="blabla" widthOffset="" heightOffset=""/>

  CCheckButton* checkButton;

	std::string name									= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx									= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy									= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w											= pNewNode.GetFloatProperty("width", 50.f);
	float 			h											= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible								= pNewNode.GetBoolProperty("visible", true);
	bool 				activated							= pNewNode.GetBoolProperty("active", true);
	bool 				isOn									= pNewNode.GetBoolProperty("isOn", "");
	std::string texture_on						= pNewNode.GetPszProperty("texture_on", "");
	std::string texture_off						= pNewNode.GetPszProperty("texture_off", "");
	std::string texture_deactivated		= pNewNode.GetPszProperty("texture_deactivated", "");
	std::string OnCheckOn							= pNewNode.GetPszProperty("OnCheckOn", "");
	std::string OnCheckOff						= pNewNode.GetPszProperty("OnCheckOff", "");
	std::string OnOverButton					= pNewNode.GetPszProperty("OnOverButton", "");
	std::string OnSaveValue						= pNewNode.GetPszProperty("OnSaveValue", "");
	std::string OnLoadValue						= pNewNode.GetPszProperty("OnLoadValue", "");
	std::string l_literal							= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent		= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent		= pNewNode.GetFloatProperty("heightOffset", 0.f);


	CTexture* on					= tm->GetTexture(texture_on);
	CTexture* off					= tm->GetTexture(texture_off);
	CTexture* deactivated	= tm->GetTexture(texture_deactivated);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	checkButton = new CCheckButton(screenResolution.y,screenResolution.x, h, w, Vect2f(posx,posy), isOn, l_literal, heightOffset, widthOffset, visible, activated);
	checkButton->SetName(name);
	checkButton->SetTextures(on, off, deactivated);
	checkButton->SetOnCheckOnAction(OnCheckOn);
	checkButton->SetOnCheckOffAction(OnCheckOff);
	checkButton->SetOnLoadValueAction(OnLoadValue);
	checkButton->SetOnSaveValueAction(OnSaveValue);
	checkButton->SetOnOverAction(OnOverButton);

  *checkButton_aux = checkButton;
}
示例#5
0
CBillboardAnimation::CBillboardAnimation ( CXMLTreeNode &_Node )
	: m_fTimePerImage	( 0.f )	
	, m_fCurrentTime	( 0.f )
	, m_uiImage			( 0 )
	, m_vColor			( Vect4f(0.f,0.f,0.f,0.f) )
	, m_fSize			( 0.f )
	, m_uiNumTextures	( 0 )
	, m_bLoop			( false )
{
	m_Name			= _Node.GetPszProperty ( "name", "" );
	m_vColor		= _Node.GetVect4fProperty( "color", Vect4f(0.f,0.f,0.f,0.f) );
	m_fSize			= _Node.GetFloatProperty("size", 1.f);
	m_fTimePerImage = _Node.GetFloatProperty("timePerImage", 1.f);
	m_bLoop			= _Node.GetBoolProperty("loop", false);				

	uint16 l_TotalAnimationNodes = _Node.GetNumChildren ();
	for ( uint16 i = 0; i < l_TotalAnimationNodes; ++i )
	{ 
		std::string l_Node = _Node(i).GetName();
		if ( l_Node == "Texture" )
		{
			std::string l_TextureName = _Node(i).GetPszProperty("file", "");
			CTexture *l_Tex = CORE->GetTextureManager()->GetTexture( l_TextureName );
			m_vTextures.push_back( l_Tex );
		}		
	}

	m_uiNumTextures = m_vTextures.size();
}
CDrawQuadRendererCommand::CDrawQuadRendererCommand(CXMLTreeNode &atts)
	: CStagedTexturedRendererCommand(atts)
{
	int l_count_textures = atts.GetNumChildren();
	for (int i=0; i<l_count_textures; ++i)
	{
		int l_StageId = atts(i).GetIntProperty("stage_id", 0);
		std::string l_File = atts(i).GetPszProperty("file","");

		CTexture* l_Texture = CORE->GetTextureManager()->GetTexture(l_File);
		if (l_Texture != NULL)
		{
			CStagedTexturedRendererCommand::AddStageTexture(l_StageId, l_Texture);
		}
	}
	
	bool l_TextureWidhtAsFrameBuffer = atts.GetBoolProperty("texture_width_as_frame_buffer", true);
	uint32 w,h;
	if (l_TextureWidhtAsFrameBuffer)
	{
		CORE->GetRenderManager()->GetWidthAndHeight(w, h);
	}
	else
	{
		w = atts.GetIntProperty("width", 0);
		h = atts.GetIntProperty("height", 0);
	}

	m_Rect.top=m_Rect.left=(long)0.0;
	m_Rect.right=w-1;
	m_Rect.bottom=h-1;
}
示例#7
0
void	CGUIWindow::LoadEditableTextBox (CEditableTextBox** editableTextBox_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<EditableTextBox name="debug_fps" posx="0" posy="2" height="10" width="10" visible="true" active="true" 
	// texture_quad="blabla" id_font="0" color_font_r="0" color_font_g="0" color_font_b="0"
	// buffer="" OnSaveValue="blabla" OnLoadValue="blabla" Literal="blabla" widthOffset="" heightOffset=""
	// Literal="blabla" widthOffset="" heightOffset=""/>

  CEditableTextBox* editableTextBox;

	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w										= pNewNode.GetFloatProperty("width", 50.f);
	float 			h										= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible							= pNewNode.GetBoolProperty("visible", true);
	bool 				activated						= pNewNode.GetBoolProperty("active", true);
	std::string quad								= pNewNode.GetPszProperty("texture_quad", "");
	std::string OnSaveValue					= pNewNode.GetPszProperty("OnSaveValue", "");
	std::string OnLoadValue					= pNewNode.GetPszProperty("OnLoadValue", "");
	uint32			idFont							= pNewNode.GetIntProperty("id_font", 0);
	float				color_font_r				= pNewNode.GetFloatProperty("color_font_r", 0.f);
	float				color_font_g				= pNewNode.GetFloatProperty("color_font_g", 0.f);
	float				color_font_b				= pNewNode.GetFloatProperty("color_font_b", 0.f);
	std::string buffer							= pNewNode.GetPszProperty("buffer", "");
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	CTexture* quad_texture	= tm->GetTexture(quad);

	editableTextBox = new CEditableTextBox(	screenResolution.y,screenResolution.x,h, w, Vect2f(posx,posy),
																					CColor(color_font_r,color_font_g,color_font_b),idFont, l_literal,
																					heightOffset, widthOffset, visible, activated);
	editableTextBox->SetName(name);
	editableTextBox->SetBackGroundTexture(quad_texture);
	editableTextBox->SetBuffer(buffer);
	editableTextBox->SetOnLoadValueAction(OnSaveValue);
	editableTextBox->SetOnSaveValueAction(OnLoadValue);

  *editableTextBox_aux = editableTextBox;
}
CCinematicComponent::CCinematicComponent(CXMLTreeNode& node, CElement* Owner)
	: CComponent(node, Owner)
{
	SetNameFromParentName( Owner->getName() );

	bool playAtStart = node.GetBoolProperty("playAtStart", false);
	if (playAtStart)
	{
		CEngine::GetSingleton().getCinematicManager()->Play(node.GetPszISOProperty("name","none"));
	}
}
示例#9
0
void	CGUIWindow::LoadStaticText(CStaticText** staticText_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<StaticText name="pepito" posx="0" posy="2" literal="blabla" visible="true" active="true"/>
	
  CStaticText* staticText;

	std::string name						= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx						= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy						= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w								= pNewNode.GetFloatProperty("width", 50.f);
	float 			h								= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible					= pNewNode.GetBoolProperty("visible", true);
	bool 				activated				= pNewNode.GetBoolProperty("active", true);
	std::string l_literal				= pNewNode.GetPszProperty("Literal", "");
	
	staticText = new CStaticText(screenResolution.y, screenResolution.x, h, w, Vect2f(posx,posy), l_literal, visible, activated);
	staticText->SetName(name);

  *staticText_aux = staticText;
}
示例#10
0
void CGUIWindow::LoadButton (CButton** button_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<Button	name="play"	posx="0" posy="0" height="10" width="10" visible="true" activated="true" 
	// texture_normal="blabla" texture_over="bla" texture_clicked="bla" texture_deactivated="bla"
	// OnClickedAction="blabla" OnOverAction="blabla" Literal="blabla" widthOffset="" heightOffset=""/>

  CButton* button;

	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w										= pNewNode.GetFloatProperty("width", 50.f);
	float 			h										= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible							= pNewNode.GetBoolProperty("visible", true);
	bool 				activated						= pNewNode.GetBoolProperty("active", true);
	std::string texture_normal			= pNewNode.GetPszProperty("texture_normal", "");
	std::string texture_over				= pNewNode.GetPszProperty("texture_over", "");
	std::string texture_clicked			= pNewNode.GetPszProperty("texture_clicked", "");
	std::string texture_deactivated	= pNewNode.GetPszProperty("texture_deactivated", "");
	std::string OnClickedAction			= pNewNode.GetPszProperty("OnClickedAction", "");
	std::string OnOverAction				= pNewNode.GetPszProperty("OnOverAction", "");
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	CTexture* normal			= tm->GetTexture(texture_normal);
	CTexture* over				= tm->GetTexture(texture_over);
	CTexture* clicked			= tm->GetTexture(texture_clicked);
	CTexture* deactivated	= tm->GetTexture(texture_deactivated);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	button	= new CButton(screenResolution.y,screenResolution.x, h, w, Vect2f(posx,posy), l_literal, heightOffset, widthOffset, visible, activated);
	button->SetName(name);
	button->SetTextures(normal,over,clicked,deactivated);
	button->SetOnClickedAction(OnClickedAction);
	button->SetOnOverAction(OnOverAction);

  *button_aux = button;
}
示例#11
0
void	CGUIWindow::LoadProgressBar(CProgressBar** progressBar_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<ProgressBar name="progressBar1" posx="200" posy="600" height="10" width="100" visible="true" active="true"
	//	texture_back="hola" texture_bar="hola2"  id_font="0" color_font_r="0" color_font_g="0" color_font_b="0"
	//	Literal="blabla" widthOffset="" heightOffset="" OnComplete="blabla"/>

  CProgressBar* progressBar;
	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float				posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float				posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float				w										= pNewNode.GetFloatProperty("width", 50.f);
	float				h										= pNewNode.GetFloatProperty("height", 50.f);
	bool				visible							= pNewNode.GetBoolProperty("visible", true);
	bool				activated						= pNewNode.GetBoolProperty("active", true);
	std::string texture_bar					= pNewNode.GetPszProperty("texture_bar", "");
	std::string texture_back				= pNewNode.GetPszProperty("texture_back", "");
	std::string OnComplete					= pNewNode.GetPszProperty("OnComplete", "");
	uint32			idFont							= pNewNode.GetIntProperty("id_font", 0);
	float				color_font_r				= pNewNode.GetFloatProperty("color_font_r", 0.f);
	float				color_font_g				= pNewNode.GetFloatProperty("color_font_g", 0.f);
	float				color_font_b				= pNewNode.GetFloatProperty("color_font_b", 0.f);
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	CTexture* bar					= tm->GetTexture(texture_bar);
	CTexture* back				= tm->GetTexture(texture_back);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	progressBar = new CProgressBar(	screenResolution.y,screenResolution.x, h, w, Vect2f(posx, posy), 
																	l_literal, heightOffset, widthOffset, visible, activated);
	progressBar->SetName(name);
	progressBar->SetTextures(back, bar);
	progressBar->SetFont(idFont, CColor(color_font_r,color_font_g,color_font_b));
	progressBar->SetOnComplete(OnComplete);

  *progressBar_aux = progressBar;
}
CDeferredShadingSceneRendererCommand::CDeferredShadingSceneRendererCommand(CXMLTreeNode &TreeNode)
:CStagedTexturedSceneRendererCommand(TreeNode)
,m_RenderableObjectTechnique(CEngine::GetSingleton().GetRenderableObjectTechniqueManager()->GetResource("MV_POSITION4_COLOR_TEXTURE_VERTEX"))
,m_UseLightVolumes(TreeNode.GetBoolProperty("use_light_volumes", false))
,m_DepthStencilState(nullptr)
,m_SphereFirstPass(CEngine::GetSingleton().GetStaticMeshManager()->GetResource("deferred_shading_sphere"))
{
	//m_SphereSecondPass = CEngine::GetSingleton().GetStaticMeshManager()->GetResource("deferred_shading_second_sphere");
	/*if (m_Sphere == nullptr)
	{
	CEngine::GetSingleton().GetLogManager()->Log("Can't find sphere to optimize deferred shading");
	assert(false);
	}*/
}
CBillboardAnimation::CBillboardAnimation(CXMLTreeNode &parser){
	SetColor(CColor(parser.GetVect3fProperty("color",Vect3f(1.0f))));
	float size=parser.GetFloatProperty("size",2.0f);
	SetHeight(size);
	SetWidth(size);
	m_TimePerImage=parser.GetFloatProperty("time",0.2f);
	m_Loop=parser.GetBoolProperty("loop",false);
	CXMLTreeNode l_Node = parser["Textures"];
	for(int i=0;i<l_Node.GetNumChildren();i++){
		
		std::string l_TexturePath=l_Node(i).GetPszProperty("tex","");
		CTexture *l_Texture = CORE->GetTextureManager()->GetTexture(l_TexturePath);
		m_Textures.push_back(l_Texture);
	}
	m_Index=0;
	m_fTime=0.0f;
	SetTexture(m_Textures[m_Index]);
	SetPos(Vect3f(0.0f,0.0f,0.0f));
	
}
//----------------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------------
CSceneEffect::CSceneEffect(CXMLTreeNode &atts):CActive(),CNamed()
{
  CNamed::Init();//inicia CNamed
  SetName(atts.GetPszProperty("name"));
  SetActive(atts.GetBoolProperty("active"));

  CXMLTreeNode texture = atts["texture"];
	if (texture.Exists())
	{
		if (!texture.IsComment())
		{
			int32 numNodes = atts.GetNumChildren();	

			for(int i=0; i < numNodes; i++)
			{
				int l_iStageId = atts(i).GetIntProperty("stage_id");
				std::string l_sFile = atts(i).GetPszProperty("file");
				bool l_bLoadFile = atts(i).GetBoolProperty("load_file");

				CTexture * l_Texture = NULL;
				if(l_bLoadFile)
				{
					l_Texture=CORE->GetTextureManager()->GetTexture(l_sFile);
					if (l_Texture==NULL)
					{
      				//Guardar el mensaje de warning en el LOGGER
							std::string msg_warning = "SceneEffect::Constructor->Error al intentar leer el archivo de efectos: " + l_sFile;
							LOGGER->AddNewLog(ELL_WARNING, msg_warning.c_str());
					}
				}
				else
				{
					//la creas dinámicamente la textura
					l_Texture=CORE->GetTextureManager()->GetResource(l_sFile);
				}
				if(l_Texture!=NULL)
					AddStageTexture(l_iStageId, l_Texture);
			}//end for
		}
  }    
}
示例#15
0
//----------------------------------------------
void CBoxTrigger::ReadData( CXMLTreeNode &_Node )
{
	m_bIsActive		= _Node.GetBoolProperty("active", false);
	m_Name			= _Node.GetPszProperty("name", "");
	m_Position		= _Node.GetVect3fProperty("position", v3fZERO);
	m_Size			= _Node.GetVect3fProperty("size", v3fZERO);
	m_fYaw			= _Node.GetFloatProperty("yaw", 0.f);
	m_RenderColor	= CColor( _Node.GetVect4fProperty("color", Vect4f(1.f, 1.f, 1.f, 1.f)) );

	std::string l_ROName = _Node.GetPszProperty("renderable_object", "", false);
	std::string l_Layer = _Node.GetPszProperty("layer", "", false);

	CRenderableObjectsManager *l_pROM = CORE->GetRenderableObjectsLayersManager()->GetRenderableObjectManager(l_Layer);
	if( l_pROM != NULL )
	{
		m_pTriggerObject = l_pROM->GetInstance(l_ROName);
		if( m_pTriggerObject == NULL )
		{
			LOGGER->AddNewLog(ELL_WARNING, "CBoxTrigger::ReadData->No se ha podido obtener el objeto: %s de la capa Solid.", l_ROName.c_str());
		}
	}

	m_fYaw = mathUtils::Deg2Rad(m_fYaw);
}
示例#16
0
void	CGUIWindow::LoadRadioBox(CRadioBox** radioBox_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<RadioBox name="pepito" posx="0" posy="2" height="10" width="10" default_checkButton="bla" visible="true" active="true" texture_back=""
	// columns="3" rows="3" OnCheckOn="blabla" OnCheckOff="blabla" OnOverButton="blabla"
	// OnSaveValue="blabl" OnLoadValue=""	Literal="blabla" widthOffset="" heightOffset=""/>
	//	<texture name="q3dm1" on="gui_q3dm1_on.jpg" off="gui_q3dm1_off.jpg"  deactivated="gui_q3dm1_on.jpg" />
	//	<texture name="q3dm2" on="gui_q3dm2_on.jpg" off="gui_q3dm2_off.jpg" deactivated="gui_q3dm2_on.jpg" />
	//  ...
	//</RadioBox>

  CRadioBox* radioBox;

	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w										= pNewNode.GetFloatProperty("width", 50.f);
	float 			h										= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible							= pNewNode.GetBoolProperty("visible", true);
	bool 				activated						= pNewNode.GetBoolProperty("active", true);
	std::string default_checkButton = pNewNode.GetPszProperty("default_checkButton", "");
	std::string texture_back				= pNewNode.GetPszProperty("texture_back", "");
	uint32			columns							= pNewNode.GetIntProperty("columns", 0);
	uint32			rows								= pNewNode.GetIntProperty("rows", 0);
	std::string OnCheckOn						= pNewNode.GetPszProperty("OnCheckOn", "");
	std::string OnCheckOff					= pNewNode.GetPszProperty("OnCheckOff", "");
	std::string OnOverButton				= pNewNode.GetPszProperty("OnOverButton", "");
	std::string OnSaveValue					= pNewNode.GetPszProperty("OnSaveValue", "");
	std::string OnLoadValue					= pNewNode.GetPszProperty("OnLoadValue", "");
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

	radioBox = new CRadioBox(	screenResolution.y,screenResolution.x,h, w, Vect2f(posx,posy), columns, rows, default_checkButton, 
														l_literal, heightOffset, widthOffset, visible, activated);
	if (texture_back!="")
	{
		CTexture* quad	= tm->GetTexture(texture_back);
		radioBox->SetTextureBack(quad);
	}
	radioBox->SetName(name);
	radioBox->SetOnLoadValueAction(OnLoadValue);
	radioBox->SetOnSaveValueAction(OnSaveValue);
	//radioBox->SetCheckButtonActions(OnCheckOn, OnCheckOff, OnOverButton);
	int count = pNewNode.GetNumChildren();
	for (int j = 0; j < count; ++j)
	{
		CXMLTreeNode pTexture = pNewNode(j);
		std::string tagName = pTexture.GetName();
		if (tagName.compare("texture")==0)
		{
			std::string name				= pTexture.GetPszProperty("name");
			std::string on					= pTexture.GetPszProperty("on");
			std::string off					= pTexture.GetPszProperty("off");
			std::string deactivated = pTexture.GetPszProperty("deactivated");

			CTexture* texture_on					= tm->GetTexture(on);
			CTexture* texture_off					= tm->GetTexture(off);
			CTexture* texture_deactivated	= tm->GetTexture(deactivated);
			radioBox->SetCheckButton(name, texture_on, texture_off, texture_deactivated);
		}
	}

	radioBox->SetCheckButtonActions(OnCheckOn, OnCheckOff, OnOverButton);
	*radioBox_aux = radioBox;
}
CRenderGameInfoRendererCommand::CRenderGameInfoRendererCommand(CXMLTreeNode &Node)
	: CSceneRendererCommand ( Node )
{
	m_Active = Node.GetBoolProperty("active", false);
}
示例#18
0
bool CGUIWindow::LoadXML( const std::string &xmlGuiFile, const Vect2i& screenResolution)
{
	//Read the xml gui file
	LOGGER->AddNewLog(ELL_INFORMATION, "CGUIWindow:: Iniciando el parseo del fichero %s", xmlGuiFile.c_str());
	bool isOK = false;

	CXMLTreeNode newFile;
	if (!newFile.LoadFile(xmlGuiFile.c_str()))
	{
		LOGGER->AddNewLog(ELL_ERROR, "CGUIWindow:: No se ha podido leer correctamente el fichero ->%s", xmlGuiFile.c_str());
		isOK = false;
	}
	else
	{
		CTextureManager* textureM = CORE->GetTextureManager();
		CXMLTreeNode  windows = newFile["Windows"];

		m_sLuaCode_OnLoadWindows		= windows.GetPszProperty("OnLoadWindows");
		m_sLuaCode_OnSaveWindows		= windows.GetPszProperty("OnSaveWindows");
		m_sLuaCode_OnUpdateWindows	= windows.GetPszProperty("OnUpdateWindows");


		if (windows.Exists())
		{
			int count = windows.GetNumChildren();
			for (int i = 0; i < count; ++i)
			{
				CXMLTreeNode pNewNode = windows(i);

				//Para cada guielement leemos su informacion comun-->
				std::string name	= pNewNode.GetPszProperty("name", "defaultGuiElement");
				float posx				= pNewNode.GetFloatProperty("posx", 0.f);
				float posy				= pNewNode.GetFloatProperty("posy", 0.f);
				float w						= pNewNode.GetFloatProperty("width", 50.f);
				float h						= pNewNode.GetFloatProperty("height", 50.f);
				bool visible			= pNewNode.GetBoolProperty("visible", true);
				bool activated		= pNewNode.GetBoolProperty("active", true);

				std::string tagName = pNewNode.GetName();
				if (tagName.compare("Button")==0)
				{
					CButton* newButton = NULL;
					LoadButton(&newButton,pNewNode,screenResolution, textureM);
					AddGuiElement(newButton);
				}
				else if (tagName.compare("CheckButton")==0)
				{
					CCheckButton* new_checkButton = NULL;
					LoadCheckButton(&new_checkButton,pNewNode,screenResolution, textureM);									
					AddGuiElement(new_checkButton);
				}
				else if (tagName.compare("Slider")==0)
				{
					CSlider* new_slider = NULL;
					LoadSlider(&new_slider,pNewNode,screenResolution, textureM);					
					AddGuiElement(new_slider);
				}
				else if (tagName.compare("DialogBox")==0)
				{
					CDialogBox* new_dialogBox = NULL;
					LoadDialogBox(&new_dialogBox,pNewNode,screenResolution, textureM);					
					AddGuiElement(new_dialogBox);
				}
				else if (tagName.compare("EditableTextBox")==0)
				{
					CEditableTextBox* new_editableTextBox = NULL;
					LoadEditableTextBox(&new_editableTextBox,pNewNode,screenResolution, textureM);					
					AddGuiElement(new_editableTextBox);
				}
				else if (tagName.compare("RadioBox")==0)
				{
					CRadioBox* new_radioBox = NULL;
					LoadRadioBox(&new_radioBox,pNewNode,screenResolution, textureM);		
					AddGuiElement(new_radioBox);
				}
				else if (tagName.compare("Image")==0)
				{
					CImage* new_image = NULL;
					_LoadImage(&new_image,pNewNode,screenResolution, textureM);		
					AddGuiElement(new_image);
				}
				else if (tagName.compare("AnimatedImage")==0)
				{
          CAnimatedImage* new_image = NULL;
          LoadAnimatedImage(&new_image,pNewNode,screenResolution, textureM);		
					AddGuiElement(new_image);
				}
				else if (tagName.compare("ProgressBar")==0)
				{
					CProgressBar* new_progressBar = NULL;
					LoadProgressBar(&new_progressBar,pNewNode,screenResolution, textureM);		
					AddGuiElement(new_progressBar);
				} 
				else if (tagName.compare("StaticText")==0)
				{
					CStaticText* new_staticText = NULL;
					LoadStaticText(&new_staticText,pNewNode,screenResolution, textureM);		
					AddGuiElement(new_staticText);
				}
				else if (tagName.compare("KeyBoard_Back")==0)
				{
					//<KeyBoard_Back input="DIK_A" OnKeyDown="blablaLua"/>
					m_sLuaCode_OnKeyDown	= pNewNode.GetPszProperty("OnKeyDown", "");
					m_uInputKeyDown				= pNewNode.GetIntProperty("input", 0);
				}
				else
				{
					//Warning
					LOGGER->AddNewLog(ELL_WARNING, "GUIWindow:: No se reconoce el tag %s del fichero %s", tagName.c_str(), xmlGuiFile.c_str());
				}

			}
			isOK = true;
		}
		else
		{
			LOGGER->AddNewLog(ELL_ERROR, "GUIWindow:: No se ha podido leer el tag Windows del fichero ->%s", xmlGuiFile.c_str());
			isOK = false;
		}

	}//END else de if (!newFile.LoadFile(xmlGuiFile.c_str()))


	if (!isOK)
	{
		LOGGER->AddNewLog(ELL_ERROR, "GUIWindow:: No se ha podido leer correctamente el fichero -->%s", xmlGuiFile.c_str());
		isOK =  false;
	}
	else
	{
		LOGGER->AddNewLog(ELL_INFORMATION, "GUIWindow:: Finalizado correctamente el parseo el fichero %s", xmlGuiFile.c_str());

	}

	return isOK;
}
示例#19
0
bool CPostSceneRendererStep::Init(CXMLTreeNode& _treePostSceneRenderer, const string& _szDefaultRenderTarget, bool _bNeedsEffect)
{
    string l_szEffect = _treePostSceneRenderer.GetPszISOProperty("effect","",!_bNeedsEffect);

    if(!CRendererStep::Init(_treePostSceneRenderer, _szDefaultRenderTarget))
    {
        LOGGER->AddNewLog(ELL_ERROR,"CPostSceneRendererStep::Init PostSceneRenderer sense nom");
        SetOk(false);
    } else if(l_szEffect == "" && _bNeedsEffect)
    {
        LOGGER->AddNewLog(ELL_ERROR,"CPostSceneRendererStep::Init PostSceneRenderer sense effect");
        SetOk(false);
    } else {

        LOGGER->AddNewLog(ELL_INFORMATION,"CPostSceneRendererStep::Init iniciant %s",GetName().c_str());

        CRendererStep::Init(_treePostSceneRenderer, _szDefaultRenderTarget);

        CXMLTreeNode l_treeSamplers = _treePostSceneRenderer.GetChild("input_samplers");
        CXMLTreeNode l_treeRenderTargets = _treePostSceneRenderer.GetChild("render_targets");

        if(!InitInputSamplers(l_treeSamplers))
        {
            LOGGER->AddNewLog(ELL_ERROR,"CPostSceneRendererStep::Init error inicialitzant input_samplers");
            SetOk(false);
        } else {

            m_szEffect = l_szEffect;

            m_bUseTime = _treePostSceneRenderer.GetBoolProperty("use_time",false,false);

            if(m_bUseTime)
            {
                m_bUseDeltaTime = _treePostSceneRenderer.GetBoolProperty("use_delta_time",false,false);
            }
            else
            {
                m_bUseDeltaTime = false;
            }

            m_bUseCenter = _treePostSceneRenderer.GetBoolProperty("use_center",false,false);

            string l_szAlignment = _treePostSceneRenderer.GetPszISOProperty("alignment","",false);
            if(l_szAlignment == "center")
            {
                m_Alignment = CENTER;
            }

            Vect2f l_fPos = _treePostSceneRenderer.GetVect2fProperty("position",Vect2f(0),false);

            m_iPos.x = (int) (l_fPos.x * RENDER_MANAGER->GetScreenWidth());
            m_iPos.y = (int) (l_fPos.y * RENDER_MANAGER->GetScreenHeight());

            if(_treePostSceneRenderer.ExistsProperty("size"))
            {
                float l_fSizeX = _treePostSceneRenderer.GetFloatProperty("size",1.0,false);

                if(_treePostSceneRenderer.GetBoolProperty("absolute_size",false,false))
                {
                    m_iSize.x = (int) l_fSizeX;
                    m_iSize.y = m_iSize.x;
                }
                else
                {
                    m_iSize.x = (int) (l_fSizeX * RENDER_MANAGER->GetScreenWidth());
                    m_iSize.y = m_iSize.x;
                }

                if(_treePostSceneRenderer.ExistsProperty("aspect_ratio"))
                {
                    bool l_bAspectRatio = _treePostSceneRenderer.GetBoolProperty("aspect_ratio",true,false);

                    if(l_bAspectRatio)
                    {
                        m_iSize.y = (int)(m_iSize.x * RENDER_MANAGER->GetScreenHeight()/(float)RENDER_MANAGER->GetScreenWidth());
                    }
                }

            } else if(_treePostSceneRenderer.ExistsProperty("size_x"))
            {
                float l_fSizeX = _treePostSceneRenderer.GetFloatProperty("size_x",1.0,false);
                float l_fSizeY = _treePostSceneRenderer.GetFloatProperty("size_y",1.0,false);

                if(_treePostSceneRenderer.GetBoolProperty("absolute_size",false,false))
                {
                    m_iSize.x = (int) l_fSizeX;
                    m_iSize.y = (int) l_fSizeY;
                }
                else
                {
                    m_iSize.x = (int) (l_fSizeX * RENDER_MANAGER->GetScreenWidth());
                    m_iSize.y = (int) (l_fSizeY * RENDER_MANAGER->GetScreenHeight());
                }

            } else
            {
                m_iSize.x = RENDER_MANAGER->GetScreenWidth();
                m_iSize.y = RENDER_MANAGER->GetScreenHeight();
            }

            SetOk(true);
        }
    }

    return IsOk();
}
示例#20
0
void	CGUIWindow::LoadAnimatedImage(CAnimatedImage** image_aux, CXMLTreeNode& pNewNode, const Vect2i& screenResolution, CTextureManager* tm)
{
	//<AnimatedImage	name="imageRoomSelected_gameserver2" posx="35" posy="20" height="40" width="30" visible="true" active="true" 
	//default="q3dm1"	isAnimated="true", time="0" loop="true" OnSaveValue="blabla"  OnLoadValue="blabla"  Literal="blabla"
	//widthOffset="" heightOffset="" flip="" Literal="blabla" widthOffset="" heightOffset=""/>
	//	<texture name="q3dm1" texture="gui_q3dm1_off.jpg"/>
	//	<texture name="q3dm2" texture="gui_q3dm2_off.jpg"/>
	//	...
	//</Image>
  CAnimatedImage* image;
	std::string name								= pNewNode.GetPszProperty("name", "defaultGuiElement");
	float 			posx								= pNewNode.GetFloatProperty("posx", 0.f);
	float 			posy								= pNewNode.GetFloatProperty("posy", 0.f);
	float 			w										= pNewNode.GetFloatProperty("width", 50.f);
	float 			h										= pNewNode.GetFloatProperty("height", 50.f);
	bool 				visible							= pNewNode.GetBoolProperty("visible", true);
	bool 				activated						= pNewNode.GetBoolProperty("active", true);
  uint16 			initFrame						= pNewNode.GetIntProperty("initFrame", true);
  bool        playOnLoad	  			= pNewNode.GetBoolProperty("playOnLoad", true);
	std::string OnSaveValue					= pNewNode.GetPszProperty("OnSaveValue", "");
	std::string OnLoadValue					= pNewNode.GetPszProperty("OnLoadValue", "");
	std::string flip								= pNewNode.GetPszProperty("flip", "");
	bool				backGround					= pNewNode.GetBoolProperty("backGround", false);
	std::string l_literal						= pNewNode.GetPszProperty("Literal", "");
	float				widthOffsetPercent	= pNewNode.GetFloatProperty("widthOffset", 0.f);
	float				heightOffsetPercent	= pNewNode.GetFloatProperty("heightOffset", 0.f);

	uint32 widthOffset	= (uint32) (screenResolution.x	* 0.01f * widthOffsetPercent );
	uint32 heightOffset	= (uint32) (screenResolution.y	* 0.01f * heightOffsetPercent );

  image = new CAnimatedImage(	screenResolution.y,screenResolution.x, h, w, Vect2f(posx,posy),
											l_literal, heightOffset, widthOffset, visible, activated);
	image->SetName(name);
  
	image->SetOnLoadValueAction(OnLoadValue);
	image->SetOnSaveValueAction(OnSaveValue);
	image->SetBackGround(backGround);
	if( flip.compare("FLIP_X") == 0)
	{
		image->SetFlip(FLIP_X);
	}
	else if (flip.compare("FLIP_Y") == 0)
	{
		image->SetFlip(FLIP_Y);
	}
	else
	{
		image->SetFlip(NONE_FLIP);
	}
	int count = pNewNode.GetNumChildren();
	for (int j = 0; j < count; ++j)
	{
		CXMLTreeNode pTexture = pNewNode(j);
		std::string tagName = pTexture.GetName();
		if (tagName.compare("texture")==0)
		{	
			std::string texture			=  pNewNode(j).GetPszProperty("name_texture");
      CTexture* texture_image	=  tm->GetTexture(texture);
			image->AddFrame(texture_image);
		}
	}

  image->GoToFrame(initFrame);
	
  if (playOnLoad)
  {
    //image->PlayAnimation();
  }

  *image_aux = image;
}
void CParticleEmitter::Load(CXMLTreeNode &parser)
{
	m_vColors.clear();
	m_vDirections.clear();
	m_vAcelerations.clear();
	m_vSizes.clear();

	//m_Type = parser.GetPszProperty("type", "point");
	m_bGravity = parser.GetBoolProperty("gravity");
	m_fMinTimeLife = parser.GetFloatProperty("life_time_min", 0.0f);
	m_fMaxTimeLife = parser.GetFloatProperty("life_time_max", 0.0f);
	m_fMinEmitRate = parser.GetFloatProperty("emit_rate_min", 1.0f);
	m_fMaxEmitRate = parser.GetFloatProperty("emit_rate_max", 1.0f);
	std::string l_texturePath = parser.GetPszProperty("tex", "");
	m_fAngle = parser.GetFloatProperty("angle", 0.0f);

	m_sTexture = CORE->GetTextureManager()->GetTexture(l_texturePath);

	//Variación de los colores
	CXMLTreeNode l_Node = parser["color"];
	m_vColors.push_back(SColor());
	//SColor l_color = new SColor();
	m_vColors[m_vColors.size()-1].time = l_Node.GetFloatProperty("time", 0.0f);
	m_vColors[m_vColors.size()-1].col1.SetArgb(l_Node.GetVect4fProperty("color1",Vect4f(1.0f,1.0f,1.0f,1.0f)));
	m_vColors[m_vColors.size()-1].col2.SetArgb(l_Node.GetVect4fProperty("color2",Vect4f(1.0f,1.0f,1.0f,1.0f)));
	//m_vColors.push_back(l_color);

	for(int i=0;i<l_Node.GetNumChildren();i++){
		m_vColors.push_back(SColor());
		m_vColors[m_vColors.size()-1].time = l_Node(i).GetFloatProperty("time", 0.0f);
		m_vColors[m_vColors.size()-1].col1.SetArgb(l_Node(i).GetVect4fProperty("color1",Vect4f(1.0f,1.0f,1.0f,1.0f)));
		m_vColors[m_vColors.size()-1].col2.SetArgb(l_Node(i).GetVect4fProperty("color2",Vect4f(1.0f,1.0f,1.0f,1.0f)));
	}

	//Variación de los vectores directores
	l_Node = parser["direction"];
	m_vDirections.push_back(SDirection());
	//SDirection* l_direction = new SDirection();
	m_vDirections[m_vDirections.size()-1].time = l_Node.GetFloatProperty("time", 0.0f);
	m_vDirections[m_vDirections.size()-1].dir1 = l_Node.GetVect3fProperty("dir1", Vect3f(0.0f,0.0f,0.0f));
	m_vDirections[m_vDirections.size()-1].dir2 = l_Node.GetVect3fProperty("dir2", Vect3f(0.0f,0.0f,0.0f));
	//m_vDirections.push_back(l_direction);

	for(int i=0;i<l_Node.GetNumChildren();i++){
		m_vDirections.push_back(SDirection());
		m_vDirections[m_vDirections.size()-1].time = l_Node(i).GetFloatProperty("time", 0.0f);
		m_vDirections[m_vDirections.size()-1].dir1 = l_Node(i).GetVect3fProperty("dir1",Vect3f(0.0f,0.0f,0.0f));
		m_vDirections[m_vDirections.size()-1].dir2 = l_Node(i).GetVect3fProperty("dir2",Vect3f(0.0f,0.0f,0.0f));
	}


	//Variación de los tamaños
	l_Node = parser["size"];
	m_vSizes.push_back(SSize());
	//SSize* l_size = new SSize();
	m_vSizes[m_vSizes.size()-1].time = l_Node.GetFloatProperty("time", 0.0f);
	m_vSizes[m_vSizes.size()-1].size1 = l_Node.GetFloatProperty("mins", 1.0f);
	m_vSizes[m_vSizes.size()-1].size2 = l_Node.GetFloatProperty("maxs", 1.0f);
	//m_vSizes.push_back(l_size);

	for(int i=0;i<l_Node.GetNumChildren();i++){
		m_vSizes.push_back(SSize());
		m_vSizes[m_vSizes.size()-1].time = l_Node(i).GetFloatProperty("time", 0.0f);
		m_vSizes[m_vSizes.size()-1].size1 = l_Node(i).GetFloatProperty("mins",1.0f);
		m_vSizes[m_vSizes.size()-1].size2 = l_Node(i).GetFloatProperty("maxs",1.0f);
	}

	//Variación de las aceleraciones
	l_Node = parser["aceleration"];
	m_vAcelerations.push_back(SAceleration());
	//SAceleration* l_aceleration = new SAceleration();
	m_vAcelerations[m_vAcelerations.size()-1].time = l_Node.GetFloatProperty("time", 0.0f);
	m_vAcelerations[m_vAcelerations.size()-1].acel1 = l_Node.GetVect3fProperty("acel1", Vect3f(0.0f,0.0f,0.0f));
	m_vAcelerations[m_vAcelerations.size()-1].acel2 = l_Node.GetVect3fProperty("acel2", Vect3f(0.0f,0.0f,0.0f));
	//m_vAcelerations.push_back(l_aceleration);

	for(int i=0;i<l_Node.GetNumChildren();i++){
		m_vAcelerations.push_back(SAceleration());
		m_vAcelerations[m_vAcelerations.size()-1].time = l_Node(i).GetFloatProperty("time", 0.0f);
		m_vAcelerations[m_vAcelerations.size()-1].acel1 = l_Node(i).GetVect3fProperty("acel1", Vect3f(0.0f,0.0f,0.0f));
		m_vAcelerations[m_vAcelerations.size()-1].acel1 = l_Node(i).GetVect3fProperty("acel2", Vect3f(0.0f,0.0f,0.0f));
	}

}