diff options
| author | Aetias <aetias@outlook.com> | 2025-05-22 22:05:31 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-05-22 22:05:31 +0200 |
| commit | 0ae9b8c14902a59341ec84730d417eabe595f2de (patch) | |
| tree | 03ce8d268435e7165017374eaee15fbc37b1ace6 /libs | |
| parent | 4a764f9d58cb16343c02afb3592aad7aabf66d6d (diff) | |
| parent | 3f6a81d03dec2bd7c8394b508dbe4f017a5244b9 (diff) | |
Merge remote-tracking branch 'zeldaret/main' into decomp-PlayerControl
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/c/include/stddef.h | 2 | ||||
| -rw-r--r-- | libs/c/include/stdio.h | 6 | ||||
| -rw-r--r-- | libs/nds/include/nds/overlay.h (renamed from libs/nds/include/nds/Overlay.h) | 11 |
3 files changed, 19 insertions, 0 deletions
diff --git a/libs/c/include/stddef.h b/libs/c/include/stddef.h index 4986043a..4858fe46 100644 --- a/libs/c/include/stddef.h +++ b/libs/c/include/stddef.h @@ -5,4 +5,6 @@ typedef unsigned int size_t; +#define offsetof(type, member) ((size_t) &((type *) NULL)->member) + #endif diff --git a/libs/c/include/stdio.h b/libs/c/include/stdio.h new file mode 100644 index 00000000..3b49b3aa --- /dev/null +++ b/libs/c/include/stdio.h @@ -0,0 +1,6 @@ +#ifndef _C_STDIO_H +#define _C_STDIO_H + +int sprintf(char *__restrict s, const char *__restrict format, ...); + +#endif diff --git a/libs/nds/include/nds/Overlay.h b/libs/nds/include/nds/overlay.h index 7a8c6fa9..254253bd 100644 --- a/libs/nds/include/nds/Overlay.h +++ b/libs/nds/include/nds/overlay.h @@ -1,6 +1,13 @@ #ifndef _NDS_OVERLAY_H #define _NDS_OVERLAY_H +#ifdef __cplusplus +extern "C" { +#endif + +#define EXTERN_OVERLAY_ID(name_or_index) extern u32 OVERLAY_##name_or_index##_ID; +#define OVERLAY_ID(name_or_index) ((u32) & OVERLAY_##name_or_index##_ID) + typedef struct Overlay { /* 00 */ unk32 mId; /* 04 */ void *mBaseAddress; @@ -27,4 +34,8 @@ bool Overlay_Destroy(Overlay *overlay); bool Overlay_Load(Overlay *overlay, unk32 param2); bool Overlay_Unload(Overlay *overlay, unk32 param2); +#ifdef __cplusplus +} +#endif + #endif |
