mirror of https://github.com/PrimeDecomp/prime.git
Add CColorElement, CUVElement
This commit is contained in:
parent
16738400c7
commit
2c60ca8c47
|
@ -8,59 +8,59 @@ lbl_803EDA00:
|
|||
# ROM: 0x3EAA00
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__16CCEParticleColor
|
||||
.4byte GetValue__16CCEParticleColor
|
||||
.4byte __dt__16CCEParticleColorFv
|
||||
.4byte GetValue__16CCEParticleColorCFiR6CColor
|
||||
|
||||
.global lbl_803EDA10
|
||||
lbl_803EDA10:
|
||||
.global __vt__18CCEKeyframeEmitter
|
||||
__vt__18CCEKeyframeEmitter:
|
||||
# ROM: 0x3EAA10
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__18CCEKeyframeEmitterFv
|
||||
.4byte GetValue__18CCEKeyframeEmitterCFiR6CColor
|
||||
|
||||
.global lbl_803EDA20
|
||||
lbl_803EDA20:
|
||||
.global __vt__8CCEPulse
|
||||
__vt__8CCEPulse:
|
||||
# ROM: 0x3EAA20
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__8CCEPulseFv
|
||||
.4byte GetValue__8CCEPulseCFiR6CColor
|
||||
|
||||
.global lbl_803EDA30
|
||||
lbl_803EDA30:
|
||||
.global __vt__12CCETimeChain
|
||||
__vt__12CCETimeChain:
|
||||
# ROM: 0x3EAA30
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__12CCETimeChainFv
|
||||
.4byte GetValue__12CCETimeChainCFiR6CColor
|
||||
|
||||
.global lbl_803EDA40
|
||||
lbl_803EDA40:
|
||||
.global __vt__10CCEFadeEnd
|
||||
__vt__10CCEFadeEnd:
|
||||
# ROM: 0x3EAA40
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__10CCEFadeEndFv
|
||||
.4byte GetValue__10CCEFadeEndCFiR6CColor
|
||||
|
||||
.global lbl_803EDA50
|
||||
lbl_803EDA50:
|
||||
.global __vt__7CCEFade
|
||||
__vt__7CCEFade:
|
||||
# ROM: 0x3EAA50
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__7CCEFadeFv
|
||||
.4byte GetValue__7CCEFadeCFiR6CColor
|
||||
|
||||
.global lbl_803EDA60
|
||||
lbl_803EDA60:
|
||||
.global __vt__15CCEFastConstant
|
||||
__vt__15CCEFastConstant:
|
||||
# ROM: 0x3EAA60
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__15CCEFastConstantFv
|
||||
.4byte GetValue__15CCEFastConstantCFiR6CColor
|
||||
|
||||
.global lbl_803EDA70
|
||||
lbl_803EDA70:
|
||||
.global __vt__11CCEConstant
|
||||
__vt__11CCEConstant:
|
||||
# ROM: 0x3EAA70
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
@ -152,8 +152,8 @@ lbl_805A88AC:
|
|||
|
||||
.section .text, "ax"
|
||||
|
||||
.global __dt__16CCEParticleColor
|
||||
__dt__16CCEParticleColor:
|
||||
.global __dt__16CCEParticleColorFv
|
||||
__dt__16CCEParticleColorFv:
|
||||
/* 803163C8 00313328 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 803163CC 0031332C 7C 08 02 A6 */ mflr r0
|
||||
/* 803163D0 00313330 90 01 00 14 */ stw r0, 0x14(r1)
|
||||
|
@ -185,8 +185,8 @@ lbl_80316420:
|
|||
/* 80316430 00313390 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80316434 00313394 4E 80 00 20 */ blr
|
||||
|
||||
.global GetValue__16CCEParticleColor
|
||||
GetValue__16CCEParticleColor:
|
||||
.global GetValue__16CCEParticleColorCFiR6CColor
|
||||
GetValue__16CCEParticleColorCFiR6CColor:
|
||||
/* 80316438 00313398 80 8D A8 EC */ lwz r4, mCurrentParticle__16CParticleGlobals@sda21(r13)
|
||||
/* 8031643C 0031339C 38 60 00 00 */ li r3, 0
|
||||
/* 80316440 003133A0 80 04 00 34 */ lwz r0, 0x34(r4)
|
||||
|
@ -286,9 +286,9 @@ __dt__18CCEKeyframeEmitterFv:
|
|||
/* 80316580 003134E0 93 C1 00 18 */ stw r30, 0x18(r1)
|
||||
/* 80316584 003134E4 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 80316588 003134E8 41 82 00 90 */ beq lbl_80316618
|
||||
/* 8031658C 003134EC 3C 60 80 3F */ lis r3, lbl_803EDA10@ha
|
||||
/* 8031658C 003134EC 3C 60 80 3F */ lis r3, __vt__18CCEKeyframeEmitter@ha
|
||||
/* 80316590 003134F0 34 1E 00 18 */ addic. r0, r30, 0x18
|
||||
/* 80316594 003134F4 38 03 DA 10 */ addi r0, r3, lbl_803EDA10@l
|
||||
/* 80316594 003134F4 38 03 DA 10 */ addi r0, r3, __vt__18CCEKeyframeEmitter@l
|
||||
/* 80316598 003134F8 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 8031659C 003134FC 41 82 00 44 */ beq lbl_803165E0
|
||||
/* 803165A0 00313500 80 1E 00 1C */ lwz r0, 0x1c(r30)
|
||||
|
@ -347,13 +347,13 @@ __ct__18CCEKeyframeEmitterFR12CInputStream:
|
|||
/* 80316654 003135B4 3C 60 80 3F */ lis r3, __vt__8IElement@ha
|
||||
/* 80316658 003135B8 93 A1 00 14 */ stw r29, 0x14(r1)
|
||||
/* 8031665C 003135BC 38 03 C5 A8 */ addi r0, r3, __vt__8IElement@l
|
||||
/* 80316660 003135C0 3C 60 80 3F */ lis r3, lbl_803EDA10@ha
|
||||
/* 80316660 003135C0 3C 60 80 3F */ lis r3, __vt__18CCEKeyframeEmitter@ha
|
||||
/* 80316664 003135C4 7F C6 F3 78 */ mr r6, r30
|
||||
/* 80316668 003135C8 93 81 00 10 */ stw r28, 0x10(r1)
|
||||
/* 8031666C 003135CC 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80316670 003135D0 38 05 C5 B4 */ addi r0, r5, __vt__13CColorElement@l
|
||||
/* 80316674 003135D4 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80316678 003135D8 38 03 DA 10 */ addi r0, r3, lbl_803EDA10@l
|
||||
/* 80316678 003135D8 38 03 DA 10 */ addi r0, r3, __vt__18CCEKeyframeEmitter@l
|
||||
/* 8031667C 003135DC 7F E3 FB 78 */ mr r3, r31
|
||||
/* 80316680 003135E0 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80316684 003135E4 48 02 86 01 */ bl ReadLong__12CInputStreamFv
|
||||
|
@ -516,8 +516,8 @@ __dt__8CCEPulseFv:
|
|||
/* 803168B8 00313818 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 803168BC 0031381C 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 803168C0 00313820 41 82 00 C8 */ beq lbl_80316988
|
||||
/* 803168C4 00313824 3C 60 80 3F */ lis r3, lbl_803EDA20@ha
|
||||
/* 803168C8 00313828 38 03 DA 20 */ addi r0, r3, lbl_803EDA20@l
|
||||
/* 803168C4 00313824 3C 60 80 3F */ lis r3, __vt__8CCEPulse@ha
|
||||
/* 803168C8 00313828 38 03 DA 20 */ addi r0, r3, __vt__8CCEPulse@l
|
||||
/* 803168CC 0031382C 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 803168D0 00313830 80 7E 00 04 */ lwz r3, 4(r30)
|
||||
/* 803168D4 00313834 28 03 00 00 */ cmplwi r3, 0
|
||||
|
@ -584,10 +584,10 @@ __ct__8CCEPulseFP11CIntElementP11CIntElementP13CColorElementP13CColorElement:
|
|||
/* 803169A4 00313904 3D 40 80 3F */ lis r10, __vt__8IElement@ha
|
||||
/* 803169A8 00313908 3D 20 80 3F */ lis r9, __vt__13CColorElement@ha
|
||||
/* 803169AC 0031390C 38 0A C5 A8 */ addi r0, r10, __vt__8IElement@l
|
||||
/* 803169B0 00313910 3D 00 80 3F */ lis r8, lbl_803EDA20@ha
|
||||
/* 803169B0 00313910 3D 00 80 3F */ lis r8, __vt__8CCEPulse@ha
|
||||
/* 803169B4 00313914 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 803169B8 00313918 39 29 C5 B4 */ addi r9, r9, __vt__13CColorElement@l
|
||||
/* 803169BC 0031391C 38 08 DA 20 */ addi r0, r8, lbl_803EDA20@l
|
||||
/* 803169BC 0031391C 38 08 DA 20 */ addi r0, r8, __vt__8CCEPulse@l
|
||||
/* 803169C0 00313920 91 23 00 00 */ stw r9, 0(r3)
|
||||
/* 803169C4 00313924 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 803169C8 00313928 90 83 00 04 */ stw r4, 4(r3)
|
||||
|
@ -651,8 +651,8 @@ __dt__12CCETimeChainFv:
|
|||
/* 80316A90 003139F0 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 80316A94 003139F4 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 80316A98 003139F8 41 82 00 A8 */ beq lbl_80316B40
|
||||
/* 80316A9C 003139FC 3C 60 80 3F */ lis r3, lbl_803EDA30@ha
|
||||
/* 80316AA0 00313A00 38 03 DA 30 */ addi r0, r3, lbl_803EDA30@l
|
||||
/* 80316A9C 003139FC 3C 60 80 3F */ lis r3, __vt__12CCETimeChain@ha
|
||||
/* 80316AA0 00313A00 38 03 DA 30 */ addi r0, r3, __vt__12CCETimeChain@l
|
||||
/* 80316AA4 00313A04 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80316AA8 00313A08 80 7E 00 04 */ lwz r3, 4(r30)
|
||||
/* 80316AAC 00313A0C 28 03 00 00 */ cmplwi r3, 0
|
||||
|
@ -710,10 +710,10 @@ __ct__12CCETimeChainFP13CColorElementP13CColorElementP11CIntElement:
|
|||
/* 80316B5C 00313ABC 3D 20 80 3F */ lis r9, __vt__8IElement@ha
|
||||
/* 80316B60 00313AC0 3D 00 80 3F */ lis r8, __vt__13CColorElement@ha
|
||||
/* 80316B64 00313AC4 38 09 C5 A8 */ addi r0, r9, __vt__8IElement@l
|
||||
/* 80316B68 00313AC8 3C E0 80 3F */ lis r7, lbl_803EDA30@ha
|
||||
/* 80316B68 00313AC8 3C E0 80 3F */ lis r7, __vt__12CCETimeChain@ha
|
||||
/* 80316B6C 00313ACC 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80316B70 00313AD0 39 08 C5 B4 */ addi r8, r8, __vt__13CColorElement@l
|
||||
/* 80316B74 00313AD4 38 07 DA 30 */ addi r0, r7, lbl_803EDA30@l
|
||||
/* 80316B74 00313AD4 38 07 DA 30 */ addi r0, r7, __vt__12CCETimeChain@l
|
||||
/* 80316B78 00313AD8 91 03 00 00 */ stw r8, 0(r3)
|
||||
/* 80316B7C 00313ADC 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80316B80 00313AE0 90 83 00 04 */ stw r4, 4(r3)
|
||||
|
@ -852,8 +852,8 @@ __dt__10CCEFadeEndFv:
|
|||
/* 80316D74 00313CD4 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 80316D78 00313CD8 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 80316D7C 00313CDC 41 82 00 C8 */ beq lbl_80316E44
|
||||
/* 80316D80 00313CE0 3C 60 80 3F */ lis r3, lbl_803EDA40@ha
|
||||
/* 80316D84 00313CE4 38 03 DA 40 */ addi r0, r3, lbl_803EDA40@l
|
||||
/* 80316D80 00313CE0 3C 60 80 3F */ lis r3, __vt__10CCEFadeEnd@ha
|
||||
/* 80316D84 00313CE4 38 03 DA 40 */ addi r0, r3, __vt__10CCEFadeEnd@l
|
||||
/* 80316D88 00313CE8 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80316D8C 00313CEC 80 7E 00 04 */ lwz r3, 4(r30)
|
||||
/* 80316D90 00313CF0 28 03 00 00 */ cmplwi r3, 0
|
||||
|
@ -920,10 +920,10 @@ __ct__10CCEFadeEndFP13CColorElementP13CColorElementP12CRealElementP12CRealElemen
|
|||
/* 80316E60 00313DC0 3D 40 80 3F */ lis r10, __vt__8IElement@ha
|
||||
/* 80316E64 00313DC4 3D 20 80 3F */ lis r9, __vt__13CColorElement@ha
|
||||
/* 80316E68 00313DC8 38 0A C5 A8 */ addi r0, r10, __vt__8IElement@l
|
||||
/* 80316E6C 00313DCC 3D 00 80 3F */ lis r8, lbl_803EDA40@ha
|
||||
/* 80316E6C 00313DCC 3D 00 80 3F */ lis r8, __vt__10CCEFadeEnd@ha
|
||||
/* 80316E70 00313DD0 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80316E74 00313DD4 39 29 C5 B4 */ addi r9, r9, __vt__13CColorElement@l
|
||||
/* 80316E78 00313DD8 38 08 DA 40 */ addi r0, r8, lbl_803EDA40@l
|
||||
/* 80316E78 00313DD8 38 08 DA 40 */ addi r0, r8, __vt__10CCEFadeEnd@l
|
||||
/* 80316E7C 00313DDC 91 23 00 00 */ stw r9, 0(r3)
|
||||
/* 80316E80 00313DE0 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80316E84 00313DE4 90 83 00 04 */ stw r4, 4(r3)
|
||||
|
@ -1054,8 +1054,8 @@ __dt__7CCEFadeFv:
|
|||
/* 80317058 00313FB8 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 8031705C 00313FBC 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 80317060 00313FC0 41 82 00 A8 */ beq lbl_80317108
|
||||
/* 80317064 00313FC4 3C 60 80 3F */ lis r3, lbl_803EDA50@ha
|
||||
/* 80317068 00313FC8 38 03 DA 50 */ addi r0, r3, lbl_803EDA50@l
|
||||
/* 80317064 00313FC4 3C 60 80 3F */ lis r3, __vt__7CCEFade@ha
|
||||
/* 80317068 00313FC8 38 03 DA 50 */ addi r0, r3, __vt__7CCEFade@l
|
||||
/* 8031706C 00313FCC 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80317070 00313FD0 80 7E 00 04 */ lwz r3, 4(r30)
|
||||
/* 80317074 00313FD4 28 03 00 00 */ cmplwi r3, 0
|
||||
|
@ -1113,10 +1113,10 @@ __ct__7CCEFadeFP13CColorElementP13CColorElementP12CRealElement:
|
|||
/* 80317124 00314084 3D 20 80 3F */ lis r9, __vt__8IElement@ha
|
||||
/* 80317128 00314088 3D 00 80 3F */ lis r8, __vt__13CColorElement@ha
|
||||
/* 8031712C 0031408C 38 09 C5 A8 */ addi r0, r9, __vt__8IElement@l
|
||||
/* 80317130 00314090 3C E0 80 3F */ lis r7, lbl_803EDA50@ha
|
||||
/* 80317130 00314090 3C E0 80 3F */ lis r7, __vt__7CCEFade@ha
|
||||
/* 80317134 00314094 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80317138 00314098 39 08 C5 B4 */ addi r8, r8, __vt__13CColorElement@l
|
||||
/* 8031713C 0031409C 38 07 DA 50 */ addi r0, r7, lbl_803EDA50@l
|
||||
/* 8031713C 0031409C 38 07 DA 50 */ addi r0, r7, __vt__7CCEFade@l
|
||||
/* 80317140 003140A0 91 03 00 00 */ stw r8, 0(r3)
|
||||
/* 80317144 003140A4 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 80317148 003140A8 90 83 00 04 */ stw r4, 4(r3)
|
||||
|
@ -1139,8 +1139,8 @@ __dt__15CCEFastConstantFv:
|
|||
/* 80317174 003140D4 93 E1 00 0C */ stw r31, 0xc(r1)
|
||||
/* 80317178 003140D8 7C 7F 1B 79 */ or. r31, r3, r3
|
||||
/* 8031717C 003140DC 41 82 00 44 */ beq lbl_803171C0
|
||||
/* 80317180 003140E0 3C 60 80 3F */ lis r3, lbl_803EDA60@ha
|
||||
/* 80317184 003140E4 38 03 DA 60 */ addi r0, r3, lbl_803EDA60@l
|
||||
/* 80317180 003140E0 3C 60 80 3F */ lis r3, __vt__15CCEFastConstant@ha
|
||||
/* 80317184 003140E4 38 03 DA 60 */ addi r0, r3, __vt__15CCEFastConstant@l
|
||||
/* 80317188 003140E8 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 8031718C 003140EC 41 82 00 20 */ beq lbl_803171AC
|
||||
/* 80317190 003140F0 3C 60 80 3F */ lis r3, __vt__13CColorElement@ha
|
||||
|
@ -1182,10 +1182,10 @@ __ct__15CCEFastConstantFffff:
|
|||
/* 8031720C 0031416C 3C 80 80 3F */ lis r4, __vt__13CColorElement@ha
|
||||
/* 80317210 00314170 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 80317214 00314174 38 04 C5 B4 */ addi r0, r4, __vt__13CColorElement@l
|
||||
/* 80317218 00314178 3C 60 80 3F */ lis r3, lbl_803EDA60@ha
|
||||
/* 80317218 00314178 3C 60 80 3F */ lis r3, __vt__15CCEFastConstant@ha
|
||||
/* 8031721C 0031417C 38 C0 00 FF */ li r6, 0xff
|
||||
/* 80317220 00314180 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 80317224 00314184 38 63 DA 60 */ addi r3, r3, lbl_803EDA60@l
|
||||
/* 80317224 00314184 38 63 DA 60 */ addi r3, r3, __vt__15CCEFastConstant@l
|
||||
/* 80317228 00314188 38 00 00 00 */ li r0, 0
|
||||
/* 8031722C 0031418C 38 81 00 08 */ addi r4, r1, 8
|
||||
/* 80317230 00314190 90 7F 00 00 */ stw r3, 0(r31)
|
||||
|
@ -1320,8 +1320,8 @@ __dt__11CCEConstantFv:
|
|||
/* 8031741C 0031437C 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 80317420 00314380 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 80317424 00314384 41 82 00 C8 */ beq lbl_803174EC
|
||||
/* 80317428 00314388 3C 60 80 3F */ lis r3, lbl_803EDA70@ha
|
||||
/* 8031742C 0031438C 38 03 DA 70 */ addi r0, r3, lbl_803EDA70@l
|
||||
/* 80317428 00314388 3C 60 80 3F */ lis r3, __vt__11CCEConstant@ha
|
||||
/* 8031742C 0031438C 38 03 DA 70 */ addi r0, r3, __vt__11CCEConstant@l
|
||||
/* 80317430 00314390 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80317434 00314394 80 7E 00 04 */ lwz r3, 4(r30)
|
||||
/* 80317438 00314398 28 03 00 00 */ cmplwi r3, 0
|
||||
|
@ -1388,10 +1388,10 @@ __ct__11CCEConstantFP12CRealElementP12CRealElementP12CRealElementP12CRealElement
|
|||
/* 80317508 00314468 3D 40 80 3F */ lis r10, __vt__8IElement@ha
|
||||
/* 8031750C 0031446C 3D 20 80 3F */ lis r9, __vt__13CColorElement@ha
|
||||
/* 80317510 00314470 38 0A C5 A8 */ addi r0, r10, __vt__8IElement@l
|
||||
/* 80317514 00314474 3D 00 80 3F */ lis r8, lbl_803EDA70@ha
|
||||
/* 80317514 00314474 3D 00 80 3F */ lis r8, __vt__11CCEConstant@ha
|
||||
/* 80317518 00314478 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 8031751C 0031447C 39 29 C5 B4 */ addi r9, r9, __vt__13CColorElement@l
|
||||
/* 80317520 00314480 38 08 DA 70 */ addi r0, r8, lbl_803EDA70@l
|
||||
/* 80317520 00314480 38 08 DA 70 */ addi r0, r8, __vt__11CCEConstant@l
|
||||
/* 80317524 00314484 91 23 00 00 */ stw r9, 0(r3)
|
||||
/* 80317528 00314488 90 03 00 00 */ stw r0, 0(r3)
|
||||
/* 8031752C 0031448C 90 83 00 04 */ stw r4, 4(r3)
|
||||
|
|
|
@ -11,19 +11,19 @@ lbl_803EE118:
|
|||
.4byte __dt__15CUVEAnimTextureFv
|
||||
.4byte GetValueUV__15CUVEAnimTextureCFiR13SUVElementSet
|
||||
.4byte GetValueTexture__15CUVEAnimTextureCFi
|
||||
.4byte HasConstantTexture__15CUVEAnimTextureFv
|
||||
.4byte HasConstantUV__15CUVEAnimTextureFv
|
||||
.4byte HasConstantTexture__15CUVEAnimTextureCFv
|
||||
.4byte HasConstantUV__15CUVEAnimTextureCFv
|
||||
|
||||
.global lbl_803EE134
|
||||
lbl_803EE134:
|
||||
.global __vt__12CUVEConstant
|
||||
__vt__12CUVEConstant:
|
||||
# ROM: 0x3EB134
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
.4byte __dt__12CUVEConstantFv
|
||||
.4byte GetValueUV__12CUVEConstantCFiR13SUVElementSet
|
||||
.4byte GetValueTexture__12CUVEConstantCFi
|
||||
.4byte HasConstantTexture__12CUVEConstantFv
|
||||
.4byte HasConstantUV__12CUVEConstantFv
|
||||
.4byte HasConstantTexture__12CUVEConstantCFv
|
||||
.4byte HasConstantUV__12CUVEConstantCFv
|
||||
|
||||
.section .sdata
|
||||
.balign 8
|
||||
|
@ -46,13 +46,13 @@ lbl_805A88F0:
|
|||
|
||||
.section .text, "ax"
|
||||
|
||||
.global HasConstantTexture__15CUVEAnimTextureFv
|
||||
HasConstantTexture__15CUVEAnimTextureFv:
|
||||
.global HasConstantTexture__15CUVEAnimTextureCFv
|
||||
HasConstantTexture__15CUVEAnimTextureCFv:
|
||||
/* 80333FA8 00330F08 38 60 00 01 */ li r3, 1
|
||||
/* 80333FAC 00330F0C 4E 80 00 20 */ blr
|
||||
|
||||
.global HasConstantUV__15CUVEAnimTextureFv
|
||||
HasConstantUV__15CUVEAnimTextureFv:
|
||||
.global HasConstantUV__15CUVEAnimTextureCFv
|
||||
HasConstantUV__15CUVEAnimTextureCFv:
|
||||
/* 80333FB0 00330F10 38 60 00 00 */ li r3, 0
|
||||
/* 80333FB4 00330F14 4E 80 00 20 */ blr
|
||||
|
||||
|
@ -378,7 +378,7 @@ lbl_80334444:
|
|||
/* 80334448 003313A8 38 79 00 2C */ addi r3, r25, 0x2c
|
||||
/* 8033444C 003313AC 7C 9C D1 D6 */ mullw r4, r28, r26
|
||||
/* 80334450 003313B0 90 99 00 20 */ stw r4, 0x20(r25)
|
||||
/* 80334454 003313B4 48 00 03 21 */ bl sub_80334774
|
||||
/* 80334454 003313B4 48 00 03 21 */ bl "reserve__Q24rstl50vector<13SUVElementSet,Q24rstl17rmemory_allocator>Fi"
|
||||
/* 80334458 003313B8 CB E2 CB 40 */ lfd f31, lbl_805AE860@sda21(r2)
|
||||
/* 8033445C 003313BC 3B 5A FF FF */ addi r26, r26, -1
|
||||
/* 80334460 003313C0 6F 7E 80 00 */ xoris r30, r27, 0x8000
|
||||
|
@ -451,7 +451,7 @@ lbl_80334478:
|
|||
/* 80334564 003314C4 41 82 00 08 */ beq lbl_8033456C
|
||||
/* 80334568 003314C8 54 E4 08 3C */ slwi r4, r7, 1
|
||||
lbl_8033456C:
|
||||
/* 8033456C 003314CC 48 00 02 09 */ bl sub_80334774
|
||||
/* 8033456C 003314CC 48 00 02 09 */ bl "reserve__Q24rstl50vector<13SUVElementSet,Q24rstl17rmemory_allocator>Fi"
|
||||
lbl_80334570:
|
||||
/* 80334570 003314D0 80 19 00 30 */ lwz r0, 0x30(r25)
|
||||
/* 80334574 003314D4 80 79 00 38 */ lwz r3, 0x38(r25)
|
||||
|
@ -529,9 +529,9 @@ __dt__12CUVEConstantFv:
|
|||
/* 80334664 003315C4 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 80334668 003315C8 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 8033466C 003315CC 41 82 00 64 */ beq lbl_803346D0
|
||||
/* 80334670 003315D0 3C 60 80 3F */ lis r3, lbl_803EE134@ha
|
||||
/* 80334670 003315D0 3C 60 80 3F */ lis r3, __vt__12CUVEConstant@ha
|
||||
/* 80334674 003315D4 34 1E 00 04 */ addic. r0, r30, 4
|
||||
/* 80334678 003315D8 38 03 E1 34 */ addi r0, r3, lbl_803EE134@l
|
||||
/* 80334678 003315D8 38 03 E1 34 */ addi r0, r3, __vt__12CUVEConstant@l
|
||||
/* 8033467C 003315DC 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80334680 003315E0 41 82 00 18 */ beq lbl_80334698
|
||||
/* 80334684 003315E4 34 1E 00 04 */ addic. r0, r30, 4
|
||||
|
@ -575,13 +575,13 @@ lbl_803346D0:
|
|||
/* 80334704 00331664 3C 60 80 3F */ lis r3, __vt__8IElement@ha
|
||||
/* 80334708 00331668 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 8033470C 0033166C 38 03 C5 A8 */ addi r0, r3, __vt__8IElement@l
|
||||
/* 80334710 00331670 3C 60 80 3F */ lis r3, lbl_803EE134@ha
|
||||
/* 80334710 00331670 3C 60 80 3F */ lis r3, __vt__12CUVEConstant@ha
|
||||
/* 80334714 00331674 3B DF 00 04 */ addi r30, r31, 4
|
||||
/* 80334718 00331678 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 8033471C 0033167C 38 05 C5 68 */ addi r0, r5, __vt__10CUVElement@l
|
||||
/* 80334720 00331680 7F E6 FB 78 */ mr r6, r31
|
||||
/* 80334724 00331684 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 80334728 00331688 38 03 E1 34 */ addi r0, r3, lbl_803EE134@l
|
||||
/* 80334728 00331688 38 03 E1 34 */ addi r0, r3, __vt__12CUVEConstant@l
|
||||
/* 8033472C 0033168C 7F C3 F3 78 */ mr r3, r30
|
||||
/* 80334730 00331690 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 80334734 00331694 48 00 C7 75 */ bl __ct__6CTokenFRC6CToken
|
||||
|
@ -597,18 +597,18 @@ lbl_803346D0:
|
|||
/* 8033475C 003316BC 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80334760 003316C0 4E 80 00 20 */ blr
|
||||
|
||||
.global HasConstantTexture__12CUVEConstantFv
|
||||
HasConstantTexture__12CUVEConstantFv:
|
||||
.global HasConstantTexture__12CUVEConstantCFv
|
||||
HasConstantTexture__12CUVEConstantCFv:
|
||||
/* 80334764 003316C4 38 60 00 01 */ li r3, 1
|
||||
/* 80334768 003316C8 4E 80 00 20 */ blr
|
||||
|
||||
.global HasConstantUV__12CUVEConstantFv
|
||||
HasConstantUV__12CUVEConstantFv:
|
||||
.global HasConstantUV__12CUVEConstantCFv
|
||||
HasConstantUV__12CUVEConstantCFv:
|
||||
/* 8033476C 003316CC 38 60 00 01 */ li r3, 1
|
||||
/* 80334770 003316D0 4E 80 00 20 */ blr
|
||||
|
||||
.global sub_80334774
|
||||
sub_80334774:
|
||||
.global "reserve__Q24rstl50vector<13SUVElementSet,Q24rstl17rmemory_allocator>Fi"
|
||||
"reserve__Q24rstl50vector<13SUVElementSet,Q24rstl17rmemory_allocator>Fi":
|
||||
/* 80334774 003316D4 94 21 FF D0 */ stwu r1, -0x30(r1)
|
||||
/* 80334778 003316D8 7C 08 02 A6 */ mflr r0
|
||||
/* 8033477C 003316DC 90 01 00 34 */ stw r0, 0x34(r1)
|
||||
|
|
|
@ -594,7 +594,7 @@ LIBS = [
|
|||
["Kyoto/Alloc/IAllocator", True],
|
||||
"Kyoto/PVS/CPVSVisOctree",
|
||||
"Kyoto/PVS/CPVSVisSet",
|
||||
"Kyoto/Particles/CColorElement",
|
||||
["Kyoto/Particles/CColorElement", False],
|
||||
"Kyoto/Particles/CElementGen",
|
||||
["Kyoto/Particles/CIntElement", True],
|
||||
["Kyoto/Particles/CModVectorElement", False],
|
||||
|
@ -605,8 +605,8 @@ LIBS = [
|
|||
"Kyoto/Particles/CParticleSwooshDataFactory",
|
||||
["Kyoto/Particles/CRealElement", True],
|
||||
"Kyoto/Particles/CSpawnSystemKeyframeData",
|
||||
"Kyoto/Particles/CUVElement",
|
||||
"Kyoto/Particles/CVectorElement",
|
||||
["Kyoto/Particles/CUVElement", False],
|
||||
["Kyoto/Particles/CVectorElement", False],
|
||||
["Kyoto/Particles/CWarp", True],
|
||||
["Kyoto/Math/CPlane", True],
|
||||
["Kyoto/Math/CSphere", True],
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Basics/CCast.hpp"
|
||||
#include "Kyoto/Math/CMath.hpp"
|
||||
|
||||
#include <dolphin/gx/GXStruct.h>
|
||||
|
||||
|
@ -14,7 +15,7 @@
|
|||
class CInputStream;
|
||||
class CColor {
|
||||
public:
|
||||
CColor() {}
|
||||
CColor() { Set(255, 0, 255); }
|
||||
CColor(uint col) : mRgba(col) {}
|
||||
CColor(CInputStream& in);
|
||||
CColor(float r, float g, float b, float a = 1.f);
|
||||
|
@ -26,6 +27,12 @@ public:
|
|||
}
|
||||
|
||||
void Set(float r, float g, float b, float a);
|
||||
void Set(uchar r, uchar g, uchar b, uchar a = 255) {
|
||||
mR = r;
|
||||
mG = g;
|
||||
mB = b;
|
||||
mA = a;
|
||||
}
|
||||
void Get(float& r, float& g, float& b, float& a) const;
|
||||
void Get(float& r, float& g, float& b) const;
|
||||
static CColor Lerp(const CColor& a, const CColor& b, float t);
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
#ifndef _CCOLORELEMENT
|
||||
#define _CCOLORELEMENT
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Graphics/CColor.hpp"
|
||||
#include "Kyoto/Particles/IElement.hpp"
|
||||
|
||||
class CCEConstant : public CColorElement {
|
||||
CRealElement* x4_r;
|
||||
CRealElement* x8_g;
|
||||
CRealElement* xc_b;
|
||||
CRealElement* x10_a;
|
||||
|
||||
public:
|
||||
CCEConstant(CRealElement* r, CRealElement* g, CRealElement* b, CRealElement* a);
|
||||
~CCEConstant() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCEFastConstant : public CColorElement {
|
||||
CColor x4_val;
|
||||
|
||||
public:
|
||||
CCEFastConstant(float r, float g, float b, float a);
|
||||
~CCEFastConstant() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCEFade : public CColorElement {
|
||||
CColorElement* x4_a;
|
||||
CColorElement* x8_b;
|
||||
CRealElement* xc_endFrame;
|
||||
|
||||
public:
|
||||
CCEFade(CColorElement* a, CColorElement* b, CRealElement* end);
|
||||
~CCEFade() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCEFadeEnd : public CColorElement {
|
||||
CColorElement* x4_a;
|
||||
CColorElement* x8_b;
|
||||
CRealElement* xc_startFrame;
|
||||
CRealElement* x10_endFrame;
|
||||
|
||||
public:
|
||||
CCEFadeEnd(CColorElement* a, CColorElement* b, CRealElement* start, CRealElement* end);
|
||||
~CCEFadeEnd() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCETimeChain : public CColorElement {
|
||||
CColorElement* x4_a;
|
||||
CColorElement* x8_b;
|
||||
CIntElement* xc_swFrame;
|
||||
|
||||
public:
|
||||
CCETimeChain(CColorElement* a, CColorElement* b, CIntElement* c);
|
||||
~CCETimeChain() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCEPulse : public CColorElement {
|
||||
CIntElement* x4_aDuration;
|
||||
CIntElement* x8_bDuration;
|
||||
CColorElement* xc_aVal;
|
||||
CColorElement* x10_bVal;
|
||||
|
||||
public:
|
||||
CCEPulse(CIntElement* a, CIntElement* b, CColorElement* c, CColorElement* d);
|
||||
~CCEPulse() override;
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
class CCEKeyframeEmitter : public CColorElement {
|
||||
int x4_percent;
|
||||
int x8_unk1;
|
||||
bool xc_loop;
|
||||
bool xd_unk2;
|
||||
int x10_loopEnd;
|
||||
int x14_loopStart;
|
||||
rstl::vector< CColor > x18_keys;
|
||||
|
||||
public:
|
||||
CCEKeyframeEmitter(CInputStream& in);
|
||||
~CCEKeyframeEmitter() override;
|
||||
bool GetValue(int frame, CColor& valOut) const override;
|
||||
};
|
||||
|
||||
class CCEParticleColor : public CColorElement {
|
||||
public:
|
||||
~CCEParticleColor() override {}
|
||||
bool GetValue(int frame, CColor& colorOut) const override;
|
||||
};
|
||||
|
||||
#endif // _CCOLORELEMENT
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef _CUVELEMENT
|
||||
#define _CUVELEMENT
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "Kyoto/Particles/IElement.hpp"
|
||||
#include "Kyoto/TToken.hpp"
|
||||
|
||||
class CTexture;
|
||||
|
||||
class CUVEConstant : public CUVElement {
|
||||
TLockedToken< CTexture > x4_tex;
|
||||
|
||||
public:
|
||||
CUVEConstant(TToken< CTexture > tex);
|
||||
~CUVEConstant() override;
|
||||
TLockedToken< CTexture > GetValueTexture(int frame) const override;
|
||||
void GetValueUV(int frame, SUVElementSet& valOut) const override;
|
||||
bool HasConstantTexture() const override { return true; }
|
||||
bool HasConstantUV() const override { return true; }
|
||||
};
|
||||
|
||||
class CUVEAnimTexture : public CUVElement {
|
||||
TLockedToken< CTexture > x4_tex;
|
||||
int x10_tileW;
|
||||
int x14_tileH;
|
||||
int x18_strideW;
|
||||
int x1c_strideH;
|
||||
int x20_tiles;
|
||||
bool x24_loop;
|
||||
CIntElement* x28_cycleFrames;
|
||||
rstl::vector< SUVElementSet > x2c_uvElems;
|
||||
|
||||
public:
|
||||
CUVEAnimTexture(TToken< CTexture > tex, CIntElement* tileW, CIntElement* tileH,
|
||||
CIntElement* strideW, CIntElement* strideH, CIntElement* cycleFrames, bool loop);
|
||||
~CUVEAnimTexture() override;
|
||||
TLockedToken< CTexture > GetValueTexture(int frame) const override;
|
||||
void GetValueUV(int frame, SUVElementSet& valOut) const override;
|
||||
bool HasConstantTexture() const override { return true; }
|
||||
bool HasConstantUV() const override { return false; }
|
||||
};
|
||||
|
||||
#endif // _CUVELEMENT
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _CVECTORELEMENT
|
||||
#define _CVECTORELEMENT
|
||||
|
||||
|
||||
#endif // _CVECTORELEMENT
|
|
@ -55,9 +55,11 @@ public:
|
|||
struct SUVElementSet {
|
||||
float xMin, yMin, xMax, yMax;
|
||||
|
||||
SUVElementSet() : xMin(0.f), yMin(1.f), xMax(0.f), yMax(1.f) {}
|
||||
SUVElementSet(float xMin, float yMin, float xMax, float yMax)
|
||||
: xMin(xMin), yMin(yMin), xMax(xMax), yMax(yMax) {}
|
||||
// SUVElementSet() : xMin(0.f), yMin(1.f), xMax(0.f), yMax(1.f) {}
|
||||
// SUVElementSet(float xMin, float yMin, float xMax, float yMax)
|
||||
// : xMin(xMin), yMin(yMin), xMax(xMax), yMax(yMax) {}
|
||||
// SUVElementSet(const SUVElementSet& other)
|
||||
// : xMin(other.xMin), yMin(other.yMin), xMax(other.xMax), yMax(other.yMax) {}
|
||||
};
|
||||
|
||||
class CUVElement : public IElement {
|
||||
|
|
|
@ -0,0 +1,235 @@
|
|||
#include "Kyoto/Particles/CColorElement.hpp"
|
||||
|
||||
#include "Kyoto/Math/CMath.hpp"
|
||||
#include "Kyoto/Particles/CParticleGlobals.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
#include "rstl/math.hpp"
|
||||
|
||||
CCEConstant::CCEConstant(CRealElement* r, CRealElement* g, CRealElement* b, CRealElement* a)
|
||||
: x4_r(r), x8_g(g), xc_b(b), x10_a(a) {}
|
||||
|
||||
CCEConstant::~CCEConstant() {
|
||||
delete x4_r;
|
||||
delete x8_g;
|
||||
delete xc_b;
|
||||
delete x10_a;
|
||||
}
|
||||
|
||||
bool CCEConstant::GetValue(int frame, CColor& colorOut) const {
|
||||
float r, g, b, a;
|
||||
x4_r->GetValue(frame, r);
|
||||
r = CMath::Clamp(0.f, r, 1.f);
|
||||
x8_g->GetValue(frame, g);
|
||||
g = CMath::Clamp(0.f, g, 1.f);
|
||||
xc_b->GetValue(frame, b);
|
||||
b = CMath::Clamp(0.f, b, 1.f);
|
||||
x10_a->GetValue(frame, a);
|
||||
a = CMath::Clamp(0.f, a, 1.f);
|
||||
colorOut.Set(r, g, b, a);
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void SetClamp(CColor& color, float r, float g, float b, float a) {
|
||||
float cr = CMath::Clamp(0.f, r, 1.f);
|
||||
float cg = CMath::Clamp(0.f, g, 1.f);
|
||||
float cb = CMath::Clamp(0.f, b, 1.f);
|
||||
float ca = CMath::Clamp(0.f, a, 1.f);
|
||||
color.Set(cr, cg, cb, ca);
|
||||
// color.Set(
|
||||
// CMath::Clamp(0.f, r, 1.f),
|
||||
// CMath::Clamp(0.f, g, 1.f),
|
||||
// CMath::Clamp(0.f, b, 1.f),
|
||||
// CMath::Clamp(0.f, a, 1.f)
|
||||
// );
|
||||
}
|
||||
|
||||
CCEFastConstant::CCEFastConstant(float r, float g, float b, float a) {
|
||||
SetClamp(x4_val, r, g, b, a);
|
||||
// float cr = CMath::Clamp(0.f, r, 1.f);
|
||||
// float cg = CMath::Clamp(0.f, g, 1.f);
|
||||
// float cb = CMath::Clamp(0.f, b, 1.f);
|
||||
// float ca = CMath::Clamp(0.f, a, 1.f);
|
||||
// x4_val.Set(cr, cg, cb, ca
|
||||
// // CMath::Clamp(0.f, r, 1.f),
|
||||
// // CMath::Clamp(0.f, g, 1.f),
|
||||
// // CMath::Clamp(0.f, b, 1.f),
|
||||
// // CMath::Clamp(0.f, a, 1.f)
|
||||
// );
|
||||
}
|
||||
|
||||
CCEFastConstant::~CCEFastConstant() {}
|
||||
|
||||
bool CCEFastConstant::GetValue(int frame, CColor& colorOut) const {
|
||||
colorOut = x4_val;
|
||||
return false;
|
||||
}
|
||||
|
||||
CCEFade::CCEFade(CColorElement* a, CColorElement* b, CRealElement* end)
|
||||
: x4_a(a), x8_b(b), xc_endFrame(end) {}
|
||||
|
||||
CCEFade::~CCEFade() {
|
||||
delete x4_a;
|
||||
delete x8_b;
|
||||
delete xc_endFrame;
|
||||
}
|
||||
|
||||
bool CCEFade::GetValue(int frame, CColor& colorOut) const {
|
||||
float c;
|
||||
xc_endFrame->GetValue(frame, c);
|
||||
|
||||
float t = static_cast< float >(frame) * (1.f / c);
|
||||
if (t >= 1.f) {
|
||||
x8_b->GetValue(frame, colorOut);
|
||||
} else {
|
||||
CColor colA;
|
||||
CColor colB;
|
||||
x4_a->GetValue(frame, colA);
|
||||
x8_b->GetValue(frame, colB);
|
||||
|
||||
float ar, ag, ab, aa;
|
||||
float br, bg, bb, ba;
|
||||
colA.Get(ar, ag, ab, aa);
|
||||
colB.Get(br, bg, bb, ba);
|
||||
|
||||
float nt = 1.f - t;
|
||||
colorOut = CColor(ar * nt + br * t, ag * nt + bg * t, ab * nt + bb * t, aa * nt + ba * t);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CCEFadeEnd::CCEFadeEnd(CColorElement* a, CColorElement* b, CRealElement* start, CRealElement* end)
|
||||
: x4_a(a), x8_b(b), xc_startFrame(start), x10_endFrame(end) {}
|
||||
|
||||
CCEFadeEnd::~CCEFadeEnd() {
|
||||
delete x4_a;
|
||||
delete x8_b;
|
||||
delete xc_startFrame;
|
||||
delete x10_endFrame;
|
||||
}
|
||||
|
||||
bool CCEFadeEnd::GetValue(int frame, CColor& colorOut) const {
|
||||
float start;
|
||||
xc_startFrame->GetValue(frame, start);
|
||||
|
||||
float frameF = static_cast< float >(frame);
|
||||
if (frameF < start) {
|
||||
x4_a->GetValue(frame, colorOut);
|
||||
return false;
|
||||
}
|
||||
|
||||
float end;
|
||||
x10_endFrame->GetValue(frame, end);
|
||||
|
||||
CColor colA;
|
||||
CColor colB;
|
||||
x4_a->GetValue(frame, colA);
|
||||
x8_b->GetValue(frame, colB);
|
||||
|
||||
float ar, ag, ab, aa;
|
||||
float br, bg, bb, ba;
|
||||
colA.Get(ar, ag, ab, aa);
|
||||
colB.Get(br, bg, bb, ba);
|
||||
|
||||
float t = (frameF - start) / (end - start);
|
||||
float nt = 1.f - t;
|
||||
colorOut = CColor(ar * nt + br * t, ag * nt + bg * t, ab * nt + bb * t, aa * nt + ba * t);
|
||||
return false;
|
||||
}
|
||||
|
||||
CCETimeChain::CCETimeChain(CColorElement* a, CColorElement* b, CIntElement* c)
|
||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
||||
|
||||
CCETimeChain::~CCETimeChain() {
|
||||
delete x4_a;
|
||||
delete x8_b;
|
||||
delete xc_swFrame;
|
||||
}
|
||||
|
||||
bool CCETimeChain::GetValue(int frame, CColor& colorOut) const {
|
||||
int v;
|
||||
xc_swFrame->GetValue(frame, v);
|
||||
if (frame < v) {
|
||||
return x4_a->GetValue(frame, colorOut);
|
||||
} else {
|
||||
return x8_b->GetValue(frame - v, colorOut);
|
||||
}
|
||||
}
|
||||
|
||||
CCEPulse::CCEPulse(CIntElement* a, CIntElement* b, CColorElement* c, CColorElement* d)
|
||||
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
||||
|
||||
CCEPulse::~CCEPulse() {
|
||||
delete x4_aDuration;
|
||||
delete x8_bDuration;
|
||||
delete xc_aVal;
|
||||
delete x10_bVal;
|
||||
}
|
||||
|
||||
bool CCEPulse::GetValue(int frame, CColor& colorOut) const {
|
||||
int a, b;
|
||||
x4_aDuration->GetValue(frame, a);
|
||||
x8_bDuration->GetValue(frame, b);
|
||||
int cv = a + b + 1;
|
||||
if (cv < 0) {
|
||||
cv = 1;
|
||||
}
|
||||
|
||||
if (b >= 1) {
|
||||
if (frame % cv > a) {
|
||||
x10_bVal->GetValue(frame, colorOut);
|
||||
} else {
|
||||
xc_aVal->GetValue(frame, colorOut);
|
||||
}
|
||||
} else {
|
||||
xc_aVal->GetValue(frame, colorOut);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CCEKeyframeEmitter::CCEKeyframeEmitter(CInputStream& in)
|
||||
: x4_percent(in.ReadLong())
|
||||
, x8_unk1(in.ReadLong())
|
||||
, xc_loop(in.ReadBool())
|
||||
, xd_unk2(in.ReadBool())
|
||||
, x10_loopEnd(in.ReadLong())
|
||||
, x14_loopStart(in.ReadLong())
|
||||
, x18_keys(in) {
|
||||
if (x14_loopStart >= x10_loopEnd) {
|
||||
x14_loopStart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
CCEKeyframeEmitter::~CCEKeyframeEmitter() {}
|
||||
|
||||
bool CCEKeyframeEmitter::GetValue(int frame, CColor& valOut) const {
|
||||
if (x4_percent == 0) {
|
||||
int emitterTime = CParticleGlobals::GetEmitterTime();
|
||||
if (xc_loop) {
|
||||
if (emitterTime >= x10_loopEnd) {
|
||||
emitterTime -= x14_loopStart;
|
||||
emitterTime = emitterTime % (x10_loopEnd - x14_loopStart);
|
||||
emitterTime += x14_loopStart;
|
||||
}
|
||||
valOut = x18_keys[emitterTime];
|
||||
} else {
|
||||
emitterTime = rstl::min_val(emitterTime, x10_loopEnd - 1);
|
||||
valOut = x18_keys[emitterTime];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (CParticleGlobals::GetParticleLifetimePercentage() == 100) {
|
||||
valOut = x18_keys[CParticleGlobals::GetParticleLifetimePercentage()];
|
||||
} else {
|
||||
valOut = CColor::Lerp(x18_keys[CParticleGlobals::GetParticleLifetimePercentage()],
|
||||
x18_keys[CParticleGlobals::GetParticleLifetimePercentage() + 1],
|
||||
CParticleGlobals::GetParticleLifetimePercentageRemainder());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CCEParticleColor::GetValue(int frame, CColor& colorOut) const {
|
||||
colorOut = CParticleGlobals::GetCurrentParticle()->x34_color;
|
||||
return false;
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
#include "Kyoto/Particles/CUVElement.hpp"
|
||||
|
||||
#include "Kyoto/Graphics/CTexture.hpp"
|
||||
|
||||
#include "rstl/math.hpp"
|
||||
|
||||
CUVEConstant::CUVEConstant(TToken< CTexture > tex) : x4_tex(tex) {}
|
||||
|
||||
CUVEConstant::~CUVEConstant() {}
|
||||
|
||||
void CUVEConstant::GetValueUV(int frame, SUVElementSet& valOut) const {
|
||||
valOut.xMin = 0.f;
|
||||
valOut.yMin = 0.f;
|
||||
valOut.xMax = 1.f;
|
||||
valOut.yMax = 1.f;
|
||||
}
|
||||
|
||||
TLockedToken< CTexture > CUVEConstant::GetValueTexture(int frame) const { return x4_tex; }
|
||||
|
||||
CUVEAnimTexture::CUVEAnimTexture(TToken< CTexture > tex, CIntElement* tileW, CIntElement* tileH,
|
||||
CIntElement* strideW, CIntElement* strideH,
|
||||
CIntElement* cycleFrames, bool loop)
|
||||
: x4_tex(tex), x24_loop(loop) {
|
||||
int result = 0;
|
||||
tileW->GetValue(0, result);
|
||||
x10_tileW = result;
|
||||
delete tileW;
|
||||
|
||||
tileH->GetValue(0, result);
|
||||
x14_tileH = result;
|
||||
delete tileH;
|
||||
|
||||
strideW->GetValue(0, result);
|
||||
x18_strideW = result;
|
||||
delete strideW;
|
||||
|
||||
strideH->GetValue(0, result);
|
||||
x1c_strideH = result;
|
||||
delete strideH;
|
||||
|
||||
x28_cycleFrames = cycleFrames;
|
||||
|
||||
const int width = int(x4_tex->GetWidth());
|
||||
const int height = int(x4_tex->GetHeight());
|
||||
const int xTiles = rstl::max_val(1, width / x18_strideW);
|
||||
const int yTiles = rstl::max_val(1, height / x1c_strideH);
|
||||
|
||||
int tiles = xTiles * yTiles;
|
||||
x20_tiles = tiles;
|
||||
x2c_uvElems.reserve(tiles);
|
||||
|
||||
for (int y = yTiles - 1; y >= 0; --y) {
|
||||
for (int x = 0; x < xTiles; ++x) {
|
||||
SUVElementSet uvs = {
|
||||
float(x18_strideW * x) / float(width),
|
||||
float(x1c_strideH * y) / float(height),
|
||||
float(x18_strideW * x + x10_tileW) / float(width),
|
||||
float(x1c_strideH * y + x14_tileH) / float(height),
|
||||
};
|
||||
x2c_uvElems.push_back(uvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CUVEAnimTexture::~CUVEAnimTexture() { delete x28_cycleFrames; }
|
||||
|
||||
void CUVEAnimTexture::GetValueUV(int frame, SUVElementSet& valOut) const {
|
||||
int cv = 1;
|
||||
x28_cycleFrames->GetValue(frame, cv);
|
||||
float cvf =
|
||||
static_cast< float >(frame) / (static_cast< float >(cv) / static_cast< float >(x20_tiles));
|
||||
|
||||
int tile;
|
||||
if (x24_loop) {
|
||||
tile = rstl::max_val(static_cast< int >(cvf), 0);
|
||||
if (tile >= x20_tiles) {
|
||||
tile = tile % x20_tiles;
|
||||
}
|
||||
} else {
|
||||
tile = static_cast< int >(cvf);
|
||||
if (static_cast< int >(cvf) >= x20_tiles) {
|
||||
tile = x20_tiles - 1;
|
||||
}
|
||||
}
|
||||
|
||||
valOut = x2c_uvElems[tile];
|
||||
}
|
||||
|
||||
TLockedToken< CTexture > CUVEAnimTexture::GetValueTexture(int frame) const { return x4_tex; }
|
|
@ -0,0 +1 @@
|
|||
#include "Kyoto/Particles/CVectorElement.hpp"
|
Loading…
Reference in New Issue