Move SWAP macro to util.h

This commit is contained in:
DizzyEggg 2025-08-25 13:03:30 +02:00
parent 843d9ea589
commit 6ab9cde534
2 changed files with 12 additions and 13 deletions

View File

@ -50,4 +50,11 @@ static inline s32 Max(s32 a, s32 b)
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
#define SWAP(a, b, temp) \
{ \
temp = a; \
a = b; \
b = temp; \
}
#endif //PMDSKY_UTIL_H

View File

@ -10,13 +10,6 @@
#define VRAM 0x6000000
#define SWAP(a, b, temp) \
{ \
temp = a; \
a = b; \
b = temp; \
}
typedef struct RGB_Array
{
u8 c[RGB_FIELDS_COUNT];
@ -67,6 +60,11 @@ extern void sub_0200A5B0(struct UnkStruct_2324CBC_Sub98 *, s32 id, const RGB_Arr
#define TRY_CLOSE_FILE(f) if (!PointsToZero(&f)) {UnloadFile(&f);}
extern const char ov11_02320C44[];
extern const char ov11_02320C58[];
extern const char ov11_02320C94[];
extern const char ov11_02320C6C[];
extern const char ov11_02320C80[];
extern void *ov11_02320C18[][2]; // Vram ptrs
// Todo: make these static
const RGB_Array ov11_02320BF4 = {0, 0, 0, 0};
@ -351,12 +349,6 @@ void ov11_022EC240(GroundBg *groundBg, s32 bgId)
}
}
extern const char ov11_02320C58[];
extern const char ov11_02320C94[];
extern const char ov11_02320C6C[];
extern const char ov11_02320C80[];
extern void *ov11_02320C18[][2]; // Vram ptrs
#ifdef NONMATCHING
// Regswaps - https://decomp.me/scratch/0bm90
void ov11_022EC27C(GroundBg *groundBg, s32 bgId)