comparison eosd @ 370:74471afbac37

Add a programmable pipeline renderer, and a --fixed-pipeline switch to use the old one.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 27 Jul 2012 18:43:48 +0200
parents cb1460b9b6cf
children 704bea2e4360
comparison
equal deleted inserted replaced
369:f305cdd6f6c5 370:74471afbac37
59 self.bullets = [bullet for bullet in self.bullets if bullet.frame > 1] 59 self.bullets = [bullet for bullet in self.bullets if bullet.frame > 1]
60 EoSDGame.cleanup(self) 60 EoSDGame.cleanup(self)
61 61
62 62
63 63
64 def main(path, data, stage_num, rank, character, replay, boss_rush, fps_limit, single_buffer, debug): 64 def main(path, data, stage_num, rank, character, replay, boss_rush, fps_limit, single_buffer, debug, fixed_pipeline):
65 resource_loader = Loader(path) 65 resource_loader = Loader(path)
66 66
67 try: 67 try:
68 resource_loader.scan_archives(data) 68 resource_loader.scan_archives(data)
69 except IOError: 69 except IOError:
92 default_power = [0, 64, 128, 128, 128, 128, 0][stage_num - 1] 92 default_power = [0, 64, 128, 128, 128, 128, 0][stage_num - 1]
93 states = [PlayerState(character=character, power=default_power)] 93 states = [PlayerState(character=character, power=default_power)]
94 94
95 game_class = EoSDGameBossRush if boss_rush else EoSDGame 95 game_class = EoSDGameBossRush if boss_rush else EoSDGame
96 96
97 runner = GameRunner(resource_loader, fps_limit=fps_limit, double_buffer=(not single_buffer)) 97 runner = GameRunner(resource_loader, fps_limit=fps_limit, double_buffer=(not single_buffer), fixed_pipeline=fixed_pipeline)
98 while True: 98 while True:
99 if replay: 99 if replay:
100 level = replay.levels[stage_num - 1] 100 level = replay.levels[stage_num - 1]
101 if not level: 101 if not level:
102 raise Exception 102 raise Exception
158 parser.add_argument('--replay', metavar='REPLAY', help='Select a replay') 158 parser.add_argument('--replay', metavar='REPLAY', help='Select a replay')
159 parser.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses') 159 parser.add_argument('-b', '--boss-rush', action='store_true', help='Fight only bosses')
160 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering') 160 parser.add_argument('--single-buffer', action='store_true', help='Disable double buffering')
161 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit') 161 parser.add_argument('--fps-limit', metavar='FPS', default=60, type=int, help='Set fps limit')
162 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.') 162 parser.add_argument('--debug', action='store_true', help='Set unlimited continues, and perhaps other debug features.')
163 parser.add_argument('--fixed-pipeline', action='store_true', help='Use the fixed pipeline instead of the new programmable one.')
163 164
164 args = parser.parse_args() 165 args = parser.parse_args()
165 166
166 main(args.path, tuple(args.data), args.stage, args.rank, args.character, 167 main(args.path, tuple(args.data), args.stage, args.rank, args.character,
167 args.replay, args.boss_rush, args.fps_limit, args.single_buffer, 168 args.replay, args.boss_rush, args.fps_limit, args.single_buffer,
168 args.debug) 169 args.debug, args.fixed_pipeline)