Add CBSSlide very close to matching

Former-commit-id: 4db5549046
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-25 02:29:11 +03:00
parent bc4fc09262
commit 4a7fe9a91c
33 changed files with 480 additions and 168 deletions

View File

@ -60,8 +60,8 @@ __dt__9CBSAttackFv:
lbl_80134E20:
/* 80134E20 00131D80 28 1F 00 00 */ cmplwi r31, 0
/* 80134E24 00131D84 41 82 00 10 */ beq lbl_80134E34
/* 80134E28 00131D88 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80134E2C 00131D8C 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80134E28 00131D88 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80134E2C 00131D8C 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80134E30 00131D90 90 1F 00 00 */ stw r0, 0(r31)
lbl_80134E34:
/* 80134E34 00131D94 7C 80 07 35 */ extsh. r0, r4
@ -593,9 +593,9 @@ lbl_80135584:
.global __ct__9CBSAttackFv
__ct__9CBSAttackFv:
/* 80135598 001324F8 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 80135598 001324F8 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 8013559C 001324FC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801355A0 00132500 38 05 13 18 */ addi r0, r5, lbl_803E1318@l
/* 801355A0 00132500 38 05 13 18 */ addi r0, r5, __vt__10CBodyState@l
/* 801355A4 00132504 3C C0 80 5A */ lis r6, sZeroVector__9CVector3f@ha
/* 801355A8 00132508 3C 80 80 3E */ lis r4, lbl_803E1370@ha
/* 801355AC 0013250C 90 03 00 00 */ stw r0, 0(r3)

View File

@ -35,8 +35,8 @@ __dt__8CBSCoverFv:
/* 80175CF4 00172C54 38 03 3E 48 */ addi r0, r3, lbl_803E3E48@l
/* 80175CF8 00172C58 90 1F 00 00 */ stw r0, 0(r31)
/* 80175CFC 00172C5C 41 82 00 10 */ beq lbl_80175D0C
/* 80175D00 00172C60 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80175D04 00172C64 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80175D00 00172C60 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80175D04 00172C64 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80175D08 00172C68 90 1F 00 00 */ stw r0, 0(r31)
lbl_80175D0C:
/* 80175D0C 00172C6C 7C 80 07 35 */ extsh. r0, r4
@ -580,9 +580,9 @@ lbl_80176484:
.global __ct__8CBSCoverFv
__ct__8CBSCoverFv:
/* 80176498 001733F8 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 80176498 001733F8 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 8017649C 001733FC 3C A0 80 3E */ lis r5, lbl_803E3E48@ha
/* 801764A0 00173400 38 06 13 18 */ addi r0, r6, lbl_803E1318@l
/* 801764A0 00173400 38 06 13 18 */ addi r0, r6, __vt__10CBodyState@l
/* 801764A4 00173404 38 80 FF FF */ li r4, -1
/* 801764A8 00173408 90 03 00 00 */ stw r0, 0(r3)
/* 801764AC 0017340C 38 A5 3E 48 */ addi r5, r5, lbl_803E3E48@l

View File

@ -35,8 +35,8 @@ __dt__6CBSDieFv:
/* 80135668 001325C8 38 03 13 A8 */ addi r0, r3, lbl_803E13A8@l
/* 8013566C 001325CC 90 1F 00 00 */ stw r0, 0(r31)
/* 80135670 001325D0 41 82 00 10 */ beq lbl_80135680
/* 80135674 001325D4 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80135678 001325D8 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80135674 001325D4 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80135678 001325D8 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013567C 001325DC 90 1F 00 00 */ stw r0, 0(r31)
lbl_80135680:
/* 80135680 001325E0 7C 80 07 35 */ extsh. r0, r4
@ -231,9 +231,9 @@ lbl_801358F0:
.global __ct__6CBSDieFv
__ct__6CBSDieFv:
/* 8013590C 0013286C 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 8013590C 0013286C 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 80135910 00132870 3C 80 80 3E */ lis r4, lbl_803E13A8@ha
/* 80135914 00132874 38 05 13 18 */ addi r0, r5, lbl_803E1318@l
/* 80135914 00132874 38 05 13 18 */ addi r0, r5, __vt__10CBodyState@l
/* 80135918 00132878 C0 02 99 B0 */ lfs f0, lbl_805AB6D0@sda21(r2)
/* 8013591C 0013287C 90 03 00 00 */ stw r0, 0(r3)
/* 80135920 00132880 38 84 13 A8 */ addi r4, r4, lbl_803E13A8@l

View File

@ -35,8 +35,8 @@ __dt__7CBSFallFv:
/* 80135954 001328B4 38 03 13 E0 */ addi r0, r3, lbl_803E13E0@l
/* 80135958 001328B8 90 1F 00 00 */ stw r0, 0(r31)
/* 8013595C 001328BC 41 82 00 10 */ beq lbl_8013596C
/* 80135960 001328C0 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80135964 001328C4 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80135960 001328C0 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80135964 001328C4 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80135968 001328C8 90 1F 00 00 */ stw r0, 0(r31)
lbl_8013596C:
/* 8013596C 001328CC 7C 80 07 35 */ extsh. r0, r4
@ -387,9 +387,9 @@ lbl_80135E3C:
.global __ct__7CBSFallFv
__ct__7CBSFallFv:
/* 80135E58 00132DB8 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 80135E58 00132DB8 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 80135E5C 00132DBC 3C 80 80 3E */ lis r4, lbl_803E13E0@ha
/* 80135E60 00132DC0 38 05 13 18 */ addi r0, r5, lbl_803E1318@l
/* 80135E60 00132DC0 38 05 13 18 */ addi r0, r5, __vt__10CBodyState@l
/* 80135E64 00132DC4 C0 02 99 C0 */ lfs f0, lbl_805AB6E0@sda21(r2)
/* 80135E68 00132DC8 90 03 00 00 */ stw r0, 0(r3)
/* 80135E6C 00132DCC 38 84 13 E0 */ addi r4, r4, lbl_803E13E0@l

View File

@ -35,8 +35,8 @@ __dt__11CBSGenerateFv:
/* 801466D0 00143630 38 03 20 40 */ addi r0, r3, lbl_803E2040@l
/* 801466D4 00143634 90 1F 00 00 */ stw r0, 0(r31)
/* 801466D8 00143638 41 82 00 10 */ beq lbl_801466E8
/* 801466DC 0014363C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 801466E0 00143640 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 801466DC 0014363C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 801466E0 00143640 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 801466E4 00143644 90 1F 00 00 */ stw r0, 0(r31)
lbl_801466E8:
/* 801466E8 00143648 7C 80 07 35 */ extsh. r0, r4
@ -306,9 +306,9 @@ lbl_80146A7C:
.global __ct__11CBSGenerateFv
__ct__11CBSGenerateFv:
/* 80146A90 001439F0 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 80146A90 001439F0 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 80146A94 001439F4 3C 80 80 3E */ lis r4, lbl_803E2040@ha
/* 80146A98 001439F8 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 80146A98 001439F8 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 80146A9C 001439FC 90 A3 00 00 */ stw r5, 0(r3)
/* 80146AA0 00143A00 38 04 20 40 */ addi r0, r4, lbl_803E2040@l
/* 80146AA4 00143A04 90 03 00 00 */ stw r0, 0(r3)

View File

@ -35,8 +35,8 @@ __dt__8CBSGetupFv:
/* 80135EA4 00132E04 38 03 14 18 */ addi r0, r3, lbl_803E1418@l
/* 80135EA8 00132E08 90 1F 00 00 */ stw r0, 0(r31)
/* 80135EAC 00132E0C 41 82 00 10 */ beq lbl_80135EBC
/* 80135EB0 00132E10 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80135EB4 00132E14 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80135EB0 00132E10 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80135EB4 00132E14 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80135EB8 00132E18 90 1F 00 00 */ stw r0, 0(r31)
lbl_80135EBC:
/* 80135EBC 00132E1C 7C 80 07 35 */ extsh. r0, r4
@ -266,9 +266,9 @@ lbl_801361C4:
.global __ct__8CBSGetupFv
__ct__8CBSGetupFv:
/* 801361D8 00133138 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 801361D8 00133138 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 801361DC 0013313C 3C 80 80 3E */ lis r4, lbl_803E1418@ha
/* 801361E0 00133140 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 801361E0 00133140 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 801361E4 00133144 38 00 FF FF */ li r0, -1
/* 801361E8 00133148 90 A3 00 00 */ stw r5, 0(r3)
/* 801361EC 0013314C 38 84 14 18 */ addi r4, r4, lbl_803E1418@l

View File

@ -35,8 +35,8 @@ __dt__12CBSGroundHitFv:
/* 8013ED78 0013BCD8 38 03 18 B0 */ addi r0, r3, lbl_803E18B0@l
/* 8013ED7C 0013BCDC 90 1F 00 00 */ stw r0, 0(r31)
/* 8013ED80 0013BCE0 41 82 00 10 */ beq lbl_8013ED90
/* 8013ED84 0013BCE4 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013ED88 0013BCE8 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8013ED84 0013BCE4 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8013ED88 0013BCE8 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013ED8C 0013BCEC 90 1F 00 00 */ stw r0, 0(r31)
lbl_8013ED90:
/* 8013ED90 0013BCF0 7C 80 07 35 */ extsh. r0, r4
@ -406,9 +406,9 @@ lbl_8013F2A4:
.global __ct__12CBSGroundHitFv
__ct__12CBSGroundHitFv:
/* 8013F2C0 0013C220 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 8013F2C0 0013C220 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 8013F2C4 0013C224 3C 80 80 3E */ lis r4, lbl_803E18B0@ha
/* 8013F2C8 0013C228 38 05 13 18 */ addi r0, r5, lbl_803E1318@l
/* 8013F2C8 0013C228 38 05 13 18 */ addi r0, r5, __vt__10CBodyState@l
/* 8013F2CC 0013C22C C0 02 9B 28 */ lfs f0, lbl_805AB848@sda21(r2)
/* 8013F2D0 0013C230 90 03 00 00 */ stw r0, 0(r3)
/* 8013F2D4 0013C234 38 84 18 B0 */ addi r4, r4, lbl_803E18B0@l

View File

@ -47,8 +47,8 @@ __dt__9CBSHurledFv:
/* 80144428 00141388 38 03 1F B0 */ addi r0, r3, lbl_803E1FB0@l
/* 8014442C 0014138C 90 1F 00 00 */ stw r0, 0(r31)
/* 80144430 00141390 41 82 00 10 */ beq lbl_80144440
/* 80144434 00141394 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80144438 00141398 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80144434 00141394 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80144438 00141398 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8014443C 0014139C 90 1F 00 00 */ stw r0, 0(r31)
lbl_80144440:
/* 80144440 001413A0 7C 80 07 35 */ extsh. r0, r4
@ -1272,9 +1272,9 @@ IsInAir__9CBSHurledCFRC15CBodyController:
.global __ct__9CBSHurledFv
__ct__9CBSHurledFv:
/* 801455A0 00142500 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 801455A0 00142500 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 801455A4 00142504 3C A0 80 3E */ lis r5, lbl_803E1FB0@ha
/* 801455A8 00142508 38 06 13 18 */ addi r0, r6, lbl_803E1318@l
/* 801455A8 00142508 38 06 13 18 */ addi r0, r6, __vt__10CBodyState@l
/* 801455AC 0014250C C0 22 9C 28 */ lfs f1, lbl_805AB948@sda21(r2)
/* 801455B0 00142510 90 03 00 00 */ stw r0, 0(r3)
/* 801455B4 00142514 38 C5 1F B0 */ addi r6, r5, lbl_803E1FB0@l

View File

@ -35,8 +35,8 @@ __dt__7CBSJumpFv:
/* 8014562C 0014258C 38 03 20 08 */ addi r0, r3, lbl_803E2008@l
/* 80145630 00142590 90 1F 00 00 */ stw r0, 0(r31)
/* 80145634 00142594 41 82 00 10 */ beq lbl_80145644
/* 80145638 00142598 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8014563C 0014259C 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80145638 00142598 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8014563C 0014259C 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80145640 001425A0 90 1F 00 00 */ stw r0, 0(r31)
lbl_80145644:
/* 80145644 001425A4 7C 80 07 35 */ extsh. r0, r4
@ -1152,9 +1152,9 @@ lbl_801465F8:
.global __ct__7CBSJumpFv
__ct__7CBSJumpFv:
/* 80146600 00143560 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 80146600 00143560 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 80146604 00143564 3C A0 80 3E */ lis r5, lbl_803E2008@ha
/* 80146608 00143568 38 06 13 18 */ addi r0, r6, lbl_803E1318@l
/* 80146608 00143568 38 06 13 18 */ addi r0, r6, __vt__10CBodyState@l
/* 8014660C 0014356C 3C 80 80 5A */ lis r4, sZeroVector__9CVector3f@ha
/* 80146610 00143570 90 03 00 00 */ stw r0, 0(r3)
/* 80146614 00143574 38 C5 20 08 */ addi r6, r5, lbl_803E2008@l

View File

@ -35,8 +35,8 @@ __dt__12CBSKnockBackFv:
/* 80136218 00133178 38 03 14 50 */ addi r0, r3, lbl_803E1450@l
/* 8013621C 0013317C 90 1F 00 00 */ stw r0, 0(r31)
/* 80136220 00133180 41 82 00 10 */ beq lbl_80136230
/* 80136224 00133184 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80136228 00133188 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80136224 00133184 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80136228 00133188 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013622C 0013318C 90 1F 00 00 */ stw r0, 0(r31)
lbl_80136230:
/* 80136230 00133190 7C 80 07 35 */ extsh. r0, r4
@ -429,9 +429,9 @@ lbl_80136784:
.global __ct__12CBSKnockBackFv
__ct__12CBSKnockBackFv:
/* 801367A0 00133700 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 801367A0 00133700 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 801367A4 00133704 3C 80 80 3E */ lis r4, lbl_803E1450@ha
/* 801367A8 00133708 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 801367A8 00133708 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 801367AC 0013370C C0 02 99 FC */ lfs f0, lbl_805AB71C@sda21(r2)
/* 801367B0 00133710 90 A3 00 00 */ stw r5, 0(r3)
/* 801367B4 00133714 38 04 14 50 */ addi r0, r4, lbl_803E1450@l

View File

@ -35,8 +35,8 @@ __dt__14CBSLieOnGroundFv:
/* 801367E8 00133748 38 03 14 88 */ addi r0, r3, lbl_803E1488@l
/* 801367EC 0013374C 90 1F 00 00 */ stw r0, 0(r31)
/* 801367F0 00133750 41 82 00 10 */ beq lbl_80136800
/* 801367F4 00133754 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 801367F8 00133758 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 801367F4 00133754 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 801367F8 00133758 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 801367FC 0013375C 90 1F 00 00 */ stw r0, 0(r31)
lbl_80136800:
/* 80136800 00133760 7C 80 07 35 */ extsh. r0, r4
@ -251,10 +251,10 @@ lbl_80136ABC:
__ct__14CBSLieOnGroundFRC6CActor:
/* 80136ADC 00133A3C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80136AE0 00133A40 7C 08 02 A6 */ mflr r0
/* 80136AE4 00133A44 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 80136AE4 00133A44 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 80136AE8 00133A48 3C A0 80 3E */ lis r5, lbl_803E1488@ha
/* 80136AEC 00133A4C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80136AF0 00133A50 38 C6 13 18 */ addi r6, r6, lbl_803E1318@l
/* 80136AF0 00133A50 38 C6 13 18 */ addi r6, r6, __vt__10CBodyState@l
/* 80136AF4 00133A54 38 05 14 88 */ addi r0, r5, lbl_803E1488@l
/* 80136AF8 00133A58 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80136AFC 00133A5C 7C 7F 1B 78 */ mr r31, r3

View File

@ -301,8 +301,8 @@ lbl_80136BE0:
/* 80136BEC 00133B4C 38 03 16 CC */ addi r0, r3, lbl_803E16CC@l
/* 80136BF0 00133B50 90 1F 00 00 */ stw r0, 0(r31)
/* 80136BF4 00133B54 41 82 00 10 */ beq lbl_80136C04
/* 80136BF8 00133B58 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80136BFC 00133B5C 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80136BF8 00133B58 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80136BFC 00133B5C 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80136C00 00133B60 90 1F 00 00 */ stw r0, 0(r31)
lbl_80136C04:
/* 80136C04 00133B64 7C 80 07 35 */ extsh. r0, r4
@ -451,8 +451,8 @@ lbl_80136DC4:
/* 80136DD0 00133D30 38 03 16 CC */ addi r0, r3, lbl_803E16CC@l
/* 80136DD4 00133D34 90 1F 00 00 */ stw r0, 0(r31)
/* 80136DD8 00133D38 41 82 00 10 */ beq lbl_80136DE8
/* 80136DDC 00133D3C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80136DE0 00133D40 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80136DDC 00133D3C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80136DE0 00133D40 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80136DE4 00133D44 90 1F 00 00 */ stw r0, 0(r31)
lbl_80136DE8:
/* 80136DE8 00133D48 7C 80 07 35 */ extsh. r0, r4
@ -703,8 +703,8 @@ lbl_80137130:
/* 8013713C 0013409C 38 03 16 CC */ addi r0, r3, lbl_803E16CC@l
/* 80137140 001340A0 90 1F 00 00 */ stw r0, 0(r31)
/* 80137144 001340A4 41 82 00 10 */ beq lbl_80137154
/* 80137148 001340A8 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013714C 001340AC 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80137148 001340A8 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8013714C 001340AC 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80137150 001340B0 90 1F 00 00 */ stw r0, 0(r31)
lbl_80137154:
/* 80137154 001340B4 7C 80 07 35 */ extsh. r0, r4
@ -1193,8 +1193,8 @@ __dt__13CBSLocomotionFv:
/* 80137818 00134778 38 03 16 CC */ addi r0, r3, lbl_803E16CC@l
/* 8013781C 0013477C 90 1F 00 00 */ stw r0, 0(r31)
/* 80137820 00134780 41 82 00 10 */ beq lbl_80137830
/* 80137824 00134784 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80137828 00134788 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80137824 00134784 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80137828 00134788 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013782C 0013478C 90 1F 00 00 */ stw r0, 0(r31)
lbl_80137830:
/* 80137830 00134790 7C 80 07 35 */ extsh. r0, r4
@ -2643,9 +2643,9 @@ lbl_80138C18:
.global __ct__13CBSLocomotionFv
__ct__13CBSLocomotionFv:
/* 80138C30 00135B90 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 80138C30 00135B90 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 80138C34 00135B94 3C 80 80 3E */ lis r4, lbl_803E16CC@ha
/* 80138C38 00135B98 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 80138C38 00135B98 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 80138C3C 00135B9C 38 00 FF FF */ li r0, -1
/* 80138C40 00135BA0 90 A3 00 00 */ stw r5, 0(r3)
/* 80138C44 00135BA4 38 84 16 CC */ addi r4, r4, lbl_803E16CC@l

View File

@ -35,8 +35,8 @@ __dt__13CBSLoopAttackFv:
/* 8013AEE8 00137E48 38 03 17 C8 */ addi r0, r3, lbl_803E17C8@l
/* 8013AEEC 00137E4C 90 1F 00 00 */ stw r0, 0(r31)
/* 8013AEF0 00137E50 41 82 00 10 */ beq lbl_8013AF00
/* 8013AEF4 00137E54 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013AEF8 00137E58 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8013AEF4 00137E54 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8013AEF8 00137E58 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013AEFC 00137E5C 90 1F 00 00 */ stw r0, 0(r31)
lbl_8013AF00:
/* 8013AF00 00137E60 7C 80 07 35 */ extsh. r0, r4
@ -700,9 +700,9 @@ lbl_8013B81C:
.global __ct__13CBSLoopAttackFv
__ct__13CBSLoopAttackFv:
/* 8013B838 00138798 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 8013B838 00138798 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 8013B83C 0013879C 3C 80 80 3E */ lis r4, lbl_803E17C8@ha
/* 8013B840 001387A0 38 C5 13 18 */ addi r6, r5, lbl_803E1318@l
/* 8013B840 001387A0 38 C5 13 18 */ addi r6, r5, __vt__10CBodyState@l
/* 8013B844 001387A4 38 00 FF FF */ li r0, -1
/* 8013B848 001387A8 90 C3 00 00 */ stw r6, 0(r3)
/* 8013B84C 001387AC 38 A4 17 C8 */ addi r5, r4, lbl_803E17C8@l

View File

@ -35,8 +35,8 @@ __dt__15CBSLoopReactionFv:
/* 8013C064 00138FC4 38 03 18 78 */ addi r0, r3, lbl_803E1878@l
/* 8013C068 00138FC8 90 1F 00 00 */ stw r0, 0(r31)
/* 8013C06C 00138FCC 41 82 00 10 */ beq lbl_8013C07C
/* 8013C070 00138FD0 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013C074 00138FD4 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8013C070 00138FD0 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8013C074 00138FD4 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8013C078 00138FD8 90 1F 00 00 */ stw r0, 0(r31)
lbl_8013C07C:
/* 8013C07C 00138FDC 7C 80 07 35 */ extsh. r0, r4
@ -733,9 +733,9 @@ lbl_8013CA00:
.global __ct__15CBSLoopReactionFv
__ct__15CBSLoopReactionFv:
/* 8013CA20 00139980 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 8013CA20 00139980 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 8013CA24 00139984 3C 80 80 3E */ lis r4, lbl_803E1878@ha
/* 8013CA28 00139988 38 C5 13 18 */ addi r6, r5, lbl_803E1318@l
/* 8013CA28 00139988 38 C5 13 18 */ addi r6, r5, __vt__10CBodyState@l
/* 8013CA2C 0013998C 38 00 FF FF */ li r0, -1
/* 8013CA30 00139990 90 C3 00 00 */ stw r6, 0(r3)
/* 8013CA34 00139994 38 A4 18 78 */ addi r5, r4, lbl_803E1878@l

View File

@ -35,8 +35,8 @@ __dt__19CBSProjectileAttackFv:
/* 8014D3E0 0014A340 38 03 27 D0 */ addi r0, r3, lbl_803E27D0@l
/* 8014D3E4 0014A344 90 1F 00 00 */ stw r0, 0(r31)
/* 8014D3E8 0014A348 41 82 00 10 */ beq lbl_8014D3F8
/* 8014D3EC 0014A34C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8014D3F0 0014A350 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8014D3EC 0014A34C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8014D3F0 0014A350 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8014D3F4 0014A354 90 1F 00 00 */ stw r0, 0(r31)
lbl_8014D3F8:
/* 8014D3F8 0014A358 7C 80 07 35 */ extsh. r0, r4
@ -412,9 +412,9 @@ lbl_8014D908:
.global __ct__19CBSProjectileAttackFv
__ct__19CBSProjectileAttackFv:
/* 8014D92C 0014A88C 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 8014D92C 0014A88C 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 8014D930 0014A890 3C 80 80 3E */ lis r4, lbl_803E27D0@ha
/* 8014D934 0014A894 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 8014D934 0014A894 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 8014D938 0014A898 90 A3 00 00 */ stw r5, 0(r3)
/* 8014D93C 0014A89C 38 04 27 D0 */ addi r0, r4, lbl_803E27D0@l
/* 8014D940 0014A8A0 90 03 00 00 */ stw r0, 0(r3)

View File

@ -35,8 +35,8 @@ __dt__11CBSScriptedFv:
/* 8014B0DC 0014803C 38 03 24 A8 */ addi r0, r3, lbl_803E24A8@l
/* 8014B0E0 00148040 90 1F 00 00 */ stw r0, 0(r31)
/* 8014B0E4 00148044 41 82 00 10 */ beq lbl_8014B0F4
/* 8014B0E8 00148048 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8014B0EC 0014804C 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8014B0E8 00148048 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8014B0EC 0014804C 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8014B0F0 00148050 90 1F 00 00 */ stw r0, 0(r31)
lbl_8014B0F4:
/* 8014B0F4 00148054 7C 80 07 35 */ extsh. r0, r4
@ -257,9 +257,9 @@ Start__11CBSScriptedFR15CBodyControllerR13CStateManager:
.global __ct__11CBSScriptedFv
__ct__11CBSScriptedFv:
/* 8014B3E0 00148340 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 8014B3E0 00148340 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 8014B3E4 00148344 3C A0 80 3E */ lis r5, lbl_803E24A8@ha
/* 8014B3E8 00148348 38 C6 13 18 */ addi r6, r6, lbl_803E1318@l
/* 8014B3E8 00148348 38 C6 13 18 */ addi r6, r6, __vt__10CBodyState@l
/* 8014B3EC 0014834C 38 80 00 00 */ li r4, 0
/* 8014B3F0 00148350 90 C3 00 00 */ stw r6, 0(r3)
/* 8014B3F4 00148354 38 05 24 A8 */ addi r0, r5, lbl_803E24A8@l
@ -285,4 +285,3 @@ lbl_805ABA08:
lbl_805ABA0C:
# ROM: 0x3F82AC
.float 1.0

View File

@ -3,8 +3,8 @@
.section .data
.balign 8
.global lbl_803E1F78
lbl_803E1F78:
.global __vt__8CBSSlide
__vt__8CBSSlide:
# ROM: 0x3DEF78
.4byte 0
.4byte 0
@ -31,12 +31,12 @@ __dt__8CBSSlideFv:
/* 80143F90 00140EF0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80143F94 00140EF4 7C 7F 1B 79 */ or. r31, r3, r3
/* 80143F98 00140EF8 41 82 00 30 */ beq lbl_80143FC8
/* 80143F9C 00140EFC 3C 60 80 3E */ lis r3, lbl_803E1F78@ha
/* 80143FA0 00140F00 38 03 1F 78 */ addi r0, r3, lbl_803E1F78@l
/* 80143F9C 00140EFC 3C 60 80 3E */ lis r3, __vt__8CBSSlide@ha
/* 80143FA0 00140F00 38 03 1F 78 */ addi r0, r3, __vt__8CBSSlide@l
/* 80143FA4 00140F04 90 1F 00 00 */ stw r0, 0(r31)
/* 80143FA8 00140F08 41 82 00 10 */ beq lbl_80143FB8
/* 80143FAC 00140F0C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80143FB0 00140F10 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80143FAC 00140F0C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80143FB0 00140F10 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80143FB4 00140F14 90 1F 00 00 */ stw r0, 0(r31)
lbl_80143FB8:
/* 80143FB8 00140F18 7C 80 07 35 */ extsh. r0, r4
@ -344,12 +344,12 @@ lbl_801443C4:
.global __ct__8CBSSlideFv
__ct__8CBSSlideFv:
/* 801443E8 00141348 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 801443EC 0014134C 3C 80 80 3E */ lis r4, lbl_803E1F78@ha
/* 801443F0 00141350 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 801443E8 00141348 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 801443EC 0014134C 3C 80 80 3E */ lis r4, __vt__8CBSSlide@ha
/* 801443F0 00141350 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 801443F4 00141354 C0 02 9B F0 */ lfs f0, lbl_805AB910@sda21(r2)
/* 801443F8 00141358 90 A3 00 00 */ stw r5, 0(r3)
/* 801443FC 0014135C 38 04 1F 78 */ addi r0, r4, lbl_803E1F78@l
/* 801443FC 0014135C 38 04 1F 78 */ addi r0, r4, __vt__8CBSSlide@l
/* 80144400 00141360 90 03 00 00 */ stw r0, 0(r3)
/* 80144404 00141364 D0 03 00 04 */ stfs f0, 4(r3)
/* 80144408 00141368 4E 80 00 20 */ blr

View File

@ -35,8 +35,8 @@ __dt__7CBSStepFv:
/* 80138DC0 00135D20 38 03 17 18 */ addi r0, r3, lbl_803E1718@l
/* 80138DC4 00135D24 90 1F 00 00 */ stw r0, 0(r31)
/* 80138DC8 00135D28 41 82 00 10 */ beq lbl_80138DD8
/* 80138DCC 00135D2C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80138DD0 00135D30 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80138DCC 00135D2C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80138DD0 00135D30 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80138DD4 00135D34 90 1F 00 00 */ stw r0, 0(r31)
lbl_80138DD8:
/* 80138DD8 00135D38 7C 80 07 35 */ extsh. r0, r4
@ -328,9 +328,9 @@ lbl_80139188:
.global __ct__7CBSStepFv
__ct__7CBSStepFv:
/* 801391A8 00136108 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 801391A8 00136108 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 801391AC 0013610C 3C 80 80 3E */ lis r4, lbl_803E1718@ha
/* 801391B0 00136110 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 801391B0 00136110 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 801391B4 00136114 90 A3 00 00 */ stw r5, 0(r3)
/* 801391B8 00136118 38 04 17 18 */ addi r0, r4, lbl_803E1718@l
/* 801391BC 0013611C 90 03 00 00 */ stw r0, 0(r3)

View File

@ -35,8 +35,8 @@ __dt__8CBSTauntFv:
/* 801492CC 0014622C 38 03 23 90 */ addi r0, r3, lbl_803E2390@l
/* 801492D0 00146230 90 1F 00 00 */ stw r0, 0(r31)
/* 801492D4 00146234 41 82 00 10 */ beq lbl_801492E4
/* 801492D8 00146238 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 801492DC 0014623C 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 801492D8 00146238 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 801492DC 0014623C 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 801492E0 00146240 90 1F 00 00 */ stw r0, 0(r31)
lbl_801492E4:
/* 801492E4 00146244 7C 80 07 35 */ extsh. r0, r4
@ -250,9 +250,9 @@ lbl_8014959C:
.global __ct__8CBSTauntFv
__ct__8CBSTauntFv:
/* 801495B8 00146518 3C A0 80 3E */ lis r5, lbl_803E1318@ha
/* 801495B8 00146518 3C A0 80 3E */ lis r5, __vt__10CBodyState@ha
/* 801495BC 0014651C 3C 80 80 3E */ lis r4, lbl_803E2390@ha
/* 801495C0 00146520 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l
/* 801495C0 00146520 38 A5 13 18 */ addi r5, r5, __vt__10CBodyState@l
/* 801495C4 00146524 90 A3 00 00 */ stw r5, 0(r3)
/* 801495C8 00146528 38 04 23 90 */ addi r0, r4, lbl_803E2390@l
/* 801495CC 0014652C 90 03 00 00 */ stw r0, 0(r3)

View File

@ -59,8 +59,8 @@ __dt__12CBSFlyerTurnFv:
/* 801391F0 00136150 38 03 17 8C */ addi r0, r3, lbl_803E178C@l
/* 801391F4 00136154 90 1F 00 00 */ stw r0, 0(r31)
/* 801391F8 00136158 41 82 00 10 */ beq lbl_80139208
/* 801391FC 0013615C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80139200 00136160 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 801391FC 0013615C 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 80139200 00136160 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80139204 00136164 90 1F 00 00 */ stw r0, 0(r31)
lbl_80139208:
/* 80139208 00136168 7C 80 07 35 */ extsh. r0, r4
@ -383,8 +383,8 @@ __dt__7CBSTurnFv:
/* 8013967C 001365DC 38 03 17 8C */ addi r0, r3, lbl_803E178C@l
/* 80139680 001365E0 90 1F 00 00 */ stw r0, 0(r31)
/* 80139684 001365E4 41 82 00 10 */ beq lbl_80139694
/* 80139688 001365E8 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013968C 001365EC 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80139688 001365E8 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8013968C 001365EC 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 80139690 001365F0 90 1F 00 00 */ stw r0, 0(r31)
lbl_80139694:
/* 80139694 001365F4 7C 80 07 35 */ extsh. r0, r4
@ -845,9 +845,9 @@ __ct__7CBSTurnFv:
/* 80139CE0 00136C40 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80139CE4 00136C44 7C 08 02 A6 */ mflr r0
/* 80139CE8 00136C48 C0 22 9A 60 */ lfs f1, lbl_805AB780@sda21(r2)
/* 80139CEC 00136C4C 3C 80 80 3E */ lis r4, lbl_803E1318@ha
/* 80139CEC 00136C4C 3C 80 80 3E */ lis r4, __vt__10CBodyState@ha
/* 80139CF0 00136C50 90 01 00 14 */ stw r0, 0x14(r1)
/* 80139CF4 00136C54 38 04 13 18 */ addi r0, r4, lbl_803E1318@l
/* 80139CF4 00136C54 38 04 13 18 */ addi r0, r4, __vt__10CBodyState@l
/* 80139CF8 00136C58 FC 40 08 90 */ fmr f2, f1
/* 80139CFC 00136C5C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80139D00 00136C60 7C 7F 1B 78 */ mr r31, r3

View File

@ -50,8 +50,8 @@ __dt__11CBSWallHangFv:
/* 8018D4D8 0018A438 38 03 43 A0 */ addi r0, r3, lbl_803E43A0@l
/* 8018D4DC 0018A43C 90 1F 00 00 */ stw r0, 0(r31)
/* 8018D4E0 0018A440 41 82 00 10 */ beq lbl_8018D4F0
/* 8018D4E4 0018A444 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8018D4E8 0018A448 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 8018D4E4 0018A444 3C 60 80 3E */ lis r3, __vt__10CBodyState@ha
/* 8018D4E8 0018A448 38 03 13 18 */ addi r0, r3, __vt__10CBodyState@l
/* 8018D4EC 0018A44C 90 1F 00 00 */ stw r0, 0(r31)
lbl_8018D4F0:
/* 8018D4F0 0018A450 7C 80 07 35 */ extsh. r0, r4
@ -1634,9 +1634,9 @@ lbl_8018EB34:
.global __ct__11CBSWallHangFv
__ct__11CBSWallHangFv:
/* 8018EB4C 0018BAAC 3C C0 80 3E */ lis r6, lbl_803E1318@ha
/* 8018EB4C 0018BAAC 3C C0 80 3E */ lis r6, __vt__10CBodyState@ha
/* 8018EB50 0018BAB0 3C A0 80 3E */ lis r5, lbl_803E43A0@ha
/* 8018EB54 0018BAB4 38 06 13 18 */ addi r0, r6, lbl_803E1318@l
/* 8018EB54 0018BAB4 38 06 13 18 */ addi r0, r6, __vt__10CBodyState@l
/* 8018EB58 0018BAB8 3C 80 80 5A */ lis r4, sZeroVector__9CVector3f@ha
/* 8018EB5C 0018BABC 90 03 00 00 */ stw r0, 0(r3)
/* 8018EB60 0018BAC0 38 C5 43 A0 */ addi r6, r5, lbl_803E43A0@l

View File

@ -180,8 +180,8 @@ lbl_803E12F8:
.4byte lbl_801344B4
.global lbl_803E1318
lbl_803E1318:
.global __vt__10CBodyState
__vt__10CBodyState:
# ROM: 0x3DE318
.4byte 0
.4byte 0

View File

@ -201,7 +201,7 @@ LIBS = [
"MetroidPrime/BodyState/CBSGroundHit",
"MetroidPrime/Enemies/CChozoGhost",
"MetroidPrime/Enemies/CFireFlea",
"MetroidPrime/BodyState/CBSSlide",
["MetroidPrime/BodyState/CBSSlide", False],
"MetroidPrime/BodyState/CBSHurled",
"MetroidPrime/BodyState/CBSJump",
"MetroidPrime/BodyState/CBSGenerate",

View File

@ -3,40 +3,11 @@
#include "types.h"
#include "Kyoto/Animation/CharacterCommon.hpp"
#include "rstl/reserved_vector.hpp"
#include "rstl/vector.hpp"
namespace pas {
enum EAnimationState {
kAS_Invalid = -1,
kAS_Fall = 0,
kAS_Getup = 1,
kAS_LieOnGround = 2,
kAS_Step = 3,
kAS_Death = 4,
kAS_Locomotion = 5,
kAS_KnockBack = 6,
kAS_MeleeAttack = 7,
kAS_Turn = 8,
kAS_LoopAttack = 9,
kAS_LoopReaction = 10,
kAS_GroundHit = 11,
kAS_Generate = 12,
kAS_Jump = 13,
kAS_Hurled = 14,
kAS_Slide = 15,
kAS_Taunt = 16,
kAS_Scripted = 17,
kAS_ProjectileAttack = 18,
kAS_Cover = 19,
kAS_WallHang = 20,
kAS_AdditiveIdle = 21,
kAS_AdditiveAim = 22,
kAS_AdditiveFlinch = 23,
kAS_AdditiveReaction = 24,
};
} // namespace pas
class CPASAnimParm {
public:
enum EParmType {
@ -63,6 +34,7 @@ public:
static CPASAnimParm NoParameter();
int GetInt32Value() const;
float GetReal32Value() const;
private:
UParmValue x0_value;

View File

@ -0,0 +1,205 @@
#ifndef _CHARACTERCOMMON
#define _CHARACTERCOMMON
namespace pas {
enum ELocomotionType {
kLT_Invalid = -1,
kLT_Crouch = 0,
kLT_Relaxed = 1,
kLT_Lurk = 2,
kLT_Combat = 3,
kLT_Internal4 = 4,
kLT_Internal5 = 5,
kLT_Internal6 = 6,
kLT_Internal7 = 7,
kLT_Internal8 = 8,
kLT_Internal9 = 9,
kLT_Internal10 = 10,
kLT_Internal11 = 11,
kLT_Internal12 = 12,
kLT_Internal13 = 13,
kLT_Internal14 = 14
};
enum ELocomotionAnim {
kLA_Invalid = -1,
kLA_Idle,
kLA_Walk,
kLA_Run,
kLA_BackUp,
kLA_StrafeLeft,
kLA_StrafeRight,
kLA_StrafeUp,
kLA_StrafeDown
};
enum EAnimationState {
kAS_Invalid = -1,
kAS_Fall = 0,
kAS_Getup = 1,
kAS_LieOnGround = 2,
kAS_Step = 3,
kAS_Death = 4,
kAS_Locomotion = 5,
kAS_KnockBack = 6,
kAS_MeleeAttack = 7,
kAS_Turn = 8,
kAS_LoopAttack = 9,
kAS_LoopReaction = 10,
kAS_GroundHit = 11,
kAS_Generate = 12,
kAS_Jump = 13,
kAS_Hurled = 14,
kAS_Slide = 15,
kAS_Taunt = 16,
kAS_Scripted = 17,
kAS_ProjectileAttack = 18,
kAS_Cover = 19,
kAS_WallHang = 20,
kAS_AdditiveIdle = 21,
kAS_AdditiveAim = 22,
kAS_AdditiveFlinch = 23,
kAS_AdditiveReaction = 24
};
enum EHurledState {
kHS_Invalid = -1,
kHS_KnockIntoAir,
kHS_KnockLoop,
kHS_KnockDown,
kHS_StrikeWall,
kHS_StrikeWallFallLoop,
kHS_OutOfStrikeWall,
kHS_Six,
kHS_Seven
};
enum EFallState { kFS_Invalid = -1, kFS_Zero, kFS_One, kFS_Two };
enum EReactionType { kRT_Invalid = -1, kRT_Zero, kRT_One, kRT_Two, kRT_Three };
enum EAdditiveReactionType {
kART_Invalid = -1,
kART_Electrocution,
kART_One,
kART_Two,
kART_IceBreakout,
kART_Four,
kART_Five,
kART_Six,
kART_Seven
};
enum EJumpType { kJT_Normal, kJT_One, kJT_Ambush };
enum EJumpState {
kJS_Invalid = -1,
kJS_IntoJump,
kJS_AmbushJump,
kJS_Loop,
kJS_OutOfJump,
kJS_WallBounceLeft,
kJS_WallBounceRight
};
enum EStepDirection {
kSD_Invalid = -1,
kSD_Forward = 0,
kSD_Backward = 1,
kSD_Left = 2,
kSD_Right = 3,
kSD_Up = 4,
kSD_Down = 5
};
enum EStepType { kStep_Normal = 0, kStep_Dodge = 1, kStep_BreakDodge = 2, kStep_RollDodge = 3 };
enum ESeverity {
kS_Invalid = -1,
kS_Zero = 0,
kS_One = 1,
kS_Two = 2,
kS_Three = 3,
kS_Four = 4,
kS_Five = 5,
kS_Six = 6,
kS_Seven = 7,
kS_Eight = 8
};
enum EGetupType { kGetup_Invalid = -1, kGetup_Zero = 0, kGetup_One = 1, kGetup_Two = 2 };
enum ELoopState { kLS_Invalid = -1, kLS_Begin, kLS_Loop, kLS_End };
enum ELoopAttackType { kLAT_Invalid = -1, kLAT_Zero, kLAT_One, kLAT_Two, kLAT_Three };
enum EGenerateType {
kGType_Invalid = -1,
kGType_Zero,
kGType_One,
kGType_Two,
kGType_Three,
kGType_Four,
kGType_Five,
kGType_Six,
kGType_Seven,
kGType_Eight
};
enum ESlideType { kSlide_Invalid = -1, kSlide_Zero = 0 };
enum ETauntType { kTT_Invalid = -1, kTT_Zero, kTT_One, kTT_Two };
enum ECoverState { kCS_Invalid = -1, kCS_IntoCover, kCS_Cover, kCS_Lean, kCS_OutOfCover };
enum ECoverDirection { kCD_Invalid = -1, kCD_Left, kCD_Right };
enum ETurnDirection { kTD_Invalid = -1, kTD_Right, kTD_Left };
enum EWallHangState {
kWHS_Invalid = -1,
kWHS_IntoJump,
kWHS_JumpArc,
kWHS_JumpAirLoop,
kWHS_IntoWallHang,
kWHS_WallHang,
kWHS_Five,
kWHS_OutOfWallHang,
kWHS_OutOfWallHangTurn,
kWHS_DetachJumpLoop,
kWHS_DetachOutOfJump
};
} // namespace pas
enum EBodyStateCmd {
kBSC_Getup,
kBSC_Step,
kBSC_Die,
kBSC_KnockDown,
kBSC_KnockBack,
kBSC_MeleeAttack,
kBSC_ProjectileAttack,
kBSC_LoopAttack,
kBSC_LoopReaction,
kBSC_LoopHitReaction,
kBSC_ExitState,
kBSC_LeanFromCover,
kBSC_NextState,
kBSC_MaintainVelocity,
kBSC_Generate,
kBSC_Hurled,
kBSC_Jump,
kBSC_Slide,
kBSC_Taunt,
kBSC_Scripted,
kBSC_Cover,
kBSC_WallHang,
kBSC_Locomotion,
kBSC_AdditiveIdle,
kBSC_AdditiveAim,
kBSC_AdditiveFlinch,
kBSC_AdditiveReaction,
kBSC_StopReaction
};
#endif // _CHARACTERCOMMON

View File

@ -44,6 +44,7 @@ public:
// XRotation__11CQuaternionFRC9CRelAngle
// YRotation__11CQuaternionFRC9CRelAngle
// ZRotation__11CQuaternionFRC9CRelAngle
static CQuaternion ZRotation(const CRelAngle&);
// BuildTransform__11CQuaternionCFv
CTransform4f BuildTransform4f() const;
CTransform4f BuildTransform4f(const CVector3f&) const;

View File

@ -0,0 +1,23 @@
#ifndef _CBSSLIDE
#define _CBSSLIDE
#include "MetroidPrime/BodyState/CBodyState.hpp"
class CBSSlide : public CBodyState {
pas::EAnimationState GetBodyStateTransition(float dt, CBodyController& bc);
public:
CBSSlide();
~CBSSlide();
bool ApplyHeadTracking() const override;
bool IsMoving() const override;
void Start(CBodyController& bc, CStateManager& mgr) override;
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override;
void Shutdown(CBodyController&) override;
private:
float x4_rotateSpeed;
};
#endif // _CBSSLIDE

View File

@ -5,16 +5,36 @@
class CActor;
class CPASDatabase;
class CQuaternion;
class CAnimPlaybackParms;
class CBodyController {
CActor& x0_actor;
CBodyStateCmdMgr x4_cmdMgr;
public:
const CPASDatabase& GetPASDatabase() const;
CActor& GetOwner() const { return x0_actor; }
CBodyStateCmdMgr& CommandMgr() { return x4_cmdMgr; }
const CBodyStateCmdMgr& GetCommandMgr() const { return x4_cmdMgr; }
float GetAnimTimeRemaining() const;
void SetDeltaRotation(const CQuaternion& q);
void SetCurrentAnimation(const CAnimPlaybackParms& parms, bool loop, bool noTrans);
bool IsAnimationOver() const { return x300_24_animationOver; }
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;
int x2f8_curAnim ;
float x2fc_turnSpeed;
bool x300_24_animationOver : 1;
};
#endif // _CBODYCONTROLLER

View File

@ -0,0 +1,25 @@
#ifndef _CBODYSTATE
#define _CBODYSTATE
#include "Kyoto/Animation/CPASAnimState.hpp"
class CStateManager;
class CBodyController;
class CBodyState {
public:
virtual ~CBodyState() {}
virtual bool IsInAir(const CBodyController&) const { return false; }
virtual bool IsDead() const { return false; }
virtual bool IsDying() const { return false; }
virtual bool IsMoving() const { return false; }
virtual bool ApplyGravity() const { return true; }
virtual bool ApplyHeadTracking() const { return true; }
virtual bool ApplyAnimationDeltas() const { return true; }
virtual bool CanShoot() const { return false; }
virtual void Start(CBodyController&, CStateManager&) = 0;
virtual pas::EAnimationState UpdateBody(float, CBodyController&, CStateManager&) = 0;
virtual void Shutdown(CBodyController&) = 0;
};
#endif // _CBODYSTATE

View File

@ -1,43 +1,14 @@
#ifndef _CBODYSTATECMDMGR
#define _CBODYSTATECMDMGR
// TODO: CharacterCommon
enum EBodyStateCmd {
kBSC_Getup,
kBSC_Step,
kBSC_Die,
kBSC_KnockDown,
kBSC_KnockBack,
kBSC_MeleeAttack,
kBSC_ProjectileAttack,
kBSC_LoopAttack,
kBSC_LoopReaction,
kBSC_LoopHitReaction,
kBSC_ExitState,
kBSC_LeanFromCover,
kBSC_NextState,
kBSC_MaintainVelocity,
kBSC_Generate,
kBSC_Hurled,
kBSC_Jump,
kBSC_Slide,
kBSC_Taunt,
kBSC_Scripted,
kBSC_Cover,
kBSC_WallHang,
kBSC_Locomotion,
kBSC_AdditiveIdle,
kBSC_AdditiveAim,
kBSC_AdditiveFlinch,
kBSC_AdditiveReaction,
kBSC_StopReaction
};
#include "Kyoto/Animation/CharacterCommon.hpp"
#include "Kyoto/Math/CVector3f.hpp"
class CBodyStateCmd {
EBodyStateCmd x4_cmd;
public:
virtual ~CBodyStateCmd() {};
virtual ~CBodyStateCmd(){};
explicit CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
EBodyStateCmd GetCommandId() const { return x4_cmd; }
};
@ -49,9 +20,29 @@ public:
float GetWeight() const { return x8_weight; }
};
class CBCSlideCmd : public CBodyStateCmd {
public:
explicit CBCSlideCmd() : CBodyStateCmd(kBSC_Slide), x8_type(pas::kSlide_Invalid), xc_dir(CVector3f::Zero()) {}
explicit CBCSlideCmd(pas::ESlideType type, const CVector3f& dir)
: CBodyStateCmd(kBSC_Slide), x8_type(type), xc_dir(dir) {}
pas::ESlideType GetSlideType() const { return x8_type; }
const CVector3f& GetSlideDirection() const { return xc_dir; }
private:
pas::ESlideType x8_type;
CVector3f xc_dir;
};
//
class CBodyStateCmdMgr {
public:
CBodyStateCmd* GetCmd(EBodyStateCmd cmd);
private:
uchar x0_pad[0x2a0];
};
#endif // _CBODYSTATECMDMGR

View File

@ -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;

View File

@ -0,0 +1,74 @@
#include "MetroidPrime/BodyState/CBSSlide.hpp"
#include "MetroidPrime/BodyState/CBodyController.hpp"
#include "MetroidPrime/CActor.hpp"
#include "MetroidPrime/CAnimPlaybackParms.hpp"
#include "Kyoto/Math/CVector3f.hpp"
#include "Kyoto/Math/CRelAngle.hpp"
#include "Kyoto/Math/CAbsAngle.hpp"
#include "Kyoto/Animation/CPASAnimParmData.hpp"
#include "Kyoto/Animation/CPASDatabase.hpp"
#include "math.h"
CBSSlide::CBSSlide() : x4_rotateSpeed(0.0f) {}
void CBSSlide::Start(CBodyController& bc, CStateManager& mgr) {
const CBCSlideCmd* cmd = static_cast< const CBCSlideCmd* >(bc.CommandMgr().GetCmd(kBSC_Slide));
const CVector3f localDir = bc.GetOwner().GetTransform().TransposeRotate(cmd->GetSlideDirection());
const float angle = atan2(localDir.GetY(), localDir.GetX());
const CPASDatabase& pasDb = bc.GetPASDatabase();
const CPASAnimParmData parms(pas::kAS_Slide, CPASAnimParm::FromEnum(cmd->GetSlideType()),
CPASAnimParm::FromReal32(CMath::Rad2Deg(angle)));
const rstl::pair<float, int> best = pasDb.FindBestAnimation(parms, *mgr.Random(), -1);
const CAnimPlaybackParms playParms(best.second, -1, 1.f, true);
bc.SetCurrentAnimation(playParms, false, false);
const float timeRem = bc.GetAnimTimeRemaining();
if (timeRem > FLT_EPSILON) {
const CPASAnimState* slideState = pasDb.GetAnimState(pas::kAS_Slide);
CPASAnimParm slideParm = slideState->GetAnimParmData(best.second, 1);
const float animAngle = CMath::Deg2Rev(slideParm.GetReal32Value());
const float delta1 = CAbsAngle::FromRadians(angle - animAngle).AsRadians();
const float flippedAngle = (delta1 > M_PIF) ? delta1 - M_2PIF : delta1;
x4_rotateSpeed = flippedAngle / timeRem;
} else {
x4_rotateSpeed = 0.f;
}
}
pas::EAnimationState CBSSlide::UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) {
const pas::EAnimationState st = GetBodyStateTransition(dt, bc);
if (st == pas::kAS_Invalid && x4_rotateSpeed != 0.f) {
bc.SetDeltaRotation(CQuaternion::ZRotation(CRelAngle::FromRadians(dt * x4_rotateSpeed)));
}
return st;
}
void CBSSlide::Shutdown(CBodyController&) override {}
pas::EAnimationState CBSSlide::GetBodyStateTransition(float dt, CBodyController& bc) {
CBodyStateCmdMgr& mgr = bc.CommandMgr();
if (mgr.GetCmd(kBSC_Hurled)) {
return pas::kAS_Hurled;
} else if (mgr.GetCmd(kBSC_KnockDown)) {
return pas::kAS_Fall;
} else if (mgr.GetCmd(kBSC_LoopHitReaction)) {
return pas::kAS_LoopReaction;
} else if (mgr.GetCmd(kBSC_KnockBack)) {
return pas::kAS_KnockBack;
} else if (bc.IsAnimationOver()) {
return pas::kAS_Locomotion;
} else {
return pas::kAS_Invalid;
}
}
bool CBSSlide::ApplyHeadTracking() const override { return false; }
bool CBSSlide::IsMoving() const override { return true; }
CBSSlide::~CBSSlide() {}

View File

@ -17,6 +17,8 @@ _LITERAL_REPLACEMENTS = [
("zeus::skWhite", "CColor::White()"),
("zeus::CFrustum", "CFrustumPlanes"),
("zeus::lookAt", "CTransform4f::LookAt"),
("zeus::radToDeg", "CMath::Rad2Deg"),
("zeus::degToRad", "CMath::Deg2Rad"),
("zeus::", ""),
("u32 ", "uint "),
("s32 ", "int "),