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
9 changes: 9 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CompileFlags:
Add: -ferror-limit=100

Diagnostics:
Suppress:
- bad_cxx_cast_unrelated_class
- init_conversion_failed
- member_function_call_bad_type
- ovl_no_viable_member_function_in_call
291 changes: 146 additions & 145 deletions config/RSPE01_01/symbols.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ def MatchingFor(*versions):
"progress_category": "system", # str | List[str]
"objects": [
Object(NonMatching, "Pack/RPSystem/RPSysSceneCreator.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysScene.cpp"),
Object(Matching, "Pack/RPSystem/RPSysScene.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysRenderMode.cpp"),
Object(NonMatching, "Pack/RPSystem/RPSysSceneMgr.cpp"),
Object(Matching, "Pack/RPSystem/RPSysProjectLocal.cpp"),
Expand Down
1 change: 1 addition & 0 deletions include/Pack/RPGraphics.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef RP_PUBLIC_GRAPHICS_H
#define RP_PUBLIC_GRAPHICS_H

#include <Pack/RPGraphics/IRPGrpDrawObject.h>
#include <Pack/RPGraphics/IRPGrpModelCallback.h>
#include <Pack/RPGraphics/RPGrpCamera.h>
#include <Pack/RPGraphics/RPGrpCaptureTexture.h>
Expand Down
40 changes: 40 additions & 0 deletions include/Pack/RPGraphics/IRPGrpDrawObject.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifndef RP_GRAPHICS_I_DRAW_OBJECT_H
#define RP_GRAPHICS_I_DRAW_OBJECT_H
#include <Pack/types_pack.h>

//! @addtogroup rp_graphics
//! @{

/**
* @brief Interface for renderable objects
*/
class IRPGrpDrawObject {
private:
//! Next renderable in the linked list
IRPGrpDrawObject* mpNext; // at 0x0

public:
/**
* @brief Constructor
*/
IRPGrpDrawObject() : mpNext(NULL) {}

/**
* @brief Destructor
*/
virtual ~IRPGrpDrawObject() {} // at 0x8

/**
* @brief Standard draw pass
*/
virtual void UserDraw() {} // at 0xC

/**
* @brief Additional draw pass for debugging
*/
virtual void DebugDraw() {} // at 0x10
};

//! @}

#endif
23 changes: 23 additions & 0 deletions include/Pack/RPGraphics/RPGrpRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
#define RP_GRAPHICS_RENDERER_H
#include <Pack/types_pack.h>

#include <egg/core.h>

//! @addtogroup rp_graphics
//! @{

// Forward declarations
class IRPGrpDrawObject;
class RPGrpScreen;

/**
Expand All @@ -31,6 +34,26 @@ class RPGrpRenderer {
return spCurrentScreen;
}

static void Begin();
static void End();

static void StartDebugDraw();

static RPGrpRenderer* Construct(EGG::Allocator* pAllocator, u16 id);

void Rendering();
void Destruct();
void BecomeCurrent();

void AppendDrawObject(IRPGrpDrawObject* pObject);
void AppendDrawObject(IRPGrpDrawObject& rObject) {
AppendDrawObject(&rObject);
}

void PreCalculate();
void PostCalculate();
void CalculateInPause();

private:
//! Allocator used for model-related allocations
static RPGrpRenderer* spCurrent;
Expand Down
3 changes: 3 additions & 0 deletions include/Pack/RPKernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <Pack/RPKernel/RPSysAvatar.h>
#include <Pack/RPKernel/RPSysController.h>
#include <Pack/RPKernel/RPSysControllerMgr.h>
#include <Pack/RPKernel/RPSysEffectCreator.h>
#include <Pack/RPKernel/RPSysEffectMgr.h>
#include <Pack/RPKernel/RPSysFile.h>
#include <Pack/RPKernel/RPSysFrameCtrl.h>
#include <Pack/RPKernel/RPSysHomeMenuMgr.h>
Expand Down Expand Up @@ -39,6 +41,7 @@
#include <Pack/RPKernel/RPSysPairingMgr.h>
#include <Pack/RPKernel/RPSysParticleManager.h>
#include <Pack/RPKernel/RPSysStringUtility.h>
#include <Pack/RPKernel/RPSysSystem.h>
#include <Pack/RPKernel/RPSysSystemWinMgr.h>
#include <Pack/RPKernel/RPSysTagProcessor.h>
#include <Pack/RPKernel/RPSysTextWriter.h>
Expand Down
4 changes: 2 additions & 2 deletions include/Pack/RPKernel/RPSysController.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ class RPSysCoreController : public EGG::CoreController,
/**
* @brief Constructor
*
* @param id Unique ID
* @param playerNo Player ID
*/
RPSysCoreController(u32 id);
RPSysCoreController(u32 playerNo);

/**
* @brief Destructor
Expand Down
31 changes: 31 additions & 0 deletions include/Pack/RPKernel/RPSysEffectCreator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef RP_KERNEL_EFFECT_CREATOR_H
#define RP_KERNEL_EFFECT_CREATOR_H
#include <Pack/types_pack.h>

//! @addtogroup rp_kernel
//! @{

/**
* @brief Effect creator
*/
class RPSysEffectCreator {
public:
/**
* @brief Constructor
*
* @param effectScene Effect scene index
*/
RPSysEffectCreator(u32 effectScene);

/**
* @brief Destructor
*/
virtual ~RPSysEffectCreator(); // at 0x8

private:
char unk4[0x44 - 0x4];
};

//! @}

#endif
40 changes: 40 additions & 0 deletions include/Pack/RPKernel/RPSysEffectMgr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifndef RP_KERNEL_EFFECT_MGR_H
#define RP_KERNEL_EFFECT_MGR_H
#include <Pack/types_pack.h>

#include <Pack/RPSingleton.h>

//! @addtogroup rp_kernel
//! @{

// Forward declarations
class RPSysEffectCreator;

/**
* @brief Effect manager
*/
class RPSysEffectMgr {
RP_SINGLETON_DECL_EX(RPSysEffectMgr);

public:
/**
* @brief Effect scene index
*/
enum EEffectScene {
EEffectScene_Scene, //!< Scene effects
EEffectScene_Cursor, //!< Cursor effects
EEffectScene_Work, //!< Miscellaneous effects

EEffectScene_Max
};

public:
void stopAllEffect();

void setCreator(RPSysEffectCreator* pCreator, u32 effectScene);
void resetCreator(RPSysEffectCreator* pCreator);
};

//! @}

#endif
28 changes: 17 additions & 11 deletions include/Pack/RPKernel/RPSysHomeMenuMgr.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#ifndef RP_KERNEL_HOME_MENU_MANAGER_H
#define RP_KERNEL_HOME_MENU_MANAGER_H
#ifndef RP_KERNEL_HOME_MENU_MGR_H
#define RP_KERNEL_HOME_MENU_MGR_H
#include <Pack/types_pack.h>
#include <Pack/RPSystem/RPSysProjectLocal.h>

#include <Pack/RPSingleton.h>
#include <Pack/RPSystem/RPSysProjectLocal.h>

#include <homebuttonMiniLib.h>

//! @addtogroup rp_kernel
Expand All @@ -18,32 +19,36 @@ class RPSysHomeMenuMgr {
public:
void update();

bool isOpen() const {
return mIsOpen;
}

/**
* @brief Check if program is exiting/resetting and black out if true
*
* @return BOOL
*
* @return BOOL
*/
BOOL startBlackOut();

private:
struct unknownArcStruct {
void *mArcFile;
void* mArcFile;
u32 UNK_0x04; // set to 1 if DVD error occurs in function 801A4E8C
u16 UNK_0x08;
u16 UNK_0x0A;
};

u8 mUNK_0x08; // set to 1 at the end of LoadResource. bool?
u8 mUNK_0x08; // set to 1 at the end of LoadResource. bool?
bool mUNK_0x09; // checked in 801A4E8C to make sure error has not occurred
bool mUNK_0x0A; // set to true if no DVD error and scene change disabled
bool mBlackOutOk;
bool mIsOpen;
u8 mUNK_0x0C;
u8 mUNK_0x0D;
u32 mUNK_0x10;
u16 mUNK_0x14;
RPSysProjectLocal* mProjectLocal;
unknownArcStruct* mARC_0x1C;
HBMDataInfo *mMenuDataInfo;
HBMDataInfo* mMenuDataInfo;
u32 mUNK_0x24;
u32 mUNK_0x28;
u32 mUNK_0x2C;
Expand All @@ -55,11 +60,12 @@ class RPSysHomeMenuMgr {
u32 mUNK_0x44; // Seemingly skipped in constructor?
u32 mUNK_0x48;
u32 mUNK_0x4C;
f32 mUNK_0x50; // Set to 1.2 if the console is in PAL 50 Hz mode, otherwise 1.0
f32 mUNK_0x50; // Set to 1.2 if the console is in PAL 50 Hz mode,
// otherwise 1.0
f32 mUNK_0x54;
f32 mUNK_0x58;
u32 mUNK_0x5C;
const HBMControllerData *mHbmControllerData;
const HBMControllerData* mHbmControllerData;
u8 mUNK_0x64[60];
KPADStatus mKpadStatus;
};
Expand Down
2 changes: 1 addition & 1 deletion include/Pack/RPKernel/RPSysKokeshiCtrlDataLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class RPSysKokeshiCtrlDataLoader {
/**
* @brief Constructor
*
* @param chan WPAD channel to use
* @param chan Remote channel
*/
explicit RPSysKokeshiCtrlDataLoader(s32 chan);

Expand Down
4 changes: 2 additions & 2 deletions include/Pack/RPKernel/RPSysKokeshiCtrlDataMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ class RPSysKokeshiCtrlDataMgr {

public:
/**
* @brief Construct
* @brief Constructor
*
* @param pCallback Controller data callback
* @param pParentHeap Heap to use as the parent of the controller data heap
* @param heapSize Size of the controller data heap
* @param index WPAD channel to use
* @param chan Remote channel
*/
RPSysKokeshiCtrlDataMgr(IRPSysKokeshiCtrlDataCallback* pCallback,
EGG::Heap* pParentHeap, u32 heapSize, s32 chan);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef RP_SYSTEM_SYSTEM_H
#define RP_SYSTEM_SYSTEM_H
#ifndef RP_KERNEL_SYSTEM_H
#define RP_KERNEL_SYSTEM_H
#include <Pack/types_pack.h>

#include <Pack/RPSystem/RPSysSceneCreator.h>
#include <Pack/RPSystem/RPSysRenderMode.h>
#include <Pack/RPSystem/RPSysSceneCreator.h>

#include <egg/core.h>

Expand All @@ -26,7 +26,7 @@ class RPSysConfigData {

virtual EGG::Video* GetVideo() {
return mVideo;
}
}
virtual EGG::Heap* GetSystemHeap() {
return mSystemHeap;
}
Expand All @@ -47,27 +47,29 @@ class RPSysConfigData {
}
virtual void StubA() {}
virtual void StubB() {}

private:
void* mMem1Start;
void* mMem1End;
void* mMem2Start;
void* mMem2End;
u32 mMemSize;
EGG::Heap *mRootHeapMem1;
EGG::Heap *mRootHeapMem2;
EGG::Heap *mRootHeapDebug;
EGG::Heap* mRootHeapMem1;
EGG::Heap* mRootHeapMem2;
EGG::Heap* mRootHeapDebug;

protected:
EGG::Heap* mSystemHeap;
EGG::Thread* mCreatorThread;
void* mCodeStart;
void* mCodeEnd;
u32 mSystemHeapSize;
EGG::Video *mVideo;
EGG::XfbManager *mXfbMgr;
EGG::Display *mDisplay;
EGG::PerformanceView *mPerfView;
EGG::SceneManager *mSceneMgr;
EGG::IAudioMgr *mAudioMgr;
EGG::Video* mVideo;
EGG::XfbManager* mXfbMgr;
EGG::Display* mDisplay;
EGG::PerformanceView* mPerfView;
EGG::SceneManager* mSceneMgr;
EGG::IAudioMgr* mAudioMgr;
};

/**
Expand Down
6 changes: 0 additions & 6 deletions include/Pack/RPParty.h

This file was deleted.

6 changes: 6 additions & 0 deletions include/Pack/RPParty/RPBilScene.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef RP_PUBLIC_PARTY_BIL_H
#define RP_PUBLIC_PARTY_BIL_H

#include <Pack/RPParty/RPBilScene/RPBilScene.h>

#endif
Loading
Loading