diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2017-06-19 15:29:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 15:29:24 +0200 |
commit | 11ad653b57d811dbe8df831d4987128da39bdcb5 (patch) | |
tree | 9e9a793c7dc9a4af7992e6b65c0418d16b25a400 /include/global.h | |
parent | 48a15638c63f2b3d4b2d12d346e466ddca006570 (diff) | |
parent | 13ff901d46f1726d5c0680cf8593484e0e9bbc4d (diff) |
Merge pull request #1 from pret/master
be up to date with the master
Diffstat (limited to 'include/global.h')
-rwxr-xr-x[-rw-r--r--] | include/global.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/include/global.h b/include/global.h index c4c78e65d..9da4bd57c 100644..100755 --- a/include/global.h +++ b/include/global.h @@ -4,17 +4,45 @@ #include "gba/gba.h" #include "config.h" +// IDE support +#ifdef __APPLE__ +#define _(x) x +#define __(x) x +#define INCBIN_U8 {0} +#define INCBIN_U16 {0} +#define INCBIN_U32 {0} +#define INCBIN_S8 {0} +#define INCBIN_S16 {0} +#define INCBIN_S32 {0} +void * memcpy (void *, const void *, size_t); +void * memset (void *, int, size_t); +int strcmp (const char *, const char *); +#endif + // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); // to help in decompiling #define asm_comment(x) asm volatile("@ -- " x " -- ") +#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n") + +#define nonmatching(fndec, x) {\ +__attribute__((naked))\ +fndec\ +{\ + asm_unified(x);\ +}\ +} + #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 +#define min(a, b) (a >= b ? a : b) +#define max(a, b) (a <= b ? a : b) + enum { VERSION_SAPPHIRE = 1, @@ -472,10 +500,16 @@ struct GabbyAndTyData { /*2b1b*/ u8 valB_5:3; }; -struct RecordMixing_UnknownStruct { +struct RecordMixing_UnknownStructSub { u8 data[0x38]; }; +struct RecordMixing_UnknownStruct { + struct RecordMixing_UnknownStructSub data[2]; + u32 unk70; + u16 unk74[0x2]; +}; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -551,8 +585,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2]; - /*0x30AC*/ u8 filler_30AC[0xA]; + /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C; + /*0x30AC*/ u8 filler_30B4[0x2]; /*0x30B6*/ u8 filler_30B6; /*0x30B7*/ u8 filler_30B7[1]; /*0x30B8*/ u8 linkBattleRecords[5][16]; |