diff options
author | yenatch <yenatch@gmail.com> | 2017-06-14 23:07:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 23:07:38 -0400 |
commit | 6f4bf2cb0535b1a7dc72029c65d93e3ebdb19f95 (patch) | |
tree | bb345f43ac8e5efc15a7c8fb4153df00523efc17 /include/global.h | |
parent | f22e583db60f3d0c33a3d02509c51c2a861e6abd (diff) | |
parent | baa9f7f55f64f15f5bff54017537b8e467671b34 (diff) |
Merge pull request #322 from PikalaxALT/field_effect
Decompile field_effect.s
Diffstat (limited to 'include/global.h')
-rwxr-xr-x[-rw-r--r--] | include/global.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/include/global.h b/include/global.h index c4c78e65d..0e7c43437 100644..100755 --- a/include/global.h +++ b/include/global.h @@ -10,11 +10,24 @@ // 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 +485,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 +570,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]; |