Exemple #1
0
        // inline configuration helpers

        //template <typename Object> void configure_generic(Object &&cb)
        //{
        //    m_type = TIMER_TYPE_GENERIC;
        //    m_callback = std::forward<Object>(cb);
        //}
        //template <class FunctionClass> void configure_generic(void (FunctionClass::*callback)(timer_device &, void *, s32), const char *name)
        //{
        //    configure_generic(expired_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
        //}

        //template <typename Object> void configure_periodic(Object &&cb, const attotime &period)
        //{
        //    m_type = TIMER_TYPE_PERIODIC;
        //    m_callback = std::forward<Object>(cb);
        //    m_period = period;
        //}
        //template <class FunctionClass> void configure_periodic(void (FunctionClass::*callback)(timer_device &, void *, s32), const char *name,
        //    const attotime &period)
        //{
        //    configure_periodic(expired_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)), period);
        //}


        public void configure_scanline <bool_Required>(expired_delegate callback, device_finder <screen_device, bool_Required> screen, int first_vpos, int increment)  //template <typename F, typename U> void configure_scanline(F &&callback, const char *name, U &&screen, int first_vpos, int increment)
            where bool_Required : bool_const, new()
        {
            m_type     = timer_type.TIMER_TYPE_SCANLINE;
            m_callback = callback;    //m_callback.set(std::forward<F>(callback), name);
            m_screen.set_tag(screen); //m_screen.set_tag(std::forward<U>(screen));
            m_first_vpos = (u32)first_vpos;
            m_increment  = (u32)increment;
        }
Exemple #2
0
 //template <typename T> void set_palette(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
 public void set_palette(string tag)
 {
     m_paletteDevice.set_tag(tag);
 }
Exemple #3
0
 // inline configuration helpers
 //-------------------------------------------------
 //  static_set_vblank_count - configuration helper
 //  to set the number of VBLANKs
 //-------------------------------------------------
 //template <typename T>
 public void set_vblank_count(string screen_tag, int32_t count)
 {
     m_screen.set_tag(screen_tag); m_vblank_count = count;
 }                                                                                                                         //void set_vblank_count(T &&screen_tag, int32_t count) { m_screen.set_tag(std::forward<T>(screen_tag)); m_vblank_count = count; }