Files
bigmak94andClaude Opus 5.5 4b395efe5c Add the Petari decompilation (SMGCommunity/Petari@0a5c660)
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>
2026-10-01 01:59:38 +02:00

53 lines
2.2 KiB
C++

#pragma once
#include <JSystem/JGeometry/TMatrix.hpp>
#include <revolution/gx.h>
class JUTTexture;
namespace TDDraw {
void setViewMtx(MtxPtr);
void loadViewMtx(MtxPtr);
void setModelMtx(MtxPtr);
void resetViewMtx();
void close();
void setup(u32, u32, u8);
void sendPoint(const TVec3f&, u32) NO_INLINE;
void sendPoint(const TVec3f&) NO_INLINE;
void drawLine(const TVec3f&, const TVec3f&, u32);
void drawCircle(const TVec3f&, const TVec3f&, f32, u32, u32);
void drawCircle(const TVec3f&, const TVec3f&, const TVec3f&, f32, u32, u32);
void drawFillCircle(const TVec3f&, f32, u32, u32, u32);
void drawFillCircle(const TVec3f&, const TVec3f&, f32, u32, u32);
void drawFillFan(const TVec3f&, const TVec3f&, const TVec3f&, u32, f32, f32, u32);
void drawCylinder(const TVec3f&, const TVec3f&, f32, u32, u32, u32);
void drawSpherePart(const TPos3f&, f32, f32, f32, f32, f32, u32, u32, u32);
void drawSphere(const TVec3f&, f32, u32, u32);
void drawSphere3D(TVec3f, f32, u32, u32);
void drawTexture(const TVec2f&, JUTTexture*, const TVec2f&);
void drawTexture3D(const TVec3f&, const TVec3f&, const TVec3f&, f32, f32, JUTTexture*, bool, bool);
void drawFillBox(const TVec3f&, const TVec3f&, u32);
void drawFillBox(const TVec2f&, const TVec2f&, u32);
void drawFillBox3D(const TVec3f&, const TVec3f&, const TVec3f&, const TVec3f&, u32);
void cameraInit3D();
void cameraInit2D();
void mixFogColor(TVec3f, f32, u32);
void tileConversion8(u8*, u32, u32);
void tileConversion16(u16*, u32, u32);
u32 getTexel32(const JUTTexture*, u32, u32);
u32 getTexel32(const u8*, u32, u32, u32);
void setTexel32(JUTTexture*, u32, u32, u32);
void setTexel32(u8*, u32, u32, u32, u32);
void invProject(TVec3f*, const TVec3f&, MtxPtr, const f32*, const f32*, bool);
void project2D(TVec3f*, const TVec3f&);
void project2D(TVec2f*, const TVec3f&);
void fix2Dpos(TVec3f*);
inline void setGXColor(u32 color, GXColor* pColor) NO_INLINE {
pColor->r = (color >> 24) & 0xFF;
pColor->g = (color >> 16) & 0xFF;
pColor->b = (color >> 8) & 0xFF;
pColor->a = color & 0xFF;
}
}; // namespace TDDraw