General mystery gift documentation, finish mystery gift client/server/scripts
This commit is contained in:
@@ -3,34 +3,98 @@
|
||||
|
||||
#include "mevent_server_helpers.h"
|
||||
|
||||
struct mevent_cmd
|
||||
// Return values for Server_* functions.
|
||||
// Other than SVR_RET_END, effectively useless (not checked for).
|
||||
enum {
|
||||
SVR_RET_INIT,
|
||||
SVR_RET_ACTIVE,
|
||||
SVR_RET_UNUSED,
|
||||
SVR_RET_END
|
||||
};
|
||||
|
||||
// IDs for server script instructions
|
||||
enum {
|
||||
SVR_RETURN,
|
||||
SVR_SEND,
|
||||
SVR_RECV,
|
||||
SVR_GOTO,
|
||||
SVR_GOTO_IF_EQ,
|
||||
SVR_COPY_GAME_DATA,
|
||||
SVR_CHECK_GAME_DATA_CARD,
|
||||
SVR_CHECK_EXISTING_CARD,
|
||||
SVR_READ_RESPONSE,
|
||||
SVR_CHECK_EXISTING_STAMPS,
|
||||
SVR_GET_CARD_STAT,
|
||||
SVR_CHECK_QUESTIONNAIRE,
|
||||
SVR_COMPARE,
|
||||
SVR_LOAD_CARD,
|
||||
SVR_LOAD_NEWS,
|
||||
SVR_LOAD_RAM_SCRIPT,
|
||||
SVR_LOAD_STAMP,
|
||||
SVR_LOAD_UNK_2,
|
||||
SVR_LOAD_CLIENT_SCRIPT,
|
||||
SVR_LOAD_EREADER_TRAINER,
|
||||
SVR_LOAD_MSG,
|
||||
SVR_COPY_STAMP,
|
||||
SVR_COPY_CARD,
|
||||
SVR_COPY_NEWS,
|
||||
SVR_SET_RAM_SCRIPT,
|
||||
SVR_SET_CLIENT_SCRIPT,
|
||||
SVR_COPY_SAVED_CARD,
|
||||
SVR_COPY_SAVED_NEWS,
|
||||
SVR_COPY_SAVED_RAM_SCRIPT,
|
||||
SVR_LOAD_UNK_1,
|
||||
SVR_CHECK_GAME_DATA_NEWS,
|
||||
};
|
||||
|
||||
// IDs for server messages when ending a script.
|
||||
// Given as the parameter to SVR_RETURN, and resolved to text in GetServerResultMessage
|
||||
enum {
|
||||
SVR_MSG_NOTHING_SENT,
|
||||
SVR_MSG_RECORD_UPLOADED,
|
||||
SVR_MSG_CARD_SENT,
|
||||
SVR_MSG_NEWS_SENT,
|
||||
SVR_MSG_STAMP_SENT,
|
||||
SVR_MSG_HAS_CARD,
|
||||
SVR_MSG_HAS_STAMP,
|
||||
SVR_MSG_HAS_NEWS,
|
||||
SVR_MSG_NO_ROOM_STAMPS,
|
||||
SVR_MSG_CLIENT_CANCELED,
|
||||
SVR_MSG_CANT_SEND_GIFT_1,
|
||||
SVR_MSG_COMM_ERROR,
|
||||
SVR_MSG_GIFT_SENT_1,
|
||||
SVR_MSG_GIFT_SENT_2,
|
||||
SVR_MSG_CANT_SEND_GIFT_2,
|
||||
};
|
||||
|
||||
struct MysteryGiftServerCmd
|
||||
{
|
||||
u32 instr;
|
||||
bool32 flag;
|
||||
const void * parameter;
|
||||
u32 parameter;
|
||||
const void * ptr;
|
||||
};
|
||||
|
||||
struct mevent_srv_common
|
||||
struct MysteryGiftServer
|
||||
{
|
||||
u32 unk_00;
|
||||
u32 unused;
|
||||
u32 param;
|
||||
u32 mainseqno;
|
||||
u32 funcId;
|
||||
u32 cmdidx;
|
||||
const struct mevent_cmd * cmdBuffer;
|
||||
const struct MysteryGiftServerCmd * script;
|
||||
void * recvBuffer;
|
||||
struct WonderCard * wonder_card;
|
||||
struct WonderNews * wonder_news;
|
||||
struct MEventStruct_Unk1442CC * mevent_unk1442cc;
|
||||
const void * sendBuffer1;
|
||||
u32 sendBuffer1Size;
|
||||
const void * sendBuffer2;
|
||||
u32 sendBuffer2Size;
|
||||
u32 sendWord;
|
||||
struct MysteryGiftLink manager;
|
||||
struct WonderCard * card;
|
||||
struct WonderNews * news;
|
||||
struct MysteryGiftLinkGameData * linkGameData;
|
||||
const void * ramScript;
|
||||
u32 ramScriptSize;
|
||||
const void * clientScript;
|
||||
u32 clientScriptSize;
|
||||
u32 stamp;
|
||||
struct MysteryGiftLink link;
|
||||
};
|
||||
|
||||
void mevent_srv_new_wcard();
|
||||
void mevent_srv_init_wnews();
|
||||
u32 mevent_srv_common_do_exec(u16 * a0);
|
||||
void MysterGiftServer_CreateForCard();
|
||||
void MysterGiftServer_CreateForNews();
|
||||
u32 MysterGiftServer_Run(u16 * endVal);
|
||||
|
||||
#endif //GUARD_MEVENT_SERVER_H
|
||||
|
||||
Reference in New Issue
Block a user