Improve IDE Support

This commit is contained in:
Jademalo
2021-10-22 04:42:48 +01:00
parent 6eaca5f0d0
commit 46867c546d
2 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
// global.h from pokemon ruby // global.h from pokemon ruby
// IDE support // IDE support
#if defined(__APPLE__) || defined(__CYGWIN__) #if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__)
#define _(x) x #define _(x) x
#define __(x) x #define __(x) x
#define INCBIN(x) {0} #define INCBIN(x) {0}
@@ -16,7 +16,7 @@
#define INCBIN_S8 INCBIN #define INCBIN_S8 INCBIN
#define INCBIN_S16 INCBIN #define INCBIN_S16 INCBIN
#define INCBIN_S32 INCBIN #define INCBIN_S32 INCBIN
#endif #endif // IDE support
// Prevent cross-jump optimization. // Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm(""); #define BLOCK_CROSS_JUMP asm("");
+8 -10
View File
@@ -16,20 +16,18 @@
#define asm_comment(x) asm volatile("@ -- " x " -- ") #define asm_comment(x) asm volatile("@ -- " x " -- ")
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided")
#if defined (__APPLE__) || defined (__CYGWIN__) || defined(__CLION_IDE__) // IDE support
// Get the IDE to stfu #if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__)
#define _(x) x
// We define it this way to fool preproc. #define __(x) x
#define INCBIN(...) {0} #define INCBIN(x) {0}
#define INCBIN_U8 INCBIN #define INCBIN_U8 INCBIN
#define INCBIN_U16 INCBIN #define INCBIN_U16 INCBIN
#define INCBIN_U32 INCBIN #define INCBIN_U32 INCBIN
#define INCBIN_S8 INCBIN #define INCBIN_S8 INCBIN
#define INCBIN_S16 INCBIN #define INCBIN_S16 INCBIN
#define INCBIN_S32 INCBIN #define INCBIN_S32 INCBIN
#define _(x) (x) #endif // IDE support
#define __(x) (x)
#endif // __APPLE__
#define NELEMS(array) (sizeof(array) / sizeof((array)[0])) #define NELEMS(array) (sizeof(array) / sizeof((array)[0]))