mirror of https://github.com/zeldaret/tp.git
153 lines
4.9 KiB
C++
153 lines
4.9 KiB
C++
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: linklist
|
|
//
|
|
|
|
#include "JSystem/JGadget/linklist.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
extern "C" void __dt__Q27JGadget13TNodeLinkListFv();
|
|
extern "C" void erase__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iterator();
|
|
extern "C" void
|
|
erase__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorQ37JGadget13TNodeLinkList8iterator();
|
|
extern "C" void
|
|
splice__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorRQ27JGadget13TNodeLinkListQ37JGadget13TNodeLinkList8iterator();
|
|
extern "C" void
|
|
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
|
|
extern "C" void Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
|
extern "C" void Remove__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
extern "C" void __dl__FPv();
|
|
extern "C" void _savegpr_27();
|
|
extern "C" void _savegpr_28();
|
|
extern "C" void _savegpr_29();
|
|
extern "C" void _restgpr_27();
|
|
extern "C" void _restgpr_28();
|
|
extern "C" void _restgpr_29();
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* 802DCA1C-802DCA58 2D735C 003C+00 1/1 6/6 0/0 .text __dt__Q27JGadget13TNodeLinkListFv
|
|
*/
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm JGadget::TNodeLinkList::~TNodeLinkList() {
|
|
nofralloc
|
|
#include "asm/JSystem/JGadget/linklist/__dt__Q27JGadget13TNodeLinkListFv.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 802DCA58-802DCAA0 2D7398 0048+00 0/0 2/2 0/0 .text
|
|
* erase__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iterator */
|
|
#ifdef NONMATCHING
|
|
JGadget::TNodeLinkList::iterator
|
|
JGadget::TNodeLinkList::erase(JGadget::TNodeLinkList::iterator it) {
|
|
TLinkListNode* node = it.node;
|
|
TLinkListNode* next = node->mNext;
|
|
iterator start(node);
|
|
iterator end(next);
|
|
return erase(start, end);
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm JGadget::TNodeLinkList::iterator
|
|
JGadget::TNodeLinkList::erase(JGadget::TNodeLinkList::iterator param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/JGadget/linklist/erase__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iterator.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|
|
|
|
/* 802DCAA0-802DCB08 2D73E0 0068+00 1/1 0/0 0/0 .text
|
|
* erase__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorQ37JGadget13TNodeLinkList8iterator
|
|
*/
|
|
JGadget::TNodeLinkList::iterator JGadget::TNodeLinkList::erase(iterator start, iterator end) {
|
|
TLinkListNode* startNode = start.node;
|
|
TLinkListNode* endNode = end.node;
|
|
while (startNode != endNode) {
|
|
TLinkListNode* nextNode = startNode->mNext;
|
|
Erase(startNode);
|
|
startNode = nextNode;
|
|
}
|
|
return iterator(end.node);
|
|
}
|
|
|
|
/* 802DCB08-802DCBA8 2D7448 00A0+00 1/1 0/0 0/0 .text
|
|
* splice__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorRQ27JGadget13TNodeLinkListQ37JGadget13TNodeLinkList8iterator
|
|
*/
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JGadget::TNodeLinkList::splice(JGadget::TNodeLinkList::iterator param_0,
|
|
JGadget::TNodeLinkList& param_1,
|
|
JGadget::TNodeLinkList::iterator param_2) {
|
|
nofralloc
|
|
#include "asm/JSystem/JGadget/linklist/func_802DCB08.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 802DCBA8-802DCBD4 2D74E8 002C+00 1/1 7/7 0/0 .text
|
|
* Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode */
|
|
JGadget::TNodeLinkList::iterator JGadget::TNodeLinkList::Insert(iterator it, TLinkListNode* node) {
|
|
TLinkListNode* itNode = it.node;
|
|
TLinkListNode* prev = itNode->mPrev;
|
|
node->mNext = itNode;
|
|
node->mPrev = prev;
|
|
itNode->mPrev = node;
|
|
prev->mNext = node;
|
|
this->count++;
|
|
return iterator(node);
|
|
}
|
|
|
|
/* 802DCBD4-802DCBF8 2D7514 0024+00 2/2 4/4 0/0 .text
|
|
* Erase__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode */
|
|
JGadget::TNodeLinkList::iterator JGadget::TNodeLinkList::Erase(TLinkListNode* node) {
|
|
TLinkListNode* next = node->mNext;
|
|
TLinkListNode* prev = node->mPrev;
|
|
next->mPrev = prev;
|
|
prev->mNext = next;
|
|
this->count--;
|
|
return iterator(next);
|
|
}
|
|
|
|
/* 802DCBF8-802DCCC8 2D7538 00D0+00 0/0 2/2 0/0 .text
|
|
* Remove__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode */
|
|
#ifdef NONMATCHING
|
|
void JGadget::TNodeLinkList::Remove(TLinkListNode* node) {
|
|
TNodeLinkList trashList;
|
|
TLinkListNode* myNode = this->ocObject_.mNext;
|
|
while (myNode != end().node) {
|
|
if (myNode == node) {
|
|
TLinkListNode* next = myNode->mNext;
|
|
trashList.splice(&trashList.ocObject_, *this, myNode);
|
|
myNode = next;
|
|
} else {
|
|
myNode = myNode->mNext;
|
|
}
|
|
}
|
|
}
|
|
#else
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void JGadget::TNodeLinkList::Remove(JGadget::TLinkListNode* param_0) {
|
|
nofralloc
|
|
#include "asm/JSystem/JGadget/linklist/Remove__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode.s"
|
|
}
|
|
#pragma pop
|
|
#endif
|