summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2022-10-15 19:12:01 -0300
committerGitHub <noreply@github.com>2022-10-15 19:12:01 -0300
commitbd373940ac7bb230b4a135a5c5675ca8f42cd700 (patch)
treeefa23eb003ff945fd8ab1d78b8c357dceda3c39c /tools
parent638f5062cbf6e9289f624cbdeee918d35642fb3a (diff)
`z_player_lib`: Part 2 (#938)
* preparations * import data * PLAYER_STATE1 * PLAYER_STATE2 * PLAYER_STATE3 * import bss * format stuff * bss cleanup * more cleaning and some naming * face * cleaning up link human object a bit * Remove PHYSICAL_TO_VIRTUAL2 * Update src/code/z_player_lib.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * review Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * format * /* CAT */ Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> * naming some stuff on objects * format * invert flags endian * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * format * drawmask Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> * naming * another round of human object naming * enum renames * sActionModelGroups and use enum as types * PlayerAnimType * PLAYER_MODELTYPE_ * determined ranges of PlayerModelType * name PLAYER_MODELGROUP_DEFAULT * format * sheath * dlist groups placeholder namse * PLAYER_MODELGROUP_BOTTLE * Some fierce deity naming * Right hands * zora skel dlists * deku limb dlists * left hands * name most modelgroups * more hand naming * regs as dec * fix in horse * Use BUTTON_ITEM_EQUIP macro * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * reformat D_801AED58 * Sword sheaths * swords and shields * Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * playerForm on Player_DrawImpl * fomat * Update src/code/z_player_lib.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update assets/xml/objects/gameplay_keep.xml Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * VIRTUAL_TO_PHYSICAL(SEGMENTED_TO_VIRTUAL(gEffBubble1Tex)) Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * singular limb enum names * fix bss * Update src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * name goron shielding limbs * name limb * Update src/code/z_player_lib.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * bss * bss * format * namefixer * bss * bss * bss * bss * format * bss * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * fix bss Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Isghj <42048411+isghj5@users.noreply.github.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/disasm/functions.txt14
-rw-r--r--tools/disasm/variables.txt68
-rwxr-xr-xtools/namefixer.py15
-rw-r--r--tools/sizes/code_functions.csv14
4 files changed, 56 insertions, 55 deletions
diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt
index b199ada05..8e074c509 100644
--- a/tools/disasm/functions.txt
+++ b/tools/disasm/functions.txt
@@ -2202,7 +2202,7 @@
0x8012364C:("func_8012364C",),
0x80123810:("func_80123810",),
0x80123960:("Player_ActionToModelGroup",),
- 0x801239AC:("func_801239AC",),
+ 0x801239AC:("Player_SetModelsForHoldingShield",),
0x80123AA4:("Player_SetModels",),
0x80123BD4:("Player_SetModelGroup",),
0x80123C58:("func_80123C58",),
@@ -2230,12 +2230,12 @@
0x8012420C:("Player_GetBottleHeld",),
0x8012422C:("Player_ActionToExplosive",),
0x80124258:("Player_GetExplosiveHeld",),
- 0x80124278:("func_80124278",),
+ 0x80124278:("Player_ActionToSword",),
0x801242B4:("func_801242B4",),
0x801242DC:("Player_GetEnvTimerType",),
0x80124420:("func_80124420",),
0x80124618:("func_80124618",),
- 0x801246F4:("func_801246F4",),
+ 0x801246F4:("Player_DrawImpl",),
0x80124870:("func_80124870",),
0x80124CC4:("func_80124CC4",),
0x80124F18:("func_80124F18",),
@@ -2263,14 +2263,14 @@
0x80127438:("func_80127438",),
0x80127488:("func_80127488",),
0x8012754C:("Player_DrawCouplesMask",),
- 0x80127594:("func_80127594",),
- 0x801278F8:("func_801278F8",),
- 0x80127A60:("func_80127A60",),
+ 0x80127594:("Player_DrawCircusLeadersMask",),
+ 0x801278F8:("Player_DrawBlastMask",),
+ 0x80127A60:("Player_DrawBunnyHood",),
0x80127B64:("func_80127B64",),
0x80127BE8:("func_80127BE8",),
0x80127DA4:("func_80127DA4",),
0x80128388:("func_80128388",),
- 0x801284A0:("func_801284A0",),
+ 0x801284A0:("Player_DrawGreatFairysMask",),
0x80128640:("func_80128640",),
0x80128B74:("func_80128B74",),
0x80128BD0:("func_80128BD0",),
diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt
index 3ac247a29..ee037b02a 100644
--- a/tools/disasm/variables.txt
+++ b/tools/disasm/variables.txt
@@ -1192,33 +1192,33 @@
0x801BFDA0:("sMaskObjectIds","s16","[24]",0x30),
0x801BFDD0:("D_801BFDD0","UNK_TYPE1","",0x1),
0x801BFDE8:("sMaskItemIds","UNK_TYPE1","",0x1),
- 0x801BFE00:("D_801BFE00","UNK_TYPE1","",0x1),
+ 0x801BFE00:("gPlayerSkeletons","FlexSkeletonHeader*","[5]",0x14),
0x801BFE14:("D_801BFE14","UNK_TYPE1","",0x1),
- 0x801BFF34:("D_801BFF34","UNK_TYPE2","",0x2),
+ 0x801BFF34:("sCItemButtons","UNK_TYPE2","",0x2),
0x801BFF3C:("sActionModelGroups","UNK_TYPE1","",0x1),
0x801BFF90:("D_801BFF90","UNK_TYPE1","",0x1),
0x801BFF98:("sPlayerStrengths","UNK_TYPE1","",0x1),
0x801BFFA0:("sEnvironmentTextTriggers","UNK_TYPE1","",0x1),
0x801BFFB0:("gPlayerModelTypes","UNK_TYPE1","",0x1),
- 0x801BFFFC:("D_801BFFFC","UNK_TYPE1","",0x1),
- 0x801C0024:("D_801C0024","UNK_TYPE1","",0x1),
- 0x801C0034:("D_801C0034","UNK_TYPE1","",0x1),
- 0x801C005C:("D_801C005C","UNK_TYPE1","",0x1),
- 0x801C0084:("D_801C0084","UNK_TYPE1","",0x1),
- 0x801C00AC:("D_801C00AC","UNK_TYPE1","",0x1),
- 0x801C00BC:("D_801C00BC","UNK_TYPE1","",0x1),
- 0x801C00D4:("D_801C00D4","UNK_TYPE1","",0x1),
- 0x801C00EC:("D_801C00EC","UNK_TYPE1","",0x1),
- 0x801C0114:("D_801C0114","UNK_TYPE1","",0x1),
- 0x801C013C:("D_801C013C","UNK_TYPE1","",0x1),
- 0x801C0164:("D_801C0164","UNK_TYPE1","",0x1),
+ 0x801BFFFC:("gPlayerWaistDLs","UNK_TYPE1","",0x1),
+ 0x801C0024:("gPlayerHandHoldingShields","UNK_TYPE1","",0x1),
+ 0x801C0034:("gPlayerSheath12DLs","UNK_TYPE1","",0x1),
+ 0x801C005C:("gPlayerSheath13DLs","UNK_TYPE1","",0x1),
+ 0x801C0084:("gPlayerSheath14DLs","UNK_TYPE1","",0x1),
+ 0x801C00AC:("gPlayerShields","UNK_TYPE1","",0x1),
+ 0x801C00BC:("gPlayerSheathedSwords","UNK_TYPE1","",0x1),
+ 0x801C00D4:("gPlayerSwordSheaths","UNK_TYPE1","",0x1),
+ 0x801C00EC:("gPlayerLeftHandTwoHandSwordDLs","UNK_TYPE1","",0x1),
+ 0x801C0114:("gPlayerLeftHandOpenDLs","UNK_TYPE1","",0x1),
+ 0x801C013C:("gPlayerLeftHandClosedDLs","UNK_TYPE1","",0x1),
+ 0x801C0164:("gPlayerLeftHandOneHandSwordDLs","UNK_TYPE1","",0x1),
0x801C018C:("D_801C018C","UNK_TYPE1","",0x1),
- 0x801C01A4:("D_801C01A4","UNK_TYPE1","",0x1),
- 0x801C01CC:("D_801C01CC","UNK_TYPE1","",0x1),
- 0x801C01F4:("D_801C01F4","UNK_TYPE1","",0x1),
- 0x801C021C:("D_801C021C","UNK_TYPE1","",0x1),
- 0x801C0244:("D_801C0244","UNK_TYPE1","",0x1),
- 0x801C026C:("D_801C026C","UNK_TYPE1","",0x1),
+ 0x801C01A4:("gPlayerRightHandOpenDLs","UNK_TYPE1","",0x1),
+ 0x801C01CC:("gPlayerRightHandClosedDLs","UNK_TYPE1","",0x1),
+ 0x801C01F4:("gPlayerRightHandBowDLs","UNK_TYPE1","",0x1),
+ 0x801C021C:("gPlayerRightHandInstrumentDLs","UNK_TYPE1","",0x1),
+ 0x801C0244:("gPlayerRightHandHookshotDLs","UNK_TYPE1","",0x1),
+ 0x801C026C:("gPlayerLeftHandBottleDLs","UNK_TYPE1","",0x1),
0x801C0294:("D_801C0294","UNK_TYPE1","",0x1),
0x801C02A8:("D_801C02A8","UNK_TYPE1","",0x1),
0x801C02BC:("D_801C02BC","UNK_TYPE1","",0x1),
@@ -1260,11 +1260,11 @@
0x801C07F0:("D_801C07F0","UNK_TYPE1","",0x1),
0x801C0820:("D_801C0820","UNK_TYPE1","",0x1),
0x801C0838:("D_801C0838","UNK_TYPE1","",0x1),
- 0x801C0850:("D_801C0850","UNK_TYPE1","",0x1),
- 0x801C0860:("D_801C0860","UNK_TYPE1","",0x1),
- 0x801C0870:("D_801C0870","UNK_PTR","",0x4),
- 0x801C0890:("D_801C0890","UNK_TYPE1","",0x1),
- 0x801C08A0:("D_801C08A0","UNK_TYPE1","",0x20),
+ 0x801C0850:("gCullBackDList","UNK_TYPE1","",0x1),
+ 0x801C0860:("gCullFrontDList","UNK_TYPE1","",0x1),
+ 0x801C0870:("sPlayerEyesTextures","UNK_PTR","",0x4),
+ 0x801C0890:("sPlayerMouthTextures","UNK_TYPE1","",0x1),
+ 0x801C08A0:("sPlayerFaces","UNK_TYPE1","",0x20),
0x801C08C0:("D_801C08C0","UNK_TYPE1","",0x1),
0x801C08FC:("D_801C08FC","UNK_TYPE1","",0x1),
0x801C0910:("D_801C0910","UNK_TYPE1","",0x1),
@@ -4003,17 +4003,17 @@
0x801F5834:("D_801F5834","UNK_TYPE1","",0x1),
0x801F5840:("gNMIBuffer","s32*","",0x4),
0x801F5850:("sPostmanTimerInput","UNK_TYPE1","",0x1),
- 0x801F58B0:("D_801F58B0","UNK_TYPE1","",0x1),
+ 0x801F58B0:("D_801F58B0","struct_801F58B0","[3][3]",0xFC),
0x801F59AC:("D_801F59AC","UNK_TYPE1","",0x1),
- 0x801F59B0:("D_801F59B0","UNK_TYPE1","",0x1),
- 0x801F59C8:("D_801F59C8","UNK_TYPE1","",0x1),
- 0x801F59D0:("D_801F59D0","UNK_TYPE1","",0x1),
- 0x801F59DC:("D_801F59DC","UNK_TYPE1","",0x1),
- 0x801F59E0:("D_801F59E0","UNK_TYPE1","",0x1),
- 0x801F59E4:("D_801F59E4","UNK_TYPE1","",0x1),
+ 0x801F59B0:("D_801F59B0","Vec3f","[2]",0x18),
+ 0x801F59C8:("D_801F59C8","s32","[2]",0x8),
+ 0x801F59D0:("D_801F59D0","struct_801F59D0","",0x0A),
+ 0x801F59DC:("D_801F59DC","Vec3f*","",0x4),
+ 0x801F59E0:("D_801F59E0","s32","",0x4),
+ 0x801F59E4:("D_801F59E4","s32","",0x4),
0x801F59E8:("D_801F59E8","Vec3f","",0xC),
- 0x801F59F4:("D_801F59F4","UNK_TYPE1","",0x1),
- 0x801F59F8:("D_801F59F8","UNK_TYPE1","",0x1),
+ 0x801F59F4:("D_801F59F4","s32","",0x4),
+ 0x801F59F8:("D_801F59F8","s32","",0x4),
0x801F5A00:("sQuakeRequest","QuakeRequest","[4]",0x90),
0x801F5A90:("sDistortionRequest","DistortionRequest","",0xc),
0x801F5AA0:("sMatAnimStep","s32","",0x4),
diff --git a/tools/namefixer.py b/tools/namefixer.py
index aba4a5aa4..eae3efd94 100755
--- a/tools/namefixer.py
+++ b/tools/namefixer.py
@@ -297,6 +297,7 @@ wordReplace = {
"func_800B86C8": "Actor_ChangeFocus",
"func_800B90F4": "Actor_DeactivateLens",
"func_800BC770": "Actor_AddQuake",
+ "func_800DF840": "Camera_ChangeMode",
"zelda_malloc": "ZeldaArena_Malloc",
"zelda_mallocR": "ZeldaArena_MallocR",
"zelda_realloc": "ZeldaArena_Realloc",
@@ -606,6 +607,7 @@ wordReplace = {
"EffectSsKiraKira_SpawnSmall": "EffectSsKirakira_SpawnSmall",
"EffectSsKiraKira_SpawnDispersed": "EffectSsKirakira_SpawnDispersed",
"EffectSsKiraKira_SpawnFocused": "EffectSsKirakira_SpawnFocused",
+ "Effect_Getplay": "Effect_GetPlayState",
"Effect_GetGlobalCtx": "Effect_GetPlayState",
"EffectSsHitMark_Spawn": "EffectSsHitmark_Spawn",
"EffectSsHitMark_SpawnFixedScale": "EffectSsHitmark_SpawnFixedScale",
@@ -699,6 +701,7 @@ wordReplace = {
"gSaveContext.equips": "gSaveContext.save.equips",
"gSaveContext.unk_1016": "gSaveContext.jinxTimer",
"gSaveContext.unk_3F58": "gSaveContext.sunsSongState",
+ "gSaveContext.equips.buttonItems": "gSaveContext.save.equips.buttonItems",
"gSaveContext.unk_48C8": "gSaveContext.dungeonIndex",
"gSaveContext.save.playerData.magicAcquired": "gSaveContext.save.playerData.isMagicAcquired",
"gSaveContext.save.playerDatadoubleMagic": "gSaveContext.save.playerData.isDoubleMagicAcquired",
@@ -723,6 +726,7 @@ wordReplace = {
"player->swordAnimation": "player->meleeWeaponAnimation",
"player->swordState": "player->meleeWeaponState",
"player->swordInfo": "player->meleeWeaponInfo",
+
"csCtx.npcActions": "csCtx.actorActions",
"csCtx->npcActions": "csCtx->actorActions",
"csCtx.unk_12": "csCtx.currentCsIndex",
@@ -768,13 +772,10 @@ wordReplace = {
"gSaveContext.fadeDuration": "gSaveContext.transFadeDuration",
"gSaveContext.fadeSpeed": "gSaveContext.transWipeSpeed",
- "D_801D15B0" : "gZeroVec3f",
- "D_801D15BC" : "gZeroVec3s",
- "D_801D1DE0" : "gIdentityMtx",
- "D_801D1E20" : "gIdentityMtxF",
- "D_04020658" : "gameplay_keep_Anim_020658",
- "D_04022B28" : "gDoorSkel",
- "D_04023100" : "gDoorCol",
+ "D_801D15B0": "gZeroVec3f",
+ "D_801D15BC": "gZeroVec3s",
+ "D_801D1DE0": "gIdentityMtx",
+ "D_801D1E20": "gIdentityMtxF",
# Macros
"CUR_EQUIP_VALUE_VOID": "GET_CUR_EQUIP_VALUE",
diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv
index a2d2354ff..1678b9186 100644
--- a/tools/sizes/code_functions.csv
+++ b/tools/sizes/code_functions.csv
@@ -1716,7 +1716,7 @@ asm/non_matchings/code/z_player_lib/func_801235DC.s,func_801235DC,0x801235DC,0x1
asm/non_matchings/code/z_player_lib/func_8012364C.s,func_8012364C,0x8012364C,0x71
asm/non_matchings/code/z_player_lib/func_80123810.s,func_80123810,0x80123810,0x54
asm/non_matchings/code/z_player_lib/Player_ActionToModelGroup.s,Player_ActionToModelGroup,0x80123960,0x13
-asm/non_matchings/code/z_player_lib/func_801239AC.s,func_801239AC,0x801239AC,0x3E
+asm/non_matchings/code/z_player_lib/Player_SetModelsForHoldingShield.s,Player_SetModelsForHoldingShield,0x801239AC,0x3E
asm/non_matchings/code/z_player_lib/Player_SetModels.s,Player_SetModels,0x80123AA4,0x4C
asm/non_matchings/code/z_player_lib/Player_SetModelGroup.s,Player_SetModelGroup,0x80123BD4,0x21
asm/non_matchings/code/z_player_lib/func_80123C58.s,func_80123C58,0x80123C58,0xE
@@ -1744,12 +1744,12 @@ asm/non_matchings/code/z_player_lib/Player_ActionToBottle.s,Player_ActionToBottl
asm/non_matchings/code/z_player_lib/Player_GetBottleHeld.s,Player_GetBottleHeld,0x8012420C,0x8
asm/non_matchings/code/z_player_lib/Player_ActionToExplosive.s,Player_ActionToExplosive,0x8012422C,0xB
asm/non_matchings/code/z_player_lib/Player_GetExplosiveHeld.s,Player_GetExplosiveHeld,0x80124258,0x8
-asm/non_matchings/code/z_player_lib/func_80124278.s,func_80124278,0x80124278,0xF
+asm/non_matchings/code/z_player_lib/Player_ActionToSword.s,Player_ActionToSword,0x80124278,0xF
asm/non_matchings/code/z_player_lib/func_801242B4.s,func_801242B4,0x801242B4,0xA
asm/non_matchings/code/z_player_lib/Player_GetEnvTimerType.s,Player_GetEnvTimerType,0x801242DC,0x51
asm/non_matchings/code/z_player_lib/func_80124420.s,func_80124420,0x80124420,0x7E
asm/non_matchings/code/z_player_lib/func_80124618.s,func_80124618,0x80124618,0x37
-asm/non_matchings/code/z_player_lib/func_801246F4.s,func_801246F4,0x801246F4,0x5F
+asm/non_matchings/code/z_player_lib/Player_DrawImpl.s,Player_DrawImpl,0x801246F4,0x5F
asm/non_matchings/code/z_player_lib/func_80124870.s,func_80124870,0x80124870,0x115
asm/non_matchings/code/z_player_lib/func_80124CC4.s,func_80124CC4,0x80124CC4,0x95
asm/non_matchings/code/z_player_lib/func_80124F18.s,func_80124F18,0x80124F18,0x36
@@ -1777,14 +1777,14 @@ asm/non_matchings/code/z_player_lib/func_801271B0.s,func_801271B0,0x801271B0,0xA
asm/non_matchings/code/z_player_lib/func_80127438.s,func_80127438,0x80127438,0x14
asm/non_matchings/code/z_player_lib/func_80127488.s,func_80127488,0x80127488,0x31
asm/non_matchings/code/z_player_lib/Player_DrawCouplesMask.s,Player_DrawCouplesMask,0x8012754C,0x12
-asm/non_matchings/code/z_player_lib/func_80127594.s,func_80127594,0x80127594,0xD9
-asm/non_matchings/code/z_player_lib/func_801278F8.s,func_801278F8,0x801278F8,0x5A
-asm/non_matchings/code/z_player_lib/func_80127A60.s,func_80127A60,0x80127A60,0x41
+asm/non_matchings/code/z_player_lib/Player_DrawCircusLeadersMask.s,Player_DrawCircusLeadersMask,0x80127594,0xD9
+asm/non_matchings/code/z_player_lib/Player_DrawBlastMask.s,Player_DrawBlastMask,0x801278F8,0x5A
+asm/non_matchings/code/z_player_lib/Player_DrawBunnyHood.s,Player_DrawBunnyHood,0x80127A60,0x41
asm/non_matchings/code/z_player_lib/func_80127B64.s,func_80127B64,0x80127B64,0x21
asm/non_matchings/code/z_player_lib/func_80127BE8.s,func_80127BE8,0x80127BE8,0x6F
asm/non_matchings/code/z_player_lib/func_80127DA4.s,func_80127DA4,0x80127DA4,0x179
asm/non_matchings/code/z_player_lib/func_80128388.s,func_80128388,0x80128388,0x46
-asm/non_matchings/code/z_player_lib/func_801284A0.s,func_801284A0,0x801284A0,0x68
+asm/non_matchings/code/z_player_lib/Player_DrawGreatFairysMask.s,Player_DrawGreatFairysMask,0x801284A0,0x68
asm/non_matchings/code/z_player_lib/func_80128640.s,func_80128640,0x80128640,0x14D
asm/non_matchings/code/z_player_lib/func_80128B74.s,func_80128B74,0x80128B74,0x17
asm/non_matchings/code/z_player_lib/func_80128BD0.s,func_80128BD0,0x80128BD0,0x4C8