 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Oct 20, 2007 1:53 pm Post subject: Directx9 question |
|
|
source attached // program attached
| Code: | void render_frame(void)
{
HRESULT hr;
static BYTE keystate[256]; // create a static storage for the key-states
hr=dinkeyboard->Acquire();
while( hr == DIERR_INPUTLOST )
{
hr = dinkeyboard->Acquire();
}
dinkeyboard->GetDeviceState(256, (LPVOID)keystate);
d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
d3ddev->BeginScene();
d3dspt->Begin(NULL);
d3dspt->Draw(sprite, NULL, ¢er, &position, D3DCOLOR_XRGB(255, 255, 255));
d3dspt->End();
d3dsptf->Begin(D3DXSPRITE_ALPHABLEND);
d3dsptf->Draw(spritef, NULL, ¢er, &position, D3DCOLOR_ARGB(0, 255, 255, 255));
if(keystate[DIK_RIGHT] & 0x80)
{
d3dsptf->Draw(spritef, NULL, ¢er, &position2, D3DCOLOR_ARGB(0,255,255,255));
}
d3dsptf->End();
d3ddev->EndScene(); // ends the 3D scene
d3ddev->Present(NULL, NULL, NULL, NULL);
return;
} |
Ok i use directinput to detect when right arrow was pressed. If its pressed then the new sprite renders in beside the old one. It works
but when i let go of the key, it disappears.
Any ideas/links/source?
_________________
|
|
| Back to top |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Sat Oct 20, 2007 2:59 pm Post subject: |
|
|
Its doing exactly what youre telling it to do.
While the button is pressed to render your sprite.
and no need to use brackets there
| Code: | if ( a == b )
then_do_this_fucntion()
|
_________________
|
|
| Back to top |
|
 |
ZenX Grandmaster Cheater Supreme
Reputation: 1
Joined: 26 May 2007 Posts: 1021 Location: ">>Pointer<<" : Address 00400560 Offset :1FE
|
Posted: Sat Oct 20, 2007 4:52 pm Post subject: |
|
|
dx39.Dll can not be found is what i get.
_________________
CEF Moderator since 2007 ^_^
ZenX-Engine |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Oct 20, 2007 5:52 pm Post subject: |
|
|
Try to loop the function that changes the render?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Oct 20, 2007 6:19 pm Post subject: |
|
|
solution found
instead of redrawing the sprites on the right arrow i change the vector and the next time it redraws it will use the new vector
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|