1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-05 03:34:20 +00:00
oot/include/z64sram.h
cadmic d066586872
[iQue] Match z_sram (#2426)
* [iQue] z_sram: Use iQue-specific read/write macros

* [iQue] z_sram: Make checksum a struct

* [iQue] z_sram: Finish matching

* Call the trigraph usage a bug

* Fix bss

* Sram_iQueReadWrite -> Sram_ReadWriteIQue

* Use SRAM_HEADER_MAGIC for loop bound

* Rename sZeldaMagic -> sSramDefaultHeader and use less char literals
2025-01-17 06:56:22 -05:00

20 lines
489 B
C

#ifndef Z64SRAM_H
#define Z64SRAM_H
#include "ultra64/ultratypes.h"
typedef struct SramContext {
/* 0x00 */ u8* readBuff;
} SramContext; // size = 0x4
#define SRAM_SIZE 0x8000
#define SRAM_HEADER_SIZE 0x10
typedef enum SramHeaderField {
/* 0x00 */ SRAM_HEADER_SOUND,
/* 0x01 */ SRAM_HEADER_ZTARGET,
/* 0x02 */ SRAM_HEADER_LANGUAGE,
/* 0x03 */ SRAM_HEADER_MAGIC // must be the value in `sSramDefaultHeader` for save to be considered valid
} SramHeaderField;
#endif