X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=tabakrolletjie%2Fconstants.py;h=0ea58f52a260aba732d68e84a8f8be7b2652bf0a;hb=efdaf970074e8c091e9387013e92f2e515966748;hp=92a7c6fdfc0b3fe5f81c78faea376d24c6cfd605;hpb=0ca147815505a467673dcb0d2507e30e7e69cbe1;p=tabakrolletjie.git diff --git a/tabakrolletjie/constants.py b/tabakrolletjie/constants.py index 92a7c6f..0ea58f5 100644 --- a/tabakrolletjie/constants.py +++ b/tabakrolletjie/constants.py @@ -7,15 +7,50 @@ TITLE = "Space Turnips" # Debug DEBUG = os.environ.get("TABAK_DEBUG", "").lower() in ("1", "y", "yes") +DRAW_FPS = os.environ.get("TABAK_DRAW_FPS", "").lower() in ("1", "y", "yes") +# Intervals to average fps over +FPS_FRAMES = 50 # 704 is 768 minus space for window decorations :) SCREEN_SIZE = (1024, 704) # Frame per second -FPS = 60 +FPS = 30 + +# Night length in ticks +NIGHT_LENGTH = 1500 +# Night length in hours +NIGHT_LENGTH_HOURS = 12 # Pymunk categories OBSTACLE_CATEGORY = 1 << 0 LIGHT_CATEGORY = 1 << 1 MOULD_CATEGORY = 1 << 2 FITTINGS_CATEGORY = 1 << 3 +TURNIP_CATEGORY = 1 << 4 + +# Font definitions +FONTS = { + 'sans': 'DejaVuSans.ttf', + 'bold': 'DejaVuSans-Bold.ttf', +} + +# Sound stuff +FREQ = 44100 +BITSIZE = -16 +CHANNELS = 2 +BUFFER = 1024 +DEFAULT_VOLUME = 1.0 + +NO_SOUND = os.environ.get("TABAK_NO_SOUND", "").lower() in ("1", "y", "yes") + +# Color constants +COLOURS = { + "red": (255, 0, 0), + "green": (0, 255, 0), + "blue": (0, 0, 255), + "cyan": (0, 255, 255), + "yellow": (255, 255, 0), + "magenta": (255, 0, 255), + "white": (255, 255, 255), +}