1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-05 01:06:37 +00:00
oot/include/mempak.h
Tharo acc077a24c
Mempak doc (#1382)
* Mempak doc

* Format

* Suggested changes

* Further changes
2022-11-16 02:32:07 -05:00

21 lines
746 B
C

#ifndef MEMPAK_H
#define MEMPAK_H
#include "ultra64.h"
s32 Mempak_Init(s32 controllerNum);
s32 Mempak_GetFreeBytes(s32 controllerNum);
s32 Mempak_FindFiles(s32 controllerNum, char start, char end);
s32 Mempak_Write(s32 controllerNum, char letter, void* buffer, s32 offset, s32 size);
s32 Mempak_Read(s32 controllerNum, char letter, void* buffer, s32 offset, s32 size);
s32 Mempak_CreateFile(s32 controllerNum, char* letter, s32 size);
s32 Mempak_DeleteFile(s32 controllerNum, char letter);
s32 Mempak_GetFileSize(s32 controllerNum, char letter);
// Converts a file letter to its numerical index
#define MEMPAK_LETTER_TO_INDEX(c) ((c) - 'A')
// Converts a numerical index to a file letter
#define MEMPAK_INDEX_TO_LETTER(i) ((i) + 'A')
#endif