*/
#include "reset.h"
+#include "../../fileio.h"
void RESET::initialize()
{
prev = data & mask;
}
+#define STATE_VERSION 1
+
+void RESET::save_state(FILEIO* state_fio)
+{
+ state_fio->FputUint32(STATE_VERSION);
+ state_fio->FputInt32(this_device_id);
+
+ state_fio->FputUint8(prev);
+}
+
+bool RESET::load_state(FILEIO* state_fio)
+{
+ if(state_fio->FgetUint32() != STATE_VERSION) {
+ return false;
+ }
+ if(state_fio->FgetInt32() != this_device_id) {
+ return false;
+ }
+ prev = state_fio->FgetUint8();
+ return true;
+}
+