mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 07:07:09 +00:00
PreRender decomped and equivalent (one small non-matching) (#723)
* now equivalent * stuff * remove struct Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
parent
493bdbc3c6
commit
8f0549cd9a
6 changed files with 281 additions and 1116 deletions
|
@ -1,786 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80144C20
|
||||
.asciz "Error, should not be in here \n"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel func_800C2500
|
||||
/* B396A0 800C2500 27BDFE78 */ addiu $sp, $sp, -0x188
|
||||
/* B396A4 800C2504 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B396A8 800C2508 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B396AC 800C250C AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B396B0 800C2510 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B396B4 800C2514 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B396B8 800C2518 00A08025 */ move $s0, $a1
|
||||
/* B396BC 800C251C 00C08825 */ move $s1, $a2
|
||||
/* B396C0 800C2520 0080B025 */ move $s6, $a0
|
||||
/* B396C4 800C2524 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* B396C8 800C2528 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B396CC 800C252C AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B396D0 800C2530 24140005 */ li $s4, 5
|
||||
/* B396D4 800C2534 27B50144 */ addiu $s5, $sp, 0x144
|
||||
/* B396D8 800C2538 27A90108 */ addiu $t1, $sp, 0x108
|
||||
/* B396DC 800C253C 27AA00CC */ addiu $t2, $sp, 0xcc
|
||||
/* B396E0 800C2540 27AB0090 */ addiu $t3, $sp, 0x90
|
||||
/* B396E4 800C2544 00003825 */ move $a3, $zero
|
||||
.L800C2548:
|
||||
/* B396E8 800C2548 00F4001A */ div $zero, $a3, $s4
|
||||
/* B396EC 800C254C 00007010 */ mfhi $t6
|
||||
/* B396F0 800C2550 00007812 */ mflo $t7
|
||||
/* B396F4 800C2554 01D01021 */ addu $v0, $t6, $s0
|
||||
/* B396F8 800C2558 01F13021 */ addu $a2, $t7, $s1
|
||||
/* B396FC 800C255C 2442FFFE */ addiu $v0, $v0, -2
|
||||
/* B39700 800C2560 16800002 */ bnez $s4, .L800C256C
|
||||
/* B39704 800C2564 00000000 */ nop
|
||||
/* B39708 800C2568 0007000D */ break 7
|
||||
.L800C256C:
|
||||
/* B3970C 800C256C 2401FFFF */ li $at, -1
|
||||
/* B39710 800C2570 16810004 */ bne $s4, $at, .L800C2584
|
||||
/* B39714 800C2574 3C018000 */ lui $at, 0x8000
|
||||
/* B39718 800C2578 14E10002 */ bne $a3, $at, .L800C2584
|
||||
/* B3971C 800C257C 00000000 */ nop
|
||||
/* B39720 800C2580 0006000D */ break 6
|
||||
.L800C2584:
|
||||
/* B39724 800C2584 24C6FFFF */ addiu $a2, $a2, -1
|
||||
/* B39728 800C2588 00401825 */ move $v1, $v0
|
||||
/* B3972C 800C258C 04410004 */ bgez $v0, .L800C25A0
|
||||
/* B39730 800C2590 00C02025 */ move $a0, $a2
|
||||
/* B39734 800C2594 00001825 */ move $v1, $zero
|
||||
/* B39738 800C2598 10000007 */ b .L800C25B8
|
||||
/* B3973C 800C259C 8EC80000 */ lw $t0, ($s6)
|
||||
.L800C25A0:
|
||||
/* B39740 800C25A0 8EC80000 */ lw $t0, ($s6)
|
||||
/* B39744 800C25A4 2505FFFF */ addiu $a1, $t0, -1
|
||||
/* B39748 800C25A8 00A2082A */ slt $at, $a1, $v0
|
||||
/* B3974C 800C25AC 10200002 */ beqz $at, .L800C25B8
|
||||
/* B39750 800C25B0 00000000 */ nop
|
||||
/* B39754 800C25B4 00A01825 */ move $v1, $a1
|
||||
.L800C25B8:
|
||||
/* B39758 800C25B8 04C30004 */ bgezl $a2, .L800C25CC
|
||||
/* B3975C 800C25BC 8EC20004 */ lw $v0, 4($s6)
|
||||
/* B39760 800C25C0 10000007 */ b .L800C25E0
|
||||
/* B39764 800C25C4 00002025 */ move $a0, $zero
|
||||
/* B39768 800C25C8 8EC20004 */ lw $v0, 4($s6)
|
||||
.L800C25CC:
|
||||
/* B3976C 800C25CC 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* B39770 800C25D0 0046082A */ slt $at, $v0, $a2
|
||||
/* B39774 800C25D4 10200002 */ beqz $at, .L800C25E0
|
||||
/* B39778 800C25D8 00000000 */ nop
|
||||
/* B3977C 800C25DC 00402025 */ move $a0, $v0
|
||||
.L800C25E0:
|
||||
/* B39780 800C25E0 00880019 */ multu $a0, $t0
|
||||
/* B39784 800C25E4 8ED80014 */ lw $t8, 0x14($s6)
|
||||
/* B39788 800C25E8 0003C840 */ sll $t9, $v1, 1
|
||||
/* B3978C 800C25EC 24E70001 */ addiu $a3, $a3, 1
|
||||
/* B39790 800C25F0 03197021 */ addu $t6, $t8, $t9
|
||||
/* B39794 800C25F4 28E1000F */ slti $at, $a3, 0xf
|
||||
/* B39798 800C25F8 25290004 */ addiu $t1, $t1, 4
|
||||
/* B3979C 800C25FC 254A0004 */ addiu $t2, $t2, 4
|
||||
/* B397A0 800C2600 256B0004 */ addiu $t3, $t3, 4
|
||||
/* B397A4 800C2604 26B50004 */ addiu $s5, $s5, 4
|
||||
/* B397A8 800C2608 00007812 */ mflo $t7
|
||||
/* B397AC 800C260C 000FC040 */ sll $t8, $t7, 1
|
||||
/* B397B0 800C2610 01D8C821 */ addu $t9, $t6, $t8
|
||||
/* B397B4 800C2614 972F0000 */ lhu $t7, ($t9)
|
||||
/* B397B8 800C2618 A7AF0068 */ sh $t7, 0x68($sp)
|
||||
/* B397BC 800C261C 8FAE0068 */ lw $t6, 0x68($sp)
|
||||
/* B397C0 800C2620 000EC6C2 */ srl $t8, $t6, 0x1b
|
||||
/* B397C4 800C2624 0018C8C0 */ sll $t9, $t8, 3
|
||||
/* B397C8 800C2628 00187883 */ sra $t7, $t8, 2
|
||||
/* B397CC 800C262C 032F7025 */ or $t6, $t9, $t7
|
||||
/* B397D0 800C2630 AD2EFFFC */ sw $t6, -4($t1)
|
||||
/* B397D4 800C2634 8FB80068 */ lw $t8, 0x68($sp)
|
||||
/* B397D8 800C2638 0018C940 */ sll $t9, $t8, 5
|
||||
/* B397DC 800C263C 00197EC2 */ srl $t7, $t9, 0x1b
|
||||
/* B397E0 800C2640 000F70C0 */ sll $t6, $t7, 3
|
||||
/* B397E4 800C2644 000FC083 */ sra $t8, $t7, 2
|
||||
/* B397E8 800C2648 01D8C825 */ or $t9, $t6, $t8
|
||||
/* B397EC 800C264C AD59FFFC */ sw $t9, -4($t2)
|
||||
/* B397F0 800C2650 8FAF0068 */ lw $t7, 0x68($sp)
|
||||
/* B397F4 800C2654 000F7280 */ sll $t6, $t7, 0xa
|
||||
/* B397F8 800C2658 000EC6C2 */ srl $t8, $t6, 0x1b
|
||||
/* B397FC 800C265C 0018C8C0 */ sll $t9, $t8, 3
|
||||
/* B39800 800C2660 00187883 */ sra $t7, $t8, 2
|
||||
/* B39804 800C2664 032F7025 */ or $t6, $t9, $t7
|
||||
/* B39808 800C2668 AD6EFFFC */ sw $t6, -4($t3)
|
||||
/* B3980C 800C266C 8ECF0000 */ lw $t7, ($s6)
|
||||
/* B39810 800C2670 8ED80018 */ lw $t8, 0x18($s6)
|
||||
/* B39814 800C2674 008F0019 */ multu $a0, $t7
|
||||
/* B39818 800C2678 0303C821 */ addu $t9, $t8, $v1
|
||||
/* B3981C 800C267C 00007012 */ mflo $t6
|
||||
/* B39820 800C2680 032EC021 */ addu $t8, $t9, $t6
|
||||
/* B39824 800C2684 930F0000 */ lbu $t7, ($t8)
|
||||
/* B39828 800C2688 000FC943 */ sra $t9, $t7, 5
|
||||
/* B3982C 800C268C 1420FFAE */ bnez $at, .L800C2548
|
||||
/* B39830 800C2690 AEB9FFFC */ sw $t9, -4($s5)
|
||||
/* B39834 800C2694 8FAE0160 */ lw $t6, 0x160($sp)
|
||||
/* B39838 800C2698 24080007 */ li $t0, 7
|
||||
/* B3983C 800C269C AFB0018C */ sw $s0, 0x18c($sp)
|
||||
/* B39840 800C26A0 150E0006 */ bne $t0, $t6, .L800C26BC
|
||||
/* B39844 800C26A4 AFB10190 */ sw $s1, 0x190($sp)
|
||||
/* B39848 800C26A8 3C048014 */ lui $a0, %hi(D_80144C20) # $a0, 0x8014
|
||||
/* B3984C 800C26AC 0C00084C */ jal osSyncPrintf
|
||||
/* B39850 800C26B0 24844C20 */ addiu $a0, %lo(D_80144C20) # addiu $a0, $a0, 0x4c20
|
||||
/* B39854 800C26B4 10000242 */ b .L800C2FC0
|
||||
/* B39858 800C26B8 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L800C26BC:
|
||||
/* B3985C 800C26BC 8FAD0124 */ lw $t5, 0x124($sp)
|
||||
/* B39860 800C26C0 8FBF00E8 */ lw $ra, 0xe8($sp)
|
||||
/* B39864 800C26C4 8FB000AC */ lw $s0, 0xac($sp)
|
||||
/* B39868 800C26C8 24180004 */ li $t8, 4
|
||||
/* B3986C 800C26CC AFB80054 */ sw $t8, 0x54($sp)
|
||||
/* B39870 800C26D0 24070001 */ li $a3, 1
|
||||
/* B39874 800C26D4 27B50148 */ addiu $s5, $sp, 0x148
|
||||
/* B39878 800C26D8 27AC0090 */ addiu $t4, $sp, 0x90
|
||||
/* B3987C 800C26DC 27AB00CC */ addiu $t3, $sp, 0xcc
|
||||
/* B39880 800C26E0 27AA0108 */ addiu $t2, $sp, 0x108
|
||||
/* B39884 800C26E4 27A90144 */ addiu $t1, $sp, 0x144
|
||||
/* B39888 800C26E8 01A08825 */ move $s1, $t5
|
||||
/* B3988C 800C26EC 03E09025 */ move $s2, $ra
|
||||
/* B39890 800C26F0 02009825 */ move $s3, $s0
|
||||
.L800C26F4:
|
||||
/* B39894 800C26F4 8EAF0000 */ lw $t7, ($s5)
|
||||
/* B39898 800C26F8 8FA20054 */ lw $v0, 0x54($sp)
|
||||
/* B3989C 800C26FC 26B50008 */ addiu $s5, $s5, 8
|
||||
/* B398A0 800C2700 150F01E8 */ bne $t0, $t7, .L800C2EA4
|
||||
/* B398A4 800C2704 0142C821 */ addu $t9, $t2, $v0
|
||||
/* B398A8 800C2708 8F240000 */ lw $a0, ($t9)
|
||||
/* B398AC 800C270C 01827021 */ addu $t6, $t4, $v0
|
||||
/* B398B0 800C2710 AFAE003C */ sw $t6, 0x3c($sp)
|
||||
/* B398B4 800C2714 0224082A */ slt $at, $s1, $a0
|
||||
/* B398B8 800C2718 1020004F */ beqz $at, .L800C2858
|
||||
/* B398BC 800C271C 01623021 */ addu $a2, $t3, $v0
|
||||
/* B398C0 800C2720 24010001 */ li $at, 1
|
||||
/* B398C4 800C2724 10E10007 */ beq $a3, $at, .L800C2744
|
||||
/* B398C8 800C2728 8FB8010C */ lw $t8, 0x10c($sp)
|
||||
/* B398CC 800C272C 0304082A */ slt $at, $t8, $a0
|
||||
/* B398D0 800C2730 14200004 */ bnez $at, .L800C2744
|
||||
/* B398D4 800C2734 8FAF0148 */ lw $t7, 0x148($sp)
|
||||
/* B398D8 800C2738 550F0003 */ bnel $t0, $t7, .L800C2748
|
||||
/* B398DC 800C273C 24010003 */ li $at, 3
|
||||
/* B398E0 800C2740 00808825 */ move $s1, $a0
|
||||
.L800C2744:
|
||||
/* B398E4 800C2744 24010003 */ li $at, 3
|
||||
.L800C2748:
|
||||
/* B398E8 800C2748 10E10007 */ beq $a3, $at, .L800C2768
|
||||
/* B398EC 800C274C 8FB90114 */ lw $t9, 0x114($sp)
|
||||
/* B398F0 800C2750 0324082A */ slt $at, $t9, $a0
|
||||
/* B398F4 800C2754 14200004 */ bnez $at, .L800C2768
|
||||
/* B398F8 800C2758 8FAE0150 */ lw $t6, 0x150($sp)
|
||||
/* B398FC 800C275C 150E0002 */ bne $t0, $t6, .L800C2768
|
||||
/* B39900 800C2760 00000000 */ nop
|
||||
/* B39904 800C2764 00808825 */ move $s1, $a0
|
||||
.L800C2768:
|
||||
/* B39908 800C2768 10F40007 */ beq $a3, $s4, .L800C2788
|
||||
/* B3990C 800C276C 8FB8011C */ lw $t8, 0x11c($sp)
|
||||
/* B39910 800C2770 0304082A */ slt $at, $t8, $a0
|
||||
/* B39914 800C2774 14200004 */ bnez $at, .L800C2788
|
||||
/* B39918 800C2778 8FAF0158 */ lw $t7, 0x158($sp)
|
||||
/* B3991C 800C277C 150F0002 */ bne $t0, $t7, .L800C2788
|
||||
/* B39920 800C2780 00000000 */ nop
|
||||
/* B39924 800C2784 00808825 */ move $s1, $a0
|
||||
.L800C2788:
|
||||
/* B39928 800C2788 10E8000C */ beq $a3, $t0, .L800C27BC
|
||||
/* B3992C 800C278C 01001825 */ move $v1, $t0
|
||||
/* B39930 800C2790 00031080 */ sll $v0, $v1, 2
|
||||
/* B39934 800C2794 0142C821 */ addu $t9, $t2, $v0
|
||||
/* B39938 800C2798 8F2E0000 */ lw $t6, ($t9)
|
||||
/* B3993C 800C279C 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39940 800C27A0 01C4082A */ slt $at, $t6, $a0
|
||||
/* B39944 800C27A4 54200006 */ bnezl $at, .L800C27C0
|
||||
/* B39948 800C27A8 24790002 */ addiu $t9, $v1, 2
|
||||
/* B3994C 800C27AC 8F0F0000 */ lw $t7, ($t8)
|
||||
/* B39950 800C27B0 550F0003 */ bnel $t0, $t7, .L800C27C0
|
||||
/* B39954 800C27B4 24790002 */ addiu $t9, $v1, 2
|
||||
/* B39958 800C27B8 00808825 */ move $s1, $a0
|
||||
.L800C27BC:
|
||||
/* B3995C 800C27BC 24790002 */ addiu $t9, $v1, 2
|
||||
.L800C27C0:
|
||||
/* B39960 800C27C0 10F9000B */ beq $a3, $t9, .L800C27F0
|
||||
/* B39964 800C27C4 00031080 */ sll $v0, $v1, 2
|
||||
/* B39968 800C27C8 01427021 */ addu $t6, $t2, $v0
|
||||
/* B3996C 800C27CC 8DD80008 */ lw $t8, 8($t6)
|
||||
/* B39970 800C27D0 01227821 */ addu $t7, $t1, $v0
|
||||
/* B39974 800C27D4 0304082A */ slt $at, $t8, $a0
|
||||
/* B39978 800C27D8 54200006 */ bnezl $at, .L800C27F4
|
||||
/* B3997C 800C27DC 246E0004 */ addiu $t6, $v1, 4
|
||||
/* B39980 800C27E0 8DF90008 */ lw $t9, 8($t7)
|
||||
/* B39984 800C27E4 55190003 */ bnel $t0, $t9, .L800C27F4
|
||||
/* B39988 800C27E8 246E0004 */ addiu $t6, $v1, 4
|
||||
/* B3998C 800C27EC 00808825 */ move $s1, $a0
|
||||
.L800C27F0:
|
||||
/* B39990 800C27F0 246E0004 */ addiu $t6, $v1, 4
|
||||
.L800C27F4:
|
||||
/* B39994 800C27F4 10EE000B */ beq $a3, $t6, .L800C2824
|
||||
/* B39998 800C27F8 00031080 */ sll $v0, $v1, 2
|
||||
/* B3999C 800C27FC 0142C021 */ addu $t8, $t2, $v0
|
||||
/* B399A0 800C2800 8F0F0010 */ lw $t7, 0x10($t8)
|
||||
/* B399A4 800C2804 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B399A8 800C2808 01E4082A */ slt $at, $t7, $a0
|
||||
/* B399AC 800C280C 54200006 */ bnezl $at, .L800C2828
|
||||
/* B399B0 800C2810 24780006 */ addiu $t8, $v1, 6
|
||||
/* B399B4 800C2814 8F2E0010 */ lw $t6, 0x10($t9)
|
||||
/* B399B8 800C2818 550E0003 */ bnel $t0, $t6, .L800C2828
|
||||
/* B399BC 800C281C 24780006 */ addiu $t8, $v1, 6
|
||||
/* B399C0 800C2820 00808825 */ move $s1, $a0
|
||||
.L800C2824:
|
||||
/* B399C4 800C2824 24780006 */ addiu $t8, $v1, 6
|
||||
.L800C2828:
|
||||
/* B399C8 800C2828 10F8000B */ beq $a3, $t8, .L800C2858
|
||||
/* B399CC 800C282C 00031080 */ sll $v0, $v1, 2
|
||||
/* B399D0 800C2830 01427821 */ addu $t7, $t2, $v0
|
||||
/* B399D4 800C2834 8DF90018 */ lw $t9, 0x18($t7)
|
||||
/* B399D8 800C2838 01227021 */ addu $t6, $t1, $v0
|
||||
/* B399DC 800C283C 0324082A */ slt $at, $t9, $a0
|
||||
/* B399E0 800C2840 54200006 */ bnezl $at, .L800C285C
|
||||
/* B399E4 800C2844 8CC50000 */ lw $a1, ($a2)
|
||||
/* B399E8 800C2848 8DD80018 */ lw $t8, 0x18($t6)
|
||||
/* B399EC 800C284C 55180003 */ bnel $t0, $t8, .L800C285C
|
||||
/* B399F0 800C2850 8CC50000 */ lw $a1, ($a2)
|
||||
/* B399F4 800C2854 00808825 */ move $s1, $a0
|
||||
.L800C2858:
|
||||
/* B399F8 800C2858 8CC50000 */ lw $a1, ($a2)
|
||||
.L800C285C:
|
||||
/* B399FC 800C285C 0245082A */ slt $at, $s2, $a1
|
||||
/* B39A00 800C2860 1020004E */ beqz $at, .L800C299C
|
||||
/* B39A04 800C2864 24010001 */ li $at, 1
|
||||
/* B39A08 800C2868 10E10007 */ beq $a3, $at, .L800C2888
|
||||
/* B39A0C 800C286C 8FAF00D0 */ lw $t7, 0xd0($sp)
|
||||
/* B39A10 800C2870 01E5082A */ slt $at, $t7, $a1
|
||||
/* B39A14 800C2874 14200004 */ bnez $at, .L800C2888
|
||||
/* B39A18 800C2878 8FB90148 */ lw $t9, 0x148($sp)
|
||||
/* B39A1C 800C287C 55190003 */ bnel $t0, $t9, .L800C288C
|
||||
/* B39A20 800C2880 24010003 */ li $at, 3
|
||||
/* B39A24 800C2884 00A09025 */ move $s2, $a1
|
||||
.L800C2888:
|
||||
/* B39A28 800C2888 24010003 */ li $at, 3
|
||||
.L800C288C:
|
||||
/* B39A2C 800C288C 10E10007 */ beq $a3, $at, .L800C28AC
|
||||
/* B39A30 800C2890 8FAE00D8 */ lw $t6, 0xd8($sp)
|
||||
/* B39A34 800C2894 01C5082A */ slt $at, $t6, $a1
|
||||
/* B39A38 800C2898 14200004 */ bnez $at, .L800C28AC
|
||||
/* B39A3C 800C289C 8FB80150 */ lw $t8, 0x150($sp)
|
||||
/* B39A40 800C28A0 15180002 */ bne $t0, $t8, .L800C28AC
|
||||
/* B39A44 800C28A4 00000000 */ nop
|
||||
/* B39A48 800C28A8 00A09025 */ move $s2, $a1
|
||||
.L800C28AC:
|
||||
/* B39A4C 800C28AC 10F40007 */ beq $a3, $s4, .L800C28CC
|
||||
/* B39A50 800C28B0 8FAF00E0 */ lw $t7, 0xe0($sp)
|
||||
/* B39A54 800C28B4 01E5082A */ slt $at, $t7, $a1
|
||||
/* B39A58 800C28B8 14200004 */ bnez $at, .L800C28CC
|
||||
/* B39A5C 800C28BC 8FB90158 */ lw $t9, 0x158($sp)
|
||||
/* B39A60 800C28C0 15190002 */ bne $t0, $t9, .L800C28CC
|
||||
/* B39A64 800C28C4 00000000 */ nop
|
||||
/* B39A68 800C28C8 00A09025 */ move $s2, $a1
|
||||
.L800C28CC:
|
||||
/* B39A6C 800C28CC 10E8000C */ beq $a3, $t0, .L800C2900
|
||||
/* B39A70 800C28D0 01001825 */ move $v1, $t0
|
||||
/* B39A74 800C28D4 00031080 */ sll $v0, $v1, 2
|
||||
/* B39A78 800C28D8 01627021 */ addu $t6, $t3, $v0
|
||||
/* B39A7C 800C28DC 8DD80000 */ lw $t8, ($t6)
|
||||
/* B39A80 800C28E0 01227821 */ addu $t7, $t1, $v0
|
||||
/* B39A84 800C28E4 0305082A */ slt $at, $t8, $a1
|
||||
/* B39A88 800C28E8 54200006 */ bnezl $at, .L800C2904
|
||||
/* B39A8C 800C28EC 246E0002 */ addiu $t6, $v1, 2
|
||||
/* B39A90 800C28F0 8DF90000 */ lw $t9, ($t7)
|
||||
/* B39A94 800C28F4 55190003 */ bnel $t0, $t9, .L800C2904
|
||||
/* B39A98 800C28F8 246E0002 */ addiu $t6, $v1, 2
|
||||
/* B39A9C 800C28FC 00A09025 */ move $s2, $a1
|
||||
.L800C2900:
|
||||
/* B39AA0 800C2900 246E0002 */ addiu $t6, $v1, 2
|
||||
.L800C2904:
|
||||
/* B39AA4 800C2904 10EE000B */ beq $a3, $t6, .L800C2934
|
||||
/* B39AA8 800C2908 00031080 */ sll $v0, $v1, 2
|
||||
/* B39AAC 800C290C 0162C021 */ addu $t8, $t3, $v0
|
||||
/* B39AB0 800C2910 8F0F0008 */ lw $t7, 8($t8)
|
||||
/* B39AB4 800C2914 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B39AB8 800C2918 01E5082A */ slt $at, $t7, $a1
|
||||
/* B39ABC 800C291C 54200006 */ bnezl $at, .L800C2938
|
||||
/* B39AC0 800C2920 24780004 */ addiu $t8, $v1, 4
|
||||
/* B39AC4 800C2924 8F2E0008 */ lw $t6, 8($t9)
|
||||
/* B39AC8 800C2928 550E0003 */ bnel $t0, $t6, .L800C2938
|
||||
/* B39ACC 800C292C 24780004 */ addiu $t8, $v1, 4
|
||||
/* B39AD0 800C2930 00A09025 */ move $s2, $a1
|
||||
.L800C2934:
|
||||
/* B39AD4 800C2934 24780004 */ addiu $t8, $v1, 4
|
||||
.L800C2938:
|
||||
/* B39AD8 800C2938 10F8000B */ beq $a3, $t8, .L800C2968
|
||||
/* B39ADC 800C293C 00031080 */ sll $v0, $v1, 2
|
||||
/* B39AE0 800C2940 01627821 */ addu $t7, $t3, $v0
|
||||
/* B39AE4 800C2944 8DF90010 */ lw $t9, 0x10($t7)
|
||||
/* B39AE8 800C2948 01227021 */ addu $t6, $t1, $v0
|
||||
/* B39AEC 800C294C 0325082A */ slt $at, $t9, $a1
|
||||
/* B39AF0 800C2950 54200006 */ bnezl $at, .L800C296C
|
||||
/* B39AF4 800C2954 246F0006 */ addiu $t7, $v1, 6
|
||||
/* B39AF8 800C2958 8DD80010 */ lw $t8, 0x10($t6)
|
||||
/* B39AFC 800C295C 55180003 */ bnel $t0, $t8, .L800C296C
|
||||
/* B39B00 800C2960 246F0006 */ addiu $t7, $v1, 6
|
||||
/* B39B04 800C2964 00A09025 */ move $s2, $a1
|
||||
.L800C2968:
|
||||
/* B39B08 800C2968 246F0006 */ addiu $t7, $v1, 6
|
||||
.L800C296C:
|
||||
/* B39B0C 800C296C 10EF000B */ beq $a3, $t7, .L800C299C
|
||||
/* B39B10 800C2970 00031080 */ sll $v0, $v1, 2
|
||||
/* B39B14 800C2974 0162C821 */ addu $t9, $t3, $v0
|
||||
/* B39B18 800C2978 8F2E0018 */ lw $t6, 0x18($t9)
|
||||
/* B39B1C 800C297C 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39B20 800C2980 01C5082A */ slt $at, $t6, $a1
|
||||
/* B39B24 800C2984 54200006 */ bnezl $at, .L800C29A0
|
||||
/* B39B28 800C2988 8FB9003C */ lw $t9, 0x3c($sp)
|
||||
/* B39B2C 800C298C 8F0F0018 */ lw $t7, 0x18($t8)
|
||||
/* B39B30 800C2990 550F0003 */ bnel $t0, $t7, .L800C29A0
|
||||
/* B39B34 800C2994 8FB9003C */ lw $t9, 0x3c($sp)
|
||||
/* B39B38 800C2998 00A09025 */ move $s2, $a1
|
||||
.L800C299C:
|
||||
/* B39B3C 800C299C 8FB9003C */ lw $t9, 0x3c($sp)
|
||||
.L800C29A0:
|
||||
/* B39B40 800C29A0 8F260000 */ lw $a2, ($t9)
|
||||
/* B39B44 800C29A4 0266082A */ slt $at, $s3, $a2
|
||||
/* B39B48 800C29A8 1020004E */ beqz $at, .L800C2AE4
|
||||
/* B39B4C 800C29AC 24010001 */ li $at, 1
|
||||
/* B39B50 800C29B0 10E10007 */ beq $a3, $at, .L800C29D0
|
||||
/* B39B54 800C29B4 8FAE0094 */ lw $t6, 0x94($sp)
|
||||
/* B39B58 800C29B8 01C6082A */ slt $at, $t6, $a2
|
||||
/* B39B5C 800C29BC 14200004 */ bnez $at, .L800C29D0
|
||||
/* B39B60 800C29C0 8FB80148 */ lw $t8, 0x148($sp)
|
||||
/* B39B64 800C29C4 55180003 */ bnel $t0, $t8, .L800C29D4
|
||||
/* B39B68 800C29C8 24010003 */ li $at, 3
|
||||
/* B39B6C 800C29CC 00C09825 */ move $s3, $a2
|
||||
.L800C29D0:
|
||||
/* B39B70 800C29D0 24010003 */ li $at, 3
|
||||
.L800C29D4:
|
||||
/* B39B74 800C29D4 10E10007 */ beq $a3, $at, .L800C29F4
|
||||
/* B39B78 800C29D8 8FAF009C */ lw $t7, 0x9c($sp)
|
||||
/* B39B7C 800C29DC 01E6082A */ slt $at, $t7, $a2
|
||||
/* B39B80 800C29E0 14200004 */ bnez $at, .L800C29F4
|
||||
/* B39B84 800C29E4 8FB90150 */ lw $t9, 0x150($sp)
|
||||
/* B39B88 800C29E8 15190002 */ bne $t0, $t9, .L800C29F4
|
||||
/* B39B8C 800C29EC 00000000 */ nop
|
||||
/* B39B90 800C29F0 00C09825 */ move $s3, $a2
|
||||
.L800C29F4:
|
||||
/* B39B94 800C29F4 10F40007 */ beq $a3, $s4, .L800C2A14
|
||||
/* B39B98 800C29F8 8FAE00A4 */ lw $t6, 0xa4($sp)
|
||||
/* B39B9C 800C29FC 01C6082A */ slt $at, $t6, $a2
|
||||
/* B39BA0 800C2A00 14200004 */ bnez $at, .L800C2A14
|
||||
/* B39BA4 800C2A04 8FB80158 */ lw $t8, 0x158($sp)
|
||||
/* B39BA8 800C2A08 15180002 */ bne $t0, $t8, .L800C2A14
|
||||
/* B39BAC 800C2A0C 00000000 */ nop
|
||||
/* B39BB0 800C2A10 00C09825 */ move $s3, $a2
|
||||
.L800C2A14:
|
||||
/* B39BB4 800C2A14 10E8000C */ beq $a3, $t0, .L800C2A48
|
||||
/* B39BB8 800C2A18 01001825 */ move $v1, $t0
|
||||
/* B39BBC 800C2A1C 00031080 */ sll $v0, $v1, 2
|
||||
/* B39BC0 800C2A20 01827821 */ addu $t7, $t4, $v0
|
||||
/* B39BC4 800C2A24 8DF90000 */ lw $t9, ($t7)
|
||||
/* B39BC8 800C2A28 01227021 */ addu $t6, $t1, $v0
|
||||
/* B39BCC 800C2A2C 0326082A */ slt $at, $t9, $a2
|
||||
/* B39BD0 800C2A30 54200006 */ bnezl $at, .L800C2A4C
|
||||
/* B39BD4 800C2A34 246F0002 */ addiu $t7, $v1, 2
|
||||
/* B39BD8 800C2A38 8DD80000 */ lw $t8, ($t6)
|
||||
/* B39BDC 800C2A3C 55180003 */ bnel $t0, $t8, .L800C2A4C
|
||||
/* B39BE0 800C2A40 246F0002 */ addiu $t7, $v1, 2
|
||||
/* B39BE4 800C2A44 00C09825 */ move $s3, $a2
|
||||
.L800C2A48:
|
||||
/* B39BE8 800C2A48 246F0002 */ addiu $t7, $v1, 2
|
||||
.L800C2A4C:
|
||||
/* B39BEC 800C2A4C 10EF000B */ beq $a3, $t7, .L800C2A7C
|
||||
/* B39BF0 800C2A50 00031080 */ sll $v0, $v1, 2
|
||||
/* B39BF4 800C2A54 0182C821 */ addu $t9, $t4, $v0
|
||||
/* B39BF8 800C2A58 8F2E0008 */ lw $t6, 8($t9)
|
||||
/* B39BFC 800C2A5C 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39C00 800C2A60 01C6082A */ slt $at, $t6, $a2
|
||||
/* B39C04 800C2A64 54200006 */ bnezl $at, .L800C2A80
|
||||
/* B39C08 800C2A68 24790004 */ addiu $t9, $v1, 4
|
||||
/* B39C0C 800C2A6C 8F0F0008 */ lw $t7, 8($t8)
|
||||
/* B39C10 800C2A70 550F0003 */ bnel $t0, $t7, .L800C2A80
|
||||
/* B39C14 800C2A74 24790004 */ addiu $t9, $v1, 4
|
||||
/* B39C18 800C2A78 00C09825 */ move $s3, $a2
|
||||
.L800C2A7C:
|
||||
/* B39C1C 800C2A7C 24790004 */ addiu $t9, $v1, 4
|
||||
.L800C2A80:
|
||||
/* B39C20 800C2A80 10F9000B */ beq $a3, $t9, .L800C2AB0
|
||||
/* B39C24 800C2A84 00031080 */ sll $v0, $v1, 2
|
||||
/* B39C28 800C2A88 01827021 */ addu $t6, $t4, $v0
|
||||
/* B39C2C 800C2A8C 8DD80010 */ lw $t8, 0x10($t6)
|
||||
/* B39C30 800C2A90 01227821 */ addu $t7, $t1, $v0
|
||||
/* B39C34 800C2A94 0306082A */ slt $at, $t8, $a2
|
||||
/* B39C38 800C2A98 54200006 */ bnezl $at, .L800C2AB4
|
||||
/* B39C3C 800C2A9C 246E0006 */ addiu $t6, $v1, 6
|
||||
/* B39C40 800C2AA0 8DF90010 */ lw $t9, 0x10($t7)
|
||||
/* B39C44 800C2AA4 55190003 */ bnel $t0, $t9, .L800C2AB4
|
||||
/* B39C48 800C2AA8 246E0006 */ addiu $t6, $v1, 6
|
||||
/* B39C4C 800C2AAC 00C09825 */ move $s3, $a2
|
||||
.L800C2AB0:
|
||||
/* B39C50 800C2AB0 246E0006 */ addiu $t6, $v1, 6
|
||||
.L800C2AB4:
|
||||
/* B39C54 800C2AB4 10EE000B */ beq $a3, $t6, .L800C2AE4
|
||||
/* B39C58 800C2AB8 00031080 */ sll $v0, $v1, 2
|
||||
/* B39C5C 800C2ABC 0182C021 */ addu $t8, $t4, $v0
|
||||
/* B39C60 800C2AC0 8F0F0018 */ lw $t7, 0x18($t8)
|
||||
/* B39C64 800C2AC4 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B39C68 800C2AC8 01E6082A */ slt $at, $t7, $a2
|
||||
/* B39C6C 800C2ACC 54200006 */ bnezl $at, .L800C2AE8
|
||||
/* B39C70 800C2AD0 008D082A */ slt $at, $a0, $t5
|
||||
/* B39C74 800C2AD4 8F2E0018 */ lw $t6, 0x18($t9)
|
||||
/* B39C78 800C2AD8 550E0003 */ bnel $t0, $t6, .L800C2AE8
|
||||
/* B39C7C 800C2ADC 008D082A */ slt $at, $a0, $t5
|
||||
/* B39C80 800C2AE0 00C09825 */ move $s3, $a2
|
||||
.L800C2AE4:
|
||||
/* B39C84 800C2AE4 008D082A */ slt $at, $a0, $t5
|
||||
.L800C2AE8:
|
||||
/* B39C88 800C2AE8 1020004E */ beqz $at, .L800C2C24
|
||||
/* B39C8C 800C2AEC 24010001 */ li $at, 1
|
||||
/* B39C90 800C2AF0 10E10007 */ beq $a3, $at, .L800C2B10
|
||||
/* B39C94 800C2AF4 8FB8010C */ lw $t8, 0x10c($sp)
|
||||
/* B39C98 800C2AF8 0098082A */ slt $at, $a0, $t8
|
||||
/* B39C9C 800C2AFC 14200004 */ bnez $at, .L800C2B10
|
||||
/* B39CA0 800C2B00 8FAF0148 */ lw $t7, 0x148($sp)
|
||||
/* B39CA4 800C2B04 550F0003 */ bnel $t0, $t7, .L800C2B14
|
||||
/* B39CA8 800C2B08 24010003 */ li $at, 3
|
||||
/* B39CAC 800C2B0C 00806825 */ move $t5, $a0
|
||||
.L800C2B10:
|
||||
/* B39CB0 800C2B10 24010003 */ li $at, 3
|
||||
.L800C2B14:
|
||||
/* B39CB4 800C2B14 10E10007 */ beq $a3, $at, .L800C2B34
|
||||
/* B39CB8 800C2B18 8FB90114 */ lw $t9, 0x114($sp)
|
||||
/* B39CBC 800C2B1C 0099082A */ slt $at, $a0, $t9
|
||||
/* B39CC0 800C2B20 14200004 */ bnez $at, .L800C2B34
|
||||
/* B39CC4 800C2B24 8FAE0150 */ lw $t6, 0x150($sp)
|
||||
/* B39CC8 800C2B28 150E0002 */ bne $t0, $t6, .L800C2B34
|
||||
/* B39CCC 800C2B2C 00000000 */ nop
|
||||
/* B39CD0 800C2B30 00806825 */ move $t5, $a0
|
||||
.L800C2B34:
|
||||
/* B39CD4 800C2B34 10F40007 */ beq $a3, $s4, .L800C2B54
|
||||
/* B39CD8 800C2B38 8FB8011C */ lw $t8, 0x11c($sp)
|
||||
/* B39CDC 800C2B3C 0098082A */ slt $at, $a0, $t8
|
||||
/* B39CE0 800C2B40 14200004 */ bnez $at, .L800C2B54
|
||||
/* B39CE4 800C2B44 8FAF0158 */ lw $t7, 0x158($sp)
|
||||
/* B39CE8 800C2B48 150F0002 */ bne $t0, $t7, .L800C2B54
|
||||
/* B39CEC 800C2B4C 00000000 */ nop
|
||||
/* B39CF0 800C2B50 00806825 */ move $t5, $a0
|
||||
.L800C2B54:
|
||||
/* B39CF4 800C2B54 10E8000C */ beq $a3, $t0, .L800C2B88
|
||||
/* B39CF8 800C2B58 01001825 */ move $v1, $t0
|
||||
/* B39CFC 800C2B5C 00031080 */ sll $v0, $v1, 2
|
||||
/* B39D00 800C2B60 0142C821 */ addu $t9, $t2, $v0
|
||||
/* B39D04 800C2B64 8F2E0000 */ lw $t6, ($t9)
|
||||
/* B39D08 800C2B68 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39D0C 800C2B6C 008E082A */ slt $at, $a0, $t6
|
||||
/* B39D10 800C2B70 54200006 */ bnezl $at, .L800C2B8C
|
||||
/* B39D14 800C2B74 24790002 */ addiu $t9, $v1, 2
|
||||
/* B39D18 800C2B78 8F0F0000 */ lw $t7, ($t8)
|
||||
/* B39D1C 800C2B7C 550F0003 */ bnel $t0, $t7, .L800C2B8C
|
||||
/* B39D20 800C2B80 24790002 */ addiu $t9, $v1, 2
|
||||
/* B39D24 800C2B84 00806825 */ move $t5, $a0
|
||||
.L800C2B88:
|
||||
/* B39D28 800C2B88 24790002 */ addiu $t9, $v1, 2
|
||||
.L800C2B8C:
|
||||
/* B39D2C 800C2B8C 10F9000B */ beq $a3, $t9, .L800C2BBC
|
||||
/* B39D30 800C2B90 00031080 */ sll $v0, $v1, 2
|
||||
/* B39D34 800C2B94 01427021 */ addu $t6, $t2, $v0
|
||||
/* B39D38 800C2B98 8DD80008 */ lw $t8, 8($t6)
|
||||
/* B39D3C 800C2B9C 01227821 */ addu $t7, $t1, $v0
|
||||
/* B39D40 800C2BA0 0098082A */ slt $at, $a0, $t8
|
||||
/* B39D44 800C2BA4 54200006 */ bnezl $at, .L800C2BC0
|
||||
/* B39D48 800C2BA8 246E0004 */ addiu $t6, $v1, 4
|
||||
/* B39D4C 800C2BAC 8DF90008 */ lw $t9, 8($t7)
|
||||
/* B39D50 800C2BB0 55190003 */ bnel $t0, $t9, .L800C2BC0
|
||||
/* B39D54 800C2BB4 246E0004 */ addiu $t6, $v1, 4
|
||||
/* B39D58 800C2BB8 00806825 */ move $t5, $a0
|
||||
.L800C2BBC:
|
||||
/* B39D5C 800C2BBC 246E0004 */ addiu $t6, $v1, 4
|
||||
.L800C2BC0:
|
||||
/* B39D60 800C2BC0 10EE000B */ beq $a3, $t6, .L800C2BF0
|
||||
/* B39D64 800C2BC4 00031080 */ sll $v0, $v1, 2
|
||||
/* B39D68 800C2BC8 0142C021 */ addu $t8, $t2, $v0
|
||||
/* B39D6C 800C2BCC 8F0F0010 */ lw $t7, 0x10($t8)
|
||||
/* B39D70 800C2BD0 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B39D74 800C2BD4 008F082A */ slt $at, $a0, $t7
|
||||
/* B39D78 800C2BD8 54200006 */ bnezl $at, .L800C2BF4
|
||||
/* B39D7C 800C2BDC 24780006 */ addiu $t8, $v1, 6
|
||||
/* B39D80 800C2BE0 8F2E0010 */ lw $t6, 0x10($t9)
|
||||
/* B39D84 800C2BE4 550E0003 */ bnel $t0, $t6, .L800C2BF4
|
||||
/* B39D88 800C2BE8 24780006 */ addiu $t8, $v1, 6
|
||||
/* B39D8C 800C2BEC 00806825 */ move $t5, $a0
|
||||
.L800C2BF0:
|
||||
/* B39D90 800C2BF0 24780006 */ addiu $t8, $v1, 6
|
||||
.L800C2BF4:
|
||||
/* B39D94 800C2BF4 10F8000B */ beq $a3, $t8, .L800C2C24
|
||||
/* B39D98 800C2BF8 00031080 */ sll $v0, $v1, 2
|
||||
/* B39D9C 800C2BFC 01427821 */ addu $t7, $t2, $v0
|
||||
/* B39DA0 800C2C00 8DF90018 */ lw $t9, 0x18($t7)
|
||||
/* B39DA4 800C2C04 01227021 */ addu $t6, $t1, $v0
|
||||
/* B39DA8 800C2C08 0099082A */ slt $at, $a0, $t9
|
||||
/* B39DAC 800C2C0C 54200006 */ bnezl $at, .L800C2C28
|
||||
/* B39DB0 800C2C10 00BF082A */ slt $at, $a1, $ra
|
||||
/* B39DB4 800C2C14 8DD80018 */ lw $t8, 0x18($t6)
|
||||
/* B39DB8 800C2C18 55180003 */ bnel $t0, $t8, .L800C2C28
|
||||
/* B39DBC 800C2C1C 00BF082A */ slt $at, $a1, $ra
|
||||
/* B39DC0 800C2C20 00806825 */ move $t5, $a0
|
||||
.L800C2C24:
|
||||
/* B39DC4 800C2C24 00BF082A */ slt $at, $a1, $ra
|
||||
.L800C2C28:
|
||||
/* B39DC8 800C2C28 1020004E */ beqz $at, .L800C2D64
|
||||
/* B39DCC 800C2C2C 24010001 */ li $at, 1
|
||||
/* B39DD0 800C2C30 10E10007 */ beq $a3, $at, .L800C2C50
|
||||
/* B39DD4 800C2C34 8FAF00D0 */ lw $t7, 0xd0($sp)
|
||||
/* B39DD8 800C2C38 00AF082A */ slt $at, $a1, $t7
|
||||
/* B39DDC 800C2C3C 14200004 */ bnez $at, .L800C2C50
|
||||
/* B39DE0 800C2C40 8FB90148 */ lw $t9, 0x148($sp)
|
||||
/* B39DE4 800C2C44 55190003 */ bnel $t0, $t9, .L800C2C54
|
||||
/* B39DE8 800C2C48 24010003 */ li $at, 3
|
||||
/* B39DEC 800C2C4C 00A0F825 */ move $ra, $a1
|
||||
.L800C2C50:
|
||||
/* B39DF0 800C2C50 24010003 */ li $at, 3
|
||||
.L800C2C54:
|
||||
/* B39DF4 800C2C54 10E10007 */ beq $a3, $at, .L800C2C74
|
||||
/* B39DF8 800C2C58 8FAE00D8 */ lw $t6, 0xd8($sp)
|
||||
/* B39DFC 800C2C5C 00AE082A */ slt $at, $a1, $t6
|
||||
/* B39E00 800C2C60 14200004 */ bnez $at, .L800C2C74
|
||||
/* B39E04 800C2C64 8FB80150 */ lw $t8, 0x150($sp)
|
||||
/* B39E08 800C2C68 15180002 */ bne $t0, $t8, .L800C2C74
|
||||
/* B39E0C 800C2C6C 00000000 */ nop
|
||||
/* B39E10 800C2C70 00A0F825 */ move $ra, $a1
|
||||
.L800C2C74:
|
||||
/* B39E14 800C2C74 10F40007 */ beq $a3, $s4, .L800C2C94
|
||||
/* B39E18 800C2C78 8FAF00E0 */ lw $t7, 0xe0($sp)
|
||||
/* B39E1C 800C2C7C 00AF082A */ slt $at, $a1, $t7
|
||||
/* B39E20 800C2C80 14200004 */ bnez $at, .L800C2C94
|
||||
/* B39E24 800C2C84 8FB90158 */ lw $t9, 0x158($sp)
|
||||
/* B39E28 800C2C88 15190002 */ bne $t0, $t9, .L800C2C94
|
||||
/* B39E2C 800C2C8C 00000000 */ nop
|
||||
/* B39E30 800C2C90 00A0F825 */ move $ra, $a1
|
||||
.L800C2C94:
|
||||
/* B39E34 800C2C94 10E8000C */ beq $a3, $t0, .L800C2CC8
|
||||
/* B39E38 800C2C98 01001825 */ move $v1, $t0
|
||||
/* B39E3C 800C2C9C 00031080 */ sll $v0, $v1, 2
|
||||
/* B39E40 800C2CA0 01627021 */ addu $t6, $t3, $v0
|
||||
/* B39E44 800C2CA4 8DD80000 */ lw $t8, ($t6)
|
||||
/* B39E48 800C2CA8 01227821 */ addu $t7, $t1, $v0
|
||||
/* B39E4C 800C2CAC 00B8082A */ slt $at, $a1, $t8
|
||||
/* B39E50 800C2CB0 54200006 */ bnezl $at, .L800C2CCC
|
||||
/* B39E54 800C2CB4 246E0002 */ addiu $t6, $v1, 2
|
||||
/* B39E58 800C2CB8 8DF90000 */ lw $t9, ($t7)
|
||||
/* B39E5C 800C2CBC 55190003 */ bnel $t0, $t9, .L800C2CCC
|
||||
/* B39E60 800C2CC0 246E0002 */ addiu $t6, $v1, 2
|
||||
/* B39E64 800C2CC4 00A0F825 */ move $ra, $a1
|
||||
.L800C2CC8:
|
||||
/* B39E68 800C2CC8 246E0002 */ addiu $t6, $v1, 2
|
||||
.L800C2CCC:
|
||||
/* B39E6C 800C2CCC 10EE000B */ beq $a3, $t6, .L800C2CFC
|
||||
/* B39E70 800C2CD0 00031080 */ sll $v0, $v1, 2
|
||||
/* B39E74 800C2CD4 0162C021 */ addu $t8, $t3, $v0
|
||||
/* B39E78 800C2CD8 8F0F0008 */ lw $t7, 8($t8)
|
||||
/* B39E7C 800C2CDC 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B39E80 800C2CE0 00AF082A */ slt $at, $a1, $t7
|
||||
/* B39E84 800C2CE4 54200006 */ bnezl $at, .L800C2D00
|
||||
/* B39E88 800C2CE8 24780004 */ addiu $t8, $v1, 4
|
||||
/* B39E8C 800C2CEC 8F2E0008 */ lw $t6, 8($t9)
|
||||
/* B39E90 800C2CF0 550E0003 */ bnel $t0, $t6, .L800C2D00
|
||||
/* B39E94 800C2CF4 24780004 */ addiu $t8, $v1, 4
|
||||
/* B39E98 800C2CF8 00A0F825 */ move $ra, $a1
|
||||
.L800C2CFC:
|
||||
/* B39E9C 800C2CFC 24780004 */ addiu $t8, $v1, 4
|
||||
.L800C2D00:
|
||||
/* B39EA0 800C2D00 10F8000B */ beq $a3, $t8, .L800C2D30
|
||||
/* B39EA4 800C2D04 00031080 */ sll $v0, $v1, 2
|
||||
/* B39EA8 800C2D08 01627821 */ addu $t7, $t3, $v0
|
||||
/* B39EAC 800C2D0C 8DF90010 */ lw $t9, 0x10($t7)
|
||||
/* B39EB0 800C2D10 01227021 */ addu $t6, $t1, $v0
|
||||
/* B39EB4 800C2D14 00B9082A */ slt $at, $a1, $t9
|
||||
/* B39EB8 800C2D18 54200006 */ bnezl $at, .L800C2D34
|
||||
/* B39EBC 800C2D1C 246F0006 */ addiu $t7, $v1, 6
|
||||
/* B39EC0 800C2D20 8DD80010 */ lw $t8, 0x10($t6)
|
||||
/* B39EC4 800C2D24 55180003 */ bnel $t0, $t8, .L800C2D34
|
||||
/* B39EC8 800C2D28 246F0006 */ addiu $t7, $v1, 6
|
||||
/* B39ECC 800C2D2C 00A0F825 */ move $ra, $a1
|
||||
.L800C2D30:
|
||||
/* B39ED0 800C2D30 246F0006 */ addiu $t7, $v1, 6
|
||||
.L800C2D34:
|
||||
/* B39ED4 800C2D34 10EF000B */ beq $a3, $t7, .L800C2D64
|
||||
/* B39ED8 800C2D38 00031080 */ sll $v0, $v1, 2
|
||||
/* B39EDC 800C2D3C 0162C821 */ addu $t9, $t3, $v0
|
||||
/* B39EE0 800C2D40 8F2E0018 */ lw $t6, 0x18($t9)
|
||||
/* B39EE4 800C2D44 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39EE8 800C2D48 00AE082A */ slt $at, $a1, $t6
|
||||
/* B39EEC 800C2D4C 54200006 */ bnezl $at, .L800C2D68
|
||||
/* B39EF0 800C2D50 00D0082A */ slt $at, $a2, $s0
|
||||
/* B39EF4 800C2D54 8F0F0018 */ lw $t7, 0x18($t8)
|
||||
/* B39EF8 800C2D58 550F0003 */ bnel $t0, $t7, .L800C2D68
|
||||
/* B39EFC 800C2D5C 00D0082A */ slt $at, $a2, $s0
|
||||
/* B39F00 800C2D60 00A0F825 */ move $ra, $a1
|
||||
.L800C2D64:
|
||||
/* B39F04 800C2D64 00D0082A */ slt $at, $a2, $s0
|
||||
.L800C2D68:
|
||||
/* B39F08 800C2D68 1020004E */ beqz $at, .L800C2EA4
|
||||
/* B39F0C 800C2D6C 24010001 */ li $at, 1
|
||||
/* B39F10 800C2D70 10E10007 */ beq $a3, $at, .L800C2D90
|
||||
/* B39F14 800C2D74 8FB90094 */ lw $t9, 0x94($sp)
|
||||
/* B39F18 800C2D78 00D9082A */ slt $at, $a2, $t9
|
||||
/* B39F1C 800C2D7C 14200004 */ bnez $at, .L800C2D90
|
||||
/* B39F20 800C2D80 8FAE0148 */ lw $t6, 0x148($sp)
|
||||
/* B39F24 800C2D84 550E0003 */ bnel $t0, $t6, .L800C2D94
|
||||
/* B39F28 800C2D88 24010003 */ li $at, 3
|
||||
/* B39F2C 800C2D8C 00C08025 */ move $s0, $a2
|
||||
.L800C2D90:
|
||||
/* B39F30 800C2D90 24010003 */ li $at, 3
|
||||
.L800C2D94:
|
||||
/* B39F34 800C2D94 10E10007 */ beq $a3, $at, .L800C2DB4
|
||||
/* B39F38 800C2D98 8FB8009C */ lw $t8, 0x9c($sp)
|
||||
/* B39F3C 800C2D9C 00D8082A */ slt $at, $a2, $t8
|
||||
/* B39F40 800C2DA0 14200004 */ bnez $at, .L800C2DB4
|
||||
/* B39F44 800C2DA4 8FAF0150 */ lw $t7, 0x150($sp)
|
||||
/* B39F48 800C2DA8 150F0002 */ bne $t0, $t7, .L800C2DB4
|
||||
/* B39F4C 800C2DAC 00000000 */ nop
|
||||
/* B39F50 800C2DB0 00C08025 */ move $s0, $a2
|
||||
.L800C2DB4:
|
||||
/* B39F54 800C2DB4 10F40007 */ beq $a3, $s4, .L800C2DD4
|
||||
/* B39F58 800C2DB8 8FB900A4 */ lw $t9, 0xa4($sp)
|
||||
/* B39F5C 800C2DBC 00D9082A */ slt $at, $a2, $t9
|
||||
/* B39F60 800C2DC0 14200004 */ bnez $at, .L800C2DD4
|
||||
/* B39F64 800C2DC4 8FAE0158 */ lw $t6, 0x158($sp)
|
||||
/* B39F68 800C2DC8 150E0002 */ bne $t0, $t6, .L800C2DD4
|
||||
/* B39F6C 800C2DCC 00000000 */ nop
|
||||
/* B39F70 800C2DD0 00C08025 */ move $s0, $a2
|
||||
.L800C2DD4:
|
||||
/* B39F74 800C2DD4 10E8000C */ beq $a3, $t0, .L800C2E08
|
||||
/* B39F78 800C2DD8 01001825 */ move $v1, $t0
|
||||
/* B39F7C 800C2DDC 00031080 */ sll $v0, $v1, 2
|
||||
/* B39F80 800C2DE0 0182C021 */ addu $t8, $t4, $v0
|
||||
/* B39F84 800C2DE4 8F0F0000 */ lw $t7, ($t8)
|
||||
/* B39F88 800C2DE8 0122C821 */ addu $t9, $t1, $v0
|
||||
/* B39F8C 800C2DEC 00CF082A */ slt $at, $a2, $t7
|
||||
/* B39F90 800C2DF0 54200006 */ bnezl $at, .L800C2E0C
|
||||
/* B39F94 800C2DF4 24780002 */ addiu $t8, $v1, 2
|
||||
/* B39F98 800C2DF8 8F2E0000 */ lw $t6, ($t9)
|
||||
/* B39F9C 800C2DFC 550E0003 */ bnel $t0, $t6, .L800C2E0C
|
||||
/* B39FA0 800C2E00 24780002 */ addiu $t8, $v1, 2
|
||||
/* B39FA4 800C2E04 00C08025 */ move $s0, $a2
|
||||
.L800C2E08:
|
||||
/* B39FA8 800C2E08 24780002 */ addiu $t8, $v1, 2
|
||||
.L800C2E0C:
|
||||
/* B39FAC 800C2E0C 10F8000B */ beq $a3, $t8, .L800C2E3C
|
||||
/* B39FB0 800C2E10 00031080 */ sll $v0, $v1, 2
|
||||
/* B39FB4 800C2E14 01827821 */ addu $t7, $t4, $v0
|
||||
/* B39FB8 800C2E18 8DF90008 */ lw $t9, 8($t7)
|
||||
/* B39FBC 800C2E1C 01227021 */ addu $t6, $t1, $v0
|
||||
/* B39FC0 800C2E20 00D9082A */ slt $at, $a2, $t9
|
||||
/* B39FC4 800C2E24 54200006 */ bnezl $at, .L800C2E40
|
||||
/* B39FC8 800C2E28 246F0004 */ addiu $t7, $v1, 4
|
||||
/* B39FCC 800C2E2C 8DD80008 */ lw $t8, 8($t6)
|
||||
/* B39FD0 800C2E30 55180003 */ bnel $t0, $t8, .L800C2E40
|
||||
/* B39FD4 800C2E34 246F0004 */ addiu $t7, $v1, 4
|
||||
/* B39FD8 800C2E38 00C08025 */ move $s0, $a2
|
||||
.L800C2E3C:
|
||||
/* B39FDC 800C2E3C 246F0004 */ addiu $t7, $v1, 4
|
||||
.L800C2E40:
|
||||
/* B39FE0 800C2E40 10EF000B */ beq $a3, $t7, .L800C2E70
|
||||
/* B39FE4 800C2E44 00031080 */ sll $v0, $v1, 2
|
||||
/* B39FE8 800C2E48 0182C821 */ addu $t9, $t4, $v0
|
||||
/* B39FEC 800C2E4C 8F2E0010 */ lw $t6, 0x10($t9)
|
||||
/* B39FF0 800C2E50 0122C021 */ addu $t8, $t1, $v0
|
||||
/* B39FF4 800C2E54 00CE082A */ slt $at, $a2, $t6
|
||||
/* B39FF8 800C2E58 54200006 */ bnezl $at, .L800C2E74
|
||||
/* B39FFC 800C2E5C 24790006 */ addiu $t9, $v1, 6
|
||||
/* B3A000 800C2E60 8F0F0010 */ lw $t7, 0x10($t8)
|
||||
/* B3A004 800C2E64 550F0003 */ bnel $t0, $t7, .L800C2E74
|
||||
/* B3A008 800C2E68 24790006 */ addiu $t9, $v1, 6
|
||||
/* B3A00C 800C2E6C 00C08025 */ move $s0, $a2
|
||||
.L800C2E70:
|
||||
/* B3A010 800C2E70 24790006 */ addiu $t9, $v1, 6
|
||||
.L800C2E74:
|
||||
/* B3A014 800C2E74 10F9000B */ beq $a3, $t9, .L800C2EA4
|
||||
/* B3A018 800C2E78 00031080 */ sll $v0, $v1, 2
|
||||
/* B3A01C 800C2E7C 01827021 */ addu $t6, $t4, $v0
|
||||
/* B3A020 800C2E80 8DD80018 */ lw $t8, 0x18($t6)
|
||||
/* B3A024 800C2E84 01227821 */ addu $t7, $t1, $v0
|
||||
/* B3A028 800C2E88 00D8082A */ slt $at, $a2, $t8
|
||||
/* B3A02C 800C2E8C 54200006 */ bnezl $at, .L800C2EA8
|
||||
/* B3A030 800C2E90 8FAE0054 */ lw $t6, 0x54($sp)
|
||||
/* B3A034 800C2E94 8DF90018 */ lw $t9, 0x18($t7)
|
||||
/* B3A038 800C2E98 55190003 */ bnel $t0, $t9, .L800C2EA8
|
||||
/* B3A03C 800C2E9C 8FAE0054 */ lw $t6, 0x54($sp)
|
||||
/* B3A040 800C2EA0 00C08025 */ move $s0, $a2
|
||||
.L800C2EA4:
|
||||
/* B3A044 800C2EA4 8FAE0054 */ lw $t6, 0x54($sp)
|
||||
.L800C2EA8:
|
||||
/* B3A048 800C2EA8 24E70002 */ addiu $a3, $a3, 2
|
||||
/* B3A04C 800C2EAC 2401000F */ li $at, 15
|
||||
/* B3A050 800C2EB0 25D80008 */ addiu $t8, $t6, 8
|
||||
/* B3A054 800C2EB4 14E1FE0F */ bne $a3, $at, .L800C26F4
|
||||
/* B3A058 800C2EB8 AFB80054 */ sw $t8, 0x54($sp)
|
||||
/* B3A05C 800C2EBC 8FAF0160 */ lw $t7, 0x160($sp)
|
||||
/* B3A060 800C2EC0 8FAE0124 */ lw $t6, 0x124($sp)
|
||||
/* B3A064 800C2EC4 022DC821 */ addu $t9, $s1, $t5
|
||||
/* B3A068 800C2EC8 010F1023 */ subu $v0, $t0, $t7
|
||||
/* B3A06C 800C2ECC 000EC040 */ sll $t8, $t6, 1
|
||||
/* B3A070 800C2ED0 03387823 */ subu $t7, $t9, $t8
|
||||
/* B3A074 800C2ED4 01E20019 */ multu $t7, $v0
|
||||
/* B3A078 800C2ED8 0000C812 */ mflo $t9
|
||||
/* B3A07C 800C2EDC 27380004 */ addiu $t8, $t9, 4
|
||||
/* B3A080 800C2EE0 001878C3 */ sra $t7, $t8, 3
|
||||
/* B3A084 800C2EE4 8FB800E8 */ lw $t8, 0xe8($sp)
|
||||
/* B3A088 800C2EE8 01EE1821 */ addu $v1, $t7, $t6
|
||||
/* B3A08C 800C2EEC 025FC821 */ addu $t9, $s2, $ra
|
||||
/* B3A090 800C2EF0 00187840 */ sll $t7, $t8, 1
|
||||
/* B3A094 800C2EF4 032F7023 */ subu $t6, $t9, $t7
|
||||
/* B3A098 800C2EF8 01C20019 */ multu $t6, $v0
|
||||
/* B3A09C 800C2EFC 0000C812 */ mflo $t9
|
||||
/* B3A0A0 800C2F00 272F0004 */ addiu $t7, $t9, 4
|
||||
/* B3A0A4 800C2F04 000F70C3 */ sra $t6, $t7, 3
|
||||
/* B3A0A8 800C2F08 8FAF00AC */ lw $t7, 0xac($sp)
|
||||
/* B3A0AC 800C2F0C 01D82021 */ addu $a0, $t6, $t8
|
||||
/* B3A0B0 800C2F10 0270C821 */ addu $t9, $s3, $s0
|
||||
/* B3A0B4 800C2F14 000F7040 */ sll $t6, $t7, 1
|
||||
/* B3A0B8 800C2F18 032EC023 */ subu $t8, $t9, $t6
|
||||
/* B3A0BC 800C2F1C 03020019 */ multu $t8, $v0
|
||||
/* B3A0C0 800C2F20 0000C812 */ mflo $t9
|
||||
/* B3A0C4 800C2F24 272E0004 */ addiu $t6, $t9, 4
|
||||
/* B3A0C8 800C2F28 000EC0C3 */ sra $t8, $t6, 3
|
||||
/* B3A0CC 800C2F2C 93B90064 */ lbu $t9, 0x64($sp)
|
||||
/* B3A0D0 800C2F30 000370C2 */ srl $t6, $v1, 3
|
||||
/* B3A0D4 800C2F34 030F2821 */ addu $a1, $t8, $t7
|
||||
/* B3A0D8 800C2F38 000E78C0 */ sll $t7, $t6, 3
|
||||
/* B3A0DC 800C2F3C 332EFF07 */ andi $t6, $t9, 0xff07
|
||||
/* B3A0E0 800C2F40 01EEC025 */ or $t8, $t7, $t6
|
||||
/* B3A0E4 800C2F44 A3B80064 */ sb $t8, 0x64($sp)
|
||||
/* B3A0E8 800C2F48 97B90064 */ lhu $t9, 0x64($sp)
|
||||
/* B3A0EC 800C2F4C 000478C2 */ srl $t7, $a0, 3
|
||||
/* B3A0F0 800C2F50 000F7180 */ sll $t6, $t7, 6
|
||||
/* B3A0F4 800C2F54 31D807C0 */ andi $t8, $t6, 0x7c0
|
||||
/* B3A0F8 800C2F58 332FF83F */ andi $t7, $t9, 0xf83f
|
||||
/* B3A0FC 800C2F5C 030F7025 */ or $t6, $t8, $t7
|
||||
/* B3A100 800C2F60 A7AE0064 */ sh $t6, 0x64($sp)
|
||||
/* B3A104 800C2F64 93B90065 */ lbu $t9, 0x65($sp)
|
||||
/* B3A108 800C2F68 0005C0C2 */ srl $t8, $a1, 3
|
||||
/* B3A10C 800C2F6C 00187840 */ sll $t7, $t8, 1
|
||||
/* B3A110 800C2F70 31EE003E */ andi $t6, $t7, 0x3e
|
||||
/* B3A114 800C2F74 3338FFC1 */ andi $t8, $t9, 0xffc1
|
||||
/* B3A118 800C2F78 01D87825 */ or $t7, $t6, $t8
|
||||
/* B3A11C 800C2F7C 01E07025 */ move $t6, $t7
|
||||
/* B3A120 800C2F80 35D80001 */ ori $t8, $t6, 1
|
||||
/* B3A124 800C2F84 A3AF0065 */ sb $t7, 0x65($sp)
|
||||
/* B3A128 800C2F88 8FAE018C */ lw $t6, 0x18c($sp)
|
||||
/* B3A12C 800C2F8C A3B80065 */ sb $t8, 0x65($sp)
|
||||
/* B3A130 800C2F90 8ED90014 */ lw $t9, 0x14($s6)
|
||||
/* B3A134 800C2F94 000EC040 */ sll $t8, $t6, 1
|
||||
/* B3A138 800C2F98 97AF0064 */ lhu $t7, 0x64($sp)
|
||||
/* B3A13C 800C2F9C 03387021 */ addu $t6, $t9, $t8
|
||||
/* B3A140 800C2FA0 8ED80000 */ lw $t8, ($s6)
|
||||
/* B3A144 800C2FA4 8FB90190 */ lw $t9, 0x190($sp)
|
||||
/* B3A148 800C2FA8 03380019 */ multu $t9, $t8
|
||||
/* B3A14C 800C2FAC 0000C812 */ mflo $t9
|
||||
/* B3A150 800C2FB0 0019C040 */ sll $t8, $t9, 1
|
||||
/* B3A154 800C2FB4 01D8C821 */ addu $t9, $t6, $t8
|
||||
/* B3A158 800C2FB8 A72F0000 */ sh $t7, ($t9)
|
||||
/* B3A15C 800C2FBC 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L800C2FC0:
|
||||
/* B3A160 800C2FC0 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B3A164 800C2FC4 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B3A168 800C2FC8 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B3A16C 800C2FCC 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B3A170 800C2FD0 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B3A174 800C2FD4 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B3A178 800C2FD8 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B3A17C 800C2FDC 03E00008 */ jr $ra
|
||||
/* B3A180 800C2FE0 27BD0188 */ addiu $sp, $sp, 0x188
|
|
@ -21,4 +21,14 @@ typedef struct {
|
|||
f32 r, g, b, a;
|
||||
} Color_RGBAf;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u16 r : 5;
|
||||
u16 g : 5;
|
||||
u16 b : 5;
|
||||
u16 a : 1;
|
||||
};
|
||||
u16 rgba;
|
||||
} Color_RGB5A1;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
|
||||
#define MEDIAN3(a1, a2, a3) ((a2 >= a1) ? ((a3 >= a2) ? a2 : ((a1 >= a3) ? a1 : a3)) : ((a2 >= a3) ? a2 : ((a3 >= a1) ? a1 : a3)))
|
||||
|
||||
#define RGBA8(r, g, b, a) (((r & 0xFF) << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | ((a & 0xFF) << 0))
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "alloca.h"
|
||||
|
||||
void PreRender_SetValuesSave(PreRenderContext* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
|
||||
this->widthSave = width;
|
||||
|
@ -36,11 +37,7 @@ void func_800C0F28(PreRenderContext* this, Gfx** gfxp, void* buf, void* bufSave)
|
|||
Gfx* gfx;
|
||||
s32 x;
|
||||
s32 x2;
|
||||
s32 add;
|
||||
s32 uls;
|
||||
s32 ult;
|
||||
s32 lrs;
|
||||
s32 lrt;
|
||||
s32 dx;
|
||||
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 215);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 216);
|
||||
|
@ -55,19 +52,19 @@ void func_800C0F28(PreRenderContext* this, Gfx** gfxp, void* buf, void* bufSave)
|
|||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, bufSave);
|
||||
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
|
||||
|
||||
dx = 0x1000 / (this->width * 2);
|
||||
|
||||
x = this->height;
|
||||
add = 0x1000 / (this->width * 2);
|
||||
uls = 0;
|
||||
x2 = 0;
|
||||
|
||||
while (x > 0) {
|
||||
lrs = this->width - 1;
|
||||
if (x < add) {
|
||||
add = x;
|
||||
}
|
||||
s32 uls = 0;
|
||||
s32 lrs = this->width - 1;
|
||||
s32 ult;
|
||||
s32 lrt;
|
||||
|
||||
dx = CLAMP_MAX(dx, x);
|
||||
ult = x2;
|
||||
lrt = (ult + add) - 1;
|
||||
lrt = (ult + dx) - 1;
|
||||
|
||||
if (1) {}
|
||||
gDPLoadTextureTile(gfx++, buf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
|
||||
|
@ -76,8 +73,8 @@ void func_800C0F28(PreRenderContext* this, Gfx** gfxp, void* buf, void* bufSave)
|
|||
gSPTextureRectangle(gfx++, uls << 2, ult << 2, lrs << 2, lrt << 2, G_TX_RENDERTILE, uls << 5, ult << 5, 4 << 10,
|
||||
1 << 10);
|
||||
|
||||
x -= add;
|
||||
x2 += add;
|
||||
x -= dx;
|
||||
x2 += dx;
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -89,11 +86,7 @@ void func_800C1258(PreRenderContext* this, Gfx** gfxp) {
|
|||
Gfx* gfx;
|
||||
s32 y;
|
||||
s32 y2;
|
||||
s32 add;
|
||||
s32 ult;
|
||||
s32 lrs;
|
||||
s32 lrt;
|
||||
s32 uly;
|
||||
s32 dy;
|
||||
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 278);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 279);
|
||||
|
@ -108,28 +101,30 @@ void func_800C1258(PreRenderContext* this, Gfx** gfxp) {
|
|||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->fbuf);
|
||||
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, this->ulx, this->uly, this->lrx + 1, this->lry + 1);
|
||||
|
||||
y2 = 0;
|
||||
add = 0x1000 / ((this->lrxSave - this->ulxSave + 1) * 2);
|
||||
y = (this->lrySave - this->ulySave) + 1;
|
||||
dy = 0x1000 / ((this->lrxSave - this->ulxSave + 1) * 2);
|
||||
|
||||
y = (this->lrySave - this->ulySave) + 1;
|
||||
y2 = 0;
|
||||
while (y > 0) {
|
||||
if (y < add) {
|
||||
add = y;
|
||||
}
|
||||
s32 ult;
|
||||
s32 lrt;
|
||||
s32 uly;
|
||||
|
||||
dy = CLAMP_MAX(dy, y);
|
||||
|
||||
ult = this->ulySave + y2;
|
||||
lrt = (ult + dy) - 1;
|
||||
uly = this->uly + y2;
|
||||
lrt = (ult + add) - 1;
|
||||
|
||||
if (1) {}
|
||||
gDPLoadTextureTile(gfx++, this->fbufSave, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->widthSave, this->height - 1,
|
||||
this->ulxSave, ult, this->lrxSave, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, (uly + add - 1) << 2, G_TX_RENDERTILE,
|
||||
gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, (uly + dy - 1) << 2, G_TX_RENDERTILE,
|
||||
this->ulxSave << 5, ult << 5, 4 << 10, 1 << 10);
|
||||
|
||||
y -= add;
|
||||
y2 += add;
|
||||
y -= dy;
|
||||
y2 += dy;
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -142,12 +137,7 @@ void func_800C170C(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* fbufSav
|
|||
Gfx* gfx;
|
||||
s32 x;
|
||||
s32 x2;
|
||||
s32 add;
|
||||
s32 uls;
|
||||
s32 ult;
|
||||
s32 lrs;
|
||||
s32 lrt;
|
||||
s32 unk;
|
||||
s32 dx;
|
||||
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 343);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 344);
|
||||
|
@ -165,20 +155,19 @@ void func_800C170C(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* fbufSav
|
|||
gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, fbufSave);
|
||||
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
|
||||
|
||||
x2 = 0;
|
||||
dx = 0x1000 / (this->width * 2);
|
||||
|
||||
x = this->height;
|
||||
add = 0x1000 / (this->width * 2);
|
||||
|
||||
x2 = 0;
|
||||
while (x > 0) {
|
||||
lrs = this->width - 1;
|
||||
s32 uls = 0;
|
||||
s32 lrs = this->width - 1;
|
||||
s32 ult;
|
||||
s32 lrt;
|
||||
|
||||
if (x < add) {
|
||||
add = x;
|
||||
}
|
||||
|
||||
uls = 0;
|
||||
dx = CLAMP_MAX(dx, x);
|
||||
ult = x2;
|
||||
lrt = (x2 + add - 1);
|
||||
lrt = x2 + dx - 1;
|
||||
|
||||
gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -187,8 +176,8 @@ void func_800C170C(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* fbufSav
|
|||
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
|
||||
ult << 5, 1 << 10, 1 << 10);
|
||||
|
||||
x -= add;
|
||||
x2 += add;
|
||||
x -= dx;
|
||||
x2 += dx;
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -204,11 +193,7 @@ void func_800C1B24(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* cvgSave
|
|||
Gfx* gfx;
|
||||
s32 x;
|
||||
s32 x2;
|
||||
s32 add;
|
||||
s32 uls;
|
||||
s32 ult;
|
||||
s32 lrs;
|
||||
s32 lrt;
|
||||
s32 dx;
|
||||
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 422);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 423);
|
||||
|
@ -224,18 +209,19 @@ void func_800C1B24(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* cvgSave
|
|||
gDPSetColorImage(gfx++, G_IM_FMT_I, G_IM_SIZ_8b, this->width, cvgSave);
|
||||
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, this->width, this->height);
|
||||
|
||||
dx = 0x1000 / (this->width * 2);
|
||||
|
||||
x = this->height;
|
||||
x2 = 0;
|
||||
add = 0x1000 / (this->width * 2);
|
||||
|
||||
while (x > 0) {
|
||||
lrs = this->width - 1;
|
||||
if (x < add) {
|
||||
add = x;
|
||||
}
|
||||
uls = 0;
|
||||
s32 uls = 0;
|
||||
s32 lrs = this->width - 1;
|
||||
s32 ult;
|
||||
s32 lrt;
|
||||
|
||||
dx = CLAMP_MAX(dx, x);
|
||||
ult = x2;
|
||||
lrt = (x2 + add) - 1;
|
||||
lrt = x2 + dx - 1;
|
||||
|
||||
gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_IA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -243,9 +229,8 @@ void func_800C1B24(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* cvgSave
|
|||
if (1) {}
|
||||
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
|
||||
ult << 5, 1 << 10, 1 << 10);
|
||||
|
||||
x -= add;
|
||||
x2 += add;
|
||||
x -= dx;
|
||||
x2 += dx;
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -257,22 +242,18 @@ void func_800C1E9C(PreRenderContext* this, Gfx** gfxp) {
|
|||
LogUtils_CheckNullPointer("this->zbuf_save", this->zbufSave, "../PreRender.c", 481);
|
||||
LogUtils_CheckNullPointer("this->zbuf", this->zbuf, "../PreRender.c", 482);
|
||||
|
||||
if (!this->zbufSave || !this->zbuf) {
|
||||
return;
|
||||
if ((this->zbufSave != NULL) && (this->zbuf != NULL)) {
|
||||
func_800C0F28(this, gfxp, this->zbuf, this->zbufSave);
|
||||
}
|
||||
|
||||
func_800C0F28(this, gfxp, this->zbuf, this->zbufSave);
|
||||
}
|
||||
|
||||
void func_800C1F20(PreRenderContext* this, Gfx** gfxp) {
|
||||
LogUtils_CheckNullPointer("this->fbuf_save", this->fbufSave, "../PreRender.c", 495);
|
||||
LogUtils_CheckNullPointer("this->fbuf", this->fbuf, "../PreRender.c", 496);
|
||||
|
||||
if (!this->fbufSave || !this->fbuf) {
|
||||
return;
|
||||
if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
|
||||
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
||||
}
|
||||
|
||||
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
|
||||
}
|
||||
|
||||
void func_800C1FA4(PreRenderContext* this, Gfx** gfxp) {
|
||||
|
@ -295,11 +276,9 @@ void func_800C1FA4(PreRenderContext* this, Gfx** gfxp) {
|
|||
void func_800C20B4(PreRenderContext* this, Gfx** gfxp) {
|
||||
func_800C1FA4(this, gfxp);
|
||||
LogUtils_CheckNullPointer("this->cvg_save", this->cvgSave, "../PreRender.c", 532);
|
||||
if (!this->cvgSave) {
|
||||
return;
|
||||
if (this->cvgSave != NULL) {
|
||||
func_800C1B24(this, gfxp, this->fbuf, this->cvgSave);
|
||||
}
|
||||
|
||||
func_800C1B24(this, gfxp, this->fbuf, this->cvgSave);
|
||||
}
|
||||
|
||||
void func_800C2118(PreRenderContext* this, Gfx** gfxp) {
|
||||
|
@ -310,68 +289,58 @@ void func_800C213C(PreRenderContext* this, Gfx** gfxp) {
|
|||
Gfx* gfx;
|
||||
s32 y;
|
||||
s32 y2;
|
||||
s32 add;
|
||||
s32 uls;
|
||||
s32 yinc; // vertical increment amount
|
||||
s32 ult;
|
||||
s32 lrx;
|
||||
s32 lry;
|
||||
s32 dy;
|
||||
s32 rtile = 1;
|
||||
|
||||
if (!this->cvgSave) {
|
||||
return;
|
||||
}
|
||||
if (this->cvgSave != NULL) {
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 563);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 564);
|
||||
gfx = *gfxp;
|
||||
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 566);
|
||||
|
||||
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 563);
|
||||
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 564);
|
||||
gfx = *gfxp;
|
||||
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 566);
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
|
||||
gDPSetOtherMode(gfx++,
|
||||
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_2CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PRIM | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA |
|
||||
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1) |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, 1, 0, TEXEL1, ENVIRONMENT, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
|
||||
gDPSetOtherMode(gfx++,
|
||||
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_2CYCLE | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PRIM | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA |
|
||||
GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1) |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1));
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, 1, 0, TEXEL1, ENVIRONMENT, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||
dy = 4;
|
||||
|
||||
y = this->height;
|
||||
add = 4;
|
||||
y2 = 0;
|
||||
y = this->height;
|
||||
y2 = 0;
|
||||
while (y > 0) {
|
||||
s32 uls = 0;
|
||||
s32 lrs = this->width - 1;
|
||||
s32 ult;
|
||||
s32 lrt;
|
||||
|
||||
while (y > 0) {
|
||||
lrx = this->width - 1;
|
||||
if (y < add) {
|
||||
add = y;
|
||||
dy = CLAMP_MAX(dy, y);
|
||||
|
||||
ult = y2;
|
||||
lrt = (y2 + dy - 1);
|
||||
|
||||
gDPLoadMultiTile(gfx++, this->fbufSave, 0x0000, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width,
|
||||
this->height, uls, ult, lrs, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
if (1) {}
|
||||
gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, rtile, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height,
|
||||
uls, ult, lrs, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
if (1) {}
|
||||
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
|
||||
ult << 5, 1 << 10, 1 << 10);
|
||||
|
||||
y -= dy;
|
||||
y2 += dy;
|
||||
}
|
||||
|
||||
uls = 0;
|
||||
yinc = 1;
|
||||
ult = y2;
|
||||
lry = (y2 + add - yinc);
|
||||
|
||||
gDPLoadMultiTile(gfx++, this->fbufSave, 0x0000, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width,
|
||||
this->height, uls, ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
do {
|
||||
} while (0); // force register allocation behavior
|
||||
gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, yinc, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height, uls,
|
||||
ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
do {
|
||||
} while (0); // force register allocation behavior
|
||||
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrx + yinc) << 2, (lry + yinc) << 2, G_TX_RENDERTILE, uls << 5,
|
||||
ult << 5, 1 << 10, 1 << 10);
|
||||
|
||||
y -= add;
|
||||
y2 += add;
|
||||
gDPPipeSync(gfx++);
|
||||
*gfxp = gfx;
|
||||
}
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
*gfxp = gfx;
|
||||
}
|
||||
|
||||
void func_800C24BC(PreRenderContext* this, Gfx** gfxp) {
|
||||
|
@ -382,27 +351,30 @@ void func_800C24E0(PreRenderContext* this, Gfx** gfxp) {
|
|||
func_800C1258(this, gfxp);
|
||||
}
|
||||
|
||||
#ifdef NON_EQUIVALENT
|
||||
void func_800C2500(PreRenderContext* this, s32 x, s32 y) {
|
||||
|
||||
u32 buffA[3 * 8]; // 0x144
|
||||
u32 buffR[3 * 8]; // 0x108
|
||||
u32 buffG[3 * 8]; // 0xCC
|
||||
u32 buffB[3 * 8]; // 0x90
|
||||
|
||||
u32 pxR, pxG, pxB, pxR2, pxG2, pxB2;
|
||||
|
||||
s32 i;
|
||||
|
||||
s32 x1, y1;
|
||||
u32 px;
|
||||
u32 comp;
|
||||
|
||||
u32 unk;
|
||||
u16 pixel;
|
||||
s32 j;
|
||||
s32 buffA[3 * 5];
|
||||
s32 buffR[3 * 5];
|
||||
s32 buffG[3 * 5];
|
||||
s32 buffB[3 * 5];
|
||||
s32 x1;
|
||||
s32 y1;
|
||||
s32 pad;
|
||||
s32 pxR;
|
||||
s32 pxG;
|
||||
s32 pxB;
|
||||
s32 pxR2;
|
||||
s32 pxG2;
|
||||
s32 pxB2;
|
||||
Color_RGB5A1 pxIn;
|
||||
Color_RGB5A1 pxOut;
|
||||
u32 pxR3;
|
||||
u32 pxG3;
|
||||
u32 pxB3;
|
||||
|
||||
/*
|
||||
you have to picture this as a 3x5 rectangle where the middle pixel (index 7) correspond to (x; y)
|
||||
Picture this as a 3x5 rectangle where the middle pixel (index 7) correspond to (x, y)
|
||||
_ _ _ _ _
|
||||
| 0 1 2 3 4 |
|
||||
| 5 6 7 8 9 |
|
||||
|
@ -410,227 +382,193 @@ void func_800C2500(PreRenderContext* this, s32 x, s32 y) {
|
|||
‾ ‾ ‾ ‾ ‾
|
||||
*/
|
||||
for (i = 0; i < 3 * 5; i++) {
|
||||
x1 = (i % 5) + x - 2; // range (-2) - (2)
|
||||
y1 = (i / 5) + x - 1; // range (-1) - (1)
|
||||
x1 = (i % 5) + x - 2;
|
||||
y1 = (i / 5) + y - 1;
|
||||
|
||||
if (x1 < 0) {
|
||||
x1 = 0;
|
||||
} else if (this->width - 1 < x1) {
|
||||
} else if (x1 > (this->width - 1)) {
|
||||
x1 = this->width - 1;
|
||||
}
|
||||
if (y1 < 0) {
|
||||
y1 = 0;
|
||||
} else if (this->height - 1 < y1) {
|
||||
} else if (y1 > (this->height - 1)) {
|
||||
y1 = this->height - 1;
|
||||
}
|
||||
|
||||
px = this->fbufSave[y1 * this->width + x1];
|
||||
comp = (px << 0) >> 27; // R
|
||||
buffR[i] = (comp << 3) | (comp >> 2);
|
||||
comp = (px << 5) >> 27; // G
|
||||
buffG[i] = (comp << 3) | (comp >> 2);
|
||||
comp = (px << 10) >> 27; // B
|
||||
buffB[i] = (comp << 3) | (comp >> 2);
|
||||
buffA[i] = this->cvgSave[y1 * this->width + x1] >> 5; // A
|
||||
pxIn.rgba = this->fbufSave[x1 + y1 * this->width];
|
||||
buffR[i] = (pxIn.r << 3) | (pxIn.r >> 2);
|
||||
buffG[i] = (pxIn.g << 3) | (pxIn.g >> 2);
|
||||
buffB[i] = (pxIn.b << 3) | (pxIn.b >> 2);
|
||||
buffA[i] = this->cvgSave[x1 + y1 * this->width] >> 5; // A
|
||||
}
|
||||
|
||||
// 7 == buffA[7] ?
|
||||
if (7 == buffA[7]) {
|
||||
if (buffA[7] == 7) {
|
||||
osSyncPrintf("Error, should not be in here \n");
|
||||
return;
|
||||
}
|
||||
|
||||
pxR = buffR[7];
|
||||
pxG = buffG[7];
|
||||
pxB = buffB[7];
|
||||
pxR = pxR2 = buffR[7];
|
||||
pxG = pxG2 = buffG[7];
|
||||
pxB = pxB2 = buffB[7];
|
||||
|
||||
for (i = 1; i < 3 * 5; i += 2) {
|
||||
if (7 == buffA[i]) {
|
||||
// R
|
||||
if (buffA[i] == 7) {
|
||||
if (pxR < buffR[i]) {
|
||||
if (i != 1 && buffR[1] >= buffR[i] && 7 == buffA[1]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 3 && buffR[3] >= buffR[i] && 7 == buffA[3]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 5 && buffR[5] >= buffR[i] && 7 == buffA[5]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 7 && buffR[7] >= buffR[i] && 7 == buffA[7]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 9 && buffR[9] >= buffR[i] && 7 == buffA[9]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 11 && buffR[11] >= buffR[i] && 7 == buffA[11]) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
if (i != 13 && buffR[13] >= buffR[i] && 7 == buffA[13]) {
|
||||
pxR = buffR[i];
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffR[j] >= buffR[i]) && (buffA[j] == 7)) {
|
||||
pxR = buffR[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
// G
|
||||
if (pxG < buffG[i]) {
|
||||
if (i != 1 && buffG[1] >= buffG[i] && 7 == buffA[1]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 3 && buffG[3] >= buffG[i] && 7 == buffA[3]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 5 && buffG[5] >= buffG[i] && 7 == buffA[5]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 7 && buffG[7] >= buffG[i] && 7 == buffA[7]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 9 && buffG[9] >= buffG[i] && 7 == buffA[9]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 11 && buffG[11] >= buffG[i] && 7 == buffA[11]) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
if (i != 13 && buffG[13] >= buffG[i] && 7 == buffA[13]) {
|
||||
pxG = buffG[i];
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffG[j] >= buffG[i]) && (buffA[j] == 7)) {
|
||||
pxG = buffG[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
// B
|
||||
if (pxB < buffB[i]) {
|
||||
if (i != 1 && buffB[1] >= buffB[i] && 7 == buffA[1]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 3 && buffB[3] >= buffB[i] && 7 == buffA[3]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 5 && buffB[5] >= buffB[i] && 7 == buffA[5]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 7 && buffB[7] >= buffB[i] && 7 == buffA[7]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 9 && buffB[9] >= buffB[i] && 7 == buffA[9]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 11 && buffB[11] >= buffB[i] && 7 == buffA[11]) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
if (i != 13 && buffB[13] >= buffB[i] && 7 == buffA[13]) {
|
||||
pxB = buffB[i];
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffB[j] >= buffB[i]) && (buffA[j] == 7)) {
|
||||
pxB = buffB[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// R
|
||||
if (pxR2 < buffR[i + 1]) {
|
||||
if (i + 1 != 1 && buffR[1] >= buffR[i + 1] && 7 == buffA[1]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 3 && buffR[3] >= buffR[i + 1] && 7 == buffA[3]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 5 && buffR[5] >= buffR[i + 1] && 7 == buffA[5]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 7 && buffR[7] >= buffR[i + 1] && 7 == buffA[7]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 9 && buffR[9] >= buffR[i + 1] && 7 == buffA[9]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 11 && buffR[11] >= buffR[i + 1] && 7 == buffA[11]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
}
|
||||
if (i + 1 != 13 && buffR[13] >= buffR[i + 1] && 7 == buffA[13]) {
|
||||
pxR2 = buffR[i + 1];
|
||||
if (1) {}
|
||||
if (pxR2 > buffR[i]) {
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffR[j] <= buffR[i]) && (buffA[j] == 7)) {
|
||||
pxR2 = buffR[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
// G
|
||||
if (pxG2 < buffG[i + 1]) {
|
||||
if (i + 1 != 1 && buffG[1] >= buffG[i + 1] && 7 == buffA[1]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 3 && buffG[3] >= buffG[i + 1] && 7 == buffA[3]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 5 && buffG[5] >= buffG[i + 1] && 7 == buffA[5]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 7 && buffG[7] >= buffG[i + 1] && 7 == buffA[7]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 9 && buffG[9] >= buffG[i + 1] && 7 == buffA[9]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 11 && buffG[11] >= buffG[i + 1] && 7 == buffA[11]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
}
|
||||
if (i + 1 != 13 && buffG[13] >= buffG[i + 1] && 7 == buffA[13]) {
|
||||
pxG2 = buffG[i + 1];
|
||||
if (pxG2 > buffG[i]) {
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffG[j] <= buffG[i]) && (buffA[j] == 7)) {
|
||||
pxG2 = buffG[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
// B
|
||||
if (pxB2 < buffB[i + 1]) {
|
||||
if (i + 1 != 1 && buffB[1] >= buffB[i + 1] && 7 == buffA[1]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 3 && buffB[3] >= buffB[i + 1] && 7 == buffA[3]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 5 && buffB[5] >= buffB[i + 1] && 7 == buffA[5]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 7 && buffB[7] >= buffB[i + 1] && 7 == buffA[7]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 9 && buffB[9] >= buffB[i + 1] && 7 == buffA[9]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 11 && buffB[11] >= buffB[i + 1] && 7 == buffA[11]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
}
|
||||
if (i + 1 != 13 && buffB[13] >= buffB[i + 1] && 7 == buffA[13]) {
|
||||
pxB2 = buffB[i + 1];
|
||||
if (pxB2 > buffB[i]) {
|
||||
for (j = 1; j < 15; j += 2) {
|
||||
if ((i != j) && (buffB[j] <= buffB[i]) && (buffA[j] == 7)) {
|
||||
pxB2 = buffB[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unk = 7 - buffA[7];
|
||||
pxR3 = buffR[7] + ((s32)((7 - buffA[7]) * ((pxR + pxR2) - (buffR[7] << 1)) + 4) >> 3);
|
||||
pxG3 = buffG[7] + ((s32)((7 - buffA[7]) * ((pxG + pxG2) - (buffG[7] << 1)) + 4) >> 3);
|
||||
pxB3 = buffB[7] + ((s32)((7 - buffA[7]) * ((pxB + pxB2) - (buffB[7] << 1)) + 4) >> 3);
|
||||
|
||||
pixel =
|
||||
(((((((pxR + pxR2) - (buffR[7] << 1)) * unk + 4) >> 3) + buffR[7]) >> 3) << 3) | (pixel & 0xFF07); // RG + 7?
|
||||
pixel = ((((((((pxG + pxG2) - (buffG[7] << 1)) * unk + 4) >> 3) + buffG[7]) >> 3) << 6) & 0x07C0) |
|
||||
(pixel & 0xF83F); // R-BA
|
||||
pixel = ((((((((pxB + pxB2) - (buffB[7] << 1)) * unk + 4) >> 3) + buffB[7]) >> 3) << 1) & 0x003E) |
|
||||
(pixel & 0xFFC1); // RG-A
|
||||
pixel |= 1;
|
||||
this->fbufSave[y * this->width + x] = pixel;
|
||||
pxOut.r = pxR3 >> 3;
|
||||
pxOut.g = pxG3 >> 3;
|
||||
pxOut.b = pxB3 >> 3;
|
||||
pxOut.a = 1;
|
||||
this->fbufSave[x + y * this->width] = pxOut.rgba;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Redundant conditional is the only nonmatching.
|
||||
void func_800C2FE4(PreRenderContext* this) {
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 phi_v0;
|
||||
u8* buffR = alloca(this->width);
|
||||
u8* buffG = alloca(this->width);
|
||||
u8* buffB = alloca(this->width);
|
||||
s32 pxR;
|
||||
s32 pxG;
|
||||
s32 pxB;
|
||||
s32 medR;
|
||||
s32 medG;
|
||||
s32 medB;
|
||||
|
||||
for (y = 0; y < this->height; y++) {
|
||||
for (x = 0; x < this->width; x++) {
|
||||
Color_RGB5A1 pxIn;
|
||||
|
||||
pxIn.rgba = this->fbufSave[x + y * this->width];
|
||||
buffR[x] = pxIn.r;
|
||||
buffG[x] = pxIn.g;
|
||||
buffB[x] = pxIn.b;
|
||||
}
|
||||
for (x = 1; x < this->width - 1; x++) {
|
||||
Color_RGB5A1 pxOut;
|
||||
s32 a = this->cvgSave[x + y * this->width];
|
||||
|
||||
a >>= 5;
|
||||
if (a == 7) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((HREG(80) == 0xF) ? HREG(81) : 0) != 0) {
|
||||
// There's a redundant branch in the ASM that taken literally looks like this
|
||||
// phi_v0 = ((HREG(80) == 0xF) ? 0 : 0);
|
||||
// if (((HREG(80) == 0xF) ? HREG(81) : phi_v0) == 5) {
|
||||
|
||||
if (((HREG(80) == 0xF) ? HREG(81) : 0) == 5) {
|
||||
pxR = 31;
|
||||
pxG = 0;
|
||||
pxB = 0;
|
||||
} else {
|
||||
u8* temp_s0 = &buffR[x - 1];
|
||||
u8* temp_s1 = &buffG[x - 1];
|
||||
u8* temp_s2 = &buffB[x - 1];
|
||||
|
||||
if (((HREG(80) == 0xF) ? HREG(81) : 0) == 3) {
|
||||
medR = MEDIAN3(temp_s0[0], temp_s0[1], temp_s0[2]);
|
||||
medG = MEDIAN3(temp_s1[0], temp_s1[1], temp_s1[2]);
|
||||
medB = MEDIAN3(temp_s2[0], temp_s2[1], temp_s2[2]);
|
||||
osSyncPrintf("red=%3d %3d %3d %3d grn=%3d %3d %3d %3d blu=%3d %3d %3d %3d \n", temp_s0[0],
|
||||
temp_s0[1], temp_s0[2], medR, temp_s1[0], temp_s1[1], temp_s1[2], medG, temp_s2[0],
|
||||
temp_s2[1], temp_s2[2], medB);
|
||||
}
|
||||
if (((HREG(80) == 0xF) ? HREG(81) : 0) == 1) {
|
||||
pxR = MEDIAN3(temp_s0[0], temp_s0[1], temp_s0[2]);
|
||||
pxG = MEDIAN3(temp_s1[0], temp_s1[1], temp_s1[2]);
|
||||
pxB = MEDIAN3(temp_s2[0], temp_s2[1], temp_s2[2]);
|
||||
} else {
|
||||
pxR = MEDIAN3(temp_s0[0], temp_s0[1], temp_s0[2]);
|
||||
pxG = MEDIAN3(temp_s1[0], temp_s1[1], temp_s1[2]);
|
||||
pxB = MEDIAN3(temp_s2[0], temp_s2[1], temp_s2[2]);
|
||||
}
|
||||
}
|
||||
pxOut.r = pxR;
|
||||
pxOut.g = pxG;
|
||||
pxOut.b = pxB;
|
||||
pxOut.a = 1;
|
||||
}
|
||||
this->fbufSave[x + y * this->width] = pxOut.rgba;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_800C2500.s")
|
||||
#endif
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/PreRender/func_800C2FE4.s")
|
||||
#endif
|
||||
|
||||
void PreRender_Calc(PreRenderContext* this) {
|
||||
s32 x;
|
||||
s32 y;
|
||||
|
||||
if (!this->cvgSave || !this->fbufSave) {
|
||||
return;
|
||||
}
|
||||
if ((this->cvgSave != NULL) && (this->fbufSave != NULL)) {
|
||||
|
||||
for (y = 0; y < this->height; y++) {
|
||||
for (x = 0; x < this->width; x++) {
|
||||
s32 a = this->cvgSave[x + y * this->width];
|
||||
a >>= 5;
|
||||
a++;
|
||||
if (a != 8) {
|
||||
func_800C2500(this, x, y);
|
||||
for (y = 0; y < this->height; y++) {
|
||||
for (x = 0; x < this->width; x++) {
|
||||
s32 a = this->cvgSave[x + y * this->width];
|
||||
a >>= 5;
|
||||
a++;
|
||||
if (a != 8) {
|
||||
func_800C2500(this, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (HREG(80) == 0xF ? HREG(81) : 0) {
|
||||
func_800C2FE4(this);
|
||||
if (HREG(80) == 0xF ? HREG(81) : 0) {
|
||||
func_800C2FE4(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos);
|
||||
}
|
||||
|
||||
|
||||
if (this->touchedPoly && (this->hitActor != NULL)) {
|
||||
this->hitActor->flags &= ~0x8000;
|
||||
this->hitActor = NULL;
|
||||
|
|
|
@ -26,15 +26,17 @@ void EnButte_TransformIntoFairy(EnButte* this, GlobalContext* globalCtx);
|
|||
void EnButte_SetupWaitToDie(EnButte* this);
|
||||
void EnButte_WaitToDie(EnButte* this, GlobalContext* globalCtx);
|
||||
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[] = { { {
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xFFCFFFFF, 0x000, 0x00 },
|
||||
TOUCH_NONE,
|
||||
BUMP_NONE,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 0, { { 0, 0, 0 }, 5 }, 100 } } };
|
||||
static ColliderJntSphElementInit sJntSphElementsInit[] = {
|
||||
{ {
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xFFCFFFFF, 0x000, 0x00 },
|
||||
TOUCH_NONE,
|
||||
BUMP_NONE,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 0, { { 0, 0, 0 }, 5 }, 100 } },
|
||||
};
|
||||
static ColliderJntSphInit sColliderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
|
|
Loading…
Reference in a new issue