Get initial JParticle import to build, label symbols.txt

This commit is contained in:
robojumper
2025-04-27 07:49:37 +02:00
parent c1a0264e6a
commit 6468fc663c
60 changed files with 411 additions and 333 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JGEOMETRY_H
#define JGEOMETRY_H
#include "dolphin/mtx.h"
#include "common.h"
#include "math.h"
#include "JSystem/JMath/JMath.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JMATRIGONOMETRIC_H
#define JMATRIGONOMETRIC_H
#include "dolphin/types.h"
#include "common.h"
#include "utility.h"
template<typename T>
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef JMATH_H
#define JMATH_H
#include "dolphin/mtx.h"
#include "common.h"
#include "rvl/MTX.h"
#include "math.h"
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef RANDOM_H
#define RANDOM_H
#include "dolphin/types.h"
#include "common.h"
namespace JMath {
+4 -3
View File
@@ -1,11 +1,12 @@
#ifndef JPABASESHAPE_H
#define JPABASESHAPE_H
#include <dolphin/gx.h>
#include "common.h"
#include "egg/egg_types.h"
#include "rvl/GX.h"
class JPAEmitterWorkData;
class JPABaseParticle;
class JKRHeap;
/**
* @ingroup jsystem-jparticle
@@ -46,7 +47,7 @@ struct JPABaseShapeData {
*/
struct JPABaseShape {
public:
/* 8027A6DC */ JPABaseShape(u8 const*, JKRHeap*);
/* 8027A6DC */ JPABaseShape(u8 const*, EGG::Heap*);
/* 8027A7E8 */ void setGX(JPAEmitterWorkData*) const;
static GXBlendMode st_bm[3];
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef JPACHILDSHAPE_H
#define JPACHILDSHAPE_H
#include <dolphin/gx.h>
#include "common.h"
#include "rvl/GX.h"
class JPAEmitterWorkData;
class JPABaseParticle;
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef JPADRAWINFO_H
#define JPADRAWINFO_H
#include "dolphin/mtx.h"
#include "common.h"
#include "rvl/MTX.h"
/**
* @ingroup jsystem-jparticle
+2 -1
View File
@@ -1,9 +1,10 @@
#ifndef JPADYNAMICSBLOCK_H
#define JPADYNAMICSBLOCK_H
#include "common.h"
#include "JSystem/JGeometry.h"
#include "dolphin/types.h"
class JPAEmitterWorkData;
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef JPAEMITTER_H
#define JPAEMITTER_H
#include <dolphin/gx.h>
#include "common.h"
#include "rvl/GX.h"
#include "JSystem/JParticle/JPAResource.h"
#include "JSystem/JParticle/JPAList.h"
#include "JSystem/JParticle/JPARandom.h"
@@ -1,7 +1,8 @@
#ifndef JPAEMITTERMANAGER_H
#define JPAEMITTERMANAGER_H
#include "dolphin/types.h"
#include "common.h"
#include "egg/egg_types.h"
#include "JSystem/JParticle/JPAList.h"
#include "JSystem/JParticle/JPADrawInfo.h"
#include "JSystem/JSupport/JSUList.h"
@@ -12,7 +13,6 @@ class JPAParticleCallBack;
class JPABaseEmitter;
class JPAResourceManager;
class JPABaseParticle;
class JKRHeap;
struct JPAEmitterWorkData;
/**
@@ -21,7 +21,7 @@ struct JPAEmitterWorkData;
*/
class JPAEmitterManager {
public:
/* 8027DCA0 */ JPAEmitterManager(u32, u32, JKRHeap*, u8, u8);
/* 8027DCA0 */ JPAEmitterManager(u32, u32, EGG::Heap*, u8, u8);
/* 8027DEBC */ JPABaseEmitter* createSimpleEmitterID(JGeometry::TVec3<f32> const&, u16, u8, u8,
JPAEmitterCallBack*, JPAParticleCallBack*);
/* 8027DFA0 */ void calc(u8);
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPAEXTEXSHAPE_H
#define JPAEXTEXSHAPE_H
#include "dolphin/types.h"
#include "common.h"
class JPAEmitterWorkData;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPAEXTRASHAPE_H
#define JPAEXTRASHAPE_H
#include "dolphin/types.h"
#include "common.h"
class JPAEmitterWorkData;
class JPABaseParticle;
+4 -4
View File
@@ -1,10 +1,10 @@
#ifndef JPAFIELDBLOCK_H
#define JPAFIELDBLOCK_H
#include "common.h"
#include "egg/egg_types.h"
#include "JSystem/JGeometry.h"
#include "dolphin/types.h"
class JKRHeap;
class JPAEmitterWorkData;
class JPABaseParticle;
class JPAFieldBlock;
@@ -119,8 +119,8 @@ public:
class JPAFieldBlock {
public:
/* 8027D088 */ JPAFieldBlock(u8 const*, JKRHeap*);
/* 8027D0C0 */ void init(JKRHeap*);
/* 8027D088 */ JPAFieldBlock(u8 const*, EGG::Heap*);
/* 8027D0C0 */ void init(EGG::Heap*);
u32 getType() { return mpData->mFlags & 0xF; }
u32 getAddType() { return (mpData->mFlags >> 8) & 3; }
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPAKEYBLOCK_H
#define JPAKEYBLOCK_H
#include "dolphin/types.h"
#include "common.h"
/**
* @ingroup jsystem-jparticle
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPALIST_H
#define JPALIST_H
#include "dolphin/types.h"
#include "common.h"
/**
* @ingroup jsystem-jparticle
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPAMATH_H
#define JPAMATH_H
#include "dolphin/mtx.h"
#include "common.h"
#include "JSystem/JGeometry.h"
void JPAGetDirMtx(JGeometry::TVec3<f32> const& param_0, f32 (*param_1)[4]);
+2 -2
View File
@@ -1,10 +1,10 @@
#ifndef JPAPARTICLE_H
#define JPAPARTICLE_H
#include <dolphin/gx.h>
#include "common.h"
#include "rvl/GX.h"
#include "JSystem/JGeometry.h"
class JKRHeap;
class JPABaseEmitter;
class JPABaseParticle;
class JPAEmitterCallBack;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JPARANDOM_H
#define JPARANDOM_H
#include "dolphin/types.h"
#include "common.h"
/**
* @ingroup jsystem-jparticle
+3 -3
View File
@@ -1,9 +1,9 @@
#ifndef JPARESOURCE_H
#define JPARESOURCE_H
#include "dolphin/types.h"
#include "common.h"
#include "egg/egg_types.h"
class JKRHeap;
class JPAEmitterWorkData;
class JPABaseEmitter;
class JPABaseParticle;
@@ -23,7 +23,7 @@ class JPAKeyBlock;
class JPAResource {
public:
/* 80274010 */ JPAResource();
/* 80274080 */ void init(JKRHeap*);
/* 80274080 */ void init(EGG::Heap*);
/* 802755E8 */ bool calc(JPAEmitterWorkData*, JPABaseEmitter*);
/* 80275A94 */ void draw(JPAEmitterWorkData*, JPABaseEmitter*);
/* 80275B74 */ void drawP(JPAEmitterWorkData*);
@@ -1,7 +1,7 @@
#ifndef JPARESOURCELOADER_H
#define JPARESOURCELOADER_H
#include "dolphin/types.h"
#include "common.h"
class JPAResourceManager;
@@ -1,9 +1,11 @@
#ifndef JPARESOURCEMANAGER_H
#define JPARESOURCEMANAGER_H
#include "common.h"
#include "egg/egg_types.h"
#include "rvl/GX.h"
#include "JSystem/JParticle/JPATexture.h"
class JKRHeap;
class JPAResource;
struct ResTIMG;
@@ -13,7 +15,7 @@ struct ResTIMG;
*/
class JPAResourceManager {
public:
/* 80273E10 */ JPAResourceManager(void const*, JKRHeap*);
/* 80273E10 */ JPAResourceManager(void const*, EGG::Heap*);
/* 80273E68 */ JPAResource* getResource(u16) const;
/* 80273EA8 */ bool checkUserIndexDuplication(u16) const;
/* 80273EEC */ const ResTIMG* swapTexture(ResTIMG const*, char const*);
@@ -24,7 +26,7 @@ public:
void load(u16 idx, GXTexMapID texMapID) { mpTexArr[idx]->load(texMapID); }
public:
/* 0x00 */ JKRHeap* mpHeap;
/* 0x00 */ EGG::Heap* mpHeap;
/* 0x04 */ JPAResource** mpResArr;
/* 0x08 */ JPATexture** mpTexArr;
/* 0x0C */ u16 mResMax;
+2
View File
@@ -1,6 +1,8 @@
#ifndef JPATEXTURE_H
#define JPATEXTURE_H
#include "common.h"
#include "rvl/GX.h"
#include "JSystem/JUtility/JUTTexture.h"
/**
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JSULIST_H
#define JSULIST_H
#include "dolphin/types.h"
#include "common.h"
template <typename T>
class JSUList;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JSUPPORT_H
#define JSUPPORT_H
#include <dolphin.h>
#include "common.h"
/**
* @ingroup jsystem-jsupport
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JUTASSERT_H
#define JUTASSERT_H
#include "dolphin/os.h"
#include "rvl/OS.h"
#ifdef DEBUG
#define JUT_ASSERT(LINE, COND) \
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JUTTEXTURE_H
#define JUTTEXTURE_H
#include <dolphin/gx.h>
#include "rvl/GX.h"
class JUTPalette;
+1 -1
View File
@@ -135,7 +135,7 @@ struct TexCoordGen {
// __ct__Q34nw4r3lyt11TexCoordGenFv
TexCoordGen() {
reserve = 0;
Set(GX_TG_MTX2x4, GX_TG_TEX0, GX_TEXMTX_IDENT);
Set(GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
}
// Set__Q34nw4r3lyt11TexCoordGenF13_GXTexGenType12_GXTexGenSrcUl
+3
View File
@@ -8,8 +8,11 @@ extern "C" {
#endif
void GXBegin(GXPrimitive prim, GXVtxFmt fmt, u16 verts);
static void GXEnd(void);
#define GXEnd()
void GXSetLineWidth(u8 width, u32 offset);
void GXSetPointSize(u8 size, u32 offset);
void GXEnableTexOffsets(GXTexCoordID coordId, GXBool lineOfs, GXBool pointOfs);
+1 -1
View File
@@ -26,7 +26,7 @@ void GXLoadPosMtxIndx(u16 index, u32 id);
void GXLoadNrmMtxImm(const Mtx mtx, u32 id);
void GXLoadNrmMtxIndx3x3(u16 index, u32 id);
void GXSetCurrentMtx(u32 id);
void GXLoadTexMtxImm(const f32 mtx[][4], u32 id, GXMtxType type);
void GXLoadTexMtxImm(const f32 mtx[][4], u32 id, GXTexMtxType type);
void GXSetViewportJitter(f32 ox, f32 oy, f32 sx, f32 sy, f32 near, f32 far, u32 nextField);
void GXSetViewport(f32 ox, f32 oy, f32 sx, f32 sy, f32 near, f32 far);
void GXGetViewportv(f32 view[6]);
+53 -1
View File
@@ -44,6 +44,12 @@ extern "C" {
// Real name! (from patent)
typedef unsigned char GXBool;
#define GX_FALSE ((GXBool)0)
#define GX_TRUE ((GXBool)1)
#define GX_ENABLE ((GXBool)1)
#define GX_DISABLE ((GXBool)0)
/**
* Common structs
*/
@@ -549,6 +555,30 @@ typedef enum _GXTevOp {
GX_TEV_COMP_A8_EQ = GX_TEV_COMP_RGB8_EQ
} GXTevOp;
typedef enum _GXPTTexMtx {
GX_PTTEXMTX0 = 64,
GX_PTTEXMTX1 = 67,
GX_PTTEXMTX2 = 70,
GX_PTTEXMTX3 = 73,
GX_PTTEXMTX4 = 76,
GX_PTTEXMTX5 = 79,
GX_PTTEXMTX6 = 82,
GX_PTTEXMTX7 = 85,
GX_PTTEXMTX8 = 88,
GX_PTTEXMTX9 = 91,
GX_PTTEXMTX10 = 94,
GX_PTTEXMTX11 = 97,
GX_PTTEXMTX12 = 100,
GX_PTTEXMTX13 = 103,
GX_PTTEXMTX14 = 106,
GX_PTTEXMTX15 = 109,
GX_PTTEXMTX16 = 112,
GX_PTTEXMTX17 = 115,
GX_PTTEXMTX18 = 118,
GX_PTTEXMTX19 = 121,
GX_PTIDENTITY = 125,
} GXPTTexMtx;
typedef enum _GXTevRegID {
GX_TEVPREV,
GX_TEVREG0,
@@ -684,6 +714,11 @@ typedef enum _GXTevMode {
GX_BLEND
} GXTevMode;
typedef enum _GXTexMtxType {
GX_MTX3x4,
GX_MTX2x4,
} GXTexMtxType;
typedef enum _GXTexCoordID {
GX_TEXCOORD0,
GX_TEXCOORD1,
@@ -806,7 +841,7 @@ typedef enum _GXTexMtx {
GX_TEXMTX7 = 51,
GX_TEXMTX8 = 54,
GX_TEXMTX9 = 57,
GX_TEXMTX_IDENT = 60,
GX_IDENTITY = 60,
// 3x4 matrices (in dual-tex XF matrix memory)
// Enum represents base row of matrix
@@ -901,6 +936,23 @@ typedef enum _GXZTexOp {
GX_MAX_ZTEXOP
} GXZTexOp;
typedef enum _GXMiscToken {
GX_MT_XF_FLUSH = 1,
GX_MT_DL_SAVE_CONTEXT = 2,
GX_MT_ABORT_WAIT_COPYOUT = 3,
GX_MT_NULL = 0,
} GXMiscToken;
typedef enum _GXTexOffset {
GX_TO_ZERO,
GX_TO_SIXTEENTH,
GX_TO_EIGHTH,
GX_TO_FOURTH,
GX_TO_HALF,
GX_TO_ONE,
GX_MAX_TEXOFFSET,
} GXTexOffset;
#ifdef __cplusplus
}
#endif
+25
View File
@@ -8,6 +8,14 @@ extern "C" {
typedef f32 Mtx[3][4];
typedef f32 Mtx44[4][4];
// do these belong in the sdk?
typedef f32 Mtx33[3][3];
typedef f32 Mtx23[2][3];
typedef f32 (*Mtx3P)[3];
typedef f32 (*MtxP)[4];
typedef const f32 (*CMtxP)[4];
typedef f32 QuaternionP[4];
typedef struct Vec {
f32 x, y, z;
} Vec;
@@ -16,6 +24,23 @@ typedef struct Quaternion {
f32 x, y, z, w;
} Quaternion;
#define MTXIdentity PSMTXIdentity
#define MTXCopy PSMTXCopy
#define MTXConcat PSMTXConcat
#define MTXInverse PSMTXInverse
#define MTXTranspose PSMTXTranspose
#define MTXInverse PSMTXInverse
#define MTXInvXpose PSMTXInvXpose
#define MTXRotRad PSMTXRotRad
#define MTXRotTrig PSMTXRotTrig
#define MTXRotAxisRad PSMTXRotAxisRad
#define MTXTrans PSMTXTrans
#define MTXTransApply PSMTXTransApply
#define MTXScale PSMTXScale
#define MTXScaleApply PSMTXScaleApply
#define MTXQuat PSMTXQuat
#define MTXReflect PSMTXReflect
void PSMTXIdentity(Mtx);
void PSMTXCopy(const Mtx, Mtx);
void PSMTXConcat(const Mtx, const Mtx, Mtx);
+9 -2
View File
@@ -7,8 +7,15 @@
extern "C" {
#endif
void PSMTXMultVec(const Mtx, const Vec *, Vec *);
void PSMTXMultVecSR(const Mtx, const Vec *, Vec *);
#define MTXMultVec PSMTXMultVec
#define MTXMultVecArray PSMTXMultVecArray
#define MTXMultVecSR PSMTXMultVecSR
#define MTXMultVecArraySR PSMTXMultVecArraySR
void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dst);
void PSMTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
void PSMTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
#ifdef __cplusplus
}
+11
View File
@@ -16,6 +16,17 @@ f32 PSVECDotProduct(const Vec *, const Vec *);
void PSVECCrossProduct(const Vec *, const Vec *, Vec *);
f32 PSVECSquareDistance(const Vec *, const Vec *);
#define VECAdd PSVECAdd
#define VECSubtract PSVECSubtract
#define VECScale PSVECScale
#define VECNormalize PSVECNormalize
#define VECSquareMag PSVECSquareMag
#define VECMag PSVECMag
#define VECDotProduct PSVECDotProduct
#define VECCrossProduct PSVECCrossProduct
#define VECSquareDistance PSVECSquareDistance
#define VECDistance PSVECDistance
void C_VECHalfAngle(const Vec *, const Vec *, Vec *);
#ifdef __cplusplus