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 / jr100 / memory.cpp
index 93088ea..be6761c 100644 (file)
@@ -216,3 +216,17 @@ bool MEMORY::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool MEMORY::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->StateBuffer(vram, sizeof(vram), 1);
+       state_fio->StateInt32(key_column);
+       state_fio->StateBool(cmode);
+       return true;
+}