Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool32 sub_800F1E0(void)
- {
- u16 i;
- u16 flags;
- u8 r0;
- u16 j;
- u8 retval;
- if (gUnknown_03005000.unk_04 >= 20 && gUnknown_03005000.unk_0e == 1)
- {
- rfu_waitREQComplete();
- while (gUnknown_03005000.unk_cdb == 0)
- {
- if (gUnknown_03005000.unk_ee != 0)
- {
- return FALSE;
- }
- }
- rfu_REQ_recvData();
- rfu_waitREQComplete();
- if ((gUnknown_03005000.unk_ce2 & gUnknown_03004140.unk_03) == gUnknown_03005000.unk_ce2)
- {
- gUnknown_03005000.unk_cdc = 0;
- gUnknown_02022B44.unk_06++;
- flags = gUnknown_03004140.unk_00;
- for (i = 0; i < 4; i++)
- {
- if (flags & 1)
- {
- if (gUnknown_03005000.unk_14[i][1])
- {
- if (gUnknown_03005000.unk_cee[i] != 0xff && (gUnknown_03005000.unk_14[i][0] + 1) & 7)
- {
- if (++gUnknown_03005000.unk_cea[i] > 4)
- sub_8011170(0x8100);
- }
- else
- {
- gUnknown_03005000.unk_cee[i] = gUnknown_03005000.unk_14[i][0] / 32;
- gUnknown_03005000.unk_cea[i] = 0;
- gUnknown_03005000.unk_14[i][0] %= 32;
- r0 = gUnknown_03005000.unk_cde[i];
- for (j = 0; j < 7; j++)
- {
- gRecvCmds[r0][j] = (gUnknown_03005000.unk_14[i][1] << 8) | gUnknown_03005000.unk_14[i][0];
- gUnknown_03005000.unk_14[i][1] = 0;
- gUnknown_03005000.unk_14[i][0] = 0;
- }
- }
- rfu_UNI_clearRecvNewDataFlag(i);
- }
- }
- flags >>= 1;
- }
- sub_800F014();
- sub_800F86C(0);
- sub_8010528();
- if (gUnknown_03005000.unk_ce5 && !gUnknown_03005000.unk_cd9)
- {
- gUnknown_02022B44.unk_0e = 0;
- rfu_clearSlot(gUnknown_03005000.unk_cda, 3);
- for (i = 0; i < 4; i++)
- {
- if ((gUnknown_03005000.unk_ce5 >> i) & 1)
- {
- rfu_setRecvBuffer(0x10, i, gUnknown_03005000.unk_14[i], 14);
- }
- }
- sub_800E88C(gUnknown_03005000.unk_ce2, gUnknown_03005000.unk_ce2 | gUnknown_03005000.unk_ce5);
- gUnknown_03005000.unk_ce9 = gUnknown_03005000.unk_ce5;
- gUnknown_03005000.unk_ce2 |= gUnknown_03005000.unk_ce5;
- gUnknown_03005000.unk_ce5 = 0;
- rfu_UNI_setSendData(gUnknown_03005000.unk_ce2, gUnknown_03005000.unk_c87, 70);
- gUnknown_03005000.unk_cda = sub_800E87C(gUnknown_03005000.unk_ce2);
- CreateTask(sub_8010AAC, 0);
- }
- }
- else
- {
- gUnknown_03005000.unk_cdc = 1;
- gUnknown_03005000.unk_0e = 0;
- }
- gUnknown_03005000.unk_0e = 0;
- }
- retval = gUnknown_03005000.unk_cdc;
- return gUnknown_03007890->unk_06 ? retval & 1 : FALSE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement