X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=tabakrolletjie%2Fconstants.py;h=66150336c4e0120bcadf741ac5a8c154e132c77c;hb=b1cbbc6a48f68e43b72293ef0d6d24450ce40c7e;hp=d5aebb68043ae3d73a18ac2e35371b540c3c0cae;hpb=0210328efd8d57ae06719e540ad9384331b950e0;p=tabakrolletjie.git diff --git a/tabakrolletjie/constants.py b/tabakrolletjie/constants.py index d5aebb6..6615033 100644 --- a/tabakrolletjie/constants.py +++ b/tabakrolletjie/constants.py @@ -1,8 +1,16 @@ """ Game constants. """ +import os + 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) @@ -12,3 +20,21 @@ FPS = 60 # 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")