mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-03 11:00:16 -04:00
tag_allmato almost, swhit0 treesh swball done, misc cleanup (#2312)
* d_a_tag_allmato almost done * d_a_swhit0 done * some SSystem cleanup * treesh done * swball done, some other rel cleanup
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "SSystem/SComponent/c_list.h"
|
||||
#include "SSystem/SComponent/c_node.h"
|
||||
#include "dolphin/types.h"
|
||||
#include <dolphin/types.h>
|
||||
|
||||
/* 80265E64-80265E78 0014+00 s=1 e=0 z=0 None .text cLs_Init__FP15node_list_class */
|
||||
void cLs_Init(node_list_class* list) {
|
||||
@@ -17,15 +17,23 @@ void cLs_Init(node_list_class* list) {
|
||||
/* 80265E78-80265EFC 0084+00 s=1 e=4 z=0 None .text cLs_SingleCut__FP10node_class */
|
||||
int cLs_SingleCut(node_class* node) {
|
||||
node_list_class* list = (node_list_class*)node->mpData;
|
||||
|
||||
if (node == list->mpHead)
|
||||
list->mpHead = node->mpNextNode;
|
||||
if (node == list->mpTail)
|
||||
list->mpTail = node->mpPrevNode;
|
||||
|
||||
cNd_SingleCut(node);
|
||||
cNd_ClearObject(node);
|
||||
int newSize = list->mSize - 1;
|
||||
list->mSize = newSize;
|
||||
return newSize > 0;
|
||||
|
||||
int ret;
|
||||
if (--list->mSize > 0) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80265EFC-80265F70 0074+00 s=1 e=4 z=0 None .text
|
||||
@@ -49,13 +57,13 @@ int cLs_Insert(node_list_class* list, int idx, node_class* node) {
|
||||
node_class* pExisting = cNd_Order(list->mpHead, idx);
|
||||
if (pExisting == NULL) {
|
||||
return cLs_Addition(list, node);
|
||||
} else {
|
||||
cNd_SetObject(node, list);
|
||||
cNd_Insert(pExisting, node);
|
||||
list->mpHead = cNd_First(node);
|
||||
list->mSize = cNd_LengthOf(list->mpHead);
|
||||
return list->mSize;
|
||||
}
|
||||
|
||||
cNd_SetObject(node, list);
|
||||
cNd_Insert(pExisting, node);
|
||||
list->mpHead = cNd_First(node);
|
||||
list->mSize = cNd_LengthOf(list->mpHead);
|
||||
return list->mSize;
|
||||
}
|
||||
|
||||
/* 80265FF8-80266040 0048+00 s=0 e=1 z=0 None .text cLs_GetFirst__FP15node_list_class */
|
||||
@@ -64,12 +72,12 @@ node_class* cLs_GetFirst(node_list_class* list) {
|
||||
node_class* pHead = list->mpHead;
|
||||
cLs_SingleCut(pHead);
|
||||
return pHead;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* 80266040-80266060 0020+00 s=0 e=4 z=0 None .text cLs_Create__FP15node_list_class */
|
||||
void cLs_Create(node_list_class* list) {
|
||||
cLs_Init(list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user