def __init__(self):
info('platform: %s' % platform)
info('exists main.py: %s' % exists('main.py'))
- args = self._parse_args()
+ self._args = args = self._parse_args()
self._configure(args)
self.base = ShowBase()
self._pipeline = None
self._prepare_window(args)
if args.update:
return
- if args.functional_test and int(args.functional_test) == 1:
+ if args.functional_test:
self._options['settings']['volume'] = 0
self._music = MusicMgr(self._options['settings']['volume'])
self.lang_mgr = LangMgr(self._options['settings']['language'],
else:
self._fsm.demand('Menu')
if args.functional_test or args.functional_ref:
- FunctionalTest(args.functional_test, args.functional_ref)
+ FunctionalTest(args.functional_ref)
def on_menu_enter(self):
self._menu_bg = Background()
self._menu = Menu(
self._fsm, self.lang_mgr, self._options, self._music,
- self._pipeline, self.scenes)
+ self._pipeline, self.scenes, self._args.functional_test or self._args.functional_ref)
def on_home(self):
self._fsm.demand('Menu')
load_prc_file_data('', 'framebuffer-srgb true')
load_prc_file_data('', 'sync-video true')
if args.functional_test or args.functional_ref:
- load_prc_file_data('', 'win-size 1280 720')
+ load_prc_file_data('', 'win-size 1360 768')
# otherwise it is not centered in exwm
# load_prc_file_data('', 'threading-model Cull/Draw')
# it freezes when you go to the next scene
parser.add_argument('--version', action='store_true')
parser.add_argument('--optfile')
parser.add_argument('--screenshot')
- parser.add_argument('--functional-test')
+ parser.add_argument('--functional-test', action='store_true')
parser.add_argument('--functional-ref', action='store_true')
cmd_line = [arg for arg in iter(argv[1:]) if not arg.startswith('-psn_')]
args = parser.parse_args(cmd_line)
if res:
res = LVector2i(*[int(_res) for _res in res.split('x')])
else:
- d_i = base.pipe.get_display_information()
- def _res(idx):
- return d_i.get_display_mode_width(idx), \
- d_i.get_display_mode_height(idx)
- resolutions = [
- _res(idx) for idx in range(d_i.get_total_display_modes())]
+ resolutions = []
+ if not self.version:
+ d_i = base.pipe.get_display_information()
+ def _res(idx):
+ return d_i.get_display_mode_width(idx), \
+ d_i.get_display_mode_height(idx)
+ resolutions = [
+ _res(idx) for idx in range(d_i.get_total_display_modes())]
res = sorted(resolutions)[-1]
fullscreen = self._options['settings']['fullscreen']
props = WindowProperties()
return task.cont
taskMgr.add(update_coords, 'update_coords')
-
def _set_physics(self):
if self._options['development']['physics_debug']:
debug_node = BulletDebugNode('Debug')