Advertisement
EliteAnax17

Untitled

Jun 29th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. void sub_80BB038(u8 taskId)
  2. {
  3. sub_80BB1D4();
  4. if(gUnknown_020387B4[CRY_TEST_PROGRESS])
  5. {
  6. if(gUnknown_020387B4[CRY_TEST_RELEASE])
  7. {
  8. gUnknown_020387B4[CRY_TEST_RELEASE]--;
  9. }
  10. else // _080BB05C
  11. {
  12. s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]];
  13. if(panpot != -128)
  14. {
  15. if(panpot == 0x7F)
  16. {
  17. gUnknown_020387B4[CRY_TEST_CHORUS] += 2;
  18. if(gUnknown_020387B4[CRY_TEST_CHORUS] < 0x3F)
  19. SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]);
  20. }
  21. }
  22. else // _080BB08C
  23. {
  24. gUnknown_020387B4[CRY_TEST_CHORUS] -= 2;
  25. if(gUnknown_020387B4[CRY_TEST_CHORUS] > -0x40)
  26. SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]);
  27. }
  28. }
  29. }
  30. // _080BB0A2
  31. if(gMain.newKeys & 0x2)
  32. {
  33. REG_DISPCNT = 0x7140;
  34. REG_WIN0H = 0x11DF;
  35. REG_WIN0V = 0x11F;
  36. MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
  37. gTasks[taskId].func = sub_80BA258;
  38. return;
  39. }
  40. if(gMain.newKeys & 0x1) // _080BB104
  41. {
  42. s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]];
  43. if(panpot != -128)
  44. {
  45. if(panpot == 0x7F)
  46. {
  47. PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], -0x40); // the original asm adds a negative 0x40 to panpot to get a value of 0x3F. compiler is extremely insistent on loading this directly.
  48. gUnknown_020387B4[CRY_TEST_CHORUS] = -0x40;
  49. gUnknown_020387B4[CRY_TEST_PROGRESS] = 1;
  50. gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E;
  51. return;
  52. }
  53. }
  54. else // _080BB140
  55. {
  56. PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], 0x3F);
  57. gUnknown_020387B4[CRY_TEST_CHORUS] = 0x3F;
  58. gUnknown_020387B4[CRY_TEST_PROGRESS] = 1;
  59. gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E;
  60. return;
  61. }
  62. // _080BB154
  63. PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], panpot);
  64. gUnknown_020387B4[CRY_TEST_PROGRESS] = 0;
  65. return;
  66. }
  67. if(gMain.newKeys & 0x200) // _080BB15E
  68. {
  69. gUnknown_020387B4[CRY_TEST_PANPOT]++;
  70. if(gUnknown_020387B4[CRY_TEST_PANPOT] > 4)
  71. gUnknown_020387B4[CRY_TEST_PANPOT] = 0;
  72. }
  73. if(gMain.newKeys & 0x100) // _080BB176
  74. {
  75. gUnknown_020387B4[CRY_TEST_PANPOT]--;
  76. if(gUnknown_020387B4[CRY_TEST_PANPOT] < 0)
  77. gUnknown_020387B4[CRY_TEST_PANPOT] = 4;
  78. }
  79. if(gMain.newAndRepeatedKeys & 0x10) // _080BB192
  80. {
  81. gUnknown_020387B4[CRY_TEST_UNK0]++;
  82. if(gUnknown_020387B4[CRY_TEST_UNK0] > 0xF7)
  83. gUnknown_020387B4[CRY_TEST_UNK0] = 0;
  84. }
  85. else if(gMain.newAndRepeatedKeys & 0x20) // _080BB1B0
  86. {
  87. gUnknown_020387B4[CRY_TEST_UNK0]--;
  88. if(gUnknown_020387B4[CRY_TEST_UNK0] < 0)
  89. gUnknown_020387B4[CRY_TEST_UNK0] = 0xF7;
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement