mirror of https://github.com/zeldaret/botw.git
tools: Fix imports
This commit is contained in:
parent
a2697e9631
commit
c7d58ae78b
|
@ -1,8 +1,8 @@
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from util import utils
|
from common.util import utils
|
||||||
from util.graph import Graph
|
from common.util.graph import Graph
|
||||||
|
|
||||||
BaseClasses = {
|
BaseClasses = {
|
||||||
0x71024d8d68,
|
0x71024d8d68,
|
|
@ -7,7 +7,8 @@ from typing import List, Dict, Iterable, Optional, Set
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import textwrap
|
import textwrap
|
||||||
from util import ai_common, elf
|
import ai_common
|
||||||
|
from common.util import elf
|
||||||
|
|
||||||
|
|
||||||
def get_member_name(entry) -> str:
|
def get_member_name(entry) -> str:
|
||||||
|
|
|
@ -7,7 +7,8 @@ from typing import List, Dict, Iterable, Optional, Set
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import textwrap
|
import textwrap
|
||||||
from util import ai_common, elf
|
import ai_common
|
||||||
|
from common.util import elf
|
||||||
|
|
||||||
|
|
||||||
def get_member_name(entry) -> str:
|
def get_member_name(entry) -> str:
|
||||||
|
|
|
@ -8,12 +8,13 @@ import cxxfilt
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Iterable
|
from typing import Dict, Iterable
|
||||||
|
|
||||||
import util.checker
|
import common.util.checker
|
||||||
import util.elf
|
import common.util.elf
|
||||||
from util import utils, ai_common
|
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:
|
new_matches: Dict[int, str], class_names: Iterable[str], get_pairs) -> None:
|
||||||
for name in class_names:
|
for name in class_names:
|
||||||
orig_name = name
|
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:
|
if orig_fn_info.status != utils.FunctionStatus.NotDecompiled:
|
||||||
continue
|
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:
|
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:
|
except KeyError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ def main() -> None:
|
||||||
type_: str = args.type
|
type_: str = args.type
|
||||||
|
|
||||||
new_matches: Dict[int, str] = dict()
|
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()}
|
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"))
|
aidef = oead.byml.from_text(Path(args.aidef).read_text(encoding="utf-8"))
|
||||||
|
|
|
@ -5,7 +5,7 @@ from typing import Dict, Optional
|
||||||
import yaml
|
import yaml
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
|
|
||||||
from util import utils
|
from common.util import utils
|
||||||
|
|
||||||
# TODO: add behaviors after they have been generated
|
# TODO: add behaviors after they have been generated
|
||||||
_TYPES = ("action", "ai", "query")
|
_TYPES = ("action", "ai", "query")
|
||||||
|
|
|
@ -5,9 +5,9 @@ from typing import Union
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from util import ai_common
|
import ai_common
|
||||||
from util.ai_common import BaseClasses
|
from ai_common import BaseClasses
|
||||||
from util.graph import Graph
|
from common.util.graph import Graph
|
||||||
|
|
||||||
_known_vtables = {
|
_known_vtables = {
|
||||||
0x71024d8d68: "ActionBase",
|
0x71024d8d68: "ActionBase",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c7ad8e6b7d321a41cdc7004f3547e76a1d8dc79b
|
Subproject commit e4774884e39e1a901f993f06e841caa391e407f7
|
|
@ -1,10 +1,11 @@
|
||||||
import struct
|
import struct
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from util import utils, ai_common
|
from common.util import utils
|
||||||
|
import ai_common
|
||||||
import idaapi
|
import idaapi
|
||||||
|
|
||||||
from util.ai_common import BaseClasses
|
from ai_common import BaseClasses
|
||||||
|
|
||||||
_vtable_fn_names = [
|
_vtable_fn_names = [
|
||||||
"_ZNK5uking6action{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
"_ZNK5uking6action{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import struct
|
import struct
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from util import utils, ai_common
|
from common.util import utils
|
||||||
|
import ai_common
|
||||||
import idaapi
|
import idaapi
|
||||||
|
|
||||||
from util.ai_common import BaseClasses
|
from ai_common import BaseClasses
|
||||||
|
|
||||||
_vtable_fn_names = [
|
_vtable_fn_names = [
|
||||||
"_ZNK5uking2ai{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
"_ZNK5uking2ai{}27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE",
|
||||||
|
|
Loading…
Reference in New Issue