Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sub_80BB038(u8 taskId)
- {
- sub_80BB1D4();
- if(gUnknown_020387B4[CRY_TEST_PROGRESS])
- {
- if(gUnknown_020387B4[CRY_TEST_RELEASE])
- {
- gUnknown_020387B4[CRY_TEST_RELEASE]--;
- }
- else // _080BB05C
- {
- s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]];
- if(panpot != -128)
- {
- if(panpot == 0x7F)
- {
- gUnknown_020387B4[CRY_TEST_CHORUS] += 2;
- if(gUnknown_020387B4[CRY_TEST_CHORUS] < 0x3F)
- SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]);
- }
- }
- else // _080BB08C
- {
- gUnknown_020387B4[CRY_TEST_CHORUS] -= 2;
- if(gUnknown_020387B4[CRY_TEST_CHORUS] > -0x40)
- SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]);
- }
- }
- }
- // _080BB0A2
- if(gMain.newKeys & 0x2)
- {
- REG_DISPCNT = 0x7140;
- REG_WIN0H = 0x11DF;
- REG_WIN0V = 0x11F;
- MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
- gTasks[taskId].func = sub_80BA258;
- return;
- }
- if(gMain.newKeys & 0x1) // _080BB104
- {
- s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]];
- if(panpot != -128)
- {
- if(panpot == 0x7F)
- {
- 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.
- gUnknown_020387B4[CRY_TEST_CHORUS] = -0x40;
- gUnknown_020387B4[CRY_TEST_PROGRESS] = 1;
- gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E;
- return;
- }
- }
- else // _080BB140
- {
- PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], 0x3F);
- gUnknown_020387B4[CRY_TEST_CHORUS] = 0x3F;
- gUnknown_020387B4[CRY_TEST_PROGRESS] = 1;
- gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E;
- return;
- }
- // _080BB154
- PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], panpot);
- gUnknown_020387B4[CRY_TEST_PROGRESS] = 0;
- return;
- }
- if(gMain.newKeys & 0x200) // _080BB15E
- {
- gUnknown_020387B4[CRY_TEST_PANPOT]++;
- if(gUnknown_020387B4[CRY_TEST_PANPOT] > 4)
- gUnknown_020387B4[CRY_TEST_PANPOT] = 0;
- }
- if(gMain.newKeys & 0x100) // _080BB176
- {
- gUnknown_020387B4[CRY_TEST_PANPOT]--;
- if(gUnknown_020387B4[CRY_TEST_PANPOT] < 0)
- gUnknown_020387B4[CRY_TEST_PANPOT] = 4;
- }
- if(gMain.newAndRepeatedKeys & 0x10) // _080BB192
- {
- gUnknown_020387B4[CRY_TEST_UNK0]++;
- if(gUnknown_020387B4[CRY_TEST_UNK0] > 0xF7)
- gUnknown_020387B4[CRY_TEST_UNK0] = 0;
- }
- else if(gMain.newAndRepeatedKeys & 0x20) // _080BB1B0
- {
- gUnknown_020387B4[CRY_TEST_UNK0]--;
- if(gUnknown_020387B4[CRY_TEST_UNK0] < 0)
- gUnknown_020387B4[CRY_TEST_UNK0] = 0xF7;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement