Oh grow up. Allegro implicitly changes global state all the time, and it's your responsiblity to set it back. OpenGL much?

In Allegro's case there's likely a performance justification for leaving that state tainted (but heavily documented!): if Allegro were to try to capture the initial state and restore it for each relevant OpenGL operation it would likely cripple the library's performance. That's a valid concern. I think it's terrible that OpenGL bleeds into Allegro 5, but I trust that it's necessary (if it isn't then Allegro shouldn't be doing that either).

If it affected your library then you could readily argue that it was justifiable to alter the global state without restoring it, but in this case I don't think that's applicable. The affected bit of your library seems to predominantly initialize state a single time for later, which can certainly absorb the negligible impact of capturing and restoring the state. The runtime cost is much less than the developer cost.

Here is global state rearing its ugly head. It's a problem. That is why the industry has agreed that global state is problematic in general and that it should be used sparingly. I imagine that attempting to use this code in a multithreaded program that was "crazy" would be impossible. Perhaps some of that burden would hinge on Allegro, OpenGL, and physical hardware, but to whatever extent is possible, the software should not be a limiting factor.

It's always per-thread global state (in the case of OpenGL and Allegro), so multi-threading works (it can still be an issue if you change state on one thread and expect it to change on another, of course).

Hello everybody! Hope everyone enjoyed KrampusHack and more importantly, had a great Christmas! Or...vice versa.

I've received several entries. A surprise family event popped up that I'm going to head off to now. I'll send out the gifts this evening and you'll have the rest of the week to play them before the Secret Santas start posting to the allegro.cc Depot forums.

Send the review back to the secret santa (via me, if your secret santa never revealed their identity). Try to do so before January 1, 2017.

The intention here is that the Secret Santa knows that their personalized gift was played and enjoyed by the intended sole recipient before anyone else. January 1st is when all secret santas may reveal themselves to everyone by posting their game on the depot. We decided in this thread to move the submission date back to the 26th (as it was originally). Several people have followed this rule.

Certainly the deadline is meant to be motivation for a "hack" event. Obviously a floating deadline is therefore demotivating. That said, the whole event was kind of whimsical this year so if you're motivated to get something done still I don't see the harm. But certainly the next KrampusHack should be more precisely defined.

For most desktop keyboards, yes, but laptop keyboards might have the cursor keys close enough for that not to matter.

---Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.MiquelFire.red | +MeWindows 8 is a toned, stylish, polished professional athlete. But it’s wearing clown makeup, and that creates a serious image problem. ~PCWorld Article

That's a wrap on KrampusHack! Thanks for participating! Here's some info:

Participants that received gifts:Eric Johnson got a gift from AmarillionMark Oates got a gift from Eric JohnsonElias got a gift from SiegeLordDerezo got a gift from Elias

Participants that did not get gifts:Edgar Reynaldo did not get a gift from Derezo or GullRaDriel (late entry)Vanneto did not get a gift from Mark Oatesm c did not get a gift from Edgar ReynaldoAmarillion did not get a gift from Takaaki FurukawaSiegeLord did not get a gift from VannetoTakaaki Furukawa did not get a gift from m cGullRaDriel (late entry) did not get a gift

You can now upload your games to the depot. I can see several people have already done so.