png2rle: actually fix png2rle 4-bit mode

forgot to mask colors
This commit is contained in:
Vince Weaver 2019-07-11 14:04:32 -04:00
parent fffd403296
commit e17f3b6c02
2 changed files with 15 additions and 13 deletions

View File

@ -184,10 +184,10 @@ int loadpng(char *filename, unsigned char **image_ptr, int *xsize, int *ysize) {
}
else if (bit_depth==4) {
/* top color */
a2_color=row_pointers[y][x];
a2_color=(row_pointers[y][x])&0xf;
/* bottom color */
color=row_pointers[y+1][x];
color=(row_pointers[y+1][x])&0xf;
a2_color|=(color<<4);

View File

@ -244,17 +244,19 @@ jail4_rle: .byte $28 ; ysize=48
.byte $A0,$28,$00
.byte $A1
dome_rle: .byte $28 ; ysize=48
.byte $A8,$66, $A3,$22, $A0,$12,$00, $A3,$22, $AE,$66, $A3,$22, $A0,$16,$00
.byte $22,$22, $AC,$66, $A3,$22, $A0,$18,$00, $A3,$22, $A9,$66, $A3,$22
.byte $A0,$1A,$00, $A3,$22, $A7,$66, $A3,$22, $A0,$1C,$00, $A3,$22, $A6,$66
.byte $A3,$22, $A0,$1C,$00, $A3,$22, $A5,$66, $A3,$22, $A0,$1E,$00, $A3,$22
.byte $A4,$66, $22,$22, $A0,$20,$00, $22,$22, $A3,$66, $A3,$22, $A0,$1B,$00
.byte $77, $66, $55, $66, $00, $A3,$22, $66,$66
.byte $22,$22, $A0,$1B,$00, $22, $77, $76, $75, $76
.byte $60, $00, $22,$22, $66,$66, $22,$22, $A0,$1A,$00, $20
.byte $22,$22, $77, $66, $55, $66, $00, $22,$22
.byte $66, $A3,$22, $A0,$1A,$00, $A3,$22, $77, $66, $75
.byte $66, $00, $A6,$22, $A0,$19,$00, $A7,$22, $00,$00, $A5,$22
.byte $A7,$66, $26, $A3,$22, $A0,$12,$00, $A3,$22, $26, $AD,$66
.byte $A3,$22, $A0,$16,$00, $22,$22, $26, $AA,$66, $26, $A3,$22
.byte $A0,$18,$00, $A3,$22, $26, $A8,$66, $A3,$22, $A0,$1A,$00, $A3,$22
.byte $A7,$66, $A3,$22, $A0,$1C,$00, $A3,$22, $A5,$66, $26, $22,$22
.byte $02, $A0,$1C,$00, $02, $22,$22, $26, $A4,$66, $A3,$22
.byte $A0,$1E,$00, $A3,$22, $A3,$66, $26, $22,$22, $A0,$20,$00, $22,$22
.byte $26, $66,$66, $A3,$22, $A0,$1B,$00, $77, $66, $55
.byte $66, $00, $A3,$22, $66,$66, $22,$22, $A0,$1B,$00, $22
.byte $27, $76, $65, $56, $60, $00, $22,$22
.byte $66, $26, $22,$22, $A0,$1A,$00, $20, $22,$22, $77
.byte $66, $55, $66, $00, $22,$22, $26, $A3,$22
.byte $A0,$1A,$00, $A3,$22, $27, $26, $25, $26, $00
.byte $A5,$22, $02, $A0,$19,$00, $A7,$22, $00,$00, $02, $A4,$22
.byte $A0,$19,$00, $20, $A6,$22, $A4,$00, $A4,$22, $A0,$18,$00, $20
.byte $A7,$22, $A4,$00, $A4,$22, $A0,$17,$00, $20, $A7,$22, $A5,$00
.byte $22,$22, $A0,$11,$88, $A8,$00, $A0,$20,$88, $A8,$00, $A0,$20,$88, $A8,$00