Last time I promise :- D [SOLVED] (was Re : the bug came back... Re: Needing to include windows.h? [*NOT* SOLVED])

Jason <jesus_freak picknowl.com.au> writes:

again!

First of all, let me say that my embarrassment now knows no ends. Firstly for
such a newbie mistake as I made and then for replying to my own post not once,
not twice, but three whole times…

All I can say is: watch out for full-screen blits! Where the menu takes up the
full screen (like you get in a game’s main menu) I didn’t bother to re-set the
rectangle coordinates of the menu from the default (0,0,0,0) which I now have
the constructor doing. But, then when I detect a mouse click I’m checking if the
point where the mouse clicks is inside the rectangle of the menu…

D’uh! * 100.

So, please completely ignore this thread unless you are searching for odd
errors…

And I think I’ll take up teaching coding - specifically how not to make stupid
errors like this AND how not to reply to yourself heaps on a newsgroup :smiley:

-J

Hello !

First of all, let me say that my embarrassment now knows no ends. Firstly
for
such a newbie mistake as I made and then for replying to my own post not
once,
not twice, but three whole times…

All I can say is: watch out for full-screen blits! Where the menu takes up
the
full screen (like you get in a game’s main menu) I didn’t bother to re-set
the
rectangle coordinates of the menu from the default (0,0,0,0) which I now
have
the constructor doing. But, then when I detect a mouse click I’m checking
if the
point where the mouse clicks is inside the rectangle of the menu…

D’uh! * 100.

So, please completely ignore this thread unless you are searching for odd
errors…

And I think I’ll take up teaching coding - specifically how not to make
stupid
errors like this AND how not to reply to yourself heaps on a newsgroup :smiley:

printf is your best friend for debugging.

When you run your app and you get strange
output on the screen, set printfs before the
blitting functions.

Most of the time you will get an AHA effect.

CU

I usually use std::cerr and std::clog. But that’s just me. :smiley:

Torsten Giebl said:

Hello !

First of all, let me say that my embarrassment now knows no ends.
Firstly
for
such a newbie mistake as I made and then for replying to my own post not
once,
not twice, but three whole times…

All I can say is: watch out for full-screen blits! Where the menu takes
up
the
full screen (like you get in a game’s main menu) I didn’t bother to
re-set
the
rectangle coordinates of the menu from the default (0,0,0,0) which I now
have
the constructor doing. But, then when I detect a mouse click I’m
checking
if the
point where the mouse clicks is inside the rectangle of the menu…

D’uh! * 100.

So, please completely ignore this thread unless you are searching for
odd
errors…

And I think I’ll take up teaching coding - specifically how not to
make
stupid
errors like this AND how not to reply to yourself heaps on a newsgroup
:smiley:

printf is your best friend for debugging.

When you run your app and you get strange
output on the screen, set printfs before the
blitting functions.

Most of the time you will get an AHA effect.

CU


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Fare thee well,
Bawenang R. P. P.----------------
ERROR: Brain not found. Please insert a new brain!

?Do nothing which is of no use.? - Miyamoto Musashi.

“I live for my dream. And my dream is to live my life to the fullest.”

<benang cs.its.ac.id> writes:

I usually use std::cerr and std::clog. But that’s just me. :smiley:

printf is your best friend for debugging.

I’ve tried using printf and std::cerr but they get directed to a file, and then
when my app closes, those files disappear… What I’ve been doing and what led
to the AHA effect for me was to use Windows’ MessageBox functions. I’ve put them
inside #ifdef directives so they only come on specifically when I want them,
plus it means that when it all works it will still be portable! (I might remove
them all before then, though!)

The great thing about the MessageBox function is that the program stops while it
is displayed, which means I can toggle over to the debugger and check out what’s
caused the problem…

-J