Page 1 of 1

Solve this code segment ...

PostPosted: Oct 19, 2004 @ 3:13am
by qasim1981

PostPosted: Oct 19, 2004 @ 7:16am
by InexorableTash
"Give a man a fish and he can eat for a day. Teach a man to fish and he can eat for the rest of his life."

(1) Try checking the return values of the method calls into the various CGapiSurface objects. Are they returning success or failure? If success, is your code doing what you think it's doing? If failure, why?

(2) Try using breakpoints to determine if values you think are set really are. (Hint: they aren't)

(3) Try using breakpoints, and determing if the code you assume is running really is running. (Hint: it's not)

(These are basic software debugging steps, so it's important to learn them. Otherwise, you might as well just contract someone to write your code for you.)

PostPosted: Oct 19, 2004 @ 9:56am
by vince_mad
Hi,
Just a couple of questions:
What size is your image?
What size is the screen you try to display it on?

I see you BltFast your image with this code:

If the image is bigger than the screen it won't appear.
If it is the case, instead of the NULL pointer (just after the surface pointer in the call to BltFast) use a pointer to a RECT you set smaller than your screen.

It may not help but that just caught my eye.

Vincent.

PostPosted: Oct 19, 2004 @ 11:55am
by Structure