Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TODO: Figure out what the f**k is going on here
- static void sub_8049ED4(u8 a0)
- {
- u8 i;
- s8 stringLength;
- u8 whichParty = 1;
- u8 whichPokemon;
- u8 string1[40];
- u8 string2[56];
- u8 temp0 = gUnknown_03004824->unk_0082[a0];
- if (temp0 < PARTY_SIZE)
- whichParty = 0;
- whichPokemon = temp0 % PARTY_SIZE;
- switch (gUnknown_03004824->unk_0080[a0])
- {
- case 1:
- for (i = 0; i < gUnknown_03004824->partyCounts[a0]; i ++)
- {
- gSprites[gUnknown_03004824->partyIcons[whichParty][i]].invisible = TRUE;
- }
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].invisible = FALSE;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data0 = 20;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data2 = (gTradeMonSpriteCoords[6 * whichParty + whichPokemon][0] + gTradeMonSpriteCoords[6 * whichParty + whichPokemon + 1][0]) / 2 * 8 + 14;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data4 = gTradeMonSpriteCoords[6 * whichParty + whichPokemon][1] * 8 - 12;
- oamt_set_x3A_32(&gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]], sub_809D62C);
- gUnknown_03004824->unk_0080[a0] ++;
- sub_8078A34(&gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]]);
- HandleDestroyMenuCursors();
- FillWindowRect_DefaultPalette(&gUnknown_03004824->window, 0, gUnknown_0820C330[whichParty][0], 0, gUnknown_0820C330[whichParty][1], 19);
- sub_804A96C_alt(&gUnknown_03004824->unk_00c8, 15 * a0, 0, gTradePartyBoxTilemap, 15, 17, 0);
- if (whichParty == 0)
- {
- sub_804A80C();
- }
- break;
- case 2:
- if (gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].callback == sub_809D62C)
- {
- gUnknown_03004824->unk_0080[a0] = 3;
- }
- break;
- case 3:
- sub_804A96C_alt(&gUnknown_03004824->unk_00c8, 15 * whichParty, 0, gTradePartyBoxTilemap, 15, 17, 0);
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].pos1.x = (gTradeMonSpriteCoords[6 * whichParty + whichPokemon ][0] + gTradeMonSpriteCoords[6 * whichParty + whichPokemon + 1][0]) / 2 * 8 + 14;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].pos1.y = gTradeMonSpriteCoords[6 * whichParty + whichPokemon ][1] * 8 - 12;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].pos2.x = 0;
- gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].pos2.y = 0;
- stringLength = sub_804A2B4(string1 + 6, whichParty, whichPokemon);
- string1[0] = 0xFC;
- string1[1] = 0x06;
- string1[2] = 0x04;
- string1[3] = 0xFC;
- string1[4] = 0x11;
- string1[5] = (64 - stringLength) / 2;
- sub_8003460(&gUnknown_03004824->window, string1, gUnknown_03004824->unk_007a + whichParty * 6 * 32, gUnknown_0820C334[whichParty][0], gUnknown_0820C334[whichParty][1]);
- sub_804A33C(string2, whichParty, whichPokemon);
- sub_8003460(&gUnknown_03004824->window, gOtherText_Terminator2, gUnknown_03004824->unk_007a + whichParty * 6 * 32 + 32, gUnknown_0820C334[whichParty + 1][0], gUnknown_0820C334[whichParty + 1][1] + 1);
- sub_8003460(&gUnknown_03004824->window, string2, gUnknown_03004824->unk_007a + whichParty * 6 * 32 + 38, gUnknown_0820C334[whichParty + 1][0], gUnknown_0820C334[whichParty + 1][1] + 1);
- gUnknown_03004824->unk_0080[a0] ++;
- break;
- case 4:
- sub_804ACD8(gUnknown_0820C14C[5], (u8 *)(BG_CHAR_ADDR(4) + 32 * gUnknown_03004824->unk_007e), 20);
- sub_804A51C(a0, whichPokemon, gUnknown_0820C3D1[a0][0] + 4, gUnknown_0820C3D1[a0][1] + 1, gUnknown_0820C3D1[a0][0], gUnknown_0820C3D1[a0][1]);
- gUnknown_03004824->unk_0080[a0] ++;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement