Mercurial > boomslang
comparison pyntnclick/main.py @ 648:b2c2b6f56291 pyntnclick
baby steps to fixing rect_drawer - it has now progressed to being completely useless
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 12:28:27 +0200 |
parents | 974cc69d3762 |
children | c77d6aa29bee |
comparison
equal
deleted
inserted
replaced
647:96daa4119745 | 648:b2c2b6f56291 |
---|---|
20 from pyntnclick.constants import GameConstants, DEBUG_ENVVAR | 20 from pyntnclick.constants import GameConstants, DEBUG_ENVVAR |
21 from pyntnclick.resources import Resources | 21 from pyntnclick.resources import Resources |
22 from pyntnclick.sound import Sound | 22 from pyntnclick.sound import Sound |
23 from pyntnclick import state | 23 from pyntnclick import state |
24 | 24 |
25 from pyntnclick.tools.rect_drawer import RectApp, make_rect_display | 25 from pyntnclick.tools.rect_drawer import RectEngine, make_rect_display |
26 from pyntnclick.tools.utils import list_scenes | 26 from pyntnclick.tools.utils import list_scenes |
27 | 27 |
28 | 28 |
29 class GameDescriptionError(Exception): | 29 class GameDescriptionError(Exception): |
30 """Raised when an GameDescription is invalid.""" | 30 """Raised when an GameDescription is invalid.""" |
142 print 'Need to supply a scene to use the rect drawer' | 142 print 'Need to supply a scene to use the rect drawer' |
143 sys.exit(1) | 143 sys.exit(1) |
144 display = make_rect_display() | 144 display = make_rect_display() |
145 # FIXME: Remove Albow from here | 145 # FIXME: Remove Albow from here |
146 try: | 146 try: |
147 self.engine = RectApp(display, self.initial_state, opts.scene, | 147 self.engine = RectEngine(self, self.initial_state, opts.scene, |
148 opts.detail) | 148 opts.detail) |
149 except KeyError: | 149 except KeyError: |
150 print 'Invalid scene: %s' % opts.scene | 150 print 'Invalid scene: %s' % opts.scene |
151 sys.exit(1) | 151 sys.exit(1) |
152 else: | 152 else: |