0x14c4a8
Jump to navigation
Jump to search
8014c4a8: 27bdffb0 addiu r29,r29,-0x0050 8014c4ac: afbf004c sw r31,0x004c(r29) 8014c4b0: afbe0048 sw r30,0x0048(r29) 8014c4b4: afb70044 sw r23,0x0044(r29) 8014c4b8: afb60040 sw r22,0x0040(r29) 8014c4bc: afb5003c sw r21,0x003c(r29) 8014c4c0: afb40038 sw r20,0x0038(r29) 8014c4c4: afb30034 sw r19,0x0034(r29) 8014c4c8: afb20030 sw r18,0x0030(r29) 8014c4cc: afb1002c sw r17,0x002c(r29) 8014c4d0: afb00028 sw r16,0x0028(r29) 8014c4d4: 94c20000 lhu r2,0x0000(r6) when called from 00139bec - 0013aed8 r6 is a stack pointer. loads ? menu value (0x00) 8014c4d8: 00000000 nop 8014c4dc: a7a20010 sh r2,0x0010(r29) store in stack 8014c4e0: 94c20002 lhu r2,0x0002(r6) load ? menu value 2 8014c4e4: 00000000 nop 8014c4e8: a7a20012 sh r2,0x0012(r29) store in stack 8014c4ec: 94c20004 lhu r2,0x0004(r6) 8014c4f0: 00a08821 addu r17,r5,r0 r17 = inner height of window 8014c4f4: a7a20014 sh r2,0x0014(r29) store inner window width 8014c4f8: 94c20006 lhu r2,0x0006(r6) load inner window height 8014c4fc: 00000000 nop 8014c500: a7a20016 sh r2,0x0016(r29) store in stack 8014c504: 288200f5 slti r2,r4,0x00f5 8014c508: 14400002 bne r2,r0,0x8014c514 branch if window width is 0xf4 or less 8014c50c: 00e0a821 addu r21,r7,r0 r21 = r7 (if called from 00139bec - 0013aed8, 0x02) 8014c510: 340400ff ori r4,r0,0x00ff set window width to 0xff 8014c514: 00910018 mult r4,r17 width * height 8014c518: 30940003 andi r20,r4,0x0003 r20 = checks for odd pixel width? 8014c51c: 0014182b sltu r3,r0,r20 set if 0 < odd pixels 8014c520: 00041083 sra r2,r4,0x02 r2 = width / 4 8014c524: 0043a021 addu r20,r2,r3 menu width / 4 (rounded up) 8014c528: 3c1e8017 lui r30,0x8017 8014c52c: 8fde3f5c lw r30,0x3f5c(r30) pointer to ability menu display data? 8014c530: 00001012 mflo r2 r2 = menu width * height 8014c534: 0002b843 sra r23,r2,0x01 r23 = menu width * height/2 8014c538: 2ae23001 slti r2,r23,0x3001 set if width * height is 0x3000 or less 8014c53c: 14400005 bne r2,r0,0x8014c554 branch if so 8014c540: 0000b021 addu r22,r0,r0 clear r22 8014c544: 16a00004 bne r21,r0,0x8014c558 branch if r21 != 0 8014c548: 34020002 ori r2,r0,0x0002 r2 = 2 8014c54c: 08053161 j 0x8014c584 jump ahead 8014c550: 34043000 ori r4,r0,0x3000 r4 = 0x3000 8014c554: 34020002 ori r2,r0,0x0002 r2 = 2 8014c558: 16a2000a bne r21,r2,0x8014c584 branch if r21 != 2 (loading ability menus or wtv?) 8014c55c: 02e02021 addu r4,r23,r0 r4 = menu width * height/2 8014c560: 3c028016 lui r2,0x8016 8014c564: 8c426018 lw r2,0x6018(r2) incremented? 8014c568: 00000000 nop 8014c56c: 14550005 bne r2,r21,0x8014c584 branch if r21 does not match incremented? 8014c570: 34028000 ori r2,r0,0x8000 r2 = 0x8000 8014c574: 3c038001 lui r3,0x8001 8014c578: 8c630008 lw r3,0x0008(r3) word pointing to second byte in header? shifted 1 space? 8014c57c: 08053164 j 0x8014c590 8014c580: 00629821 addu r19,r3,r2 r19 = 0x801af000 ? 8014c584: 0c04bbac jal 0x8012eeb0 8014c588: 00000000 nop 8014c58c: 00409821 addu r19,r2,r0 r19 = output 8014c590: 1a200058 blez r17,0x8014c6f4 branch if inner height of window is less than 0 8014c594: 00008021 addu r16,r0,r0 clear r16 8014c598: 26a2fffe addiu r2,r21,-0x0002 r2 = PV - 2 8014c59c: 2c420002 sltiu r2,r2,0x0002 8014c5a0: afa20018 sw r2,0x0018(r29) store 1 if between 2 and 4. 0 otherwise 8014c5a4: 2412fff8 addiu r18,r0,-0x0008 r18 = -0x8 8014c5a8: 2ae23000 slti r2,r23,0x3000 set if menu width/height (rounded up) < 0x3000 8014c5ac: 1440001b bne r2,r0,0x8014c61c branch if so 8014c5b0: 00000000 nop 8014c5b4: 16a00019 bne r21,r0,0x8014c61c 8014c5b8: 3202005f andi r2,r16,0x005f 8014c5bc: 14400017 bne r2,r0,0x8014c61c 8014c5c0: 00000000 nop 8014c5c4: 16000004 bne r16,r0,0x8014c5d8 8014c5c8: 27a40010 addiu r4,r29,0x0010 8014c5cc: 34080060 ori r8,r0,0x0060 8014c5d0: 08053187 j 0x8014c61c 8014c5d4: a7a80016 sh r8,0x0016(r29) 8014c5d8: 0c00923f jal 0x800248fc 8014c5dc: 02602821 addu r5,r19,r0 8014c5e0: 0c053216 jal 0x8014c858 8014c5e4: 34040001 ori r4,r0,0x0001 8014c5e8: 97a20012 lhu r2,0x0012(r29) 8014c5ec: 00000000 nop 8014c5f0: 24420060 addiu r2,r2,0x0060 8014c5f4: a7a20012 sh r2,0x0012(r29) 8014c5f8: 02111023 subu r2,r16,r17 8014c5fc: 28420060 slti r2,r2,0x0060 8014c600: 14400004 bne r2,r0,0x8014c614 8014c604: 02301023 subu r2,r17,r16 8014c608: 34080060 ori r8,r0,0x0060 8014c60c: 08053186 j 0x8014c618 8014c610: a7a80016 sh r8,0x0016(r29) 8014c614: a7a20016 sh r2,0x0016(r29) 8014c618: 26d60060 addiu r22,r22,0x0060 8014c61c: 8fa80018 lw r8,0x0018(r29) load PV truth/false statement? 8014c620: 00000000 nop 8014c624: 1100000f beq r8,r0,0x8014c664 branch if 0 8014c628: 2a020010 slti r2,r16,0x0010 set if r16 < 0x10 8014c62c: 10400003 beq r2,r0,0x8014c63c branch if r16 > 0x10 8014c630: 00101180 sll r2,r16,0x06 r2 = r16 << 0x6 8014c634: 080531a8 j 0x8014c6a0 jump ahead 8014c638: 24470036 addiu r7,r2,0x0036 r7 = r2 + 0x36 8014c63c: 2622fff0 addiu r2,r17,-0x0010 8014c640: 0202102a slt r2,r16,r2 8014c644: 14400014 bne r2,r0,0x8014c698 8014c648: 3242000f andi r2,r18,0x000f 8014c64c: 02111023 subu r2,r16,r17 8014c650: 24420010 addiu r2,r2,0x0010 8014c654: 3042000f andi r2,r2,0x000f 8014c658: 00021180 sll r2,r2,0x06 8014c65c: 080531a8 j 0x8014c6a0 8014c660: 24470436 addiu r7,r2,0x0436 8014c664: 2a020008 slti r2,r16,0x0008 8014c668: 1440000d bne r2,r0,0x8014c6a0 8014c66c: 00103980 sll r7,r16,0x06 8014c670: 2622fff8 addiu r2,r17,-0x0008 8014c674: 0202102a slt r2,r16,r2 8014c678: 14400007 bne r2,r0,0x8014c698 8014c67c: 3242000f andi r2,r18,0x000f 8014c680: 02111023 subu r2,r16,r17 8014c684: 24420008 addiu r2,r2,0x0008 8014c688: 30420007 andi r2,r2,0x0007 8014c68c: 00021180 sll r2,r2,0x06 8014c690: 080531a8 j 0x8014c6a0 8014c694: 24470600 addiu r7,r2,0x0600 8014c698: 24420008 addiu r2,r2,0x0008 8014c69c: 00023980 sll r7,r2,0x06 8014c6a0: 02161023 subu r2,r16,r22 r2 = r16 - r22 8014c6a4: 00540018 mult r2,r20 times menu width/4 8014c6a8: 03c02021 addu r4,r30,r0 r4 = r30 pointer (the menu-esque one?) 8014c6ac: 26520001 addiu r18,r18,0x0001 r18 + 1 8014c6b0: 00143040 sll r6,r20,0x01 r6 = menu width / 2 8014c6b4: 00071040 sll r2,r7,0x01 r2 = r7 * 2 8014c6b8: 005e1021 addu r2,r2,r30 r2 = r30 pointer + ? 8014c6bc: 94430012 lhu r3,0x0012(r2) ? 8014c6c0: 00002812 mflo r5 8014c6c4: 00052840 sll r5,r5,0x01 8014c6c8: 02652821 addu r5,r19,r5 difference in index * menu width/2 + some pointer 8014c6cc: 00c53021 addu r6,r6,r5 difference in index * menu width/2 + menu width/2 8014c6d0: a4c3fffe sh r3,-0x0002(r6) store ? in there 8014c6d4: 94420010 lhu r2,0x0010(r2) load ? from r30 pointer and math 8014c6d8: 26100001 addiu r16,r16,0x0001 counter (?) + 1 8014c6dc: a4c2fffc sh r2,-0x0004(r6) store in r6 8014c6e0: 0c0531d6 jal 0x8014c758 8014c6e4: 02803021 addu r6,r20,r0 r6 = menu width/4 8014c6e8: 0211102a slt r2,r16,r17 set if counter < inner height of window 8014c6ec: 1440ffaf bne r2,r0,0x8014c5ac loop 8014c6f0: 2ae23000 slti r2,r23,0x3000 set if menu width * height < 0x3000 8014c6f4: 12a00003 beq r21,r0,0x8014c704 branch if PV = 0 8014c6f8: 34020002 ori r2,r0,0x0002 8014c6fc: 16a20009 bne r21,r2,0x8014c724 branch if PV != 2 8014c700: 02601021 addu r2,r19,r0 r2 = data pointer thing 8014c704: 27a40010 addiu r4,r29,0x0010 r4 = stack + 0x10 8014c708: 0c00923f jal 0x800248fc scus call? 8014c70c: 02602821 addu r5,r19,r0 r5 = data pointer thing 8014c710: 0c053216 jal 0x8014c858 Wait 8014c714: 34040001 ori r4,r0,0x0001 r4 = 1 8014c718: 0c04bc13 jal 0x8012f04c 8014c71c: 02602021 addu r4,r19,r0 r4 = data pointer thing 8014c720: 02601021 addu r2,r19,r0 8014c724: 8fbf004c lw r31,0x004c(r29) 8014c728: 8fbe0048 lw r30,0x0048(r29) 8014c72c: 8fb70044 lw r23,0x0044(r29) 8014c730: 8fb60040 lw r22,0x0040(r29) 8014c734: 8fb5003c lw r21,0x003c(r29) 8014c738: 8fb40038 lw r20,0x0038(r29) 8014c73c: 8fb30034 lw r19,0x0034(r29) 8014c740: 8fb20030 lw r18,0x0030(r29) 8014c744: 8fb1002c lw r17,0x002c(r29) 8014c748: 8fb00028 lw r16,0x0028(r29) 8014c74c: 27bd0050 addiu r29,r29,0x0050 8014c750: 03e00008 jr r31 8014c754: 00000000 nop