summaryrefslogtreecommitdiff
path: root/include/mevent_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mevent_client.h')
-rw-r--r--include/mevent_client.h59
1 files changed, 48 insertions, 11 deletions
diff --git a/include/mevent_client.h b/include/mevent_client.h
index c32d14d7a..f68bb7592 100644
--- a/include/mevent_client.h
+++ b/include/mevent_client.h
@@ -3,31 +3,68 @@
#include "mevent_server_helpers.h"
-struct mevent_client_cmd
+// 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
{
u32 instr;
u32 parameter;
};
-struct mevent_client
+struct MysteryGiftClient
{
u32 unk_00;
u32 param;
- u32 mainseqno;
- u32 flag;
+ u32 funcId;
+ u32 funcState;
u32 cmdidx;
void * sendBuffer;
void * recvBuffer;
- struct mevent_client_cmd * cmdBuffer;
+ struct MysteryGiftClientCmd * cmdBuffer;
void * buffer;
- struct mevent_srv_sub manager;
- u32 unk_4C;
+ struct MysteryGiftLink link;
+ bool32 isWonderNews;
};
-void mevent_client_do_init(u32 arg);
-u32 mevent_client_do_exec(u16 * a0);
-void mevent_client_inc_flag(void);
+void MysteryGiftClient_Create(bool32 isWonderNews);
+u32 MysteryGiftClient_Run(u16 * param);
+void MysteryGiftClient_AdvanceState(void);
void * mevent_client_get_buffer(void);
-void mevent_client_set_param(u32 a0);
+void MysteryGiftClient_SetParam(u32 value);
#endif //GUARD_MEVENT_CLIENT_H