2013-09-06 01:28:11 +02:00
|
|
|
|
|
|
|
#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
|
|
|
|
}
|
|
|
|
}
|
2013-11-13 13:03:24 +01:00
|
|
|
|
|
|
|
void Stately::error()
|
|
|
|
{
|
|
|
|
// CRITICAL FIXME: add error handling code, noting an error occured, perhaps prompt user?
|
|
|
|
savesDone++;
|
|
|
|
}
|