diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 15:57:08 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 15:57:08 -0400 |
commit | a205881ce2caa89a1b2690df9bd335201df2aeda (patch) | |
tree | 8e0c2822030d5985475f86c4286ea923ac9bc71d /include | |
parent | b22d3a821d8656d9fb88000ce02e5b885a59e1c3 (diff) |
Comment dma3 methods and create DMA3_*BIT macros
Diffstat (limited to 'include')
-rw-r--r-- | include/dma3.h | 26 | ||||
-rw-r--r-- | include/mon_markings.h | 2 | ||||
-rw-r--r-- | include/pokemon_storage_system_internal.h | 4 |
3 files changed, 28 insertions, 4 deletions
diff --git a/include/dma3.h b/include/dma3.h index 381e1e322..266fa0716 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -6,6 +6,14 @@ // Maximum amount of data we will transfer in one operation #define MAX_DMA_BLOCK_SIZE 0x1000 +#define DMA_REQUEST_COPY32 1 +#define DMA_REQUEST_FILL32 2 +#define DMA_REQUEST_COPY16 3 +#define DMA_REQUEST_FILL16 4 + +#define DMA3_16BIT 0 +#define DMA3_32BIT 1 + #define Dma3CopyLarge_(src, dest, size, bit) \ { \ const void *_src = src; \ @@ -48,10 +56,26 @@ #define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16) #define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32) +// Cancel pending DMA3 requests void ClearDma3Requests(void); + +// Handle pending DMA3 requests void ProcessDma3Requests(void); + +// Copy size bytes from src to dest. +// mode takes a DMA3_*BIT macro +// Returns the request index s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); + +// Fill size bytes at dest with value. +// mode takes a DMA3_*BIT macro +// Returns the request index s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode); -s16 CheckForSpaceForDma3Request(s16 index); + +// index is the return value from RequestDma3* +// if index = -1, will check if any request is pending +// otherwise, checks if the specified request is pending +// Returns -1 if pending, 0 otherwise +s16 WaitDma3Request(s16 index); #endif // GUARD_DMA3_H diff --git a/include/mon_markings.h b/include/mon_markings.h index 2547a7322..ddda73931 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -28,6 +28,6 @@ void TeardownMonMarkingsMenu(void); bool8 MonMarkingsHandleInput(void); struct Sprite * CreateMonMarkingSprite_SelectCombo(u16 tileTag, u16 paletteTag, const u16 *palette); struct Sprite * CreateMonMarkingSprite_AllOff(u16 tileTag, u16 paletteTag, const u16 *palette); -void sub_80BEBD0(u8 markings, void * dest); +void RequestDma3LoadMonMarking(u8 markings, void * dest); #endif //GUARD_MON_MARKINGS_H diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index ba109640b..f08144243 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -335,9 +335,9 @@ struct PokemonStorageSystemData /* 0d88 */ bool8 (*monPlaceChangeFunc)(void); /* 0d8c */ u8 monPlaceChangeState; /* 0d8d */ u8 field_D91; - /* 0d90 */ struct Sprite *field_D94; + /* 0d90 */ struct Sprite *monMarkingSprite; /* 0d94 */ struct Sprite *field_D98[2]; - /* 0d9c */ u16 *field_DA0; + /* 0d9c */ u16 *monMarkingSpriteTileStart; /* 0da0 */ struct PokemonMarkMenu field_DA4; /* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C; /* 20a0 */ struct Pokemon movingMon; |