Coverage for lutris.runners.scummvm : 65%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding:Utf-8 -*- ############################################################################### ## Lutris ## ## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ###############################################################################
# pylint: disable=C0103 """Runs LucasArts games based on the Scumm engine""" { 'option': 'game_id', 'type': 'string', 'label': "Game identifier" }, { 'option': 'path', 'type': 'directory_chooser', 'label': "Path for the game" } ] ("2x", "2x"), ("3x", "3x"), ("2xsai", "2xsai"), ("advmame2x", "advmame2x"), ("advmame3x", "advmame3x"), ("dotmatrix", "dotmatrix"), ("hq2x", "hq2x"), ("hq3x", "hq3x"), ("normal", "normal"), ("super2xsai", "super2xsai"), ("supereagle", "supereagle"), ("tv2x", "tv2x") ] { "option": "windowed", "label": "Windowed", "type": "bool" }, { "option": "gfx-mode", "label": "Graphics scaler", "type": "one_choice", "choices": scaler_modes } ]
scummvm_path = os.path.join(settings.DATA_DIR, 'runners/scummvm/scummvm') if not os.path.exists(scummvm_path): else:
"""Run ScummVM game""" if "scummvm" in self.settings.config: if "windowed" in config["scummvm"]: gfxmode = "--gfx-mode=%s" % mode
self.get_executable(), "--path=\"%s\"" % self.settings['game']['path'], fullscreen, gfxmode, game ]}
lib_dir = os.path.join(settings.DATA_DIR, 'runners/scummvm/lib') launch_info['ld_library_path'] = lib_dir
""" Return the entire list of games supported by ScummVM """ ["scummvm", "-z"], stdout=subprocess.PIPE ).communicate()[0] game_list = str.split(scumm_output, "\n") game_array = [] game_list_start = False for game in game_list: if game_list_start: if len(game) > 1: dir_limit = game.index(" ") else: dir_limit = None if dir_limit is not None: game_dir = game[0:dir_limit] game_name = game[dir_limit + 1:len(game)].strip() game_array.append([game_dir, game_name]) # The actual list is below a separator if game.startswith("-----"): game_list_start = True return game_array |