summaryrefslogtreecommitdiff
path: root/include/cereader_tool.h
blob: 5dd0a75893ca3cfabe2554d288787fd349cad3bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef GUARD_CEREADER_TOOL_H
#define GUARD_CEREADER_TOOL_H

#include "global.h"
#include "constants/trainer_tower.h"

struct TrainerTowerTrainer
{
    /* 0x000 */ u8 name[11];
    /* 0x00B */ u8 facilityClass;
    /* 0x00C */ u8 textColor;
    /* 0x00E */ u16 speechBefore[6];
    /* 0x01A */ u16 speechWin[6];
    /* 0x026 */ u16 speechLose[6];
    /* 0x032 */ u16 speechAfter[6];
    /* 0x040 */ struct BattleTowerPokemon mons[PARTY_SIZE];
}; // size: 328

struct TrainerTowerFloor
{
    /* 0x000 */ u8 id;
    /* 0x001 */ u8 floorIdx;
    /* 0x002 */ u8 challengeType;
    /* 0x003 */ u8 prize;
    /* 0x004 */ struct TrainerTowerTrainer trainers[MAX_TRAINERS_PER_FLOOR];
    /* 0x3DC */ u32 checksum;
};

struct EReaderTrainerTowerSetSubstruct
{
    u8 numFloors;
    u8 id;
    u16 dummy;
    u32 checksum;
};

struct EReaderTrainerTowerSet
{
    u8 numFloors;
    u8 id;
    u16 dummy;
    u32 checksum;
    struct TrainerTowerFloor floors[MAX_TRAINER_TOWER_FLOORS];
};

bool32 ValidateTrainerTowerData(struct EReaderTrainerTowerSet * ttdata);
bool32 CEReaderTool_SaveTrainerTower(struct EReaderTrainerTowerSet * ttdata);
bool32 CEReaderTool_LoadTrainerTower(struct EReaderTrainerTowerSet * ttdata);
u8 sub_815D654(void);
bool32 ReadTrainerTowerAndValidate(void);

#endif //GUARD_CEREADER_TOOL_H