mirror of
https://github.com/zeldaret/tp
synced 2026-08-16 05:09:22 -04:00
copy dolsdk2004 to tp / b_bh + e_mb done (#2299)
* move dolsdk2004 over * cleanup some temp work * finish and cleanup gf * b_bh done * d_a_e_mb done
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_HTABLE_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_HTABLE_H_
|
||||
|
||||
#include <charPipeline/structures/List.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef u16 (DSHashFunc)(Ptr);
|
||||
|
||||
typedef struct {
|
||||
DSList* table;
|
||||
u16 tableSize;
|
||||
DSHashFunc* hash;
|
||||
} DSHashTable;
|
||||
|
||||
void DSInitHTable(DSHashTable* hTable, u16 size, DSList* listArray, DSHashFunc* hashFunc, Ptr obj, DSLinkPtr link);
|
||||
void DSInsertHTableObj(DSHashTable* hTable, Ptr obj);
|
||||
void DSHTableToList(DSHashTable* hTable, DSList* list);
|
||||
void* DSNextHTableObj(DSHashTable* hTable, Ptr obj);
|
||||
s32 DSHTableIndex(DSHashTable* hTable, Ptr obj);
|
||||
void* DSHTableHead(DSHashTable* hTable, s32 index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_LIST_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_LIST_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
Ptr Prev;
|
||||
Ptr Next;
|
||||
} DSLink, *DSLinkPtr;
|
||||
|
||||
typedef struct {
|
||||
u32 Offset;
|
||||
Ptr Head;
|
||||
Ptr Tail;
|
||||
} DSList, *DSListPtr;
|
||||
|
||||
void DSInitList(DSListPtr list, Ptr obj, DSLinkPtr link);
|
||||
void DSInsertListObject(DSListPtr list, Ptr cursor, Ptr obj);
|
||||
void DSRemoveListObject(DSListPtr list, Ptr obj);
|
||||
void DSAttachList(DSListPtr baseList, DSListPtr attachList);
|
||||
void* DSNextListObj(DSListPtr list, Ptr obj);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_TREE_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_TREE_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
Ptr Prev;
|
||||
Ptr Next;
|
||||
Ptr Parent;
|
||||
Ptr Children;
|
||||
} DSBranch, *DSBranchPtr;
|
||||
|
||||
typedef struct {
|
||||
u32 Offset;
|
||||
Ptr Root;
|
||||
} DSTree, *DSTreePtr;
|
||||
|
||||
void DSExtractBranch(DSTreePtr tree, Ptr obj);
|
||||
void DSInitTree(DSTreePtr tree, Ptr obj, DSBranchPtr branch);
|
||||
void DSInsertBranchBelow(DSTreePtr tree, Ptr cursor, Ptr obj);
|
||||
void DSInsertBranchBeside(DSTreePtr tree, Ptr cursor, Ptr obj);
|
||||
void DSRemoveBranch(DSTreePtr tree, Ptr obj);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_DOLPHINSTRING_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_DOLPHINSTRING_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
u8 Strcat(char* str1, char* str2, char* dst);
|
||||
void Strcpy(char* dst, char* src);
|
||||
s8 Strcmp(char* str1, char* str2);
|
||||
u32 Strlen(char* str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user