summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-11-03 19:16:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2019-11-03 19:16:53 -0500
commit89e0168ccec7d3963f30e4b2183f30736c65be75 (patch)
tree92b8ec24b06dc081149a7740b4980d156c938bfe
parent977925a9ee438e149212e438585c2d3d59e3f254 (diff)
Document mevent scripts
-rw-r--r--baserom.ipsbin449551 -> 449424 bytes
-rw-r--r--data/link_rfu_3.s21
-rw-r--r--data/mevent/script_common.inc157
-rw-r--r--data/mevent/script_ish.inc28
-rw-r--r--include/mevent.h12
-rw-r--r--include/mevent_server.h4
-rw-r--r--src/mevent.c18
-rw-r--r--src/mevent_server.c39
-rw-r--r--src/mystery_gift_menu.c5
9 files changed, 149 insertions, 135 deletions
diff --git a/baserom.ips b/baserom.ips
index 2d4bae0bd..9e3746b73 100644
--- a/baserom.ips
+++ b/baserom.ips
Binary files differ
diff --git a/data/link_rfu_3.s b/data/link_rfu_3.s
index ed1a09b16..9235d4b62 100644
--- a/data/link_rfu_3.s
+++ b/data/link_rfu_3.s
@@ -370,7 +370,22 @@ gUnknown_8459580:: @ 8459580
.incbin "baserom.gba", 0x459580, 0x8
gUnknown_8459588:: @ 8459588
- .incbin "baserom.gba", 0x459588, 0x64
+ .incbin "baserom.gba", 0x459588, 0x28
-gUnknown_84595EC:: @ 84595EC @ referenced in mevent/script_common.inc
- .incbin "baserom.gba", 0x4595EC, 0x48
+gUnknown_84595B0::
+ .string "Canceled reading the Card.$"
+
+ .align 2
+gUnknown_84595CC::
+ .4byte 0x02, 0x15 @ RECEIVE ID(0x15)
+ .4byte 0x0c, 0x00 @ READ PACKET AND COMPUTER SOMETHING
+ .4byte 0x14, 0x00 @ SEND ALL
+ .4byte 0x01, 0x0e @ RETURN 0x0e
+
+gMEventSrvScript_OtherTrainerCanceled:: @ 84595EC @ referenced in mevent/script_common.inc
+ .4byte 0x12, 0x20, gUnknown_84595CC @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x14, 0x1b, gUnknown_84595B0 @ SEND_STR
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x09, NULL @ RETURN (other trainer canceled)
diff --git a/data/mevent/script_common.inc b/data/mevent/script_common.inc
index abf03ab95..b4a811d01 100644
--- a/data/mevent/script_common.inc
+++ b/data/mevent/script_common.inc
@@ -1,84 +1,87 @@
-gUnknown_8468920::
- .4byte 0x12, 0x10, gUnknown_8468810
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x0a, NULL
- .4byte 0x12, 0x10, gUnknown_8468820
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x0b, NULL
- .4byte 0x12, 0x10, gUnknown_84688E0
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x09, NULL
+gMEventSrvScript_UnableToSend::
+ .4byte 0x12, 0x10, gMEventClientScript_UnableToRecv @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x0a, NULL @ RETURN (can't send)
-gUnknown_84689B0::
- .4byte 0x12, 0x10, gUnknown_8468898
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x07, NULL
+ .4byte 0x12, 0x10, gMEventClientScript_CommError @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x0b, NULL @ RETURN (comm error)
-gUnknown_84689E0::
- .4byte 0x12, 0x28, gUnknown_8468870
- .4byte 0x01, 0x00, NULL
- .4byte 0x0e, 0x00, NULL
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x13, NULL
- .4byte 0x08, 0x00, NULL
- .4byte 0x04, 0x01, gUnknown_84689B0
- .4byte 0x12, 0x10, gUnknown_84688A8
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x03, NULL
+ .4byte 0x12, 0x10, gMEventClientScript_OtherTrainerCanceled @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x09, NULL @ RETURN (other trn canceled)
-gUnknown_8468A64::
- .4byte 0x12, 0x30, gUnknown_8468840
- .4byte 0x01, 0x00, NULL
- .4byte 0x0d, 0x00, NULL
- .4byte 0x01, 0x00, NULL
- .4byte 0x0f, 0x00, NULL
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x02, NULL
+gMEventSrvScript_OtherTrnHasNews::
+ .4byte 0x12, 0x10, gMEventClientScript_AlredyHadNews @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x07, NULL @ RETURN (other trn has news)
-gUnknown_8468AC4::
- .4byte 0x12, 0x28, gUnknown_84688B8
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x13, NULL
- .4byte 0x08, 0x00, NULL
- .4byte 0x04, 0x00, gUnknown_8468A64
- .4byte 0x03, 0x00, gUnknown_84595EC
+gMEventSrvScript_SentNewsSuccess::
+ .4byte 0x12, 0x28, gMEventClientScript_ReceiveNewsAndValidate @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x0e, 0x00, NULL @ SEND_NEWS
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x13, NULL @ RECV
+ .4byte 0x08, 0x00, NULL @ READWORD
+ .4byte 0x04, 0x01, gMEventSrvScript_OtherTrnHasNews @ BRANCH_EQ
+ .4byte 0x12, 0x10, gMEventClientScript_RecvNewsSuccess @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x03, NULL @ RETURN (news sent to)
-gUnknown_8468B0C::
- .4byte 0x12, 0x10, gUnknown_84688F0
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x05, NULL
- .4byte 0x12, 0x10, gUnknown_8468830
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x14, NULL
- .4byte 0x00, 0x00, NULL
+gMEventSrvScript_SendCardSuccess::
+ .4byte 0x12, 0x30, gMEventClientScript_ReceiveCardAndReturnSuccess @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x0d, 0x00, NULL @ SEND_CARD
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x0f, 0x00, NULL @ BUFFER_SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x02, NULL @ RETURN (card sent to)
-gUnknown_8468B6C:: @ 8468B6C
- .4byte 0x1b, 0x00, NULL
- .4byte 0x12, 0x20, gUnknown_84687F0
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x11, NULL
- .4byte 0x05, 0x00, NULL
- .4byte 0x06, 0x00, NULL
- .4byte 0x04, 0x00, gUnknown_8468920
- .4byte 0x03, 0x00, gUnknown_84689E0
+gMEventSrvScript_AskClientToOverwriteCard::
+ .4byte 0x12, 0x28, gMEventClientScript_AskWouldLikeToTossCard @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x13, NULL @ RECV
+ .4byte 0x08, 0x00, NULL @ READWORD
+ .4byte 0x04, 0x00, gMEventSrvScript_SendCardSuccess @ BRANCH_EQ
+ .4byte 0x03, 0x00, gMEventSrvScript_OtherTrainerCanceled @ BRANCH
-gUnknown_8468BCC:: @ 8468BCC
- .4byte 0x1a, 0x00, NULL
- .4byte 0x1c, 0x00, NULL
- .4byte 0x12, 0x20, gUnknown_84687F0
- .4byte 0x01, 0x00, NULL
- .4byte 0x02, 0x11, NULL
- .4byte 0x05, 0x00, NULL
- .4byte 0x06, 0x00, NULL
- .4byte 0x04, 0x00, gUnknown_8468920
- .4byte 0x07, 0x00, NULL
- .4byte 0x04, 0x02, gUnknown_8468AC4
- .4byte 0x04, 0x00, gUnknown_8468A64
- .4byte 0x03, 0x00, gUnknown_8468B0C
+gMEventSrvScript_OtherTrnHasCard::
+ .4byte 0x12, 0x10, gMEventClientScript_AlreadyHadCard @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x05, NULL @ RETURN (other trn has card)
+
+ .4byte 0x12, 0x10, gMEventClientScript_NothingSentOver @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x14, NULL @ RECV
+ .4byte 0x00, 0x00, NULL @ RETURN (nothing sent over)
+
+gMEventSrvScript_SendNews:: @ 8468B6C
+ .4byte 0x1b, 0x00, NULL @ BUFFER_SAVED_NEWS
+ .4byte 0x12, 0x20, gMEventClientScript_Send1442CC @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x11, NULL @ RECV
+ .4byte 0x05, 0x00, NULL @ READ_1442CC
+ .4byte 0x06, 0x00, NULL @ VALID_1442CC
+ .4byte 0x04, 0x00, gMEventSrvScript_UnableToSend @ BRANCH_EQ
+ .4byte 0x03, 0x00, gMEventSrvScript_SentNewsSuccess @ BRANCH
+
+gMEventSrvScript_SendCard:: @ 8468BCC
+ .4byte 0x1a, 0x00, NULL @ BUFFER_SAVED_CARD
+ .4byte 0x1c, 0x00, NULL @ RAM_SCRIPT_IF_VALID
+ .4byte 0x12, 0x20, gMEventClientScript_Send1442CC @ SEND
+ .4byte 0x01, 0x00, NULL @ WAIT SEND
+ .4byte 0x02, 0x11, NULL @ RECV
+ .4byte 0x05, 0x00, NULL @ READ_1442CC
+ .4byte 0x06, 0x00, NULL @ VALID_1442CC
+ .4byte 0x04, 0x00, gMEventSrvScript_UnableToSend @ BRANCH_EQ
+ .4byte 0x07, 0x00, NULL @ CHECK_1442CC_14
+ .4byte 0x04, 0x02, gMEventSrvScript_AskClientToOverwriteCard @ BRANCH_EQ
+ .4byte 0x04, 0x00, gMEventSrvScript_SendCardSuccess @ BRANCH_EQ
+ .4byte 0x03, 0x00, gMEventSrvScript_OtherTrnHasCard @ BRANCH
diff --git a/data/mevent/script_ish.inc b/data/mevent/script_ish.inc
index 3d79cf1ee..d96356887 100644
--- a/data/mevent/script_ish.inc
+++ b/data/mevent/script_ish.inc
@@ -1,26 +1,26 @@
-gUnknown_84687E0:: @ 84687E0
+gMEVentClientScript_IntialListen:: @ 84687E0
.4byte 0x02, 0x10 @ RECEIVE ID(0x10)
.4byte 0x04, 0x00 @ JUMP TO RECEIVE BUFFER
-gUnknown_84687F0::
+gMEventClientScript_Send1442CC::
.4byte 0x08, 0x00 @ SEND HEADER MAYBE
.4byte 0x03, 0x00 @ WAIT SEND
.4byte 0x02, 0x10 @ RECEIVE ID(0x10)
.4byte 0x04, 0x00 @ JUMP TO RECEIVE BUFFER
-gUnknown_8468810::
+gMEventClientScript_UnableToRecv:: @ can't accept card or news
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x0a @ RETURN 0x0a
-gUnknown_8468820::
+gMEventClientScript_CommError:: @ comm error
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x0b @ RETURN 0x0b
-gUnknown_8468830::
+gMEventClientScript_NothingSentOver:: @ nothing sent
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x00 @ RETURN 0x00
-gUnknown_8468840::
+gMEventClientScript_ReceiveCardAndReturnSuccess:: @ card success
.4byte 0x02, 0x16 @ RECEIVE ID(0x16)
.4byte 0x0a, 0x00 @ RECEIVE_TO_SAVE_FILE
.4byte 0x02, 0x19 @ RECEIVE ID(0x19)
@@ -28,37 +28,37 @@ gUnknown_8468840::
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x02 @ RETURN 0x02
-gUnknown_8468870::
+gMEventClientScript_ReceiveNewsAndValidate::
.4byte 0x02, 0x17 @ RECEIVE ID(0x17)
- .4byte 0x09, 0x00 @ VALIDATE BUFF3120
+ .4byte 0x09, 0x00 @ VALIDATE NEWS
.4byte 0x03, 0x00 @ WAIT SEND
.4byte 0x02, 0x10 @ RECEIVE ID(0x10)
.4byte 0x04, 0x00 @ JUMP TO RECEIVE BUFFER
-gUnknown_8468898::
+gMEventClientScript_AlredyHadNews:: @ already had news
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x07 @ RETURN 0x07
-gUnknown_84688A8::
+gMEventClientScript_RecvNewsSuccess:: @ news success
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x03 @ RETURN 0x03
-gUnknown_84688B8::
+gMEventClientScript_AskWouldLikeToTossCard::
.4byte 0x0d, 0x00 @ REQUEST PARAMETER
.4byte 0x0e, 0x00 @ SEND PARAMETER
.4byte 0x03, 0x00 @ WAIT SEND
.4byte 0x02, 0x10 @ RECEIVE ID(0x10)
.4byte 0x04, 0x00 @ JUMP TO RECEIVE BUFFER
-gUnknown_84688E0::
+gMEventClientScript_OtherTrainerCanceled:: @ comm cancelled
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x09 @ RETURN 0x09
-gUnknown_84688F0::
+gMEventClientScript_AlreadyHadCard:: @ already had card
.4byte 0x14, 0x00 @ SEND ALL
.4byte 0x01, 0x05 @ RETURN 0x05
-gUnknown_8468900::
+gMEventClientScript_SuccessFromBuffer:: @ success from buffer
.4byte 0x02, 0x15 @ RECEIVE ID(0x15)
.4byte 0x0c, 0x00 @ READ PACKET AND COMPUTE SOMETHING
.4byte 0x14, 0x00 @ SEND ALL
diff --git a/include/mevent.h b/include/mevent.h
index 31ab9e421..88e779fbf 100644
--- a/include/mevent.h
+++ b/include/mevent.h
@@ -10,15 +10,15 @@ struct MEventStruct_Unk1442CC
u32 unk_08;
u16 unk_0C;
u32 unk_10;
- u16 unk_14;
+ u16 id;
u16 unk_16[4];
struct MEventBuffer_3430_Sub unk_20;
u8 unk_44;
- u8 unk_45[7];
- u8 unk_4C[4];
- u16 unk_50[6];
- u8 unk_5C[4];
- u8 unk_60;
+ u8 playerName[7];
+ u8 playerTrainerId[4];
+ u16 easyChatProfile[6];
+ u8 gameCode[4];
+ u8 version;
};
struct MEvent_Str_1
diff --git a/include/mevent_server.h b/include/mevent_server.h
index 10ee96401..f1e9df02b 100644
--- a/include/mevent_server.h
+++ b/include/mevent_server.h
@@ -66,8 +66,8 @@ struct mevent_srv_common
u32 cmdidx;
const struct mevent_cmd * cmdBuffer;
void * recvBuffer;
- struct MEventBuffer_32E0_Sub * mevent_32e0;
- struct MEventBuffer_3120_Sub * mevent_3120;
+ struct MEventBuffer_32E0_Sub * card;
+ struct MEventBuffer_3120_Sub * news;
struct MEventStruct_Unk1442CC * mevent_unk1442cc;
void * sendBuffer1;
u32 sendBuffer1Size;
diff --git a/src/mevent.c b/src/mevent.c
index 00bffdfc3..be8e3070a 100644
--- a/src/mevent.c
+++ b/src/mevent.c
@@ -761,20 +761,20 @@ void sub_81442CC(struct MEventStruct_Unk1442CC * data)
data->unk_10 = 1;
if (ValidateReceivedWonderCard())
{
- data->unk_14 = GetSavedWonderCard()->unk_00;
+ data->id = GetSavedWonderCard()->unk_00;
data->unk_20 = *sav1_get_mevent_buffer_2();
data->unk_44 = GetSavedWonderCard()->unk_09;
}
else
- data->unk_14 = 0;
+ data->id = 0;
for (i = 0; i < 4; i++)
data->unk_16[i] = gSaveBlock1Ptr->unk_3120.unk_338[i];
- CopyTrainerId(data->unk_4C, gSaveBlock2Ptr->playerTrainerId);
- StringCopy(data->unk_45, gSaveBlock2Ptr->playerName);
+ CopyTrainerId(data->playerTrainerId, gSaveBlock2Ptr->playerTrainerId);
+ StringCopy(data->playerName, gSaveBlock2Ptr->playerName);
for (i = 0; i < 6; i++)
- data->unk_50[i] = gSaveBlock1Ptr->easyChatProfile[i];
- memcpy(data->unk_5C, RomHeaderGameCode, 4);
- data->unk_60 = RomHeaderSoftwareVersion;
+ data->easyChatProfile[i] = gSaveBlock1Ptr->easyChatProfile[i];
+ memcpy(data->gameCode, RomHeaderGameCode, 4);
+ data->version = RomHeaderSoftwareVersion;
}
bool32 sub_81443D4(const struct MEventStruct_Unk1442CC * data)
@@ -794,9 +794,9 @@ bool32 sub_81443D4(const struct MEventStruct_Unk1442CC * data)
u32 sub_8144418(const u16 * a0, const struct MEventStruct_Unk1442CC * a1, void * unused)
{
- if (a1->unk_14 == 0)
+ if (a1->id == 0)
return 0;
- if (*a0 == a1->unk_14)
+ if (*a0 == a1->id)
return 1;
return 2;
}
diff --git a/src/mevent_server.c b/src/mevent_server.c
index 9fe9e9e79..059bde4a9 100644
--- a/src/mevent_server.c
+++ b/src/mevent_server.c
@@ -1,9 +1,6 @@
#include "global.h"
#include "malloc.h"
#include "decompress.h"
-#include "util.h"
-#include "link.h"
-#include "link_rfu.h"
#include "overworld.h"
#include "script.h"
#include "battle_tower.h"
@@ -21,9 +18,9 @@ static void mevent_srv_init_common(struct mevent_srv_common *, const void *, u32
static void mevent_srv_free_resources(struct mevent_srv_common *);
static u32 mevent_srv_exec_common(struct mevent_srv_common *);
-extern const u8 gUnknown_84687E0[];
-extern const struct mevent_cmd gUnknown_8468B6C[];
-extern const struct mevent_cmd gUnknown_8468BCC[];
+extern const u8 gMEVentClientScript_IntialListen[];
+extern const struct mevent_cmd gMEventSrvScript_SendNews[];
+extern const struct mevent_cmd gMEventSrvScript_SendCard[];
void mevent_client_do_init(void)
{
@@ -98,7 +95,7 @@ static void mevent_client_send_word(struct mevent_client * svr, u32 ident, u32 w
static u32 ish_mainseq_0(struct mevent_client * svr)
{
// init
- memcpy(svr->cmdBuffer, gUnknown_84687E0, ME_SEND_BUF_SIZE);
+ memcpy(svr->cmdBuffer, gMEVentClientScript_IntialListen, ME_SEND_BUF_SIZE);
svr->cmdidx = 0;
svr->mainseqno = 4;
svr->flag = 0;
@@ -300,13 +297,13 @@ static u32 mevent_client_exec(struct mevent_client * svr)
void mevent_srv_init_wnews(void)
{
s_mevent_srv_common_ptr = AllocZeroed(sizeof(struct mevent_srv_common));
- mevent_srv_init_common(s_mevent_srv_common_ptr, gUnknown_8468B6C, 0, 1);
+ mevent_srv_init_common(s_mevent_srv_common_ptr, gMEventSrvScript_SendNews, 0, 1);
}
void mevent_srv_new_wcard(void)
{
s_mevent_srv_common_ptr = AllocZeroed(sizeof(struct mevent_srv_common));
- mevent_srv_init_common(s_mevent_srv_common_ptr, gUnknown_8468BCC, 0, 1);
+ mevent_srv_init_common(s_mevent_srv_common_ptr, gMEventSrvScript_SendCard, 0, 1);
}
u32 mevent_srv_common_do_exec(u16 * a0)
@@ -329,8 +326,8 @@ static void mevent_srv_init_common(struct mevent_srv_common * svr, const void *
{
svr->unk_00 = 0;
svr->mainseqno = 0;
- svr->mevent_32e0 = AllocZeroed(sizeof(struct MEventBuffer_32E0_Sub));
- svr->mevent_3120 = AllocZeroed(sizeof(struct MEventBuffer_3120_Sub));
+ svr->card = AllocZeroed(sizeof(struct MEventBuffer_32E0_Sub));
+ svr->news = AllocZeroed(sizeof(struct MEventBuffer_3120_Sub));
svr->recvBuffer = AllocZeroed(ME_SEND_BUF_SIZE);
svr->mevent_unk1442cc = AllocZeroed(sizeof(struct MEventStruct_Unk1442CC));
svr->cmdBuffer = cmdBuffer;
@@ -340,8 +337,8 @@ static void mevent_srv_init_common(struct mevent_srv_common * svr, const void *
static void mevent_srv_free_resources(struct mevent_srv_common * svr)
{
- Free(svr->mevent_32e0);
- Free(svr->mevent_3120);
+ Free(svr->card);
+ Free(svr->news);
Free(svr->recvBuffer);
Free(svr->mevent_unk1442cc);
}
@@ -445,7 +442,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr)
break;
case 7:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 396);
- ptr = mevent_first_if_not_null_else_second(cmd->parameter, svr->mevent_32e0);
+ ptr = mevent_first_if_not_null_else_second(cmd->parameter, svr->card);
svr->param = sub_8144418(ptr, svr->mevent_unk1442cc, ptr);
break;
case 8:
@@ -472,11 +469,11 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr)
break;
case 14:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 432);
- mevent_srv_common_init_send(svr, 0x17, mevent_first_if_not_null_else_second(cmd->parameter, svr->mevent_3120), sizeof(struct MEventBuffer_3120_Sub));
+ mevent_srv_common_init_send(svr, 0x17, mevent_first_if_not_null_else_second(cmd->parameter, svr->news), sizeof(struct MEventBuffer_3120_Sub));
break;
case 13:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 438);
- mevent_srv_common_init_send(svr, 0x16, mevent_first_if_not_null_else_second(cmd->parameter, svr->mevent_32e0), sizeof(struct MEventBuffer_32E0_Sub));
+ mevent_srv_common_init_send(svr, 0x16, mevent_first_if_not_null_else_second(cmd->parameter, svr->card), sizeof(struct MEventBuffer_32E0_Sub));
break;
case 16:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 444);
@@ -506,11 +503,11 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr)
break;
case 22:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 481);
- memcpy(svr->mevent_32e0, cmd->parameter, 332);
+ memcpy(svr->card, cmd->parameter, 332);
break;
case 23:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 486);
- memcpy(svr->mevent_3120, cmd->parameter, 444);
+ memcpy(svr->news, cmd->parameter, 444);
break;
case 21:
AGB_ASSERT_EX(cmd->flag == FALSE, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 491);
@@ -526,12 +523,12 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr)
break;
case 26:
AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 506);
- memcpy(svr->mevent_32e0, GetSavedWonderCard(), 332);
- sub_814410C(svr->mevent_32e0);
+ memcpy(svr->card, GetSavedWonderCard(), 332);
+ sub_814410C(svr->card);
break;
case 27:
AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 512);
- memcpy(svr->mevent_3120, GetSavedWonderNews(), 444);
+ memcpy(svr->news, GetSavedWonderNews(), 444);
break;
case 28:
AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/mevent_server.c", 517);
diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c
index 13a6d37e2..55a1a7287 100644
--- a/src/mystery_gift_menu.c
+++ b/src/mystery_gift_menu.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "palette.h"
-#include "dma3.h"
#include "gpu_regs.h"
#include "bg.h"
#include "task.h"
@@ -1095,7 +1094,7 @@ const u8 * mevent_message_stamp_card_etc_send_status(u32 * a0, u8 unused, u32 ms
return result;
}
-bool32 PrintMGSendStatus(u8 * state, u16 * arg1, u8 arg2, u32 msgId)
+static bool32 PrintMGSendStatus(u8 * state, u16 * arg1, u8 arg2, u32 msgId)
{
u32 flag;
const u8 * str = mevent_message_stamp_card_etc_send_status(&flag, arg2, msgId);
@@ -1278,7 +1277,7 @@ void task00_mystery_gift(u8 taskId)
case 8:
switch (mevent_client_do_exec(&data->curPromptWindowId))
{
- case 6:
+ case 6: // done
task_add_05_task_del_08FA224_when_no_RfuFunc();
data->prevPromptWindowId = data->curPromptWindowId;
data->state = 13;