Merge pull request #1771 from SBird1337/doc/aslr

[doc] fix misnamed dma <--> aslr
This commit is contained in:
GriffinR 2022-09-07 10:43:08 -04:00 committed by GitHub
commit af1725793a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -10,24 +10,24 @@
* toolchains. If this is not done, the ClearSav functions will end up erasing
* the wrong memory leading to various glitches.
*/
struct SaveBlock2DMA {
struct SaveBlock2ASLR {
struct SaveBlock2 block;
u8 dma[SAVEBLOCK_MOVE_RANGE];
u8 aslr[SAVEBLOCK_MOVE_RANGE];
};
struct SaveBlock1DMA {
struct SaveBlock1ASLR {
struct SaveBlock1 block;
u8 dma[SAVEBLOCK_MOVE_RANGE];
u8 aslr[SAVEBLOCK_MOVE_RANGE];
};
struct PokemonStorageDMA {
struct PokemonStorageASLR {
struct PokemonStorage block;
u8 dma[SAVEBLOCK_MOVE_RANGE];
u8 aslr[SAVEBLOCK_MOVE_RANGE];
};
extern struct SaveBlock1DMA gSaveblock1;
extern struct SaveBlock2DMA gSaveblock2;
extern struct PokemonStorageDMA gPokemonStorage;
extern struct SaveBlock1ASLR gSaveblock1;
extern struct SaveBlock2ASLR gSaveblock2;
extern struct PokemonStorageASLR gPokemonStorage;
extern bool32 gFlashMemoryPresent;
extern struct SaveBlock1 *gSaveBlock1Ptr;

View File

@ -29,9 +29,9 @@ struct LoadedSaveData
};
// EWRAM DATA
EWRAM_DATA struct SaveBlock2DMA gSaveblock2 = {0};
EWRAM_DATA struct SaveBlock1DMA gSaveblock1 = {0};
EWRAM_DATA struct PokemonStorageDMA gPokemonStorage = {0};
EWRAM_DATA struct SaveBlock2ASLR gSaveblock2 = {0};
EWRAM_DATA struct SaveBlock1ASLR gSaveblock1 = {0};
EWRAM_DATA struct PokemonStorageASLR gPokemonStorage = {0};
EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
EWRAM_DATA u32 gLastEncryptionKey = 0;
@ -58,12 +58,12 @@ void CheckForFlashMemory(void)
void ClearSav2(void)
{
CpuFill16(0, &gSaveblock2, sizeof(struct SaveBlock2DMA));
CpuFill16(0, &gSaveblock2, sizeof(struct SaveBlock2ASLR));
}
void ClearSav1(void)
{
CpuFill16(0, &gSaveblock1, sizeof(struct SaveBlock1DMA));
CpuFill16(0, &gSaveblock1, sizeof(struct SaveBlock1ASLR));
}
// Offset is the sum of the trainer id bytes