Mercurial > boomslang
annotate gamelib/main.py @ 93:350ce4ebe122
Detail view without any functionality.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 00:43:32 +0200 |
parents | d449c4674da8 |
children | 322cbc0a8cce |
rev | line source |
---|---|
0
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
1 '''Game main module. |
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
2 |
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
3 Contains the entry point used by the run_game.py script. |
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
4 |
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
5 ''' |
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
6 |
17 | 7 import pygame |
37 | 8 from pygame.locals import SWSURFACE |
17 | 9 from albow.dialogs import alert |
10 from albow.shell import Shell | |
26
0a68d137f509
Initial inventory palette thing.
Jeremy Thurgood <firxen@gmail.com>
parents:
25
diff
changeset
|
11 |
17 | 12 from menu import MenuScreen |
24
9d5de13e2ac3
Add a game screen. So far, the game content looks a *lot* like the main menu.
Jeremy Thurgood <firxen@gmail.com>
parents:
20
diff
changeset
|
13 from gamescreen import GameScreen |
20 | 14 from constants import SCREEN |
17 | 15 |
16 class MainShell(Shell): | |
17 def __init__(self, display): | |
18 Shell.__init__(self, display) | |
19 self.menu_screen = MenuScreen(self) | |
24
9d5de13e2ac3
Add a game screen. So far, the game content looks a *lot* like the main menu.
Jeremy Thurgood <firxen@gmail.com>
parents:
20
diff
changeset
|
20 self.game_screen = GameScreen(self) |
17 | 21 self.show_screen(self.menu_screen) |
22 | |
0
f2c3b516741b
Theme is 'Caught'. Start with Skellington 1.9.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
23 def main(): |
25
f9e697e0c6ba
Don't initialise the entire pygame
Stefano Rivera <stefano@rivera.za.net>
parents:
24
diff
changeset
|
24 pygame.display.init() |
f9e697e0c6ba
Don't initialise the entire pygame
Stefano Rivera <stefano@rivera.za.net>
parents:
24
diff
changeset
|
25 pygame.font.init() |
37 | 26 display = pygame.display.set_mode(SCREEN, SWSURFACE) |
17 | 27 shell = MainShell(display) |
28 shell.run() | |
29 |