summaryrefslogtreecommitdiff
path: root/include/mevent_server_helpers.h
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-15 12:56:14 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-10-16 23:35:17 -0400
commit845a5e99cc01607aae5f74c3e5e700a72734145f (patch)
tree26f3f6afd17d97b662aaba249fb165f380b15098 /include/mevent_server_helpers.h
parente3bb257bcf4ec855a0a45794c2838f0e2b5708f5 (diff)
General mystery gift documentation, finish mystery gift client/server/scripts
Diffstat (limited to 'include/mevent_server_helpers.h')
-rw-r--r--include/mevent_server_helpers.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/include/mevent_server_helpers.h b/include/mevent_server_helpers.h
index d2f292a0b..77d966447 100644
--- a/include/mevent_server_helpers.h
+++ b/include/mevent_server_helpers.h
@@ -1,13 +1,31 @@
#ifndef GUARD_MEVENT_SERVER_HELPERS_H
#define GUARD_MEVENT_SERVER_HELPERS_H
-#define ME_SEND_BUF_SIZE 0x400
+#define MG_LINK_BUFFER_SIZE 0x400
+
+// Send/receive ids for the Client/Server to make sure
+// they're sending/receiving the same thing
+enum {
+ MG_LINKID_CLIENT_SCRIPT = 16,
+ MG_LINKID_GAME_DATA,
+ MG_LINKID_GAME_STAT,
+ MG_LINKID_RESPONSE,
+ MG_LINKID_READY_END,
+ MG_LINKID_DYNAMIC_MSG,
+ MG_LINKID_CARD,
+ MG_LINKID_NEWS,
+ MG_LINKID_STAMP,
+ MG_LINKID_RAM_SCRIPT,
+ MG_LINKID_EREADER_TRAINER,
+ MG_LINKID_UNK_1,
+ MG_LINKID_UNK_2,
+};
struct MysteryGiftLink
{
- s32 seqno;
- u8 sendPlayerNo;
- u8 recvPlayerNo;
+ s32 state;
+ u8 sendPlayerId;
+ u8 recvPlayerId;
u16 recvIdent;
u16 recvCounter;
u16 recvCRC;
@@ -22,13 +40,6 @@ struct MysteryGiftLink
u32 (*sendFunc)(struct MysteryGiftLink *);
};
-struct send_recv_header
-{
- u16 ident;
- u16 crc;
- u16 size;
-};
-
void MysteryGiftLink_Init(struct MysteryGiftLink *, u32, u32);
void MysteryGiftLink_InitSend(struct MysteryGiftLink * manager, u32 ident, const void * src, u32 size);
bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * manager);