1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 07:10:01 +00:00

update librw

This commit is contained in:
aap 2020-04-25 15:56:20 +02:00
parent 8289b42c9e
commit ea79cc4469
4 changed files with 18 additions and 5 deletions

2
librw

@ -1 +1 @@
Subproject commit d8d13d44293a58b58d51c3a8e91e3ea76c6d6feb Subproject commit 43190a51f799a3ef315c0b6245b70ee3a09a64ac

View file

@ -787,8 +787,8 @@ RwImage *RtBMPImageRead(const RwChar * imageName) { return rw::readBMP(imageName
#include "rtquat.h" #include "rtquat.h"
RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return quat->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); } RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return (RtQuat*)((rw::Quat*)quat)->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); }
void RtQuatConvertToMatrix(const RtQuat * const qpQuat, RwMatrix * const mpMatrix) { mpMatrix->rotate(*qpQuat, COMBINEREPLACE); } void RtQuatConvertToMatrix(const RtQuat * const qpQuat, RwMatrix * const mpMatrix) { mpMatrix->rotate(*(rw::Quat*)qpQuat, COMBINEREPLACE); }
#include "rtcharse.h" #include "rtcharse.h"

View file

@ -9,7 +9,15 @@ typedef rw::Animation RpHAnimAnimation;
#define rpHANIMSTDKEYFRAMETYPEID 0x1 #define rpHANIMSTDKEYFRAMETYPEID 0x1
typedef rw::HAnimKeyFrame RpHAnimStdKeyFrame; // same as rw::HAnimKeyFrame, but we need RtQuat in this one
struct RpHAnimStdKeyFrame
{
RpHAnimStdKeyFrame *prevFrame;
RwReal time;
RtQuat q;
RwV3d t;
};
enum RpHAnimHierarchyFlag enum RpHAnimHierarchyFlag
{ {

View file

@ -1,6 +1,11 @@
#pragma once #pragma once
typedef rw::Quat RtQuat; // Same layout as rw::Quat but with ugly imag,real separation which i don't want in librw
struct RtQuat
{
rw::V3d imag;
rw::float32 real;
};
RwBool RtQuatConvertFromMatrix(RtQuat * const qpQuat, const RwMatrix * const mpMatrix); RwBool RtQuatConvertFromMatrix(RtQuat * const qpQuat, const RwMatrix * const mpMatrix);
RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp); RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp);