Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Mailbox_DrawMailList
- void sub_813B01C(void)
- {
- u16 i;
- u16 yCoord = 0;
- int trueIndex;
- for(i = gMailboxInfo.itemsAbove, trueIndex = i + gMailboxInfo.pageItems; i < trueIndex; i++)
- {
- yCoord = (i - gMailboxInfo.itemsAbove) * 2;
- MenuFillWindowRectWithBlankTile(0x15, yCoord + 2, 0x1C, yCoord + 3);
- if(i != gMailboxInfo.count)
- {
- StringCopy(gStringVar1, (u8 *)gSaveBlock1.mail[i + 6].playerName);
- SanitizeNameString(gStringVar1);
- MenuPrint(gStringVar1, 0x15, yCoord + 2);
- }
- else
- {
- goto weirdCase; // again, what???
- }
- }
- beforeLabel:
- if(i - gMailboxInfo.itemsAbove != 8)
- MenuFillWindowRectWithBlankTile(0x15, yCoord + 4, 0x1C, 0x12);
- switch(gMailboxInfo.itemsAbove)
- {
- default:
- CreateVerticalScrollIndicators(0, 0xC8, 8);
- break;
- weirdCase:
- MenuPrint(gOtherText_CancelNoTerminator, 0x15, yCoord + 2);
- goto beforeLabel;
- case 0:
- DestroyVerticalScrollIndicator(0);
- break;
- }
- if(gMailboxInfo.itemsAbove + gMailboxInfo.pageItems <= gMailboxInfo.count)
- CreateVerticalScrollIndicators(1, 0xC8, 0x98);
- else
- DestroyVerticalScrollIndicator(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement