mirror of
https://github.com/PodeCaradox/GalaxyQuest-SteamFrame.git
synced 2026-10-22 13:01:33 +02:00
The sources of Petari (https://github.com/SMGCommunity/Petari), the Super Mario Galaxy decompilation by the SMGCommunity, at commit 0a5c6608dc3b4c44a9aa68c2535d1793dc565f02, unchanged but for LF line endings: LICENSE (as LICENSE-Petari.txt; CC0 1.0), include/, libs/ and src/. Left out: the game data Petari keeps from the original executable, the error message archive (include/Game/System/ ErrorArchive.hpp) and two tables (src/Game/System/GalaxyID.bcsv and StoryEvent.bcsv); GalaxyQuest's converter takes them from the player's own disc. The port's changes follow in the next commit, so `git diff petari-base -- decomp` shows them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
101 lines
4.4 KiB
C++
101 lines
4.4 KiB
C++
#pragma once
|
|
|
|
#include <JSystem/JGeometry.hpp>
|
|
#include <revolution/mtx.h>
|
|
#include <revolution.h>
|
|
|
|
class LiveActor;
|
|
|
|
namespace MR {
|
|
void makeMtxRotate(MtxPtr, s16, s16, s16);
|
|
void makeMtxRotate(MtxPtr, f32, f32, f32);
|
|
void makeMtxRotate(MtxPtr, const TVec3f&);
|
|
void makeMtxRotateY(MtxPtr, f32);
|
|
void makeMtxTR(MtxPtr, f32, f32, f32, f32, f32, f32);
|
|
void makeMtxTR(MtxPtr, const TVec3f&, const TVec3f&);
|
|
void makeMtxTransRotateY(MtxPtr, f32, f32, f32, f32);
|
|
void rotateMtxLocalX(MtxPtr, f32);
|
|
void rotateMtxLocalY(MtxPtr, f32);
|
|
void rotateMtxLocalZ(MtxPtr, f32);
|
|
void rotateMtxLocalXDegree(MtxPtr, f32);
|
|
void rotateMtxLocalYDegree(MtxPtr, f32);
|
|
void rotateMtxLocalZDegree(MtxPtr, f32);
|
|
void preScaleMtx(MtxPtr, f32);
|
|
void preScaleMtx(MtxPtr, const TVec3f&);
|
|
|
|
void preScaleMtx(MtxPtr, f32, f32, f32);
|
|
|
|
void scaleMtxToLocalMtx(MtxPtr, MtxPtr, MtxPtr, const TVec3f&);
|
|
void scaleMtxToLocalMtx(MtxPtr, MtxPtr, const TVec3f&);
|
|
void scaleMtxToDir(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxTRS(MtxPtr, f32, f32, f32, f32, f32, f32, f32, f32, f32);
|
|
void makeMtxTRS(MtxPtr, const TVec3f&, const TVec3f&, const TVec3f&);
|
|
void setMtxAxisXYZ(MtxPtr, const TVec3f&, const TVec3f&, const TVec3f&);
|
|
void flattenMtx(MtxPtr, MtxPtr, const TVec3f&);
|
|
void flattenMtx(MtxPtr, const TVec3f&);
|
|
void blendMtxRotate(MtxPtr, MtxPtr, f32, MtxPtr);
|
|
void blendMtxRotateSlerp(MtxPtr, MtxPtr, f32, MtxPtr);
|
|
void blendMtx(MtxPtr, MtxPtr, f32, MtxPtr);
|
|
void makeMtxWithoutScale(TPos3f*, const TPos3f&);
|
|
void makeRTFromMtxPtr(TVec3f*, TVec3f*, MtxPtr, bool);
|
|
void makeMtxSideUp(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxSideUpPos(TPos3f*, const TVec3f&, const TVec3f&, const TVec3f&);
|
|
void makeMtxSideFront(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxUpSide(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxUpSidePos(TPos3f*, const TVec3f&, const TVec3f&, const TVec3f&);
|
|
void makeMtxUpFront(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxUpFrontPos(TPos3f*, const TVec3f&, const TVec3f&, const TVec3f&) NO_INLINE;
|
|
void makeMtxFrontSidePos(TPos3f*, const TVec3f&, const TVec3f&, const TVec3f&);
|
|
void makeMtxFrontUp(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxFrontUpPos(TPos3f*, const TVec3f&, const TVec3f&, const TVec3f&) NO_INLINE;
|
|
void makeMtxUpNoSupport(TPos3f*, const TVec3f&);
|
|
void makeMtxUpNoSupportPos(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void makeMtxFrontNoSupport(TPos3f*, const TVec3f&);
|
|
void makeMtxFrontNoSupportPos(TPos3f*, const TVec3f&, const TVec3f&);
|
|
void orthogonalize(TPos3f*);
|
|
void turnMtxToXDirRate(TPos3f*, const TVec3f&, f32);
|
|
void turnMtxToXDirDegree(TPos3f*, const TVec3f&, f32);
|
|
void turnMtxToYDirRate(TPos3f*, const TVec3f&, f32);
|
|
void turnMtxToYDirDegree(TPos3f*, const TVec3f&, f32);
|
|
void turnMtxToLocalDirDegree(TPos3f*, const TVec3f&, const TVec3f&, f32);
|
|
void makeMtxMoment(TPos3f*, const TVec3f&);
|
|
void rotateMtxMoment(TPos3f*, const TPos3f&, const TVec3f&);
|
|
void rotateMtxMoment(TPos3f*, const TVec3f&);
|
|
void setMtxTrans(MtxPtr, f32, f32, f32);
|
|
void addTransMtx(MtxPtr, const TVec3f&);
|
|
void addTransMtxLocal(MtxPtr, const TVec3f&);
|
|
void addTransMtxLocalX(MtxPtr, f32);
|
|
void addTransMtxLocalY(MtxPtr, f32);
|
|
void addTransMtxLocalZ(MtxPtr, f32);
|
|
void extractMtxXDir(MtxPtr, TVec3f*);
|
|
void extractMtxYDir(MtxPtr, TVec3f*);
|
|
void extractMtxZDir(MtxPtr, TVec3f*);
|
|
void extractMtxXYZDir(MtxPtr, TVec3f*, TVec3f*, TVec3f*);
|
|
void extractMtxTrans(MtxPtr, TVec3f*);
|
|
bool isSameMtx(MtxPtr, MtxPtr);
|
|
bool isSameMtxRot(MtxPtr, MtxPtr);
|
|
bool isRotAxisY(MtxPtr, MtxPtr);
|
|
void calcMtxRotAxis(TVec3f*, MtxPtr, MtxPtr);
|
|
MtxPtr tmpMtxTrans(const TVec3f&);
|
|
MtxPtr tmpMtxScale(f32, f32, f32);
|
|
MtxPtr tmpMtxRotXRad(f32);
|
|
MtxPtr tmpMtxRotYRad(f32);
|
|
MtxPtr tmpMtxRotZRad(f32);
|
|
MtxPtr tmpMtxRotXDeg(f32);
|
|
MtxPtr tmpMtxRotYDeg(f32);
|
|
MtxPtr tmpMtxRotZDeg(f32);
|
|
void orderRotateMtx(s16, const TVec3f&, MtxPtr);
|
|
void rotAxisVecRad(const TVec3f&, const TVec3f&, TVec3f*, f32);
|
|
|
|
void makeMtxTR(MtxPtr, const LiveActor*);
|
|
|
|
void setMtxTrans(MtxPtr pMtx, const TVec3f& rVec); /*{
|
|
MR::setMtxTrans(pMtx, rVec.x, rVec.y, rVec.z);
|
|
}*/
|
|
|
|
// Non-official symbol.
|
|
inline void multMtx(Mtx pOut, const Mtx pA, const Mtx pB) {
|
|
PSMTXConcat(pB, pA, pOut);
|
|
}
|
|
}; // namespace MR
|