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: 3 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Completion:
HeaderInsertion: Never

CompileFlags:
Add: -ferror-limit=100
107 changes: 54 additions & 53 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 @@ -424,7 +424,7 @@ def find_directories(root_path: str, recursive: bool) -> list[str]:
# RP flags (include precompiled header)
cflags_rp_pch = [
*cflags_rp,
"-prefix SportsPack.mch"
"-prefix SportsPack.mch",
]

config.linker_version = "GC/3.0a5.2"
Expand Down
9 changes: 9 additions & 0 deletions include/Pack/RPGraphics/RPGrpRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class RPGrpRenderer {
return spCurrentView;
}

RPGrpView* GetView(int idx) const {
return mDrawViews[idx];
}

/**
* @brief Gets the screen currently being rendered to
*/
Expand Down Expand Up @@ -70,6 +74,11 @@ class RPGrpRenderer {
static RPGrpView* spCurrentView;
//! Screen currently being rendered to
static RPGrpScreen* spCurrentScreen;

char unk0[0xC];
IRPGrpDrawObject* mpDrawList; // at 0xC
char unk10[0x14 - 0x10];
RPGrpView* mDrawViews[MAX_VIEW]; // at 0x14
};

//! @}
Expand Down
11 changes: 9 additions & 2 deletions include/Pack/RPGraphics/RPGrpView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

// Forward declarations
class RPGrpCamera;
class RPGrpScreen;

class RPGrpView {
public:
Expand All @@ -19,9 +20,11 @@ class RPGrpView {
protected:
u8 mViewNo; // at 0x0
u8 mDrawScene; // at 0x1
char _02[0x8 - 0x2];
char unk2[0x8 - 0x2];
EProjType mProjType; // at 0x8
char _0C[0x1C - 0xC];
char unkC[0x10 - 0xC];
RPGrpScreen* mpScreen; // at 0x10
char unk14[0x1C - 0x14];

public:
virtual ~RPGrpView(); // at 0x8
Expand All @@ -36,6 +39,10 @@ class RPGrpView {
return mProjType;
}

RPGrpScreen* GetScreen() const {
return mpScreen;
}

private:
;
};
Expand Down
3 changes: 2 additions & 1 deletion include/Pack/RPKernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <Pack/RPKernel/RPSysAvatar.h>
#include <Pack/RPKernel/RPSysController.h>
#include <Pack/RPKernel/RPSysControllerMgr.h>
#include <Pack/RPKernel/RPSysCursorDrawMgr.h>
#include <Pack/RPKernel/RPSysEffectBase.h>
#include <Pack/RPKernel/RPSysEffectCreator.h>
#include <Pack/RPKernel/RPSysEffectDefine.h>
Expand Down Expand Up @@ -42,8 +43,8 @@
#include <Pack/RPKernel/RPSysNWC24Manager.h>
#include <Pack/RPKernel/RPSysOfficialDB.h>
#include <Pack/RPKernel/RPSysPairingMgr.h>
#include <Pack/RPKernel/RPSysPauseMenu.h>
#include <Pack/RPKernel/RPSysParticleManager.h>
#include <Pack/RPKernel/RPSysPauseMenu.h>
#include <Pack/RPKernel/RPSysStringUtility.h>
#include <Pack/RPKernel/RPSysSystem.h>
#include <Pack/RPKernel/RPSysSystemWinMgr.h>
Expand Down
44 changes: 29 additions & 15 deletions include/Pack/RPKernel/RPSysController.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ class RPSysCoreController : public EGG::CoreController,
EGG::CoreStatus status[KPAD_MAX_SAMPLES]; // at 0x8
};

//! Buttons considered for cursor auto-repeat
static const u32 CURSOR_BUTTONS =
EGG::cCORE_BUTTON_UP | EGG::cCORE_BUTTON_DOWN | //
EGG::cCORE_BUTTON_LEFT | EGG::cCORE_BUTTON_RIGHT | //
EGG::cCORE_FSSTICK_UP | EGG::cCORE_FSSTICK_DOWN | //
EGG::cCORE_FSSTICK_LEFT | EGG::cCORE_FSSTICK_RIGHT;

public:
/**
* @brief Initializes the controller system
Expand Down Expand Up @@ -309,7 +316,7 @@ class RPSysCoreController : public EGG::CoreController,
*
* @param playerNo Player ID
*/
explicit RPSysCoreController(u32 playerNo);
explicit RPSysCoreController(s32 playerNo);

/**
* @brief Destructor
Expand Down Expand Up @@ -475,6 +482,20 @@ class RPSysCoreController : public EGG::CoreController,
*/
bool requestCoreInfoAsync();

/**
* @brief Accesses the active (main player) controller
*/
static RPSysCoreController* getActiveController() {
return spActiveController;
}

/**
* @brief Gets this controller's player index
*/
s32 getPlayerNo() const {
return mPlayerNo;
}

/**
* @brief Accesses this controller's MAC address
*/
Expand Down Expand Up @@ -525,13 +546,6 @@ class RPSysCoreController : public EGG::CoreController,
//! Number of samples to use for the vertical Y acceleration average
static const u32 ACC_VY_AVG_SAMPLES = 100;

//! Buttons considered for cursor auto-repeat
static const u32 CURSOR_BUTTONS =
EGG::cCORE_BUTTON_UP | EGG::cCORE_BUTTON_DOWN | //
EGG::cCORE_BUTTON_LEFT | EGG::cCORE_BUTTON_RIGHT | //
EGG::cCORE_FSSTICK_UP | EGG::cCORE_FSSTICK_DOWN | //
EGG::cCORE_FSSTICK_LEFT | EGG::cCORE_FSSTICK_RIGHT;

//! Cursor auto-repeat delay, in frames
static const u32 CURSOR_REPEAT_DELAY = 40;
//! Cursor auto-repeat rate, in frames
Expand All @@ -544,9 +558,9 @@ class RPSysCoreController : public EGG::CoreController,
static EGG::CoreController* createCoreController();

/**
* @brief Becomes the main (Player 1) controller
* @brief Becomes the active (main player) controller
*/
void becomeMainController();
void becomeActiveController();

/**
* @brief Assigns a new WPAD channel and address to this controller
Expand Down Expand Up @@ -578,10 +592,10 @@ class RPSysCoreController : public EGG::CoreController,
//! Next player index
static s16 sNextPlayerNo;

//! Player 1's controller
static RPSysCoreController* spMainController;
//! Player 1's controller address
static RPSysCoreAddress sMainAddress;
//! Active (main player) controller
static RPSysCoreController* spActiveController;
//! Active (main player) controller address
static RPSysCoreAddress sActiveAddress;

//! Whether a controller has disconnected in this scene
static bool sDisconnectOccurred;
Expand All @@ -594,7 +608,7 @@ class RPSysCoreController : public EGG::CoreController,
//! Controller event
EEvent mEvent; // at 0x904
//! Assigned player ID
u32 mPlayerNo; // at 0x908
s32 mPlayerNo; // at 0x908

//! Held cursor buttons
u32 mCursorHold; // at 0x90C
Expand Down
Loading
Loading