Blade Edge

Computer software | Video production | My life in general

Blade Edge main header

Bug Be Gone

October 6th, 2004 · No Comments · Software

Transposed from Gaiiden’s Scroll

So I fixed that bug I was bitching about on Monday. Turns out I was on the wrong track. I thought some wires were getting crossed when I copied a button object. Turns out that the buttons were just unsubscribing themselves from receiving MOUSE_BUTTON_MSGs from the kernel after I clicked on them once. I tracked down the offending unsubscribe function and remedied the problem. Now everything works again. Yey! The discovery even prompted me to do a bit of re-architecting. At the time, when a mouse button was clicked, the kernel would dispatch a global MOUSE_BUTTON_MSG. That means it would send a message to whatever objects were subscribed to recieve mouse button events (be that 2 or 100). That’s all well and good in the general sense of things, but why bother send out a global message when the mouse button is being hovered over? So I changed some stuff around, and now, when the cursor hovers over a button, the button sends a message to the scene manager, and the scene manager then directs any MOUSE_BUTTON_MSGs straight to that button. Once the cursor moves off the button, it reverts to global dispatching. Just a small performance save in sending 1 message vs n messages for a simple button click.

So yea, I’m back in business. I had other things to do tonight for GDNet and GI though, so I didn’t have much time to work on anything else in regards to Tanto (that’s the name of the log reporter, in case I forgot to mention it – which I think I did).

Well, at least I accomplished something today Gotta get to sleep – flying my kite tomorrow for the first time all season! Whooo!! I’ll post details tomorrow.


No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment