24 register void* s1
asm(
"$s1");
25 register void* s3
asm(
"$s3");
27 Vec3 gemToSpyroDistanceVec = {0};
28 unsigned int gemOriginToSpyroLength = 0;
31 if (*((
char*)s1 + 0xf) < 0x20)
35 const int FLAG_3D = 1;
38 const int MINIMUM_DISTANCE_FROM_GEM = 0x1e1;
40 if (gemOriginToSpyroLength < MINIMUM_DISTANCE_FROM_GEM)
42 Vec3Scale(&gemToSpyroDistanceVec,&gemToSpyroDistanceVec, *((
char*)s1 + 0xf));
43 Vec3Add(&((
Moby*)s3)->position, s1, &gemToSpyroDistanceVec);
44 const int SINE_WAVE_SPEED = 4 ;
45 ((
Moby*)s3)->position.z = ((
Moby*)s3)->position.z + (
_sinArray[*((
char*)s1 + 0xf) * SINE_WAVE_SPEED] / 12);
51 *((
char*)s1 + 0xf) = 0x20;
short _sinArray[256]
A scaled up sin lookup table Address: 0x8006cbf8.
Spyro _spyro
This is where the 1 instance of the spyro struct is. Address: 0x80078A58.
void Vec3Add(int *result, int *a, int *b)
Adds vector 'a' and vector 'b' together, and stores the resulting vector in 'result'.
void Vec3Copy(int *dst, int *src)
Copies the 'src' Vector to the 'dst' Vector.
This is the main moby/object struct.
void Vec3ScaleDownByPowerOfTwo(Vec3 *vector, unsigned int pot)
void Vec3Subtract(Vec3 *destVector, Vec3 *a, Vec3 *b)
void Vec3Scale(Vec3 *result, Vec3 *vector, int multiplier)
unsigned int Vec3CalculateLengthE(Vec3 *vector, bool flag3D)