Sync palette macros
This commit is contained in:
+11
-7
@@ -31,14 +31,12 @@
|
||||
#define IWRAM_START 0x03000000
|
||||
#define IWRAM_END (IWRAM_START + 0x8000)
|
||||
|
||||
#define PLTT 0x5000000
|
||||
#define PLTT_SIZE 0x400
|
||||
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
|
||||
#define OBJ_PLTT (PLTT + 0x200)
|
||||
#define PLTT 0x5000000
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
#define OBJ_PLTT (PLTT + BG_PLTT_SIZE)
|
||||
#define OBJ_PLTT_SIZE 0x200
|
||||
#define PLTT_SIZE (BG_PLTT_SIZE + OBJ_PLTT_SIZE)
|
||||
|
||||
#define VRAM 0x6000000
|
||||
#define VRAM_SIZE 0x18000
|
||||
@@ -79,6 +77,12 @@
|
||||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define PLTT_SIZEOF(n) ((n) * sizeof(u16))
|
||||
#define PLTT_SIZE_4BPP PLTT_SIZEOF(16)
|
||||
#define PLTT_SIZE_8BPP PLTT_SIZEOF(256)
|
||||
|
||||
#define PLTT_OFFSET_4BPP(n) ((n) * PLTT_SIZE_4BPP)
|
||||
|
||||
// Some functions are strictly inline asm
|
||||
#define NAKED __attribute__((naked))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
+1
-1
@@ -2753,7 +2753,7 @@ extern const u32 gItemIcon_QuestionMark[];
|
||||
extern const u32 gItemIconPalette_QuestionMark[];
|
||||
|
||||
// fame_checker
|
||||
extern const u16 gFameCheckerBgPals[0x30];
|
||||
extern const u16 gFameCheckerBgPals[][16];
|
||||
extern const u16 gFameCheckerBgTiles[0xa50];
|
||||
extern const u16 gFameCheckerBg3Tilemap[0x400];
|
||||
extern const u16 gFameCheckerBg2Tilemap[0x400];
|
||||
|
||||
+18
-2
@@ -8,8 +8,7 @@
|
||||
#define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade
|
||||
#define gPaletteFade_submode (gPaletteFade.multipurpose2) // fast fade
|
||||
|
||||
#define PLTT_BUFFER_SIZE 0x200
|
||||
#define PLTT_DECOMP_BUFFER_SIZE (PLTT_BUFFER_SIZE * 2)
|
||||
#define PLTT_BUFFER_SIZE (PLTT_SIZE / sizeof(u16))
|
||||
|
||||
#define PALETTE_FADE_STATUS_DELAY 2
|
||||
#define PALETTE_FADE_STATUS_ACTIVE 1
|
||||
@@ -20,6 +19,13 @@
|
||||
#define PALETTES_OBJECTS 0xFFFF0000
|
||||
#define PALETTES_ALL (PALETTES_BG | PALETTES_OBJECTS)
|
||||
|
||||
#define PLTT_ID(n) ((n) * 16)
|
||||
#define BG_PLTT_OFFSET 0x000
|
||||
#define OBJ_PLTT_OFFSET 0x100
|
||||
#define BG_PLTT_ID(n) (BG_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID(n) (OBJ_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID2(n) (PLTT_ID((n) + 16))
|
||||
|
||||
enum
|
||||
{
|
||||
FAST_FADE_IN_FROM_WHITE,
|
||||
@@ -80,4 +86,14 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa
|
||||
bool32 IsBlendPalettesGraduallyTaskActive(u8 var);
|
||||
void DestroyBlendPalettesGraduallyTask(void);
|
||||
|
||||
static inline void SetBackdropFromColor(u16 color)
|
||||
{
|
||||
FillPalette(color, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
static inline void SetBackdropFromPalette(const u16 *palette)
|
||||
{
|
||||
LoadPalette(palette, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
#endif // GUARD_PALETTE_H
|
||||
|
||||
Reference in New Issue
Block a user