summaryrefslogtreecommitdiffstats
path: root/src/fakerw/rphanim.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-26 21:03:15 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-26 21:03:15 +0200
commitf0890b11122291a22d6a65f349281cf1aed49bd0 (patch)
tree3b418b522c5fd097abac916693e59808ea4f5b4f /src/fakerw/rphanim.h
parentMore japanese (diff)
parentRemove little hack (diff)
downloadre3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.gz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.bz2
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.lz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.xz
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.tar.zst
re3-f0890b11122291a22d6a65f349281cf1aed49bd0.zip
Diffstat (limited to 'src/fakerw/rphanim.h')
-rw-r--r--src/fakerw/rphanim.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/fakerw/rphanim.h b/src/fakerw/rphanim.h
new file mode 100644
index 00000000..6ece8306
--- /dev/null
+++ b/src/fakerw/rphanim.h
@@ -0,0 +1,64 @@
+#pragma once
+
+#include "rtquat.h"
+
+//struct RpHAnimHierarchy;
+typedef rw::HAnimHierarchy RpHAnimHierarchy;
+//struct RpHAnimAnimation;
+typedef rw::Animation RpHAnimAnimation;
+
+#define rpHANIMSTDKEYFRAMETYPEID 0x1
+
+// same as rw::HAnimKeyFrame, but we need RtQuat in this one
+struct RpHAnimStdKeyFrame
+{
+ RpHAnimStdKeyFrame *prevFrame;
+ RwReal time;
+ RtQuat q;
+ RwV3d t;
+};
+
+
+enum RpHAnimHierarchyFlag
+{
+ rpHANIMHIERARCHYSUBHIERARCHY = rw::HAnimHierarchy::SUBHIERARCHY,
+ rpHANIMHIERARCHYNOMATRICES = rw::HAnimHierarchy::NOMATRICES,
+
+ rpHANIMHIERARCHYUPDATEMODELLINGMATRICES = rw::HAnimHierarchy::UPDATEMODELLINGMATRICES,
+ rpHANIMHIERARCHYUPDATELTMS = rw::HAnimHierarchy::UPDATELTMS,
+ rpHANIMHIERARCHYLOCALSPACEMATRICES = rw::HAnimHierarchy::LOCALSPACEMATRICES
+};
+
+#define rpHANIMPOPPARENTMATRIX rw::HAnimHierarchy::POP
+#define rpHANIMPUSHPARENTMATRIX rw::HAnimHierarchy::PUSH
+
+RwBool RpHAnimPluginAttach(void);
+
+RwBool RpHAnimFrameSetID(RwFrame *frame, RwInt32 id);
+RwInt32 RpHAnimFrameGetID(RwFrame *frame);
+
+RwInt32 RpHAnimIDGetIndex(RpHAnimHierarchy *hierarchy, RwInt32 ID);
+
+RwBool RpHAnimFrameSetHierarchy(RwFrame *frame, RpHAnimHierarchy *hierarchy);
+RpHAnimHierarchy *RpHAnimFrameGetHierarchy(RwFrame *frame);
+
+RpHAnimHierarchy *RpHAnimHierarchySetFlags(RpHAnimHierarchy *hierarchy, RpHAnimHierarchyFlag flags);
+RpHAnimHierarchyFlag RpHAnimHierarchyGetFlags(RpHAnimHierarchy *hierarchy);
+
+RwBool RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy, RpHAnimAnimation *anim);
+RwBool RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy, RwReal time);
+RwBool RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy, RwReal time);
+RwBool RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy, RwReal time);
+
+RwMatrix *RpHAnimHierarchyGetMatrixArray(RpHAnimHierarchy *hierarchy);
+RwBool RpHAnimHierarchyUpdateMatrices(RpHAnimHierarchy *hierarchy);
+
+#define rpHANIMHIERARCHYGETINTERPFRAME( hierarchy, nodeIndex ) \
+ ( (void *)( ( (RwUInt8 *)&(hierarchy->interpolator[1]) + \
+ ((nodeIndex) * \
+ hierarchy->interpolator->currentAnimKeyFrameSize) ) ) )
+
+
+RpHAnimAnimation *RpHAnimAnimationCreate(RwInt32 typeID, RwInt32 numFrames, RwInt32 flags, RwReal duration);
+RpHAnimAnimation *RpHAnimAnimationDestroy(RpHAnimAnimation *animation);
+RpHAnimAnimation *RpHAnimAnimationStreamRead(RwStream *stream);