Recreating sprite

Posts 14 of 4 · Page 1 of 1
Recreating sprite
Hi my sprite disappear after a game.
You can say you need to recreate it.
I do but it disappears.
I insert it into my recreate font function

i insert this

Code:
if(txBody == NULL)D3DXCreateTextureFromFileInMemoryEx(pDevice
			,&_cBody,sizeof(_cBody),200,100,D3DX_DEFAULT,0,D3DFMT_UNKNOWN
			,D3DPOOL_MANAGED,D3DX_DEFAULT,D3DX_DEFAULT,0,NULL,NULL,&txBody);
	if(spBody == NULL)D3DXCreateSprite(pDevice, &spBody);

	if(txFooter == NULL)D3DXCreateTextureFromFileInMemoryEx(pDevice
			,&_cFooter,sizeof(_cFooter),200,65,D3DX_DEFAULT,0,D3DFMT_UNKNOWN
			,D3DPOOL_MANAGED,D3DX_DEFAULT,D3DX_DEFAULT,0,NULL,NULL,&txFooter);
	if(spFooter == NULL)D3DXCreateSprite(pDevice, &spFooter);

	if(txHeader == NULL)D3DXCreateTextureFromFileInMemoryEx(pDevice
			,&_cHeader,sizeof(_cHeader),200,100,D3DX_DEFAULT,0,D3DFMT_UNKNOWN
			,D3DPOOL_MANAGED,D3DX_DEFAULT,D3DX_DEFAULT,0,NULL,NULL,&txHeader);
	if(spHeader == NULL)D3DXCreateSprite(pDevice, &spHeader);
And
Code:
spHeader->Begin(D3DXSPRITE_ALPHABLEND);
					spHeader->Draw(txHeader, NULL, NULL, &pHeader, 0xFFFFFFFF);
					spHeader->End();

					spFooter->Begin(D3DXSPRITE_ALPHABLEND);
					spFooter->Draw(txFooter, NULL, NULL, &pFooter, 0xFFFFFFFF);
					spFooter->End();

					spBody->Begin(D3DXSPRITE_ALPHABLEND);
					spBody->Draw(txBody, NULL, NULL, &pBody, 0xFFFFFFFF);
					spBody->End();
But it disappears

Code:
		void ReFont(LPDIRECT3DDEVICE9 pDevice)
{
	if (g_pDevice != pDevice)
	{
		g_pDevice = pDevice;
		try
		{
			if (pFont != 0)
				pFont->Release();
			/*pDevice->Release();*/
			
		} catch (...) {}
		pFont = 0;
		
		KarraKa->FontCreate(pDevice);
		
}
After font create i put the sprite code.
I use xkarraka base for warrock.
Thanks in advance for answer
@Alessandro10
@flameswor10 you use sprite can u help me?
Learn to use an easier base.
Karakka base is too hard for you.

Also, warrock and CA are different games so they're made differently.

Also, your doing it wrongly.
I believe wrong base?
I hoped in an answer not a observation
Posts 14 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?