summaryrefslogtreecommitdiff
path: root/tools/regconvert.py
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-03-09 01:53:38 -0300
committerGitHub <noreply@github.com>2023-03-08 23:53:38 -0500
commit496b4928ea8bdf310949a88bbe221d91c2d3ebff (patch)
tree8f343d0cdca849fa49dac2f269867a74af915a3b /tools/regconvert.py
parent2f1e7b3de8695c8f093c18ee6fe2e9e5c4c9e15a (diff)
Rename `GameInfo` to `RegEditor` (#1178)
* Rename RegEditor and move it to regs.h * bring over some minor doc from oot * add missing include * Update tools/disasm/variables.txt Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * update comment * bss --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'tools/regconvert.py')
-rwxr-xr-xtools/regconvert.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/regconvert.py b/tools/regconvert.py
index f4b9b0db1..892e3f885 100755
--- a/tools/regconvert.py
+++ b/tools/regconvert.py
@@ -28,7 +28,7 @@ def read_file(filename):
file_contents = src_file.read()
src_file.close()
- pattern = re.compile("gGameInfo->data\[((0[xX])?[0-9a-fA-F]+)\]")
+ pattern = re.compile("gRegEditor->data\[((0[xX])?[0-9a-fA-F]+)\]")
match = pattern.search(file_contents)
while match:
@@ -56,19 +56,19 @@ def check_valid_offset(offset):
return 0x14 <= offset <= 0x15D2
def main():
- parser = argparse.ArgumentParser(description="Converts a gGameInfo->data index to a REG macro.")
+ parser = argparse.ArgumentParser(description="Converts a gRegEditor->data index to a REG macro.")
# TODO: Add a description and a better title
# index_group = parser.add_argument_group(title="index", description="")
index_group = parser.add_argument_group()
- index_group.add_argument("index", help="index of gGameInfo->data in decimal (or hexadecimal if starts with 0x)")
- index_group.add_argument("--offset", help="treat index argument as an offset to gGameInfo instead", action="store_true")
+ index_group.add_argument("index", help="index of gRegEditor->data in decimal (or hexadecimal if starts with 0x)")
+ index_group.add_argument("--offset", help="treat index argument as an offset to gRegEditor instead", action="store_true")
index_group.add_argument("--hex", help="treat index argument as hexadecimal, even without the 0x", action="store_true")
# TODO: Add a description and a better title
# file_group = parser.add_argument_group(title="file", description="")
file_group = parser.add_argument_group()
- file_group.add_argument("--file", help="use the parameter as a filepath, then replace every occurrence of `gGameInfo->data[number]` in that file a REG macro", action="store_true")
+ file_group.add_argument("--file", help="use the parameter as a filepath, then replace every occurrence of `gRegEditor->data[number]` in that file a REG macro", action="store_true")
file_group.add_argument("--stdout", help="print the processed file to stdout instead of overwriting the original", action="store_true")
args = parser.parse_args()