Mercurial > boomslang
comparison pyntnclick/main.py @ 570:9c3528c2cbe5 pyntnclick
Bug fixes for sound hook-up.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Sat, 11 Feb 2012 15:48:06 +0200 |
parents | 0587f11ff435 |
children | 1b1ab71535bd |
comparison
equal
deleted
inserted
replaced
569:0587f11ff435 | 570:9c3528c2cbe5 |
---|---|
21 from pyntnclick.endscreen import EndScreen | 21 from pyntnclick.endscreen import EndScreen |
22 from pyntnclick.constants import ( | 22 from pyntnclick.constants import ( |
23 SCREEN, FRAME_RATE, DEBUG) | 23 SCREEN, FRAME_RATE, DEBUG) |
24 from pyntnclick.resources import Resources | 24 from pyntnclick.resources import Resources |
25 from pyntnclick.sound import Sound | 25 from pyntnclick.sound import Sound |
26 from pyntnclick import state, data | 26 from pyntnclick import state |
27 | 27 |
28 | 28 |
29 class MainShell(Shell): | 29 class MainShell(Shell): |
30 def __init__(self, display, initial_state): | 30 def __init__(self, display, initial_state): |
31 Shell.__init__(self, display) | 31 Shell.__init__(self, display) |
99 # debug the specified scene | 99 # debug the specified scene |
100 self._initial_scene = opts.scene | 100 self._initial_scene = opts.scene |
101 self._debug_rects = opts.rects | 101 self._debug_rects = opts.rects |
102 display = pygame.display.set_mode(SCREEN, SWSURFACE) | 102 display = pygame.display.set_mode(SCREEN, SWSURFACE) |
103 pygame.display.set_icon(pygame.image.load( | 103 pygame.display.set_icon(pygame.image.load( |
104 data.filepath('icons/suspended_sentence24x24.png'))) | 104 self.resource.get_resource_path('icons/suspended_sentence24x24' |
105 '.png'))) | |
105 pygame.display.set_caption("Suspended Sentence") | 106 pygame.display.set_caption("Suspended Sentence") |
106 shell = MainShell(display, self.initial_state) | 107 shell = MainShell(display, self.initial_state) |
107 try: | 108 try: |
108 shell.run() | 109 shell.run() |
109 except KeyboardInterrupt: | 110 except KeyboardInterrupt: |