SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
ActorMovementUtil.hpp
1#pragma once
2
3#include <revolution.h>
4#include "JSystem/JGeometry/TVec.hpp"
5#include "JSystem/JGeometry/TMatrix.hpp"
6
7class LiveActor;
8class HitSensor;
9
10namespace MR {
11 f32 calcDistance(const HitSensor *, const HitSensor *, TVec3f *);
12 f32 calcDistance(const LiveActor *, const TVec3f &);
13 f32 calcDistanceHorizontal(const LiveActor *, const TVec3f &, const TVec3f &);
14 f32 calcDistanceVertical(const LiveActor *, const TVec3f &, const TVec3f &);
15 f32 calcDistanceVertical(const LiveActor *, const TVec3f &);
16 f32 calcDistanceToPlayer(const LiveActor *);
17 f32 calcDistanceToPlayerH(const LiveActor *);
18 bool isNear(const HitSensor *, const HitSensor *, f32);
19 bool isNear(const LiveActor *, const LiveActor *, f32);
20 bool isNear(const LiveActor *, const TVec3f &, f32);
21 bool isNearPlayer(const LiveActor *, f32);
22 bool isNearPlayerAnyTime(const LiveActor *, f32);
23 bool isNearPlayer(const TVec3f &, f32);
24 bool isNearPlayerPose(const LiveActor *, f32, f32);
25 bool isNearPlayerHorizontal(const LiveActor *, f32);
26 void calcFrontVec(TVec3f *, const LiveActor *);
27 void calcUpVec(TVec3f *, const LiveActor *);
28 void calcSideVec(TVec3f *, const LiveActor *);
29 void calcPositionUpOffset(TVec3f *, const LiveActor *, f32);
30 void calcVecToPlayerH(TVec3f *, const LiveActor *, const TVec3f *);
31 void calcVecFromPlayerH(TVec3f *, const LiveActor *);
32 void calcVecToTargetPosH(TVec3f *, const LiveActor *, const TVec3f &, const TVec3f *);
33 void calcVecFromTargetPosH(TVec3f *, const LiveActor *, const TVec3f &, const TVec3f *);
34 bool isFaceToTargetDegree(const LiveActor *, const TVec3f &, const TVec3f &, float);
35 bool isFaceToPlayerDegree(const LiveActor *, const TVec3f &, float);
36 bool isFaceToTargetDegree(const LiveActor *, const TVec3f &, float);
37 bool isFaceToPlayerDegree(const LiveActor *, float);
38 bool isFaceToPlayerDegreeHV(const LiveActor *, const TVec3f&, float, float);
39 bool isFaceToTargetHorizontalDegree(const LiveActor *, const TVec3f &, const TVec3f &, float);
40 bool isFaceToPlayerHorizontalDegree(const LiveActor *, const TVec3f &, float);
41 bool isClockwiseToDir(const LiveActor *, const TVec3f &, const TVec3f &);
42 bool isClockwiseToPlayer(const LiveActor *, const TVec3f &);
43 bool isPlayerLeftSide(const LiveActor *);
44 bool isLeftSideFromPlayer(const LiveActor *);
45 bool isInSightConePlayer(const LiveActor *, const TVec3f &, float, float);
46 bool isInSightFanPlayer(const LiveActor *, const TVec3f &, float, float, float);
47 bool isBindedWallFront(const LiveActor *, const TVec3f &, float);
48 bool isPlayerExistSide(const LiveActor *, float, float);
49 bool isPlayerExistUp(const LiveActor *, float, float);
50 bool isPlayerExistDown(const LiveActor *, float, float);
51 bool isInWater(const LiveActor *, const TVec3f &);
52 bool isInDeath(const LiveActor *, const TVec3f &);
53
54 void makeMtxTR(MtxPtr, const LiveActor *);
55 void makeMtxTRS(MtxPtr, const LiveActor *);
56 void makeMtxTransRotateY(MtxPtr, const LiveActor *);
57
58 void blendQuatFromGroundAndFront(TQuat4f *, const LiveActor *, const TVec3f &, float, float);
59
60 void resetPosition(LiveActor *);
61 void resetPosition(LiveActor *, const TVec3f &);
62 void resetPosition(LiveActor *, const char *);
63
64 void calcActorAxis(TVec3f *, TVec3f *, TVec3f *, const LiveActor *);
65
66 void calcActorAxisY(TVec3f *, const LiveActor *);
67
68 void attenuateVelocity(LiveActor *, f32);
69
70 void killVelocityToTarget(LiveActor *, const TVec3f &);
71
72 void restrictVelocity(LiveActor *, f32);
73
74 bool calcVelocityAreaMoveOnGround(TVec3f *, const LiveActor *);
75
76 void turnDirectionToGround(const LiveActor *, TVec3f *);
77
78 void calcMtxFromGravityAndZAxis(TPos3f *, const LiveActor *, const TVec3f &, const TVec3f &);
79
80 void addVelocityToGravity(LiveActor *, f32);
81
82 void addVelocityKeepHeight(LiveActor *, const TVec3f &, f32, f32, f32);
83
84 void reboundVelocityFromCollision(LiveActor *, f32, f32, f32);
85
86 void addVelocity(LiveActor *, const TVec3f &);
87
88 f32 calcVelocityLength(const LiveActor *);
89
90 void turnDirectionAndGravityH(LiveActor *, const TVec3f &, f32, f32);
91
92 void turnDirectionToTargetUseGroundNormalDegree(const LiveActor *, TVec3f *, const TVec3f &, f32);
93
94 void turnDirectionToTargetDegree(const LiveActor *, TVec3f *, const TVec3f &, f32);
95};
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24