Decompile HioMgr.cpp

This commit is contained in:
SwareJonge 2023-01-07 23:37:36 +01:00
parent 246c17abf4
commit 8d9dd168a6
7 changed files with 106 additions and 13 deletions

View File

@ -47,6 +47,10 @@ Kameda/Scene.cpp:
.data: [0x80394b70, 0x80394b88]
.sdata2: [0x80418e78, 0x80418e90]
Kaneshige/HioMgr.cpp:
.text: [0x801a6960, 0x801a6c30]
.data: [0x80395bb8, 0x80395bc8]
Kaneshige/KartInfo.cpp:
.text: [0x801a8844, 0x801a8f54]
.rodata: [0x803770f8, 0x80377378]

View File

@ -185,6 +185,10 @@ global:
# JKRAram.cpp
0x8007949c: create__7JKRAramFUlUllll
# JKRDisposer.cpp
0x8007ecdc: __dt__11JKRDisposerFv
0x8007ec74: __ct__11JKRDisposerFv
# JKRExpHeap.cpp
0x80081c4c: create__10JKRExpHeapFUlP7JKRHeapb
0x80081d18: create__10JKRExpHeapFPvUlP7JKRHeapb
@ -355,6 +359,23 @@ global:
0x801a0064: getAddThickness__Q27CrsData6GroundCFv
0x801a11f0: getKartNumber__8RaceInfoCFv
# ExModel.cpp
0x801a40fc: __ct__10JSUPtrListFv
# HioMgr.cpp
0x801a6960: __ct__7HioNodeFPCcP13JORReflexibleUlUl
0x801a69c8: __dt__17JSUTree<7HioNode>Fv
0x801a6a24: __dt__17JSUList<7HioNode>Fv
0x801a6a70: __dt__17JSULink<7HioNode>Fv
0x801a6abc: __ct__17JSUTree<7HioNode>FP7HioNode
0x801a6afc: __ct__17JSULink<7HioNode>FP7HioNode
0x801a6b2c: __ct__17JSUList<7HioNode>Fv
0x801a6b5c: __dt__7HioNodeFv
0x801a6bdc: removeChild__17JSUTree<7HioNode>FP17JSUTree<7HioNode>
0x801a6c08: remove__17JSUList<7HioNode>FP17JSULink<7HioNode>
0x801a6c28: getParent__17JSUTree<7HioNode>CFv
0x80395bb8: __vt__7HioNode KaneshigeM.a HioMgr.cpp
# KartLoader.cpp
0x801a808c: getExModelBody__10KartLoaderFv
@ -638,7 +659,6 @@ global:
0x804163d4: sAwardDebugCup__8RaceInfo
# SysDebug.cpp
0x801b0f94: __ct__Q28JUtility6TColorFUcUcUcUc
0x801b0fc4: getManager__10JUTDbPrintFv
0x801b0fcc: getRootHeap__7JKRHeapFv
@ -673,7 +693,7 @@ global:
0x804164b8: sSupervisorCreateNum__13GeoRabbitMark
0x804164bc: sSupervisor__13GeoRabbitMark
# RaceDirector.cpp
# RaceDirector.cpp
0x801c8a24: checkRaceEnd__12RaceDirectorFv
# RaceTime.cpp

View File

@ -0,0 +1,8 @@
#ifndef JOR_REFLEXIBLE_H
#define JOR_REFLEXIBLE_H
class JORReflexible {
};
#endif

View File

@ -32,21 +32,19 @@ public:
JSUPtrLink(void *);
~JSUPtrLink();
void *getObjectPtr() const { return mData; }
JSUPtrList *getList() const { return mPtrList; }
JSUPtrLink *getNext() const { return mNext; }
JSUPtrLink *getPrev() const { return mPrev; }
void *mData; // _0
JSUPtrList *mPtrList; // _4
JSUPtrLink *mPrev; // _8
JSUPtrLink *mNext; // _C
};
template<class T>
class JSULink : public JSUPtrLink {
public:
JSULink(void *pData) : JSUPtrLink(pData) {
}
~JSULink();
};
template <class T>
class JSULink; // friend class? i'm C++ noob
template<class T>
class JSUList : public JSUPtrList {
@ -55,11 +53,33 @@ public:
}
bool remove(JSULink<T> *link) { // is this even correct?
return JSUPtrList::remove(link);
}
JSUList(bool thing) : JSUPtrList(thing) {
}
};
template <class T>
class JSULink : public JSUPtrLink
{
public:
JSULink(void *pData) : JSUPtrLink(pData)
{
}
inline T *getObject() const { return (T *)getObjectPtr(); }
inline JSUList<T> *getList() const { return (JSUList<T> *)JSUPtrLink::getList(); } // fabricated
inline JSULink<T> *getNext() const { return (JSULink<T> *)JSUPtrLink::getNext(); }
inline JSULink<T> *getPrev() const { return (JSULink<T> *)JSUPtrLink::getPrev(); }
~JSULink() {
}
};
template <typename T>
class JSUTree : public JSUList<T>, public JSULink<T>
{
@ -69,7 +89,9 @@ public:
bool appendChild(JSUTree<T> *child) { return this->append(child); }
bool removeChild(JSUTree<T> *child) { return this->remove(child); }
bool removeChild(JSUTree<T> *child) {
return remove(child);
}
bool insertChild(JSUTree<T> *before, JSUTree<T> *child) { return this->insert(before, child); }
@ -87,7 +109,7 @@ public:
T *getObject() const { return (T *)this->getObjectPtr(); }
JSUTree<T> *getParent() const { return (JSUTree<T> *)this->getList(); }
JSUTree<T> *getParent() const { return (JSUTree<T> *)this->mPtrList; }
};
template <typename T>

View File

@ -0,0 +1,23 @@
#ifndef HIOMGR_H
#define HIOMGR_H
#include "JSystem/JORReflexible.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JSupport/JSUList.h"
#include "types.h"
class HioNode : JKRDisposer
{
public:
HioNode(const char *nodeName, JORReflexible *jor, u32 p3, u32 p4);
virtual ~HioNode();
private:
const char *mName;
JORReflexible *mReflexible;
u32 _20;
u32 _24;
JSUTree<HioNode> mTree;
};
#endif

16
src/Kaneshige/HioMgr.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "Kaneshige/HioMgr.h"
#include "types.h"
HioNode::HioNode(const char *nodeName, JORReflexible *jor, u32 p3, u32 p4) : mTree(this)
{
mName = nodeName;
mReflexible = jor;
_20 = p3;
_24 = p4;
}
HioNode::~HioNode() {
JSUTree<HioNode> *parent = mTree.getParent();
if(parent)
parent->removeChild(&mTree);
}