mirror of https://github.com/PrimeDecomp/prime.git
Match and link CGSFidget
This commit is contained in:
parent
9ed61ba6a8
commit
f0f6a0ce43
|
@ -1132,7 +1132,7 @@ lbl_802C8B74:
|
||||||
/* 802C8B84 002C5AE4 48 03 97 31 */ bl GetAssets__18CTextExecuteBufferFv
|
/* 802C8B84 002C5AE4 48 03 97 31 */ bl GetAssets__18CTextExecuteBufferFv
|
||||||
/* 802C8B88 002C5AE8 38 7D 02 BC */ addi r3, r29, 0x2bc
|
/* 802C8B88 002C5AE8 38 7D 02 BC */ addi r3, r29, 0x2bc
|
||||||
/* 802C8B8C 002C5AEC 38 81 00 30 */ addi r4, r1, 0x30
|
/* 802C8B8C 002C5AEC 38 81 00 30 */ addi r4, r1, 0x30
|
||||||
/* 802C8B90 002C5AF0 4B D3 DC 75 */ bl sub_80006804
|
/* 802C8B90 002C5AF0 4B D3 DC 75 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 802C8B94 002C5AF4 80 01 00 34 */ lwz r0, 0x34(r1)
|
/* 802C8B94 002C5AF4 80 01 00 34 */ lwz r0, 0x34(r1)
|
||||||
/* 802C8B98 002C5AF8 83 C1 00 3C */ lwz r30, 0x3c(r1)
|
/* 802C8B98 002C5AF8 83 C1 00 3C */ lwz r30, 0x3c(r1)
|
||||||
/* 802C8B9C 002C5AFC 54 00 18 38 */ slwi r0, r0, 3
|
/* 802C8B9C 002C5AFC 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
@ -3148,4 +3148,3 @@ lbl_803D68E0:
|
||||||
.byte 0x26
|
.byte 0x26
|
||||||
.asciz "font=%8.8X;"
|
.asciz "font=%8.8X;"
|
||||||
.4byte 0
|
.4byte 0
|
||||||
|
|
||||||
|
|
|
@ -4000,7 +4000,7 @@ lbl_8002CAD0:
|
||||||
/* 8002CB0C 00029A6C 90 01 00 34 */ stw r0, 0x34(r1)
|
/* 8002CB0C 00029A6C 90 01 00 34 */ stw r0, 0x34(r1)
|
||||||
/* 8002CB10 00029A70 90 01 00 38 */ stw r0, 0x38(r1)
|
/* 8002CB10 00029A70 90 01 00 38 */ stw r0, 0x38(r1)
|
||||||
/* 8002CB14 00029A74 90 01 00 3C */ stw r0, 0x3c(r1)
|
/* 8002CB14 00029A74 90 01 00 3C */ stw r0, 0x3c(r1)
|
||||||
/* 8002CB18 00029A78 4B FD 9C ED */ bl sub_80006804
|
/* 8002CB18 00029A78 4B FD 9C ED */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 8002CB1C 00029A7C 80 01 00 34 */ lwz r0, 0x34(r1)
|
/* 8002CB1C 00029A7C 80 01 00 34 */ lwz r0, 0x34(r1)
|
||||||
/* 8002CB20 00029A80 83 61 00 3C */ lwz r27, 0x3c(r1)
|
/* 8002CB20 00029A80 83 61 00 3C */ lwz r27, 0x3c(r1)
|
||||||
/* 8002CB24 00029A84 54 00 18 38 */ slwi r0, r0, 3
|
/* 8002CB24 00029A84 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -3179,7 +3179,7 @@ lbl_801095F0:
|
||||||
/* 80109614 00106574 38 81 00 68 */ addi r4, r1, 0x68
|
/* 80109614 00106574 38 81 00 68 */ addi r4, r1, 0x68
|
||||||
/* 80109618 00106578 90 01 00 70 */ stw r0, 0x70(r1)
|
/* 80109618 00106578 90 01 00 70 */ stw r0, 0x70(r1)
|
||||||
/* 8010961C 0010657C 90 01 00 74 */ stw r0, 0x74(r1)
|
/* 8010961C 0010657C 90 01 00 74 */ stw r0, 0x74(r1)
|
||||||
/* 80109620 00106580 4B EF D1 E5 */ bl sub_80006804
|
/* 80109620 00106580 4B EF D1 E5 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 80109624 00106584 80 01 00 6C */ lwz r0, 0x6c(r1)
|
/* 80109624 00106584 80 01 00 6C */ lwz r0, 0x6c(r1)
|
||||||
/* 80109628 00106588 83 81 00 74 */ lwz r28, 0x74(r1)
|
/* 80109628 00106588 83 81 00 74 */ lwz r28, 0x74(r1)
|
||||||
/* 8010962C 0010658C 54 00 18 38 */ slwi r0, r0, 3
|
/* 8010962C 0010658C 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -742,7 +742,7 @@ lbl_8011DC38:
|
||||||
/* 8011DC8C 0011ABEC 80 1E 03 A8 */ lwz r0, 0x3a8(r30)
|
/* 8011DC8C 0011ABEC 80 1E 03 A8 */ lwz r0, 0x3a8(r30)
|
||||||
/* 8011DC90 0011ABF0 54 00 20 36 */ slwi r0, r0, 4
|
/* 8011DC90 0011ABF0 54 00 20 36 */ slwi r0, r0, 4
|
||||||
/* 8011DC94 0011ABF4 7C 7D 02 14 */ add r3, r29, r0
|
/* 8011DC94 0011ABF4 7C 7D 02 14 */ add r3, r29, r0
|
||||||
/* 8011DC98 0011ABF8 4B EE 8B 6D */ bl sub_80006804
|
/* 8011DC98 0011ABF8 4B EE 8B 6D */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 8011DC9C 0011ABFC 80 01 00 1C */ lwz r0, 0x1c(r1)
|
/* 8011DC9C 0011ABFC 80 01 00 1C */ lwz r0, 0x1c(r1)
|
||||||
/* 8011DCA0 0011AC00 83 81 00 24 */ lwz r28, 0x24(r1)
|
/* 8011DCA0 0011AC00 83 81 00 24 */ lwz r28, 0x24(r1)
|
||||||
/* 8011DCA4 0011AC04 54 00 18 38 */ slwi r0, r0, 3
|
/* 8011DCA4 0011AC04 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -2395,7 +2395,7 @@ lbl_800EED48:
|
||||||
/* 800EEE10 000EBD70 38 81 00 30 */ addi r4, r1, 0x30
|
/* 800EEE10 000EBD70 38 81 00 30 */ addi r4, r1, 0x30
|
||||||
/* 800EEE14 000EBD74 90 01 00 38 */ stw r0, 0x38(r1)
|
/* 800EEE14 000EBD74 90 01 00 38 */ stw r0, 0x38(r1)
|
||||||
/* 800EEE18 000EBD78 90 01 00 3C */ stw r0, 0x3c(r1)
|
/* 800EEE18 000EBD78 90 01 00 3C */ stw r0, 0x3c(r1)
|
||||||
/* 800EEE1C 000EBD7C 4B F1 79 E9 */ bl sub_80006804
|
/* 800EEE1C 000EBD7C 4B F1 79 E9 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 800EEE20 000EBD80 80 01 00 34 */ lwz r0, 0x34(r1)
|
/* 800EEE20 000EBD80 80 01 00 34 */ lwz r0, 0x34(r1)
|
||||||
/* 800EEE24 000EBD84 83 81 00 3C */ lwz r28, 0x3c(r1)
|
/* 800EEE24 000EBD84 83 81 00 3C */ lwz r28, 0x3c(r1)
|
||||||
/* 800EEE28 000EBD88 54 00 18 38 */ slwi r0, r0, 3
|
/* 800EEE28 000EBD88 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -1191,7 +1191,7 @@ lbl_801BACD4:
|
||||||
/* 801BACFC 001B7C5C 38 81 00 18 */ addi r4, r1, 0x18
|
/* 801BACFC 001B7C5C 38 81 00 18 */ addi r4, r1, 0x18
|
||||||
/* 801BAD00 001B7C60 90 01 00 20 */ stw r0, 0x20(r1)
|
/* 801BAD00 001B7C60 90 01 00 20 */ stw r0, 0x20(r1)
|
||||||
/* 801BAD04 001B7C64 90 01 00 24 */ stw r0, 0x24(r1)
|
/* 801BAD04 001B7C64 90 01 00 24 */ stw r0, 0x24(r1)
|
||||||
/* 801BAD08 001B7C68 4B E4 BA FD */ bl sub_80006804
|
/* 801BAD08 001B7C68 4B E4 BA FD */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 801BAD0C 001B7C6C 80 01 00 1C */ lwz r0, 0x1c(r1)
|
/* 801BAD0C 001B7C6C 80 01 00 1C */ lwz r0, 0x1c(r1)
|
||||||
/* 801BAD10 001B7C70 83 81 00 24 */ lwz r28, 0x24(r1)
|
/* 801BAD10 001B7C70 83 81 00 24 */ lwz r28, 0x24(r1)
|
||||||
/* 801BAD14 001B7C74 54 00 18 38 */ slwi r0, r0, 3
|
/* 801BAD14 001B7C74 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -28,7 +28,7 @@ UnLoadAnim__9CGSFidgetFv:
|
||||||
/* 801F1110 001EE070 90 01 00 1C */ stw r0, 0x1c(r1)
|
/* 801F1110 001EE070 90 01 00 1C */ stw r0, 0x1c(r1)
|
||||||
/* 801F1114 001EE074 90 01 00 20 */ stw r0, 0x20(r1)
|
/* 801F1114 001EE074 90 01 00 20 */ stw r0, 0x20(r1)
|
||||||
/* 801F1118 001EE078 90 01 00 24 */ stw r0, 0x24(r1)
|
/* 801F1118 001EE078 90 01 00 24 */ stw r0, 0x24(r1)
|
||||||
/* 801F111C 001EE07C 4B E1 56 E9 */ bl sub_80006804
|
/* 801F111C 001EE07C 4B E1 56 E9 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 801F1120 001EE080 80 01 00 1C */ lwz r0, 0x1c(r1)
|
/* 801F1120 001EE080 80 01 00 1C */ lwz r0, 0x1c(r1)
|
||||||
/* 801F1124 001EE084 83 C1 00 24 */ lwz r30, 0x24(r1)
|
/* 801F1124 001EE084 83 C1 00 24 */ lwz r30, 0x24(r1)
|
||||||
/* 801F1128 001EE088 54 00 18 38 */ slwi r0, r0, 3
|
/* 801F1128 001EE088 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -387,7 +387,7 @@ lbl_8028AF2C:
|
||||||
/* 8028AF40 00287EA0 38 81 00 48 */ addi r4, r1, 0x48
|
/* 8028AF40 00287EA0 38 81 00 48 */ addi r4, r1, 0x48
|
||||||
/* 8028AF44 00287EA4 90 01 00 50 */ stw r0, 0x50(r1)
|
/* 8028AF44 00287EA4 90 01 00 50 */ stw r0, 0x50(r1)
|
||||||
/* 8028AF48 00287EA8 90 01 00 54 */ stw r0, 0x54(r1)
|
/* 8028AF48 00287EA8 90 01 00 54 */ stw r0, 0x54(r1)
|
||||||
/* 8028AF4C 00287EAC 4B D7 B8 B9 */ bl sub_80006804
|
/* 8028AF4C 00287EAC 4B D7 B8 B9 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 8028AF50 00287EB0 80 01 00 4C */ lwz r0, 0x4c(r1)
|
/* 8028AF50 00287EB0 80 01 00 4C */ lwz r0, 0x4c(r1)
|
||||||
/* 8028AF54 00287EB4 83 A1 00 54 */ lwz r29, 0x54(r1)
|
/* 8028AF54 00287EB4 83 A1 00 54 */ lwz r29, 0x54(r1)
|
||||||
/* 8028AF58 00287EB8 54 00 18 38 */ slwi r0, r0, 3
|
/* 8028AF58 00287EB8 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -5134,7 +5134,7 @@ lbl_80006778:
|
||||||
/* 80006784 000036E4 38 81 00 18 */ addi r4, r1, 0x18
|
/* 80006784 000036E4 38 81 00 18 */ addi r4, r1, 0x18
|
||||||
/* 80006788 000036E8 90 01 00 20 */ stw r0, 0x20(r1)
|
/* 80006788 000036E8 90 01 00 20 */ stw r0, 0x20(r1)
|
||||||
/* 8000678C 000036EC 90 01 00 24 */ stw r0, 0x24(r1)
|
/* 8000678C 000036EC 90 01 00 24 */ stw r0, 0x24(r1)
|
||||||
/* 80006790 000036F0 48 00 00 75 */ bl sub_80006804
|
/* 80006790 000036F0 48 00 00 75 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 80006794 000036F4 80 01 00 1C */ lwz r0, 0x1c(r1)
|
/* 80006794 000036F4 80 01 00 1C */ lwz r0, 0x1c(r1)
|
||||||
/* 80006798 000036F8 83 C1 00 24 */ lwz r30, 0x24(r1)
|
/* 80006798 000036F8 83 C1 00 24 */ lwz r30, 0x24(r1)
|
||||||
/* 8000679C 000036FC 54 00 18 38 */ slwi r0, r0, 3
|
/* 8000679C 000036FC 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
@ -5167,8 +5167,8 @@ lbl_800067E0:
|
||||||
/* 800067FC 0000375C 38 21 00 50 */ addi r1, r1, 0x50
|
/* 800067FC 0000375C 38 21 00 50 */ addi r1, r1, 0x50
|
||||||
/* 80006800 00003760 4E 80 00 20 */ blr
|
/* 80006800 00003760 4E 80 00 20 */ blr
|
||||||
|
|
||||||
.global sub_80006804
|
.global "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
sub_80006804:
|
"__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>":
|
||||||
/* 80006804 00003764 94 21 FF D0 */ stwu r1, -0x30(r1)
|
/* 80006804 00003764 94 21 FF D0 */ stwu r1, -0x30(r1)
|
||||||
/* 80006808 00003768 7C 08 02 A6 */ mflr r0
|
/* 80006808 00003768 7C 08 02 A6 */ mflr r0
|
||||||
/* 8000680C 0000376C 90 01 00 34 */ stw r0, 0x34(r1)
|
/* 8000680C 0000376C 90 01 00 34 */ stw r0, 0x34(r1)
|
||||||
|
@ -5363,7 +5363,7 @@ lbl_80006A60:
|
||||||
/* 80006A98 000039F8 38 81 00 20 */ addi r4, r1, 0x20
|
/* 80006A98 000039F8 38 81 00 20 */ addi r4, r1, 0x20
|
||||||
/* 80006A9C 000039FC 90 01 00 28 */ stw r0, 0x28(r1)
|
/* 80006A9C 000039FC 90 01 00 28 */ stw r0, 0x28(r1)
|
||||||
/* 80006AA0 00003A00 90 01 00 2C */ stw r0, 0x2c(r1)
|
/* 80006AA0 00003A00 90 01 00 2C */ stw r0, 0x2c(r1)
|
||||||
/* 80006AA4 00003A04 4B FF FD 61 */ bl sub_80006804
|
/* 80006AA4 00003A04 4B FF FD 61 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 80006AA8 00003A08 80 01 00 24 */ lwz r0, 0x24(r1)
|
/* 80006AA8 00003A08 80 01 00 24 */ lwz r0, 0x24(r1)
|
||||||
/* 80006AAC 00003A0C 83 81 00 2C */ lwz r28, 0x2c(r1)
|
/* 80006AAC 00003A0C 83 81 00 2C */ lwz r28, 0x2c(r1)
|
||||||
/* 80006AB0 00003A10 54 00 18 38 */ slwi r0, r0, 3
|
/* 80006AB0 00003A10 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
@ -5414,7 +5414,7 @@ PreloadAudio__24CGameArchitectureSupportFv:
|
||||||
/* 80006B48 00003AA8 38 81 00 28 */ addi r4, r1, 0x28
|
/* 80006B48 00003AA8 38 81 00 28 */ addi r4, r1, 0x28
|
||||||
/* 80006B4C 00003AAC 90 01 00 30 */ stw r0, 0x30(r1)
|
/* 80006B4C 00003AAC 90 01 00 30 */ stw r0, 0x30(r1)
|
||||||
/* 80006B50 00003AB0 90 01 00 34 */ stw r0, 0x34(r1)
|
/* 80006B50 00003AB0 90 01 00 34 */ stw r0, 0x34(r1)
|
||||||
/* 80006B54 00003AB4 4B FF FC B1 */ bl sub_80006804
|
/* 80006B54 00003AB4 4B FF FC B1 */ bl "__as__Q24rstl42vector<6CToken,Q24rstl17rmemory_allocator>FRCQ24rstl42vector<6CToken,Q24rstl17rmemory_allocator>"
|
||||||
/* 80006B58 00003AB8 80 01 00 2C */ lwz r0, 0x2c(r1)
|
/* 80006B58 00003AB8 80 01 00 2C */ lwz r0, 0x2c(r1)
|
||||||
/* 80006B5C 00003ABC 83 A1 00 34 */ lwz r29, 0x34(r1)
|
/* 80006B5C 00003ABC 83 A1 00 34 */ lwz r29, 0x34(r1)
|
||||||
/* 80006B60 00003AC0 54 00 18 38 */ slwi r0, r0, 3
|
/* 80006B60 00003AC0 54 00 18 38 */ slwi r0, r0, 3
|
||||||
|
|
|
@ -301,7 +301,7 @@ LIBS = [
|
||||||
["MetroidPrime/ScriptObjects/CScriptAiJumpPoint", True],
|
["MetroidPrime/ScriptObjects/CScriptAiJumpPoint", True],
|
||||||
"MetroidPrime/CMessageScreen",
|
"MetroidPrime/CMessageScreen",
|
||||||
"MetroidPrime/Enemies/CFlaahgraTentacle",
|
"MetroidPrime/Enemies/CFlaahgraTentacle",
|
||||||
["MetroidPrime/Weapons/GunController/CGSFidget", False],
|
["MetroidPrime/Weapons/GunController/CGSFidget", True],
|
||||||
["MetroidPrime/BodyState/CABSReaction", True],
|
["MetroidPrime/BodyState/CABSReaction", True],
|
||||||
"MetroidPrime/Weapons/CIceProjectile",
|
"MetroidPrime/Weapons/CIceProjectile",
|
||||||
"MetroidPrime/Enemies/CFlyingPirate",
|
"MetroidPrime/Enemies/CFlyingPirate",
|
||||||
|
|
|
@ -23,8 +23,11 @@ enum EGunAnimType {
|
||||||
};
|
};
|
||||||
|
|
||||||
CSfxHandle play_sfx(ushort sfx, bool underwater, bool looped, short pan);
|
CSfxHandle play_sfx(ushort sfx, bool underwater, bool looped, short pan);
|
||||||
|
void get_token_vector(CAnimData& animData, int, rstl::vector< CToken >& tokensOut,
|
||||||
|
bool preLock);
|
||||||
void get_token_vector(const CAnimData& animData, int begin, int end,
|
void get_token_vector(const CAnimData& animData, int begin, int end,
|
||||||
rstl::vector< CToken >& tokensOut, bool preLock);
|
rstl::vector< CToken >& tokensOut, bool preLock);
|
||||||
|
bool are_tokens_ready(const rstl::vector< CToken >&);
|
||||||
|
|
||||||
} // namespace NWeaponTypes
|
} // namespace NWeaponTypes
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,7 @@ METROIDPRIME :=\
|
||||||
$(BUILD_DIR)/src/MetroidPrime/ScriptObjects/CScriptAiJumpPoint.o\
|
$(BUILD_DIR)/src/MetroidPrime/ScriptObjects/CScriptAiJumpPoint.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CMessageScreen.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CMessageScreen.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CFlaahgraTentacle.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CFlaahgraTentacle.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Weapons/GunController/CGSFidget.o\
|
$(BUILD_DIR)/src/MetroidPrime/Weapons/GunController/CGSFidget.o\
|
||||||
$(BUILD_DIR)/src/MetroidPrime/BodyState/CABSReaction.o\
|
$(BUILD_DIR)/src/MetroidPrime/BodyState/CABSReaction.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Weapons/CIceProjectile.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Weapons/CIceProjectile.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CFlyingPirate.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CFlyingPirate.o\
|
||||||
|
|
|
@ -1,5 +1,53 @@
|
||||||
#include "MetroidPrime/Weapons/GunController/CGSFidget.hpp"
|
#include "MetroidPrime/Weapons/GunController/CGSFidget.hpp"
|
||||||
|
|
||||||
|
#include "MetroidPrime/CAnimData.hpp"
|
||||||
|
#include "MetroidPrime/CStateManager.hpp"
|
||||||
|
#include "MetroidPrime/Weapons/WeaponCommon.hpp"
|
||||||
|
|
||||||
|
#include "Kyoto/Animation/CPASAnimParmData.hpp"
|
||||||
#include "Kyoto/CToken.hpp"
|
#include "Kyoto/CToken.hpp"
|
||||||
|
|
||||||
CGSFidget::CGSFidget() : x10_(-1), x14_gunId(-1), x18_animSet(-1) {}
|
CGSFidget::CGSFidget() : x10_(-1), x14_gunId(-1), x18_animSet(-1) {}
|
||||||
|
|
||||||
|
bool CGSFidget::Update(CAnimData& data, float dt, CStateManager& mgr) {
|
||||||
|
return !data.IsAnimTimeRemaining(0.001f, rstl::string_l("Whole Body"));
|
||||||
|
}
|
||||||
|
|
||||||
|
int CGSFidget::SetAnim(CAnimData& data, int type, int gunId, int animSet, CStateManager& mgr) {
|
||||||
|
const CPASDatabase& pas = data.GetCharacterInfo().GetPASDatabase();
|
||||||
|
rstl::pair< float, int > anim = pas.FindBestAnimation(
|
||||||
|
CPASAnimParmData(pas::kAS_Getup, CPASAnimParm::FromEnum(type), CPASAnimParm::FromInt32(gunId),
|
||||||
|
CPASAnimParm::FromInt32(animSet)),
|
||||||
|
*mgr.Random(), -1);
|
||||||
|
|
||||||
|
CPASAnimParm parmData(pas.GetAnimState(pas::kAS_Getup)->GetAnimParmData(anim.second, 3));
|
||||||
|
bool loop = parmData.GetBoolValue();
|
||||||
|
x14_gunId = gunId;
|
||||||
|
x18_animSet = animSet;
|
||||||
|
if (anim.second != -1) {
|
||||||
|
data.EnableLooping(loop);
|
||||||
|
CAnimPlaybackParms aParms(anim.second, -1, 1.f, true);
|
||||||
|
data.SetAnimation(aParms, false);
|
||||||
|
UnLoadAnim();
|
||||||
|
}
|
||||||
|
return anim.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGSFidget::LoadAnimAsync(CAnimData& data, int type, int gunId, int animSet,
|
||||||
|
CStateManager& mgr) {
|
||||||
|
|
||||||
|
rstl::pair< float, int > anim = data.GetCharacterInfo().GetPASDatabase().FindBestAnimation(
|
||||||
|
CPASAnimParmData(pas::kAS_Getup, CPASAnimParm::FromEnum(type), CPASAnimParm::FromInt32(gunId),
|
||||||
|
CPASAnimParm::FromInt32(animSet)),
|
||||||
|
*mgr.Random(), -1);
|
||||||
|
if (anim.second != -1)
|
||||||
|
NWeaponTypes::get_token_vector(data, anim.second, x0_anims, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGSFidget::UnLoadAnim() {
|
||||||
|
if (!x0_anims.empty()) {
|
||||||
|
x0_anims = rstl::vector< CToken >();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGSFidget::IsAnimLoaded() const { return NWeaponTypes::are_tokens_ready(x0_anims); }
|
||||||
|
|
Loading…
Reference in New Issue