summaryrefslogtreecommitdiff
path: root/src/port/interpolation/FrameInterpolation.h
blob: c59743681e8a61233c80fb3523445eb6f5e395a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef __FRAME_INTERPOLATION_H
#define __FRAME_INTERPOLATION_H

// #include "sf64math.h"
#include <libultraship.h>
#include <common_structs.h>

#ifdef __cplusplus

#include <unordered_map>



std::unordered_map<Mtx*, MtxF> FrameInterpolation_Interpolate(float step);

extern "C" {
#endif

#define TAG_ITEM_ADDR(x) ((u32) 0x10000000 | (u32)x)
#define TAG_SMOKE_DUST(x) ((u32) 0x20000000 | (u32) (x))
#define TAG_LETTER(x) ((u32)0x30000000 | (u32) (x))
#define TAG_OBJECT(x) ((u32)0x40000000 | (u32) (uintptr_t) (x))

void FrameInterpolation_ShouldInterpolateFrame(bool shouldInterpolate);

void FrameInterpolation_StartRecord(void);

void FrameInterpolation_StopRecord(void);

void FrameInterpolation_RecordMarker(const char* file, int line);

void FrameInterpolation_RecordOpenChild(const void* a, uintptr_t b);

void FrameInterpolation_RecordCloseChild(void);

void FrameInterpolation_DontInterpolateCamera(void);

int FrameInterpolation_GetCameraEpoch(void);

void FrameInterpolation_RecordActorPosRotMatrix(void);

void FrameInterpolation_RecordMatrixPosRotXYZ(Mat4 out, Vec3f pos, Vec3s orientation);

void FrameInterpolation_RecordMatrixPush(Mat4* matrix);

void FrameInterpolation_RecordMatrixPop(Mat4* matrix);

void FrameInterpolation_RecordMatrixMult(Mat4* matrix, MtxF* mf, u8 mode);

void FrameInterpolation_RecordMatrixTranslate(Mat4* matrix, Vec3f b);

void FrameInterpolation_RecordMatrixScale(Mat4* matrix, f32 scale);

void FrameInterpolation_RecordMatrixRotate1Coord(Mat4* matrix, u32 coord, s16 value);

void FrameInterpolation_RecordMatrixMtxFToMtx(MtxF* src, Mtx* dest);

void FrameInterpolation_RecordMatrixToMtx(Mtx* dest, char* file, s32 line);

void FrameInterpolation_RecordMatrixReplaceRotation(MtxF* mf);

//void FrameInterpolation_RecordMatrixRotateAxis(f32 angle, Vec3f* axis, u8 mode);

void FrameInterpolation_RecordSkinMatrixMtxFToMtx(MtxF* src, Mtx* dest);

//void FrameInterpolation_RecordMatrixMultVec3f(Matrix* matrix, Vec3f src, Vec3f dest);

//void FrameInterpolation_RecordMatrixMultVec3fNoTranslate(Matrix* matrix, Vec3f src, Vec3f dest);

void FrameInterpolation_RecordSetTransformMatrix(Mat4* dest, Vec3f orientationVector, Vec3f positionVector, u16 rotationAngle,
                          f32 scaleFactor);

void FrameInterpolation_RecordSetMatrixTransformation(Mat4* dest, Vec3f location, Vec3su rotation, f32 scale);

void FrameInterpolation_RecordCalculateOrientationMatrix(Mat3*, f32, f32, f32, s16);

void FrameInterpolation_RecordTranslateRotate(Mat4* dest, Vec3f pos, Vec3s rotation);

//void FrameInterpolation_func_80062B18(f32* arg0, f32* arg1, f32* arg2, arg3, arg4, arg5, arg6, arg7);

#ifdef __cplusplus
}
#endif

#endif // __FRAME_INTERPOLATION_H