Skip to content

Commit 22c5f85

Browse files
authored
RPSysResourceManager WIP (#131)
1 parent f4686b9 commit 22c5f85

16 files changed

Lines changed: 1037 additions & 128 deletions

config/RSPE01_01/symbols.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7002,25 +7002,25 @@ fn_80186D2C = .text:0x80186D2C; // type:function size:0x4
70027002
fn_80186D30 = .text:0x80186D30; // type:function size:0x110
70037003
fn_80186E40 = .text:0x80186E40; // type:function size:0x58
70047004
fn_80186E98 = .text:0x80186E98; // type:function size:0x1C
7005-
fn_80186EB4 = .text:0x80186EB4; // type:function size:0xEC
7006-
fn_80186FA0 = .text:0x80186FA0; // type:function size:0x254
7007-
fn_801871F4 = .text:0x801871F4; // type:function size:0x9C
7005+
LoadFromDVD__20RPSysResourceManagerFPCcPQ23EGG4HeapQ33EGG9DvdRipper15EAllocDirectionPl = .text:0x80186EB4; // type:function size:0xEC
7006+
LoadCompressed__20RPSysResourceManagerFPCcPQ23EGG4Heap = .text:0x80186FA0; // type:function size:0x254
7007+
LoadStaticLocalArchive__20RPSysResourceManagerFPCc = .text:0x801871F4; // type:function size:0x9C
70087008
GetGameSoundLocalPath__20RPSysResourceManagerFPcUll = .text:0x80187290; // type:function size:0x70
70097009
GetGameSoundCommonPath__20RPSysResourceManagerFPcUll = .text:0x80187300; // type:function size:0x6C
70107010
GetStaticSoundLocalPath__20RPSysResourceManagerFPcUl = .text:0x8018736C; // type:function size:0x7C
70117011
GetStaticSoundCommonPath__20RPSysResourceManagerFPcUl = .text:0x801873E8; // type:function size:0x64
7012-
fn_8018744C = .text:0x8018744C; // type:function size:0x68
7013-
fn_801874B4 = .text:0x801874B4; // type:function size:0x150
7014-
fn_80187604 = .text:0x80187604; // type:function size:0x1D0
7012+
LoadKokeshiArchive__20RPSysResourceManagerFv = .text:0x8018744C; // type:function size:0x68
7013+
LoadCacheArchives__20RPSysResourceManagerFv = .text:0x801874B4; // type:function size:0x150
7014+
LoadStaticArchives__20RPSysResourceManagerFv = .text:0x80187604; // type:function size:0x1D0
70157015
RemoveFromFileList__20RPSysResourceManagerFP9RPSysFile = .text:0x801877D4; // type:function size:0x8
70167016
IsExist__20RPSysResourceManagerFPCc = .text:0x801877DC; // type:function size:0x60
7017-
fn_8018783C = .text:0x8018783C; // type:function size:0x3C
7018-
fn_80187878 = .text:0x80187878; // type:function size:0x4C
7019-
fn_801878C4 = .text:0x801878C4; // type:function size:0xA0
7020-
fn_80187964 = .text:0x80187964; // type:function size:0xA8
7021-
fn_80187A0C = .text:0x80187A0C; // type:function size:0x9C
7022-
fn_80187AA8 = .text:0x80187AA8; // type:function size:0x40
7023-
fn_80187AE8 = .text:0x80187AE8; // type:function size:0x6C
7017+
GetMessageResource__20RPSysResourceManagerFPCc = .text:0x8018783C; // type:function size:0x3C
7018+
GetFileFromArchive__20RPSysResourceManagerFPQ23EGG7ArchivePCcPUl = .text:0x80187878; // type:function size:0x4C
7019+
LoadGameStageArchive__20RPSysResourceManagerFPCc = .text:0x801878C4; // type:function size:0xA0
7020+
LoadGameLocalArchive__20RPSysResourceManagerFlPQ23EGG4Heap = .text:0x80187964; // type:function size:0xA8
7021+
LoadGameCommonArchive__20RPSysResourceManagerFlPQ23EGG4Heap = .text:0x80187A0C; // type:function size:0x9C
7022+
__dt__20RPSysResourceManagerFv = .text:0x80187AA8; // type:function size:0x40
7023+
CreateInstance__20RPSysResourceManagerFv = .text:0x80187AE8; // type:function size:0x6C
70247024
fn_80187B54 = .text:0x80187B54; // type:function size:0x40
70257025
fn_80187B94 = .text:0x80187B94; // type:function size:0xC
70267026
fn_80187BA0 = .text:0x80187BA0; // type:function size:0x70
@@ -15058,7 +15058,7 @@ lbl_80382438 = .rodata:0x80382438; // type:object size:0x18
1505815058
@stringBase0 = .rodata:0x80382470; // type:object size:0xF2 scope:local data:string_table
1505915059
lbl_80382568 = .rodata:0x80382568; // type:object size:0x48
1506015060
lbl_803825B0 = .rodata:0x803825B0; // type:object size:0xC data:string
15061-
lbl_803825C0 = .rodata:0x803825C0; // type:object size:0x38 data:4byte
15061+
CACHED_SCENES__20RPSysResourceManager = .rodata:0x803825C0; // type:object size:0x38 data:4byte
1506215062
lbl_803825F8 = .rodata:0x803825F8; // type:object size:0xE data:string
1506315063
lbl_80382606 = .rodata:0x80382606; // type:object size:0xD data:string
1506415064
lbl_80382613 = .rodata:0x80382613; // type:object size:0xE data:string
@@ -18566,7 +18566,7 @@ __vt__15RPSysGameConfig = .data:0x803B9808; // type:object size:0xC scope:global
1856618566
__vt__19RPSysPrimTagParm<i> = .data:0x803B9814; // type:object size:0x14 scope:weak
1856718567
__vt__18RPSysStringTagParm = .data:0x803B9828; // type:object size:0x14 scope:global
1856818568
__vt__12RPSysTagParm = .data:0x803B983C; // type:object size:0x14 scope:global
18569-
scStaticPaths__20RPSysResourceManager = .data:0x803B9850; // type:object size:0x10 scope:global
18569+
STATIC_DIR_NAMES__20RPSysResourceManager = .data:0x803B9850; // type:object size:0x10 scope:global
1857018570
__vt__20RPSysResourceManager = .data:0x803B9860; // type:object size:0x10 scope:global
1857118571
__vt__16RPSysQueuedScene = .data:0x803B9870; // type:object size:0x10 scope:global
1857218572
__vt__17RPSysCommonObject = .data:0x803B9880; // type:object size:0x14 scope:global
@@ -20439,7 +20439,7 @@ scResFileFullPathName = .sdata:0x804BDB60; // type:object size:0x4 scope:local d
2043920439
scFileNames = .sdata:0x804BDB68; // type:object size:0x8 scope:local
2044020440
scFirstDirectory = .sdata:0x804BDB70; // type:object size:0x4 scope:local data:4byte
2044120441
scSecondDirectory = .sdata:0x804BDB74; // type:object size:0x4 scope:local data:4byte
20442-
lbl_804BDB78 = .sdata:0x804BDB78; // type:object size:0x8 data:4byte
20442+
KOKESHI_ARCHIVE_PATH__20RPSysResourceManager = .sdata:0x804BDB78; // type:object size:0x4 data:4byte
2044320443
GAME_DISK_NAME__14RPSysDvdStatus = .sdata:0x804BDB80; // type:object size:0x4 data:4byte
2044420444
lbl_804BDB88 = .sdata:0x804BDB88; // type:object size:0x8 data:4byte
2044520445
lbl_804BDB90 = .sdata:0x804BDB90; // type:object size:0x8 data:4byte

docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,14 @@ public:
325325
326326
// 2. PROTECTED ACCESS
327327
protected:
328-
// 7. Non-static functions
328+
// 7. All other functions
329329
const Fruit& GetFruit(int i) const {
330330
return mFruits[i];
331331
}
332332
333333
// 3. PRIVATE ACCESS
334334
private:
335-
// 7. Non-static functions
335+
// 7. All other functions
336336
void Clear();
337337
338338
// 8. Constant, static members

include/Pack/RPKernel/IRPSysKokeshiBodyManager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#include <egg/math.h>
88

9-
109
//! @addtogroup rp_kernel
1110
//! @{
1211

include/Pack/RPKernel/RPSysAppMiiManager.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
#define RP_KERNEL_APP_MII_MANAGER_H
33
#include <Pack/types_pack.h>
44

5-
#include <egg/core.h>
6-
75
#include <RVLFaceLib.h>
86

7+
#include <egg/core.h>
8+
99
//! @addtogroup rp_kernel
1010
//! @{
1111

@@ -33,6 +33,11 @@ class RPSysAppMiiManager {
3333
*/
3434
virtual ~RPSysAppMiiManager() {} // at 0x8
3535

36+
/**
37+
* @brief Loads the Mii data resources
38+
*/
39+
virtual void LoadResource() = 0; // at 0xC
40+
3641
/**
3742
* @brief Gets the capacity of the Mii buffer
3843
*/

include/Pack/RPKernel/RPSysFile.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
* @brief Cached resource file
1414
*/
1515
class RPSysFile : public EGG::Disposer {
16+
public:
17+
//! Maximum file path length
18+
static const u32 PATH_MAX = 128;
19+
1620
public:
1721
/**
1822
* @brief Constructor
@@ -46,18 +50,14 @@ class RPSysFile : public EGG::Disposer {
4650
/**
4751
* @brief Gets the data of this file
4852
*/
49-
const void* GetData() const {
53+
const u8* GetData() const {
5054
return mpData;
5155
}
5256

5357
public:
5458
//! Linked-list node used for cache lists
5559
NW4R_UT_LIST_LINK_DECL(); // at 0x10
5660

57-
private:
58-
//! Maximum file path length
59-
static const u32 PATH_MAX = 128;
60-
6161
private:
6262
//! File path
6363
char mPath[PATH_MAX]; // at 0x18

include/Pack/RPParty.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef RP_PUBLIC_PARTY_H
2+
#define RP_PUBLIC_PARTY_H
3+
4+
#include <Pack/RPParty/RPPartyBodyManager.h>
5+
6+
#endif
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#ifndef RP_PARTY_BODY_MANAGER_H
2+
#define RP_PARTY_BODY_MANAGER_H
3+
#include <Pack/types_pack.h>
4+
5+
#include <Pack/RPKernel.h>
6+
7+
//! @addtogroup rp_party
8+
//! @{
9+
10+
/**
11+
* @brief Party Pack Mii body manager
12+
*/
13+
class RPPartyBodyManager : public IRPSysKokeshiBodyManager {
14+
public:
15+
/**
16+
* @brief Constructor
17+
*/
18+
RPPartyBodyManager();
19+
20+
/**
21+
* @brief Destructor
22+
*/
23+
virtual ~RPPartyBodyManager(); // at 0x2C
24+
25+
virtual u16 GetFriendClothesStartIndex(); // at 0x8
26+
virtual u16 GetFriendClothesIndexRange(); // at 0xC
27+
28+
virtual const char* GetBodyFileName(u16 bodyType,
29+
RFLSex sex); // at 0x10
30+
31+
virtual u16 GetBodyModelIndex(u16 bodyType, RFLSex sex, u32 height,
32+
u32 build); // at 0x14
33+
34+
virtual const char* GetClothesFileName(); // at 0x18
35+
36+
virtual void GetClothesName(u16 clothesType, RFLSex sex,
37+
const char** ppNameA,
38+
const char** ppNameB); // at 0x1C
39+
40+
virtual void GetHeadJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
41+
EGG::Matrix34f* pMtx); // at 0x20
42+
43+
virtual void GetLeftHandJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
44+
EGG::Matrix34f* pMtx); // at 0x24
45+
virtual void GetRightHandJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
46+
EGG::Matrix34f* pMtx); // at 0x28
47+
48+
private:
49+
// . . .
50+
};
51+
52+
//! @}
53+
54+
#endif

include/Pack/RPSports.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef RP_PUBLIC_SPORTS_H
2+
#define RP_PUBLIC_SPORTS_H
3+
4+
#include <Pack/RPSports/RPSportsAppMiiManager.h>
5+
#include <Pack/RPSports/RPSportsBodyManager.h>
6+
7+
#endif
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#ifndef RP_SPORTS_APP_MII_MANAGER_H
2+
#define RP_SPORTS_APP_MII_MANAGER_H
3+
#include <Pack/types_pack.h>
4+
5+
#include <Pack/RPKernel.h>
6+
7+
#include <egg/core.h>
8+
9+
//! @addtogroup rp_sports
10+
//! @{
11+
12+
/**
13+
* @brief Sports Pack Mii data manager
14+
*/
15+
class RPSportsAppMiiManager : public RPSysAppMiiManager {
16+
public:
17+
/**
18+
* @brief Constructor
19+
*
20+
* @param pHeap Heap to use for allocations
21+
*/
22+
RPSportsAppMiiManager(EGG::Heap* pHeap);
23+
24+
/**
25+
* @brief Loads the Mii data resources
26+
*/
27+
virtual void LoadResource(); // at 0xC
28+
29+
private:
30+
// . . .
31+
};
32+
33+
//! @}
34+
35+
#endif
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#ifndef RP_SPORTS_BODY_MANAGER_H
2+
#define RP_SPORTS_BODY_MANAGER_H
3+
#include <Pack/types_pack.h>
4+
5+
#include <Pack/RPKernel.h>
6+
7+
//! @addtogroup rp_sports
8+
//! @{
9+
10+
/**
11+
* @brief Sports Pack Mii body manager
12+
*/
13+
class RPSportsBodyManager : public IRPSysKokeshiBodyManager {
14+
public:
15+
/**
16+
* @brief Constructor
17+
*/
18+
RPSportsBodyManager();
19+
20+
/**
21+
* @brief Destructor
22+
*/
23+
virtual ~RPSportsBodyManager(); // at 0x2C
24+
25+
virtual u16 GetFriendClothesStartIndex(); // at 0x8
26+
virtual u16 GetFriendClothesIndexRange(); // at 0xC
27+
28+
virtual const char* GetBodyFileName(u16 bodyType,
29+
RFLSex sex); // at 0x10
30+
31+
virtual u16 GetBodyModelIndex(u16 bodyType, RFLSex sex, u32 height,
32+
u32 build); // at 0x14
33+
34+
virtual const char* GetClothesFileName(); // at 0x18
35+
36+
virtual void GetClothesName(u16 clothesType, RFLSex sex,
37+
const char** ppNameA,
38+
const char** ppNameB); // at 0x1C
39+
40+
virtual void GetHeadJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
41+
EGG::Matrix34f* pMtx); // at 0x20
42+
43+
virtual void GetLeftHandJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
44+
EGG::Matrix34f* pMtx); // at 0x24
45+
virtual void GetRightHandJointMtx(u16 bodyType, RPGrpModel* pBodyModel,
46+
EGG::Matrix34f* pMtx); // at 0x28
47+
48+
private:
49+
// . . .
50+
};
51+
52+
//! @}
53+
54+
#endif

0 commit comments

Comments
 (0)