# Path: procgame/config.py
# def value_for_key_path(keypath, default=None):
# def load():


import time
import pinproc
import Queue
from game import gameitems
from procgame import config


class FakePinPROC(object):
    """Stand-in class for :class:`pinproc.PinPROC`.  Generates DMD events."""
    
    last_dmd_event = 0
    
    frames_per_second = 30

    drivers = gameitems.AttrCollection("drivers")

    switch_events = []
    switch_rules = [{'notifyHost':False, 'drivers':[]}] * 1024
    """List of events"""

    """Frames per second at which to dispatch :attr:`pinproc.EventTypeDMDFrameDisplayed` events."""
    
    def __init__(self, machine_type):
        # this short circuits the generation of 'extra' DMD events if the virtual/color DMD is used
        use_virtual_dmd_only = config.value_for_key_path('use_virtual_dmd_only', False)
        if(use_virtual_dmd_only==True):
            self.get_events = self.get_events_noDMD
        else:

# Path: procgame/config.py
# def value_for_key_path(keypath, default=None):
# def load():


# Path: procgame/fakepinproc.py
import time
import pinproc
import Queue
from game import gameitems
from procgame import config



class FakePinPROC(object):
    """Stand-in class for :class:`pinproc.PinPROC`.  Generates DMD events."""
    
    last_dmd_event = 0
    
    frames_per_second = 30

    drivers = gameitems.AttrCollection("drivers")

    switch_events = []
    switch_rules = [{'notifyHost':False, 'drivers':[]}] * 1024
    """List of events"""

    """Frames per second at which to dispatch :attr:`pinproc.EventTypeDMDFrameDisplayed` events."""
    
    def __init__(self, machine_type):
        # this short circuits the generation of 'extra' DMD events if the virtual/color DMD is used
        use_virtual_dmd_only = config.value_for_key_path('use_virtual_dmd_only', False)
        if(use_virtual_dmd_only==True):
            self.get_events = self.get_events_noDMD
        else:

            self.frames_per_second = config.value_for_key_path('dmd_framerate', 30)