.include "macros.inc" .section .data .global lbl_803F0C90 lbl_803F0C90: .incbin "baserom.dol", 0x3EDC90, 0x20 .section .text, "ax" .global GXSetFog GXSetFog: /* 8037BBFC 00378B5C 7C 08 02 A6 */ mflr r0 /* 8037BC00 00378B60 FC 04 18 00 */ fcmpu cr0, f4, f3 /* 8037BC04 00378B64 90 01 00 04 */ stw r0, 4(r1) /* 8037BC08 00378B68 94 21 FF B8 */ stwu r1, -0x48(r1) /* 8037BC0C 00378B6C 93 E1 00 44 */ stw r31, 0x44(r1) /* 8037BC10 00378B70 3B E3 00 00 */ addi r31, r3, 0 /* 8037BC14 00378B74 93 C1 00 40 */ stw r30, 0x40(r1) /* 8037BC18 00378B78 93 A1 00 3C */ stw r29, 0x3c(r1) /* 8037BC1C 00378B7C 3B A4 00 00 */ addi r29, r4, 0 /* 8037BC20 00378B80 41 82 00 0C */ beq lbl_8037BC2C /* 8037BC24 00378B84 FC 02 08 00 */ fcmpu cr0, f2, f1 /* 8037BC28 00378B88 40 82 00 14 */ bne lbl_8037BC3C lbl_8037BC2C: /* 8037BC2C 00378B8C C0 62 CE 98 */ lfs f3, lbl_805AEBB8@sda21(r2) /* 8037BC30 00378B90 C0 82 CE 9C */ lfs f4, lbl_805AEBBC@sda21(r2) /* 8037BC34 00378B94 FC A0 18 90 */ fmr f5, f3 /* 8037BC38 00378B98 48 00 00 20 */ b lbl_8037BC58 lbl_8037BC3C: /* 8037BC3C 00378B9C EC 04 18 28 */ fsubs f0, f4, f3 /* 8037BC40 00378BA0 EC A2 08 28 */ fsubs f5, f2, f1 /* 8037BC44 00378BA4 EC 44 00 F2 */ fmuls f2, f4, f3 /* 8037BC48 00378BA8 EC 84 00 24 */ fdivs f4, f4, f0 /* 8037BC4C 00378BAC EC 00 01 72 */ fmuls f0, f0, f5 /* 8037BC50 00378BB0 EC A1 28 24 */ fdivs f5, f1, f5 /* 8037BC54 00378BB4 EC 62 00 24 */ fdivs f3, f2, f0 lbl_8037BC58: /* 8037BC58 00378BB8 C0 22 CE 9C */ lfs f1, lbl_805AEBBC@sda21(r2) /* 8037BC5C 00378BBC 38 60 00 00 */ li r3, 0 /* 8037BC60 00378BC0 C8 02 CE A0 */ lfd f0, lbl_805AEBC0@sda21(r2) /* 8037BC64 00378BC4 48 00 00 0C */ b lbl_8037BC70 lbl_8037BC68: /* 8037BC68 00378BC8 EC 84 00 72 */ fmuls f4, f4, f1 /* 8037BC6C 00378BCC 38 63 00 01 */ addi r3, r3, 1 lbl_8037BC70: /* 8037BC70 00378BD0 FC 04 00 40 */ fcmpo cr0, f4, f0 /* 8037BC74 00378BD4 41 81 FF F4 */ bgt lbl_8037BC68 /* 8037BC78 00378BD8 C8 02 CE B0 */ lfd f0, lbl_805AEBD0@sda21(r2) /* 8037BC7C 00378BDC C0 42 CE A8 */ lfs f2, lbl_805AEBC8@sda21(r2) /* 8037BC80 00378BE0 C0 22 CE 98 */ lfs f1, lbl_805AEBB8@sda21(r2) /* 8037BC84 00378BE4 48 00 00 0C */ b lbl_8037BC90 lbl_8037BC88: /* 8037BC88 00378BE8 EC 84 00 B2 */ fmuls f4, f4, f2 /* 8037BC8C 00378BEC 38 63 FF FF */ addi r3, r3, -1 lbl_8037BC90: /* 8037BC90 00378BF0 FC 04 08 40 */ fcmpo cr0, f4, f1 /* 8037BC94 00378BF4 40 81 00 0C */ ble lbl_8037BCA0 /* 8037BC98 00378BF8 FC 04 00 40 */ fcmpo cr0, f4, f0 /* 8037BC9C 00378BFC 41 80 FF EC */ blt lbl_8037BC88 lbl_8037BCA0: /* 8037BCA0 00378C00 3B C3 00 01 */ addi r30, r3, 1 /* 8037BCA4 00378C04 C0 02 CE B8 */ lfs f0, lbl_805AEBD8@sda21(r2) /* 8037BCA8 00378C08 38 00 00 01 */ li r0, 1 /* 8037BCAC 00378C0C C8 42 CE C0 */ lfd f2, lbl_805AEBE0@sda21(r2) /* 8037BCB0 00378C10 7C 00 F0 30 */ slw r0, r0, r30 /* 8037BCB4 00378C14 EC 20 01 32 */ fmuls f1, f0, f4 /* 8037BCB8 00378C18 6C 03 80 00 */ xoris r3, r0, 0x8000 /* 8037BCBC 00378C1C D0 A1 00 28 */ stfs f5, 0x28(r1) /* 8037BCC0 00378C20 3C 00 43 30 */ lis r0, 0x4330 /* 8037BCC4 00378C24 90 61 00 34 */ stw r3, 0x34(r1) /* 8037BCC8 00378C28 90 01 00 30 */ stw r0, 0x30(r1) /* 8037BCCC 00378C2C C8 01 00 30 */ lfd f0, 0x30(r1) /* 8037BCD0 00378C30 EC 00 10 28 */ fsubs f0, f0, f2 /* 8037BCD4 00378C34 EC 03 00 24 */ fdivs f0, f3, f0 /* 8037BCD8 00378C38 D0 01 00 2C */ stfs f0, 0x2c(r1) /* 8037BCDC 00378C3C 48 00 DC 79 */ bl __cvt_fp2unsigned /* 8037BCE0 00378C40 80 01 00 2C */ lwz r0, 0x2c(r1) /* 8037BCE4 00378C44 54 69 02 3E */ clrlwi r9, r3, 8 /* 8037BCE8 00378C48 88 DD 00 01 */ lbz r6, 1(r29) /* 8037BCEC 00378C4C 57 C8 02 3E */ clrlwi r8, r30, 8 /* 8037BCF0 00378C50 54 04 A3 68 */ rlwinm r4, r0, 0x14, 0xd, 0x14 /* 8037BCF4 00378C54 50 04 A5 7E */ rlwimi r4, r0, 0x14, 0x15, 0x1f /* 8037BCF8 00378C58 89 7D 00 02 */ lbz r11, 2(r29) /* 8037BCFC 00378C5C 54 00 A3 18 */ rlwinm r0, r0, 0x14, 0xc, 0xc /* 8037BD00 00378C60 88 BD 00 00 */ lbz r5, 0(r29) /* 8037BD04 00378C64 50 80 03 7E */ rlwimi r0, r4, 0, 0xd, 0x1f /* 8037BD08 00378C68 81 81 00 28 */ lwz r12, 0x28(r1) /* 8037BD0C 00378C6C 54 07 02 3E */ clrlwi r7, r0, 8 /* 8037BD10 00378C70 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) /* 8037BD14 00378C74 64 EA EE 00 */ oris r10, r7, 0xee00 /* 8037BD18 00378C78 38 00 00 61 */ li r0, 0x61 /* 8037BD1C 00378C7C 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037BD20 00378C80 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BD24 00378C84 65 27 EF 00 */ oris r7, r9, 0xef00 /* 8037BD28 00378C88 54 C6 40 2E */ slwi r6, r6, 8 /* 8037BD2C 00378C8C 91 44 80 00 */ stw r10, 0xCC008000@l(r4) /* 8037BD30 00378C90 55 8A A3 68 */ rlwinm r10, r12, 0x14, 0xd, 0x14 /* 8037BD34 00378C94 51 8A A5 7E */ rlwimi r10, r12, 0x14, 0x15, 0x1f /* 8037BD38 00378C98 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BD3C 00378C9C 55 89 A3 18 */ rlwinm r9, r12, 0x14, 0xc, 0xc /* 8037BD40 00378CA0 51 49 03 7E */ rlwimi r9, r10, 0, 0xd, 0x1f /* 8037BD44 00378CA4 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) /* 8037BD48 00378CA8 65 07 F0 00 */ oris r7, r8, 0xf000 /* 8037BD4C 00378CAC 51 66 06 3E */ rlwimi r6, r11, 0, 0x18, 0x1f /* 8037BD50 00378CB0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BD54 00378CB4 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) /* 8037BD58 00378CB8 57 E7 A8 14 */ slwi r7, r31, 0x15 /* 8037BD5C 00378CBC 51 27 03 3E */ rlwimi r7, r9, 0, 0xc, 0x1f /* 8037BD60 00378CC0 54 E7 02 3E */ clrlwi r7, r7, 8 /* 8037BD64 00378CC4 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BD68 00378CC8 64 E7 F1 00 */ oris r7, r7, 0xf100 /* 8037BD6C 00378CCC 90 E4 80 00 */ stw r7, 0xCC008000@l(r4) /* 8037BD70 00378CD0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BD74 00378CD4 54 A0 80 1E */ slwi r0, r5, 0x10 /* 8037BD78 00378CD8 50 C0 04 3E */ rlwimi r0, r6, 0, 0x10, 0x1f /* 8037BD7C 00378CDC 54 00 02 3E */ clrlwi r0, r0, 8 /* 8037BD80 00378CE0 64 00 F2 00 */ oris r0, r0, 0xf200 /* 8037BD84 00378CE4 90 04 80 00 */ stw r0, 0xCC008000@l(r4) /* 8037BD88 00378CE8 38 00 00 00 */ li r0, 0 /* 8037BD8C 00378CEC B0 03 00 02 */ sth r0, 2(r3) /* 8037BD90 00378CF0 80 01 00 4C */ lwz r0, 0x4c(r1) /* 8037BD94 00378CF4 83 E1 00 44 */ lwz r31, 0x44(r1) /* 8037BD98 00378CF8 83 C1 00 40 */ lwz r30, 0x40(r1) /* 8037BD9C 00378CFC 83 A1 00 3C */ lwz r29, 0x3c(r1) /* 8037BDA0 00378D00 38 21 00 48 */ addi r1, r1, 0x48 /* 8037BDA4 00378D04 7C 08 03 A6 */ mtlr r0 /* 8037BDA8 00378D08 4E 80 00 20 */ blr .global GXSetFogRangeAdj GXSetFogRangeAdj: /* 8037BDAC 00378D0C 54 60 06 3F */ clrlwi. r0, r3, 0x18 /* 8037BDB0 00378D10 41 82 00 C0 */ beq lbl_8037BE70 /* 8037BDB4 00378D14 A1 05 00 02 */ lhz r8, 2(r5) /* 8037BDB8 00378D18 38 00 00 61 */ li r0, 0x61 /* 8037BDBC 00378D1C A1 45 00 00 */ lhz r10, 0(r5) /* 8037BDC0 00378D20 3C C0 CC 01 */ lis r6, 0xCC008000@ha /* 8037BDC4 00378D24 55 08 60 26 */ slwi r8, r8, 0xc /* 8037BDC8 00378D28 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f /* 8037BDCC 00378D2C 98 06 80 00 */ stb r0, 0xCC008000@l(r6) /* 8037BDD0 00378D30 38 E0 00 E9 */ li r7, 0xe9 /* 8037BDD4 00378D34 55 09 02 3E */ clrlwi r9, r8, 8 /* 8037BDD8 00378D38 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 /* 8037BDDC 00378D3C 91 26 80 00 */ stw r9, 0xCC008000@l(r6) /* 8037BDE0 00378D40 38 E0 00 EA */ li r7, 0xea /* 8037BDE4 00378D44 54 E9 C0 0E */ slwi r9, r7, 0x18 /* 8037BDE8 00378D48 A5 45 00 04 */ lhzu r10, 4(r5) /* 8037BDEC 00378D4C 38 E0 00 EB */ li r7, 0xeb /* 8037BDF0 00378D50 A1 05 00 02 */ lhz r8, 2(r5) /* 8037BDF4 00378D54 55 08 60 26 */ slwi r8, r8, 0xc /* 8037BDF8 00378D58 98 06 80 00 */ stb r0, 0xCC008000@l(r6) /* 8037BDFC 00378D5C 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f /* 8037BE00 00378D60 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f /* 8037BE04 00378D64 91 26 80 00 */ stw r9, 0xCC008000@l(r6) /* 8037BE08 00378D68 54 E9 C0 0E */ slwi r9, r7, 0x18 /* 8037BE0C 00378D6C 38 E0 00 EC */ li r7, 0xec /* 8037BE10 00378D70 A1 05 00 06 */ lhz r8, 6(r5) /* 8037BE14 00378D74 A1 45 00 04 */ lhz r10, 4(r5) /* 8037BE18 00378D78 55 08 60 26 */ slwi r8, r8, 0xc /* 8037BE1C 00378D7C 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f /* 8037BE20 00378D80 98 06 80 00 */ stb r0, 0xCC008000@l(r6) /* 8037BE24 00378D84 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f /* 8037BE28 00378D88 91 26 80 00 */ stw r9, 0xCC008000@l(r6) /* 8037BE2C 00378D8C 54 E9 C0 0E */ slwi r9, r7, 0x18 /* 8037BE30 00378D90 38 E0 00 ED */ li r7, 0xed /* 8037BE34 00378D94 A1 05 00 0A */ lhz r8, 0xa(r5) /* 8037BE38 00378D98 A1 45 00 08 */ lhz r10, 8(r5) /* 8037BE3C 00378D9C 55 08 60 26 */ slwi r8, r8, 0xc /* 8037BE40 00378DA0 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f /* 8037BE44 00378DA4 98 06 80 00 */ stb r0, 0xCC008000@l(r6) /* 8037BE48 00378DA8 51 09 02 3E */ rlwimi r9, r8, 0, 8, 0x1f /* 8037BE4C 00378DAC 91 26 80 00 */ stw r9, 0xCC008000@l(r6) /* 8037BE50 00378DB0 A1 05 00 0E */ lhz r8, 0xe(r5) /* 8037BE54 00378DB4 A1 45 00 0C */ lhz r10, 0xc(r5) /* 8037BE58 00378DB8 55 08 60 26 */ slwi r8, r8, 0xc /* 8037BE5C 00378DBC 51 48 05 3E */ rlwimi r8, r10, 0, 0x14, 0x1f /* 8037BE60 00378DC0 98 06 80 00 */ stb r0, 0xCC008000@l(r6) /* 8037BE64 00378DC4 55 09 02 3E */ clrlwi r9, r8, 8 /* 8037BE68 00378DC8 50 E9 C0 0E */ rlwimi r9, r7, 0x18, 0, 7 /* 8037BE6C 00378DCC 91 26 80 00 */ stw r9, 0xCC008000@l(r6) lbl_8037BE70: /* 8037BE70 00378DD0 54 85 04 3E */ clrlwi r5, r4, 0x10 /* 8037BE74 00378DD4 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) /* 8037BE78 00378DD8 38 05 01 56 */ addi r0, r5, 0x156 /* 8037BE7C 00378DDC 54 05 05 A8 */ rlwinm r5, r0, 0, 0x16, 0x14 /* 8037BE80 00378DE0 54 60 53 AA */ rlwinm r0, r3, 0xa, 0xe, 0x15 /* 8037BE84 00378DE4 7C A0 03 78 */ or r0, r5, r0 /* 8037BE88 00378DE8 54 05 02 3E */ clrlwi r5, r0, 8 /* 8037BE8C 00378DEC 38 00 00 61 */ li r0, 0x61 /* 8037BE90 00378DF0 3C 60 CC 01 */ lis r3, 0xCC008000@ha /* 8037BE94 00378DF4 98 03 80 00 */ stb r0, 0xCC008000@l(r3) /* 8037BE98 00378DF8 64 A5 E8 00 */ oris r5, r5, 0xe800 /* 8037BE9C 00378DFC 38 00 00 00 */ li r0, 0 /* 8037BEA0 00378E00 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) /* 8037BEA4 00378E04 B0 04 00 02 */ sth r0, 2(r4) /* 8037BEA8 00378E08 4E 80 00 20 */ blr .global GXSetBlendMode GXSetBlendMode: /* 8037BEAC 00378E0C 81 02 CE 08 */ lwz r8, lbl_805AEB28@sda21(r2) /* 8037BEB0 00378E10 20 03 00 03 */ subfic r0, r3, 3 /* 8037BEB4 00378E14 7C 07 00 34 */ cntlzw r7, r0 /* 8037BEB8 00378E18 20 03 00 02 */ subfic r0, r3, 2 /* 8037BEBC 00378E1C 81 28 01 D0 */ lwz r9, 0x1d0(r8) /* 8037BEC0 00378E20 50 E9 35 28 */ rlwimi r9, r7, 6, 0x14, 0x14 /* 8037BEC4 00378E24 38 E9 00 00 */ addi r7, r9, 0 /* 8037BEC8 00378E28 50 67 07 FE */ rlwimi r7, r3, 0, 0x1f, 0x1f /* 8037BECC 00378E2C 7C 00 00 34 */ cntlzw r0, r0 /* 8037BED0 00378E30 50 07 E7 BC */ rlwimi r7, r0, 0x1c, 0x1e, 0x1e /* 8037BED4 00378E34 50 C7 64 26 */ rlwimi r7, r6, 0xc, 0x10, 0x13 /* 8037BED8 00378E38 50 87 45 6E */ rlwimi r7, r4, 8, 0x15, 0x17 /* 8037BEDC 00378E3C 38 00 00 61 */ li r0, 0x61 /* 8037BEE0 00378E40 3C 60 CC 01 */ lis r3, 0xCC008000@ha /* 8037BEE4 00378E44 98 03 80 00 */ stb r0, 0xCC008000@l(r3) /* 8037BEE8 00378E48 50 A7 2E 34 */ rlwimi r7, r5, 5, 0x18, 0x1a /* 8037BEEC 00378E4C 38 00 00 00 */ li r0, 0 /* 8037BEF0 00378E50 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) /* 8037BEF4 00378E54 90 E8 01 D0 */ stw r7, 0x1d0(r8) /* 8037BEF8 00378E58 B0 08 00 02 */ sth r0, 2(r8) /* 8037BEFC 00378E5C 4E 80 00 20 */ blr .global GXSetColorUpdate GXSetColorUpdate: /* 8037BF00 00378E60 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) /* 8037BF04 00378E64 38 00 00 61 */ li r0, 0x61 /* 8037BF08 00378E68 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037BF0C 00378E6C 80 C5 01 D0 */ lwz r6, 0x1d0(r5) /* 8037BF10 00378E70 50 66 1F 38 */ rlwimi r6, r3, 3, 0x1c, 0x1c /* 8037BF14 00378E74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BF18 00378E78 38 00 00 00 */ li r0, 0 /* 8037BF1C 00378E7C 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) /* 8037BF20 00378E80 90 C5 01 D0 */ stw r6, 0x1d0(r5) /* 8037BF24 00378E84 B0 05 00 02 */ sth r0, 2(r5) /* 8037BF28 00378E88 4E 80 00 20 */ blr .global GXSetAlphaUpdate GXSetAlphaUpdate: /* 8037BF2C 00378E8C 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) /* 8037BF30 00378E90 38 00 00 61 */ li r0, 0x61 /* 8037BF34 00378E94 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037BF38 00378E98 80 C5 01 D0 */ lwz r6, 0x1d0(r5) /* 8037BF3C 00378E9C 50 66 26 F6 */ rlwimi r6, r3, 4, 0x1b, 0x1b /* 8037BF40 00378EA0 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037BF44 00378EA4 38 00 00 00 */ li r0, 0 /* 8037BF48 00378EA8 90 C4 80 00 */ stw r6, 0xCC008000@l(r4) /* 8037BF4C 00378EAC 90 C5 01 D0 */ stw r6, 0x1d0(r5) /* 8037BF50 00378EB0 B0 05 00 02 */ sth r0, 2(r5) /* 8037BF54 00378EB4 4E 80 00 20 */ blr .global GXSetZMode GXSetZMode: /* 8037BF58 00378EB8 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) /* 8037BF5C 00378EBC 38 00 00 61 */ li r0, 0x61 /* 8037BF60 00378EC0 80 E6 01 D8 */ lwz r7, 0x1d8(r6) /* 8037BF64 00378EC4 50 67 07 FE */ rlwimi r7, r3, 0, 0x1f, 0x1f /* 8037BF68 00378EC8 3C 60 CC 01 */ lis r3, 0xCC008000@ha /* 8037BF6C 00378ECC 98 03 80 00 */ stb r0, 0xCC008000@l(r3) /* 8037BF70 00378ED0 50 87 0F 3C */ rlwimi r7, r4, 1, 0x1c, 0x1e /* 8037BF74 00378ED4 50 A7 26 F6 */ rlwimi r7, r5, 4, 0x1b, 0x1b /* 8037BF78 00378ED8 90 E3 80 00 */ stw r7, 0xCC008000@l(r3) /* 8037BF7C 00378EDC 38 00 00 00 */ li r0, 0 /* 8037BF80 00378EE0 90 E6 01 D8 */ stw r7, 0x1d8(r6) /* 8037BF84 00378EE4 B0 06 00 02 */ sth r0, 2(r6) /* 8037BF88 00378EE8 4E 80 00 20 */ blr .global GXSetZCompLoc GXSetZCompLoc: /* 8037BF8C 00378EEC 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) /* 8037BF90 00378EF0 54 60 34 B2 */ rlwinm r0, r3, 6, 0x12, 0x19 /* 8037BF94 00378EF4 38 60 00 61 */ li r3, 0x61 /* 8037BF98 00378EF8 80 A6 01 DC */ lwz r5, 0x1dc(r6) /* 8037BF9C 00378EFC 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037BFA0 00378F00 54 A5 06 B0 */ rlwinm r5, r5, 0, 0x1a, 0x18 /* 8037BFA4 00378F04 7C A0 03 78 */ or r0, r5, r0 /* 8037BFA8 00378F08 90 06 01 DC */ stw r0, 0x1dc(r6) /* 8037BFAC 00378F0C 38 00 00 00 */ li r0, 0 /* 8037BFB0 00378F10 98 64 80 00 */ stb r3, 0xCC008000@l(r4) /* 8037BFB4 00378F14 80 66 01 DC */ lwz r3, 0x1dc(r6) /* 8037BFB8 00378F18 90 64 80 00 */ stw r3, 0xCC008000@l(r4) /* 8037BFBC 00378F1C B0 06 00 02 */ sth r0, 2(r6) /* 8037BFC0 00378F20 4E 80 00 20 */ blr .global GXSetPixelFmt GXSetPixelFmt: /* 8037BFC4 00378F24 80 E2 CE 08 */ lwz r7, lbl_805AEB28@sda21(r2) /* 8037BFC8 00378F28 3C A0 80 3F */ lis r5, lbl_803F0C90@ha /* 8037BFCC 00378F2C 54 66 10 3A */ slwi r6, r3, 2 /* 8037BFD0 00378F30 38 05 0C 90 */ addi r0, r5, lbl_803F0C90@l /* 8037BFD4 00378F34 81 07 01 DC */ lwz r8, 0x1dc(r7) /* 8037BFD8 00378F38 7D 40 32 14 */ add r10, r0, r6 /* 8037BFDC 00378F3C 80 AA 00 00 */ lwz r5, 0(r10) /* 8037BFE0 00378F40 55 06 00 38 */ rlwinm r6, r8, 0, 0, 0x1c /* 8037BFE4 00378F44 54 80 18 38 */ slwi r0, r4, 3 /* 8037BFE8 00378F48 7C C4 2B 78 */ or r4, r6, r5 /* 8037BFEC 00378F4C 90 87 01 DC */ stw r4, 0x1dc(r7) /* 8037BFF0 00378F50 80 87 01 DC */ lwz r4, 0x1dc(r7) /* 8037BFF4 00378F54 54 84 07 72 */ rlwinm r4, r4, 0, 0x1d, 0x19 /* 8037BFF8 00378F58 7C 80 03 78 */ or r0, r4, r0 /* 8037BFFC 00378F5C 90 07 01 DC */ stw r0, 0x1dc(r7) /* 8037C000 00378F60 80 A7 01 DC */ lwz r5, 0x1dc(r7) /* 8037C004 00378F64 7C 08 28 40 */ cmplw r8, r5 /* 8037C008 00378F68 41 82 00 4C */ beq lbl_8037C054 /* 8037C00C 00378F6C 38 00 00 61 */ li r0, 0x61 /* 8037C010 00378F70 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037C014 00378F74 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037C018 00378F78 2C 03 00 02 */ cmpwi r3, 2 /* 8037C01C 00378F7C 90 A4 80 00 */ stw r5, 0xCC008000@l(r4) /* 8037C020 00378F80 40 82 00 0C */ bne lbl_8037C02C /* 8037C024 00378F84 38 00 00 01 */ li r0, 1 /* 8037C028 00378F88 48 00 00 08 */ b lbl_8037C030 lbl_8037C02C: /* 8037C02C 00378F8C 38 00 00 00 */ li r0, 0 lbl_8037C030: /* 8037C030 00378F90 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) /* 8037C034 00378F94 54 00 4B EC */ rlwinm r0, r0, 9, 0xf, 0x16 /* 8037C038 00378F98 80 85 02 04 */ lwz r4, 0x204(r5) /* 8037C03C 00378F9C 54 84 05 EA */ rlwinm r4, r4, 0, 0x17, 0x15 /* 8037C040 00378FA0 7C 80 03 78 */ or r0, r4, r0 /* 8037C044 00378FA4 90 05 02 04 */ stw r0, 0x204(r5) /* 8037C048 00378FA8 80 05 04 F4 */ lwz r0, 0x4f4(r5) /* 8037C04C 00378FAC 60 00 00 04 */ ori r0, r0, 4 /* 8037C050 00378FB0 90 05 04 F4 */ stw r0, 0x4f4(r5) lbl_8037C054: /* 8037C054 00378FB4 80 0A 00 00 */ lwz r0, 0(r10) /* 8037C058 00378FB8 28 00 00 04 */ cmplwi r0, 4 /* 8037C05C 00378FBC 40 82 00 40 */ bne lbl_8037C09C /* 8037C060 00378FC0 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) /* 8037C064 00378FC4 38 63 FF FC */ addi r3, r3, -4 /* 8037C068 00378FC8 38 00 00 61 */ li r0, 0x61 /* 8037C06C 00378FCC 80 85 01 D4 */ lwz r4, 0x1d4(r5) /* 8037C070 00378FD0 54 84 05 E8 */ rlwinm r4, r4, 0, 0x17, 0x14 /* 8037C074 00378FD4 50 64 4D 6C */ rlwimi r4, r3, 9, 0x15, 0x16 /* 8037C078 00378FD8 90 85 01 D4 */ stw r4, 0x1d4(r5) /* 8037C07C 00378FDC 3C 60 CC 01 */ lis r3, 0xCC008000@ha /* 8037C080 00378FE0 80 85 01 D4 */ lwz r4, 0x1d4(r5) /* 8037C084 00378FE4 54 84 02 3E */ clrlwi r4, r4, 8 /* 8037C088 00378FE8 64 84 42 00 */ oris r4, r4, 0x4200 /* 8037C08C 00378FEC 90 85 01 D4 */ stw r4, 0x1d4(r5) /* 8037C090 00378FF0 98 03 80 00 */ stb r0, 0xCC008000@l(r3) /* 8037C094 00378FF4 80 05 01 D4 */ lwz r0, 0x1d4(r5) /* 8037C098 00378FF8 90 03 80 00 */ stw r0, 0xCC008000@l(r3) lbl_8037C09C: /* 8037C09C 00378FFC 80 62 CE 08 */ lwz r3, lbl_805AEB28@sda21(r2) /* 8037C0A0 00379000 38 00 00 00 */ li r0, 0 /* 8037C0A4 00379004 B0 03 00 02 */ sth r0, 2(r3) /* 8037C0A8 00379008 4E 80 00 20 */ blr .global GXSetDither GXSetDither: /* 8037C0AC 0037900C 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) /* 8037C0B0 00379010 38 00 00 61 */ li r0, 0x61 /* 8037C0B4 00379014 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037C0B8 00379018 80 A6 01 D0 */ lwz r5, 0x1d0(r6) /* 8037C0BC 0037901C 54 63 15 BA */ rlwinm r3, r3, 2, 0x16, 0x1d /* 8037C0C0 00379020 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c /* 8037C0C4 00379024 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037C0C8 00379028 7C A3 1B 78 */ or r3, r5, r3 /* 8037C0CC 0037902C 90 64 80 00 */ stw r3, 0xCC008000@l(r4) /* 8037C0D0 00379030 38 00 00 00 */ li r0, 0 /* 8037C0D4 00379034 90 66 01 D0 */ stw r3, 0x1d0(r6) /* 8037C0D8 00379038 B0 06 00 02 */ sth r0, 2(r6) /* 8037C0DC 0037903C 4E 80 00 20 */ blr .global GXSetDstAlpha GXSetDstAlpha: /* 8037C0E0 00379040 80 C2 CE 08 */ lwz r6, lbl_805AEB28@sda21(r2) /* 8037C0E4 00379044 54 85 06 3E */ clrlwi r5, r4, 0x18 /* 8037C0E8 00379048 38 00 00 61 */ li r0, 0x61 /* 8037C0EC 0037904C 80 E6 01 D4 */ lwz r7, 0x1d4(r6) /* 8037C0F0 00379050 3C 80 CC 01 */ lis r4, 0xCC008000@ha /* 8037C0F4 00379054 50 A7 06 3E */ rlwimi r7, r5, 0, 0x18, 0x1f /* 8037C0F8 00379058 98 04 80 00 */ stb r0, 0xCC008000@l(r4) /* 8037C0FC 0037905C 54 60 06 3E */ clrlwi r0, r3, 0x18 /* 8037C100 00379060 38 67 00 00 */ addi r3, r7, 0 /* 8037C104 00379064 50 03 45 EE */ rlwimi r3, r0, 8, 0x17, 0x17 /* 8037C108 00379068 90 64 80 00 */ stw r3, 0xCC008000@l(r4) /* 8037C10C 0037906C 38 00 00 00 */ li r0, 0 /* 8037C110 00379070 90 66 01 D4 */ stw r3, 0x1d4(r6) /* 8037C114 00379074 B0 06 00 02 */ sth r0, 2(r6) /* 8037C118 00379078 4E 80 00 20 */ blr .global GXSetFieldMask GXSetFieldMask: /* 8037C11C 0037907C 54 80 06 3E */ clrlwi r0, r4, 0x18 /* 8037C120 00379080 80 82 CE 08 */ lwz r4, lbl_805AEB28@sda21(r2) /* 8037C124 00379084 54 05 07 FA */ rlwinm r5, r0, 0, 0x1f, 0x1d /* 8037C128 00379088 54 60 0D FC */ rlwinm r0, r3, 1, 0x17, 0x1e /* 8037C12C 0037908C 7C A0 03 78 */ or r0, r5, r0 /* 8037C130 00379090 54 05 02 3E */ clrlwi r5, r0, 8 /* 8037C134 00379094 38 00 00 61 */ li r0, 0x61 /* 8037C138 00379098 3C 60 CC 01 */ lis r3, 0xCC008000@ha /* 8037C13C 0037909C 98 03 80 00 */ stb r0, 0xCC008000@l(r3) /* 8037C140 003790A0 64 A5 44 00 */ oris r5, r5, 0x4400 /* 8037C144 003790A4 38 00 00 00 */ li r0, 0 /* 8037C148 003790A8 90 A3 80 00 */ stw r5, 0xCC008000@l(r3) /* 8037C14C 003790AC B0 04 00 02 */ sth r0, 2(r4) /* 8037C150 003790B0 4E 80 00 20 */ blr .global GXSetFieldMode GXSetFieldMode: /* 8037C154 003790B4 7C 08 02 A6 */ mflr r0 /* 8037C158 003790B8 90 01 00 04 */ stw r0, 4(r1) /* 8037C15C 003790BC 54 80 B0 92 */ rlwinm r0, r4, 0x16, 2, 9 /* 8037C160 003790C0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8037C164 003790C4 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8037C168 003790C8 3F E0 CC 01 */ lis r31, 0xCC008000@ha /* 8037C16C 003790CC 93 C1 00 18 */ stw r30, 0x18(r1) /* 8037C170 003790D0 3B C0 00 61 */ li r30, 0x61 /* 8037C174 003790D4 93 A1 00 14 */ stw r29, 0x14(r1) /* 8037C178 003790D8 7C 7D 1B 78 */ mr r29, r3 /* 8037C17C 003790DC 80 A2 CE 08 */ lwz r5, lbl_805AEB28@sda21(r2) /* 8037C180 003790E0 80 85 00 7C */ lwz r4, 0x7c(r5) /* 8037C184 003790E4 54 84 02 90 */ rlwinm r4, r4, 0, 0xa, 8 /* 8037C188 003790E8 7C 80 03 78 */ or r0, r4, r0 /* 8037C18C 003790EC 90 05 00 7C */ stw r0, 0x7c(r5) /* 8037C190 003790F0 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) /* 8037C194 003790F4 80 05 00 7C */ lwz r0, 0x7c(r5) /* 8037C198 003790F8 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) /* 8037C19C 003790FC 4B FF F2 59 */ bl __GXFlushTextureState /* 8037C1A0 00379100 57 A0 06 3E */ clrlwi r0, r29, 0x18 /* 8037C1A4 00379104 9B DF 80 00 */ stb r30, 0xCC008000@l(r31) /* 8037C1A8 00379108 64 00 68 00 */ oris r0, r0, 0x6800 /* 8037C1AC 0037910C 90 1F 80 00 */ stw r0, 0xCC008000@l(r31) /* 8037C1B0 00379110 4B FF F2 45 */ bl __GXFlushTextureState /* 8037C1B4 00379114 80 01 00 24 */ lwz r0, 0x24(r1) /* 8037C1B8 00379118 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8037C1BC 0037911C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8037C1C0 00379120 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8037C1C4 00379124 38 21 00 20 */ addi r1, r1, 0x20 /* 8037C1C8 00379128 7C 08 03 A6 */ mtlr r0 /* 8037C1CC 0037912C 4E 80 00 20 */ blr