#define STATE_VERSION 1
+#include "../../statesub.h"
+
+void FLOPPY::decl_state()
+{
+ enter_decl_state(STATE_VERSION);
+
+ DECL_STATE_ENTRY_BOOL(drq);
+
+ leave_decl_state();
+}
void FLOPPY::save_state(FILEIO* state_fio)
{
- state_fio->FputUint32(STATE_VERSION);
- state_fio->FputInt32(this_device_id);
+ if(state_entry != NULL) {
+ state_entry->save_state(state_fio);
+ }
+// state_fio->FputUint32(STATE_VERSION);
+// state_fio->FputInt32(this_device_id);
- state_fio->FputBool(drq);
+// state_fio->FputBool(drq);
}
bool FLOPPY::load_state(FILEIO* state_fio)
{
- if(state_fio->FgetUint32() != STATE_VERSION) {
- return false;
+ bool mb = false;
+ if(state_entry != NULL) {
+ mb = state_entry->load_state(state_fio);
}
- if(state_fio->FgetInt32() != this_device_id) {
+ if(!mb) {
return false;
}
- drq = state_fio->FgetBool();
+// if(state_fio->FgetUint32() != STATE_VERSION) {
+// return false;
+// }
+// if(state_fio->FgetInt32() != this_device_id) {
+// return false;
+// }
+// drq = state_fio->FgetBool();
return true;
}