Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/RSPE01_01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2783,13 +2783,14 @@ Pack/RPSystem/RPSysDvdStatus.cpp:

Pack/RPSystem/RPSysSaveDataMgr.cpp:
.text start:0x80188368 end:0x8018A90C
.rodata start:0x803829E0 end:0x80382A50
.rodata start:0x803829E0 end:0x80382A30
.data start:0x803B9938 end:0x803B994C
.sdata start:0x804BDB88 end:0x804BDB98
.sbss start:0x804BF508 end:0x804BF510

Pack/RPSystem/RPSportsSystemData.cpp:
.text start:0x8018A90C end:0x8018AD70
.rodata start:0x80382A30 end:0x80382A50

Pack/RPSystem/RPSportsPlayerData.cpp:
.text start:0x8018AD70 end:0x8018BCDC
Expand Down
801 changes: 431 additions & 370 deletions config/RSPE01_01/symbols.txt

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,13 +1164,13 @@ def MatchingFor(*versions):
Object(NonMatching, "Pack/RPSystem/RPSysCommonObject.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysDvdStatus.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysSaveDataMgr.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSportsSystemData.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSportsPlayerData.cpp"),
Object(Matching, "Pack/RPSystem/RPSportsSystemData.cpp"),
Object(Matching, "Pack/RPSystem/RPSportsPlayerData.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysFontManager.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysSaveData.cpp"),
Object(Matching, "Pack/RPSystem/RPSysSaveData.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysPauseMgr.cpp"),
Object(NonMatching, "Pack/RPSystem/RPPartySystemData.cpp"),
Object(NonMatching, "Pack/RPSystem/RPPartyPlayerData.cpp"),
Object(Matching, "Pack/RPSystem/RPPartySystemData.cpp"),
Object(Matching, "Pack/RPSystem/RPPartyPlayerData.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysPlayerMgr.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysPlayer.cpp"),
],
Expand Down
11 changes: 11 additions & 0 deletions include/Pack/RPGraphics/RPGrpModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ class RPGrpModel {
return mpModelEx->getScnRfl();
}

const nw4r::math::VEC3& GetScale() const {
return mScale;
}

RPGrpModelMaterial* GetMaterial(const char* pName) const {
return mppMaterials[GetMaterialIndex(pName)];
}
RPGrpModelMaterial* GetMaterial(u16 idx) const {
return mppMaterials[idx];
}

bool IsVisible() const {
return (mFlags & EFlag_Visible) ? true : false;
}
Expand Down
2 changes: 1 addition & 1 deletion include/Pack/RPGraphics/RPGrpModelManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RPGrpModelManager {
return spCurrent;
}

RPGrpDrawPathManager* GetDrawPathManager();
RPGrpDrawPathManager* GetDrawPathManager(u8 drawScene) const;

private:
//! Allocator used for model-related allocations
Expand Down
75 changes: 65 additions & 10 deletions include/Pack/RPGraphics/RPGrpModelMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,50 @@ class RPGrpModelMaterial {
public:
enum ESyncFlag {
ESyncFlag_ResGenMode = 1 << 0,
ESyncFlag_ResMatTev = 1 << 4,
};

enum ETevColor {
ETevColor_Reg0,
ETevColor_Reg1,
ETevColor_Reg2,

ETevColor_Max
};

enum ETevKColor {
ETevKColor_Reg0,
ETevKColor_Reg1,
ETevKColor_Reg2,
ETevKColor_Reg3,

ETevKColor_Max
};

struct ChanCtrl {
u8 enable; // at 0x0
u8 lightMask; // at 0x1
u8 ambSrc; // at 0x2
u8 matSrc; // at 0x3
u8 diffuseFn; // at 0x4
u8 attnFn; // at 0x5
};

private:
u32 mSyncFlags; // at 0x0
char unkB[0xB - 0x4];
u8 mCullMode; // at 0xB
char _0C[0x20 - 0xC];
GXColor mTevKColors[GX_MAX_KCOLOR]; // at 0x20
GXColorS10 mTevColors[GX_MAX_TEVREG - GX_TEVREG0]; // at 0x30
char unk48[0xD0 - 0x48];
u16 unk4;
u8 unk6;
u8 mNumChans; // at 0x7
u8 mNumTexGens; // at 0x8
u8 mNumTevStages; // at 0x9
u8 mNumIndStages; // at 0xA
u8 mCullMode; // at 0xB
char unkC[4];
ChanCtrl* mpChanCtrls[GX_ALPHA1 - GX_COLOR0 + 1]; // at 0x10
GXColor mTevKColors[ETevKColor_Max]; // at 0x20
GXColorS10 mTevColors[ETevColor_Max]; // at 0x30
char unk48[0x9C - 0x48];
nw4r::g3d::ScnMdl::CopiedMatAccess mCopiedMatAccess; // at 0x9C

public:
RPGrpModelMaterial(RPGrpModel* pModel, u16 idx);
Expand All @@ -47,11 +81,32 @@ class RPGrpModelMaterial {
mCullMode = cullMode;
}

void SetTevKColor(GXTevKColorID id, GXColor color) {
mTevKColors[id] = color;
void SetTevKColor(ETevKColor idx, GXColor color) {
mTevKColors[idx] = color;
}
void SetTevKColor(ETevKColor idx, u8 r, u8 g, u8 b) {
mTevKColors[idx].r = r;
mTevKColors[idx].g = g;
mTevKColors[idx].b = b;
}

void SetTevColor(ETevColor idx, GXColorS10 color) {
mTevColors[idx] = color;
}
void SetTevColor(ETevColor idx, const GXColor& color) {
mTevColors[idx].r = color.r;
mTevColors[idx].g = color.g;
mTevColors[idx].b = color.b;
mTevColors[idx].a = color.a;
}
void SetTevColor(ETevColor idx, u8 r, u8 g, u8 b, u8 a) {
mTevColors[idx].r = r;
mTevColors[idx].g = g;
mTevColors[idx].b = b;
mTevColors[idx].a = a;
}
void SetTevColor(GXTevRegID id, GXColorS10 color) {
mTevColors[id - GX_TEVREG0] = color;
void SetTevColorAlpha(ETevColor idx, u8 alpha) {
mTevColors[idx].a = alpha;
}
};

Expand Down
19 changes: 18 additions & 1 deletion include/Pack/RPGraphics/RPGrpModelRfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RPGrpModelRfl : public RPGrpModel, public nw4r::g3d::IScnObjCallback {
static RPGrpModelRfl* Construct(RFLDataSource src, u16 index,
RFLMiddleDB* pMiddleDB,
RFLResolution resolution, u32 exprFlags,
u8 viewNo);
u8 viewNo, u32 arg6 = 0);

RPGrpModelRfl(RFLResolution resolution, u32 exprFlags, u8 viewNo);

Expand Down Expand Up @@ -137,10 +137,26 @@ class RPGrpModelRfl : public RPGrpModel, public nw4r::g3d::IScnObjCallback {
virtual UNKTYPE VF_0x10(UNKTYPE) override {} // at 0x10
virtual UNKTYPE VF_0xC(UNKTYPE) override {} // at 0xC

void SetBrightnessColor(const GXColor& rColor) {
mBrightnessColor = rColor;
}

void SetOutputAlpha(u8 alpha) {
mOutputAlpha = alpha;
}

void SetMaterialType(MaterialType type) {
mMaterialType = type;
}

static void SetBaseScale(f32 scale) {
sBaseScale = scale;
}

static void SetMtx(const nw4r::math::MTX34& rMtx) {
nw4r::math::MTX34Copy(&lbl_804A4608, &rMtx);
}

private:
enum {
EFlag_ReverseCulling = 1 << 4,
Expand Down Expand Up @@ -171,6 +187,7 @@ class RPGrpModelRfl : public RPGrpModel, public nw4r::g3d::IScnObjCallback {
static f32 sBaseScale;
static nw4r::math::MTX34 lbl_804A4608;

private:
GXTexObj mLightTexObj0; // at 0x4C
GXTexObj mLightTexObj1; // at 0x6C
GXColor mBrightnessColor; // at 0x8C
Expand Down
12 changes: 9 additions & 3 deletions include/Pack/RPGraphics/RPGrpTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define RP_GRAPHICS_MODEL_TEXTURE_H
#include <Pack/types_pack.h>

#include <Pack/RPGraphics/RPGrpModelResManager.h>

#include <revolution/GX.h>

//! @addtogroup rp_graphics
Expand All @@ -11,13 +13,17 @@
* @brief Texture utility
*/
class RPGrpTexture {
private:
GXTexObj mGXTexObj; // at 0x0

public:
RPGrpTexture();
RPGrpTexture(RPGrpHandle handle, const char* pName);
virtual ~RPGrpTexture();

const GXTexObj& GetTexObj() const {
return mGXTexObj;
}

private:
GXTexObj mGXTexObj; // at 0x0
};

//! @}
Expand Down
9 changes: 6 additions & 3 deletions include/Pack/RPKernel/RPSysAvatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,20 @@ class RPSysAvatar : public RP_DEBUG_STUB_1 {
const RPSysKokeshiOverloadInfo* pOverloadInfo = NULL); // at 0xC

/**
* @brief Applies a generated light texture to this avatar
* @brief Applies all lightmap textures to this avatar
*
* @param idx Lightmap texture index
* @param drawScene Draw scene index
*/
virtual void ApplyLightTexture(u8 idx) = 0; // at 0x10
virtual void ApplyLightTexture(u8 drawScene) = 0; // at 0x10

/**
* @brief Gets the RFL favorite color of this avatar
*/
GXColor GetFavoriteColor() const;

/**
* @brief Accesses the Mii generation parameters
*/
const RPSysKokeshiGenInfo& GetGenInfo() const {
return mGenInfo;
}
Expand Down
2 changes: 1 addition & 1 deletion include/Pack/RPKernel/RPSysFrameCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RPSysFrameCtrl {
/**
* @brief Animation result flags
*/
enum EFlag {
enum {
EFlag_Finished = 1 << 0, //!< Non-looping animation has finished
EFlag_Looped = 1 << 1, //!< Animation has looped at least once
};
Expand Down
6 changes: 3 additions & 3 deletions include/Pack/RPKernel/RPSysKokeshi.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class RPSysKokeshi : public RPSysAvatar {
NULL) override; // at 0xC

/**
* @brief Applies a generated light texture to this avatar
* @brief Applies all lightmap textures to this avatar
*
* @param idx Lightmap texture index
* @param drawScene Draw scene index
*/
virtual void ApplyLightTexture(u8 idx) override; // at 0x10
virtual void ApplyLightTexture(u8 drawScene) override; // at 0x10

/**
* @brief Gets the transformation matrix of the head joint/node
Expand Down
6 changes: 3 additions & 3 deletions include/Pack/RPKernel/RPSysKokeshiCtrlMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ class RPSysKokeshiCtrlMgr {
/**
* @brief Lifetime manager
*/
class Disposer : public EGG::Disposer {
class T__Disposer : public EGG::Disposer {
public:
/**
* @brief Destructor
*/
virtual ~Disposer() override { // at 0x8
virtual ~T__Disposer() override { // at 0x8
RP_GET_INSTANCE(RPSysKokeshiManager)->ClearCtrlMgr();
}
};

//! Disposer for this manager
Disposer mDisposer; // at 0x0
T__Disposer mDisposer; // at 0x0

private:
void* unk10; // at 0x10
Expand Down
12 changes: 6 additions & 6 deletions include/Pack/RPKernel/RPSysKokeshiGenInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class RPSysKokeshiGenInfo {

//! Resolution of models and textures
RFLResolution mResolution; // at 0x30
//! Facial expression to use
RFLExpression mExpression; // at 0x34
//! Facial expressions to support
u32 mExprFlag; // at 0x34

// Use mipmapping to downscale the icon texture
BOOL mMipMap;
Expand Down Expand Up @@ -125,11 +125,11 @@ class RPSysKokeshiGenInfo {
mResolution = resolution;
}

RFLExpression GetExpression() const {
return mExpression;
u32 GetExpressionFlag() const {
return mExprFlag;
}
void SetExpression(RFLExpression expression) {
mExpression = expression;
void SetExpressionFlag(u32 exprFlag) {
mExprFlag = exprFlag;
}

const RPSysKokeshiLocation& GetLocation() const {
Expand Down
3 changes: 2 additions & 1 deletion include/Pack/RPKernel/RPSysKokeshiIterater.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

/**
* @brief Mii data source iterator
* @typo
*/
class RPSysKokeshiIterater { // @typo
class RPSysKokeshiIterater {
private:
//! Whether this iterator has been initialized
BOOL mIsInitialized; // at 0x0
Expand Down
Loading
Loading