Subrepos update (#1208)

* git subrepo pull tools/asm-differ --force

subrepo:
  subdir:   "tools/asm-differ"
  merged:   "ae408664a"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "ae408664a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull (merge) tools/fado --force

subrepo:
  subdir:   "tools/fado"
  merged:   "8d896ee97"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "8d896ee97"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/graphovl --force

subrepo:
  subdir:   "tools/graphovl"
  merged:   "dab4addae"
upstream:
  origin:   "https://github.com/AngheloAlf/graphovl.git"
  branch:   "master"
  commit:   "dab4addae"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/z64compress --force

subrepo:
  subdir:   "tools/z64compress"
  merged:   "43035d97f"
upstream:
  origin:   "https://github.com/z64me/z64compress.git"
  branch:   "main"
  commit:   "43035d97f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/ZAPD --force

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "23929ec93"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "23929ec93"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Revert "git subrepo pull tools/z64compress --force"

This reverts commit 2e487b5008.
This commit is contained in:
Anghelo Carvajal 2023-03-14 20:51:47 -03:00 committed by GitHub
parent c833969ea7
commit 0c3a48ef94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 822 additions and 265 deletions

View File

@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/zeldaret/ZAPD.git
branch = master
commit = 5786abbdd2d0fd14907e03575a0bd972c1fe9b28
parent = e451a103ba5d14af3dd14acfa54a6b4999fd951f
commit = 23929ec9373d28cb298daad4ad7cb468e09c0a46
parent = 2e487b5008c129031ab311a3a7bfd42adeb4916b
method = merge
cmdver = 0.4.5
cmdver = 0.4.3

View File

@ -569,6 +569,7 @@ void ZTextureAnimation::DeclareReferences(const std::string& prefix)
count = 2;
}
params = new TextureScrollingParams(parent);
params->type = entry.type;
params->ExtractFromBinary(paramsOffset, count);
break;
@ -582,6 +583,7 @@ void ZTextureAnimation::DeclareReferences(const std::string& prefix)
case TextureAnimationParamsType::TextureCycle:
params = new TextureCyclingParams(parent);
params->type = entry.type;
params->ExtractFromBinary(paramsOffset);
break;

View File

@ -1,2 +1,4 @@
.mypy_cache/
__pycache__/
.vscode/
poetry.lock

View File

@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/simonlindholm/asm-differ
branch = main
commit = 1236288d1520335c2bfb672078fec65084d7cb5c
parent = 2c5690701a350c7e7c3d6252dff925ad65d59910
commit = ae408664a89ea4dc70d005d0afc69ac26c938cbb
parent = c833969ea79ba31c3103e25e94ef88098c0287de
method = merge
cmdver = 0.4.3

View File

@ -1,5 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black

View File

@ -7,7 +7,7 @@ Nice differ for assembly code. Currently supports MIPS, PPC, AArch64, and ARM32;
## Dependencies
- Python >= 3.6
- `python3 -m pip install --user colorama watchdog python-Levenshtein` (also `dataclasses` if on 3.6)
- `python3 -m pip install --user colorama watchdog levenshtein cxxfilt` (also `dataclasses` if on 3.6)
## Usage

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,8 @@ def apply(config, args):
config["source_directories"] = ["."]
# config["show_line_numbers_default"] = True
# config["arch"] = "mips"
# config["map_format"] = "gnu" # gnu or mw
# config["mw_build_dir"] = "build/" # only needed for mw map format
# config["map_format"] = "gnu" # gnu, mw, ms
# config["build_dir"] = "build/" # only needed for mw and ms map format
# config["expected_dir"] = "expected/" # needed for -o
# config["makeflags"] = []
# config["objdump_executable"] = ""

View File

@ -0,0 +1,21 @@
[tool.poetry]
name = "asm-differ"
version = "0.1.0"
description = ""
authors = ["Simon Lindholm <simon.lindholm10@gmail.com>"]
license = "UNLICENSE"
readme = "README.md"
packages = [{ include = "diff.py" }]
[tool.poetry.dependencies]
python = "^3.7"
colorama = "^0.4.6"
ansiwrap = "^0.8.4"
watchdog = "^2.2.0"
levenshtein = "^0.20.9"
cxxfilt = "^0.3.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

View File

@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:EllipticEllipsis/fado.git
branch = master
commit = f7efb10a9a65f27e9ccad7ce270234f20d386ac9
parent = 90cfafec47fe4b73ad9009e9501e147e86025aa6
commit = 8d896ee97d565508755584803c409fc33bb0c953
parent = b51c9f4d22d6e7db63700c163418654431a2a61a
method = merge
cmdver = 0.4.3

View File

@ -112,15 +112,15 @@ bool vc_vector_is_equals(vc_vector* vector1, vc_vector* vector2) {
return memcmp(vector1->data, vector2->data, size_vector1) == 0;
}
float vc_vector_get_growth_factor() {
float vc_vector_get_growth_factor(void) {
return GROWTH_FACTOR;
}
size_t vc_vector_get_default_count_of_elements() {
size_t vc_vector_get_default_count_of_elements(void) {
return DEFAULT_COUNT_OF_ELEMENTS;
}
size_t vc_vector_struct_size() {
size_t vc_vector_struct_size(void) {
return sizeof(vc_vector);
}

View File

@ -24,13 +24,13 @@ void vc_vector_release(vc_vector* vector);
bool vc_vector_is_equals(vc_vector* vector1, vc_vector* vector2);
// Returns constant value of the vector growth factor.
float vc_vector_get_growth_factor();
float vc_vector_get_growth_factor(void);
// Returns constant value of the vector default count of elements.
size_t vc_vector_get_default_count_of_elements();
size_t vc_vector_get_default_count_of_elements(void);
// Returns constant value of the vector struct size.
size_t vc_vector_struct_size();
size_t vc_vector_struct_size(void);
// ----------------------------------------------------------------------------
// Element access

View File

@ -15,7 +15,7 @@
#include "version.inc"
void PrintVersion() {
void PrintVersion(void) {
printf("Fado (Fairy-Assisted relocations for Decompiled Overlays), version %s\n", versionNumber);
printf("Copyright (C) 2021 Elliptic Ellipsis\n");
printf("%s\n", credits);
@ -88,7 +88,7 @@ static size_t posArgCount = ARRAY_COUNT(posArgInfo);
static size_t optCount = ARRAY_COUNT(optInfo);
static struct option longOptions[ARRAY_COUNT(optInfo)];
void ConstructLongOpts() {
void ConstructLongOpts(void) {
size_t i;
for (i = 0; i < optCount; i++) {

View File

@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AngheloAlf/graphovl.git
branch = master
commit = f5fe93d75bb75ea4bea65f62c43f41f6a1e70679
parent = 6c5a50ef95f351acc7c4c0455a347a94443adbe1
commit = dab4addae0c5db6274ab5daf7780c62c346120a1
parent = 5da1ae553569ddb0016d302cfac8c45d9cb22e73
method = merge
cmdver = 0.4.3

View File

@ -18,7 +18,7 @@ except ModuleNotFoundError:
script_dir = os.path.dirname(os.path.realpath(__file__))
config = ConfigParser()
func_names = None
func_names = list()
func_definitions = list()
line_numbers_of_functions = list()
@ -72,6 +72,19 @@ def capture_setupaction_call_arg(content):
transitionList.append(func)
return transitionList
setaction_regexpr = re.compile(r"_SetAction+\([^\)]*\)(\.[^\)]*\))?;")
def capture_setaction_calls(content):
return [x.group() for x in re.finditer(setaction_regexpr, content)]
def capture_setaction_call_arg(content):
transitionList = []
for x in re.finditer(setaction_regexpr, content):
func = x.group().split(",")[2].strip().split(");")[0].strip()
if func not in transitionList:
transitionList.append(func)
return transitionList
# Search for the function definition by supplied function name
def definition_by_name(content, name):
for definition in capture_definitions(content):
@ -206,7 +219,11 @@ def addFunctionTransitionToGraph(dot, index: int, func_name: str, action_transit
fontColor = config.get("colors", "fontcolor")
bubbleColor = config.get("colors", "bubbleColor")
indexStr = str(index)
try:
funcIndex = str(index_of_func(action_transition))
except ValueError:
print(f"Warning: function '{action_transition}' called by '{func_name}' was not found. Skiping...", file=sys.stderr)
return
dot.node(indexStr, func_name, fontcolor=fontColor, color=bubbleColor)
dot.node(funcIndex, action_transition, fontcolor=fontColor, color=bubbleColor)
@ -230,7 +247,7 @@ def addCallNamesToGraph(dot, func_names: list, index: int, code_body: str, remov
if call in removeList:
continue
if setupAction and "_SetupAction" in call:
if setupAction and ("_SetupAction" in call or "_SetAction" in call):
continue
seen.add(call)
@ -342,10 +359,11 @@ def main():
actionIdentifier = "this->actionFunc"
setupAction = func_prefix + "_SetupAction" in func_names
setAction = func_prefix + "_SetAction" in func_names
arrayActorFunc = match_obj is not None
rawActorFunc = actionIdentifier in contents
if not setupAction and not arrayActorFunc and not rawActorFunc:
if not setupAction and not setAction and not arrayActorFunc and not rawActorFunc:
print("No actor action-based structure found")
os._exit(1)
@ -383,6 +401,8 @@ def main():
Create all edges for SetupAction-based actors
"""
transitionList = capture_setupaction_call_arg(code_body)
elif setAction:
transitionList = capture_setaction_call_arg(code_body)
elif arrayActorFunc:
"""
Create all edges for ActorFunc array-based actors