D3DX stuff D/Cs now is what I've heard. =/
On How to draw a picture ingame, by using DX9.
I had a friend give me this, but it doesn't work for me, someone shed some light?
[PHP]void cMenu:rawImageF(LPDIRECT3DDEVICE9 pDevice, LPD3DXSPRITE sprite,LPDIRECT3DTEXTURE9 pTexture, float x, float y, float z, char* file, ...)
{
sprite = NULL;
if (!SUCCEEDED(D3DXCreateTextureFromFileA(pDevice, file, &pTexture)))
D3DXCreateTextureFromFileA(pDevice, file, &pTexture);
D3DXCreateSprite(pDevice, &sprite);
sprite->Begin(D3DXSPRITE_ALPHABLEND);
D3DXVECTOR3 pos;
pos.x= x;
pos.y= y;
pos.z= z;
sprite->Draw(pTexture, NULL, (0,0,0), &pos, D3DCOLOR_XRGB(255,255, 255));
sprite->End();
}[/PHP]
D3DX stuff D/Cs now is what I've heard. =/
try something like this bro
this->DrawImageF(pDevice, pSprite, pTexture, 5.0f, 5.0f , 0.0f, "C:\something.jpg");
Need Help With Coding or Something??? MSN me
zmansquared@hotmail.com
I am the one and only Microsoft Fag!!!
Quote:
Originally Posted by Arhk
All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
~
Take this Pic everyone!
next-
dont call it every frame
Need Help With Coding or Something??? MSN me
zmansquared@hotmail.com
I am the one and only Microsoft Fag!!!
Quote:
Originally Posted by Arhk
All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
~
Take this Pic everyone!
next-
Exactly Right.
I found a source you might like.
Credits to Revo
[php]
LPDIRECT3DTEXTURE9 Texture_Interface;
LPD3DXSPRITE Sprite_Interface;
HRESULT WINAPI BeginScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
{
static BOOL Initiate = TRUE;
if(Initiate == TRUE)
{
Initiate = FALSE;
D3DXCreateTextureFromFile(Device_Interface, "*:\\file.ext", &Texture_Interface);
D3DXCreateSprite(Device_Interface, &Sprite_Interface);
}
return BeginScene_Pointer(Device_Interface);
}
HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE9 Device_Interface)
{
D3DXVECTOR2 Position;
Position.x = 150.0f;
Position.y = 200.0f;
Sprite_Interface->Begin();
Sprite_Interface->Draw(Texture_Interface, NULL, NULL, NULL, NULL, &Position, 0xFFFFFFFF);
Sprite_Interface->End();
return EndScene_Pointer(Device_Interface);
}
There is also one that uses the image bytes, So there is no need for the actual file. You just need a img byte converter
Ill create a tut on it.
[/php]
Last edited by ac1d_buRn; 07-13-2010 at 06:47 PM.
zmansquared (07-14-2010)
Wow Zman beat me to it but that method laggs like crazy
@Ac1D_BuRn, I saw that
I tried and boom worked.
<3 Sprites :P