[RELEASE] How To Draw Sprites

Posts 1–15 of 38 · Page 1 of 3
[RELEASE] How To Draw Sprites
Well i thought id create a tutorial on this, Since some people are asking. The code is NOT mine. Credits to pyroctain666 for the code and im not sure who made the program

First get your image and open it up in the converter provided.
Convert the image to bytes. The output bytes will be in the text file.

Define you bytes like this:
[php]
BYTE Menu[ ] = {output bytes here};
[/php]

In the globals, Put:
[php]
LPD3DXSPRITE Sprite;
LPDIRECT3DTEXTURE9 MenuTexture;
static BOOL Create = TRUE;
[/php]

Now, Go to your Endscene or Present and create your texture and sprite like so:
[php]
if(Create){
D3DXCreateTextureFromFileInMemory(Device,&Menu,siz eof(Menu),&MenuTexture);
D3DXCreateSprite(pDevice,&Sprite);
Create = FALSE;
}
[/php]

Now you need to draw the sprite (In Endscene or Present again)
[php]
D3DXVECTOR3 POS;
POS.x = 15;
POS.y = 15;
POS.z = 0;

Sprite->Begin();
Sprite->Draw(MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
Sprite->End();
[/php]

If you would like the image transperent, Replace
[php]
Sprite->Begin();
[/php]

With
[php]
Sprite->Begin(D3DXSPRITE_ALPLHABLEND);
[/php]

I havent tested it yet, But it should work. I will tesst once CA finishes patching.

acid_buRn

Ohh and the virus scan:
VirusTotal - Free Online Virus and Malware Scan - Result
File2ByteArray.rarattachment deleted · 416 downloads before removal
Thanks mate..
So it will Make Any pic you want transparent?
Quote Originally Posted by whit View Post
Thanks mate..
So it will Make Any pic you want transparent?
yes it will make the image you put in there transparent
You need 2 virusscans.
and a screenshot
Quote Originally Posted by Zoom View Post
You need 2 virusscans.
and a screenshot
A SS of what? The program?
Quote Originally Posted by ac1d_buRn View Post


A SS of what? The program?
The Menu?.. proof it works?
Probably the Program...

Ill try it out and get you an SS.. if you want.

but what bytes do we put in
Quote Originally Posted by ac1d_buRn View Post
Well i thought id create a tutorial on this, Since some people are asking. The code is NOT mine. Credits to pyroctain666 for the code and im not sure who made the program

First get your image and open it up in the converter provided.
Convert the image to bytes. The output bytes will be in the text file.

Define you bytes like this:
[php]
BYTE Menu[ ] = {output bytes here};
[/php]

In the globals, Put:
[php]
LPD3DXSPRITE Sprite;
LPDIRECT3DTEXTURE9 MenuTexture;
static BOOL Create = TRUE;
[/php]

Now, Go to your Endscene or Present and create your texture and sprite like so:
[php]
if(Create){
D3DXCreateTextureFromFileInMemory(Device,&Menu,siz eof(Menu),&MenuTexture);
D3DXCreateSprite(pDevice,&Sprite);
Create = FALSE;
}
[/php]

Now you need to draw the sprite (In Endscene or Present again)
[php]
D3DXVECTOR3 POS;
POS.x = 15;
POS.y = 15;
POS.z = 0;

Sprite->Begin();
Sprite->Draw(MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
Sprite->End();
[/php]

If you would like the image transperent, Replace
[php]
Sprite->Begin();
[/php]

With
[php]
Sprite->Begin(D3DXSPRITE_ALPLHABLEND);
[/php]

I havent tested it yet, But it should work. I will tesst once CA finishes patching.

acid_buRn

Ohh and the virus scan:
VirusTotal - Free Online Virus and Malware Scan - Result

you got the file2bytearray from some base on other forum xD..

ONTOPIC: Nice, will be helpful to the choobs.
please get the ss and other vscan.. i ned this
Get a virscan.org scan please or whatever ...
Quote Originally Posted by Bombsaway707 View Post
/approved .
He doesnt have Screenshot.
Could you dissaprove it?
Quote Originally Posted by whatup777 View Post
He doesnt have Screenshot.
Could you dissaprove it?
ummm he dose? i see it loud and clear like ss is ment to be?
I dont see any screenshot but now I need a sprite to hook.

Does anyone wanna photoshop me a sprite.
Nice job acid... looks nice (:
Posts 1–15 of 38 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us