summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorAetias <144526980+AetiasHax@users.noreply.github.com>2026-04-16 23:10:14 +0200
committerGitHub <noreply@github.com>2026-04-16 23:10:14 +0200
commit38e9378f8f4bc465a09305e5021ead2eb89afb2b (patch)
treecb0c3cad894ce4d2fd74d111c090f8ca9698bb99 /libs
parent81f4540e6c2e4b80709f6837298b27929e6a4061 (diff)
Delink ActorShopItem.cpp (#147)
* Make types compatible with dsd-ghidra typesync * Update actors.md * Update docs * Delink ActorShopItem.cpp
Diffstat (limited to 'libs')
-rw-r--r--libs/c/include/assert.h2
-rw-r--r--libs/c/include/stdarg.h6
-rw-r--r--libs/c/include/stddef.h4
-rw-r--r--libs/nds/include/nds/g3d/g3d.h26
-rw-r--r--libs/nds/include/nds/g3d/sbc.h2
5 files changed, 24 insertions, 16 deletions
diff --git a/libs/c/include/assert.h b/libs/c/include/assert.h
index 22cdf7dc..6742f6bb 100644
--- a/libs/c/include/assert.h
+++ b/libs/c/include/assert.h
@@ -3,6 +3,6 @@
#define assert(condition) (void) ((condition) || __assert_failed(#condition, __FILE__, __FUNCTION__, __LINE__));
-void __assert_failed(char *condition, char *fileName, char *functionName, s32 lineNumber);
+void __assert_failed(char *condition, char *fileName, char *functionName, int lineNumber);
#endif
diff --git a/libs/c/include/stdarg.h b/libs/c/include/stdarg.h
index 4ace4037..795fbc8b 100644
--- a/libs/c/include/stdarg.h
+++ b/libs/c/include/stdarg.h
@@ -1,7 +1,9 @@
#ifndef _C_STDARG_H
#define _C_STDARG_H
+#ifdef __cplusplus
extern "C" {
+#endif
typedef char *va_list;
#define __std(ref) ::std::ref
@@ -11,7 +13,9 @@ typedef char *va_list;
#define va_start(ap, parm) ((ap) = __va_start(parm))
#define va_arg(ap, type) (*(type *) ((ap += __fourbytealign(sizeof(type))) - __fourbytealign(sizeof(type))))
#define va_end(ap) ((void) 0)
-}
+#ifdef __cplusplus
+} // extern "C"
+#endif
#if defined(__cplusplus)
namespace std {
diff --git a/libs/c/include/stddef.h b/libs/c/include/stddef.h
index eeed560c..50a16807 100644
--- a/libs/c/include/stddef.h
+++ b/libs/c/include/stddef.h
@@ -3,7 +3,11 @@
#define NULL 0
+#ifdef __MWERKS__
typedef unsigned long size_t;
+#else
+typedef unsigned int size_t;
+#endif
#define offsetof(type, member) ((size_t) &((type *) NULL)->member)
diff --git a/libs/nds/include/nds/g3d/g3d.h b/libs/nds/include/nds/g3d/g3d.h
index c4175327..36faa173 100644
--- a/libs/nds/include/nds/g3d/g3d.h
+++ b/libs/nds/include/nds/g3d/g3d.h
@@ -1,9 +1,9 @@
#include "nds/math.h"
-struct G3d_RenderState_;
-typedef void (*G3d_CallbackFunction)(struct G3d_RenderState_ *);
+struct G3d_RenderState;
+typedef void (*G3d_CallbackFunction)(struct G3d_RenderState *);
-typedef struct G3d_NameList_ {
+typedef struct G3d_NameList {
/* 00 */ u8 dummy;
/* 01 */ u8 numElmnts; // number of elements
/* 02 */ u16 size; // size of this NameList in bytes
@@ -13,20 +13,20 @@ typedef struct G3d_NameList_ {
/* 0c */
} G3d_NameList;
-typedef struct G3d_NameList_Header_ {
+typedef struct G3d_NameList_Header {
/* 00 */ u16 element_size;
/* 02 */ u16 data_section_size;
/* 04 */ u8 data[4];
/* 08 */
} G3d_NameList_Header;
-typedef struct G3d_InvBindMtx_ {
+typedef struct G3d_InvBindMtx {
/* 00 */ Mat4x3p mtx;
/* 30 */ Mat3p unkMtx;
/* 54 */
} G3d_InvBindMtx;
-typedef struct G3d_BoneMtxStruct_ {
+typedef struct G3d_BoneMtxStruct {
/* 00 */ u32 flag;
/* 04 */ u8 mUnk_04[0x24];
/* 28 */ Mat3p rot;
@@ -40,9 +40,9 @@ typedef enum {
G3D_ANIMBIND_OFF = 0x200
} G3d_AnimationBinds;
-typedef struct G3d_Animation_ {
+typedef struct G3d_Animation {
/* 00 */ u8 mUnk_00[0x10];
- /* 10 */ struct G3d_Animation_ *next; // next animation in the list
+ /* 10 */ struct G3d_Animation *next; // next animation in the list
/* 14 */ u8 mUnk_14[0x5];
/* 19 */ u8 numElmnts; // number of elements in the elementBinds array
/* 1a */ u16 elementBinds[1]; // each bit corresponds to a bone/material and determines whether an animation exists for it
@@ -50,7 +50,7 @@ typedef struct G3d_Animation_ {
} G3d_Animation;
// Structure representing the NSBMD model file
-typedef struct G3d_Model_ {
+typedef struct G3d_Model {
/* 00 */ u32 size; // size of the model in bytes
/* 04 */ u32 offSbc; // offset of the SBC commands list
/* 08 */ u32 offMat; // offset of the material list
@@ -98,7 +98,7 @@ typedef enum {
} G3d_RenderObjFlag;
// Structure that handles the parameters for drawing a model
-typedef struct G3d_RenderObject_ {
+typedef struct G3d_RenderObject {
/* 00 */ u32 flag; // G3d_RenderObjFlag
/* 04 */ G3d_Model *model;
/* 08 */ G3d_Animation *matAnim; // material animation
@@ -122,14 +122,14 @@ typedef struct G3d_RenderObject_ {
/* 54 */
} G3d_RenderObject;
-typedef struct G3d_Material_List_ {
+typedef struct G3d_Material_List {
/* 00 */ u16 texture_pairings_off;
/* 02 */ u16 palette_pairings_off;
/* 04 */ G3d_NameList materials;
/* 10 */
} G3d_Material_List;
-typedef struct G3d_Material_ {
+typedef struct G3d_Material {
/* 00 */ u32 mUnk_00;
/* 04 */ u32 dif_amb;
/* 08 */ u32 spe_emi;
@@ -145,7 +145,7 @@ typedef struct G3d_Material_ {
/* 2c */
} G3d_Material;
-typedef struct G3d_MaterialAnimation_ {
+typedef struct G3d_MaterialAnimation {
/* 00 */ u32 flag;
/* 04 */ u32 dif_amb;
/* 08 */ u32 spe_emi;
diff --git a/libs/nds/include/nds/g3d/sbc.h b/libs/nds/include/nds/g3d/sbc.h
index 6f0416c4..2ac3ec3b 100644
--- a/libs/nds/include/nds/g3d/sbc.h
+++ b/libs/nds/include/nds/g3d/sbc.h
@@ -30,7 +30,7 @@ typedef enum {
G3D_RENDERST_FLAG_SKIP_SBC_MTXCALC = 0x400 // skips the execution of matrix calculation commands
} G3d_RenderStateFlag;
-typedef struct G3d_RenderState_ {
+typedef struct G3d_RenderState {
/* 00 */ u8 *currentCmd; // current command being processed
/* 04 */ G3d_RenderObject *renderObj; // current render object being processed
/* 08 */ u32 flag; // G3d_RenderStateFlag