![]() |
| ||
| Directx9 bitmap movement problem. ok I am almost done doing what I need to do and that is getting a portion of a bitmap to appear on the screen and have it move around using directional controls. My problem is that while I get the the bitmap move it leaves the original behind and a new one appears in the direction I pressed. Then when I take my finger off the button it returns to the middle. So basically I want to make the bitmap that was in the previous position disappear and have the bitmap stay in the position I put it in so I can move it around like if I was playing zelda. The bitmap problem is the problem I really want to solve. Here is my Game_Run function where all the magic happens Let me know if you need the whole program.. void Game_Run(HWND hwnd) |
| ||
| Re: Directx9 bitmap movement problem. You call this function multiple times right? Via a timer callback or in a while loop with a sleep? If so, you're not keeping the rect2 variable around: every time this function gets called the variable is reset to it's initial value, and then any changes you make are lost when the function exits. Not sure why the image appears duplicated. That sounds like you're not clearing the draw buffer properly... I don't have much recent experience with DirectX though, so can't help you much there. |
| ||
| Re: Directx9 bitmap movement problem. The problem was I took out the first RECT function. So when I put it back in I didn't have that problem anymore. Anyway I got the program fixed. I needed to use static ints to make the sphere move around the smoothly instead of just appearing in another spot like in my original program. |
| All times are GMT -4. The time now is 7:46 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC