run clang-format

This commit is contained in:
Pheenoh
2020-12-26 11:31:49 -05:00
parent 64a6a97b7b
commit 4c504d078d
180 changed files with 4083 additions and 4253 deletions
+2 -3
View File
@@ -23,11 +23,10 @@ bool cBgW_CheckBRoof(float a1) {
return a1 < lbl_804550EC;
}
bool cBgW_CheckBWall(float a1)
{
bool cBgW_CheckBWall(float a1) {
if (!cBgW_CheckBGround(a1) && !cBgW_CheckBRoof(a1))
return true;
return false;
}
+1 -3
View File
@@ -10,8 +10,7 @@ extern counter_class lbl_80430CD8;
extern "C" {
void cCt_Counter(int resetCounter1)
{
void cCt_Counter(int resetCounter1) {
if (resetCounter1 == 1) {
lbl_80430CD8.mCounter1 = 0;
} else {
@@ -20,5 +19,4 @@ void cCt_Counter(int resetCounter1)
lbl_80430CD8.mCounter0++;
}
};
+10 -17
View File
@@ -1,19 +1,17 @@
#include "global.h"
#include "SComponent/c_list.h"
#include "global.h"
extern "C" {
void cLs_Init(node_list_class *pList)
{
void cLs_Init(node_list_class* pList) {
pList->mpHead = NULL;
pList->mpTail = NULL;
pList->mSize = 0;
}
int cLs_SingleCut(node_class *pNode)
{
node_list_class *pList = (node_list_class *) pNode->mpData;
int cLs_SingleCut(node_class* pNode) {
node_list_class* pList = (node_list_class*)pNode->mpData;
if (pNode == pList->mpHead)
pList->mpHead = pNode->mpNextNode;
if (pNode == pList->mpTail)
@@ -25,8 +23,7 @@ int cLs_SingleCut(node_class *pNode)
return newSize > 0;
}
int cLs_Addition(node_list_class *pList, node_class *pNode)
{
int cLs_Addition(node_list_class* pList, node_class* pNode) {
if (pList->mpTail == NULL) {
pList->mpHead = pNode;
} else {
@@ -39,9 +36,8 @@ int cLs_Addition(node_list_class *pList, node_class *pNode)
return pList->mSize;
}
int cLs_Insert(node_list_class *pList, int idx, node_class *pNode)
{
node_class *pExisting = cNd_Order(pList->mpHead, idx);
int cLs_Insert(node_list_class* pList, int idx, node_class* pNode) {
node_class* pExisting = cNd_Order(pList->mpHead, idx);
if (pExisting == NULL) {
return cLs_Addition(pList, pNode);
} else {
@@ -53,10 +49,9 @@ int cLs_Insert(node_list_class *pList, int idx, node_class *pNode)
}
}
node_class * cLs_GetFirst(node_list_class *pList)
{
node_class* cLs_GetFirst(node_list_class* pList) {
if (pList->mSize != 0) {
node_class *pHead = pList->mpHead;
node_class* pHead = pList->mpHead;
cLs_SingleCut(pHead);
return pHead;
} else {
@@ -64,9 +59,7 @@ node_class * cLs_GetFirst(node_list_class *pList)
}
}
void cLs_Create(node_list_class *pList)
{
void cLs_Create(node_list_class* pList) {
cLs_Init(pList);
}
};
+3 -6
View File
@@ -1,23 +1,20 @@
#include "global.h"
#include "SComponent/c_list_iter.h"
#include "global.h"
extern "C" {
int cLsIt_Method(node_list_class *pList, cNdIt_MethodFunc pMethod, void *pUserData)
{
int cLsIt_Method(node_list_class* pList, cNdIt_MethodFunc pMethod, void* pUserData) {
if (pList->mSize > 0)
return cNdIt_Method(pList->mpHead, pMethod, pUserData);
else
return 1;
}
void * cLsIt_Judge(node_list_class *pList, cNdIt_JudgeFunc pJudge, void *pUserData)
{
void* cLsIt_Judge(node_list_class* pList, cNdIt_JudgeFunc pJudge, void* pUserData) {
if (pList->mSize > 0)
return cNdIt_Judge(pList->mpHead, pJudge, pUserData);
else
return NULL;
}
};
+21 -35
View File
@@ -1,20 +1,18 @@
#include "global.h"
#include "SComponent/c_node.h"
#include "global.h"
extern "C" {
#define NODE_GET_PREV(pNode) (pNode ? pNode->mpPrevNode : NULL)
#define NODE_GET_NEXT(pNode) (pNode ? pNode->mpNextNode : NULL)
void cNd_Join(node_class *pA, node_class *pB)
{
void cNd_Join(node_class* pA, node_class* pB) {
pA->mpNextNode = pB;
pB->mpPrevNode = pA;
}
int cNd_LengthOf(node_class *pNode)
{
int cNd_LengthOf(node_class* pNode) {
int count = 0;
while (pNode) {
count++;
@@ -23,9 +21,8 @@ int cNd_LengthOf(node_class *pNode)
return count;
}
node_class * cNd_First(node_class *pNode)
{
node_class *pRet = NULL;
node_class* cNd_First(node_class* pNode) {
node_class* pRet = NULL;
while (pNode) {
pRet = pNode;
pNode = NODE_GET_PREV(pNode);
@@ -33,9 +30,8 @@ node_class * cNd_First(node_class *pNode)
return pRet;
}
node_class * cNd_Last(node_class *pNode)
{
node_class *pRet = NULL;
node_class* cNd_Last(node_class* pNode) {
node_class* pRet = NULL;
while (pNode) {
pRet = pNode;
pNode = NODE_GET_NEXT(pNode);
@@ -43,9 +39,8 @@ node_class * cNd_Last(node_class *pNode)
return pRet;
}
node_class * cNd_Order(node_class *pNode, int idx)
{
node_class *pRet = NULL;
node_class* cNd_Order(node_class* pNode, int idx) {
node_class* pRet = NULL;
int i = 0;
while (i < idx && pNode) {
pRet = pNode;
@@ -57,10 +52,9 @@ node_class * cNd_Order(node_class *pNode, int idx)
return NULL;
}
void cNd_SingleCut(node_class *pNode)
{
node_class *pPrev = pNode->mpPrevNode;
node_class *pNext = pNode->mpNextNode;
void cNd_SingleCut(node_class* pNode) {
node_class* pPrev = pNode->mpPrevNode;
node_class* pNext = pNode->mpNextNode;
if (pPrev)
pPrev->mpNextNode = pNode->mpNextNode;
@@ -70,22 +64,19 @@ void cNd_SingleCut(node_class *pNode)
pNode->mpNextNode = NULL;
}
void cNd_Cut(node_class *pNode)
{
void cNd_Cut(node_class* pNode) {
if (pNode->mpPrevNode)
pNode->mpPrevNode->mpNextNode = NULL;
pNode->mpPrevNode = NULL;
}
void cNd_Addition(node_class *pA, node_class *pB)
{
node_class *pLast = cNd_Last(pA);
void cNd_Addition(node_class* pA, node_class* pB) {
node_class* pLast = cNd_Last(pA);
cNd_Join(pLast, pB);
}
void cNd_Insert(node_class *pA, node_class *pB)
{
node_class *pPrev = pA->mpPrevNode;
void cNd_Insert(node_class* pA, node_class* pB) {
node_class* pPrev = pA->mpPrevNode;
if (pPrev == NULL) {
cNd_Addition(pB, pA);
} else {
@@ -95,31 +86,26 @@ void cNd_Insert(node_class *pA, node_class *pB)
}
}
void cNd_SetObject(node_class *pNode, void *pData)
{
void cNd_SetObject(node_class* pNode, void* pData) {
while (pNode) {
pNode->mpData = pData;
pNode = NODE_GET_NEXT(pNode);
}
}
void cNd_ClearObject(node_class *pNode)
{
void cNd_ClearObject(node_class* pNode) {
cNd_SetObject(pNode, NULL);
}
void cNd_ForcedClear(node_class *pNode)
{
void cNd_ForcedClear(node_class* pNode) {
pNode->mpPrevNode = NULL;
pNode->mpNextNode = NULL;
pNode->mpData = NULL;
}
void cNd_Create(node_class *pNode, void *pData)
{
void cNd_Create(node_class* pNode, void* pData) {
pNode->mpPrevNode = NULL;
pNode->mpNextNode = NULL;
pNode->mpData = pData;
}
};
+6 -9
View File
@@ -1,16 +1,15 @@
#include "global.h"
#include "SComponent/c_node_iter.h"
#include "global.h"
extern "C" {
#define NODE_GET_PREV(pNode) (pNode ? pNode->mpPrevNode : NULL)
#define NODE_GET_NEXT(pNode) (pNode ? pNode->mpNextNode : NULL)
int cNdIt_Method(node_class *pNode, cNdIt_MethodFunc pMethod, void *pUserData)
{
int cNdIt_Method(node_class* pNode, cNdIt_MethodFunc pMethod, void* pUserData) {
int ret = 1;
node_class *pNext = NODE_GET_NEXT(pNode);
node_class* pNext = NODE_GET_NEXT(pNode);
while (pNode) {
int methodRet = pMethod(pNode, pUserData);
@@ -23,12 +22,11 @@ int cNdIt_Method(node_class *pNode, cNdIt_MethodFunc pMethod, void *pUserData)
return ret;
}
void * cNdIt_Judge(node_class *pNode, cNdIt_JudgeFunc pJudge, void *pUserData)
{
node_class *pNext = NODE_GET_NEXT(pNode);
void* cNdIt_Judge(node_class* pNode, cNdIt_JudgeFunc pJudge, void* pUserData) {
node_class* pNext = NODE_GET_NEXT(pNode);
while (pNode) {
void *pJudgeRet = pJudge(pNode, pUserData);
void* pJudgeRet = pJudge(pNode, pUserData);
if (pJudgeRet != NULL)
return pJudgeRet;
pNode = pNext;
@@ -37,5 +35,4 @@ void * cNdIt_Judge(node_class *pNode, cNdIt_JudgeFunc pJudge, void *pUserData)
return NULL;
}
};
+137 -109
View File
@@ -1,33 +1,28 @@
#include "global.h"
#include "SComponent/c_phase.h"
#include "global.h"
void cPhs_Reset(request_of_phase_process_class *pPhase)
{
void cPhs_Reset(request_of_phase_process_class* pPhase) {
pPhase->mPhaseStep = 0;
}
void cPhs_Set(request_of_phase_process_class *pPhase, cPhs__Handler *pHandlerTable)
{
void cPhs_Set(request_of_phase_process_class* pPhase, cPhs__Handler* pHandlerTable) {
pPhase->mpHandlerTable = pHandlerTable;
pPhase->mPhaseStep = 0;
}
void cPhs_UnCompleate(request_of_phase_process_class *pPhase)
{
void cPhs_UnCompleate(request_of_phase_process_class* pPhase) {
pPhase->mpHandlerTable = NULL;
cPhs_Reset(pPhase);
}
int cPhs_Compleate(request_of_phase_process_class *pPhase)
{
int cPhs_Compleate(request_of_phase_process_class* pPhase) {
pPhase->mpHandlerTable = NULL;
return cPhs_COMPLEATE_e;
}
#if NON_MATCHING
int cPhs_Next(request_of_phase_process_class *pPhase)
{
int cPhs_Next(request_of_phase_process_class* pPhase) {
// flow control
if (pPhase->mpHandlerTable != NULL) {
@@ -42,44 +37,57 @@ int cPhs_Next(request_of_phase_process_class *pPhase)
return cPhs_COMPLEATE_e;
}
#else
asm int cPhs_Next(request_of_phase_process_class *pPhase)
{
asm int cPhs_Next(request_of_phase_process_class* pPhase) {
nofralloc
/* 80266678 002635B8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8026667C 002635BC 7C 08 02 A6 */ mflr r0
/* 80266680 002635C0 90 01 00 14 */ stw r0, 0x14(r1)
/* 80266684 002635C4 80 A3 00 00 */ lwz r5, 0(r3)
/* 80266688 002635C8 28 05 00 00 */ cmplwi r5, 0
/* 8026668C 002635CC 41 82 00 38 */ beq lbl_802666C4
/* 80266690 002635D0 80 83 00 04 */ lwz r4, 4(r3)
/* 80266694 002635D4 38 04 00 01 */ addi r0, r4, 1
/* 80266698 002635D8 90 03 00 04 */ stw r0, 4(r3)
/* 8026669C 002635DC 80 03 00 04 */ lwz r0, 4(r3)
/* 802666A0 002635E0 54 00 10 3A */ slwi r0, r0, 2
/* 802666A4 002635E4 7C 05 00 2E */ lwzx r0, r5, r0
/* 802666A8 002635E8 28 00 00 00 */ cmplwi r0, 0
/* 802666AC 002635EC 41 82 00 08 */ beq lbl_802666B4
/* 802666B0 002635F0 40 82 00 0C */ bne lbl_802666BC
lbl_802666B4:
/* 802666B4 002635F4 4B FF FF B5 */ bl cPhs_Compleate
/* 802666B8 002635F8 48 00 00 10 */ b lbl_802666C8
lbl_802666BC:
/* 802666BC 002635FC 38 60 00 01 */ li r3, 1
/* 802666C0 00263600 48 00 00 08 */ b lbl_802666C8
lbl_802666C4:
/* 802666C4 00263604 38 60 00 04 */ li r3, 4
lbl_802666C8:
/* 802666C8 00263608 80 01 00 14 */ lwz r0, 0x14(r1)
/* 802666CC 0026360C 7C 08 03 A6 */ mtlr r0
/* 802666D0 00263610 38 21 00 10 */ addi r1, r1, 0x10
/* 802666D4 00263614 4E 80 00 20 */ blr
/* 80266678 002635B8 94 21 FF F0 */ stwu r1,
-0x10(r1)
/* 8026667C 002635BC 7C 08 02 A6 */ mflr r0
/* 80266680 002635C0 90 01 00 14 */ stw r0,
0x14(r1)
/* 80266684 002635C4 80 A3 00 00 */ lwz r5,
0(r3)
/* 80266688 002635C8 28 05 00 00 */ cmplwi r5,
0
/* 8026668C 002635CC 41 82 00 38 */ beq lbl_802666C4
/* 80266690 002635D0 80 83 00 04 */ lwz r4,
4(r3)
/* 80266694 002635D4 38 04 00 01 */ addi r0,
r4,
1
/* 80266698 002635D8 90 03 00 04 */ stw r0,
4(r3)
/* 8026669C 002635DC 80 03 00 04 */ lwz r0,
4(r3)
/* 802666A0 002635E0 54 00 10 3A */ slwi r0,
r0,
2
/* 802666A4 002635E4 7C 05 00 2E */ lwzx r0,
r5,
r0
/* 802666A8 002635E8 28 00 00 00 */ cmplwi r0,
0
/* 802666AC 002635EC 41 82 00 08 */ beq lbl_802666B4
/* 802666B0 002635F0 40 82 00 0C */ bne lbl_802666BC lbl_802666B4 :
/* 802666B4 002635F4 4B FF FF B5 */ bl cPhs_Compleate
/* 802666B8 002635F8 48 00 00 10 */ b lbl_802666C8 lbl_802666BC :
/* 802666BC 002635FC 38 60 00 01 */ li r3,
1
/* 802666C0 00263600 48 00 00 08 */ b lbl_802666C8 lbl_802666C4 :
/* 802666C4 00263604 38 60 00 04 */ li r3,
4 lbl_802666C8 :
/* 802666C8 00263608 80 01 00 14 */ lwz r0,
0x14(r1)
/* 802666CC 0026360C 7C 08 03 A6 */ mtlr r0
/* 802666D0 00263610 38 21 00 10 */ addi r1,
r1,
0x10
/* 802666D4 00263614 4E 80 00 20 */ blr
}
#endif
#if NON_MATCHING
int cPhs_Do(request_of_phase_process_class *pPhase, void *pUserData)
{
cPhs__Handler *pHandlerTable = pPhase->mpHandlerTable;
int cPhs_Do(request_of_phase_process_class* pPhase, void* pUserData) {
cPhs__Handler* pHandlerTable = pPhase->mpHandlerTable;
if (pHandlerTable != NULL) {
// the load of pUserData seems to be slightly scrambled..
int step = pPhase->mPhaseStep;
@@ -109,75 +117,95 @@ int cPhs_Do(request_of_phase_process_class *pPhase, void *pUserData)
}
}
#else
asm int cPhs_Do(request_of_phase_process_class *pPhase, void *pUserData)
{
asm int cPhs_Do(request_of_phase_process_class* pPhase, void* pUserData) {
nofralloc
/* 802666D8 00263618 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 802666DC 0026361C 7C 08 02 A6 */ mflr r0
/* 802666E0 00263620 90 01 00 14 */ stw r0, 0x14(r1)
/* 802666E4 00263624 93 E1 00 0C */ stw r31, 0xc(r1)
/* 802666E8 00263628 7C 7F 1B 78 */ mr r31, r3
/* 802666EC 0026362C 80 A3 00 00 */ lwz r5, 0(r3)
/* 802666F0 00263630 28 05 00 00 */ cmplwi r5, 0
/* 802666F4 00263634 41 82 00 A0 */ beq lbl_80266794
/* 802666F8 00263638 80 1F 00 04 */ lwz r0, 4(r31)
/* 802666FC 0026363C 54 00 10 3A */ slwi r0, r0, 2
/* 80266700 00263640 7C 83 23 78 */ mr r3, r4
/* 80266704 00263644 7D 85 00 2E */ lwzx r12, r5, r0
/* 80266708 00263648 7D 89 03 A6 */ mtctr r12
/* 8026670C 0026364C 4E 80 04 21 */ bctrl
/* 80266710 00263650 2C 03 00 03 */ cmpwi r3, 3
/* 80266714 00263654 41 82 00 5C */ beq lbl_80266770
/* 80266718 00263658 40 80 00 14 */ bge lbl_8026672C
/* 8026671C 0026365C 2C 03 00 01 */ cmpwi r3, 1
/* 80266720 00263660 41 82 00 1C */ beq lbl_8026673C
/* 80266724 00263664 40 80 00 24 */ bge lbl_80266748
/* 80266728 00263668 48 00 00 70 */ b lbl_80266798
lbl_8026672C:
/* 8026672C 0026366C 2C 03 00 05 */ cmpwi r3, 5
/* 80266730 00263670 41 82 00 50 */ beq lbl_80266780
/* 80266734 00263674 40 80 00 64 */ bge lbl_80266798
/* 80266738 00263678 48 00 00 2C */ b lbl_80266764
lbl_8026673C:
/* 8026673C 0026367C 7F E3 FB 78 */ mr r3, r31
/* 80266740 00263680 4B FF FF 39 */ bl cPhs_Next
/* 80266744 00263684 48 00 00 54 */ b lbl_80266798
lbl_80266748:
/* 80266748 00263688 7F E3 FB 78 */ mr r3, r31
/* 8026674C 0026368C 4B FF FF 2D */ bl cPhs_Next
/* 80266750 00263690 2C 03 00 01 */ cmpwi r3, 1
/* 80266754 00263694 38 60 00 04 */ li r3, 4
/* 80266758 00263698 40 82 00 40 */ bne lbl_80266798
/* 8026675C 0026369C 38 60 00 02 */ li r3, 2
/* 80266760 002636A0 48 00 00 38 */ b lbl_80266798
lbl_80266764:
/* 80266764 002636A4 7F E3 FB 78 */ mr r3, r31
/* 80266768 002636A8 4B FF FF 01 */ bl cPhs_Compleate
/* 8026676C 002636AC 48 00 00 2C */ b lbl_80266798
lbl_80266770:
/* 80266770 002636B0 7F E3 FB 78 */ mr r3, r31
/* 80266774 002636B4 4B FF FE CD */ bl cPhs_UnCompleate
/* 80266778 002636B8 38 60 00 03 */ li r3, 3
/* 8026677C 002636BC 48 00 00 1C */ b lbl_80266798
lbl_80266780:
/* 80266780 002636C0 7F E3 FB 78 */ mr r3, r31
/* 80266784 002636C4 4B FF FE BD */ bl cPhs_UnCompleate
/* 80266788 002636C8 38 60 00 05 */ li r3, 5
/* 8026678C 002636CC 48 00 00 0C */ b lbl_80266798
/* 80266790 002636D0 48 00 00 08 */ b lbl_80266798
lbl_80266794:
/* 80266794 002636D4 4B FF FE D5 */ bl cPhs_Compleate
lbl_80266798:
/* 80266798 002636D8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8026679C 002636DC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 802667A0 002636E0 7C 08 03 A6 */ mtlr r0
/* 802667A4 002636E4 38 21 00 10 */ addi r1, r1, 0x10
/* 802667A8 002636E8 4E 80 00 20 */ blr
/* 802666D8 00263618 94 21 FF F0 */ stwu r1,
-0x10(r1)
/* 802666DC 0026361C 7C 08 02 A6 */ mflr r0
/* 802666E0 00263620 90 01 00 14 */ stw r0,
0x14(r1)
/* 802666E4 00263624 93 E1 00 0C */ stw r31,
0xc(r1)
/* 802666E8 00263628 7C 7F 1B 78 */ mr r31,
r3
/* 802666EC 0026362C 80 A3 00 00 */ lwz r5,
0(r3)
/* 802666F0 00263630 28 05 00 00 */ cmplwi r5,
0
/* 802666F4 00263634 41 82 00 A0 */ beq lbl_80266794
/* 802666F8 00263638 80 1F 00 04 */ lwz r0,
4(r31)
/* 802666FC 0026363C 54 00 10 3A */ slwi r0,
r0,
2
/* 80266700 00263640 7C 83 23 78 */ mr r3,
r4
/* 80266704 00263644 7D 85 00 2E */ lwzx r12,
r5,
r0
/* 80266708 00263648 7D 89 03 A6 */ mtctr r12
/* 8026670C 0026364C 4E 80 04 21 */ bctrl
/* 80266710 00263650 2C 03 00 03 */ cmpwi r3,
3
/* 80266714 00263654 41 82 00 5C */ beq lbl_80266770
/* 80266718 00263658 40 80 00 14 */ bge lbl_8026672C
/* 8026671C 0026365C 2C 03 00 01 */ cmpwi r3,
1
/* 80266720 00263660 41 82 00 1C */ beq lbl_8026673C
/* 80266724 00263664 40 80 00 24 */ bge lbl_80266748
/* 80266728 00263668 48 00 00 70 */ b lbl_80266798 lbl_8026672C :
/* 8026672C 0026366C 2C 03 00 05 */ cmpwi r3,
5
/* 80266730 00263670 41 82 00 50 */ beq lbl_80266780
/* 80266734 00263674 40 80 00 64 */ bge lbl_80266798
/* 80266738 00263678 48 00 00 2C */ b lbl_80266764 lbl_8026673C :
/* 8026673C 0026367C 7F E3 FB 78 */ mr r3,
r31
/* 80266740 00263680 4B FF FF 39 */ bl cPhs_Next
/* 80266744 00263684 48 00 00 54 */ b lbl_80266798 lbl_80266748 :
/* 80266748 00263688 7F E3 FB 78 */ mr r3,
r31
/* 8026674C 0026368C 4B FF FF 2D */ bl cPhs_Next
/* 80266750 00263690 2C 03 00 01 */ cmpwi r3,
1
/* 80266754 00263694 38 60 00 04 */ li r3,
4
/* 80266758 00263698 40 82 00 40 */ bne lbl_80266798
/* 8026675C 0026369C 38 60 00 02 */ li r3,
2
/* 80266760 002636A0 48 00 00 38 */ b lbl_80266798 lbl_80266764 :
/* 80266764 002636A4 7F E3 FB 78 */ mr r3,
r31
/* 80266768 002636A8 4B FF FF 01 */ bl cPhs_Compleate
/* 8026676C 002636AC 48 00 00 2C */ b lbl_80266798 lbl_80266770 :
/* 80266770 002636B0 7F E3 FB 78 */ mr r3,
r31
/* 80266774 002636B4 4B FF FE CD */ bl cPhs_UnCompleate
/* 80266778 002636B8 38 60 00 03 */ li r3,
3
/* 8026677C 002636BC 48 00 00 1C */ b lbl_80266798 lbl_80266780 :
/* 80266780 002636C0 7F E3 FB 78 */ mr r3,
r31
/* 80266784 002636C4 4B FF FE BD */ bl cPhs_UnCompleate
/* 80266788 002636C8 38 60 00 05 */ li r3,
5
/* 8026678C 002636CC 48 00 00 0C */ b lbl_80266798
/* 80266790 002636D0 48 00 00 08 */ b lbl_80266798 lbl_80266794 :
/* 80266794 002636D4 4B FF FE D5 */ bl cPhs_Compleate lbl_80266798 :
/* 80266798 002636D8 83 E1 00 0C */ lwz r31,
0xc(r1)
/* 8026679C 002636DC 80 01 00 14 */ lwz r0,
0x14(r1)
/* 802667A0 002636E0 7C 08 03 A6 */ mtlr r0
/* 802667A4 002636E4 38 21 00 10 */ addi r1,
r1,
0x10
/* 802667A8 002636E8 4E 80 00 20 */ blr
}
#endif
int cPhs_Handler(request_of_phase_process_class *pPhase, cPhs__Handler *pHandlerTable, void *pUserData)
{
int cPhs_Handler(request_of_phase_process_class* pPhase, cPhs__Handler* pHandlerTable,
void* pUserData) {
pPhase->mpHandlerTable = pHandlerTable;
return cPhs_Do(pPhase, pUserData);
}
+9 -18
View File
@@ -4,13 +4,11 @@
extern "C" {
int cTg_IsUse(create_tag_class *pTag)
{
int cTg_IsUse(create_tag_class* pTag) {
return pTag->mbIsUse;
}
int cTg_SingleCutFromTree(create_tag_class *pTag)
{
int cTg_SingleCutFromTree(create_tag_class* pTag) {
if (pTag->mbIsUse == true) {
pTag->mbIsUse = false;
cTr_SingleCut(&pTag->mpNode);
@@ -20,8 +18,7 @@ int cTg_SingleCutFromTree(create_tag_class *pTag)
}
}
int cTg_AdditionToTree(node_lists_tree_class *pTree, int listIdx, create_tag_class *pTag)
{
int cTg_AdditionToTree(node_lists_tree_class* pTree, int listIdx, create_tag_class* pTag) {
if (!pTag->mbIsUse) {
int ret = cTr_Addition(pTree, listIdx, &pTag->mpNode);
if (ret) {
@@ -33,8 +30,7 @@ int cTg_AdditionToTree(node_lists_tree_class *pTree, int listIdx, create_tag_cla
return 0;
}
int cTg_InsertToTree(node_lists_tree_class *pTree, int listIdx, create_tag_class *pTag, int idx)
{
int cTg_InsertToTree(node_lists_tree_class* pTree, int listIdx, create_tag_class* pTag, int idx) {
if (!pTag->mbIsUse) {
int ret = cTr_Insert(pTree, listIdx, &pTag->mpNode, idx);
if (ret) {
@@ -46,9 +42,8 @@ int cTg_InsertToTree(node_lists_tree_class *pTree, int listIdx, create_tag_class
return 0;
}
node_class * cTg_GetFirst(node_list_class *pList)
{
create_tag_class *pTag = (create_tag_class *) cLs_GetFirst(pList);
node_class* cTg_GetFirst(node_list_class* pList) {
create_tag_class* pTag = (create_tag_class*)cLs_GetFirst(pList);
if (pTag != NULL) {
pTag->mbIsUse = false;
} else {
@@ -57,8 +52,7 @@ node_class * cTg_GetFirst(node_list_class *pList)
return &pTag->mpNode;
}
int cTg_SingleCut(create_tag_class *pTag)
{
int cTg_SingleCut(create_tag_class* pTag) {
if (pTag->mbIsUse == 1) {
pTag->mbIsUse = false;
cLs_SingleCut(&pTag->mpNode);
@@ -68,8 +62,7 @@ int cTg_SingleCut(create_tag_class *pTag)
return 0;
}
int cTg_Addition(node_list_class *pList, create_tag_class *pTag)
{
int cTg_Addition(node_list_class* pList, create_tag_class* pTag) {
if (!pTag->mbIsUse) {
int ret = cLs_Addition(pList, &pTag->mpNode);
if (ret) {
@@ -81,11 +74,9 @@ int cTg_Addition(node_list_class *pList, create_tag_class *pTag)
return 0;
}
void cTg_Create(create_tag_class *pTag, void *pData)
{
void cTg_Create(create_tag_class* pTag, void* pData) {
cNd_Create(&pTag->mpNode, NULL);
pTag->mpTagData = pData;
pTag->mbIsUse = false;
}
};
+5 -8
View File
@@ -1,17 +1,14 @@
#include "global.h"
#include "SComponent/c_tag_iter.h"
#include "global.h"
extern "C" {
int cTgIt_MethodCall(create_tag_class *pTag, method_filter *pMethodFilter)
{
return pMethodFilter->mpMethodFunc((node_class *) pTag->mpTagData, pMethodFilter->mpUserData);
int cTgIt_MethodCall(create_tag_class* pTag, method_filter* pMethodFilter) {
return pMethodFilter->mpMethodFunc((node_class*)pTag->mpTagData, pMethodFilter->mpUserData);
}
void * cTgIt_JudgeFilter(create_tag_class *pTag, judge_filter *pJudgeFilter)
{
return pJudgeFilter->mpJudgeFunc((node_class *) pTag->mpTagData, pJudgeFilter->mpUserData);
void* cTgIt_JudgeFilter(create_tag_class* pTag, judge_filter* pJudgeFilter) {
return pJudgeFilter->mpJudgeFunc((node_class*)pTag->mpTagData, pJudgeFilter->mpUserData);
}
};
+5 -10
View File
@@ -1,37 +1,32 @@
#include "global.h"
#include "SComponent/c_tree.h"
#include "global.h"
extern "C" {
int cTr_SingleCut(node_class *pNode)
{
int cTr_SingleCut(node_class* pNode) {
return cLs_SingleCut(pNode);
}
int cTr_Addition(node_lists_tree_class *pTree, int listIdx, node_class *pNode)
{
int cTr_Addition(node_lists_tree_class* pTree, int listIdx, node_class* pNode) {
if (listIdx >= pTree->mNumLists)
return 0;
return cLs_Addition(&pTree->mpLists[listIdx], pNode);
}
int cTr_Insert(node_lists_tree_class *pTree, int listIdx, node_class *pNode, int idx)
{
int cTr_Insert(node_lists_tree_class* pTree, int listIdx, node_class* pNode, int idx) {
if (listIdx >= pTree->mNumLists)
return 0;
return cLs_Insert(&pTree->mpLists[listIdx], idx, pNode);
}
void cTr_Create(node_lists_tree_class *pTree, node_list_class *pLists, int numLists)
{
void cTr_Create(node_lists_tree_class* pTree, node_list_class* pLists, int numLists) {
pTree->mpLists = pLists;
pTree->mNumLists = numLists;
while (numLists-- > 0)
cLs_Create(pLists++);
}
};
+7 -10
View File
@@ -1,13 +1,12 @@
#include "global.h"
#include "SComponent/c_list_iter.h"
#include "SComponent/c_tree_iter.h"
#include "SComponent/c_list_iter.h"
#include "global.h"
extern "C" {
int cTrIt_Method(node_lists_tree_class *pTree, cNdIt_MethodFunc pMethod, void *pUserData)
{
node_list_class *pList = pTree->mpLists;
int cTrIt_Method(node_lists_tree_class* pTree, cNdIt_MethodFunc pMethod, void* pUserData) {
node_list_class* pList = pTree->mpLists;
int i = pTree->mNumLists;
int ret = 1;
while (i-- > 0) {
@@ -18,16 +17,14 @@ int cTrIt_Method(node_lists_tree_class *pTree, cNdIt_MethodFunc pMethod, void *p
return ret;
}
void * cTrIt_Judge(node_lists_tree_class *pTree, cNdIt_JudgeFunc pJudge, void *pUserData)
{
node_list_class *pList = pTree->mpLists;
void* cTrIt_Judge(node_lists_tree_class* pTree, cNdIt_JudgeFunc pJudge, void* pUserData) {
node_list_class* pList = pTree->mpLists;
int i = pTree->mNumLists;
while (i-- > 0) {
void *pJudgeRet = cLsIt_Judge(pList++, pJudge, pUserData);
void* pJudgeRet = cLsIt_Judge(pList++, pJudge, pUserData);
if (pJudgeRet != NULL)
return pJudgeRet;
}
return NULL;
}
};