2018-08-19 09:46:58 +02:00
|
|
|
#pragma once
|
2020-05-30 15:55:23 +02:00
|
|
|
|
2020-05-28 15:17:34 +02:00
|
|
|
#include "collide.h"
|
2018-11-06 23:01:00 +01:00
|
|
|
|
2019-12-07 08:36:13 +01:00
|
|
|
struct ROPE_STRUCT
|
|
|
|
{
|
|
|
|
PHD_VECTOR segment[24]; // size=288, offset=0
|
|
|
|
PHD_VECTOR velocity[24]; // size=288, offset=288
|
|
|
|
PHD_VECTOR normalisedSegment[24]; // size=288, offset=576
|
|
|
|
PHD_VECTOR meshSegment[24]; // size=288, offset=864
|
|
|
|
PHD_VECTOR position; // size=12, offset=1152
|
|
|
|
PHD_VECTOR Unknown[24];
|
|
|
|
int segmentLength; // size=0, offset=1164
|
|
|
|
short active; // size=0, offset=1168
|
|
|
|
short coiled; // size=0, offset=1170
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PENDULUM
|
|
|
|
{
|
|
|
|
PHD_VECTOR Position; // size=12, offset=0
|
|
|
|
PHD_VECTOR Velocity; // size=12, offset=12
|
|
|
|
int node; // size=0, offset=24
|
|
|
|
ROPE_STRUCT* Rope; // size=1172, offset=28
|
|
|
|
};
|
|
|
|
|
2020-01-21 12:22:52 -03:00
|
|
|
extern PENDULUM CurrentPendulum;
|
2020-04-24 19:15:05 +02:00
|
|
|
extern ROPE_STRUCT Ropes[12];
|
|
|
|
extern int NumRopes;
|
2020-01-21 12:22:52 -03:00
|
|
|
|
2019-12-07 08:36:13 +01:00
|
|
|
void InitialiseRope(short itemNumber);
|
|
|
|
void PrepareRope(ROPE_STRUCT* rope, PHD_VECTOR* pos1, PHD_VECTOR* pos2, int length, ITEM_INFO* item);
|
2020-01-21 12:22:52 -03:00
|
|
|
PHD_VECTOR* NormaliseRopeVector(PHD_VECTOR* vec);
|
|
|
|
void _0x0046D130(ROPE_STRUCT* rope, int segmentFrame, int* x, int* y, int* z);
|
|
|
|
int DotProduct(PHD_VECTOR* u, PHD_VECTOR* v);
|
|
|
|
void ScaleVector(PHD_VECTOR* src, int c, PHD_VECTOR* dest);
|
|
|
|
void CrossProduct(PHD_VECTOR* u, PHD_VECTOR* v, PHD_VECTOR* dest);
|
|
|
|
void _0x0046D420(int* array, short* angle);
|
|
|
|
void RopeControl(short itemNumber);
|
|
|
|
void RopeCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll);
|
|
|
|
void RopeDynamics(ROPE_STRUCT* rope);
|
|
|
|
int _0x0046D200(ROPE_STRUCT* rope, int x, int y, int z, int value);
|
|
|
|
void ApplyVelocityToRope(int node, short angle, short n);
|
|
|
|
void SetPendulumVelocity(int x, int y, int z);
|
|
|
|
void _0x0046E1C0(ROPE_STRUCT* rope, int node);
|
|
|
|
void _0x0046E080(ROPE_STRUCT* rope, PENDULUM* pendulumPointer, PHD_VECTOR* ropeVelocity, PHD_VECTOR* pendulumVelocity, int value);
|
|
|
|
void _0x0046DF00(PHD_VECTOR* segment, PHD_VECTOR* nextSegment, PHD_VECTOR* velocity, PHD_VECTOR* nextVelocity, int length);
|
2020-08-08 15:30:31 -05:00
|
|
|
void UpdateRopeSwing(ITEM_INFO* item);
|
|
|
|
void JumpOffRope(ITEM_INFO* item);
|
|
|
|
void FallFromRope(ITEM_INFO* item);
|
|
|
|
void LaraClimbRope(ITEM_INFO* item, COLL_INFO* coll);
|