Mercurial > mamba
changeset 62:40be38f4427c
Bug squashing.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sun, 11 Sep 2011 16:40:44 +0200 |
parents | fc4b7db1d832 |
children | 07f18421f121 |
files | mamba/constants.py mamba/engine.py mamba/habitats/level.py |
diffstat | 3 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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)
--- 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())