SCAFFOLD ENTIRE GAME

With this commit, all functions in the entire game have been reasonably attempted or matched. There are just under 1000 functions left to fix up, out of approximately 25,000.

(this also links JPAParticle - ty roeming you're a life saver as always)
This commit is contained in:
HeartPiece 2024-05-30 01:01:07 +10:00
parent 3e9d8899f3
commit 823e6beedb
11 changed files with 304 additions and 2637 deletions

File diff suppressed because it is too large Load Diff

View File

@ -279,7 +279,7 @@ LIBS = [
["JSystem/JParticle/JPAFieldBlock", True],
["JSystem/JParticle/JPAKeyBlock", True],
["JSystem/JParticle/JPAMath", False],
["JSystem/JParticle/JPAParticle", False],
["JSystem/JParticle/JPAParticle", True],
["JSystem/JParticle/JPAResource", False],
["JSystem/JParticle/JPAResourceLoader", False],
["JSystem/JParticle/JPAResourceManager", True],

View File

@ -45,16 +45,15 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DModel.cpp">J3D/J3DModel.cpp</a> | 28590 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIBasic.cpp">JAudio//JAI/JAIBasic.cpp</a> | 29235 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMaterialAttach.cpp">J3D/J3DMaterialAttach.cpp</a> | 29965 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DScreen.cpp">J2D/J2DScreen.cpp</a> | 30776 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMaterialFactory_v21.cpp">J3D/J3DMaterialFactory_v21.cpp</a> | 35247 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JMessage/processor.cpp">JMessage/processor.cpp</a> | 35637 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAParticle.cpp">JParticle/JPAParticle.cpp</a> | 36971 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMaterialFactory.cpp">J2D/J2DMaterialFactory.cpp</a> | 39462 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DPicture.cpp">J2D/J2DPicture.cpp</a> | 46511 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASAramStream.cpp">JAudio//JAS/JASAramStream.cpp</a> | 47117 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DWindowEx.cpp">J2D/J2DWindowEx.cpp</a> | 47225 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASSeqParser.cpp">JAudio//JAS/JASSeqParser.cpp</a> | 47291 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/functionvalue.cpp">JStudio/functionvalue.cpp</a> | 50054 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISound.cpp">JAudio//JAI/JAISound.cpp</a> | 51800 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIStreamMgr.cpp">JAudio//JAI/JAIStreamMgr.cpp</a> | 53010 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISeMgr.cpp">JAudio//JAI/JAISeMgr.cpp</a> | 64949 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISequenceMgr.cpp">JAudio//JAI/JAISequenceMgr.cpp</a> | 68811 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASTrack.cpp">JAudio//JAS/JASTrack.cpp</a> | 72438 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMaterialFactory.cpp">J3D/J3DMaterialFactory.cpp</a> | 75581 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DPictureEx.cpp">J2D/J2DPictureEx.cpp</a> | 90416 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAResource.cpp">JParticle/JPAResource.cpp</a> | 95965 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPABaseShape.cpp">JParticle/JPABaseShape.cpp</a> | 96579 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/jstudio-object.cpp">JStudio/jstudio-object.cpp</a> | 104283 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMatBlock.cpp">J2D/J2DMatBlock.cpp</a> | 127830 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMatBlock.cpp">J3D/J3DMatBlock.cpp</a> | 165948 | | |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMaterialFactory.cpp">J2D/J2DMaterialFactory.cpp</a> | 39462 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DPicture.cpp">J2D/J2DPicture.cpp</a> | 46511 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASAramStream.cpp">JAudio//JAS/JASAramStream.cpp</a> | 47117 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DWindowEx.cpp">J2D/J2DWindowEx.cpp</a> | 47225 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASSeqParser.cpp">JAudio//JAS/JASSeqParser.cpp</a> | 47291 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/functionvalue.cpp">JStudio/functionvalue.cpp</a> | 50054 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISound.cpp">JAudio//JAI/JAISound.cpp</a> | 51800 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIStreamMgr.cpp">JAudio//JAI/JAIStreamMgr.cpp</a> | 53010 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISeMgr.cpp">JAudio//JAI/JAISeMgr.cpp</a> | 64949 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISequenceMgr.cpp">JAudio//JAI/JAISequenceMgr.cpp</a> | 68811 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASTrack.cpp">JAudio//JAS/JASTrack.cpp</a> | 72438 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMaterialFactory.cpp">J3D/J3DMaterialFactory.cpp</a> | 75581 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DPictureEx.cpp">J2D/J2DPictureEx.cpp</a> | 90416 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAResource.cpp">JParticle/JPAResource.cpp</a> | 95965 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPABaseShape.cpp">JParticle/JPABaseShape.cpp</a> | 96437 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/jstudio-object.cpp">JStudio/jstudio-object.cpp</a> | 104283 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMatBlock.cpp">J2D/J2DMatBlock.cpp</a> | 127830 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DMatBlock.cpp">J3D/J3DMatBlock.cpp</a> | 165948 |
### <section id="plugProjectEbisawaU">plugProjectEbisawaU</section>
| File | Size (bytes) | File | Size (bytes) |

View File

@ -319,6 +319,13 @@ struct TVec3 {
z = a.z * scale;
}
void scaleAdd(f32 scale, const TVec3<f32>& a, const TVec3<f32>& b)
{
x = a.x * scale + b.x;
y = a.y * scale + b.y;
z = a.z * scale + b.z;
}
void zero() { x = y = z = 0.0f; }
f32 squared() const { return x * x + y * y + z * z; }
@ -391,6 +398,13 @@ struct TVec3 {
z = a.z * b.z;
}
void mul(const TVec3<f32>& a)
{
x *= a.x;
y *= a.y;
z *= a.z;
}
bool isAbove(const TVec3<T>& other) const { return (x >= other.x) && (y >= other.y) && (z >= other.z); }
bool isZero() const { return squared() <= 32.0f * FLT_EPSILON; }

View File

@ -111,7 +111,9 @@ struct JPADynamicsBlock {
f32 getInitVelDir() { return mData->mInitialVelDir; }
f32 getInitVelDirSp() { return mData->mSpread; }
f32 getInitVelRndm() { return mData->mInitialVelRndm; }
f32 getInitVelRatio() { return mData->mInitialVelRatio; }
f32 getAirRes() { return mData->mAirResist; }
f32 getMomentRndm() const { return mData->mMoment; }
// unused/inlined:
void init_jpa(const u8*, JKRHeap*);

View File

@ -62,6 +62,7 @@ struct JPABaseParticle {
void getGlobalPosition(JGeometry::TVec3<f32>& pos) const { pos.set(mPosition); }
f32 getParticleScaleX() const { return mParticleScaleX; }
f32 getParticleScaleY() const { return mParticleScaleY; }
void initStatus(u32 val) { mFlags = val; }
void setStatus(u32 flag) { mFlags |= flag; }
u32 checkStatus(u32 flag) { return mFlags & flag; }
void setInvisibleParticleFlag() { setStatus(8); }
@ -98,9 +99,9 @@ struct JPABaseParticle {
};
struct JPAParticleCallBack {
virtual ~JPAParticleCallBack() = 0; // _08
virtual void execute(JPABaseEmitter*, JPABaseParticle*); // _0C (weak)
virtual void draw(JPABaseEmitter*, JPABaseParticle*); // _10 (weak)
virtual ~JPAParticleCallBack() = 0; // _08
virtual void execute(JPABaseEmitter*, JPABaseParticle*) { } // _0C (weak)
virtual void draw(JPABaseEmitter*, JPABaseParticle*) { } // _10 (weak)
};
struct JPABaseEmitter {
@ -340,7 +341,6 @@ struct JPABaseEmitter {
JGeometry::TVec2f mGlobalPScl; // _B0
GXColor mGlobalPrmClr; // _B8, NEEDS TO BE GXCOLOR
GXColor mGlobalEnvClr; // _BC, NEEDS TO BE GXCOLOR
s32 : 0; // reset alignment to _C0
s32 mpUserWork; // _C0
JPARandom mRandom; // _C4
JPAList<JPABaseParticle> mAlivePtclBase; // _C8

View File

@ -111,6 +111,7 @@ struct JPABaseShape {
u32 getClrLoopOfst(u32 param_1) const { return getClrLoopOfstMask() & param_1; }
u8 getTexLoopOfstMask() const { return mData->mTexAnmRndmMask; }
u32 getTexLoopOfst(u8 param_1) const { return getTexLoopOfstMask() & param_1; }
u8 getLoopOfstValue() const { return mData->mAnmRndm; }
f32 getIncTransX() const { return ((f32*)mTexCrdMtxAnmTbl)[5]; }
f32 getInitTransX() const { return ((f32*)mTexCrdMtxAnmTbl)[0]; }
@ -177,6 +178,25 @@ struct JPAChildShape {
void getPrmClr(GXColor* dst) { *dst = mData->mPrmClr; }
void getEnvClr(GXColor* dst) { *dst = mData->mEnvClr; }
s16 getLife() const { return mData->mLife; }
s16 getRotInitSpeed() const { return mData->mRotSpeed; }
s16 getRate() const { return mData->mRate; }
u8 getPrmAlpha() const { return mData->mPrmClr.a; }
f32 getPosRndm() const { return mData->mPosRndm; }
f32 getBaseVel() const { return mData->mBaseVel; }
f32 getBaseVelRndm() const { return mData->mBaseVelRndm; }
f32 getVelInhRate() const { return mData->mVelInfRate; }
f32 getScaleInhRate() const { return mData->mInheritScale; }
f32 getColorInhRate() const { return mData->mInheritRGB; }
f32 getAlphaInhRate() const { return mData->mInheritAlpha; }
f32 getGravity() const { return mData->mGravity; }
bool isFieldAffected() const { return mData->mFlags & 0x200000; }
bool isScaleInherited() const { return mData->mFlags & 0x10000; }
bool isColorInherited() const { return mData->mFlags & 0x40000; }
bool isAlphaInherited() const { return mData->mFlags & 0x20000; }
bool isRotateOn() const { return mData->mFlags & 0x1000000; }
const JPAChildShapeData* mData; // _00
};
@ -259,13 +279,20 @@ struct JPAExtraShape {
f32 getScaleOutValueY() const { return mData->mScaleOutValueY; }
s16 getScaleAnmCycleX() const { return mData->mScaleAnmCycleX; }
s16 getScaleAnmCycleY() const { return mData->mScaleAnmCycleY; }
f32 getScaleRndm() const { return mData->mScaleOutRandom; }
f32 getAlphaInTiming() const { return mData->mAlphaInTiming; }
f32 getAlphaOutTiming() const { return mData->mAlphaOutTiming; }
f32 getAlphaInValue() const { return mData->mAlphaInValue; }
f32 getAlphaOutValue() const { return mData->mAlphaOutValue; }
f32 getAlphaBaseValue() const { return mData->mAlphaBaseValue; }
f32 getAlphaFreq() const { return mData->mAlphaWaveFrequency; }
f32 getAlphaFreqRndm() const { return mData->mAlphaWaveRandom; }
f32 getAlphaAmp() const { return mData->mAlphaWaveAmplitude; }
f32 getRotateInitAngle() const { return mData->mRotateAngle; }
f32 getRotateRndmAngle() const { return mData->mRotateAngleRandom; }
f32 getRotateInitSpeed() const { return mData->mRotateSpeed; }
f32 getRotateRndmSpeed() const { return mData->mRotateSpeedRandom; }
f32 getRotateDirection() const { return mData->mRotateDirection; }
f32 getScaleIncRateX() const { return mScaleIncRateX; }
f32 getScaleDecRateX() const { return mScaleDecRateX; }
f32 getScaleIncRateY() const { return mScaleIncRateY; }
@ -273,6 +300,10 @@ struct JPAExtraShape {
f32 getAlphaIncRate() const { return mAlphaIncRate; }
f32 getAlphaDecRate() const { return mAlphaDecRate; }
bool isEnableScaleAnm() const { return mData->mFlags & 0x1; }
bool isEnableAlphaFlick() const { return mData->mFlags & 0x20000; }
bool isEnableRotateAnm() const { return mData->mFlags & 0x1000000; }
const JPAExtraShapeData* mData; // _00
f32 mAlphaIncRate; // _04
f32 mAlphaDecRate; // _08

View File

@ -3084,12 +3084,6 @@ void JPADrawParticleCallBack(JPAEmitterWorkData* workData, JPABaseParticle* part
}
}
/**
* @note Address: 0x8008E968
* @note Size: 0x4
*/
void JPAParticleCallBack::draw(JPABaseEmitter*, JPABaseParticle* particle) { }
/**
* @note Address: 0x8008E96C
* @note Size: 0x284

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ JPARTICLE_FILES:=\
$(BUILD_DIR)/src/JSystem/JParticle/JPAFieldBlock.o\
$(BUILD_DIR)/src/JSystem/JParticle/JPAKeyBlock.o\
$(BUILD_DIR)/asm/JSystem/JParticle/JPAMath.o\
$(BUILD_DIR)/asm/JSystem/JParticle/JPAParticle.o\
$(BUILD_DIR)/src/JSystem/JParticle/JPAParticle.o\
$(BUILD_DIR)/asm/JSystem/JParticle/JPAResource.o\
$(BUILD_DIR)/asm/JSystem/JParticle/JPAResourceLoader.o\
$(BUILD_DIR)/src/JSystem/JParticle/JPAResourceManager.o\

View File

@ -1007,3 +1007,5 @@ You have 4628 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-28 01:10
You have 4639 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-28 11:34:58.592022
4653,2165028,0.46536203623457556,114,404484,0.567413334530396,"
You have 4653 out of 10000 Pokos and 114 out of 201 treasures.",2024-05-29 04:00:57.271236
4665,2170600,0.4665597100133438,114,404544,0.5674975030020089,"
You have 4665 out of 10000 Pokos and 114 out of 201 treasures.",2024-05-30 00:56:53.834260

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
1007
1008
1009
1010
1011