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>
This commit is contained in:
Anghelo Carvajal
2023-03-09 01:53:38 -03:00
committed by GitHub
parent 2f1e7b3de8
commit 496b4928ea
12 changed files with 45 additions and 71 deletions
+1 -1
View File
@@ -1519,7 +1519,7 @@
0x800E9138:("Actor_TrackPlayerSetFocusHeight",),
0x800E9250:("Actor_TrackPlayer",),
0x800E9360:("SaveContext_Init",),
0x800E93E0:("GameInfo_Init",),
0x800E93E0:("Regs_Init",),
0x800E9470:("DebugDisplay_Init",),
0x800E9488:("DebugDisplay_AddObject",),
0x800E9564:("DebugDisplay_DrawObjects",),
+3 -3
View File
@@ -398,7 +398,7 @@
0x801AE2BC:("D_801AE2BC","UNK_TYPE4","",0x4),
0x801AE2CC:("D_801AE2CC","UNK_TYPE4","",0x4),
0x801AE2DC:("D_801AE2DC","UNK_TYPE4","",0x4),
0x801AE2F0:("sEffectShieldParticleVertices","F3DVertex","[4]",0x40),
0x801AE2F0:("sEffShieldParticleVtx","Vtx","[4]",0x40),
0x801AE330:("sEffectInfoTable","EffectInfo","[5]",0x64),
0x801AE3A0:("sEffectSsInfo","EffectSsInfo","",0xc),
0x801AE3B0:("D_801AE3B0","Color_RGBA8","",0x4),
@@ -3924,7 +3924,7 @@
0x801EF670:("gSaveContext","SaveContext","",0x48e8),
0x801F3F58:("D_801F3F58","UNK_TYPE1","",0x1),
0x801F3F5A:("D_801F3F5A","UNK_TYPE1","",0x1),
0x801F3F60:("gGameInfo","GameInfo*","",0x4),
0x801F3F60:("gRegEditor","RegEditor*","",0x4),
0x801F3F70:("sDebugObjectListHead","UNK_TYPE1","",0x1),
0x801F3F80:("D_801F3F80","UNK_TYPE1","",0xDC0),
0x801F4D40:("seqId","u16","",0x2),
@@ -7908,7 +7908,7 @@
0x80920290:("jtbl_80920290","UNK_PTR","",0x4),
0x80920DF0:("gFireArrowTex","u8","[2048]",0x800),
0x809215F0:("gFireArrowMaskTex","u8","[2048]",0x800),
0x80921DF0:("gFireArrowVtx","F3DVertex","[43]",0x2b0),
0x80921DF0:("gFireArrowVtx","Vtx","[43]",0x2b0),
0x809220A0:("gIceArrowMaterialDL","Gfx","[22]",0xb0),
0x80922150:("gIceArrowModelDL","Gfx","[24]",0xc0),
0x80922210:("Arrow_Fire_InitVars","ActorInit","",0x20),
+5 -5
View File
@@ -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()
+1 -1
View File
@@ -1033,7 +1033,7 @@ asm/non_matchings/code/code_800E8EA0/Actor_TrackPoint.s,Actor_TrackPoint,0x800E8
asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayerSetFocusHeight.s,Actor_TrackPlayerSetFocusHeight,0x800E9138,0x46
asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayer.s,Actor_TrackPlayer,0x800E9250,0x44
asm/non_matchings/code/z_common_data/func_800E9360.s,func_800E9360,0x800E9360,0x20
asm/non_matchings/code/z_debug/GameInfo_Init.s,GameInfo_Init,0x800E93E0,0x24
asm/non_matchings/code/z_debug/Regs_Init.s,Regs_Init,0x800E93E0,0x24
asm/non_matchings/code/z_debug_display/DebugDisplay_Init.s,DebugDisplay_Init,0x800E9470,0x6
asm/non_matchings/code/z_debug_display/DebugDisplay_AddObject.s,DebugDisplay_AddObject,0x800E9488,0x37
asm/non_matchings/code/z_debug_display/DebugDisplay_DrawObjects.s,DebugDisplay_DrawObjects,0x800E9564,0x24
1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
1033 asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayerSetFocusHeight.s Actor_TrackPlayerSetFocusHeight 0x800E9138 0x46
1034 asm/non_matchings/code/code_800E8EA0/Actor_TrackPlayer.s Actor_TrackPlayer 0x800E9250 0x44
1035 asm/non_matchings/code/z_common_data/func_800E9360.s func_800E9360 0x800E9360 0x20
1036 asm/non_matchings/code/z_debug/GameInfo_Init.s asm/non_matchings/code/z_debug/Regs_Init.s GameInfo_Init Regs_Init 0x800E93E0 0x24
1037 asm/non_matchings/code/z_debug_display/DebugDisplay_Init.s DebugDisplay_Init 0x800E9470 0x6
1038 asm/non_matchings/code/z_debug_display/DebugDisplay_AddObject.s DebugDisplay_AddObject 0x800E9488 0x37
1039 asm/non_matchings/code/z_debug_display/DebugDisplay_DrawObjects.s DebugDisplay_DrawObjects 0x800E9564 0x24