Handle Confirm Menu Input (OPEN.BIN)
Jump to navigation
Jump to search
# ROUTINE: HANDLE CONFIRM MENU INPUT (OPEN.BIN)? # Parameters: # r4 = (input) (Struct pointer) (Entries are 4-byte words) # 0x00: ? # 0x0c: ? # 0x20: (Month) Currently selected month (1 to 12) # 0x24: (Day) Currently selected day # 0x28: (Selection) Which selection is being made # 0 = Day # 1 = Month 8006c464: 3c038009 lui r3,0x8009 8006c468: 8c63e53c lw r3,-0x1ac4(r3) # *0x8008e53c 8006c46c: 27bdffe0 addiu r29,r29,-0x0020 8006c470: afb00018 sw r16,0x0018(r29) 8006c474: 00808021 addu r16,r4,r0 # input 8006c478: 30620010 andi r2,r3,0x0010 # *0x8008e53c & 0x10 8006c47c: 10400029 beq r2,r0,0x8006c524 # if ((*0x8008e53c & 0x10) != 0) { 8006c480: afbf001c sw r31,0x001c(r29) 8006c484: 3c028008 lui r2,0x8008 8006c488: 8c425cac lw r2,0x5cac(r2) # *0x80085cac 8006c48c: 00000000 nop 8006c490: 30420004 andi r2,r2,0x0004 # *0x80085cac & 0x04 8006c494: 14400023 bne r2,r0,0x8006c524 # if ((*0x80085cac & 0x04) == 0) { 8006c498: 38620010 xori r2,r3,0x0010 # *0x8008e53c XOR 0x10 // Toggle 0x10 bit 8006c49c: 3c018009 lui r1,0x8009 8006c4a0: ac22e53c sw r2,-0x1ac4(r1) # *0x8008e53c = *0x8008e53c XOR 0x10 8006c4a4: 0c010fd4 jal 0x80043f50 # ? 0x43f50 (); 8006c4a8: 00000000 nop 8006c4ac: 3c040001 lui r4,0x0001 8006c4b0: 34847b60 ori r4,r4,0x7b60 # 0x17b90 8006c4b4: 340564d8 ori r5,r0,0x64d8 # 0x64d8 8006c4b8: 34020001 ori r2,r0,0x0001 # 1 8006c4bc: 3c018005 lui r1,0x8005 8006c4c0: ac22e5bc sw r2,-0x1a44(r1) # 0x8004e5bc = 1 8006c4c4: 3c028008 lui r2,0x8008 8006c4c8: 8c4252a8 lw r2,0x52a8(r2) # *0x800852a8 8006c4cc: 3c038008 lui r3,0x8008 8006c4d0: 8c6352a0 lw r3,0x52a0(r3) # *0x800852a0 8006c4d4: 2442fffd addiu r2,r2,-0x0003 # *0x800852a8 - 3 8006c4d8: 3c018008 lui r1,0x8008 8006c4dc: ac2252a8 sw r2,0x52a8(r1) # *0x800852a8 = *0x800852a8 - 3 8006c4e0: 3c028008 lui r2,0x8008 8006c4e4: 8c425fc4 lw r2,0x5fc4(r2) # *0x80085fc4 8006c4e8: 2463fffd addiu r3,r3,-0x0003 # *0x800852a0 - 3 8006c4ec: 3c018008 lui r1,0x8008 8006c4f0: ac2352a0 sw r3,0x52a0(r1) # *0x800852a0 = *0x800852a0 - 3 8006c4f4: 3c038009 lui r3,0x8009 8006c4f8: 8c63fc04 lw r3,-0x03fc(r3) # *0x8008fc04 8006c4fc: 2442fffa addiu r2,r2,-0x0006 # *0x80085fc4 - 6 8006c500: 2463fffe addiu r3,r3,-0x0002 # *0x8008fc04 - 2 8006c504: 3c018008 lui r1,0x8008 8006c508: ac225fc4 sw r2,0x5fc4(r1) # *0x80085fc4 = *0x80085fc4 - 6 8006c50c: 3c018009 lui r1,0x8009 8006c510: ac23fc04 sw r3,-0x03fc(r1) # *0x8008fc04 = *0x8008fc04 - 2 8006c514: 0c01a81d jal 0x8006a074 # ? 0x6a074 (0x17b90, 0x64d8, 0x9e4); 8006c518: 340609e4 ori r6,r0,0x09e4 # 0x9e4 8006c51c: 0801b1cf j 0x8006c73c 8006c520: 00000000 nop # } # } else { # enterNextBlock = false 8006c524: 3c038008 lui r3,0x8008 8006c528: 8c6355a4 lw r3,0x55a4(r3) # *0x800855a4 8006c52c: 00000000 nop 8006c530: 30620020 andi r2,r3,0x0020 # *0x800855a4 & 0x20 8006c534: 1040003d beq r2,r0,0x8006c62c # if (*0x800855a4 & 0x20) { 8006c538: 30620040 andi r2,r3,0x0040 8006c53c: 0c010ffe jal 0x80043ff8 # Play Sound Effect (1); 8006c540: 34040001 ori r4,r0,0x0001 8006c544: 8e02000c lw r2,0x000c(r16) # input.0x0c 8006c548: 00000000 nop 8006c54c: 1440003b bne r2,r0,0x8006c63c # if (input.0x0c == 0) { 8006c550: 3404005f ori r4,r0,0x005f 8006c554: 3c038009 lui r3,0x8009 8006c558: 8c63fc04 lw r3,-0x03fc(r3) # *0x8008fc04 8006c55c: 00000000 nop 8006c560: 2463fffe addiu r3,r3,-0x0002 # *0x8008fc04 - 2 8006c564: 00031040 sll r2,r3,0x01 # (*0x8008fc04 - 2) * 2 8006c568: 00431021 addu r2,r2,r3 # (*0x8008fc04 - 2) * 3 8006c56c: 000210c0 sll r2,r2,0x03 # (*0x8008fc04 - 2) * 24 8006c570: 00431021 addu r2,r2,r3 # (*0x8008fc04 - 2) * 25 8006c574: 00021080 sll r2,r2,0x02 # (*0x8008fc04 - 2) * 100 8006c578: 3c018008 lui r1,0x8008 8006c57c: 24215344 addiu r1,r1,0x5344 # 0x80085344 8006c580: 00220821 addu r1,r1,r2 # 0x80085344 + ((*0x8008fc04 - 2) * 100) 8006c584: 8c250000 lw r5,0x0000(r1) # birthdayMonth = *(0x80085344 + ((*0x8008fc04 - 2) * 100)) 8006c588: 3c018008 lui r1,0x8008 8006c58c: 24215348 addiu r1,r1,0x5348 # 0x80085348 8006c590: 00220821 addu r1,r1,r2 # 0x80085348 + ((*0x8008fc04 - 2) * 100) 8006c594: 8c220000 lw r2,0x0000(r1) # birthdayDay = *(0x80085348 + ((*0x8008fc04 - 2) * 100)) 8006c598: afa50010 sw r5,0x0010(r29) # birthdayMonth 8006c59c: 0c03bc97 jal 0x800ef25c # Set Script Variable (0x5f, birthdayMonth) 8006c5a0: afa20014 sw r2,0x0014(r29) # birthdayDay 8006c5a4: 8fa50014 lw r5,0x0014(r29) # birthdayDay 8006c5a8: 0c03bc97 jal 0x800ef25c # Set Script Variable (0x60, birthdayDay); 8006c5ac: 34040060 ori r4,r0,0x0060 # 0x60 8006c5b0: 8fa40010 lw r4,0x0010(r29) # birthdayMonth 8006c5b4: 8fa50014 lw r5,0x0014(r29) # birthdayDay 8006c5b8: 0c01a17b jal 0x800685ec # result_0x685ec = ? 0x685ec (birthdayMonth, birthdayDay); 8006c5bc: 00000000 nop 8006c5c0: 27a40010 addiu r4,r29,0x0010 8006c5c4: 27a50014 addiu r5,r29,0x0014 8006c5c8: 0c01a108 jal 0x80068420 # ? 0x68420 (&local1, &local2); 8006c5cc: 00408021 addu r16,r2,r0 # result_0x685ec 8006c5d0: 0c0166bc jal 0x80059af0 # partyRamza = Get Party Data Pointer (0); 8006c5d4: 00002021 addu r4,r0,r0 # 0 8006c5d8: 00002021 addu r4,r0,r0 # 0 8006c5dc: 34050060 ori r5,r0,0x0060 # 0x60 8006c5e0: a0500005 sb r16,0x0005(r2) # partyRamza.Birthday = result_0x685ec 8006c5e4: 32100100 andi r16,r16,0x0100 # result_0x685ec & 0x100 8006c5e8: 8fa30010 lw r3,0x0010(r29) # local1 8006c5ec: 00108203 sra r16,r16,0x08 # (result_0x685ec & 0x100) >> 8 8006c5f0: 2463ffff addiu r3,r3,-0x0001 # local1 - 1 8006c5f4: 00031900 sll r3,r3,0x04 # (local1 - 1) * 16 8006c5f8: 02038025 or r16,r16,r3 # ((result_0x685ec & 0x100) >> 8) | ((local1 - 1) * 16) 8006c5fc: 0c010efa jal 0x80043be8 8006c600: a0500006 sb r16,0x0006(r2) # partyRamza.0x06 = ((result_0x685ec & 0x100) >> 8) | ((local1 - 1) * 16) 8006c604: 0c019fa4 jal 0x80067e90 # ? 0x67e90 (0x20); 8006c608: 34040020 ori r4,r0,0x0020 # 0x20 8006c60c: 3c028009 lui r2,0x8009 8006c610: 8c42e53c lw r2,-0x1ac4(r2) # *0x8008e53c 8006c614: 00000000 nop 8006c618: 34420010 ori r2,r2,0x0010 # *0x8008e53c & 0x10 8006c61c: 3c018009 lui r1,0x8009 8006c620: ac22e53c sw r2,-0x1ac4(r1) # *0x8008e53c = *0x8008e53c & 0x10 8006c624: 0801b1cf j 0x8006c73c # return; # } else { # enterNextBlock = true # } 8006c628: 00000000 nop # } 8006c62c: 10400023 beq r2,r0,0x8006c6bc # if ((*0x800855a4 & 0x20) or enterNextBlock) { 8006c630: 00000000 nop # if (not (enterNextBlock)) { 8006c634: 0c010ffe jal 0x80043ff8 # Play Sound Effect (2); 8006c638: 34040002 ori r4,r0,0x0002 # } 8006c63c: 3c038008 lui r3,0x8008 8006c640: 246352c0 addiu r3,r3,0x52c0 # 0x800852c0 8006c644: 3c058009 lui r5,0x8009 8006c648: 8ca5fc04 lw r5,-0x03fc(r5) # *0x8008fc04 8006c64c: 3c028008 lui r2,0x8008 8006c650: 8c425fc4 lw r2,0x5fc4(r2) # *0x80085fc4 8006c654: 24a5ffff addiu r5,r5,-0x0001 # *0x8008fc04 - 1 8006c658: 00052040 sll r4,r5,0x01 # (*0x8008fc04 - 1) * 2 8006c65c: 00852021 addu r4,r4,r5 # (*0x8008fc04 - 1) * 3 8006c660: 000420c0 sll r4,r4,0x03 # (*0x8008fc04 - 1) * 24 8006c664: 00852021 addu r4,r4,r5 # (*0x8008fc04 - 1) * 25 8006c668: 00042080 sll r4,r4,0x02 # (*0x8008fc04 - 1) * 100 8006c66c: 00832021 addu r4,r4,r3 # ((*0x8008fc04 - 1) * 100) + 0x800852c0 8006c670: 2442fffd addiu r2,r2,-0x0003 # *0x80085fc4 - 3 8006c674: 3c018008 lui r1,0x8008 8006c678: ac225fc4 sw r2,0x5fc4(r1) # *0x80085fc4 = *0x80085fc4 - 3 8006c67c: 3c028008 lui r2,0x8008 8006c680: 8c4252a8 lw r2,0x52a8(r2) # *0x800852a8 8006c684: 3c038008 lui r3,0x8008 8006c688: 8c6352a0 lw r3,0x52a0(r3) # *0x800852a0 8006c68c: 3c018009 lui r1,0x8009 8006c690: ac25fc04 sw r5,-0x03fc(r1) # *0x8008fc04 = *0x8008fc04 - 1 8006c694: 2442ffff addiu r2,r2,-0x0001 # *0x800852a8 - 1 8006c698: 2463fffe addiu r3,r3,-0x0002 # *0x800852a0 - 2 8006c69c: 3c018008 lui r1,0x8008 8006c6a0: ac2252a8 sw r2,0x52a8(r1) # *0x800852a8 = *0x800852a8 - 1 8006c6a4: 3c018008 lui r1,0x8008 8006c6a8: ac2352a0 sw r3,0x52a0(r1) # *0x800852a0 = *0x800852a0 - 2 8006c6ac: 0c01aedd jal 0x8006bb74 # ? 0x6bb74 (); 8006c6b0: 00000000 nop 8006c6b4: 0801b1cf j 0x8006c73c 8006c6b8: 00000000 nop # } else { 8006c6bc: 0c01a09a jal 0x80068268 # upInputCheck = Button Input Related? (0x68268) (0x1000); 8006c6c0: 34041000 ori r4,r0,0x1000 # 0x1000 -> Up button 8006c6c4: 14400005 bne r2,r0,0x8006c6dc # if (upInputCheck == 0) { 8006c6c8: 00000000 nop 8006c6cc: 0c01a09a jal 0x80068268 # downInputCheck = Button Input Releated? (0x68268) (0x4000); 8006c6d0: 34044000 ori r4,r0,0x4000 # 0x4000 -> Down button 8006c6d4: 10400019 beq r2,r0,0x8006c73c # if (downInputCheck == 0) return; 8006c6d8: 00000000 nop # } 8006c6dc: 8e03000c lw r3,0x000c(r16) # *input.0x0c 8006c6e0: 8e020000 lw r2,0x0000(r16) # *input.0x00 8006c6e4: 8e060008 lw r6,0x0008(r16) # *input.0x08 8006c6e8: 38630001 xori r3,r3,0x0001 # *input.0x0c XOR 1 // Toggle 1 bit 8006c6ec: 000228c0 sll r5,r2,0x03 # *input.0x00 * 8 8006c6f0: 00a22821 addu r5,r5,r2 # *input.0x00 * 9 8006c6f4: 00052880 sll r5,r5,0x02 # *input.0x00 * 36 8006c6f8: 000610c0 sll r2,r6,0x03 # *input.0x08 * 8 8006c6fc: 00461023 subu r2,r2,r6 # *input.0x08 * 7 8006c700: 000210c0 sll r2,r2,0x03 # *input.0x08 * 56 8006c704: ae03000c sw r3,0x000c(r16) # *input.0x0c = *input.0x0c XOR 1 8006c708: 00031900 sll r3,r3,0x04 # *input.0x0c * 16 8006c70c: 3c018008 lui r1,0x8008 8006c710: 242160b8 addiu r1,r1,0x60b8 # 0x800860b8 8006c714: 00220821 addu r1,r1,r2 # 0x800860b8 + (*input.0x08 * 56) 8006c718: 8c220000 lw r2,0x0000(r1) # *(0x800860b8 + (*input.0x08 * 56)) 8006c71c: 2463000c addiu r3,r3,0x000c # (*input.0x0c * 16) + 12 8006c720: 00431021 addu r2,r2,r3 # *(0x800860b8 + (*input.0x08 * 56)) + (*input.0x0c * 16) + 12 8006c724: 3c018008 lui r1,0x8008 8006c728: 24215d20 addiu r1,r1,0x5d20 # 0x80085d20 8006c72c: 00250821 addu r1,r1,r5 # 0x80085d20 + (*input.0x00 * 36) 8006c730: ac220000 sw r2,0x0000(r1) # *(0x80085d20 + (*input.0x00 * 36)) = *(0x800860b8 + (*input.0x08 * 56)) + (*input.0x0c * 16) + 12 8006c734: 0c010ffe jal 0x80043ff8 # Play Sound Effect (3); 8006c738: 34040003 ori r4,r0,0x0003 # } # } 8006c73c: 8fbf001c lw r31,0x001c(r29) 8006c740: 8fb00018 lw r16,0x0018(r29) 8006c744: 27bd0020 addiu r29,r29,0x0020 8006c748: 03e00008 jr r31 8006c74c: 00000000 nop