Loopp/src/state/stately.cxx

41 lines
580 B
C++
Raw Normal View History

#include "stately.hxx"
#include "../jack.hxx"
#include "state.hxx"
extern Jack* jack;
int Stately::savesDone = 0;
Stately::Stately()
{
jack->getState()->registerStately( this );
}
void Stately::reset()
{
}
void Stately::save()
{
}
void Stately::done()
{
savesDone++;
if ( savesDone >= jack->getState()->getNumStatelys() )
{
jack->getState()->finish();
savesDone = 0; // reset in case of another save before quit
}
}
void Stately::error()
{
// CRITICAL FIXME: add error handling code, noting an error occured, perhaps prompt user?
savesDone++;
}