Mercurial > touhou
comparison eclviewer.py @ 131:fab7ad2f0d8b
Use Cython, improve performances!
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 11 Sep 2011 02:02:59 +0200 |
parents | 11ab06f4c4c6 |
children | 2547df120ece |
comparison
equal
deleted
inserted
replaced
130:11ab06f4c4c6 | 131:fab7ad2f0d8b |
---|---|
14 ## | 14 ## |
15 | 15 |
16 import sys | 16 import sys |
17 import os | 17 import os |
18 | 18 |
19 import pyximport | |
20 pyximport.install() | |
21 | |
19 from pytouhou.resource.loader import Loader | 22 from pytouhou.resource.loader import Loader |
20 from pytouhou.game.background import Background | 23 from pytouhou.game.background import Background |
21 from pytouhou.opengl.gamerenderer import GameRenderer | 24 from pytouhou.opengl.gamerunner import GameRunner |
22 from pytouhou.game.games import EoSDGame | 25 from pytouhou.game.games import EoSDGame |
23 from pytouhou.game.player import PlayerState | 26 from pytouhou.game.player import PlayerState |
24 | 27 |
25 | 28 |
26 def main(path, stage_num): | 29 def main(path, stage_num): |
37 | 40 |
38 # Let's go! | 41 # Let's go! |
39 print(stage.name) | 42 print(stage.name) |
40 | 43 |
41 # Main loop | 44 # Main loop |
42 renderer = GameRenderer(resource_loader, game, background) | 45 runner = GameRunner(resource_loader, game, background) |
43 renderer.start() | 46 runner.start() |
44 | 47 |
45 | 48 |
46 try: | 49 try: |
47 file_path, stage_num = sys.argv[1:] | 50 file_path, stage_num = sys.argv[1:] |
48 stage_num = int(stage_num) | 51 stage_num = int(stage_num) |