# HG changeset patch # User Simon Cross # Date 1315752044 -7200 # Node ID 40be38f4427cc7d084911b3bba6d52bb8b8ee734 # Parent fc4b7db1d8327a59a1abd3c252c7fcb5585dea0d Bug squashing. diff -r fc4b7db1d832 -r 40be38f4427c mamba/constants.py --- a/mamba/constants.py Sun Sep 11 16:35:02 2011 +0200 +++ b/mamba/constants.py Sun Sep 11 16:40:44 2011 +0200 @@ -1,10 +1,11 @@ -# Useful constants, as usual +from pygame.locals import K_ESCAPE, K_q +# Display constants SCREEN = (800, 600) +EDIT_SCREEN = (1000, 600) TILE_SIZE = (20, 20) -EDIT_SCREEN = (1000, 600) - +# Miscellaneous constants NAME = "Unamed Mamba game" # Sound constants @@ -13,6 +14,10 @@ CHANNELS = 2 # 1 == mono, 2 == stereo BUFFER = 1024 # audio buffer size in no. of samples +# Keyboard constants +ESCAPE_KEYS = (K_ESCAPE, K_q) + +# Default command-line options DEFAULTS = { 'debug': False, 'sound': True, diff -r fc4b7db1d832 -r 40be38f4427c mamba/engine.py --- a/mamba/engine.py Sun Sep 11 16:35:02 2011 +0200 +++ b/mamba/engine.py Sun Sep 11 16:40:44 2011 +0200 @@ -81,4 +81,4 @@ @classmethod def post(cls, habitat): - super(NewHabitatEvent, cls).post(habitat) + super(NewHabitatEvent, cls).post(habitat=habitat) diff -r fc4b7db1d832 -r 40be38f4427c mamba/habitats/level.py --- a/mamba/habitats/level.py Sun Sep 11 16:35:02 2011 +0200 +++ b/mamba/habitats/level.py Sun Sep 11 16:40:44 2011 +0200 @@ -18,5 +18,5 @@ def keydown_event(self, ev, widget): if ev.key in ESCAPE_KEYS: - from mamba.habitat.mainmenu import MainMenu + from mamba.habitats.mainmenu import MainMenu NewHabitatEvent.post(MainMenu())