X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=source%2Fsrc%2Fvm%2Fmz5500%2Fsysport.cpp;h=96a9b49ce7214ac83083dc5089485a806a42b975;hb=e4bf0bb6c5867c5e224272c397d193948c5bb27e;hp=d9fc80c30a6b50dff6999818d95553f851116985;hpb=59fc5b4623a08b55dbe3d82782d533a3144be0e9;p=csp-qt%2Fcommon_source_project-fm7.git diff --git a/source/src/vm/mz5500/sysport.cpp b/source/src/vm/mz5500/sysport.cpp index d9fc80c30..96a9b49ce 100644 --- a/source/src/vm/mz5500/sysport.cpp +++ b/source/src/vm/mz5500/sysport.cpp @@ -68,25 +68,15 @@ void SYSPORT::event_frame() #define STATE_VERSION 1 -void SYSPORT::save_state(FILEIO* state_fio) +bool SYSPORT::process_state(FILEIO* state_fio, bool loading) { - state_fio->FputUint32(STATE_VERSION); - state_fio->FputInt32(this_device_id); - - state_fio->FputInt32(rst); - state_fio->FputInt32(highden); -} - -bool SYSPORT::load_state(FILEIO* state_fio) -{ - if(state_fio->FgetUint32() != STATE_VERSION) { + if(!state_fio->StateCheckUint32(STATE_VERSION)) { return false; } - if(state_fio->FgetInt32() != this_device_id) { + if(!state_fio->StateCheckInt32(this_device_id)) { return false; } - rst = state_fio->FgetInt32(); - highden = state_fio->FgetInt32(); + state_fio->StateInt32(rst); + state_fio->StateInt32(highden); return true; } -