2019-03-22 19:16:26 +00:00
|
|
|
#ifndef GUARD_EREADER_HELPERS_H
|
|
|
|
#define GUARD_EREADER_HELPERS_H
|
|
|
|
|
2019-09-03 02:37:52 +01:00
|
|
|
#include "trainer_hill.h"
|
|
|
|
|
2019-09-03 19:35:01 +01:00
|
|
|
struct EReaderTrainerHillTrainer
|
2019-03-22 19:16:26 +00:00
|
|
|
{
|
2021-04-24 23:04:27 +01:00
|
|
|
u8 trainerNum;
|
|
|
|
struct TrainerHillTrainer trainer;
|
|
|
|
struct TrHillDisplay display;
|
2019-09-03 02:37:52 +01:00
|
|
|
u32 checksum;
|
2019-09-03 19:35:01 +01:00
|
|
|
}; // size=0x274
|
2019-03-22 19:16:26 +00:00
|
|
|
|
2019-04-04 16:55:18 +01:00
|
|
|
struct EReaderTrainerHillSet
|
|
|
|
{
|
2021-04-24 23:04:27 +01:00
|
|
|
u8 numTrainers;
|
2019-09-03 02:37:52 +01:00
|
|
|
u8 id;
|
2021-05-04 20:43:24 +01:00
|
|
|
u16 dummy; // Only read in an assert.
|
2019-09-03 02:37:52 +01:00
|
|
|
u32 checksum;
|
2021-04-24 23:04:27 +01:00
|
|
|
struct EReaderTrainerHillTrainer trainers[6];
|
2019-04-04 16:55:18 +01:00
|
|
|
u8 unk_ec0[40];
|
2019-09-03 19:35:01 +01:00
|
|
|
}; // size = 0xf00
|
2019-04-04 16:55:18 +01:00
|
|
|
|
2021-04-24 23:04:27 +01:00
|
|
|
bool8 ValidateTrainerHillData(struct EReaderTrainerHillSet *);
|
|
|
|
bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet *);
|
2019-04-04 16:55:18 +01:00
|
|
|
bool32 ReadTrainerHillAndValidate(void);
|
2021-04-23 22:04:44 +01:00
|
|
|
int EReaderHandleTransfer(u8, size_t, const void *, void *);
|
|
|
|
void EReaderHelper_Timer3Callback(void);
|
|
|
|
void EReaderHelper_SerialCallback(void);
|
2019-09-03 02:37:52 +01:00
|
|
|
void EReaderHelper_SaveRegsState(void);
|
|
|
|
void EReaderHelper_RestoreRegsState(void);
|
2021-04-23 22:04:44 +01:00
|
|
|
void EReaderHelper_ClearSendRecvMgr(void);
|
2019-03-22 19:16:26 +00:00
|
|
|
|
|
|
|
#endif // GUARD_EREADER_HELPERS_H
|