mirror of
https://github.com/zeldaret/botw
synced 2026-05-22 22:44:18 -04:00
tools: Fix imports
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from typing import Dict, List
|
||||
import yaml
|
||||
|
||||
from util import utils
|
||||
from util.graph import Graph
|
||||
from common.util import utils
|
||||
from common.util.graph import Graph
|
||||
|
||||
BaseClasses = {
|
||||
0x71024d8d68,
|
||||
@@ -7,7 +7,8 @@ from typing import List, Dict, Iterable, Optional, Set
|
||||
|
||||
from pathlib import Path
|
||||
import textwrap
|
||||
from util import ai_common, elf
|
||||
import ai_common
|
||||
from common.util import elf
|
||||
|
||||
|
||||
def get_member_name(entry) -> str:
|
||||
|
||||
@@ -7,7 +7,8 @@ from typing import List, Dict, Iterable, Optional, Set
|
||||
|
||||
from pathlib import Path
|
||||
import textwrap
|
||||
from util import ai_common, elf
|
||||
import ai_common
|
||||
from common.util import elf
|
||||
|
||||
|
||||
def get_member_name(entry) -> str:
|
||||
|
||||
@@ -8,12 +8,13 @@ import cxxfilt
|
||||
from pathlib import Path
|
||||
from typing import Dict, Iterable
|
||||
|
||||
import util.checker
|
||||
import util.elf
|
||||
from util import utils, ai_common
|
||||
import common.util.checker
|
||||
import common.util.elf
|
||||
from common.util import utils
|
||||
import ai_common
|
||||
|
||||
|
||||
def identify(functions: Dict[str, utils.FunctionInfo], checker: util.checker.FunctionChecker,
|
||||
def identify(functions: Dict[str, utils.FunctionInfo], checker: common.util.checker.FunctionChecker,
|
||||
new_matches: Dict[int, str], class_names: Iterable[str], get_pairs) -> None:
|
||||
for name in class_names:
|
||||
orig_name = name
|
||||
@@ -27,9 +28,9 @@ def identify(functions: Dict[str, utils.FunctionInfo], checker: util.checker.Fun
|
||||
if orig_fn_info.status != utils.FunctionStatus.NotDecompiled:
|
||||
continue
|
||||
|
||||
orig_fn = util.elf.get_fn_from_base_elf(orig_fn_info.addr, orig_fn_info.size)
|
||||
orig_fn = common.util.elf.get_fn_from_base_elf(orig_fn_info.addr, orig_fn_info.size)
|
||||
try:
|
||||
decomp_fn = util.elf.get_fn_from_my_elf(fn_name)
|
||||
decomp_fn = common.util.elf.get_fn_from_my_elf(fn_name)
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
@@ -47,7 +48,7 @@ def main() -> None:
|
||||
type_: str = args.type
|
||||
|
||||
new_matches: Dict[int, str] = dict()
|
||||
checker = util.checker.FunctionChecker()
|
||||
checker = common.util.checker.FunctionChecker()
|
||||
functions: Dict[str, utils.FunctionInfo] = {fn.name: fn for fn in utils.get_functions()}
|
||||
|
||||
aidef = oead.byml.from_text(Path(args.aidef).read_text(encoding="utf-8"))
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import Dict, Optional
|
||||
import yaml
|
||||
from colorama import Fore
|
||||
|
||||
from util import utils
|
||||
from common.util import utils
|
||||
|
||||
# TODO: add behaviors after they have been generated
|
||||
_TYPES = ("action", "ai", "query")
|
||||
|
||||
@@ -5,9 +5,9 @@ from typing import Union
|
||||
|
||||
import yaml
|
||||
|
||||
from util import ai_common
|
||||
from util.ai_common import BaseClasses
|
||||
from util.graph import Graph
|
||||
import ai_common
|
||||
from ai_common import BaseClasses
|
||||
from common.util.graph import Graph
|
||||
|
||||
_known_vtables = {
|
||||
0x71024d8d68: "ActionBase",
|
||||
|
||||
+1
-1
Submodule tools/common updated: c7ad8e6b7d...e4774884e3
@@ -1,10 +1,11 @@
|
||||
import struct
|
||||
from typing import Dict
|
||||
|
||||
from util import utils, ai_common
|
||||
from common.util import utils
|
||||
import ai_common
|
||||
import idaapi
|
||||
|
||||
from util.ai_common import BaseClasses
|
||||
from ai_common import BaseClasses
|
||||
|
||||
_vtable_fn_names = [
|
||||
"_ZNK5uking6action{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import struct
|
||||
from typing import Dict
|
||||
|
||||
from util import utils, ai_common
|
||||
from common.util import utils
|
||||
import ai_common
|
||||
import idaapi
|
||||
|
||||
from util.ai_common import BaseClasses
|
||||
from ai_common import BaseClasses
|
||||
|
||||
_vtable_fn_names = [
|
||||
"_ZNK5uking2ai{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
||||
|
||||
Reference in New Issue
Block a user