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 / fp1100 / rampack.cpp
index 607bd31..fc0d2d6 100644 (file)
@@ -102,3 +102,15 @@ bool RAMPACK::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool RAMPACK::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->StateBuffer(ram, sizeof(ram), 1);
+       state_fio->StateBool(modified);
+       return true;
+}