2019-04-03 13:55:17 +00:00
|
|
|
#ifndef GUARD_MEVENT_CLIENT_H
|
|
|
|
#define GUARD_MEVENT_CLIENT_H
|
2019-03-31 19:50:25 +00:00
|
|
|
|
2019-04-02 15:43:29 +00:00
|
|
|
#include "mevent_server_helpers.h"
|
|
|
|
|
2021-10-14 19:36:51 +00:00
|
|
|
// Return values for client functions called by MysteryGiftClient_Run
|
|
|
|
enum {
|
|
|
|
CLI_RET_INIT,
|
|
|
|
CLI_RET_1,
|
|
|
|
CLI_RET_2,
|
|
|
|
CLI_RET_3,
|
|
|
|
CLI_RET_ASK_TOSS,
|
|
|
|
CLI_RET_5,
|
|
|
|
CLI_RET_END,
|
|
|
|
};
|
|
|
|
|
|
|
|
// IDs for client script instructions
|
|
|
|
enum {
|
|
|
|
CLI_NONE,
|
|
|
|
CLI_RETURN,
|
|
|
|
CLI_RECV,
|
|
|
|
CLI_SEND_LOADED,
|
|
|
|
CLI_COPY_RECV,
|
|
|
|
CLI_5,
|
|
|
|
CLI_COPY_RECV_IF_N,
|
|
|
|
CLI_COPY_RECV_IF,
|
|
|
|
CLI_8,
|
|
|
|
CLI_9,
|
|
|
|
CLI_10,
|
|
|
|
CLI_11,
|
|
|
|
CLI_12,
|
|
|
|
CLI_ASK_TOSS,
|
|
|
|
CLI_LOAD_TOSS_RESPONSE,
|
|
|
|
CLI_15,
|
|
|
|
CLI_16,
|
|
|
|
CLI_17,
|
|
|
|
CLI_RECV_EREADER_TRAINER,
|
|
|
|
CLI_SEND_STAT,
|
|
|
|
CLI_20,
|
|
|
|
CLI_21,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct MysteryGiftClientCmd
|
2019-04-02 15:43:29 +00:00
|
|
|
{
|
|
|
|
u32 instr;
|
|
|
|
u32 parameter;
|
|
|
|
};
|
|
|
|
|
2021-10-14 19:36:51 +00:00
|
|
|
struct MysteryGiftClient
|
2019-04-02 15:43:29 +00:00
|
|
|
{
|
|
|
|
u32 unk_00;
|
|
|
|
u32 param;
|
2021-10-14 19:36:51 +00:00
|
|
|
u32 funcId;
|
|
|
|
u32 funcState;
|
2019-04-02 15:43:29 +00:00
|
|
|
u32 cmdidx;
|
|
|
|
void * sendBuffer;
|
|
|
|
void * recvBuffer;
|
2021-10-14 19:36:51 +00:00
|
|
|
struct MysteryGiftClientCmd * cmdBuffer;
|
2019-04-02 15:43:29 +00:00
|
|
|
void * buffer;
|
2021-10-14 19:36:51 +00:00
|
|
|
struct MysteryGiftLink link;
|
|
|
|
bool32 isWonderNews;
|
2019-04-02 15:43:29 +00:00
|
|
|
};
|
|
|
|
|
2021-10-14 19:36:51 +00:00
|
|
|
void MysteryGiftClient_Create(bool32 isWonderNews);
|
|
|
|
u32 MysteryGiftClient_Run(u16 * param);
|
|
|
|
void MysteryGiftClient_AdvanceState(void);
|
2019-04-02 18:02:13 +00:00
|
|
|
void * mevent_client_get_buffer(void);
|
2021-10-14 19:36:51 +00:00
|
|
|
void MysteryGiftClient_SetParam(u32 value);
|
2019-03-31 19:50:25 +00:00
|
|
|
|
2019-04-03 13:55:17 +00:00
|
|
|
#endif //GUARD_MEVENT_CLIENT_H
|