Add Multi return syntatic sugar

This commit is contained in:
KEKW555 2024-01-05 17:57:16 +05:30 committed by GitHub
parent 6fb8b41a8e
commit 743f3f3080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -119,6 +119,21 @@ typedef struct {
s8 y;
} PACKED Coords8;
typedef union {
s64 DWORD;
u64 DWORD_U;
struct {
s32 LO, HI;
} HALF;
struct {
u32 LO, HI;
} HALF_U;
} SplitDWord;
typedef u64 (*MultiReturnFunctionType)();
#define MULTI_RETURN_FUNCTION_CALL(func, ...) ((SplitDWord)((*(MultiReturnFunctionType)(&func))(__VA_ARGS__)))
union SplitWord {
s32 WORD;
u32 WORD_U;