I'M AT MY WITS END!!!
I am having some SERIOUS debugging problems here! I am making a little arkanoid clone... AND IT DOESN''T WANT TO WORK! The calls to Blt (DirectDraw) are throwing the computer into fits, and I can''t figure out why. All the code looks sound to me... I have checked it through about 15 billion times, compared all the calls to the examples in the books, done debugging step-throughs; basicly, everything I can think of. I thought that if a fresh pair of eyes looked at my code for a few minutes, they might find an obvious error that I missed. If you are interested in helping me, I will e-mail you the source file (it''s really short). I would really appreciate some help here!! Mail me at novedkelley@yahoo.com. Sorry to beg so blatantly, but I have tried everything else!
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
Optimism is not a state of mind, but a form of life!SuperNova Games
Can you be a little more specific as to what is your problem!!! i mean i dont wanna do the debugging of code that isnt mine which may or may-not be properly commented in which case ill just WAIST my time trying to figure out what your doing. So, figure out what and where your problem is happening and state it here (*without posting your entire code, just a snippet if really, really needed*)
(you said your blt() is going crazy but thats about as general a remark as you can get...if that is your problem area at all!)
(you said your blt() is going crazy but thats about as general a remark as you can get...if that is your problem area at all!)
aka John M.
Never give up. Never surrender!
are you sure that you are Unlocking the surface if it is locked before the Blt call? i had this problem one time, and it gave me headaches for weeks. make sure you unlock a surface (if needed) before you blit to it.
just a suggestion
--
david@neonstar.net
neonstar entertainment
just a suggestion
--
david@neonstar.net
neonstar entertainment
--david@neonstar.netneonstar entertainment
I can''t really explain whats going on. ANY call I make to Blt crashes the program. The code is in a general "Game Run" function that the message loop calls to do all the stuff. It calls an Erase Surface function and uses Blt to fill the buffer flipping surface with black. Then, I try to immediatly Blt a bitmap stored in an offscreen surface of the same size to the back buffer, and the program freezes with a white screen in Debug mode, and just crashes when I just run it. The colorfill blitting works fine... but when I try to blit from an offscreen surface, it crashes. Is there a trick here that I don''t know about?
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
Optimism is not a state of mind, but a form of life!SuperNova Games
i don''t know what to tell you man, it does sound kinda crazy. how bout e-mailing me your directdraw source and i''ll take a look at it. david@neonstar.net.
dave
--
david@neonstar.net
neonstar entertainment
dave
--
david@neonstar.net
neonstar entertainment
--david@neonstar.netneonstar entertainment
Are you sure this offscreen surface exists? Was it created properly? Or did the surface creation call fail?
I do not get any error messages at all, until the program reaches the Blt call. Then it just crashes (run), or hangs (debug). I also found out that the calls to Flip do the same thing. I took out the bitmap Blitting and tried to just flip the surfaces, and it didn''t work. I think it has to be my code, because I can compile and run the sample programs. Does anyone else have some wisdom to impart upon me??
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
SuperNova Games
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
SuperNova Games
Optimism is not a state of mind, but a form of life!SuperNova Games
here''s some oft repeated wisdom - post some code so we can all look at it (gee, what an incentive ) there''s nothing proprietary about DirectDraw code that you should bother hiding from us (not that you are). I''m not spending the time doing your pondering for you, but I will glance over your code to see if you are doing anything wrong.
==============================
"Need more eeenput..."
- #5, "Short Circuit"
Blade Edge Software
==============================
==============================
"Need more eeenput..."
- #5, "Short Circuit"
Blade Edge Software
==============================
Drew Sikora
Executive Producer
GameDev.net
Well, I thought of doing that in the beggining, but I couldn''t isolate the problem. I''ll put where the problem is, and you can tell me if the prob is there or somewhere else. That would help too.
All of the Blts and Flips fail, except the Blt that colorfills int he EraseSurface function.
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
SuperNova Games
// Run the gameBOOL RunGame(HWND hwnd){ OutputDebugString("Running the game...\n"); // Erase the drawing surface if (!EraseSurface(lpDDSBack)) { MessageBox(hwnd, "Erase Back buffer", "ERROR", MB_OK); return FALSE; } // Right now... I just want to draw the background and flip... // Blt the background to the buffer if (FAILED(lpDDSBack->Blt(NULL, lpDDSBackground, NULL, DDBLT_WAIT, NULL))) { MessageBox(hwnd, "Background Blt", "ERROR", MB_OK); return FALSE; } RECT ball = {100, 100, 110, 110}; // Blt the ball onto the background if (FAILED(lpDDSBack->Blt(&ball, lpDDSBall, NULL, DDBLT_WAIT | DDBLT_KEYSRC, NULL))) { MessageBox(hwnd, "Ball Blt", "ERROR", MB_OK); return FALSE; } // Now, flip the surfaces if (FAILED(lpDDSPrimary->Flip(NULL, DDFLIP_WAIT))) { MessageBox(hwnd, "Flip", "ERROR", MB_OK); return FALSE; } // return successfull, i guess return TRUE;}
All of the Blts and Flips fail, except the Blt that colorfills int he EraseSurface function.
The Shaz
"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run
SuperNova Games
Optimism is not a state of mind, but a form of life!SuperNova Games
January 05, 2001 08:16 AM
I''m not at home so I cant check this but dont you want:
&lpDDSBall
and
&lpDDSBackground
like I said I''m kinda going on memory and could be quite wrong.
&lpDDSBall
and
&lpDDSBackground
like I said I''m kinda going on memory and could be quite wrong.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement