コード例 #1
0
        //const char *indexed_item(int index, void *&base, UINT32 &valsize, UINT32 &valcount) const;


        // function registration
        //-------------------------------------------------
        //  register_presave - register a pre-save
        //  function callback
        //-------------------------------------------------
        public void register_presave(save_prepost_delegate func)
        {
            //throw new emu_unimplemented();
#if false
            // check for invalid timing
            if (!m_reg_allowed)
            {
                global.fatalerror("Attempt to register callback function after state registration is closed!\n");
            }

            // scan for duplicates and push through to the end
            foreach (state_callback cb in m_presave_list)
            {
                if (cb.m_func == func)
                {
                    global.fatalerror("Duplicate save state function ({0}/{1})\n", cb.m_func.name(), func.name());
                }
            }

            // allocate a new entry
            m_presave_list.append(new state_callback(func));
#endif
        }
コード例 #2
0
        //-------------------------------------------------
        //  state_save_register_postload -
        //  register a post-load function callback
        //-------------------------------------------------
        public void register_postload(save_prepost_delegate func)
        {
            //throw new emu_unimplemented();
#if false
            // check for invalid timing
            if (!m_reg_allowed)
            {
                fatalerror("Attempt to register callback function after state registration is closed!\n");
            }

            // scan for duplicates and push through to the end
            for (state_callback *cb = m_postload_list.first(); cb != NULL; cb = cb->next())
            {
                if (cb->m_func == func)
                {
                    fatalerror("Duplicate save state function (%s/%s)\n", cb->m_func.name(), func.name());
                }
            }

            // allocate a new entry
            m_postload_list.append(*global_alloc(state_callback(func)));
#endif
        }