コード例 #1
0
ファイル: path.py プロジェクト: Patrickt553/Roguelike.py
def _pycall_path_swap_src_dest(x1: int, y1: int, x2: int, y2: int,
                               handle: Any) -> float:
    """A TDL function dest comes first to match up with a dest only call."""
    return ffi.from_handle(handle)(x2, y2, x1, y1)  # type: ignore
コード例 #2
0
ファイル: path.py プロジェクト: Patrickt553/Roguelike.py
def _pycall_path_dest_only(x1: int, y1: int, x2: int, y2: int,
                           handle: Any) -> float:
    """A TDL function which samples the dest coordinate only."""
    return ffi.from_handle(handle)(x2, y2)  # type: ignore
コード例 #3
0
ファイル: path.py プロジェクト: Patrickt553/Roguelike.py
def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float:
    """libtcodpy style callback, needs to preserve the old userData issue."""
    func, userData = ffi.from_handle(handle)
    return func(x1, y1, x2, y2, userData)  # type: ignore
コード例 #4
0
ファイル: path.py プロジェクト: Patrickt553/Roguelike.py
def _pycall_path_simple(x1: int, y1: int, x2: int, y2: int,
                        handle: Any) -> float:
    """Does less and should run faster, just calls the handle function."""
    return ffi.from_handle(handle)(x1, y1, x2, y2)  # type: ignore
コード例 #5
0
ファイル: path.py プロジェクト: quuxtastic/python-tcod
def _pycall_path_swap_src_dest(x1, y1, x2, y2, handle):
    # type: (int, int, int, int, cffi.CData]) -> float
    """A TDL function dest comes first to match up with a dest only call."""
    return ffi.from_handle(handle)(x2, y2, x1, y1)
コード例 #6
0
ファイル: path.py プロジェクト: quuxtastic/python-tcod
def _pycall_path_dest_only(x1, y1, x2, y2, handle):
    # type: (int, int, int, int, cffi.CData]) -> float
    """A TDL function which samples the dest coordinate only."""
    return ffi.from_handle(handle)(x2, y2)
コード例 #7
0
ファイル: path.py プロジェクト: quuxtastic/python-tcod
def _pycall_path_simple(x1, y1, x2, y2, handle):
    # type: (int, int, int, int, cffi.CData]) -> float
    """Does less and should run faster, just calls the handle function."""
    return ffi.from_handle(handle)(x1, y1, x2, y2)
コード例 #8
0
ファイル: path.py プロジェクト: quuxtastic/python-tcod
def _pycall_path_old(x1, y1, x2, y2, handle):
    # type: (int, int, int, int, cffi.CData]) -> float
    """libtcodpy style callback, needs to preserve the old userData issue."""
    func, userData = ffi.from_handle(handle)
    return func(x1, y1, x2, y2, userData)
コード例 #9
0
ファイル: path.py プロジェクト: gaso11/DungeonGenerator
def _pycall_path_dest_only(x1, y1, x2, y2, handle):
    """A TDL function which samples the dest coordinate only."""
    return ffi.from_handle(handle)(x2, y2)
コード例 #10
0
ファイル: path.py プロジェクト: gaso11/DungeonGenerator
def _pycall_path_swap_src_dest(x1, y1, x2, y2, handle):
    """A TDL function dest comes first to match up with a dest only call."""
    return ffi.from_handle(handle)(x2, y2, x1, y1)
コード例 #11
0
ファイル: path.py プロジェクト: gaso11/DungeonGenerator
def _pycall_path_simple(x1, y1, x2, y2, handle):
    """Does less and should run faster, just calls the handle function."""
    return ffi.from_handle(handle)(x1, y1, x2, y2)