OSDN Git Service

[VM][WIP] Pre-process to apply new state framework.Still not buildable.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pv2000 / cmt.cpp
index 9c6d67f..054c60e 100644 (file)
@@ -187,3 +187,19 @@ bool CMT::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool CMT::process_state(FILEIO* state_fio, bool loading)
+{
+       if(!state_fio->StateCheckUint32(STATE_VERSION)) {
+               return false;
+       }
+       if(!state_fio->StateCheckInt32(this_device_id)) {
+               return false;
+       }
+       state_fio->StateInt32(bufcnt);
+       state_fio->StateBuffer(buffer, sizeof(buffer), 1);
+       state_fio->StateBool(play);
+       state_fio->StateBool(rec);
+       state_fio->StateUint8(start);
+       state_fio->StateUint8(bit);
+       return true;
+}