mirror of
https://github.com/pret/pokeplatinum.git
synced 2024-11-27 08:00:25 +00:00
More comm sys, what else is new
This commit is contained in:
parent
0b3f13ad11
commit
702c0363b6
@ -24,7 +24,7 @@ void sub_02035678(void);
|
||||
void sub_0203568C(void);
|
||||
void sub_0203572C(void);
|
||||
void sub_02035938(u8 param0);
|
||||
BOOL sub_0203597C(int param0, const void * param1, int param2);
|
||||
BOOL CommSys_SendDataHuge(int param0, const void * param1, int param2);
|
||||
BOOL CommSys_SendData(int param0, const void * param1, int param2);
|
||||
BOOL sub_02035A3C(int param0, const void * param1, int param2);
|
||||
BOOL CommSys_SendDataServer(int param0, const void * param1, int param2);
|
||||
@ -37,10 +37,10 @@ void CommSys_SetSendSpeed(u8 param0);
|
||||
u8 CommSys_RecvSpeed(int param0);
|
||||
u16 sub_02035E84(int param0);
|
||||
void CommSys_EnableSendMovementData(void);
|
||||
void sub_02035EC8(void);
|
||||
BOOL sub_02035EE0(void);
|
||||
BOOL CommSys_ServerSetSendQueue(int param0, const void * param1, int param2);
|
||||
BOOL sub_02035F58(int param0, const void * param1, int param2);
|
||||
void CommSys_DisableSendMovementData(void);
|
||||
BOOL CommSys_IsSendingMovementData(void);
|
||||
BOOL CommSys_WriteToQueueServer(int param0, const void * param1, int param2);
|
||||
BOOL CommSys_WriteToQueue(int param0, const void * param1, int param2);
|
||||
void sub_02036008(int param0, int param1, void * param2, void * param3);
|
||||
void sub_02036030(int param0, int param1, void * param2, void * param3);
|
||||
void sub_02036058(int param0, int param1, void * param2, void * param3);
|
||||
|
@ -6,11 +6,11 @@
|
||||
#include "struct_defs/struct_0203233C.h"
|
||||
|
||||
BOOL CommQueue_IsEmpty(CommQueueMan * param0);
|
||||
BOOL sub_02032498(CommQueueMan * param0, int param1, u8 * param2, int param3, BOOL param4, BOOL param5);
|
||||
BOOL CommQueue_Write(CommQueueMan * param0, int param1, u8 * param2, int param3, BOOL param4, BOOL param5);
|
||||
BOOL sub_02032574(CommQueueMan * param0, UnkStruct_0203233C * param1, BOOL param2);
|
||||
void CommQueueMan_Init(CommQueueMan * param0, int param1, CommRing * param2);
|
||||
void CommQueueMan_Reset(CommQueueMan * param0);
|
||||
void sub_02032638(CommQueueMan * param0);
|
||||
void CommQueueMan_Delete(CommQueueMan * param0);
|
||||
BOOL CommQueue_CompareCmd(CommQueueMan * param0, int param1);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_020322D8_H
|
||||
|
@ -1074,7 +1074,7 @@ static void CommPlayer_MoveClient (int netId)
|
||||
|
||||
if (sCommPlayerManager->forceDirTimer && (netId == CommSys_CurNetId())) {
|
||||
sCommPlayerManager->forceDirTimer--;
|
||||
} else if (!sub_02035EE0() && sCommPlayerManager->isUnderground && (netId == CommSys_CurNetId())) {
|
||||
} else if (!CommSys_IsSendingMovementData() && sCommPlayerManager->isUnderground && (netId == CommSys_CurNetId())) {
|
||||
v9 = sub_0206147C(
|
||||
playerAvatar, pad, pad, v10, 1, 0);
|
||||
} else if (((pad & ~PAD_BUTTON_B) == 0) && (playerLocation->collisionFlag)) {
|
||||
|
@ -232,11 +232,11 @@ BOOL CommInfo_ServerSendArray (void)
|
||||
if (sCommInfo->infoState[netId] != INFO_STATE_EMPTY) {
|
||||
sCommInfo->playerInfo[netId].netId = netId;
|
||||
MI_CpuCopy8(sCommInfo->trainerInfo[netId], sCommInfo->playerInfo[netId].trainerInfoBuffer, TrainerInfo_Size());
|
||||
CommSys_ServerSetSendQueue(4, &sCommInfo->playerInfo[netId], sizeof(CommPlayerInfo));
|
||||
CommSys_WriteToQueueServer(4, &sCommInfo->playerInfo[netId], sizeof(CommPlayerInfo));
|
||||
}
|
||||
}
|
||||
|
||||
CommSys_ServerSetSendQueue(5, NULL, 0);
|
||||
CommSys_WriteToQueueServer(5, NULL, 0);
|
||||
sCommInfo->dataRecvFlag = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ typedef struct {
|
||||
u8 sendBufferCommRing[264];
|
||||
u8 sendBufferCommRingServer[384];
|
||||
u8 * unk_488;
|
||||
u8 * unk_48C;
|
||||
u8 * unk_490;
|
||||
u8 * unk_494;
|
||||
u8 * recvBufferRingServer;
|
||||
u8 * recvBufferRing;
|
||||
u8 * tempBuffer;
|
||||
CommRing sendRing;
|
||||
CommRing recvRing;
|
||||
CommRing unk_4B0[8];
|
||||
@ -73,7 +73,7 @@ typedef struct {
|
||||
MATHRandContext32 rand;
|
||||
u16 unk_63C[8];
|
||||
u8 recvSpeed[8];
|
||||
u16 unk_654;
|
||||
u16 sendHeldKeys;
|
||||
u8 unk_656;
|
||||
u8 sendSpeed;
|
||||
u8 unk_658;
|
||||
@ -113,7 +113,7 @@ typedef struct {
|
||||
static void sub_0203463C(void);
|
||||
static void sub_0203498C(SysTask * param0, void * param1);
|
||||
static void sub_02034B50(void);
|
||||
static void sub_02034DC8(void);
|
||||
static void CommSys_UpdateServerClient(void);
|
||||
static void sub_02034F68(void);
|
||||
static void sub_02035394(BOOL param0);
|
||||
static void sub_020353B0(BOOL param0);
|
||||
@ -168,9 +168,9 @@ static BOOL CommSys_Init (BOOL shouldAlloc, int maxPacketSize)
|
||||
sCommunicationSystem->allocSize = sCommunicationSystem->maxPacketSize * maxMachines;
|
||||
sCommunicationSystem->transmissionType = TRANSMISSION_TYPE_SERVER_CLIENT;
|
||||
sCommunicationSystem->unk_6A6 = 38;
|
||||
sCommunicationSystem->unk_490 = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->maxPacketSize * 2);
|
||||
sCommunicationSystem->unk_494 = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->maxPacketSize);
|
||||
sCommunicationSystem->unk_48C = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->allocSize);
|
||||
sCommunicationSystem->recvBufferRing = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->maxPacketSize * 2);
|
||||
sCommunicationSystem->tempBuffer = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->maxPacketSize);
|
||||
sCommunicationSystem->recvBufferRingServer = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->allocSize);
|
||||
sCommunicationSystem->unk_488 = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, sCommunicationSystem->allocSize);
|
||||
|
||||
if (sub_0203895C() == 10) {
|
||||
@ -213,13 +213,13 @@ static void CommSys_ClearData (void)
|
||||
sCommunicationSystem->unk_658 = 0;
|
||||
sCommunicationSystem->unk_659 = 0;
|
||||
|
||||
MI_CpuClear8(sCommunicationSystem->unk_48C, sCommunicationSystem->allocSize);
|
||||
MI_CpuClear8(sCommunicationSystem->recvBufferRingServer, sCommunicationSystem->allocSize);
|
||||
MI_CpuClear8(sCommunicationSystem->sendRingClient, sizeof(CommRing) * (7 + 1));
|
||||
|
||||
size = sCommunicationSystem->allocSize / maxMachines;
|
||||
|
||||
for (netId = 0; netId < maxMachines; netId++) {
|
||||
CommRing_Init(&sCommunicationSystem->sendRingClient[netId], &sCommunicationSystem->unk_48C[netId * size], size);
|
||||
CommRing_Init(&sCommunicationSystem->sendRingClient[netId], &sCommunicationSystem->recvBufferRingServer[netId * size], size);
|
||||
}
|
||||
|
||||
MI_CpuClear8(sCommunicationSystem->unk_488, sCommunicationSystem->allocSize);
|
||||
@ -244,8 +244,8 @@ static void CommSys_ClearData (void)
|
||||
sCommunicationSystem->sendBuffer[0][0] = 0xff;
|
||||
sCommunicationSystem->sendBuffer[1][0] = 0xff;
|
||||
|
||||
MI_CpuClear8(sCommunicationSystem->unk_490, sCommunicationSystem->maxPacketSize * 2);
|
||||
CommRing_Init(&sCommunicationSystem->recvRing, sCommunicationSystem->unk_490, sCommunicationSystem->maxPacketSize * 2);
|
||||
MI_CpuClear8(sCommunicationSystem->recvBufferRing, sCommunicationSystem->maxPacketSize * 2);
|
||||
CommRing_Init(&sCommunicationSystem->recvRing, sCommunicationSystem->recvBufferRing, sCommunicationSystem->maxPacketSize * 2);
|
||||
|
||||
sCommunicationSystem->unk_6AC = 0;
|
||||
sCommunicationSystem->unk_6AD = 0;
|
||||
@ -304,7 +304,7 @@ static void CommSys_ClearServerRecvData (int netId)
|
||||
int v1 = sCommunicationSystem->allocSize / v0;
|
||||
|
||||
CommRing_Init(&sCommunicationSystem->unk_4B0[netId], &sCommunicationSystem->unk_488[netId * v1], v1);
|
||||
CommRing_Init(&sCommunicationSystem->sendRingClient[netId], &sCommunicationSystem->unk_48C[netId * v1], v1);
|
||||
CommRing_Init(&sCommunicationSystem->sendRingClient[netId], &sCommunicationSystem->recvBufferRingServer[netId * v1], v1);
|
||||
}
|
||||
|
||||
sCommunicationSystem->commRecvServer[netId].unk_0A = 0xee;
|
||||
@ -457,12 +457,12 @@ void CommSys_Delete (void)
|
||||
SysTask_Done(sCommunicationSystem->unk_57C);
|
||||
sCommunicationSystem->unk_57C = NULL;
|
||||
|
||||
Heap_FreeToHeap(sCommunicationSystem->unk_490);
|
||||
Heap_FreeToHeap(sCommunicationSystem->unk_494);
|
||||
Heap_FreeToHeap(sCommunicationSystem->unk_48C);
|
||||
Heap_FreeToHeap(sCommunicationSystem->recvBufferRing);
|
||||
Heap_FreeToHeap(sCommunicationSystem->tempBuffer);
|
||||
Heap_FreeToHeap(sCommunicationSystem->recvBufferRingServer);
|
||||
Heap_FreeToHeap(sCommunicationSystem->unk_488);
|
||||
sub_02032638(&sCommunicationSystem->commQueueManSendServer);
|
||||
sub_02032638(&sCommunicationSystem->commQueueManSend);
|
||||
CommQueueMan_Delete(&sCommunicationSystem->commQueueManSendServer);
|
||||
CommQueueMan_Delete(&sCommunicationSystem->commQueueManSend);
|
||||
Heap_FreeToHeap((void *)Unk_021C07C8);
|
||||
|
||||
sCommunicationSystem = NULL;
|
||||
@ -481,7 +481,7 @@ static void sub_0203498C (SysTask * param0, void * param1)
|
||||
sub_020353CC();
|
||||
|
||||
if (((CommSys_CurNetId() == 0) && (CommSys_IsPlayerConnected(0))) || CommSys_IsAlone()) {
|
||||
sub_02034DC8();
|
||||
CommSys_UpdateServerClient();
|
||||
}
|
||||
|
||||
Unk_021C07C5 = 0;
|
||||
@ -514,10 +514,10 @@ BOOL CommSys_Update (void)
|
||||
sCommunicationSystem->unk_6B5++;
|
||||
Unk_021C07C5 = 0;
|
||||
CommSys_UpdateTransitionType();
|
||||
sCommunicationSystem->unk_654 |= (gCoreSys.heldKeys & 0x7fff);
|
||||
sCommunicationSystem->sendHeldKeys |= (gCoreSys.heldKeys & 0x7fff);
|
||||
sub_02035534();
|
||||
sub_02034B50();
|
||||
sCommunicationSystem->unk_654 &= 0x8000;
|
||||
sCommunicationSystem->sendHeldKeys &= 0x8000;
|
||||
|
||||
if (CommSys_TransmissionType() == TRANSMISSION_TYPE_SERVER_CLIENT) {
|
||||
CommSys_RecvData();
|
||||
@ -718,7 +718,7 @@ static BOOL sub_02034CF8 (int param0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void sub_02034DC8 (void)
|
||||
static void CommSys_UpdateServerClient (void)
|
||||
{
|
||||
int v0;
|
||||
int v1 = 0;
|
||||
@ -847,13 +847,12 @@ static void sub_02034F68 (void)
|
||||
|
||||
Unk_02100A1C = 0;
|
||||
|
||||
sub_02034DC8();
|
||||
CommSys_UpdateServerClient();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0203509C (u16 param0, u16 * param1, u16 param2)
|
||||
{
|
||||
u8 * v0 = (u8 *)param1;
|
||||
sub_020350A4(param0, param1, param2);
|
||||
}
|
||||
|
||||
@ -1102,24 +1101,24 @@ static void sub_02035534 (void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(sCommunicationSystem->unk_654 & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN))) {
|
||||
if (!(sCommunicationSystem->sendHeldKeys & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sCommunicationSystem->unk_658 == 2) {
|
||||
if (sCommunicationSystem->unk_654 & PAD_KEY_LEFT) {
|
||||
if (sCommunicationSystem->sendHeldKeys & PAD_KEY_LEFT) {
|
||||
v0 |= PAD_KEY_RIGHT;
|
||||
}
|
||||
|
||||
if (sCommunicationSystem->unk_654 & PAD_KEY_RIGHT) {
|
||||
if (sCommunicationSystem->sendHeldKeys & PAD_KEY_RIGHT) {
|
||||
v0 |= PAD_KEY_LEFT;
|
||||
}
|
||||
|
||||
if (sCommunicationSystem->unk_654 & PAD_KEY_UP) {
|
||||
if (sCommunicationSystem->sendHeldKeys & PAD_KEY_UP) {
|
||||
v0 |= PAD_KEY_DOWN;
|
||||
}
|
||||
|
||||
if (sCommunicationSystem->unk_654 & PAD_KEY_DOWN) {
|
||||
if (sCommunicationSystem->sendHeldKeys & PAD_KEY_DOWN) {
|
||||
v0 |= PAD_KEY_UP;
|
||||
}
|
||||
} else {
|
||||
@ -1151,8 +1150,8 @@ static void sub_02035534 (void)
|
||||
}
|
||||
}
|
||||
|
||||
sCommunicationSystem->unk_654 &= ~(PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN);
|
||||
sCommunicationSystem->unk_654 += v0;
|
||||
sCommunicationSystem->sendHeldKeys &= ~(PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN);
|
||||
sCommunicationSystem->sendHeldKeys += v0;
|
||||
}
|
||||
|
||||
void sub_02035664 (void)
|
||||
@ -1209,7 +1208,7 @@ static BOOL sub_02035730 (u8 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sub_02035EE0() == 0) {
|
||||
if (CommSys_IsSendingMovementData() == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1217,16 +1216,16 @@ static BOOL sub_02035730 (u8 * param0)
|
||||
sCommunicationSystem->unk_6A9--;
|
||||
}
|
||||
|
||||
if (sCommunicationSystem->unk_654 & PAD_KEY_UP) {
|
||||
if (sCommunicationSystem->sendHeldKeys & PAD_KEY_UP) {
|
||||
param0[0] = param0[0] | 0x0 | 0x10;
|
||||
sCommunicationSystem->unk_6A9 = 8;
|
||||
} else if (sCommunicationSystem->unk_654 & PAD_KEY_DOWN) {
|
||||
} else if (sCommunicationSystem->sendHeldKeys & PAD_KEY_DOWN) {
|
||||
param0[0] = param0[0] | 0x4 | 0x10;
|
||||
sCommunicationSystem->unk_6A9 = 8;
|
||||
} else if (sCommunicationSystem->unk_654 & PAD_KEY_LEFT) {
|
||||
} else if (sCommunicationSystem->sendHeldKeys & PAD_KEY_LEFT) {
|
||||
param0[0] = param0[0] | 0x8 | 0x10;
|
||||
sCommunicationSystem->unk_6A9 = 8;
|
||||
} else if (sCommunicationSystem->unk_654 & PAD_KEY_RIGHT) {
|
||||
} else if (sCommunicationSystem->sendHeldKeys & PAD_KEY_RIGHT) {
|
||||
param0[0] = param0[0] | 0xC | 0x10;
|
||||
sCommunicationSystem->unk_6A9 = 8;
|
||||
}
|
||||
@ -1332,13 +1331,13 @@ static BOOL sub_0203594C (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL sub_0203597C (int param0, const void * param1, int param2)
|
||||
BOOL CommSys_SendDataHuge (int cmd, const void * param1, int param2)
|
||||
{
|
||||
if (!CommSys_IsPlayerConnected(CommSys_CurNetId()) && !CommSys_IsAlone()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sub_02032498(&sCommunicationSystem->commQueueManSend, param0, (u8 *)param1, param2, 1, 0)) {
|
||||
if (CommQueue_Write(&sCommunicationSystem->commQueueManSend, cmd, (u8 *)param1, param2, 1, 0)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1349,13 +1348,13 @@ BOOL sub_0203597C (int param0, const void * param1, int param2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CommSys_SendData (int param0, const void * param1, int param2)
|
||||
BOOL CommSys_SendData (int cmd, const void * param1, int param2)
|
||||
{
|
||||
if (!CommSys_IsPlayerConnected(CommSys_CurNetId()) && !CommSys_IsAlone()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sub_02032498(&sCommunicationSystem->commQueueManSend, param0, (u8 *)param1, param2, 1, 1)) {
|
||||
if (CommQueue_Write(&sCommunicationSystem->commQueueManSend, cmd, (u8 *)param1, param2, 1, 1)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1366,7 +1365,7 @@ BOOL CommSys_SendData (int param0, const void * param1, int param2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL sub_02035A3C (int param0, const void * param1, int param2)
|
||||
BOOL sub_02035A3C (int cmd, const void * param1, int param2)
|
||||
{
|
||||
if (CommSys_CurNetId() != 0) {
|
||||
GF_ASSERT(FALSE);
|
||||
@ -1378,10 +1377,10 @@ BOOL sub_02035A3C (int param0, const void * param1, int param2)
|
||||
}
|
||||
|
||||
if (CommSys_TransmissionType() == 1) {
|
||||
return sub_0203597C(param0, param1, param2);
|
||||
return CommSys_SendDataHuge(cmd, param1, param2);
|
||||
}
|
||||
|
||||
if (sub_02032498(&sCommunicationSystem->commQueueManSendServer, param0, (u8 *)param1, param2, 1, 0)) {
|
||||
if (CommQueue_Write(&sCommunicationSystem->commQueueManSendServer, cmd, (u8 *)param1, param2, 1, 0)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1392,7 +1391,7 @@ BOOL sub_02035A3C (int param0, const void * param1, int param2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CommSys_SendDataServer (int param0, const void * param1, int param2)
|
||||
BOOL CommSys_SendDataServer (int cmd, const void * param1, int param2)
|
||||
{
|
||||
if (CommSys_CurNetId() != 0) {
|
||||
sub_020363BC();
|
||||
@ -1405,10 +1404,10 @@ BOOL CommSys_SendDataServer (int param0, const void * param1, int param2)
|
||||
}
|
||||
|
||||
if (CommSys_TransmissionType() == 1) {
|
||||
return CommSys_SendData(param0, param1, param2);
|
||||
return CommSys_SendData(cmd, param1, param2);
|
||||
}
|
||||
|
||||
if (sub_02032498(&sCommunicationSystem->commQueueManSendServer, param0, (u8 *)param1, param2, 1, 1)) {
|
||||
if (CommQueue_Write(&sCommunicationSystem->commQueueManSendServer, cmd, (u8 *)param1, param2, 1, 1)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1419,9 +1418,9 @@ BOOL CommSys_SendDataServer (int param0, const void * param1, int param2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL sub_02035B48 (int param0, const void * param1)
|
||||
BOOL sub_02035B48 (int cmd, const void * param1)
|
||||
{
|
||||
return CommSys_SendDataServer(param0, param1, 0);
|
||||
return CommSys_SendDataServer(cmd, param1, 0);
|
||||
}
|
||||
|
||||
int CommSys_SendRingRemainingSize (void)
|
||||
@ -1538,7 +1537,7 @@ static void CommSys_RecvData (void)
|
||||
CommRing_UpdateEndPos(&sCommunicationSystem->recvRing);
|
||||
|
||||
if (CommRing_DataSize(&sCommunicationSystem->recvRing) > 0) {
|
||||
CommSys_RecvDataSingle(&sCommunicationSystem->recvRing, v0, sCommunicationSystem->unk_494, &sCommunicationSystem->commRecvClient);
|
||||
CommSys_RecvDataSingle(&sCommunicationSystem->recvRing, v0, sCommunicationSystem->tempBuffer, &sCommunicationSystem->commRecvClient);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1563,7 +1562,7 @@ static void CommSys_RecvDataServer (void)
|
||||
CommRing_UpdateEndPos(&sCommunicationSystem->sendRingClient[v0]);
|
||||
|
||||
if (CommRing_DataSize(&sCommunicationSystem->sendRingClient[v0]) > 0) {
|
||||
CommSys_RecvDataSingle(&sCommunicationSystem->sendRingClient[v0], v0, sCommunicationSystem->unk_494, &sCommunicationSystem->commRecvServer[v0]);
|
||||
CommSys_RecvDataSingle(&sCommunicationSystem->sendRingClient[v0], v0, sCommunicationSystem->tempBuffer, &sCommunicationSystem->commRecvServer[v0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1660,38 +1659,38 @@ u16 sub_02035E84 (int param0)
|
||||
void CommSys_EnableSendMovementData (void)
|
||||
{
|
||||
if (sCommunicationSystem) {
|
||||
sCommunicationSystem->unk_654 |= 0x8000;
|
||||
sCommunicationSystem->sendHeldKeys |= 0x8000;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_02035EC8 (void)
|
||||
void CommSys_DisableSendMovementData (void)
|
||||
{
|
||||
if (sCommunicationSystem) {
|
||||
sCommunicationSystem->unk_654 = 0;
|
||||
sCommunicationSystem->sendHeldKeys = 0;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL sub_02035EE0 (void)
|
||||
BOOL CommSys_IsSendingMovementData (void)
|
||||
{
|
||||
if (sCommunicationSystem) {
|
||||
return sCommunicationSystem->unk_654 & 0x8000;
|
||||
return sCommunicationSystem->sendHeldKeys & 0x8000;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
BOOL CommSys_ServerSetSendQueue (int param0, const void * param1, int param2)
|
||||
BOOL CommSys_WriteToQueueServer (int cmd, const void * param1, int param2)
|
||||
{
|
||||
if (CommSys_TransmissionType() == 1) {
|
||||
return sub_02032498(&sCommunicationSystem->commQueueManSend, param0, (u8 *)param1, param2, 1, 0);
|
||||
return CommQueue_Write(&sCommunicationSystem->commQueueManSend, cmd, (u8 *)param1, param2, 1, 0);
|
||||
} else {
|
||||
return sub_02032498(&sCommunicationSystem->commQueueManSendServer, param0, (u8 *)param1, param2, 1, 0);
|
||||
return CommQueue_Write(&sCommunicationSystem->commQueueManSendServer, cmd, (u8 *)param1, param2, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL sub_02035F58 (int param0, const void * param1, int param2)
|
||||
BOOL CommSys_WriteToQueue (int cmd, const void * param1, int param2)
|
||||
{
|
||||
return sub_02032498(&sCommunicationSystem->commQueueManSend, param0, (u8 *)param1, param2, 0, 0);
|
||||
return CommQueue_Write(&sCommunicationSystem->commQueueManSend, cmd, (u8 *)param1, param2, 0, 0);
|
||||
}
|
||||
|
||||
static void CommSys_Transmission (void)
|
||||
|
@ -288,7 +288,7 @@ static void sub_02059984 (void)
|
||||
v0 = Heap_AllocFromHeap(HEAP_ID_COMMUNICATION, CommPlayer_Size());
|
||||
CommPlayerMan_Init(v0, sFieldCommMan->fieldSys, 0);
|
||||
sub_02059524();
|
||||
sub_02035EC8();
|
||||
CommSys_DisableSendMovementData();
|
||||
CommTiming_StartSync(92);
|
||||
FieldCommMan_SetTask(sub_020599E4, 0);
|
||||
return;
|
||||
@ -626,7 +626,7 @@ static void FieldCommTask_StartCopyTrainerCard (void)
|
||||
int v0, v1 = CommSys_CurNetId();
|
||||
|
||||
if (CommTiming_IsSyncState(95)) {
|
||||
sub_0203597C(88, sFieldCommMan->trainerCard[v1], sizeof(TrainerCard));
|
||||
CommSys_SendDataHuge(88, sFieldCommMan->trainerCard[v1], sizeof(TrainerCard));
|
||||
FieldCommMan_SetTask(FieldCommTask_CopyTrainerCard, 0);
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ BOOL ov6_02248B70 (UnkStruct_02095C48 * param0, Pokemon ** param1)
|
||||
MI_CpuCopy8(param1[v4], &v0[v1 * v4], v1);
|
||||
}
|
||||
|
||||
if (sub_0203597C(28, v0, v2) == 1) {
|
||||
if (CommSys_SendDataHuge(28, v0, v2) == 1) {
|
||||
v3 = 1;
|
||||
} else {
|
||||
v3 = 0;
|
||||
@ -320,7 +320,7 @@ BOOL ov6_02248D64 (UnkStruct_02095C48 * param0, int param1, void * param2)
|
||||
|
||||
v0[v1] = param1;
|
||||
|
||||
if (sub_0203597C(36, v0, v1 + 1) == 1) {
|
||||
if (CommSys_SendDataHuge(36, v0, v1 + 1) == 1) {
|
||||
v2 = 1;
|
||||
} else {
|
||||
v2 = 0;
|
||||
|
@ -142,7 +142,7 @@ BOOL ov17_0224F35C (UnkStruct_ov17_0224F30C * param0)
|
||||
|
||||
v0 = (void *)param0->unk_10;
|
||||
|
||||
if (sub_0203597C(24, param0->unk_10, v0->unk_00) == 1) {
|
||||
if (CommSys_SendDataHuge(24, param0->unk_10, v0->unk_00) == 1) {
|
||||
param0->unk_A10 = 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1018,7 +1018,7 @@ void ov23_0223E9D4 (int param0, int param1, void * param2, void * param3)
|
||||
{
|
||||
u8 * v0 = param2;
|
||||
|
||||
if ((v0[0] == CommSys_CurNetId()) && sub_02035EE0()) {
|
||||
if ((v0[0] == CommSys_CurNetId()) && CommSys_IsSendingMovementData()) {
|
||||
Unk_ov23_02257740->unk_A24 = ov23_02253F40(ov23_0224219C(), 19, 0, NULL);
|
||||
Unk_ov23_02257740->unk_8C8 = SysTask_Start(ov23_0223EA38, Unk_ov23_02257740, 0);
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "overlay005/ov5_021EAFA4.h"
|
||||
#include "overlay023/ov23_0223E140.h"
|
||||
#include "overlay023/ov23_022416A8.h"
|
||||
#include "overlay023/ov23_02241F74.h"
|
||||
#include "overlay023/CommManUnderground_Init.h"
|
||||
#include "overlay023/ov23_0224340C.h"
|
||||
#include "overlay023/ov23_0224A1D0.h"
|
||||
#include "overlay023/ov23_0224B05C.h"
|
||||
@ -60,7 +60,7 @@ typedef struct {
|
||||
u16 unk_02;
|
||||
u16 unk_04;
|
||||
u16 unk_06;
|
||||
} UnkStruct_ov23_02257748_sub1;
|
||||
} CommManUnderground_sub1;
|
||||
|
||||
typedef struct {
|
||||
void * unk_00;
|
||||
@ -71,7 +71,7 @@ typedef struct {
|
||||
SysTask * unk_14;
|
||||
UnkStruct_ov23_0224271C unk_18;
|
||||
UnkStruct_ov23_0224271C unk_1C;
|
||||
UnkStruct_ov23_02257748_sub1 unk_20[20];
|
||||
CommManUnderground_sub1 unk_20[20];
|
||||
u16 unk_C0;
|
||||
u8 unk_C2[8];
|
||||
u8 unk_CA[8];
|
||||
@ -99,7 +99,7 @@ typedef struct {
|
||||
u8 unk_14A;
|
||||
u8 unk_14B;
|
||||
u8 unk_14C;
|
||||
} UnkStruct_ov23_02257748;
|
||||
} CommManUnderground;
|
||||
|
||||
typedef struct {
|
||||
u8 unk_00;
|
||||
@ -122,40 +122,40 @@ typedef struct {
|
||||
static void ov23_022433F4(int param0);
|
||||
static void ov23_02243310(SysTask * param0, void * param1);
|
||||
|
||||
static UnkStruct_ov23_02257748 * Unk_ov23_02257748 = NULL;
|
||||
static CommManUnderground * sCommManUnderground = NULL;
|
||||
|
||||
static void ov23_02241F74 (UnkStruct_ov23_02257748 * param0, FieldSystem * param1)
|
||||
static void CommManUnderground_Init (CommManUnderground * param0, FieldSystem * param1)
|
||||
{
|
||||
u8 v0 = Options_TextFrameDelay(SaveData_Options(param1->saveData));
|
||||
int v1;
|
||||
|
||||
Unk_ov23_02257748 = param0;
|
||||
MI_CpuFill8(Unk_ov23_02257748, 0, sizeof(UnkStruct_ov23_02257748));
|
||||
sCommManUnderground = param0;
|
||||
MI_CpuFill8(sCommManUnderground, 0, sizeof(CommManUnderground));
|
||||
|
||||
Unk_ov23_02257748->unk_0C = param1;
|
||||
Unk_ov23_02257748->unk_134 = 0;
|
||||
Unk_ov23_02257748->unk_1C.unk_00 = 0;
|
||||
Unk_ov23_02257748->unk_1C.unk_02 = 0;
|
||||
Unk_ov23_02257748->unk_14B = 0;
|
||||
Unk_ov23_02257748->unk_147 = 1;
|
||||
Unk_ov23_02257748->unk_118 = ov23_02253D48(634, 33, param1->unk_08, v0, 500);
|
||||
Unk_ov23_02257748->unk_11C = ov23_02253D48(638, 33, param1->unk_08, v0, 0);
|
||||
Unk_ov23_02257748->unk_120 = ov23_02253D48(636, 33, param1->unk_08, v0, 1000);
|
||||
Unk_ov23_02257748->unk_124 = ov23_02253D48(637, 33, param1->unk_08, v0, 0);
|
||||
Unk_ov23_02257748->unk_128 = ov23_02253D48(630, 33, param1->unk_08, v0, 0);
|
||||
sCommManUnderground->unk_0C = param1;
|
||||
sCommManUnderground->unk_134 = 0;
|
||||
sCommManUnderground->unk_1C.unk_00 = 0;
|
||||
sCommManUnderground->unk_1C.unk_02 = 0;
|
||||
sCommManUnderground->unk_14B = 0;
|
||||
sCommManUnderground->unk_147 = 1;
|
||||
sCommManUnderground->unk_118 = ov23_02253D48(634, 33, param1->unk_08, v0, 500);
|
||||
sCommManUnderground->unk_11C = ov23_02253D48(638, 33, param1->unk_08, v0, 0);
|
||||
sCommManUnderground->unk_120 = ov23_02253D48(636, 33, param1->unk_08, v0, 1000);
|
||||
sCommManUnderground->unk_124 = ov23_02253D48(637, 33, param1->unk_08, v0, 0);
|
||||
sCommManUnderground->unk_128 = ov23_02253D48(630, 33, param1->unk_08, v0, 0);
|
||||
|
||||
sub_0200DD0C(Unk_ov23_02257748->unk_0C->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4);
|
||||
sub_0200DD0C(sCommManUnderground->unk_0C->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4);
|
||||
sub_02006E84(50, 52, 0, 10 * 0x20, 4 * 0x20, 4);
|
||||
sub_0200DAA4(Unk_ov23_02257748->unk_0C->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4);
|
||||
sub_0200DAA4(sCommManUnderground->unk_0C->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4);
|
||||
|
||||
for (v1 = 0; v1 < (7 + 1); v1++) {
|
||||
Unk_ov23_02257748->unk_C2[v1] = 0xff;
|
||||
Unk_ov23_02257748->unk_D2[v1] = 0xff;
|
||||
Unk_ov23_02257748->unk_DC[v1] = NULL;
|
||||
sCommManUnderground->unk_C2[v1] = 0xff;
|
||||
sCommManUnderground->unk_D2[v1] = 0xff;
|
||||
sCommManUnderground->unk_DC[v1] = NULL;
|
||||
}
|
||||
|
||||
sub_0206A9F4(SaveData_Events(Unk_ov23_02257748->unk_0C->saveData));
|
||||
Unk_ov23_02257748->unk_14 = SysTask_Start(ov23_02243310, NULL, 0);
|
||||
sub_0206A9F4(SaveData_Events(sCommManUnderground->unk_0C->saveData));
|
||||
sCommManUnderground->unk_14 = SysTask_Start(ov23_02243310, NULL, 0);
|
||||
sub_02032110(ov23_022433F4);
|
||||
}
|
||||
|
||||
@ -164,57 +164,57 @@ static void ov23_02242108 (void)
|
||||
int v0;
|
||||
|
||||
for (v0 = 0; v0 < (7 + 1); v0++) {
|
||||
if (Unk_ov23_02257748->unk_DC[v0]) {
|
||||
Strbuf_Free(Unk_ov23_02257748->unk_DC[v0]);
|
||||
if (sCommManUnderground->unk_DC[v0]) {
|
||||
Strbuf_Free(sCommManUnderground->unk_DC[v0]);
|
||||
}
|
||||
}
|
||||
|
||||
sub_02032110(NULL);
|
||||
SysTask_Done(Unk_ov23_02257748->unk_14);
|
||||
SysTask_Done(sCommManUnderground->unk_14);
|
||||
|
||||
ov23_02253DD8(Unk_ov23_02257748->unk_118);
|
||||
ov23_02253DD8(Unk_ov23_02257748->unk_11C);
|
||||
ov23_02253DD8(Unk_ov23_02257748->unk_120);
|
||||
ov23_02253DD8(Unk_ov23_02257748->unk_124);
|
||||
ov23_02253DD8(Unk_ov23_02257748->unk_128);
|
||||
ov23_02253DD8(sCommManUnderground->unk_118);
|
||||
ov23_02253DD8(sCommManUnderground->unk_11C);
|
||||
ov23_02253DD8(sCommManUnderground->unk_120);
|
||||
ov23_02253DD8(sCommManUnderground->unk_124);
|
||||
ov23_02253DD8(sCommManUnderground->unk_128);
|
||||
|
||||
Unk_ov23_02257748->unk_0C->unk_90 = 0;
|
||||
Heap_FreeToHeap(Unk_ov23_02257748);
|
||||
Unk_ov23_02257748 = NULL;
|
||||
sCommManUnderground->unk_0C->unk_90 = 0;
|
||||
Heap_FreeToHeap(sCommManUnderground);
|
||||
sCommManUnderground = NULL;
|
||||
}
|
||||
|
||||
UnkStruct_ov23_02253E2C * ov23_0224219C (void)
|
||||
{
|
||||
return Unk_ov23_02257748->unk_118;
|
||||
return sCommManUnderground->unk_118;
|
||||
}
|
||||
|
||||
UnkStruct_ov23_02253E2C * ov23_022421AC (void)
|
||||
{
|
||||
return Unk_ov23_02257748->unk_11C;
|
||||
return sCommManUnderground->unk_11C;
|
||||
}
|
||||
|
||||
UnkStruct_ov23_02253E2C * ov23_022421BC (void)
|
||||
{
|
||||
return Unk_ov23_02257748->unk_120;
|
||||
return sCommManUnderground->unk_120;
|
||||
}
|
||||
|
||||
UnkStruct_ov23_02253E2C * ov23_022421CC (void)
|
||||
{
|
||||
return Unk_ov23_02257748->unk_124;
|
||||
return sCommManUnderground->unk_124;
|
||||
}
|
||||
|
||||
UnkStruct_ov23_02253E2C * ov23_022421DC (void)
|
||||
{
|
||||
return Unk_ov23_02257748->unk_128;
|
||||
return sCommManUnderground->unk_128;
|
||||
}
|
||||
|
||||
void ov23_022421EC (void)
|
||||
{
|
||||
ov23_02254210(Unk_ov23_02257748->unk_118);
|
||||
ov23_02254210(Unk_ov23_02257748->unk_11C);
|
||||
ov23_02254210(Unk_ov23_02257748->unk_120);
|
||||
ov23_02254210(Unk_ov23_02257748->unk_124);
|
||||
ov23_02254210(Unk_ov23_02257748->unk_128);
|
||||
ov23_02254210(sCommManUnderground->unk_118);
|
||||
ov23_02254210(sCommManUnderground->unk_11C);
|
||||
ov23_02254210(sCommManUnderground->unk_120);
|
||||
ov23_02254210(sCommManUnderground->unk_124);
|
||||
ov23_02254210(sCommManUnderground->unk_128);
|
||||
}
|
||||
|
||||
BOOL ov23_0224223C (TrainerInfo * param0, TrainerInfo * param1, int param2, Strbuf *param3)
|
||||
@ -268,7 +268,7 @@ static BOOL ov23_02242308 (Strbuf *param0)
|
||||
TrainerInfo * v3;
|
||||
TrainerInfo * v4;
|
||||
|
||||
if (!Unk_ov23_02257748) {
|
||||
if (!sCommManUnderground) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -282,34 +282,34 @@ static BOOL ov23_02242308 (Strbuf *param0)
|
||||
}
|
||||
}
|
||||
|
||||
if (Unk_ov23_02257748->unk_C2[v0] != 0xff) {
|
||||
if (sCommManUnderground->unk_C2[v0] != 0xff) {
|
||||
v3 = CommInfo_TrainerInfo(v0);
|
||||
v4 = CommInfo_TrainerInfo(Unk_ov23_02257748->unk_C2[v0]);
|
||||
v4 = CommInfo_TrainerInfo(sCommManUnderground->unk_C2[v0]);
|
||||
|
||||
Unk_ov23_02257748->unk_C2[v0] = 0xff;
|
||||
sCommManUnderground->unk_C2[v0] = 0xff;
|
||||
|
||||
if (ov23_0224223C(v3, v4, 111, param0)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (Unk_ov23_02257748->unk_D2[v0] != 0xff) {
|
||||
if (sCommManUnderground->unk_D2[v0] != 0xff) {
|
||||
v3 = CommInfo_TrainerInfo(v0);
|
||||
Unk_ov23_02257748->unk_D2[v0] = 0xff;
|
||||
sCommManUnderground->unk_D2[v0] = 0xff;
|
||||
|
||||
if (ov23_022422A8(v3, 0, 112, param0)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (Unk_ov23_02257748->unk_13D[v0] == 1) {
|
||||
if (Unk_ov23_02257748->unk_DC[v0]) {
|
||||
Strbuf_Copy(param0, Unk_ov23_02257748->unk_DC[v0]);
|
||||
Strbuf_Free(Unk_ov23_02257748->unk_DC[v0]);
|
||||
Unk_ov23_02257748->unk_DC[v0] = NULL;
|
||||
if (sCommManUnderground->unk_13D[v0] == 1) {
|
||||
if (sCommManUnderground->unk_DC[v0]) {
|
||||
Strbuf_Copy(param0, sCommManUnderground->unk_DC[v0]);
|
||||
Strbuf_Free(sCommManUnderground->unk_DC[v0]);
|
||||
sCommManUnderground->unk_DC[v0] = NULL;
|
||||
}
|
||||
|
||||
Unk_ov23_02257748->unk_13D[v0] = 0;
|
||||
sCommManUnderground->unk_13D[v0] = 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -324,7 +324,7 @@ BOOL ov23_0224240C (int param0, int param1)
|
||||
v0.unk_00 = param0;
|
||||
v0.unk_02 = param1;
|
||||
|
||||
if (FieldSystem_CheckCollision(Unk_ov23_02257748->unk_0C, param0, param1)) {
|
||||
if (FieldSystem_CheckCollision(sCommManUnderground->unk_0C, param0, param1)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -346,18 +346,18 @@ BOOL ov23_02242458 (void)
|
||||
int v2, v3;
|
||||
UnkStruct_ov23_0224271C v4;
|
||||
|
||||
if ((Unk_ov23_02257748->unk_146 != 0) || (Unk_ov23_02257748->unk_134 != 0)) {
|
||||
if (Unk_ov23_02257748->unk_134 > 0) {
|
||||
Unk_ov23_02257748->unk_134--;
|
||||
if ((sCommManUnderground->unk_146 != 0) || (sCommManUnderground->unk_134 != 0)) {
|
||||
if (sCommManUnderground->unk_134 > 0) {
|
||||
sCommManUnderground->unk_134--;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (gCoreSys.touchPressed) {
|
||||
Unk_ov23_02257748->unk_134 = 30;
|
||||
sCommManUnderground->unk_134 = 30;
|
||||
|
||||
if (!Unk_ov23_02257748->unk_14B) {
|
||||
if (!sCommManUnderground->unk_14B) {
|
||||
if (sub_02057FAC() && !ov23_0224ACC0(CommSys_CurNetId())) {
|
||||
if (CommSys_CheckError()) {
|
||||
return 0;
|
||||
@ -367,15 +367,15 @@ BOOL ov23_02242458 (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
v0 = ov5_021EAFA4(gCoreSys.touchX, gCoreSys.touchY, Unk_ov23_02257748->unk_0C->unk_8C);
|
||||
v0 = ov5_021EAFA4(gCoreSys.touchX, gCoreSys.touchY, sCommManUnderground->unk_0C->unk_8C);
|
||||
ov5_021E9230(v0.x, v0.z, &v2, &v3);
|
||||
v4.unk_00 = v2;
|
||||
v4.unk_02 = v3;
|
||||
|
||||
Unk_ov23_02257748->unk_18.unk_00 = gCoreSys.touchX;
|
||||
Unk_ov23_02257748->unk_18.unk_02 = gCoreSys.touchY;
|
||||
Unk_ov23_02257748->unk_1C.unk_00 = v2;
|
||||
Unk_ov23_02257748->unk_1C.unk_02 = v3;
|
||||
sCommManUnderground->unk_18.unk_00 = gCoreSys.touchX;
|
||||
sCommManUnderground->unk_18.unk_02 = gCoreSys.touchY;
|
||||
sCommManUnderground->unk_1C.unk_00 = v2;
|
||||
sCommManUnderground->unk_1C.unk_02 = v3;
|
||||
|
||||
CommSys_SendData(48, &v4, sizeof(UnkStruct_ov23_0224271C));
|
||||
|
||||
@ -461,8 +461,8 @@ void ov23_02242624 (int param0, int param1, void * param2, void * param3)
|
||||
return;
|
||||
}
|
||||
|
||||
MI_CpuCopy8(&v1[1], Unk_ov23_02257748->unk_FC, param1 - 1);
|
||||
Unk_ov23_02257748->unk_148 = param1 - 1;
|
||||
MI_CpuCopy8(&v1[1], sCommManUnderground->unk_FC, param1 - 1);
|
||||
sCommManUnderground->unk_148 = param1 - 1;
|
||||
}
|
||||
|
||||
void ov23_02242654 (int param0, int param1, void * param2, void * param3)
|
||||
@ -476,14 +476,14 @@ void ov23_02242654 (int param0, int param1, void * param2, void * param3)
|
||||
return;
|
||||
}
|
||||
|
||||
MI_CpuCopy8(&v1[1], Unk_ov23_02257748->unk_104, param1 - 1);
|
||||
Unk_ov23_02257748->unk_149 = param1 - 1;
|
||||
MI_CpuCopy8(&v1[1], sCommManUnderground->unk_104, param1 - 1);
|
||||
sCommManUnderground->unk_149 = param1 - 1;
|
||||
|
||||
Unk_ov23_02257748->unk_14A = ov23_02242540(v3, ov23_02241D04, &Unk_ov23_02257748->unk_1C);
|
||||
Unk_ov23_02257748->unk_14A -= 1;
|
||||
sCommManUnderground->unk_14A = ov23_02242540(v3, ov23_02241D04, &sCommManUnderground->unk_1C);
|
||||
sCommManUnderground->unk_14A -= 1;
|
||||
|
||||
MI_CpuCopy8(&v3[1], Unk_ov23_02257748->unk_10C, Unk_ov23_02257748->unk_14A);
|
||||
ov23_022489F8(Unk_ov23_02257748->unk_0C, Unk_ov23_02257748->unk_1C.unk_00, Unk_ov23_02257748->unk_1C.unk_02, Unk_ov23_02257748->unk_18.unk_00, Unk_ov23_02257748->unk_18.unk_02, Unk_ov23_02257748->unk_FC, Unk_ov23_02257748->unk_148, Unk_ov23_02257748->unk_104, Unk_ov23_02257748->unk_149, Unk_ov23_02257748->unk_10C, Unk_ov23_02257748->unk_14A);
|
||||
MI_CpuCopy8(&v3[1], sCommManUnderground->unk_10C, sCommManUnderground->unk_14A);
|
||||
ov23_022489F8(sCommManUnderground->unk_0C, sCommManUnderground->unk_1C.unk_00, sCommManUnderground->unk_1C.unk_02, sCommManUnderground->unk_18.unk_00, sCommManUnderground->unk_18.unk_02, sCommManUnderground->unk_FC, sCommManUnderground->unk_148, sCommManUnderground->unk_104, sCommManUnderground->unk_149, sCommManUnderground->unk_10C, sCommManUnderground->unk_14A);
|
||||
}
|
||||
|
||||
static int ov23_02242704 (UnkStruct_ov23_0224271C * param0)
|
||||
@ -504,10 +504,10 @@ int ov23_0224271C (UnkStruct_ov23_0224271C * param0)
|
||||
{
|
||||
int v0;
|
||||
int v1 = 0;
|
||||
int v2 = Unk_ov23_02257748->unk_12C - 1;
|
||||
int v2 = sCommManUnderground->unk_12C - 1;
|
||||
int v3 = ov23_02242704(param0);
|
||||
UnkStruct_ov23_0224271C v4;
|
||||
UnkFuncPtr_ov23_022427DC v5 = Unk_ov23_02257748->unk_114;
|
||||
UnkFuncPtr_ov23_022427DC v5 = sCommManUnderground->unk_114;
|
||||
|
||||
while (v1 < v2) {
|
||||
v0 = (v1 + v2) / 2;
|
||||
@ -530,9 +530,9 @@ int ov23_02242788 (UnkStruct_ov23_0224271C * param0)
|
||||
{
|
||||
int v0;
|
||||
int v1 = 0;
|
||||
int v2 = Unk_ov23_02257748->unk_12C - 2;
|
||||
int v2 = sCommManUnderground->unk_12C - 2;
|
||||
int v3 = ov23_02242704(param0);
|
||||
UnkFuncPtr_ov23_022427DC v4 = Unk_ov23_02257748->unk_114;
|
||||
UnkFuncPtr_ov23_022427DC v4 = sCommManUnderground->unk_114;
|
||||
UnkStruct_ov23_0224271C v5;
|
||||
|
||||
v2++;
|
||||
@ -552,8 +552,8 @@ int ov23_02242788 (UnkStruct_ov23_0224271C * param0)
|
||||
|
||||
void ov23_022427DC (int param0, UnkFuncPtr_ov23_022427DC param1)
|
||||
{
|
||||
Unk_ov23_02257748->unk_114 = param1;
|
||||
Unk_ov23_02257748->unk_12C = param0;
|
||||
sCommManUnderground->unk_114 = param1;
|
||||
sCommManUnderground->unk_12C = param0;
|
||||
}
|
||||
|
||||
void ov23_022427F8 (void)
|
||||
@ -566,8 +566,8 @@ void ov23_022427F8 (void)
|
||||
|
||||
void ov23_02242814 (void)
|
||||
{
|
||||
if (Unk_ov23_02257748->unk_146 != 0) {
|
||||
Unk_ov23_02257748->unk_146--;
|
||||
if (sCommManUnderground->unk_146 != 0) {
|
||||
sCommManUnderground->unk_146--;
|
||||
}
|
||||
}
|
||||
|
||||
@ -576,9 +576,9 @@ void ov23_02242830 (u8 param0)
|
||||
u8 v0 = param0;
|
||||
UnkStruct_ov23_02242830 v1;
|
||||
int v2, v3;
|
||||
UndergroundData * v4 = sub_020298B0(Unk_ov23_02257748->unk_0C->saveData);
|
||||
UndergroundData * v4 = sub_020298B0(sCommManUnderground->unk_0C->saveData);
|
||||
|
||||
if ((Unk_ov23_02257748->unk_146 != 0) && (Unk_ov23_02257748->unk_134 != 0)) {
|
||||
if ((sCommManUnderground->unk_146 != 0) && (sCommManUnderground->unk_134 != 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ void ov23_02242830 (u8 param0)
|
||||
CommSys_SendDataFixedSize(28, &v1);
|
||||
sub_0203572C();
|
||||
|
||||
Unk_ov23_02257748->unk_146 = 8;
|
||||
sCommManUnderground->unk_146 = 8;
|
||||
}
|
||||
|
||||
int ov23_022428D4 (void)
|
||||
@ -623,10 +623,6 @@ void ov23_022428D8 (int param0, int param1, void * param2, void * param3)
|
||||
v2.unk_00 = CommPlayer_AddXServer(param0);
|
||||
v2.unk_02 = CommPlayer_AddZServer(param0);
|
||||
|
||||
if (param0 == 2) {
|
||||
(void)0;
|
||||
}
|
||||
|
||||
if ((sub_02058DF8(param0) == 0xffff) && (sub_02058E4C(param0) == 0xffff)) {
|
||||
return;
|
||||
}
|
||||
@ -739,21 +735,21 @@ void ov23_02242B14 (void)
|
||||
|
||||
if (CommSys_CurNetId() == 0) {
|
||||
for (v0 = 0; v0 < (7 + 1); v0++) {
|
||||
if ((NULL != CommInfo_TrainerInfo(v0)) && !Unk_ov23_02257748->unk_135[v0]) {
|
||||
if ((NULL != CommInfo_TrainerInfo(v0)) && !sCommManUnderground->unk_135[v0]) {
|
||||
ov23_0224B5CC(v0);
|
||||
}
|
||||
|
||||
if (CommInfo_TrainerInfo(v0)) {
|
||||
Unk_ov23_02257748->unk_135[v0] = 1;
|
||||
sCommManUnderground->unk_135[v0] = 1;
|
||||
} else {
|
||||
Unk_ov23_02257748->unk_135[v0] = 0;
|
||||
sCommManUnderground->unk_135[v0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sub_02037B58(ov23_022433D0() + 2);
|
||||
}
|
||||
|
||||
Unk_ov23_02257748->unk_145++;
|
||||
sCommManUnderground->unk_145++;
|
||||
|
||||
if (CommSys_CurNetId() == 0) {
|
||||
if (CommInfo_ServerSendArray()) {
|
||||
@ -765,8 +761,8 @@ void ov23_02242B14 (void)
|
||||
ov23_02243AE8();
|
||||
ov23_0223E878();
|
||||
|
||||
if (!Unk_ov23_02257748->unk_14B) {
|
||||
ov23_022468A8(Unk_ov23_02257748->unk_0C->unk_08);
|
||||
if (!sCommManUnderground->unk_14B) {
|
||||
ov23_022468A8(sCommManUnderground->unk_0C->unk_08);
|
||||
}
|
||||
}
|
||||
|
||||
@ -774,9 +770,9 @@ void ov23_02242BC0 (FieldSystem * param0)
|
||||
{
|
||||
void * v0;
|
||||
|
||||
if (Unk_ov23_02257748 == NULL) {
|
||||
v0 = Heap_AllocFromHeap(15, sizeof(UnkStruct_ov23_02257748));
|
||||
ov23_02241F74(v0, param0);
|
||||
if (sCommManUnderground == NULL) {
|
||||
v0 = Heap_AllocFromHeap(15, sizeof(CommManUnderground));
|
||||
CommManUnderground_Init(v0, param0);
|
||||
|
||||
v0 = Heap_AllocFromHeap(15, CommPlayer_Size());
|
||||
CommPlayerMan_Init(v0, param0, 1);
|
||||
@ -801,7 +797,7 @@ void ov23_02242BC0 (FieldSystem * param0)
|
||||
|
||||
void ov23_02242C78 (void)
|
||||
{
|
||||
if (Unk_ov23_02257748) {
|
||||
if (sCommManUnderground) {
|
||||
ov23_022535EC();
|
||||
ov23_022417CC();
|
||||
ov23_0224B430();
|
||||
@ -810,28 +806,28 @@ void ov23_02242C78 (void)
|
||||
ov23_0223E2F0();
|
||||
ov23_022421EC();
|
||||
|
||||
Unk_ov23_02257748->unk_14B = 1;
|
||||
sCommManUnderground->unk_14B = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void ov23_02242CB4 (void)
|
||||
{
|
||||
if (Unk_ov23_02257748) {
|
||||
if (sCommManUnderground) {
|
||||
CommPlayerMan_Restart();
|
||||
ov23_02253604();
|
||||
ov23_022417E0();
|
||||
ov23_0224B460();
|
||||
ov23_022435A8();
|
||||
ov23_0223E2F4();
|
||||
Unk_ov23_02257748->unk_14B = 0;
|
||||
sub_0200DD0C(Unk_ov23_02257748->unk_0C->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4);
|
||||
sCommManUnderground->unk_14B = 0;
|
||||
sub_0200DD0C(sCommManUnderground->unk_0C->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void ov23_02242D08 (void)
|
||||
{
|
||||
if (Unk_ov23_02257748 != NULL) {
|
||||
sub_020287F8(Unk_ov23_02257748->unk_0C->saveData);
|
||||
if (sCommManUnderground != NULL) {
|
||||
sub_020287F8(sCommManUnderground->unk_0C->saveData);
|
||||
ov23_0224B4E4();
|
||||
ov23_022435DC();
|
||||
CommPlayerMan_Delete(1);
|
||||
@ -847,7 +843,7 @@ void ov23_02242D44 (FieldSystem * param0)
|
||||
{
|
||||
void * v0;
|
||||
|
||||
if (Unk_ov23_02257748 != NULL) {
|
||||
if (sCommManUnderground != NULL) {
|
||||
ov23_02243670(param0);
|
||||
CommPlayerMan_Reinit();
|
||||
ov23_0224B518();
|
||||
@ -856,28 +852,28 @@ void ov23_02242D44 (FieldSystem * param0)
|
||||
|
||||
BOOL ov23_02242D60 (Strbuf *param0)
|
||||
{
|
||||
if (Unk_ov23_02257748->unk_14C) {
|
||||
Unk_ov23_02257748->unk_14C = 0;
|
||||
if (sCommManUnderground->unk_14C) {
|
||||
sCommManUnderground->unk_14C = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ov23_02242308(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
} else if (ov23_022446B0(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
} else if (ov23_02244784(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
} else if (ov23_0224D020(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
} else if (ov23_022415B8(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
} else if (ov23_02241D58(param0)) {
|
||||
Unk_ov23_02257748->unk_14C = 1;
|
||||
sCommManUnderground->unk_14C = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -886,7 +882,7 @@ BOOL ov23_02242D60 (Strbuf *param0)
|
||||
|
||||
UnkStruct_02029894 * ov23_02242E10 (SaveData * param0)
|
||||
{
|
||||
if (!Unk_ov23_02257748) {
|
||||
if (!sCommManUnderground) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -895,7 +891,7 @@ UnkStruct_02029894 * ov23_02242E10 (SaveData * param0)
|
||||
|
||||
int ov23_02242E28 (void)
|
||||
{
|
||||
if (!Unk_ov23_02257748) {
|
||||
if (!sCommManUnderground) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -904,7 +900,7 @@ int ov23_02242E28 (void)
|
||||
|
||||
int ov23_02242E40 (void)
|
||||
{
|
||||
if (!Unk_ov23_02257748) {
|
||||
if (!sCommManUnderground) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -924,11 +920,11 @@ int ov23_02242E78 (int param0)
|
||||
{
|
||||
int v0, v1;
|
||||
|
||||
if (Unk_ov23_02257748) {
|
||||
if (sCommManUnderground) {
|
||||
if (param0 < 16) {
|
||||
v1 = param0;
|
||||
|
||||
switch (Unk_ov23_02257748->unk_147) {
|
||||
switch (sCommManUnderground->unk_147) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
@ -943,7 +939,7 @@ int ov23_02242E78 (int param0)
|
||||
return ov23_0224125C(v1);
|
||||
}
|
||||
} else {
|
||||
UnkStruct_02029894 * v2 = sub_02029894(Unk_ov23_02257748->unk_0C->saveData);
|
||||
UnkStruct_02029894 * v2 = sub_02029894(sCommManUnderground->unk_0C->saveData);
|
||||
return sub_02029874(v2);
|
||||
}
|
||||
}
|
||||
@ -955,11 +951,11 @@ int ov23_02242EE0 (int param0)
|
||||
{
|
||||
int v0, v1, v2;
|
||||
|
||||
if (Unk_ov23_02257748) {
|
||||
if (sCommManUnderground) {
|
||||
if (param0 < 16) {
|
||||
v1 = param0;
|
||||
|
||||
switch (Unk_ov23_02257748->unk_147) {
|
||||
switch (sCommManUnderground->unk_147) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
@ -974,7 +970,7 @@ int ov23_02242EE0 (int param0)
|
||||
return ov23_02241294(v1);
|
||||
}
|
||||
} else {
|
||||
UnkStruct_02029894 * v3 = sub_02029894(Unk_ov23_02257748->unk_0C->saveData);
|
||||
UnkStruct_02029894 * v3 = sub_02029894(sCommManUnderground->unk_0C->saveData);
|
||||
|
||||
return sub_0202987C(v3);
|
||||
}
|
||||
@ -985,9 +981,9 @@ int ov23_02242EE0 (int param0)
|
||||
|
||||
int ov23_02242F48 (int param0)
|
||||
{
|
||||
if (Unk_ov23_02257748) {
|
||||
if (sCommManUnderground) {
|
||||
if (param0 < 16) {
|
||||
switch (Unk_ov23_02257748->unk_147) {
|
||||
switch (sCommManUnderground->unk_147) {
|
||||
case 1:
|
||||
if (param0 < 8) {
|
||||
return 12;
|
||||
@ -1000,7 +996,7 @@ int ov23_02242F48 (int param0)
|
||||
return 12;
|
||||
}
|
||||
} else {
|
||||
UnkStruct_02029894 * v0 = sub_02029894(Unk_ov23_02257748->unk_0C->saveData);
|
||||
UnkStruct_02029894 * v0 = sub_02029894(sCommManUnderground->unk_0C->saveData);
|
||||
|
||||
if (sub_0202988C(v0)) {
|
||||
return 3;
|
||||
@ -1013,40 +1009,40 @@ int ov23_02242F48 (int param0)
|
||||
|
||||
void ov23_02242FA8 (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_147 = 0;
|
||||
sCommManUnderground->unk_147 = 0;
|
||||
}
|
||||
|
||||
void ov23_02242FBC (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_147 = 1;
|
||||
sCommManUnderground->unk_147 = 1;
|
||||
}
|
||||
|
||||
void ov23_02242FD0 (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_147 = 2;
|
||||
sCommManUnderground->unk_147 = 2;
|
||||
}
|
||||
|
||||
void ov23_02242FE4 (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_147 = 4;
|
||||
sCommManUnderground->unk_147 = 4;
|
||||
}
|
||||
|
||||
void ov23_02242FF8 (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_147 = 3;
|
||||
sCommManUnderground->unk_147 = 3;
|
||||
}
|
||||
|
||||
void ov23_0224300C (int param0, int param1)
|
||||
{
|
||||
if (Unk_ov23_02257748) {
|
||||
Unk_ov23_02257748->unk_C2[param0] = param1;
|
||||
if (sCommManUnderground) {
|
||||
sCommManUnderground->unk_C2[param0] = param1;
|
||||
}
|
||||
}
|
||||
|
||||
void ov23_02243020 (int param0)
|
||||
{
|
||||
if (Unk_ov23_02257748) {
|
||||
Unk_ov23_02257748->unk_D2[param0] = 1;
|
||||
if (sCommManUnderground) {
|
||||
sCommManUnderground->unk_D2[param0] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1055,16 +1051,16 @@ void UndergroundMan_SetReturnLog (int param0)
|
||||
StringTemplate * v0;
|
||||
Strbuf* v1;
|
||||
|
||||
if (Unk_ov23_02257748) {
|
||||
if (Unk_ov23_02257748->unk_DC[param0] == NULL) {
|
||||
Unk_ov23_02257748->unk_DC[param0] = Strbuf_Init((50 * 2), 15);
|
||||
if (sCommManUnderground) {
|
||||
if (sCommManUnderground->unk_DC[param0] == NULL) {
|
||||
sCommManUnderground->unk_DC[param0] = Strbuf_Init((50 * 2), 15);
|
||||
|
||||
v0 = StringTemplate_Default(11);
|
||||
v1 = Strbuf_Init((50 * 2), 11);
|
||||
|
||||
StringTemplate_SetPlayerName(v0, 0, CommInfo_TrainerInfo(param0));
|
||||
MessageLoader_GetStrbuf(ov23_02253E3C(ov23_0224219C()), 115, v1);
|
||||
StringTemplate_Format(v0, Unk_ov23_02257748->unk_DC[param0], v1);
|
||||
StringTemplate_Format(v0, sCommManUnderground->unk_DC[param0], v1);
|
||||
Strbuf_Free(v1);
|
||||
StringTemplate_Free(v0);
|
||||
}
|
||||
@ -1073,38 +1069,38 @@ void UndergroundMan_SetReturnLog (int param0)
|
||||
|
||||
void ov23_022430B8 (int param0)
|
||||
{
|
||||
Unk_ov23_02257748->unk_13D[param0] = 1;
|
||||
sCommManUnderground->unk_13D[param0] = 1;
|
||||
}
|
||||
|
||||
void ov23_022430D0 (u16 param0)
|
||||
{
|
||||
Unk_ov23_02257748->unk_C0 = param0;
|
||||
sCommManUnderground->unk_C0 = param0;
|
||||
}
|
||||
|
||||
void ov23_022430E0 (u16 param0, u16 param1, u16 param2)
|
||||
{
|
||||
int v0;
|
||||
|
||||
if (Unk_ov23_02257748->unk_C0 == 0) {
|
||||
if (sCommManUnderground->unk_C0 == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (v0 = 0; v0 < 20; v0++) {
|
||||
if (Unk_ov23_02257748->unk_C0 == Unk_ov23_02257748->unk_20[v0].unk_00) {
|
||||
if (Unk_ov23_02257748->unk_20[v0].unk_02 == param0) {
|
||||
Unk_ov23_02257748->unk_20[v0].unk_04 = param1;
|
||||
Unk_ov23_02257748->unk_20[v0].unk_06 = param2;
|
||||
if (sCommManUnderground->unk_C0 == sCommManUnderground->unk_20[v0].unk_00) {
|
||||
if (sCommManUnderground->unk_20[v0].unk_02 == param0) {
|
||||
sCommManUnderground->unk_20[v0].unk_04 = param1;
|
||||
sCommManUnderground->unk_20[v0].unk_06 = param2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (v0 = 0; v0 < 20; v0++) {
|
||||
if (0 == Unk_ov23_02257748->unk_20[v0].unk_00) {
|
||||
Unk_ov23_02257748->unk_20[v0].unk_00 = Unk_ov23_02257748->unk_C0;
|
||||
Unk_ov23_02257748->unk_20[v0].unk_02 = param0;
|
||||
Unk_ov23_02257748->unk_20[v0].unk_04 = param1;
|
||||
Unk_ov23_02257748->unk_20[v0].unk_06 = param2;
|
||||
if (0 == sCommManUnderground->unk_20[v0].unk_00) {
|
||||
sCommManUnderground->unk_20[v0].unk_00 = sCommManUnderground->unk_C0;
|
||||
sCommManUnderground->unk_20[v0].unk_02 = param0;
|
||||
sCommManUnderground->unk_20[v0].unk_04 = param1;
|
||||
sCommManUnderground->unk_20[v0].unk_06 = param2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1117,9 +1113,9 @@ u16 ov23_02243154 (u16 param0)
|
||||
int v0;
|
||||
|
||||
for (v0 = 0; v0 < 20; v0++) {
|
||||
if (Unk_ov23_02257748->unk_C0 == Unk_ov23_02257748->unk_20[v0].unk_00) {
|
||||
if (Unk_ov23_02257748->unk_20[v0].unk_02 == param0) {
|
||||
return Unk_ov23_02257748->unk_20[v0].unk_06;
|
||||
if (sCommManUnderground->unk_C0 == sCommManUnderground->unk_20[v0].unk_00) {
|
||||
if (sCommManUnderground->unk_20[v0].unk_02 == param0) {
|
||||
return sCommManUnderground->unk_20[v0].unk_06;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1132,9 +1128,9 @@ u16 ov23_0224318C (u16 param0)
|
||||
int v0;
|
||||
|
||||
for (v0 = 0; v0 < 20; v0++) {
|
||||
if (Unk_ov23_02257748->unk_C0 == Unk_ov23_02257748->unk_20[v0].unk_00) {
|
||||
if (Unk_ov23_02257748->unk_20[v0].unk_02 == param0) {
|
||||
return Unk_ov23_02257748->unk_20[v0].unk_04;
|
||||
if (sCommManUnderground->unk_C0 == sCommManUnderground->unk_20[v0].unk_00) {
|
||||
if (sCommManUnderground->unk_20[v0].unk_02 == param0) {
|
||||
return sCommManUnderground->unk_20[v0].unk_04;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1148,7 +1144,7 @@ void ov23_022431C4 (int param0, int param1, void * param2, void * param3)
|
||||
int v1 = v0[0];
|
||||
|
||||
if (v1 == CommSys_CurNetId()) {
|
||||
ov23_022534A0(Unk_ov23_02257748->unk_0C);
|
||||
ov23_022534A0(sCommManUnderground->unk_0C);
|
||||
Link_Message(25);
|
||||
sub_020594FC();
|
||||
}
|
||||
@ -1156,35 +1152,35 @@ void ov23_022431C4 (int param0, int param1, void * param2, void * param3)
|
||||
|
||||
void ov23_022431EC (void * param0, SysTask * param1, UnkFuncPtr_ov23_022431EC param2)
|
||||
{
|
||||
Unk_ov23_02257748->unk_00 = param0;
|
||||
Unk_ov23_02257748->unk_04 = param1;
|
||||
Unk_ov23_02257748->unk_08 = param2;
|
||||
sCommManUnderground->unk_00 = param0;
|
||||
sCommManUnderground->unk_04 = param1;
|
||||
sCommManUnderground->unk_08 = param2;
|
||||
}
|
||||
|
||||
void ov23_02243204 (void)
|
||||
{
|
||||
Unk_ov23_02257748->unk_00 = NULL;
|
||||
Unk_ov23_02257748->unk_04 = NULL;
|
||||
Unk_ov23_02257748->unk_08 = NULL;
|
||||
sCommManUnderground->unk_00 = NULL;
|
||||
sCommManUnderground->unk_04 = NULL;
|
||||
sCommManUnderground->unk_08 = NULL;
|
||||
}
|
||||
|
||||
BOOL ov23_0224321C (void)
|
||||
{
|
||||
BOOL v0 = 0;
|
||||
|
||||
if (Unk_ov23_02257748->unk_04) {
|
||||
Unk_ov23_02257748->unk_08(Unk_ov23_02257748->unk_04, Unk_ov23_02257748->unk_00);
|
||||
if (sCommManUnderground->unk_04) {
|
||||
sCommManUnderground->unk_08(sCommManUnderground->unk_04, sCommManUnderground->unk_00);
|
||||
ov23_02243204();
|
||||
v0 = 1;
|
||||
}
|
||||
|
||||
ov23_022421EC();
|
||||
ov23_02254044(Unk_ov23_02257748->unk_118);
|
||||
ov23_02254044(Unk_ov23_02257748->unk_11C);
|
||||
ov23_02254044(Unk_ov23_02257748->unk_120);
|
||||
ov23_02254044(Unk_ov23_02257748->unk_124);
|
||||
ov23_02254044(Unk_ov23_02257748->unk_128);
|
||||
ov23_02254044(Unk_ov23_02257748->unk_118);
|
||||
ov23_02254044(sCommManUnderground->unk_118);
|
||||
ov23_02254044(sCommManUnderground->unk_11C);
|
||||
ov23_02254044(sCommManUnderground->unk_120);
|
||||
ov23_02254044(sCommManUnderground->unk_124);
|
||||
ov23_02254044(sCommManUnderground->unk_128);
|
||||
ov23_02254044(sCommManUnderground->unk_118);
|
||||
|
||||
return v0;
|
||||
}
|
||||
@ -1193,14 +1189,14 @@ BOOL ov23_02243298 (int param0)
|
||||
{
|
||||
int v0, v1;
|
||||
|
||||
if (Unk_ov23_02257748->unk_04) {
|
||||
if (sCommManUnderground->unk_04) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Unk_ov23_02257748->unk_0C->unk_10) {
|
||||
Unk_ov23_02257748->unk_130++;
|
||||
if (sCommManUnderground->unk_0C->unk_10) {
|
||||
sCommManUnderground->unk_130++;
|
||||
|
||||
if (Unk_ov23_02257748->unk_130 > 100) {
|
||||
if (sCommManUnderground->unk_130 > 100) {
|
||||
GF_ASSERT(0);
|
||||
}
|
||||
|
||||
@ -1218,18 +1214,18 @@ BOOL ov23_02243298 (int param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Unk_ov23_02257748->unk_130 = 0;
|
||||
sCommManUnderground->unk_130 = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ov23_02243310 (SysTask * param0, void * param1)
|
||||
{
|
||||
ov23_02254250(Unk_ov23_02257748->unk_118);
|
||||
ov23_02254250(Unk_ov23_02257748->unk_11C);
|
||||
ov23_02254250(Unk_ov23_02257748->unk_120);
|
||||
ov23_02254250(Unk_ov23_02257748->unk_124);
|
||||
ov23_02254250(Unk_ov23_02257748->unk_128);
|
||||
ov23_02254250(sCommManUnderground->unk_118);
|
||||
ov23_02254250(sCommManUnderground->unk_11C);
|
||||
ov23_02254250(sCommManUnderground->unk_120);
|
||||
ov23_02254250(sCommManUnderground->unk_124);
|
||||
ov23_02254250(sCommManUnderground->unk_128);
|
||||
}
|
||||
|
||||
void ov23_02243360 (void)
|
||||
@ -1261,7 +1257,7 @@ int ov23_022433B8 (void)
|
||||
|
||||
void ov23_022433BC (int param0, int param1, void * param2, void * param3)
|
||||
{
|
||||
Unk_ov23_02257748->unk_CA[param0] = 1;
|
||||
sCommManUnderground->unk_CA[param0] = 1;
|
||||
}
|
||||
|
||||
int ov23_022433D0 (void)
|
||||
@ -1269,7 +1265,7 @@ int ov23_022433D0 (void)
|
||||
int v0, v1 = 0;
|
||||
|
||||
for (v0 = 0; v0 < (7 + 1); v0++) {
|
||||
if (Unk_ov23_02257748->unk_CA[v0]) {
|
||||
if (sCommManUnderground->unk_CA[v0]) {
|
||||
v1++;
|
||||
}
|
||||
}
|
||||
@ -1279,6 +1275,6 @@ int ov23_022433D0 (void)
|
||||
|
||||
static void ov23_022433F4 (int param0)
|
||||
{
|
||||
Unk_ov23_02257748->unk_CA[param0] = 0;
|
||||
sCommManUnderground->unk_CA[param0] = 0;
|
||||
ov23_0224B5CC(param0);
|
||||
}
|
||||
|
@ -1002,7 +1002,7 @@ void ov23_02243AF0 (void)
|
||||
int v0;
|
||||
u8 v1 = 0;
|
||||
|
||||
sub_02035F58(35, &Unk_ov23_02257764->unk_308[0], sizeof(UnkStruct_ov23_02243DA8) * 16);
|
||||
CommSys_WriteToQueue(35, &Unk_ov23_02257764->unk_308[0], sizeof(UnkStruct_ov23_02243DA8) * 16);
|
||||
}
|
||||
|
||||
void ov23_02243B0C (int param0, int param1, void * param2, void * param3)
|
||||
|
@ -183,7 +183,7 @@ void ov23_0224A3A8 (int param0, int param1, void * param2, void * param3)
|
||||
CommPlayerManager * v0 = CommPlayerMan_Get();
|
||||
UnkStruct_ov23_0224A348 * v1 = param2;
|
||||
|
||||
if (!sub_02035EE0()) {
|
||||
if (!CommSys_IsSendingMovementData()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1264,12 +1264,12 @@ void ov23_0224C21C (void)
|
||||
u8 v2 = 0;
|
||||
int v3 = CommSys_CurNetId();
|
||||
|
||||
sub_02035F58(53, &Unk_ov23_022577AC->unk_08[16], sizeof(UnkStruct_ov23_0224B144));
|
||||
CommSys_WriteToQueue(53, &Unk_ov23_022577AC->unk_08[16], sizeof(UnkStruct_ov23_0224B144));
|
||||
}
|
||||
|
||||
void ov23_0224C23C (int param0)
|
||||
{
|
||||
CommSys_ServerSetSendQueue(54, &Unk_ov23_022577AC->unk_08[param0], sizeof(UnkStruct_ov23_0224B144));
|
||||
CommSys_WriteToQueueServer(54, &Unk_ov23_022577AC->unk_08[param0], sizeof(UnkStruct_ov23_0224B144));
|
||||
}
|
||||
|
||||
void ov23_0224C25C (int param0, int param1, void * param2, void * param3)
|
||||
@ -1391,7 +1391,7 @@ static void ov23_0224C448 (void)
|
||||
v1++;
|
||||
}
|
||||
|
||||
CommSys_ServerSetSendQueue(55, &Unk_ov23_022577AC->unk_137B, sizeof(Unk_ov23_022577AC->unk_137B));
|
||||
CommSys_WriteToQueueServer(55, &Unk_ov23_022577AC->unk_137B, sizeof(Unk_ov23_022577AC->unk_137B));
|
||||
}
|
||||
|
||||
void ov23_0224C4CC (int param0, int param1, void * param2, void * param3)
|
||||
@ -1581,7 +1581,7 @@ static BOOL ov23_0224C790 (TaskManager * param0)
|
||||
|
||||
v1->unk_28 = CommSys_ConnectedCount();
|
||||
|
||||
sub_02035EC8();
|
||||
CommSys_DisableSendMovementData();
|
||||
ov23_022417CC();
|
||||
|
||||
if (ov23_02249AB8()) {
|
||||
|
@ -201,7 +201,7 @@ void ov23_022513B0 (int param0, int param1, void * param2, void * param3)
|
||||
UnkStruct_ov23_022513B0 * v0 = param2;
|
||||
FieldSystem * v1 = param3;
|
||||
|
||||
if (!sub_02035EE0()) {
|
||||
if (!CommSys_IsSendingMovementData()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1663,7 +1663,7 @@ void ov88_0223D098 (int param0, Party * param1, int param2)
|
||||
if (CommSys_IsPlayerConnected(param0)) {
|
||||
u8 v0 = param2;
|
||||
|
||||
sub_0203597C(22, ov88_0223D08C(param1, param2), (236 * 6 + 4 * 2));
|
||||
CommSys_SendDataHuge(22, ov88_0223D08C(param1, param2), (236 * 6 + 4 * 2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1693,12 +1693,12 @@ static void ov88_0223D0D4 (TrainerInfo * param0, UnkStruct_02027F8C * param1, Un
|
||||
param2->unk_78[v0] = param1[v0].unk_16;
|
||||
}
|
||||
|
||||
sub_0203597C(28, param2, sizeof(UnkStruct_02027F8C));
|
||||
CommSys_SendDataHuge(28, param2, sizeof(UnkStruct_02027F8C));
|
||||
}
|
||||
|
||||
static void ov88_0223D140 (ChatotCry * param0)
|
||||
{
|
||||
sub_0203597C(29, param0, 1000);
|
||||
CommSys_SendDataHuge(29, param0, 1000);
|
||||
}
|
||||
|
||||
static int ov88_0223D150 (UnkStruct_02095E80 * param0)
|
||||
|
@ -291,7 +291,7 @@ BOOL ov104_0222EE60 (UnkStruct_ov104_0223B5C0 * param0)
|
||||
|
||||
MI_CpuCopy8(v5, ¶m0->unk_784[0], v4);
|
||||
|
||||
if (sub_0203597C(38, param0->unk_784, v3) == 1) {
|
||||
if (CommSys_SendDataHuge(38, param0->unk_784, v3) == 1) {
|
||||
v2 = 1;
|
||||
} else {
|
||||
v2 = 0;
|
||||
@ -1088,7 +1088,7 @@ BOOL ov104_0222F758 (UnkStruct_ov104_0223BA10 * param0)
|
||||
MI_CpuCopy8(v6, ¶m0->unk_410[v0 * v4], v4);
|
||||
}
|
||||
|
||||
if (sub_0203597C(48, param0->unk_410, v3) == 1) {
|
||||
if (CommSys_SendDataHuge(48, param0->unk_410, v3) == 1) {
|
||||
v2 = 1;
|
||||
} else {
|
||||
v2 = 0;
|
||||
@ -1387,7 +1387,7 @@ BOOL ov104_0222FAD0 (UnkStruct_ov104_0223BFFC * param0)
|
||||
MI_CpuCopy8(v6, ¶m0->unk_474[v0 * v4], v4);
|
||||
}
|
||||
|
||||
if (sub_0203597C(70, param0->unk_474, v3) == 1) {
|
||||
if (CommSys_SendDataHuge(70, param0->unk_474, v3) == 1) {
|
||||
v2 = 1;
|
||||
} else {
|
||||
v2 = 0;
|
||||
|
@ -747,7 +747,7 @@ static int ov109_021D11A0 (UnkStruct_ov109_021D0F70 * param0)
|
||||
u32 v1;
|
||||
|
||||
v1 = (u32)param0->unk_24;
|
||||
v0 = sub_0203597C(131, (void *)v1, (236 * 6 + 4 * 2));
|
||||
v0 = CommSys_SendDataHuge(131, (void *)v1, (236 * 6 + 4 * 2));
|
||||
|
||||
if (v0) {
|
||||
param0->unk_00 = 14;
|
||||
|
@ -152,7 +152,7 @@ static BOOL sub_020323D0 (UnkStruct_020322D8 * param0, UnkStruct_0203233C * para
|
||||
return 1;
|
||||
}
|
||||
|
||||
BOOL sub_02032498 (CommQueueMan * param0, int cmd, u8 * param2, int param3, BOOL param4, BOOL param5)
|
||||
BOOL CommQueue_Write (CommQueueMan * param0, int cmd, u8 * param2, int param3, BOOL param4, BOOL param5)
|
||||
{
|
||||
UnkStruct_020322D8 * v0;
|
||||
UnkStruct_020322D8 * v1 = sub_020322D8(param0);
|
||||
@ -298,7 +298,7 @@ void CommQueueMan_Reset (CommQueueMan * param0)
|
||||
param0->unk_10 = NULL;
|
||||
}
|
||||
|
||||
void sub_02032638 (CommQueueMan * param0)
|
||||
void CommQueueMan_Delete (CommQueueMan * param0)
|
||||
{
|
||||
Heap_FreeToHeap(param0->unk_18);
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ void sub_0203CF5C (FieldSystem * param0)
|
||||
void sub_0203D128 (void)
|
||||
{
|
||||
Unk_021C07DC->unk_00->unk_08 = 1;
|
||||
sub_02035EC8();
|
||||
CommSys_DisableSendMovementData();
|
||||
}
|
||||
|
||||
void sub_0203D140 (void)
|
||||
|
@ -784,7 +784,7 @@ static BOOL sub_0205ACC8 (UnkStruct_0205A0D8 * param0)
|
||||
if (param0->unk_86 == 0) {
|
||||
v0 = sub_02035A3C(106, v1, v2);
|
||||
} else {
|
||||
v0 = sub_0203597C(106, v1, v2);
|
||||
v0 = CommSys_SendDataHuge(106, v1, v2);
|
||||
}
|
||||
|
||||
if (v0) {
|
||||
|
@ -1386,5 +1386,5 @@ void sub_0205C1F0 (UnkStruct_0205B43C * param0)
|
||||
|
||||
void sub_0205C214 (UnkStruct_0205B43C * param0)
|
||||
{
|
||||
sub_0203597C(105, param0->unk_184, sizeof(TrainerCard));
|
||||
CommSys_SendDataHuge(105, param0->unk_184, sizeof(TrainerCard));
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ BOOL sub_0207A988 (UnkStruct_0207A778 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sub_0203597C(25, (void *)¶m0->unk_20[0], TrainerInfo_Size());
|
||||
return CommSys_SendDataHuge(25, (void *)¶m0->unk_20[0], TrainerInfo_Size());
|
||||
}
|
||||
|
||||
static void sub_0207A9BC (int param0, int param1, void * param2, void * param3)
|
||||
@ -369,7 +369,7 @@ BOOL sub_0207A9F8 (UnkStruct_0207A778 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sub_0203597C(26, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
return CommSys_SendDataHuge(26, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
}
|
||||
|
||||
static void sub_0207AA28 (int param0, int param1, void * param2, void * param3)
|
||||
@ -402,7 +402,7 @@ BOOL sub_0207AA5C (UnkStruct_0207A778 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sub_0203597C(27, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
return CommSys_SendDataHuge(27, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
}
|
||||
|
||||
static void sub_0207AA90 (int param0, int param1, void * param2, void * param3)
|
||||
@ -436,7 +436,7 @@ BOOL sub_0207AAC8 (UnkStruct_0207A778 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sub_0203597C(28, (void *)¶m0->unk_20[0], 1000);
|
||||
return CommSys_SendDataHuge(28, (void *)¶m0->unk_20[0], 1000);
|
||||
}
|
||||
|
||||
BOOL sub_0207AAFC (UnkStruct_0207A778 * param0)
|
||||
@ -479,7 +479,7 @@ BOOL sub_0207AB58 (UnkStruct_0207A778 * param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sub_0203597C(33, (void *)param0->unk_20, 1000);
|
||||
return CommSys_SendDataHuge(33, (void *)param0->unk_20, 1000);
|
||||
}
|
||||
|
||||
static void sub_0207AB8C (int param0, int param1, void * param2, void * param3)
|
||||
@ -513,9 +513,9 @@ BOOL sub_0207ABD0 (UnkStruct_0207A778 * param0, int param1, int param2)
|
||||
}
|
||||
|
||||
if (param1 == 1) {
|
||||
return sub_0203597C(29, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
return CommSys_SendDataHuge(29, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
} else {
|
||||
return sub_0203597C(30, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
return CommSys_SendDataHuge(30, (void *)¶m0->unk_20[0], sizeof(TrainerData));
|
||||
}
|
||||
}
|
||||
|
||||
@ -550,9 +550,9 @@ BOOL sub_0207AC54 (UnkStruct_0207A778 * param0, int param1, int param2)
|
||||
}
|
||||
|
||||
if (param1 == 1) {
|
||||
return sub_0203597C(31, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
return CommSys_SendDataHuge(31, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
} else {
|
||||
return sub_0203597C(32, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
return CommSys_SendDataHuge(32, (void *)¶m0->unk_20[0], Party_SaveSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ BOOL sub_02095BEC (UnkStruct_02095C48 * param0, UnkStruct_02029C88 ** param1)
|
||||
MI_CpuCopy8(param1[v4], &v0[v1 * v4], v1);
|
||||
}
|
||||
|
||||
if (sub_0203597C(33, v0, v2) == 1) {
|
||||
if (CommSys_SendDataHuge(33, v0, v2) == 1) {
|
||||
v3 = 1;
|
||||
} else {
|
||||
v3 = 0;
|
||||
|
@ -303,7 +303,7 @@ static void sub_020963C0 (UnkStruct_020961E8 * param0, int param1)
|
||||
}
|
||||
|
||||
param0->unk_418.unk_BBC = LCRNG_Next();
|
||||
sub_0203597C(116, ¶m0->unk_418, sizeof(UnkStruct_ov59_021D30E0));
|
||||
CommSys_SendDataHuge(116, ¶m0->unk_418, sizeof(UnkStruct_ov59_021D30E0));
|
||||
}
|
||||
|
||||
static int sub_02096400 (void)
|
||||
|
Loading…
Reference in New Issue
Block a user