From d6b660c936c3deb34569ce71fc5301608352560d Mon Sep 17 00:00:00 2001 From: Henrique Gemignani Passos Lima Date: Tue, 25 Oct 2022 18:43:42 +0300 Subject: [PATCH] Add CBodyStateInfo Former-commit-id: 5161698befd3ba8341cc87f61b53702e05c7adba --- asm/MetroidPrime/BodyState/CBodyStateInfo.s | 147 ------------ configure.py | 2 +- include/Kyoto/Animation/CPASAnimState.hpp | 2 + include/Kyoto/Animation/CPASDatabase.hpp | 16 +- include/Kyoto/Animation/CharacterCommon.hpp | 11 + include/MetroidPrime/BodyState/CABSAim.hpp | 23 ++ .../MetroidPrime/BodyState/CABSReaction.hpp | 21 ++ .../MetroidPrime/BodyState/CBSLocomotion.hpp | 28 +++ .../BodyState/CBodyController.hpp | 15 +- .../MetroidPrime/BodyState/CBodyStateInfo.hpp | 55 +++++ include/MetroidPrime/CCharacterInfo.hpp | 2 +- include/rstl/red_black_tree.hpp | 38 ++-- src/MetroidPrime/BodyState/CBodyStateInfo.cpp | 213 ++++++++++++++++++ 13 files changed, 398 insertions(+), 175 deletions(-) create mode 100644 include/MetroidPrime/BodyState/CABSAim.hpp create mode 100644 include/MetroidPrime/BodyState/CABSReaction.hpp create mode 100644 include/MetroidPrime/BodyState/CBSLocomotion.hpp create mode 100644 include/MetroidPrime/BodyState/CBodyStateInfo.hpp create mode 100644 src/MetroidPrime/BodyState/CBodyStateInfo.cpp diff --git a/asm/MetroidPrime/BodyState/CBodyStateInfo.s b/asm/MetroidPrime/BodyState/CBodyStateInfo.s index 00fdaf49..32abe7f7 100644 --- a/asm/MetroidPrime/BodyState/CBodyStateInfo.s +++ b/asm/MetroidPrime/BodyState/CBodyStateInfo.s @@ -271,7 +271,6 @@ SetupRestrictedFlyerBodyStates__14CBodyStateInfoFiR6CActor: /* 80132468 0012F3C8 7C 04 00 2E */ lwzx r0, r4, r0 /* 8013246C 0012F3CC 7C 09 03 A6 */ mtctr r0 /* 80132470 0012F3D0 4E 80 04 20 */ bctr -.global lbl_80132474 lbl_80132474: /* 80132474 0012F3D4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132478 0012F3D8 38 60 00 10 */ li r3, 0x10 @@ -285,7 +284,6 @@ lbl_80132474: lbl_80132498: /* 80132498 0012F3F8 7C 03 03 78 */ mr r3, r0 /* 8013249C 0012F3FC 48 00 03 20 */ b lbl_801327BC -.global lbl_801324A0 lbl_801324A0: /* 801324A0 0012F400 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801324A4 0012F404 38 60 00 08 */ li r3, 8 @@ -299,7 +297,6 @@ lbl_801324A0: lbl_801324C4: /* 801324C4 0012F424 7C 03 03 78 */ mr r3, r0 /* 801324C8 0012F428 48 00 02 F4 */ b lbl_801327BC -.global lbl_801324CC lbl_801324CC: /* 801324CC 0012F42C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801324D0 0012F430 38 60 00 08 */ li r3, 8 @@ -314,7 +311,6 @@ lbl_801324CC: lbl_801324F4: /* 801324F4 0012F454 7C 03 03 78 */ mr r3, r0 /* 801324F8 0012F458 48 00 02 C4 */ b lbl_801327BC -.global lbl_801324FC lbl_801324FC: /* 801324FC 0012F45C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132500 0012F460 38 60 00 04 */ li r3, 4 @@ -328,7 +324,6 @@ lbl_801324FC: lbl_80132520: /* 80132520 0012F480 7C 03 03 78 */ mr r3, r0 /* 80132524 0012F484 48 00 02 98 */ b lbl_801327BC -.global lbl_80132528 lbl_80132528: /* 80132528 0012F488 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013252C 0012F48C 38 60 00 0C */ li r3, 0xc @@ -342,7 +337,6 @@ lbl_80132528: lbl_8013254C: /* 8013254C 0012F4AC 7C 03 03 78 */ mr r3, r0 /* 80132550 0012F4B0 48 00 02 6C */ b lbl_801327BC -.global lbl_80132554 lbl_80132554: /* 80132554 0012F4B4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132558 0012F4B8 38 60 00 48 */ li r3, 0x48 @@ -357,7 +351,6 @@ lbl_80132554: lbl_8013257C: /* 8013257C 0012F4DC 7C 03 03 78 */ mr r3, r0 /* 80132580 0012F4E0 48 00 02 3C */ b lbl_801327BC -.global lbl_80132584 lbl_80132584: /* 80132584 0012F4E4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132588 0012F4E8 38 60 00 10 */ li r3, 0x10 @@ -371,7 +364,6 @@ lbl_80132584: lbl_801325A8: /* 801325A8 0012F508 7C 03 03 78 */ mr r3, r0 /* 801325AC 0012F50C 48 00 02 10 */ b lbl_801327BC -.global lbl_801325B0 lbl_801325B0: /* 801325B0 0012F510 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801325B4 0012F514 38 60 00 38 */ li r3, 0x38 @@ -385,7 +377,6 @@ lbl_801325B0: lbl_801325D4: /* 801325D4 0012F534 7C 03 03 78 */ mr r3, r0 /* 801325D8 0012F538 48 00 01 E4 */ b lbl_801327BC -.global lbl_801325DC lbl_801325DC: /* 801325DC 0012F53C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801325E0 0012F540 38 60 00 04 */ li r3, 4 @@ -399,7 +390,6 @@ lbl_801325DC: lbl_80132600: /* 80132600 0012F560 7C 03 03 78 */ mr r3, r0 /* 80132604 0012F564 48 00 01 B8 */ b lbl_801327BC -.global lbl_80132608 lbl_80132608: /* 80132608 0012F568 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013260C 0012F56C 38 60 00 10 */ li r3, 0x10 @@ -413,7 +403,6 @@ lbl_80132608: lbl_8013262C: /* 8013262C 0012F58C 7C 03 03 78 */ mr r3, r0 /* 80132630 0012F590 48 00 01 8C */ b lbl_801327BC -.global lbl_80132634 lbl_80132634: /* 80132634 0012F594 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132638 0012F598 38 60 00 14 */ li r3, 0x14 @@ -427,7 +416,6 @@ lbl_80132634: lbl_80132658: /* 80132658 0012F5B8 7C 03 03 78 */ mr r3, r0 /* 8013265C 0012F5BC 48 00 01 60 */ b lbl_801327BC -.global lbl_80132660 lbl_80132660: /* 80132660 0012F5C0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132664 0012F5C4 38 60 00 10 */ li r3, 0x10 @@ -441,7 +429,6 @@ lbl_80132660: lbl_80132684: /* 80132684 0012F5E4 7C 03 03 78 */ mr r3, r0 /* 80132688 0012F5E8 48 00 01 34 */ b lbl_801327BC -.global lbl_8013268C lbl_8013268C: /* 8013268C 0012F5EC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132690 0012F5F0 38 60 00 10 */ li r3, 0x10 @@ -455,7 +442,6 @@ lbl_8013268C: lbl_801326B0: /* 801326B0 0012F610 7C 03 03 78 */ mr r3, r0 /* 801326B4 0012F614 48 00 01 08 */ b lbl_801327BC -.global lbl_801326B8 lbl_801326B8: /* 801326B8 0012F618 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801326BC 0012F61C 38 60 00 04 */ li r3, 4 @@ -469,7 +455,6 @@ lbl_801326B8: lbl_801326DC: /* 801326DC 0012F63C 7C 03 03 78 */ mr r3, r0 /* 801326E0 0012F640 48 00 00 DC */ b lbl_801327BC -.global lbl_801326E4 lbl_801326E4: /* 801326E4 0012F644 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801326E8 0012F648 38 60 00 34 */ li r3, 0x34 @@ -483,7 +468,6 @@ lbl_801326E4: lbl_80132708: /* 80132708 0012F668 7C 03 03 78 */ mr r3, r0 /* 8013270C 0012F66C 48 00 00 B0 */ b lbl_801327BC -.global lbl_80132710 lbl_80132710: /* 80132710 0012F670 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132714 0012F674 38 60 00 30 */ li r3, 0x30 @@ -497,7 +481,6 @@ lbl_80132710: lbl_80132734: /* 80132734 0012F694 7C 03 03 78 */ mr r3, r0 /* 80132738 0012F698 48 00 00 84 */ b lbl_801327BC -.global lbl_8013273C lbl_8013273C: /* 8013273C 0012F69C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132740 0012F6A0 38 60 00 08 */ li r3, 8 @@ -511,7 +494,6 @@ lbl_8013273C: lbl_80132760: /* 80132760 0012F6C0 7C 03 03 78 */ mr r3, r0 /* 80132764 0012F6C4 48 00 00 58 */ b lbl_801327BC -.global lbl_80132768 lbl_80132768: /* 80132768 0012F6C8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013276C 0012F6CC 38 60 00 04 */ li r3, 4 @@ -525,7 +507,6 @@ lbl_80132768: lbl_8013278C: /* 8013278C 0012F6EC 7C 03 03 78 */ mr r3, r0 /* 80132790 0012F6F0 48 00 00 2C */ b lbl_801327BC -.global lbl_80132794 lbl_80132794: /* 80132794 0012F6F4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132798 0012F6F8 38 60 00 0C */ li r3, 0xc @@ -561,7 +542,6 @@ SetupNewFlyerBodyStates__14CBodyStateInfoFiR6CActor: /* 801327FC 0012F75C 7C 04 00 2E */ lwzx r0, r4, r0 /* 80132800 0012F760 7C 09 03 A6 */ mtctr r0 /* 80132804 0012F764 4E 80 04 20 */ bctr -.global lbl_80132808 lbl_80132808: /* 80132808 0012F768 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013280C 0012F76C 38 60 00 10 */ li r3, 0x10 @@ -575,7 +555,6 @@ lbl_80132808: lbl_8013282C: /* 8013282C 0012F78C 7C 03 03 78 */ mr r3, r0 /* 80132830 0012F790 48 00 03 20 */ b lbl_80132B50 -.global lbl_80132834 lbl_80132834: /* 80132834 0012F794 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132838 0012F798 38 60 00 08 */ li r3, 8 @@ -589,7 +568,6 @@ lbl_80132834: lbl_80132858: /* 80132858 0012F7B8 7C 03 03 78 */ mr r3, r0 /* 8013285C 0012F7BC 48 00 02 F4 */ b lbl_80132B50 -.global lbl_80132860 lbl_80132860: /* 80132860 0012F7C0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132864 0012F7C4 38 60 00 08 */ li r3, 8 @@ -604,7 +582,6 @@ lbl_80132860: lbl_80132888: /* 80132888 0012F7E8 7C 03 03 78 */ mr r3, r0 /* 8013288C 0012F7EC 48 00 02 C4 */ b lbl_80132B50 -.global lbl_80132890 lbl_80132890: /* 80132890 0012F7F0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132894 0012F7F4 38 60 00 04 */ li r3, 4 @@ -618,7 +595,6 @@ lbl_80132890: lbl_801328B4: /* 801328B4 0012F814 7C 03 03 78 */ mr r3, r0 /* 801328B8 0012F818 48 00 02 98 */ b lbl_80132B50 -.global lbl_801328BC lbl_801328BC: /* 801328BC 0012F81C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801328C0 0012F820 38 60 00 0C */ li r3, 0xc @@ -632,7 +608,6 @@ lbl_801328BC: lbl_801328E0: /* 801328E0 0012F840 7C 03 03 78 */ mr r3, r0 /* 801328E4 0012F844 48 00 02 6C */ b lbl_80132B50 -.global lbl_801328E8 lbl_801328E8: /* 801328E8 0012F848 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801328EC 0012F84C 38 60 03 CC */ li r3, 0x3cc @@ -647,7 +622,6 @@ lbl_801328E8: lbl_80132910: /* 80132910 0012F870 7C 03 03 78 */ mr r3, r0 /* 80132914 0012F874 48 00 02 3C */ b lbl_80132B50 -.global lbl_80132918 lbl_80132918: /* 80132918 0012F878 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013291C 0012F87C 38 60 00 10 */ li r3, 0x10 @@ -661,7 +635,6 @@ lbl_80132918: lbl_8013293C: /* 8013293C 0012F89C 7C 03 03 78 */ mr r3, r0 /* 80132940 0012F8A0 48 00 02 10 */ b lbl_80132B50 -.global lbl_80132944 lbl_80132944: /* 80132944 0012F8A4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132948 0012F8A8 38 60 00 38 */ li r3, 0x38 @@ -675,7 +648,6 @@ lbl_80132944: lbl_80132968: /* 80132968 0012F8C8 7C 03 03 78 */ mr r3, r0 /* 8013296C 0012F8CC 48 00 01 E4 */ b lbl_80132B50 -.global lbl_80132970 lbl_80132970: /* 80132970 0012F8D0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132974 0012F8D4 38 60 00 04 */ li r3, 4 @@ -689,7 +661,6 @@ lbl_80132970: lbl_80132994: /* 80132994 0012F8F4 7C 03 03 78 */ mr r3, r0 /* 80132998 0012F8F8 48 00 01 B8 */ b lbl_80132B50 -.global lbl_8013299C lbl_8013299C: /* 8013299C 0012F8FC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801329A0 0012F900 38 60 00 10 */ li r3, 0x10 @@ -703,7 +674,6 @@ lbl_8013299C: lbl_801329C0: /* 801329C0 0012F920 7C 03 03 78 */ mr r3, r0 /* 801329C4 0012F924 48 00 01 8C */ b lbl_80132B50 -.global lbl_801329C8 lbl_801329C8: /* 801329C8 0012F928 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801329CC 0012F92C 38 60 00 14 */ li r3, 0x14 @@ -717,7 +687,6 @@ lbl_801329C8: lbl_801329EC: /* 801329EC 0012F94C 7C 03 03 78 */ mr r3, r0 /* 801329F0 0012F950 48 00 01 60 */ b lbl_80132B50 -.global lbl_801329F4 lbl_801329F4: /* 801329F4 0012F954 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801329F8 0012F958 38 60 00 10 */ li r3, 0x10 @@ -731,7 +700,6 @@ lbl_801329F4: lbl_80132A18: /* 80132A18 0012F978 7C 03 03 78 */ mr r3, r0 /* 80132A1C 0012F97C 48 00 01 34 */ b lbl_80132B50 -.global lbl_80132A20 lbl_80132A20: /* 80132A20 0012F980 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132A24 0012F984 38 60 00 10 */ li r3, 0x10 @@ -745,7 +713,6 @@ lbl_80132A20: lbl_80132A44: /* 80132A44 0012F9A4 7C 03 03 78 */ mr r3, r0 /* 80132A48 0012F9A8 48 00 01 08 */ b lbl_80132B50 -.global lbl_80132A4C lbl_80132A4C: /* 80132A4C 0012F9AC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132A50 0012F9B0 38 60 00 04 */ li r3, 4 @@ -759,7 +726,6 @@ lbl_80132A4C: lbl_80132A70: /* 80132A70 0012F9D0 7C 03 03 78 */ mr r3, r0 /* 80132A74 0012F9D4 48 00 00 DC */ b lbl_80132B50 -.global lbl_80132A78 lbl_80132A78: /* 80132A78 0012F9D8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132A7C 0012F9DC 38 60 00 34 */ li r3, 0x34 @@ -773,7 +739,6 @@ lbl_80132A78: lbl_80132A9C: /* 80132A9C 0012F9FC 7C 03 03 78 */ mr r3, r0 /* 80132AA0 0012FA00 48 00 00 B0 */ b lbl_80132B50 -.global lbl_80132AA4 lbl_80132AA4: /* 80132AA4 0012FA04 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132AA8 0012FA08 38 60 00 30 */ li r3, 0x30 @@ -787,7 +752,6 @@ lbl_80132AA4: lbl_80132AC8: /* 80132AC8 0012FA28 7C 03 03 78 */ mr r3, r0 /* 80132ACC 0012FA2C 48 00 00 84 */ b lbl_80132B50 -.global lbl_80132AD0 lbl_80132AD0: /* 80132AD0 0012FA30 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132AD4 0012FA34 38 60 00 08 */ li r3, 8 @@ -801,7 +765,6 @@ lbl_80132AD0: lbl_80132AF4: /* 80132AF4 0012FA54 7C 03 03 78 */ mr r3, r0 /* 80132AF8 0012FA58 48 00 00 58 */ b lbl_80132B50 -.global lbl_80132AFC lbl_80132AFC: /* 80132AFC 0012FA5C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132B00 0012FA60 38 60 00 04 */ li r3, 4 @@ -815,7 +778,6 @@ lbl_80132AFC: lbl_80132B20: /* 80132B20 0012FA80 7C 03 03 78 */ mr r3, r0 /* 80132B24 0012FA84 48 00 00 2C */ b lbl_80132B50 -.global lbl_80132B28 lbl_80132B28: /* 80132B28 0012FA88 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132B2C 0012FA8C 38 60 00 0C */ li r3, 0xc @@ -851,7 +813,6 @@ SetupWallWalkerBodyStates__14CBodyStateInfoFiR6CActor: /* 80132B90 0012FAF0 7C 04 00 2E */ lwzx r0, r4, r0 /* 80132B94 0012FAF4 7C 09 03 A6 */ mtctr r0 /* 80132B98 0012FAF8 4E 80 04 20 */ bctr -.global lbl_80132B9C lbl_80132B9C: /* 80132B9C 0012FAFC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132BA0 0012FB00 38 60 00 10 */ li r3, 0x10 @@ -865,7 +826,6 @@ lbl_80132B9C: lbl_80132BC0: /* 80132BC0 0012FB20 7C 03 03 78 */ mr r3, r0 /* 80132BC4 0012FB24 48 00 03 20 */ b lbl_80132EE4 -.global lbl_80132BC8 lbl_80132BC8: /* 80132BC8 0012FB28 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132BCC 0012FB2C 38 60 00 08 */ li r3, 8 @@ -879,7 +839,6 @@ lbl_80132BC8: lbl_80132BEC: /* 80132BEC 0012FB4C 7C 03 03 78 */ mr r3, r0 /* 80132BF0 0012FB50 48 00 02 F4 */ b lbl_80132EE4 -.global lbl_80132BF4 lbl_80132BF4: /* 80132BF4 0012FB54 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132BF8 0012FB58 38 60 00 08 */ li r3, 8 @@ -894,7 +853,6 @@ lbl_80132BF4: lbl_80132C1C: /* 80132C1C 0012FB7C 7C 03 03 78 */ mr r3, r0 /* 80132C20 0012FB80 48 00 02 C4 */ b lbl_80132EE4 -.global lbl_80132C24 lbl_80132C24: /* 80132C24 0012FB84 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132C28 0012FB88 38 60 00 04 */ li r3, 4 @@ -908,7 +866,6 @@ lbl_80132C24: lbl_80132C48: /* 80132C48 0012FBA8 7C 03 03 78 */ mr r3, r0 /* 80132C4C 0012FBAC 48 00 02 98 */ b lbl_80132EE4 -.global lbl_80132C50 lbl_80132C50: /* 80132C50 0012FBB0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132C54 0012FBB4 38 60 00 0C */ li r3, 0xc @@ -922,7 +879,6 @@ lbl_80132C50: lbl_80132C74: /* 80132C74 0012FBD4 7C 03 03 78 */ mr r3, r0 /* 80132C78 0012FBD8 48 00 02 6C */ b lbl_80132EE4 -.global lbl_80132C7C lbl_80132C7C: /* 80132C7C 0012FBDC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132C80 0012FBE0 38 60 03 CC */ li r3, 0x3cc @@ -937,7 +893,6 @@ lbl_80132C7C: lbl_80132CA4: /* 80132CA4 0012FC04 7C 03 03 78 */ mr r3, r0 /* 80132CA8 0012FC08 48 00 02 3C */ b lbl_80132EE4 -.global lbl_80132CAC lbl_80132CAC: /* 80132CAC 0012FC0C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132CB0 0012FC10 38 60 00 10 */ li r3, 0x10 @@ -951,7 +906,6 @@ lbl_80132CAC: lbl_80132CD0: /* 80132CD0 0012FC30 7C 03 03 78 */ mr r3, r0 /* 80132CD4 0012FC34 48 00 02 10 */ b lbl_80132EE4 -.global lbl_80132CD8 lbl_80132CD8: /* 80132CD8 0012FC38 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132CDC 0012FC3C 38 60 00 38 */ li r3, 0x38 @@ -965,7 +919,6 @@ lbl_80132CD8: lbl_80132CFC: /* 80132CFC 0012FC5C 7C 03 03 78 */ mr r3, r0 /* 80132D00 0012FC60 48 00 01 E4 */ b lbl_80132EE4 -.global lbl_80132D04 lbl_80132D04: /* 80132D04 0012FC64 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132D08 0012FC68 38 60 00 04 */ li r3, 4 @@ -979,7 +932,6 @@ lbl_80132D04: lbl_80132D28: /* 80132D28 0012FC88 7C 03 03 78 */ mr r3, r0 /* 80132D2C 0012FC8C 48 00 01 B8 */ b lbl_80132EE4 -.global lbl_80132D30 lbl_80132D30: /* 80132D30 0012FC90 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132D34 0012FC94 38 60 00 10 */ li r3, 0x10 @@ -993,7 +945,6 @@ lbl_80132D30: lbl_80132D54: /* 80132D54 0012FCB4 7C 03 03 78 */ mr r3, r0 /* 80132D58 0012FCB8 48 00 01 8C */ b lbl_80132EE4 -.global lbl_80132D5C lbl_80132D5C: /* 80132D5C 0012FCBC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132D60 0012FCC0 38 60 00 14 */ li r3, 0x14 @@ -1007,7 +958,6 @@ lbl_80132D5C: lbl_80132D80: /* 80132D80 0012FCE0 7C 03 03 78 */ mr r3, r0 /* 80132D84 0012FCE4 48 00 01 60 */ b lbl_80132EE4 -.global lbl_80132D88 lbl_80132D88: /* 80132D88 0012FCE8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132D8C 0012FCEC 38 60 00 10 */ li r3, 0x10 @@ -1021,7 +971,6 @@ lbl_80132D88: lbl_80132DAC: /* 80132DAC 0012FD0C 7C 03 03 78 */ mr r3, r0 /* 80132DB0 0012FD10 48 00 01 34 */ b lbl_80132EE4 -.global lbl_80132DB4 lbl_80132DB4: /* 80132DB4 0012FD14 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132DB8 0012FD18 38 60 00 10 */ li r3, 0x10 @@ -1035,7 +984,6 @@ lbl_80132DB4: lbl_80132DD8: /* 80132DD8 0012FD38 7C 03 03 78 */ mr r3, r0 /* 80132DDC 0012FD3C 48 00 01 08 */ b lbl_80132EE4 -.global lbl_80132DE0 lbl_80132DE0: /* 80132DE0 0012FD40 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132DE4 0012FD44 38 60 00 04 */ li r3, 4 @@ -1049,7 +997,6 @@ lbl_80132DE0: lbl_80132E04: /* 80132E04 0012FD64 7C 03 03 78 */ mr r3, r0 /* 80132E08 0012FD68 48 00 00 DC */ b lbl_80132EE4 -.global lbl_80132E0C lbl_80132E0C: /* 80132E0C 0012FD6C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132E10 0012FD70 38 60 00 34 */ li r3, 0x34 @@ -1063,7 +1010,6 @@ lbl_80132E0C: lbl_80132E30: /* 80132E30 0012FD90 7C 03 03 78 */ mr r3, r0 /* 80132E34 0012FD94 48 00 00 B0 */ b lbl_80132EE4 -.global lbl_80132E38 lbl_80132E38: /* 80132E38 0012FD98 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132E3C 0012FD9C 38 60 00 30 */ li r3, 0x30 @@ -1077,7 +1023,6 @@ lbl_80132E38: lbl_80132E5C: /* 80132E5C 0012FDBC 7C 03 03 78 */ mr r3, r0 /* 80132E60 0012FDC0 48 00 00 84 */ b lbl_80132EE4 -.global lbl_80132E64 lbl_80132E64: /* 80132E64 0012FDC4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132E68 0012FDC8 38 60 00 08 */ li r3, 8 @@ -1091,7 +1036,6 @@ lbl_80132E64: lbl_80132E88: /* 80132E88 0012FDE8 7C 03 03 78 */ mr r3, r0 /* 80132E8C 0012FDEC 48 00 00 58 */ b lbl_80132EE4 -.global lbl_80132E90 lbl_80132E90: /* 80132E90 0012FDF0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132E94 0012FDF4 38 60 00 04 */ li r3, 4 @@ -1105,7 +1049,6 @@ lbl_80132E90: lbl_80132EB4: /* 80132EB4 0012FE14 7C 03 03 78 */ mr r3, r0 /* 80132EB8 0012FE18 48 00 00 2C */ b lbl_80132EE4 -.global lbl_80132EBC lbl_80132EBC: /* 80132EBC 0012FE1C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132EC0 0012FE20 38 60 00 0C */ li r3, 0xc @@ -1141,7 +1084,6 @@ SetupPitchableFlyerBodyStates__14CBodyStateInfoFiR6CActor: /* 80132F24 0012FE84 7C 04 00 2E */ lwzx r0, r4, r0 /* 80132F28 0012FE88 7C 09 03 A6 */ mtctr r0 /* 80132F2C 0012FE8C 4E 80 04 20 */ bctr -.global lbl_80132F30 lbl_80132F30: /* 80132F30 0012FE90 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132F34 0012FE94 38 60 00 10 */ li r3, 0x10 @@ -1155,7 +1097,6 @@ lbl_80132F30: lbl_80132F54: /* 80132F54 0012FEB4 7C 03 03 78 */ mr r3, r0 /* 80132F58 0012FEB8 48 00 03 24 */ b lbl_8013327C -.global lbl_80132F5C lbl_80132F5C: /* 80132F5C 0012FEBC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132F60 0012FEC0 38 60 00 08 */ li r3, 8 @@ -1169,7 +1110,6 @@ lbl_80132F5C: lbl_80132F80: /* 80132F80 0012FEE0 7C 03 03 78 */ mr r3, r0 /* 80132F84 0012FEE4 48 00 02 F8 */ b lbl_8013327C -.global lbl_80132F88 lbl_80132F88: /* 80132F88 0012FEE8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132F8C 0012FEEC 38 60 00 08 */ li r3, 8 @@ -1184,7 +1124,6 @@ lbl_80132F88: lbl_80132FB0: /* 80132FB0 0012FF10 7C 03 03 78 */ mr r3, r0 /* 80132FB4 0012FF14 48 00 02 C8 */ b lbl_8013327C -.global lbl_80132FB8 lbl_80132FB8: /* 80132FB8 0012FF18 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132FBC 0012FF1C 38 60 00 04 */ li r3, 4 @@ -1198,7 +1137,6 @@ lbl_80132FB8: lbl_80132FDC: /* 80132FDC 0012FF3C 7C 03 03 78 */ mr r3, r0 /* 80132FE0 0012FF40 48 00 02 9C */ b lbl_8013327C -.global lbl_80132FE4 lbl_80132FE4: /* 80132FE4 0012FF44 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80132FE8 0012FF48 38 60 00 0C */ li r3, 0xc @@ -1212,7 +1150,6 @@ lbl_80132FE4: lbl_80133008: /* 80133008 0012FF68 7C 03 03 78 */ mr r3, r0 /* 8013300C 0012FF6C 48 00 02 70 */ b lbl_8013327C -.global lbl_80133010 lbl_80133010: /* 80133010 0012FF70 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133014 0012FF74 38 60 03 D0 */ li r3, 0x3d0 @@ -1228,7 +1165,6 @@ lbl_80133010: lbl_8013303C: /* 8013303C 0012FF9C 7C 03 03 78 */ mr r3, r0 /* 80133040 0012FFA0 48 00 02 3C */ b lbl_8013327C -.global lbl_80133044 lbl_80133044: /* 80133044 0012FFA4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133048 0012FFA8 38 60 00 10 */ li r3, 0x10 @@ -1242,7 +1178,6 @@ lbl_80133044: lbl_80133068: /* 80133068 0012FFC8 7C 03 03 78 */ mr r3, r0 /* 8013306C 0012FFCC 48 00 02 10 */ b lbl_8013327C -.global lbl_80133070 lbl_80133070: /* 80133070 0012FFD0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133074 0012FFD4 38 60 00 38 */ li r3, 0x38 @@ -1256,7 +1191,6 @@ lbl_80133070: lbl_80133094: /* 80133094 0012FFF4 7C 03 03 78 */ mr r3, r0 /* 80133098 0012FFF8 48 00 01 E4 */ b lbl_8013327C -.global lbl_8013309C lbl_8013309C: /* 8013309C 0012FFFC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801330A0 00130000 38 60 00 04 */ li r3, 4 @@ -1270,7 +1204,6 @@ lbl_8013309C: lbl_801330C0: /* 801330C0 00130020 7C 03 03 78 */ mr r3, r0 /* 801330C4 00130024 48 00 01 B8 */ b lbl_8013327C -.global lbl_801330C8 lbl_801330C8: /* 801330C8 00130028 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801330CC 0013002C 38 60 00 10 */ li r3, 0x10 @@ -1284,7 +1217,6 @@ lbl_801330C8: lbl_801330EC: /* 801330EC 0013004C 7C 03 03 78 */ mr r3, r0 /* 801330F0 00130050 48 00 01 8C */ b lbl_8013327C -.global lbl_801330F4 lbl_801330F4: /* 801330F4 00130054 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801330F8 00130058 38 60 00 14 */ li r3, 0x14 @@ -1298,7 +1230,6 @@ lbl_801330F4: lbl_80133118: /* 80133118 00130078 7C 03 03 78 */ mr r3, r0 /* 8013311C 0013007C 48 00 01 60 */ b lbl_8013327C -.global lbl_80133120 lbl_80133120: /* 80133120 00130080 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133124 00130084 38 60 00 10 */ li r3, 0x10 @@ -1312,7 +1243,6 @@ lbl_80133120: lbl_80133144: /* 80133144 001300A4 7C 03 03 78 */ mr r3, r0 /* 80133148 001300A8 48 00 01 34 */ b lbl_8013327C -.global lbl_8013314C lbl_8013314C: /* 8013314C 001300AC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133150 001300B0 38 60 00 10 */ li r3, 0x10 @@ -1326,7 +1256,6 @@ lbl_8013314C: lbl_80133170: /* 80133170 001300D0 7C 03 03 78 */ mr r3, r0 /* 80133174 001300D4 48 00 01 08 */ b lbl_8013327C -.global lbl_80133178 lbl_80133178: /* 80133178 001300D8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013317C 001300DC 38 60 00 04 */ li r3, 4 @@ -1340,7 +1269,6 @@ lbl_80133178: lbl_8013319C: /* 8013319C 001300FC 7C 03 03 78 */ mr r3, r0 /* 801331A0 00130100 48 00 00 DC */ b lbl_8013327C -.global lbl_801331A4 lbl_801331A4: /* 801331A4 00130104 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801331A8 00130108 38 60 00 34 */ li r3, 0x34 @@ -1354,7 +1282,6 @@ lbl_801331A4: lbl_801331C8: /* 801331C8 00130128 7C 03 03 78 */ mr r3, r0 /* 801331CC 0013012C 48 00 00 B0 */ b lbl_8013327C -.global lbl_801331D0 lbl_801331D0: /* 801331D0 00130130 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801331D4 00130134 38 60 00 30 */ li r3, 0x30 @@ -1368,7 +1295,6 @@ lbl_801331D0: lbl_801331F4: /* 801331F4 00130154 7C 03 03 78 */ mr r3, r0 /* 801331F8 00130158 48 00 00 84 */ b lbl_8013327C -.global lbl_801331FC lbl_801331FC: /* 801331FC 0013015C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133200 00130160 38 60 00 08 */ li r3, 8 @@ -1382,7 +1308,6 @@ lbl_801331FC: lbl_80133220: /* 80133220 00130180 7C 03 03 78 */ mr r3, r0 /* 80133224 00130184 48 00 00 58 */ b lbl_8013327C -.global lbl_80133228 lbl_80133228: /* 80133228 00130188 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013322C 0013018C 38 60 00 04 */ li r3, 4 @@ -1396,7 +1321,6 @@ lbl_80133228: lbl_8013324C: /* 8013324C 001301AC 7C 03 03 78 */ mr r3, r0 /* 80133250 001301B0 48 00 00 2C */ b lbl_8013327C -.global lbl_80133254 lbl_80133254: /* 80133254 001301B4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133258 001301B8 38 60 00 0C */ li r3, 0xc @@ -1432,7 +1356,6 @@ SetupFlyerBodyStates__14CBodyStateInfoFiR6CActor: /* 801332BC 0013021C 7C 04 00 2E */ lwzx r0, r4, r0 /* 801332C0 00130220 7C 09 03 A6 */ mtctr r0 /* 801332C4 00130224 4E 80 04 20 */ bctr -.global lbl_801332C8 lbl_801332C8: /* 801332C8 00130228 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801332CC 0013022C 38 60 00 10 */ li r3, 0x10 @@ -1446,7 +1369,6 @@ lbl_801332C8: lbl_801332EC: /* 801332EC 0013024C 7C 03 03 78 */ mr r3, r0 /* 801332F0 00130250 48 00 03 24 */ b lbl_80133614 -.global lbl_801332F4 lbl_801332F4: /* 801332F4 00130254 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801332F8 00130258 38 60 00 08 */ li r3, 8 @@ -1460,7 +1382,6 @@ lbl_801332F4: lbl_80133318: /* 80133318 00130278 7C 03 03 78 */ mr r3, r0 /* 8013331C 0013027C 48 00 02 F8 */ b lbl_80133614 -.global lbl_80133320 lbl_80133320: /* 80133320 00130280 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133324 00130284 38 60 00 08 */ li r3, 8 @@ -1475,7 +1396,6 @@ lbl_80133320: lbl_80133348: /* 80133348 001302A8 7C 03 03 78 */ mr r3, r0 /* 8013334C 001302AC 48 00 02 C8 */ b lbl_80133614 -.global lbl_80133350 lbl_80133350: /* 80133350 001302B0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133354 001302B4 38 60 00 04 */ li r3, 4 @@ -1489,7 +1409,6 @@ lbl_80133350: lbl_80133374: /* 80133374 001302D4 7C 03 03 78 */ mr r3, r0 /* 80133378 001302D8 48 00 02 9C */ b lbl_80133614 -.global lbl_8013337C lbl_8013337C: /* 8013337C 001302DC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133380 001302E0 38 60 00 0C */ li r3, 0xc @@ -1503,7 +1422,6 @@ lbl_8013337C: lbl_801333A0: /* 801333A0 00130300 7C 03 03 78 */ mr r3, r0 /* 801333A4 00130304 48 00 02 70 */ b lbl_80133614 -.global lbl_801333A8 lbl_801333A8: /* 801333A8 00130308 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801333AC 0013030C 38 60 03 D0 */ li r3, 0x3d0 @@ -1519,7 +1437,6 @@ lbl_801333A8: lbl_801333D4: /* 801333D4 00130334 7C 03 03 78 */ mr r3, r0 /* 801333D8 00130338 48 00 02 3C */ b lbl_80133614 -.global lbl_801333DC lbl_801333DC: /* 801333DC 0013033C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801333E0 00130340 38 60 00 10 */ li r3, 0x10 @@ -1533,7 +1450,6 @@ lbl_801333DC: lbl_80133400: /* 80133400 00130360 7C 03 03 78 */ mr r3, r0 /* 80133404 00130364 48 00 02 10 */ b lbl_80133614 -.global lbl_80133408 lbl_80133408: /* 80133408 00130368 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013340C 0013036C 38 60 00 38 */ li r3, 0x38 @@ -1547,7 +1463,6 @@ lbl_80133408: lbl_8013342C: /* 8013342C 0013038C 7C 03 03 78 */ mr r3, r0 /* 80133430 00130390 48 00 01 E4 */ b lbl_80133614 -.global lbl_80133434 lbl_80133434: /* 80133434 00130394 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133438 00130398 38 60 00 04 */ li r3, 4 @@ -1561,7 +1476,6 @@ lbl_80133434: lbl_80133458: /* 80133458 001303B8 7C 03 03 78 */ mr r3, r0 /* 8013345C 001303BC 48 00 01 B8 */ b lbl_80133614 -.global lbl_80133460 lbl_80133460: /* 80133460 001303C0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133464 001303C4 38 60 00 10 */ li r3, 0x10 @@ -1575,7 +1489,6 @@ lbl_80133460: lbl_80133484: /* 80133484 001303E4 7C 03 03 78 */ mr r3, r0 /* 80133488 001303E8 48 00 01 8C */ b lbl_80133614 -.global lbl_8013348C lbl_8013348C: /* 8013348C 001303EC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133490 001303F0 38 60 00 14 */ li r3, 0x14 @@ -1589,7 +1502,6 @@ lbl_8013348C: lbl_801334B0: /* 801334B0 00130410 7C 03 03 78 */ mr r3, r0 /* 801334B4 00130414 48 00 01 60 */ b lbl_80133614 -.global lbl_801334B8 lbl_801334B8: /* 801334B8 00130418 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801334BC 0013041C 38 60 00 10 */ li r3, 0x10 @@ -1603,7 +1515,6 @@ lbl_801334B8: lbl_801334DC: /* 801334DC 0013043C 7C 03 03 78 */ mr r3, r0 /* 801334E0 00130440 48 00 01 34 */ b lbl_80133614 -.global lbl_801334E4 lbl_801334E4: /* 801334E4 00130444 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801334E8 00130448 38 60 00 10 */ li r3, 0x10 @@ -1617,7 +1528,6 @@ lbl_801334E4: lbl_80133508: /* 80133508 00130468 7C 03 03 78 */ mr r3, r0 /* 8013350C 0013046C 48 00 01 08 */ b lbl_80133614 -.global lbl_80133510 lbl_80133510: /* 80133510 00130470 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133514 00130474 38 60 00 04 */ li r3, 4 @@ -1631,7 +1541,6 @@ lbl_80133510: lbl_80133534: /* 80133534 00130494 7C 03 03 78 */ mr r3, r0 /* 80133538 00130498 48 00 00 DC */ b lbl_80133614 -.global lbl_8013353C lbl_8013353C: /* 8013353C 0013049C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133540 001304A0 38 60 00 34 */ li r3, 0x34 @@ -1645,7 +1554,6 @@ lbl_8013353C: lbl_80133560: /* 80133560 001304C0 7C 03 03 78 */ mr r3, r0 /* 80133564 001304C4 48 00 00 B0 */ b lbl_80133614 -.global lbl_80133568 lbl_80133568: /* 80133568 001304C8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013356C 001304CC 38 60 00 30 */ li r3, 0x30 @@ -1659,7 +1567,6 @@ lbl_80133568: lbl_8013358C: /* 8013358C 001304EC 7C 03 03 78 */ mr r3, r0 /* 80133590 001304F0 48 00 00 84 */ b lbl_80133614 -.global lbl_80133594 lbl_80133594: /* 80133594 001304F4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133598 001304F8 38 60 00 08 */ li r3, 8 @@ -1673,7 +1580,6 @@ lbl_80133594: lbl_801335B8: /* 801335B8 00130518 7C 03 03 78 */ mr r3, r0 /* 801335BC 0013051C 48 00 00 58 */ b lbl_80133614 -.global lbl_801335C0 lbl_801335C0: /* 801335C0 00130520 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801335C4 00130524 38 60 00 04 */ li r3, 4 @@ -1687,7 +1593,6 @@ lbl_801335C0: lbl_801335E4: /* 801335E4 00130544 7C 03 03 78 */ mr r3, r0 /* 801335E8 00130548 48 00 00 2C */ b lbl_80133614 -.global lbl_801335EC lbl_801335EC: /* 801335EC 0013054C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801335F0 00130550 38 60 00 0C */ li r3, 0xc @@ -1723,7 +1628,6 @@ SetupRestrictedBodyStates__14CBodyStateInfoFiR6CActor: /* 80133654 001305B4 7C 04 00 2E */ lwzx r0, r4, r0 /* 80133658 001305B8 7C 09 03 A6 */ mtctr r0 /* 8013365C 001305BC 4E 80 04 20 */ bctr -.global lbl_80133660 lbl_80133660: /* 80133660 001305C0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133664 001305C4 38 60 00 10 */ li r3, 0x10 @@ -1737,7 +1641,6 @@ lbl_80133660: lbl_80133684: /* 80133684 001305E4 7C 03 03 78 */ mr r3, r0 /* 80133688 001305E8 48 00 03 4C */ b lbl_801339D4 -.global lbl_8013368C lbl_8013368C: /* 8013368C 001305EC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133690 001305F0 38 60 00 08 */ li r3, 8 @@ -1751,7 +1654,6 @@ lbl_8013368C: lbl_801336B0: /* 801336B0 00130610 7C 03 03 78 */ mr r3, r0 /* 801336B4 00130614 48 00 03 20 */ b lbl_801339D4 -.global lbl_801336B8 lbl_801336B8: /* 801336B8 00130618 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801336BC 0013061C 38 60 00 08 */ li r3, 8 @@ -1766,7 +1668,6 @@ lbl_801336B8: lbl_801336E0: /* 801336E0 00130640 7C 03 03 78 */ mr r3, r0 /* 801336E4 00130644 48 00 02 F0 */ b lbl_801339D4 -.global lbl_801336E8 lbl_801336E8: /* 801336E8 00130648 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801336EC 0013064C 38 60 00 04 */ li r3, 4 @@ -1780,7 +1681,6 @@ lbl_801336E8: lbl_8013370C: /* 8013370C 0013066C 7C 03 03 78 */ mr r3, r0 /* 80133710 00130670 48 00 02 C4 */ b lbl_801339D4 -.global lbl_80133714 lbl_80133714: /* 80133714 00130674 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133718 00130678 38 60 00 0C */ li r3, 0xc @@ -1794,7 +1694,6 @@ lbl_80133714: lbl_80133738: /* 80133738 00130698 7C 03 03 78 */ mr r3, r0 /* 8013373C 0013069C 48 00 02 98 */ b lbl_801339D4 -.global lbl_80133740 lbl_80133740: /* 80133740 001306A0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133744 001306A4 38 60 00 48 */ li r3, 0x48 @@ -1809,7 +1708,6 @@ lbl_80133740: lbl_80133768: /* 80133768 001306C8 7C 03 03 78 */ mr r3, r0 /* 8013376C 001306CC 48 00 02 68 */ b lbl_801339D4 -.global lbl_80133770 lbl_80133770: /* 80133770 001306D0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133774 001306D4 38 60 00 10 */ li r3, 0x10 @@ -1823,7 +1721,6 @@ lbl_80133770: lbl_80133794: /* 80133794 001306F4 7C 03 03 78 */ mr r3, r0 /* 80133798 001306F8 48 00 02 3C */ b lbl_801339D4 -.global lbl_8013379C lbl_8013379C: /* 8013379C 001306FC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801337A0 00130700 38 60 00 38 */ li r3, 0x38 @@ -1837,7 +1734,6 @@ lbl_8013379C: lbl_801337C0: /* 801337C0 00130720 7C 03 03 78 */ mr r3, r0 /* 801337C4 00130724 48 00 02 10 */ b lbl_801339D4 -.global lbl_801337C8 lbl_801337C8: /* 801337C8 00130728 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801337CC 0013072C 38 60 00 04 */ li r3, 4 @@ -1851,7 +1747,6 @@ lbl_801337C8: lbl_801337EC: /* 801337EC 0013074C 7C 03 03 78 */ mr r3, r0 /* 801337F0 00130750 48 00 01 E4 */ b lbl_801339D4 -.global lbl_801337F4 lbl_801337F4: /* 801337F4 00130754 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801337F8 00130758 38 60 00 10 */ li r3, 0x10 @@ -1865,7 +1760,6 @@ lbl_801337F4: lbl_80133818: /* 80133818 00130778 7C 03 03 78 */ mr r3, r0 /* 8013381C 0013077C 48 00 01 B8 */ b lbl_801339D4 -.global lbl_80133820 lbl_80133820: /* 80133820 00130780 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133824 00130784 38 60 00 14 */ li r3, 0x14 @@ -1879,7 +1773,6 @@ lbl_80133820: lbl_80133844: /* 80133844 001307A4 7C 03 03 78 */ mr r3, r0 /* 80133848 001307A8 48 00 01 8C */ b lbl_801339D4 -.global lbl_8013384C lbl_8013384C: /* 8013384C 001307AC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133850 001307B0 38 60 00 10 */ li r3, 0x10 @@ -1893,7 +1786,6 @@ lbl_8013384C: lbl_80133870: /* 80133870 001307D0 7C 03 03 78 */ mr r3, r0 /* 80133874 001307D4 48 00 01 60 */ b lbl_801339D4 -.global lbl_80133878 lbl_80133878: /* 80133878 001307D8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013387C 001307DC 38 60 00 10 */ li r3, 0x10 @@ -1907,7 +1799,6 @@ lbl_80133878: lbl_8013389C: /* 8013389C 001307FC 7C 03 03 78 */ mr r3, r0 /* 801338A0 00130800 48 00 01 34 */ b lbl_801339D4 -.global lbl_801338A4 lbl_801338A4: /* 801338A4 00130804 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801338A8 00130808 38 60 00 04 */ li r3, 4 @@ -1921,7 +1812,6 @@ lbl_801338A4: lbl_801338C8: /* 801338C8 00130828 7C 03 03 78 */ mr r3, r0 /* 801338CC 0013082C 48 00 01 08 */ b lbl_801339D4 -.global lbl_801338D0 lbl_801338D0: /* 801338D0 00130830 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801338D4 00130834 38 60 00 34 */ li r3, 0x34 @@ -1935,7 +1825,6 @@ lbl_801338D0: lbl_801338F4: /* 801338F4 00130854 7C 03 03 78 */ mr r3, r0 /* 801338F8 00130858 48 00 00 DC */ b lbl_801339D4 -.global lbl_801338FC lbl_801338FC: /* 801338FC 0013085C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133900 00130860 38 60 00 30 */ li r3, 0x30 @@ -1949,7 +1838,6 @@ lbl_801338FC: lbl_80133920: /* 80133920 00130880 7C 03 03 78 */ mr r3, r0 /* 80133924 00130884 48 00 00 B0 */ b lbl_801339D4 -.global lbl_80133928 lbl_80133928: /* 80133928 00130888 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 8013392C 0013088C 38 60 00 08 */ li r3, 8 @@ -1963,7 +1851,6 @@ lbl_80133928: lbl_8013394C: /* 8013394C 001308AC 7C 03 03 78 */ mr r3, r0 /* 80133950 001308B0 48 00 00 84 */ b lbl_801339D4 -.global lbl_80133954 lbl_80133954: /* 80133954 001308B4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133958 001308B8 38 60 00 04 */ li r3, 4 @@ -1977,7 +1864,6 @@ lbl_80133954: lbl_80133978: /* 80133978 001308D8 7C 03 03 78 */ mr r3, r0 /* 8013397C 001308DC 48 00 00 58 */ b lbl_801339D4 -.global lbl_80133980 lbl_80133980: /* 80133980 001308E0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133984 001308E4 38 60 00 0C */ li r3, 0xc @@ -1991,7 +1877,6 @@ lbl_80133980: lbl_801339A4: /* 801339A4 00130904 7C 03 03 78 */ mr r3, r0 /* 801339A8 00130908 48 00 00 2C */ b lbl_801339D4 -.global lbl_801339AC lbl_801339AC: /* 801339AC 0013090C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 801339B0 00130910 38 60 00 10 */ li r3, 0x10 @@ -2027,7 +1912,6 @@ SetupBiPedalBodyStates__14CBodyStateInfoFiR6CActor: /* 80133A14 00130974 7C 04 00 2E */ lwzx r0, r4, r0 /* 80133A18 00130978 7C 09 03 A6 */ mtctr r0 /* 80133A1C 0013097C 4E 80 04 20 */ bctr -.global lbl_80133A20 lbl_80133A20: /* 80133A20 00130980 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133A24 00130984 38 60 00 10 */ li r3, 0x10 @@ -2041,7 +1925,6 @@ lbl_80133A20: lbl_80133A44: /* 80133A44 001309A4 7C 03 03 78 */ mr r3, r0 /* 80133A48 001309A8 48 00 03 78 */ b lbl_80133DC0 -.global lbl_80133A4C lbl_80133A4C: /* 80133A4C 001309AC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133A50 001309B0 38 60 00 08 */ li r3, 8 @@ -2055,7 +1938,6 @@ lbl_80133A4C: lbl_80133A70: /* 80133A70 001309D0 7C 03 03 78 */ mr r3, r0 /* 80133A74 001309D4 48 00 03 4C */ b lbl_80133DC0 -.global lbl_80133A78 lbl_80133A78: /* 80133A78 001309D8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133A7C 001309DC 38 60 00 08 */ li r3, 8 @@ -2070,7 +1952,6 @@ lbl_80133A78: lbl_80133AA0: /* 80133AA0 00130A00 7C 03 03 78 */ mr r3, r0 /* 80133AA4 00130A04 48 00 03 1C */ b lbl_80133DC0 -.global lbl_80133AA8 lbl_80133AA8: /* 80133AA8 00130A08 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133AAC 00130A0C 38 60 00 04 */ li r3, 4 @@ -2084,7 +1965,6 @@ lbl_80133AA8: lbl_80133ACC: /* 80133ACC 00130A2C 7C 03 03 78 */ mr r3, r0 /* 80133AD0 00130A30 48 00 02 F0 */ b lbl_80133DC0 -.global lbl_80133AD4 lbl_80133AD4: /* 80133AD4 00130A34 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133AD8 00130A38 38 60 00 0C */ li r3, 0xc @@ -2098,7 +1978,6 @@ lbl_80133AD4: lbl_80133AF8: /* 80133AF8 00130A58 7C 03 03 78 */ mr r3, r0 /* 80133AFC 00130A5C 48 00 02 C4 */ b lbl_80133DC0 -.global lbl_80133B00 lbl_80133B00: /* 80133B00 00130A60 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133B04 00130A64 38 60 03 CC */ li r3, 0x3cc @@ -2113,7 +1992,6 @@ lbl_80133B00: lbl_80133B28: /* 80133B28 00130A88 7C 03 03 78 */ mr r3, r0 /* 80133B2C 00130A8C 48 00 02 94 */ b lbl_80133DC0 -.global lbl_80133B30 lbl_80133B30: /* 80133B30 00130A90 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133B34 00130A94 38 60 00 10 */ li r3, 0x10 @@ -2127,7 +2005,6 @@ lbl_80133B30: lbl_80133B54: /* 80133B54 00130AB4 7C 03 03 78 */ mr r3, r0 /* 80133B58 00130AB8 48 00 02 68 */ b lbl_80133DC0 -.global lbl_80133B5C lbl_80133B5C: /* 80133B5C 00130ABC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133B60 00130AC0 38 60 00 38 */ li r3, 0x38 @@ -2141,7 +2018,6 @@ lbl_80133B5C: lbl_80133B80: /* 80133B80 00130AE0 7C 03 03 78 */ mr r3, r0 /* 80133B84 00130AE4 48 00 02 3C */ b lbl_80133DC0 -.global lbl_80133B88 lbl_80133B88: /* 80133B88 00130AE8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133B8C 00130AEC 38 60 00 04 */ li r3, 4 @@ -2155,7 +2031,6 @@ lbl_80133B88: lbl_80133BAC: /* 80133BAC 00130B0C 7C 03 03 78 */ mr r3, r0 /* 80133BB0 00130B10 48 00 02 10 */ b lbl_80133DC0 -.global lbl_80133BB4 lbl_80133BB4: /* 80133BB4 00130B14 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133BB8 00130B18 38 60 00 10 */ li r3, 0x10 @@ -2169,7 +2044,6 @@ lbl_80133BB4: lbl_80133BD8: /* 80133BD8 00130B38 7C 03 03 78 */ mr r3, r0 /* 80133BDC 00130B3C 48 00 01 E4 */ b lbl_80133DC0 -.global lbl_80133BE0 lbl_80133BE0: /* 80133BE0 00130B40 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133BE4 00130B44 38 60 00 14 */ li r3, 0x14 @@ -2183,7 +2057,6 @@ lbl_80133BE0: lbl_80133C04: /* 80133C04 00130B64 7C 03 03 78 */ mr r3, r0 /* 80133C08 00130B68 48 00 01 B8 */ b lbl_80133DC0 -.global lbl_80133C0C lbl_80133C0C: /* 80133C0C 00130B6C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133C10 00130B70 38 60 00 10 */ li r3, 0x10 @@ -2197,7 +2070,6 @@ lbl_80133C0C: lbl_80133C30: /* 80133C30 00130B90 7C 03 03 78 */ mr r3, r0 /* 80133C34 00130B94 48 00 01 8C */ b lbl_80133DC0 -.global lbl_80133C38 lbl_80133C38: /* 80133C38 00130B98 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133C3C 00130B9C 38 60 00 10 */ li r3, 0x10 @@ -2211,7 +2083,6 @@ lbl_80133C38: lbl_80133C5C: /* 80133C5C 00130BBC 7C 03 03 78 */ mr r3, r0 /* 80133C60 00130BC0 48 00 01 60 */ b lbl_80133DC0 -.global lbl_80133C64 lbl_80133C64: /* 80133C64 00130BC4 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133C68 00130BC8 38 60 00 04 */ li r3, 4 @@ -2225,7 +2096,6 @@ lbl_80133C64: lbl_80133C88: /* 80133C88 00130BE8 7C 03 03 78 */ mr r3, r0 /* 80133C8C 00130BEC 48 00 01 34 */ b lbl_80133DC0 -.global lbl_80133C90 lbl_80133C90: /* 80133C90 00130BF0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133C94 00130BF4 38 60 00 34 */ li r3, 0x34 @@ -2239,7 +2109,6 @@ lbl_80133C90: lbl_80133CB4: /* 80133CB4 00130C14 7C 03 03 78 */ mr r3, r0 /* 80133CB8 00130C18 48 00 01 08 */ b lbl_80133DC0 -.global lbl_80133CBC lbl_80133CBC: /* 80133CBC 00130C1C 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133CC0 00130C20 38 60 00 30 */ li r3, 0x30 @@ -2253,7 +2122,6 @@ lbl_80133CBC: lbl_80133CE0: /* 80133CE0 00130C40 7C 03 03 78 */ mr r3, r0 /* 80133CE4 00130C44 48 00 00 DC */ b lbl_80133DC0 -.global lbl_80133CE8 lbl_80133CE8: /* 80133CE8 00130C48 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133CEC 00130C4C 38 60 00 08 */ li r3, 8 @@ -2267,7 +2135,6 @@ lbl_80133CE8: lbl_80133D0C: /* 80133D0C 00130C6C 7C 03 03 78 */ mr r3, r0 /* 80133D10 00130C70 48 00 00 B0 */ b lbl_80133DC0 -.global lbl_80133D14 lbl_80133D14: /* 80133D14 00130C74 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133D18 00130C78 38 60 00 04 */ li r3, 4 @@ -2281,7 +2148,6 @@ lbl_80133D14: lbl_80133D38: /* 80133D38 00130C98 7C 03 03 78 */ mr r3, r0 /* 80133D3C 00130C9C 48 00 00 84 */ b lbl_80133DC0 -.global lbl_80133D40 lbl_80133D40: /* 80133D40 00130CA0 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133D44 00130CA4 38 60 00 0C */ li r3, 0xc @@ -2295,7 +2161,6 @@ lbl_80133D40: lbl_80133D64: /* 80133D64 00130CC4 7C 03 03 78 */ mr r3, r0 /* 80133D68 00130CC8 48 00 00 58 */ b lbl_80133DC0 -.global lbl_80133D6C lbl_80133D6C: /* 80133D6C 00130CCC 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133D70 00130CD0 38 60 00 10 */ li r3, 0x10 @@ -2309,7 +2174,6 @@ lbl_80133D6C: lbl_80133D90: /* 80133D90 00130CF0 7C 03 03 78 */ mr r3, r0 /* 80133D94 00130CF4 48 00 00 2C */ b lbl_80133DC0 -.global lbl_80133D98 lbl_80133D98: /* 80133D98 00130CF8 3C 80 80 3D */ lis r4, lbl_803D0058@ha /* 80133D9C 00130CFC 38 60 00 1C */ li r3, 0x1c @@ -2482,9 +2346,6 @@ lbl_80133FA4: lbl_80133FBC: /* 80133FBC 00130F1C 38 C6 00 0C */ addi r6, r6, 0xc /* 80133FC0 00130F20 42 00 FF E4 */ bdnz lbl_80133FA4 - -.global sub_80133fc4 -sub_80133fc4: /* 80133FC4 00130F24 4E 80 00 20 */ blr .global ApplyHeadTracking__14CBodyStateInfoCFv @@ -2836,7 +2697,6 @@ lbl_8013440C: /* 80134430 00131390 7C 03 00 2E */ lwzx r0, r3, r0 /* 80134434 00131394 7C 09 03 A6 */ mtctr r0 /* 80134438 00131398 4E 80 04 20 */ bctr -.global lbl_8013443C lbl_8013443C: /* 8013443C 0013139C 80 9E 00 00 */ lwz r4, 0(r30) /* 80134440 001313A0 7F E3 FB 78 */ mr r3, r31 @@ -2844,7 +2704,6 @@ lbl_8013443C: /* 80134448 001313A8 4B FF F5 A1 */ bl SetupBiPedalBodyStates__14CBodyStateInfoFiR6CActor /* 8013444C 001313AC 7C 65 1B 78 */ mr r5, r3 /* 80134450 001313B0 48 00 00 A8 */ b lbl_801344F8 -.global lbl_80134454 lbl_80134454: /* 80134454 001313B4 80 9E 00 00 */ lwz r4, 0(r30) /* 80134458 001313B8 7F E3 FB 78 */ mr r3, r31 @@ -2852,7 +2711,6 @@ lbl_80134454: /* 80134460 001313C0 4B FF F1 C9 */ bl SetupRestrictedBodyStates__14CBodyStateInfoFiR6CActor /* 80134464 001313C4 7C 65 1B 78 */ mr r5, r3 /* 80134468 001313C8 48 00 00 90 */ b lbl_801344F8 -.global lbl_8013446C lbl_8013446C: /* 8013446C 001313CC 80 9E 00 00 */ lwz r4, 0(r30) /* 80134470 001313D0 7F E3 FB 78 */ mr r3, r31 @@ -2860,7 +2718,6 @@ lbl_8013446C: /* 80134478 001313D8 4B FF EE 19 */ bl SetupFlyerBodyStates__14CBodyStateInfoFiR6CActor /* 8013447C 001313DC 7C 65 1B 78 */ mr r5, r3 /* 80134480 001313E0 48 00 00 78 */ b lbl_801344F8 -.global lbl_80134484 lbl_80134484: /* 80134484 001313E4 80 9E 00 00 */ lwz r4, 0(r30) /* 80134488 001313E8 7F E3 FB 78 */ mr r3, r31 @@ -2868,7 +2725,6 @@ lbl_80134484: /* 80134490 001313F0 4B FF EA 69 */ bl SetupPitchableFlyerBodyStates__14CBodyStateInfoFiR6CActor /* 80134494 001313F4 7C 65 1B 78 */ mr r5, r3 /* 80134498 001313F8 48 00 00 60 */ b lbl_801344F8 -.global lbl_8013449C lbl_8013449C: /* 8013449C 001313FC 80 9E 00 00 */ lwz r4, 0(r30) /* 801344A0 00131400 7F E3 FB 78 */ mr r3, r31 @@ -2876,7 +2732,6 @@ lbl_8013449C: /* 801344A8 00131408 4B FF E6 BD */ bl SetupWallWalkerBodyStates__14CBodyStateInfoFiR6CActor /* 801344AC 0013140C 7C 65 1B 78 */ mr r5, r3 /* 801344B0 00131410 48 00 00 48 */ b lbl_801344F8 -.global lbl_801344B4 lbl_801344B4: /* 801344B4 00131414 80 9E 00 00 */ lwz r4, 0(r30) /* 801344B8 00131418 7F E3 FB 78 */ mr r3, r31 @@ -2884,7 +2739,6 @@ lbl_801344B4: /* 801344C0 00131420 4B FF E3 11 */ bl SetupNewFlyerBodyStates__14CBodyStateInfoFiR6CActor /* 801344C4 00131424 7C 65 1B 78 */ mr r5, r3 /* 801344C8 00131428 48 00 00 30 */ b lbl_801344F8 -.global lbl_801344CC lbl_801344CC: /* 801344CC 0013142C 80 9E 00 00 */ lwz r4, 0(r30) /* 801344D0 00131430 7F E3 FB 78 */ mr r3, r31 @@ -2892,7 +2746,6 @@ lbl_801344CC: /* 801344D8 00131438 4B FF DF 65 */ bl SetupRestrictedFlyerBodyStates__14CBodyStateInfoFiR6CActor /* 801344DC 0013143C 7C 65 1B 78 */ mr r5, r3 /* 801344E0 00131440 48 00 00 18 */ b lbl_801344F8 -.global lbl_801344E4 lbl_801344E4: /* 801344E4 00131444 80 9E 00 00 */ lwz r4, 0(r30) /* 801344E8 00131448 7F E3 FB 78 */ mr r3, r31 diff --git a/configure.py b/configure.py index e1e785c2..b485d1d8 100755 --- a/configure.py +++ b/configure.py @@ -183,7 +183,7 @@ LIBS = [ "MetroidPrime/ScriptObjects/CHUDBillboardEffect", "MetroidPrime/Enemies/CFlickerBat", "MetroidPrime/BodyState/CBodyStateCmdMgr", - "MetroidPrime/BodyState/CBodyStateInfo", + ["MetroidPrime/BodyState/CBodyStateInfo", False], "MetroidPrime/BodyState/CBSAttack", "MetroidPrime/BodyState/CBSDie", "MetroidPrime/BodyState/CBSFall", diff --git a/include/Kyoto/Animation/CPASAnimState.hpp b/include/Kyoto/Animation/CPASAnimState.hpp index 8476336f..263ed6a0 100644 --- a/include/Kyoto/Animation/CPASAnimState.hpp +++ b/include/Kyoto/Animation/CPASAnimState.hpp @@ -67,6 +67,8 @@ private: class CPASAnimState { public: CPASAnimParm GetAnimParmData(int, unsigned int) const; + + pas::EAnimationState GetStateId() const { return x0_id; } private: pas::EAnimationState x0_id; diff --git a/include/Kyoto/Animation/CPASDatabase.hpp b/include/Kyoto/Animation/CPASDatabase.hpp index ce9db817..978da51f 100644 --- a/include/Kyoto/Animation/CPASDatabase.hpp +++ b/include/Kyoto/Animation/CPASDatabase.hpp @@ -12,13 +12,23 @@ class CPASAnimParmData; class CRandom16; class CPASDatabase { -private: - rstl::vector< CPASAnimState > x0_states; - int x10_defaultState; public: const CPASAnimState* GetAnimState(int) const; rstl::pair< float, int > FindBestAnimation(const CPASAnimParmData&, CRandom16&, int) const; + + size_t GetNumAnimStates() const; // { return x0_states.size(); } + const CPASAnimState* GetAnimStateByIndex(int index) const; /* { + if (index >= x0_states.size()) { + return nullptr; + } + + return &x0_states[index]; + }*/ + +private: + rstl::vector< CPASAnimState > x0_states; + int x10_defaultState; }; CHECK_SIZEOF(CPASDatabase, 0x14) diff --git a/include/Kyoto/Animation/CharacterCommon.hpp b/include/Kyoto/Animation/CharacterCommon.hpp index cc2e868d..ff0392df 100644 --- a/include/Kyoto/Animation/CharacterCommon.hpp +++ b/include/Kyoto/Animation/CharacterCommon.hpp @@ -171,6 +171,17 @@ enum EWallHangState { }; } // namespace pas +enum EBodyType { + kBT_Invalid, + kBT_BiPedal, + kBT_Restricted, + kBT_Flyer, + kBT_Pitchable, + kBT_RestrictedFlyer, + kBT_WallWalker, + kBT_NewFlyer +}; + enum EBodyStateCmd { kBSC_Getup, kBSC_Step, diff --git a/include/MetroidPrime/BodyState/CABSAim.hpp b/include/MetroidPrime/BodyState/CABSAim.hpp new file mode 100644 index 00000000..b9c3968e --- /dev/null +++ b/include/MetroidPrime/BodyState/CABSAim.hpp @@ -0,0 +1,23 @@ +#ifndef _CABSAIM +#define _CABSAIM + +#include "MetroidPrime/BodyState/CAdditiveBodyState.hpp" + +class CABSAim : public CAdditiveBodyState { + bool x4_needsIdle; + int x8_anims[4]; + float x18_angles[4]; + float x28_hWeight; + float x2c_hWeightVel; + float x30_vWeight; + float x34_vWeightVel; + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; + +public: + CABSAim(); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; +}; + +#endif // _CABSAIM diff --git a/include/MetroidPrime/BodyState/CABSReaction.hpp b/include/MetroidPrime/BodyState/CABSReaction.hpp new file mode 100644 index 00000000..c0b8e0c3 --- /dev/null +++ b/include/MetroidPrime/BodyState/CABSReaction.hpp @@ -0,0 +1,21 @@ +#ifndef _CABSREACTION +#define _CABSREACTION + +#include "MetroidPrime/BodyState/CAdditiveBodyState.hpp" + +class CABSReaction : public CAdditiveBodyState { + float x4_weight; + s32 x8_anim; + pas::EAdditiveReactionType xc_type; + bool x10_active; + pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc) const; + void StopAnimation(CBodyController& bc); + +public: + CABSReaction(); + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override { StopAnimation(bc); } +}; + +#endif // _CABSREACTION diff --git a/include/MetroidPrime/BodyState/CBSLocomotion.hpp b/include/MetroidPrime/BodyState/CBSLocomotion.hpp new file mode 100644 index 00000000..b81a73a6 --- /dev/null +++ b/include/MetroidPrime/BodyState/CBSLocomotion.hpp @@ -0,0 +1,28 @@ +#ifndef _CBSLOCOMOTION +#define _CBSLOCOMOTION + +#include "MetroidPrime/BodyState/CBodyState.hpp" + +#include "rstl/pair.hpp" + +class CBSLocomotion : public CBodyState { +protected: + pas::ELocomotionType x4_locomotionType; + float GetStartVelocityMagnitude(const CBodyController& bc) const; + void ReStartBodyState(CBodyController& bc, bool maintainVel); + float ComputeWeightPercentage(const rstl::pair& a, const rstl::pair& b, float f) const; + +public: + bool IsMoving() const override = 0; + bool CanShoot() const override { return true; } + void Start(CBodyController& bc, CStateManager& mgr) override; + pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override; + void Shutdown(CBodyController& bc) override; + virtual bool IsPitchable() const { return false; } + virtual float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotionAnim anim) const = 0; + virtual float ApplyLocomotionPhysics(float dt, CBodyController& bc); + virtual float UpdateLocomotionAnimation(float dt, float velMag, CBodyController& bc, bool init) = 0; + virtual pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc); +}; + +#endif // _CBSLOCOMOTION diff --git a/include/MetroidPrime/BodyState/CBodyController.hpp b/include/MetroidPrime/BodyState/CBodyController.hpp index ba5e8f30..b6fb4aee 100644 --- a/include/MetroidPrime/BodyState/CBodyController.hpp +++ b/include/MetroidPrime/BodyState/CBodyController.hpp @@ -2,6 +2,9 @@ #define _CBODYCONTROLLER #include "MetroidPrime/BodyState/CBodyStateCmdMgr.hpp" +#include "MetroidPrime/BodyState/CBodyStateInfo.hpp" + +#include "Kyoto/Math/CQuaternion.hpp" class CActor; class CPASDatabase; @@ -22,16 +25,16 @@ public: void SetCurrentAnimation(const CAnimPlaybackParms& parms, bool loop, bool noTrans); bool IsAnimationOver() const { return x300_24_animationOver; } + pas::ELocomotionType GetLocomotionType() const { return x2ec_locomotionType; } private: CActor& x0_actor; CBodyStateCmdMgr x4_cmdMgr; - uchar x2a4_pad[0x54]; - // CBodyStateInfo x2a4_bodyStateInfo; - // CQuaternion x2dc_rot; - // pas::ELocomotionType x2ec_locomotionType ; - // pas::EFallState x2f0_fallState ; - // EBodyType x2f4_bodyType; + CBodyStateInfo x2a4_bodyStateInfo; + CQuaternion x2dc_rot; + pas::ELocomotionType x2ec_locomotionType ; + pas::EFallState x2f0_fallState ; + EBodyType x2f4_bodyType; int x2f8_curAnim ; float x2fc_turnSpeed; bool x300_24_animationOver : 1; diff --git a/include/MetroidPrime/BodyState/CBodyStateInfo.hpp b/include/MetroidPrime/BodyState/CBodyStateInfo.hpp new file mode 100644 index 00000000..bf1c332d --- /dev/null +++ b/include/MetroidPrime/BodyState/CBodyStateInfo.hpp @@ -0,0 +1,55 @@ +#ifndef _CBODYSTATEINFO +#define _CBODYSTATEINFO + +#include "Kyoto/Animation/CharacterCommon.hpp" + +#include "rstl/map.hpp" +#include "rstl/auto_ptr.hpp" +#include "rstl/vector.hpp" + +class CAdditiveBodyState; +class CBodyController; +class CBodyState; +class CActor; + +class CBodyStateInfo { +public: + CBodyStateInfo(CActor& actor, EBodyType type); + ~CBodyStateInfo(); + + float GetMaximumPitch() const { return x30_maxPitch; } + void SetMaximumPitch(float pitch) { x30_maxPitch = pitch; } + bool GetLocoAnimChangeAtEndOfAnimOnly() const { return x34_24_changeLocoAtEndOfAnimOnly; } + void SetLocoAnimChangeAtEndOfAnimOnly(bool s) { x34_24_changeLocoAtEndOfAnimOnly = s; } + pas::EAnimationState GetCurrentStateId() const { return x14_state; } + pas::EAnimationState GetCurrentAdditiveStateId() const { return x2c_additiveState; } + + void SetState(pas::EAnimationState s); + const CBodyState* GetCurrentState() const; + CBodyState* GetCurrentState(); + bool ApplyHeadTracking() const; + void SetAdditiveState(pas::EAnimationState s); + CAdditiveBodyState* GetCurrentAdditiveState(); + float GetMaxSpeed() const; + float GetLocomotionSpeed(pas::ELocomotionAnim anim) const; + +private: + friend class CBodyController; + rstl::map< int, CBodyState* > x0_stateMap; + pas::EAnimationState x14_state; + CBodyController* x18_bodyController; + rstl::vector< rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > > > x1c_additiveStates; + pas::EAnimationState x2c_additiveState; + float x30_maxPitch; + bool x34_24_changeLocoAtEndOfAnimOnly : 1; + + CBodyState* SetupRestrictedFlyerBodyStates(int stateId, CActor& actor); + CBodyState* SetupNewFlyerBodyStates(int stateId, CActor& actor); + CBodyState* SetupWallWalkerBodyStates(int stateId, CActor& actor); + CBodyState* SetupFlyerBodyStates(int stateId, CActor& actor); + CBodyState* SetupPitchableFlyerBodyStates(int, CActor&); + CBodyState* SetupRestrictedBodyStates(int stateId, CActor& actor); + CBodyState* SetupBiPedalBodyStates(int stateId, CActor& actor); +}; + +#endif // _CBODYSTATEINFO diff --git a/include/MetroidPrime/CCharacterInfo.hpp b/include/MetroidPrime/CCharacterInfo.hpp index b5fca094..0be0ce62 100644 --- a/include/MetroidPrime/CCharacterInfo.hpp +++ b/include/MetroidPrime/CCharacterInfo.hpp @@ -23,7 +23,7 @@ public: rstl::vector< CAssetId > x30_elsc; }; - const CPASDatabase& GetPASDatabase() const; // { return x30_pasDatabase; } + const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; } private: ushort x0_tableCount; diff --git a/include/rstl/red_black_tree.hpp b/include/rstl/red_black_tree.hpp index d7931f1d..82f7f923 100644 --- a/include/rstl/red_black_tree.hpp +++ b/include/rstl/red_black_tree.hpp @@ -54,11 +54,9 @@ private: node* get_right() { return mRight; } void set_right(node* n) { mRight = n; } }; - struct header { - node* mLeftmost; - node* mRightmost; - node* mRootNode; - + class header { + public: + header() : mLeftmost(nullptr), mRightmost(nullptr), mRootNode(nullptr) {} void set_root(node* n) { mRootNode = n; } void set_leftmost(node* n) { mLeftmost = n; } void set_rightmost(node* n) { mRightmost = n; } @@ -66,6 +64,11 @@ private: node* get_root() const { return mRootNode; } node* get_leftmost() const { return mLeftmost; } node* get_rightmost() const { return mRightmost; } + + private: + node* mLeftmost; + node* mRightmost; + node* mRootNode; }; public: @@ -103,6 +106,9 @@ public: iterator(node* node, const header* header, bool b) : const_iterator(node, header, b) {} }; + red_black_tree() : x0_(0), x1_(0), x4_count(0) {} + ~red_black_tree() { clear(); } + iterator insert_into(node* n, const P& item); iterator insert(const P& item) { return insert_into(x8_header.get_root(), item); } @@ -119,7 +125,7 @@ public: node* n = x8_header.get_root(); node* needle = nullptr; while (n != nullptr) { - if (!x1_cmp(x2_selector(*n->get_value()), key)) { + if (!x2_cmp(x3_selector(*n->get_value()), key)) { needle = n; n = n->get_left(); } else { @@ -127,7 +133,7 @@ public: } } bool noResult = false; - if (needle == nullptr || x1_cmp(key, x2_selector(*needle->get_value()))) { + if (needle == nullptr || x2_cmp(key, x3_selector(*needle->get_value()))) { noResult = true; } if (noResult) { @@ -137,7 +143,6 @@ public: } void clear() { - // x0_allocator.deallocate(x10_rootNode); node* root = x8_header.get_root(); if (root != nullptr) { free_node_and_sub_nodes(root); @@ -148,18 +153,17 @@ public: x4_count = 0; } - ~red_black_tree() { clear(); } - private: - Alloc x0_allocator; - Cmp x1_cmp; - S x2_selector; + uchar x0_; + uchar x1_; + Cmp x2_cmp; + S x3_selector; int x4_count; header x8_header; node* create_node(node* left, node* right, node* parent, node_color color, const P& value) { node* n; - x0_allocator.allocate(n, 1); + Alloc::allocate(n, 1); new (n) node(left, right, parent, color, value); return n; } @@ -176,7 +180,7 @@ private: void free_node(node* n) { n->~node(); - x0_allocator.deallocate(n); + Alloc::deallocate(n); } void rebalance(node* n) { rbtree_rebalance(&x8_header, n); } @@ -199,8 +203,8 @@ red_black_tree< T, P, U, S, Cmp, Alloc >::insert_into(node* n, const P& item) { } else { node* newNode = nullptr; while (newNode == nullptr) { - bool firstComp = x1_cmp(x2_selector(*n->get_value()), x2_selector(item)); - if (!firstComp && !x1_cmp(x2_selector(item), x2_selector(*n->get_value()))) { + bool firstComp = x2_cmp(x3_selector(*n->get_value()), x3_selector(item)); + if (!firstComp && !x2_cmp(x3_selector(item), x3_selector(*n->get_value()))) { return iterator(n, &x8_header, kUnknownValueEqualKey); } if (firstComp) { diff --git a/src/MetroidPrime/BodyState/CBodyStateInfo.cpp b/src/MetroidPrime/BodyState/CBodyStateInfo.cpp new file mode 100644 index 00000000..3e468414 --- /dev/null +++ b/src/MetroidPrime/BodyState/CBodyStateInfo.cpp @@ -0,0 +1,213 @@ +#include "MetroidPrime/BodyState/CBodyStateInfo.hpp" + +#include "MetroidPrime/BodyState/CABSAim.hpp" +#include "MetroidPrime/BodyState/CABSFlinch.hpp" +#include "MetroidPrime/BodyState/CABSIdle.hpp" +#include "MetroidPrime/BodyState/CABSReaction.hpp" +#include "MetroidPrime/BodyState/CBodyController.hpp" +#include "MetroidPrime/BodyState/CBSLocomotion.hpp" +#include "MetroidPrime/BodyState/CBSSlide.hpp" + +#include "MetroidPrime/CActor.hpp" +#include "MetroidPrime/CAnimData.hpp" +#include "MetroidPrime/CModelData.hpp" + +#include "Kyoto/Animation/CPASDatabase.hpp" +#include "Kyoto/Math/CloseEnough.hpp" + +CBodyStateInfo::CBodyStateInfo(CActor& actor, EBodyType type) +: x14_state(pas::kAS_Invalid) +, x18_bodyController(nullptr) +, x2c_additiveState(pas::kAS_AdditiveIdle) +, x30_maxPitch(0.0f) +, x34_24_changeLocoAtEndOfAnimOnly(false) +{ + const CPASDatabase& pasDatabase = + actor.GetModelData()->GetAnimationData()->GetCharacterInfo().GetPASDatabase(); + for (size_t i = 0; i < pasDatabase.GetNumAnimStates(); ++i) { + const CPASAnimState* state = pasDatabase.GetAnimStateByIndex(i); + CBodyState* bs; + switch (type) { + case kBT_BiPedal: + bs = SetupBiPedalBodyStates(state->GetStateId(), actor); + break; + case kBT_Restricted: + bs = SetupRestrictedBodyStates(state->GetStateId(), actor); + break; + case kBT_Flyer: + bs = SetupFlyerBodyStates(state->GetStateId(), actor); + break; + case kBT_Pitchable: + bs = SetupPitchableFlyerBodyStates(state->GetStateId(), actor); + break; + case kBT_WallWalker: + bs = SetupWallWalkerBodyStates(state->GetStateId(), actor); + break; + case kBT_NewFlyer: + bs = SetupNewFlyerBodyStates(state->GetStateId(), actor); + break; + case kBT_RestrictedFlyer: + bs = SetupRestrictedFlyerBodyStates(state->GetStateId(), actor); + break; + default: + bs = SetupRestrictedBodyStates(state->GetStateId(), actor); + break; + } + + if (bs) + x0_stateMap.insert(rstl::pair< int, CBodyState* >(state->GetStateId(), bs)); + } + + x1c_additiveStates.reserve(4); + x1c_additiveStates.push_back(rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > >( + pas::kAS_AdditiveIdle, new CABSIdle())); + x1c_additiveStates.push_back( + rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > >(pas::kAS_AdditiveAim, new CABSAim())); + x1c_additiveStates.push_back(rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > >( + pas::kAS_AdditiveIdle, new CABSFlinch())); + x1c_additiveStates.push_back(rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > >( + pas::kAS_AdditiveReaction, new CABSReaction())); +} + +CBodyStateInfo::~CBodyStateInfo() { + for (rstl::map< int, CBodyState* >::const_iterator it = x0_stateMap.begin(); + it != x0_stateMap.end(); ++it) { + delete it->second; + } +} + +void CBodyStateInfo::SetState(pas::EAnimationState s) { + rstl::map< int, CBodyState* >::const_iterator search = x0_stateMap.find(s); + if (search != x0_stateMap.end()) { + x14_state = s; + } +} + +const CBodyState* CBodyStateInfo::GetCurrentState() const { + rstl::map< int, CBodyState* >::const_iterator search = x0_stateMap.find(x14_state); + // if (search == x0_stateMap.end()) + // return nullptr; + return search->second; +} + +CBodyState* CBodyStateInfo::GetCurrentState() { + rstl::map< int, CBodyState* >::const_iterator search = x0_stateMap.find(x14_state); + // if (search == x0_stateMap.end()) + // return nullptr; + return search->second; +} + +bool CBodyStateInfo::ApplyHeadTracking() const { + if (x14_state != pas::kAS_Invalid) + return GetCurrentState()->ApplyHeadTracking(); + return false; +} + +void CBodyStateInfo::SetAdditiveState(pas::EAnimationState s) { + for (int i = 0; i < x1c_additiveStates.size(); ++i) { + if (s == x1c_additiveStates[i].first) { + x2c_additiveState = s; + return; + } + } +} + +CAdditiveBodyState* CBodyStateInfo::GetCurrentAdditiveState() { + CAdditiveBodyState* result = nullptr; + for (int i = 0; i < x1c_additiveStates.size(); ++i) { + const rstl::pair< int, rstl::auto_ptr< CAdditiveBodyState > >& it = x1c_additiveStates[i]; + if (x2c_additiveState == x1c_additiveStates[i].first) { + result = x1c_additiveStates[i].second.get(); + break; + } + } + return result; +} + +float CBodyStateInfo::GetMaxSpeed() const { + float ret = GetLocomotionSpeed(pas::kLA_Run); + if (close_enough(ret, 0.f)) { + for (int i = 0; i <= pas::kLA_StrafeDown; ++i) { + float tmp = GetLocomotionSpeed(pas::ELocomotionAnim(i)); + if (tmp > ret) + ret = tmp; + } + } + return ret; +} + +float CBodyStateInfo::GetLocomotionSpeed(pas::ELocomotionAnim anim) const { + rstl::map< int, CBodyState* >::const_iterator search = x0_stateMap.find(pas::kAS_Locomotion); + if (search != x0_stateMap.end() && search->second && x18_bodyController) { + const CBSLocomotion& bs = static_cast< const CBSLocomotion& >(*search->second); + return bs.GetLocomotionSpeed(x18_bodyController->GetLocomotionType(), anim); + } + return 0.f; +} + +CBodyState* CBodyStateInfo::SetupBiPedalBodyStates(int stateId, CActor& actor) { + switch (stateId) { + // case pas::kAS_Fall: + // return new CBSFall(); + // case pas::kAS_Getup: + // return new CBSGetup(); + // case pas::kAS_LieOnGround: + // return new CBSLieOnGround(actor); + // case pas::kAS_Step: + // return new CBSStep(); + // case pas::kAS_Death: + // return new CBSDie(); + // case pas::kAS_Locomotion: + // return new CBSBiPedLocomotion(actor); + // case pas::kAS_KnockBack: + // return new CBSKnockBack(); + // case pas::kAS_MeleeAttack: + // return new CBSAttack(); + // case pas::kAS_ProjectileAttack: + // return new CBSProjectileAttack(); + // case pas::kAS_LoopAttack: + // return new CBSLoopAttack(); + // case pas::kAS_Turn: + // return new CBSTurn(); + // case pas::kAS_LoopReaction: + // return new CBSLoopReaction(); + // case pas::kAS_GroundHit: + // return new CBSGroundHit(); + // case pas::kAS_Generate: + // return new CBSGenerate(); + // case pas::kAS_Jump: + // return new CBSJump(); + // case pas::kAS_Hurled: + // return new CBSHurled(); + case pas::kAS_Slide: + return new CBSSlide(); + // case pas::kAS_Taunt: + // return new CBSTaunt(); + // case pas::kAS_Scripted: + // return new CBSScripted(); + // case pas::kAS_Cover: + // return new CBSCover(); + // case pas::kAS_WallHang: + // return new CBSWallHang(); + default: + return nullptr; + } +} + +CBodyState* CBodyStateInfo::SetupRestrictedBodyStates(int stateId, CActor& actor) { + return nullptr; +} + +CBodyState* CBodyStateInfo::SetupFlyerBodyStates(int stateId, CActor& actor) { return nullptr; } + +CBodyState* CBodyStateInfo::SetupPitchableFlyerBodyStates(int, CActor&) { return nullptr; } + +CBodyState* CBodyStateInfo::SetupWallWalkerBodyStates(int stateId, CActor& actor) { + return nullptr; +} + +CBodyState* CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, CActor& actor) { return nullptr; } + +CBodyState* CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) { + return nullptr; +}