From 46867c546d5df8c8b86b5ad46b1c149cc1ad0688 Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Fri, 22 Oct 2021 04:42:48 +0100 Subject: Improve IDE Support --- berry_fix/payload/include/global.h | 4 ++-- include/global.h | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h index ef161c249..bf0d71b69 100644 --- a/berry_fix/payload/include/global.h +++ b/berry_fix/payload/include/global.h @@ -6,7 +6,7 @@ // global.h from pokemon ruby // IDE support -#if defined(__APPLE__) || defined(__CYGWIN__) +#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) #define _(x) x #define __(x) x #define INCBIN(x) {0} @@ -16,7 +16,7 @@ #define INCBIN_S8 INCBIN #define INCBIN_S16 INCBIN #define INCBIN_S32 INCBIN -#endif +#endif // IDE support // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); diff --git a/include/global.h b/include/global.h index f7abcc23d..56be4bf5f 100644 --- a/include/global.h +++ b/include/global.h @@ -16,20 +16,18 @@ #define asm_comment(x) asm volatile("@ -- " x " -- ") #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") -#if defined (__APPLE__) || defined (__CYGWIN__) || defined(__CLION_IDE__) -// Get the IDE to stfu - -// We define it this way to fool preproc. -#define INCBIN(...) {0} -#define INCBIN_U8 INCBIN +// IDE support +#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) +#define _(x) x +#define __(x) x +#define INCBIN(x) {0} +#define INCBIN_U8 INCBIN #define INCBIN_U16 INCBIN #define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN +#define INCBIN_S8 INCBIN #define INCBIN_S16 INCBIN #define INCBIN_S32 INCBIN -#define _(x) (x) -#define __(x) (x) -#endif // __APPLE__ +#endif // IDE support #define NELEMS(array) (sizeof(array) / sizeof((array)[0])) -- cgit v1.2.3 From 1c4d5bfed09cd9275caf98db0998958876c091d0 Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Sat, 23 Oct 2021 10:10:06 +0100 Subject: IDE support formatting and consistency --- berry_fix/payload/include/global.h | 21 +++++++++++---------- include/global.h | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h index bf0d71b69..4d9da7c7d 100644 --- a/berry_fix/payload/include/global.h +++ b/berry_fix/payload/include/global.h @@ -6,16 +6,17 @@ // global.h from pokemon ruby // IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) -#define _(x) x -#define __(x) x -#define INCBIN(x) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) +#define INCBIN(...) {0} +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN #endif // IDE support // Prevent cross-jump optimization. diff --git a/include/global.h b/include/global.h index 56be4bf5f..d6d57910d 100644 --- a/include/global.h +++ b/include/global.h @@ -17,16 +17,17 @@ #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") // IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) -#define _(x) x -#define __(x) x -#define INCBIN(x) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) +#define INCBIN(...) {0} +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN #endif // IDE support #define NELEMS(array) (sizeof(array) / sizeof((array)[0])) -- cgit v1.2.3