Advertisement
EliteAnax17

Untitled

Jun 9th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. // Mailbox_DrawMailList
  2. void sub_813B01C(void)
  3. {
  4. u16 i;
  5. u16 yCoord = 0;
  6. int trueIndex;
  7.  
  8. for(i = gMailboxInfo.itemsAbove, trueIndex = i + gMailboxInfo.pageItems; i < trueIndex; i++)
  9. {
  10. yCoord = (i - gMailboxInfo.itemsAbove) * 2;
  11. MenuFillWindowRectWithBlankTile(0x15, yCoord + 2, 0x1C, yCoord + 3);
  12.  
  13. if(i != gMailboxInfo.count)
  14. {
  15. StringCopy(gStringVar1, (u8 *)gSaveBlock1.mail[i + 6].playerName);
  16. SanitizeNameString(gStringVar1);
  17. MenuPrint(gStringVar1, 0x15, yCoord + 2);
  18. }
  19. else
  20. {
  21. goto weirdCase; // again, what???
  22. }
  23. }
  24.  
  25. beforeLabel:
  26. if(i - gMailboxInfo.itemsAbove != 8)
  27. MenuFillWindowRectWithBlankTile(0x15, yCoord + 4, 0x1C, 0x12);
  28.  
  29. switch(gMailboxInfo.itemsAbove)
  30. {
  31. default:
  32. CreateVerticalScrollIndicators(0, 0xC8, 8);
  33. break;
  34. weirdCase:
  35. MenuPrint(gOtherText_CancelNoTerminator, 0x15, yCoord + 2);
  36. goto beforeLabel;
  37. case 0:
  38. DestroyVerticalScrollIndicator(0);
  39. break;
  40. }
  41.  
  42. if(gMailboxInfo.itemsAbove + gMailboxInfo.pageItems <= gMailboxInfo.count)
  43. CreateVerticalScrollIndicators(1, 0xC8, 0x98);
  44. else
  45. DestroyVerticalScrollIndicator(1);
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement