From 28de627913f04e059f995169299e41ce4c2544f0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 11:33:37 -0400 Subject: Add TRACKS_ALL, remove BGCntrlBitfield --- include/gba/m4a_internal.h | 2 ++ include/gba/types.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index 2ccbb18f5..eeb79391b 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -313,6 +313,8 @@ struct MusicPlayerTrack #define MAX_MUSICPLAYER_TRACKS 16 +#define TRACKS_ALL 0xFFFF + #define TEMPORARY_FADE 0x0001 #define FADE_IN 0x0002 #define FADE_VOL_MAX 64 diff --git a/include/gba/types.h b/include/gba/types.h index 35d02e263..2e92bbe86 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -35,7 +35,7 @@ struct BgCnt { u16 priority:2; u16 charBaseBlock:2; - u16 dummy:2; + u16 dsCharBaseBlock:2; u16 mosaic:1; u16 palettes:1; u16 screenBaseBlock:5; -- cgit v1.2.3 From 862febe03a354218d3c8bd14d9c7d1a49e8981b8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 12:12:18 -0400 Subject: Add MAP_OFFSET --- include/constants/battle_pyramid.h | 3 --- include/constants/metatile_labels.h | 4 ++++ include/fieldmap.h | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index 1be3c1115..ebb753882 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -4,9 +4,6 @@ #define TOTAL_ROUNDS 20 #define PICKUP_ITEMS_PER_ROUND 10 -#define FLOOR_WALKABLE_METATILE 0x28D -#define FLOOR_EXIT_METATILE 0x28E - #define HINT_EXIT_DIRECTION 0 #define HINT_REMAINING_ITEMS 1 #define HINT_REMAINING_TRAINERS 2 diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 6159bf6cb..b4ee3eacf 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -788,4 +788,8 @@ #define METATILE_SecretBase_SpikesMat_BottomMid 0x32A #define METATILE_SecretBase_SpikesMat_BottomRight 0x32B +// gTileset_BattlePyramid +#define METATILE_BattlePyramid_Floor 0x28D +#define METATILE_BattlePyramid_Exit 0x28E + #endif // GUARD_METATILE_LABELS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 5bcbe20ea..28da8da2a 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -9,6 +9,14 @@ #define NUM_PALS_TOTAL 13 #define MAX_MAP_DATA_SIZE 0x2800 +// Map coordinates are offset by 7 when using the map +// buffer because it needs to load sufficient border +// metatiles to fill the player's view (the player has +// 7 metatiles of view horizontally in either direction). +#define MAP_OFFSET 7 +#define MAP_OFFSET_W (MAP_OFFSET * 2 + 1) +#define MAP_OFFSET_H (MAP_OFFSET * 2) + #include "main.h" extern struct BackupMapLayout gBackupMapLayout; -- cgit v1.2.3