summaryrefslogtreecommitdiff
path: root/tools/libdol2asm/data/function/base.py
diff options
context:
space:
mode:
authorJulgodis <>2021-04-10 07:02:38 +0200
committerJulgodis <>2021-04-10 07:02:38 +0200
commit0ad6ebe7b499ad3efffad93e2e7eb1033bcb6598 (patch)
treea40631b0654c4d310ebff2360e2a4ef32437a2b5 /tools/libdol2asm/data/function/base.py
parent2661db6aaa98a5bbd17691cb438ef64752dbcdf4 (diff)
moved strings + decompile simple store functions
Diffstat (limited to 'tools/libdol2asm/data/function/base.py')
-rw-r--r--tools/libdol2asm/data/function/base.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/libdol2asm/data/function/base.py b/tools/libdol2asm/data/function/base.py
index 0eda461881..9985e0966e 100644
--- a/tools/libdol2asm/data/function/base.py
+++ b/tools/libdol2asm/data/function/base.py
@@ -132,12 +132,19 @@ class Function(Symbol):
for line in lines:
await builder.write(line)
- arg_type = ""
+ arg_type = []
if forward:
- arg_type = ", ".join([x.type(specialize_templates=True) for x in self.argument_types])
+ arg_type = [x.type(specialize_templates=True) for x in self.argument_types]
else:
- arg_type = ", ".join([x.decl(f"param_{i}",specialize_templates=True) for i, x in zip(
- range(len(self.argument_types)), self.argument_types)])
+ arg_type = [
+ x.decl(f"param_{i}",specialize_templates=True)
+ for i, x in enumerate(self.argument_types)
+ ]
+
+ if self.demangled_name and self.demangled_name.require_specialization:
+ arg_type = [f"void* _this", *arg_type]
+
+ arg_type = ", ".join(arg_type)
if self._section == ".init":
await builder.write_nonewline(f"SECTION_INIT ")