diff options
author | garak <garakmon@gmail.com> | 2019-07-20 12:30:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-20 12:30:41 -0400 |
commit | c39d25ff4d3cf6cb8b3a6fea208de0cc3c6a7c8c (patch) | |
tree | bce0030d8901a6b84e705baca169989fff1a4f71 /include | |
parent | dfa3e079c0f55565fc60a6a1ba0ef04de9be94c2 (diff) | |
parent | 4d5c1ca03b4e7db3c44c71afaa01b1549a282a19 (diff) |
Merge branch 'master' into navdata
Diffstat (limited to 'include')
-rw-r--r-- | include/fieldmap.h | 4 | ||||
-rw-r--r-- | include/gba/defines.h | 7 | ||||
-rw-r--r-- | include/global.h | 5 | ||||
-rw-r--r-- | include/graphics.h | 3 | ||||
-rw-r--r-- | include/link_rfu.h | 2 | ||||
-rw-r--r-- | include/player_pc.h | 2 | ||||
-rw-r--r-- | include/pokenav.h | 4 | ||||
-rw-r--r-- | include/strings.h | 1 | ||||
-rw-r--r-- | include/text.h | 6 |
9 files changed, 24 insertions, 10 deletions
diff --git a/include/fieldmap.h b/include/fieldmap.h index 2384ed46a..be5610a46 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -23,9 +23,9 @@ int GetMapBorderIdAt(int x, int y); int CanCameraMoveInDirection(int direction); u16 GetBehaviorByMetatileId(u16 metatileId); void GetCameraFocusCoords(u16 *x, u16 *y); -u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y); +u8 MapGridGetMetatileLayerTypeAt(int x, int y); u8 MapGridGetZCoordAt(int x, int y); -u8 CameraMove(s32 deltaX, s32 deltaY); +bool8 CameraMove(int deltaX, int deltaY); struct MapConnection *sub_8088950(u8 direction, int x, int y); bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection); bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset); diff --git a/include/gba/defines.h b/include/gba/defines.h index b68a2ad1e..9bd695aaa 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -6,9 +6,16 @@ #define TRUE 1 #define FALSE 0 +#define BSS_DATA __attribute__((section(".bss"))) #define IWRAM_DATA __attribute__((section("iwram_data"))) #define EWRAM_DATA __attribute__((section("ewram_data"))) +#if MODERN +#define NOINLINE __attribute__((noinline)) +#else +#define NOINLINE +#endif + #define ALIGNED(n) __attribute__((aligned(n))) #define SOUND_INFO_PTR (*(struct SoundInfo **)0x3007FF0) diff --git a/include/global.h b/include/global.h index 969680dd7..a76d6e4e3 100644 --- a/include/global.h +++ b/include/global.h @@ -2,6 +2,7 @@ #define GUARD_GLOBAL_H #include <string.h> +#include <limits.h> #include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines. #include "gba/gba.h" #include "constants/global.h" @@ -62,6 +63,10 @@ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) +#if MODERN +#define abs(x) (((x) < 0) ? -(x) : (x)) +#endif + // Extracts the upper 16 bits of a 32-bit number #define HIHALF(n) (((n) & 0xFFFF0000) >> 16) diff --git a/include/graphics.h b/include/graphics.h index 43b014a9f..50bb5774e 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4005,9 +4005,6 @@ extern const u32 gBerryPalette_Starf[]; extern const u32 gBerryPic_Enigma[]; extern const u32 gBerryPalette_Enigma[]; -//credits -extern const u32 gCreditsCopyrightEnd_Gfx[]; - //pokenav extern const u8 gPokenavConditionMarker_Gfx[]; extern const u16 gPokenavConditionMarker_Pal[]; diff --git a/include/link_rfu.h b/include/link_rfu.h index dc5b963d1..4bf106ec1 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -278,7 +278,7 @@ bool32 sub_8011B90(void); void sub_800FE50(u16 *a0); bool32 sub_800E540(u16 id, u8 *name); void sub_8011DE0(u32 arg0); -u8 sub_801100C(int a0); +u8 sub_801100C(s32 a0); void sub_800EF7C(void); bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); bool8 sub_800DF34(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); diff --git a/include/player_pc.h b/include/player_pc.h index 53bb25c6b..219c11440 100644 --- a/include/player_pc.h +++ b/include/player_pc.h @@ -1,6 +1,8 @@ #ifndef GUARD_PLAYER_PC_H #define GUARD_PLAYER_PC_H +#include "menu.h" + // local task defines #define PAGE_INDEX data[0] #define ITEMS_ABOVE_TOP data[1] diff --git a/include/pokenav.h b/include/pokenav.h index c840fd494..203d14015 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -4,7 +4,7 @@ #include "bg.h" #include "main.h" -typedef u32 (*LoopedTask)(int state); +typedef u32 (*LoopedTask)(s32 state); // Return values of LoopedTask functions. #define LT_INC_AND_PAUSE 0 @@ -111,7 +111,7 @@ void sub_81C7850(u32 a0); u32 sub_81C786C(void); void LoadLeftHeaderGfxForIndex(u32 arg0); void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2); -void sub_81C7AC0(int a0); +void sub_81C7AC0(s32 a0); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); diff --git a/include/strings.h b/include/strings.h index d8cdebec6..41310668d 100644 --- a/include/strings.h +++ b/include/strings.h @@ -485,7 +485,6 @@ extern const u8 gText_CryOf[]; extern const u8 gText_SizeComparedTo[]; extern const u8 gText_PokedexRegistration[]; extern const u8 gText_UnkCtrlF908Clear01[]; -extern const u8 sText_TenDashes2[]; extern const u8 gText_5MarksPokemon[]; extern const u8 gText_UnkHeight[]; extern const u8 gText_UnkWeight[]; diff --git a/include/text.h b/include/text.h index eba3d0c4e..d3ff663bb 100644 --- a/include/text.h +++ b/include/text.h @@ -166,7 +166,11 @@ struct TextPrinter void (*callback)(struct TextPrinterTemplate *, u16); // 0x10 - union __attribute__((packed)) { + union +#if !MODERN + __attribute__((packed)) +#endif + { struct TextPrinterSubStruct sub; u8 fields[7]; } subUnion; |