# Path: utility.py
# def boolean_format(value):
#         if value=='Yes':
#             return True
#         else:
#             return False


import sys
import procgame
import pinproc
import string
import time
import datetime
import locale
import math
import copy
import yaml
import os
import logging
import audits
import diagnostics
from utility import boolean_format
from ac_relay import *
from switched_coils import *
from scoredisplay.alphanumeric import *
from scoredisplay.scoredisplay import *
from effects import *
from extra_ball import *
from service import *
from attract import *
from base import *
from moonlight import *
from match import *
from tilt import *
from trough import *
from procgame import *
from player import *
from threading import Thread
from time import strftime
                    from scoredisplay.desktop import Desktop
        from colorlogging import ColorizingStreamHandler

#os.chdir("/Users/jim/Documents/Pinball/p-roc/p-roc system/src/pyprocgame/")
serial = config.value_for_key_path('game_serial')

game_locale = config.value_for_key_path('std_locale')
locale.setlocale(locale.LC_ALL, game_locale) # en_GB Used to put commas in the score.

#base_path = "/Users/jim/Documents/Pinball/p-roc/p-roc system/src/"
base_path = config.value_for_key_path('base_path')
logging.info("Base Path is: "+base_path)

game_path = base_path+"games/whirlwind/"
fonts_path = base_path+"shared/dmd/"
shared_sound_path = base_path+"shared/sound/"

machine_config_path = game_path + "config/machine.yaml"
settings_path = game_path +"config/settings.yaml"
game_data_path = game_path +"config/game_data.yaml"
game_data_template_path = game_path +"config/game_data_template.yaml"
settings_template_path = game_path +"config/settings_template.yaml"
displayed_audits_path = game_path +"config/audits_display.yaml"


voice_path = game_path +"speech/"
sound_path = game_path +"sound/"
music_path = game_path +"music/"
font_tiny7 = dmd.Font(fonts_path+"04B-03-7px.dmd")
font_jazz18 = dmd.Font(fonts_path+"Jazz18-18px.dmd")
font_14x10 = dmd.Font(fonts_path+"Font14x10.dmd")
font_18x12 = dmd.Font(fonts_path+"Font18x12.dmd")

# Path: utility.py
# def boolean_format(value):
#         if value=='Yes':
#             return True
#         else:
#             return False


# Path: game.py
import sys
import procgame
import pinproc
import string
import time
import datetime
import locale
import math
import copy
import yaml
import os
import logging
import audits
import diagnostics
from utility import boolean_format
from ac_relay import *
from switched_coils import *
from scoredisplay.alphanumeric import *
from scoredisplay.scoredisplay import *
from effects import *
from extra_ball import *
from service import *
from attract import *
from base import *
from moonlight import *
from match import *
from tilt import *
from trough import *
from procgame import *
from player import *
from threading import Thread
from time import strftime
                    from scoredisplay.desktop import Desktop
        from colorlogging import ColorizingStreamHandler


#os.chdir("/Users/jim/Documents/Pinball/p-roc/p-roc system/src/pyprocgame/")
serial = config.value_for_key_path('game_serial')

game_locale = config.value_for_key_path('std_locale')
locale.setlocale(locale.LC_ALL, game_locale) # en_GB Used to put commas in the score.

#base_path = "/Users/jim/Documents/Pinball/p-roc/p-roc system/src/"
base_path = config.value_for_key_path('base_path')
logging.info("Base Path is: "+base_path)

game_path = base_path+"games/whirlwind/"
fonts_path = base_path+"shared/dmd/"
shared_sound_path = base_path+"shared/sound/"

machine_config_path = game_path + "config/machine.yaml"
settings_path = game_path +"config/settings.yaml"
game_data_path = game_path +"config/game_data.yaml"
game_data_template_path = game_path +"config/game_data_template.yaml"
settings_template_path = game_path +"config/settings_template.yaml"
displayed_audits_path = game_path +"config/audits_display.yaml"


voice_path = game_path +"speech/"
sound_path = game_path +"sound/"
music_path = game_path +"music/"
font_tiny7 = dmd.Font(fonts_path+"04B-03-7px.dmd")
font_jazz18 = dmd.Font(fonts_path+"Jazz18-18px.dmd")
font_14x10 = dmd.Font(fonts_path+"Font14x10.dmd")
font_18x12 = dmd.Font(fonts_path+"Font18x12.dmd")

font_07x4 = dmd.Font(fonts_path+"Font07x4.dmd")