#include "StdAfx.h"

#include "TPG_Spri.hpp"

#include "SCR.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


//***********************************************************************
TPG_Sprite::TPG_Sprite( CString _csName, ACP_tdxHandleOfSprite _hSprite )
{
	m_pri_csName = _csName;
	m_pri_hSprite = _hSprite;
}

TPG_Sprite::~TPG_Sprite()
{
}


ACP_tdxHandleOfSprite TPG_Sprite::m_pub_fn_hGetSprite()
{
	return m_pri_hSprite;
}


void TPG_Sprite::m_pub_fn_vLoadSprite()
{
	CString csSectionName = "Sprites.prt^Sprite:" + m_pri_csName;

	SCR_tdst_Cxt_Values *p_stValues;
	p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(csSectionName), SCR_CDF_uw_Anl_Normal);

	m_pri_hSprite = (ACP_tdxHandleOfSprite)SCR_M_ul_RdL0_ExtractLongValue( p_stValues, 0 );
}
