Skip to content

Commit

Permalink
Match & link DynamicLink.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Sep 15, 2023
1 parent 5fb89c1 commit 2a2b9c2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion config/GZLE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8122,7 +8122,7 @@ __ct__20DynamicModuleControlFPCc = .text:0x802405BC; // type:function size:0x70
mountCallback__20DynamicModuleControlFPv = .text:0x8024062C; // type:function size:0x8C scope:global align:4
initialize__20DynamicModuleControlFv = .text:0x802406B8; // type:function size:0x38 scope:global align:4
callback__20DynamicModuleControlFPv = .text:0x802406F0; // type:function size:0x2C scope:global align:4
calcSum2__FPCUsUl = .text:0x8024071C; // type:function size:0x28 scope:global align:4
calcSum2__FPCUsUl = .text:0x8024071C; // type:function size:0x28 scope:local align:4
do_load__20DynamicModuleControlFv = .text:0x80240744; // type:function size:0x304 scope:global align:4
do_load_async__20DynamicModuleControlFv = .text:0x80240A48; // type:function size:0xC8 scope:global align:4
do_unload__20DynamicModuleControlFv = .text:0x80240B10; // type:function size:0x48 scope:global align:4
Expand Down
2 changes: 1 addition & 1 deletion config/GZLJ01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8056,7 +8056,7 @@ __ct__20DynamicModuleControlFPCc = .text:0x8023DD4C; // type:function size:0x70
mountCallback__20DynamicModuleControlFPv = .text:0x8023DDBC; // type:function size:0x8C scope:global align:4
initialize__20DynamicModuleControlFv = .text:0x8023DE48; // type:function size:0x38 scope:global align:4
callback__20DynamicModuleControlFPv = .text:0x8023DE80; // type:function size:0x2C scope:global align:4
calcSum2__FPCUsUl = .text:0x8023DEAC; // type:function size:0x28 scope:global align:4
calcSum2__FPCUsUl = .text:0x8023DEAC; // type:function size:0x28 scope:local align:4
do_load__20DynamicModuleControlFv = .text:0x8023DED4; // type:function size:0x304 scope:global align:4
do_load_async__20DynamicModuleControlFv = .text:0x8023E1D8; // type:function size:0xC8 scope:global align:4
do_unload__20DynamicModuleControlFv = .text:0x8023E2A0; // type:function size:0x48 scope:global align:4
Expand Down
2 changes: 1 addition & 1 deletion config/GZLP01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8105,7 +8105,7 @@ __ct__20DynamicModuleControlFPCc = .text:0x8024575C; // type:function size:0x70
mountCallback__20DynamicModuleControlFPv = .text:0x802457CC; // type:function size:0x8C scope:global align:4
initialize__20DynamicModuleControlFv = .text:0x80245858; // type:function size:0x38 scope:global align:4
callback__20DynamicModuleControlFPv = .text:0x80245890; // type:function size:0x2C scope:global align:4
calcSum2__FPCUsUl = .text:0x802458BC; // type:function size:0x28 scope:global align:4
calcSum2__FPCUsUl = .text:0x802458BC; // type:function size:0x28 scope:local align:4
do_load__20DynamicModuleControlFv = .text:0x802458E4; // type:function size:0x304 scope:global align:4
do_load_async__20DynamicModuleControlFv = .text:0x80245BE8; // type:function size:0xC8 scope:global align:4
do_unload__20DynamicModuleControlFv = .text:0x80245CB0; // type:function size:0x48 scope:global align:4
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def ActorRel(status, rel_name):
Object(NonMatching, "d/actor/d_a_itembase.cpp"),

# ?
Object(NonMatching, "DynamicLink.cpp"),
Object(Matching, "DynamicLink.cpp"),
],
},
Rel(Matching, "f_pc_profile_lst", "f_pc/f_pc_profile_lst.cpp"),
Expand Down
14 changes: 7 additions & 7 deletions include/JSystem/JKernel/JKRArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inline u16 read_big_endian_u16(void* ptr) {
return ((u16)uptr[0] << 8) | ((u16)uptr[1]);
}

inline u32 JKRDecompExpandSize(u8 * pBuf) {
inline u32 JKRDecompExpandSize(u8* pBuf) {
return (pBuf[4] << 0x18) | (pBuf[5] << 0x10) | (pBuf[6] << 8) | pBuf[7];
}

Expand Down Expand Up @@ -151,10 +151,12 @@ class JKRArchive : public JKRFileLoader {
/* vt[09] */ virtual void removeResourceAll(void); /* override */
/* vt[10] */ virtual bool removeResource(void*); /* override */
/* vt[11] */ virtual bool detachResource(void*); /* override */
/* vt[12] */ virtual u32 getResSize(const void*) const; /* override */
/* vt[12] */ virtual u32 getResSize(const void* resource) const; /* override */
/* vt[13] */ virtual u32 countFile(const char*) const; /* override */
/* vt[14] */ virtual JKRFileFinder* getFirstFile(const char*) const; /* override */
/* vt[15] */ virtual u32 getExpandedResSize(const void*) const;
/* vt[15] */ virtual u32 getExpandedResSize(const void* resource) const {
return getResSize(resource);
}
/* vt[16] */ virtual void* fetchResource(SDIFileEntry*, u32*) = 0;
/* vt[17] */ virtual void* fetchResource(void*, u32, SDIFileEntry*, u32*) = 0;
/* vt[18] */ virtual void setExpandSize(SDIFileEntry*, u32);
Expand All @@ -163,9 +165,7 @@ class JKRArchive : public JKRFileLoader {
u32 countFile() const { return mArcInfoBlock->num_file_entries; }
s32 countDirectory() const { return mArcInfoBlock->num_nodes; }
u8 getMountMode() const { return mMountMode; }
bool isFileEntry(u32 param_0) {
return getFileAttribute(param_0) & 1;
}
bool isFileEntry(u32 param_0) { return getFileAttribute(param_0) & 1; }

public:
/* 0x00 */ // vtable
Expand Down Expand Up @@ -224,4 +224,4 @@ inline void* JKRGetTypeResource(u32 tag, const char* name, JKRArchive* arc) {
return JKRArchive::getGlbResource(tag, name, arc);
}

#endif
#endif
7 changes: 1 addition & 6 deletions src/DynamicLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@
#include "MSL_C/stdio.h"
#include "REL/executor.h"
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
#include "dolphin/os/OS.h"

// TODO
// #include "m_Do/m_Do_ext.h"
JKRExpHeap* mDoExt_getArchiveHeap();
extern JKRExpHeap* archiveHeap;
// end m_Do_ext.h

DynamicModuleControlBase* DynamicModuleControlBase::mFirst;
DynamicModuleControlBase* DynamicModuleControlBase::mLast;

Expand Down

0 comments on commit 2a2b9c2

Please sign in to comment.