struct sSpr
{
	short shXlength, shYlength;
	short shXorg, shYorg;
	unsigned int uiImagesize;
	BYTE *bpImage;
};



struct Sprites
{
	int iTotalnum;

	sSpr stSpr[100];

	int iFrametotalnum;
	int iFramexlength, iFrameylength;

	sFrame stFrame[100];
};

	int chno;
	chno = nChrnum;
	char temp[3];
	char filename[11];
	char tempstr[150];
	char xorg[3] , yorg[3];


//Sprites stSacsprites[ MAX_DIR_NUM][ MAX_ANI_NUM];
TxtOrg txtorg[MAX_ANINUM][MAX_FRAME];

void GetOrgTxt( HWND hwnd )
{
	//extern int nChrnum, nDirnum, nAninum, nFramenum;

	
	Sprites *SprData;
	TxtOrg *txt;

	int i,j ,x , y;

	FILE *fp ;
	
	itoa ( chno , temp , 10 );
	sprintf ( filename , "char%s.txt" ,temp );
	fp = fopen ( filename , "rt" );		
	if ( fp = NULL)
	{	
		MessageBox ( hwnd, "fp 가 NULL " , "error " , MB_OK );
		return ;
	}
	
	fputs  ( "/////////////////////////////////////////////////////////////////////////\n" , fp );
	sprintf( tempstr , "// CHAR NO : %s\n" , chno );
	fputs  ( tempstr , fp ); 
	fputs  ( "// DIR  NO : 1 \n" ,fp );
	fputs  ( "/////////////////////////////////////////////////////////////////////////\n" , fp );
	

	for ( i = 0; i < MAX_ANI_NUM ; i++)
	{
		
		SprData = &stSacsprites[ 1 ][ i ];		
		txt.TotalAniNum = SprData -> iTotalnum; 


		itoa ( i , temp , 10 );
		sprintf ( temp , " AniNo = %s\n ":  temp ); 에니메이션 넘버
		itoa ( txt - > TotalAniNum , temp , 10 );
		sprintf ( temp , " FramTotalnum = %s\n" temp ); // 토탈넘버 
		
		
		for ( j = 0 ; j  < txt->TotalAniNum ; j++ )
		{
			int ii;

			x = SprData -> stSpr[j].shXorg ;
			y = SprData -> stSpr[j].shXorg ;
			itoa ( j , temp , 10 );
			ii = sprintf ( tempstr , "FrameNo = %s " ,temp ); //프레임 넘버
			itoa ( x , temp , 10 );	
			ii+= Sprintf ( tempstr+ii, "Xorg = %s " ,temp ); //Xorg 넘버
			itoa ( y , temp , 10 );	
			ii+= Sprintf ( tempstr+ii, "Yorg = %s " ,temp ); //Yorg 넘버

		} 		
	}
	fclose(fp );
}

void OrgData( HWND hwnd )
{
	
	FILE *fp ;
	int i , j ;
	Sprites *spr;
	


	itoa ( chno , temp ,10 ) ;

	sprintf ( filename , "char%s.txt" , temp );

	fp = fopen ( filename ,"rt" );
	if ( fp == NULL )
	{
		MessageBox ( hwnd , " fp == NULL " . " error" , MB_OK );
		return;
	}
	fgets ( tempstr , 150 , fp );
	fgets ( tempstr , 150 , fp );
	fgets ( tempstr , 150 , fp );
	fgets ( tempstr , 150 , fp );
	for(  int i < MAX_ANI_NUM ; i++ )
	{
		spr *
		fscanf ( 


}


void SetTxtOrg ( HWND hwnd )
{
	FILE *fp;
	Sprites *spr ;
	

}
   