예제 #1
0
def get_core_path(corename):
    return os.path.join(core_path(), retro.data.EMU_CORES[corename])
예제 #2
0
파일: __init__.py 프로젝트: gaofei/retro
def get_core_path(corename):
    return os.path.join(core_path(), EMU_CORES[corename])
예제 #3
0
import os
import retro.data

from enum import Enum
from retro._retro import Movie, RetroEmulator, core_path

ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
core_path(os.path.join(os.path.dirname(__file__), 'cores'))

for path in ('VERSION.txt', '../VERSION'):
    try:
        with open(os.path.join(os.path.dirname(__file__), path)) as f:
            __version__ = f.read()
            break
    except IOError:
        pass

__all__ = [
    'Movie', 'RetroEmulator', 'Actions', 'State', 'get_core_path',
    'get_romfile_system', 'get_system_info', 'make'
]

retro.data.init_core_info(core_path())


class Actions(Enum):
    ALL = 0
    FILTERED = 1
    DISCRETE = 2
    MULTI_DISCRETE = 3
예제 #4
0
파일: __init__.py 프로젝트: gaofei/retro
import glob
import gym
import gzip
import os
import json
import subprocess
import sys

from retro._retro import Movie, RetroEmulator, core_path, data_path as _data_path

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
RETRO_DATA_PATH = os.path.dirname(__file__)
core_path(os.path.join(os.path.dirname(__file__), 'cores'))

for path in ('VERSION.txt', '../VERSION'):
    try:
        with open(os.path.join(os.path.dirname(__file__), path)) as f:
            __version__ = f.read()
            break
    except IOError:
        pass

if sys.platform.startswith('linux'):
    EXT = 'so'
elif sys.platform == 'darwin':
    EXT = 'dylib'
elif sys.platform == 'win32':
    EXT = 'dll'
else:
    raise RuntimeError('Unrecognized platform')