Odd problem DX6.1

Started by
1 comment, last by Weston 22 years, 1 month ago
This problem has been annoying me for over a week now, but I''ve discovered where I should start looking after some error tests. My application is supposed to load a bitmap, blit it to the back buffer, and flip the page. Just a simple task. But for some reason, it will not blit because the surface that holds the bitmap is assigned to NULL before GameMain() is called. The surface is fine up to the point where GameInitialize() ends. A (crummy) visual: GameInitialize() { Surface is just fine. } (Process Windows messages and enter main message loop) GameMain() { Surface is NULL. } I have looked over my code and compared it to the code on a CD thousands of times. The CD code works fine, and I''ve tested all my functions in it. All my surfaces are global, the bitmap is not. I''ve tried making the bitmap global, along with a surface description, but nothing changes. I was going to put up some code, but I wanted to see if anyone has any ideas first. But if you''d like me to mail the source code, I''ll try that as well.
---Will DDR for food.
Advertisement
Mail me the source code (if its using VC5 or 6) and ill have a look. Its probably a pointer problem.

NSZeroOne@Hotmail.com

Downloads, D3DXSprite tutorial, New platform game: .-= The ZeroOne Realm =-.

Downloads, Free GoldLib game library, D3DXSprite tutorial, New platform game: .-= The ZeroOne Realm =-.

Okay. Most of the code is based on Tricks of the Windows Game Programming Gurus.
I didn''t comment much, but all the functions should be self explanatory. I''ve tested them out too in another program, and they work fine.

Thank you so much for taking the time to help.
---Will DDR for food.

This topic is closed to new replies.

Advertisement