merge mevent server and document mevent_server_helpers

This commit is contained in:
PikalaxALT
2018-12-01 11:24:05 -05:00
parent b9a6cba30a
commit 01aada9e93
9 changed files with 589 additions and 598 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ void sub_8007E24(void);
void sub_8007E4C(void);
u8 GetMultiplayerId(void);
u8 bitmask_all_link_players_but_self(void);
bool8 SendBlock(u8, void *, u16);
bool8 SendBlock(u8, const void *, u16);
u8 GetBlockReceivedStatus(void);
void ResetBlockReceivedFlags(void);
void ResetBlockReceivedFlag(u8);
+83 -24
View File
@@ -7,34 +7,93 @@
struct mevent_srv_sub
{
s32 unk_00;
u8 unk_04;
u8 unk_05;
u16 unk_06;
u16 unk_08;
u16 unk_0A;
u16 unk_0C;
u16 unk_0E;
u16 unk_10;
u16 unk_12;
u16 unk_14;
void * unk_18;
void * unk_1C;
u32 (*unk_20)(struct mevent_srv_sub *);
u32 (*unk_24)(struct mevent_srv_sub *);
s32 seqno;
u8 sendPlayerNo;
u8 recvPlayerNo;
u16 recvIdent;
u16 recvCounter;
u16 recvCRC;
u16 recvSize;
u16 sendIdent;
u16 sendCounter;
u16 sendCRC;
u16 sendSize;
void * recvBfr;
const void * sendBfr;
u32 (*recvFunc)(struct mevent_srv_sub *);
u32 (*sendFunc)(struct mevent_srv_sub *);
};
struct send_recv_buff
struct send_recv_header
{
u16 unk0;
u16 unk2;
u16 unk4;
u16 ident;
u16 crc;
u16 size;
};
u32 sub_8144844(struct mevent_srv_sub * svr);
u32 sub_8144850(struct mevent_srv_sub * svr);
void sub_814485C(struct mevent_srv_sub * svr, u32 a1, u32 a2);
void sub_8144888(struct mevent_srv_sub * svr, u32 a1, void * a2, u32 size);
void sub_81448AC(struct mevent_srv_sub * svr, u32 a1, void * a2);
struct mevent_cmd_ish
{
u32 instr;
u32 parameter;
};
struct mevent_srv_ish
{
u32 unk_00;
u32 unk_04;
u32 mainseqno;
u32 unk_0C;
u32 cmdidx;
void * unk_14;
void * unk_18;
struct mevent_cmd_ish * cmdBuffer;
void * unk_20;
struct mevent_srv_sub unk_24;
};
struct mevent_cmd
{
u32 instr;
bool32 flag;
void * parameter;
};
struct mevent_srv_common
{
u32 unk_00;
u32 unk_04;
u32 mainseqno;
u32 cmdidx;
const struct mevent_cmd * cmdBuffer;
void * unk_14;
struct MEventBuffer_32E0_Sub * unk_18;
struct MEventBuffer_3120_Sub * unk_1C;
struct MEventStruct_Unk1442CC * unk_20;
void * unk_24;
u32 unk_28;
void * unk_2C;
u32 unk_30;
void * unk_34;
struct mevent_srv_sub unk_38;
};
u32 mevent_srv_sub_recv(struct mevent_srv_sub * svr);
u32 mevent_srv_sub_send(struct mevent_srv_sub * svr);
void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recvPlayerNo);
void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void * src, u32 size);
void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * dest);
void sub_8144AEC(void);
u32 sub_8144B0C(u16 * a0);
void sub_8144B48(void);
void * sub_8144B58(void);
void sub_8144B64(u32 a0);
void sub_8144F1C(void);
void sub_8144F40(void);
u32 sub_8144F64(u16 * a0);
extern const u8 gUnknown_84687E0[];
extern const u8 gUnknown_8468B6C[];
extern const u8 gUnknown_8468BCC[];
#endif //GUARD_MEVENT_SERVER_H
+2 -2
View File
@@ -12,8 +12,8 @@ u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
void StoreWordInTwoHalfwords(u16 *, u32);
void LoadWordFromTwoHalfwords(u16 *, u32 *);
int CountTrailingZeroBits(u32 value);
u16 CalcCRC16(u8 *data, s32 length);
u16 CalcCRC16WithTable(u8 *data, u32 length);
u16 CalcCRC16(const u8 *data, s32 length);
u16 CalcCRC16WithTable(const u8 *data, u32 length);
u32 CalcByteArraySum(const u8* data, u32 length);
#endif // GUARD_UTIL_H