4 # (c) Copyright 2007, Grazvydas "notaz" Ignotas
13 .byte 0, 1, 6, 11, 16, 21, 26, 31 # -4
14 .byte 0, 2, 7, 12, 16, 21, 26, 31 # -3
15 .byte 0, 3, 7, 12, 17, 22, 26, 31 # -2
16 .byte 0, 4, 8, 13, 17, 22, 26, 31 # -1
18 .byte 0, 5, 10, 15, 16, 21, 26, 31 # 0
19 .byte 0, 6, 10, 15, 19, 23, 27, 31
20 .byte 0, 7, 11, 15, 19, 23, 27, 31
21 .byte 0, 8, 12, 16, 19, 23, 27, 31
22 .byte 0, 9, 12, 16, 20, 24, 27, 31
23 .byte 0, 10, 13, 17, 20, 24, 27, 31
24 .byte 0, 10, 14, 17, 21, 24, 28, 31
25 .byte 0, 11, 15, 18, 21, 24, 28, 31
26 .byte 0, 12, 15, 18, 22, 25, 28, 31
27 .byte 0, 13, 16, 19, 22, 25, 28, 31
28 .byte 0, 14, 17, 20, 22, 25, 28, 31 # 10
29 .byte 0, 15, 17, 20, 23, 26, 28, 31
30 .byte 0, 16, 18, 21, 23, 26, 28, 31
31 .byte 0, 16, 19, 21, 24, 26, 29, 31
32 .byte 0, 17, 20, 22, 24, 26, 29, 31
33 .byte 0, 18, 20, 22, 25, 27, 29, 31
34 .byte 0, 19, 21, 23, 25, 27, 29, 31 # 16
42 .global do_pal_convert # dest, src, gammaa_val, black_lvl
89 lui $t1, %hi(pal_gmtab)
90 addiu $t1, %lo(pal_gmtab)
92 beqz $a3, dpc_gma_loop
93 sb $0, 0($a2) # black level 0
94 bnez $t2, dpc_gma_loop # gamma < 0, keep black at 0
96 slt $t2, $a3, $0 # t2 = a3_orig == 1 ? 1 : 0
130 bnez $t0, dpc_gma_loop