I wrote this today. In effect, it's a simple boolean variable with a function wrapped around it to easily set or get its contents.
Header:
bool Paused(int iParam = -1);
Source:
bool Paused(int iParam)
{
static bool bIsPaused = false;
if(iParam == 0)
bIsPaused = false;
if(iParam == 1)
bIsPaused = true;
return bIsPaused; // this always happens
}
So the following are all valid calls:
if(Paused()) // just test value of variable
{
// do 'paused' stuff //
}
Paused(1); // set variable to true
Paused(0); // set variable to false
Any feedback?
~you can call me lantz~