From d3bbc8d2cbb5fcc61e9f4e282effd0f2777a5cc3 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 6 Aug 2017 02:05:09 +0300 Subject: [PATCH] remove some dead code --- pico/draw.c | 40 ----------------- pico/draw_arm.S | 113 ------------------------------------------------ 2 files changed, 153 deletions(-) diff --git a/pico/draw.c b/pico/draw.c index dbd63631..0480242f 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1197,46 +1197,6 @@ void PicoDoHighPal555(int sh) } } -#if 0 -static void FinalizeLineBGR444(int sh, int line) -{ - unsigned short *pd=DrawLineDest; - unsigned char *ps=HighCol+8; - unsigned short *pal=Pico.cram; - int len, i, t, mask=0xff; - - if (Pico.video.reg[12]&1) { - len = 320; - } else { - if(!(PicoOpt&POPT_DIS_32C_BORDER)) pd+=32; - len = 256; - } - - if(sh) { - pal=HighPal; - if(Pico.m.dirtyPal) { - blockcpy(pal, Pico.cram, 0x40*2); - // shadowed pixels - for(i = 0x3f; i >= 0; i--) - pal[0x40|i] = pal[0xc0|i] = (unsigned short)((pal[i]>>1)&0x0777); - // hilighted pixels - for(i = 0x3f; i >= 0; i--) { - t=pal[i]&0xeee;t+=0x444;if(t&0x10)t|=0xe;if(t&0x100)t|=0xe0;if(t&0x1000)t|=0xe00;t&=0xeee; - pal[0x80|i]=(unsigned short)t; - } - Pico.m.dirtyPal = 0; - } - } - - if (!sh && (rendstatus & PDRAW_SPR_LO_ON_HI)) - mask=0x3f; // accurate sprites - - for(i = 0; i < len; i++) - pd[i] = pal[ps[i] & mask]; -} -#endif - - void FinalizeLine555(int sh, int line) { unsigned short *pd=DrawLineDest; diff --git a/pico/draw_arm.S b/pico/draw_arm.S index 0bf297b9..bbdda5b0 100644 --- a/pico/draw_arm.S +++ b/pico/draw_arm.S @@ -1479,119 +1479,6 @@ DrawWindow: .endm -.global FinalizeLineBGR444 @ int sh - -FinalizeLineBGR444: - stmfd sp!, {r4-r6,lr} - mov r6, r0 - ldr lr, =(Pico+0x22228) @ Pico.video - ldr r0, =DrawLineDest - ldrb r12, [lr, #12] - ldr r0, [r0] - sub r3, lr, #0x128 @ r3=Pico.cram - - tst r12, #1 - movne r2, #320/4 @ len - bne .fl_no32colBGR444 - ldr r4, =PicoOpt - mov r2, #256/4 - ldr r4, [r4] - tst r4, #0x100 - addeq r0, r0, #32*2 - -.fl_no32colBGR444: - tst r6, r6 - beq .fl_noshBGR444 - - ldr r4, =HighPal - - ldrb r12, [lr, #-0x1a] @ 0x2220e ~ dirtyPal - tst r12, r12 - moveq r3, r4 - beq .fl_noshBGR444 - mov r12, #0 - strb r12, [lr, #-0x1a] - - mov lr, #0x40/8 - @ copy pal: -.fl_loopcpBGR444: - ldmia r3!, {r1,r5,r6,r12} - subs lr, lr, #1 - stmia r4!, {r1,r5,r6,r12} - bne .fl_loopcpBGR444 - - @ shadowed pixels: - mov r12, #0x0077 - orr r12,r12,#0x0700 - orr r12,r12,r12,lsl #16 - sub r3, r3, #0x40*2 - add r5, r4, #0x80*2 - mov lr, #0x40/4 -.fl_loopcpBGR444_sh: - ldmia r3!, {r1,r6} - subs lr, lr, #1 - and r1, r12, r1, lsr #1 - and r6, r12, r6, lsr #1 - stmia r4!, {r1,r6} - stmia r5!, {r1,r6} - bne .fl_loopcpBGR444_sh - - @ hilighted pixels: - sub r3, r3, #0x40*2 - mov lr, #0x40/2 -.fl_loopcpBGR444_hi: - ldr r1, [r3], #4 - TileDoShHi2Pixels444 r1 - str r1, [r4], #4 - subs lr, lr, #1 - bne .fl_loopcpBGR444_hi - - sub r3, r4, #0x40*3*2 - mov r6, #1 - - -.fl_noshBGR444: - ldr r12,=rendstatus - eors r6, r6, #1 @ sh is 0 - ldr r12,[r12] - mov lr, #0xff - tstne r12,#PDRAW_ACC_SPRITES - -.if OVERRIDE_HIGHCOL - ldr r1, =HighCol - movne lr, #0x3f - ldr r1, [r1] - mov lr, lr, lsl #1 - add r1, r1, #8 -.else - ldr r1, =(HighCol+8) - movne lr, #0x3f - mov lr, lr, lsl #1 -.endif - -.fl_loopBGR444: - ldr r12, [r1], #4 - subs r2, r2, #1 - - and r4, lr, r12, lsl #1 - ldrh r4, [r3, r4] - and r5, lr, r12, lsr #7 - ldrh r5, [r3, r5] - and r6, lr, r12, lsr #15 - ldrh r6, [r3, r6] - and r12,lr, r12, lsr #23 - ldrh r12,[r3, r12] @ 1c.i. - orr r4, r4, r5, lsl #16 - orr r5, r6, r12,lsl #16 - - stmia r0!, {r4,r5} - bne .fl_loopBGR444 - - - ldmfd sp!, {r4-r6,lr} - bx lr - - @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- 2.39.5