OSDN Git Service

[VM][DEVICE][WIP] Updating State functions.Still cause FTBFS.
[csp-qt/common_source_project-fm7.git] / source / src / vm / tms3631.cpp
index 0915a12..e3773cc 100644 (file)
@@ -129,17 +129,15 @@ bool TMS3631::process_state(FILEIO* state_fio, bool loading)
        if(!state_fio->StateCheckInt32(this_device_id)) {
                return false;
        }
-       state_fio->StateUint8(envelop1);
-       state_fio->StateUint8(envelop2);
-       state_fio->StateUint8(datareg);
-       state_fio->StateUint8(maskreg);
-//     state_fio->StateBuffer(ch, sizeof(ch), 1);
-       for(int i = 0; i < 8; i++) {
-               state_fio->StateUint32(ch[i].freq);
-               state_fio->StateUint32(ch[i].count);
+       state_fio->StateValue(envelop1);
+       state_fio->StateValue(envelop2);
+       state_fio->StateValue(datareg);
+       state_fio->StateValue(maskreg);
+       for(int i = 0; i < array_length(ch); i++) {
+               state_fio->StateValue(ch[i].freq);
+               state_fio->StateValue(ch[i].count);
        }
-
-       state_fio->StateUint8(channel);
-       state_fio->StateBool(set_key);
+       state_fio->StateValue(channel);
+       state_fio->StateValue(set_key);
        return true;
 }