示例#1
0
def main() -> None:
    parser = argparse.ArgumentParser("Print AI class decompilation progress.")
    parser.add_argument("-t", "--type", help="AI class type", choices=_TYPES)
    args = parser.parse_args()

    filter_type: Optional[str] = args.type

    data_path = utils.get_repo_root() / "data"
    for class_type in _TYPES:
        if filter_type is not None and class_type != filter_type:
            continue

        with (data_path / f"status_{class_type}.yml").open() as f:
            fns: Dict[str, dict] = yaml.load(f, Loader=yaml.CSafeLoader)

        for name, info in fns.items():
            status = info["status"]
            if status == "done":
                color = Fore.GREEN
            elif status == "wip":
                color = Fore.YELLOW
            elif status == "pending":
                color = ""
            else:
                assert False, f"unexpected status {status}"
            print(f"{color}{name:<50} {color}{info['status']}{Fore.RESET}")
示例#2
0
def get_ai_vtable_names() -> Dict[int, str]:
    with (utils.get_repo_root() / "data" / "aidef_ai_vtables.yml").open(encoding="utf-8") as f:
        names = yaml.load(f, Loader=yaml.CSafeLoader)

    check_vtable_name_dict(names)
    return names
示例#3
0
def get_ai_params() -> Dict[str, List[dict]]:
    with (utils.get_repo_root() / "data" / "aidef_ai_params.yml").open(encoding="utf-8") as f:
        return yaml.load(f, Loader=yaml.CSafeLoader)
示例#4
0
def get_vtables() -> Dict[str, Dict[str, List[int]]]:
    with (utils.get_repo_root() / "data" / "aidef_vtables.yml").open(encoding="utf-8") as f:
        return yaml.load(f, Loader=yaml.CSafeLoader)