I wrote this as part of my sprite system, and I think pretty much everyone will benefit from it, so I've posted this class in the code archives for all to use.
If you find it useful, buy my sprite system when it comes out in a few days. It'll be 10x as useful. :-)
http://www.blitzbasic.com/codearcs/codearcs.php?code=1641
What's it do? It saves and restores the current settings for drawing stuff.
When you make a function that changes these settings, you can save the current state at the start of the funciton with a push, and then pop that state off the stack when the function is finished.
This way you won't accidentally change the alpha and then forget to set it back to 1 when you're done and screw up text you print later.
I posted it before on the forum, but now it's in the code archives, and I changed a few minor things.
If you find it useful, buy my sprite system when it comes out in a few days. It'll be 10x as useful. :-)
http://www.blitzbasic.com/codearcs/codearcs.php?code=1641
What's it do? It saves and restores the current settings for drawing stuff.
When you make a function that changes these settings, you can save the current state at the start of the funciton with a push, and then pop that state off the stack when the function is finished.
This way you won't accidentally change the alpha and then forget to set it back to 1 when you're done and screw up text you print later.
I posted it before on the forum, but now it's in the code archives, and I changed a few minor things.