General Information
Author: Ralf Patschke (pps)
Language: QUICK
Compiler/Interpreter: Quick
This is our little TIF2PIC converter. It needs an uncompressed and 192*160 wide TIF file named PICTURE.TIF and creates a file named PICTURE.PIC. The PIC has picture data first followed by the colors, like uncompressed MIC files.
Quick-Sourcetext P: ---------------- Length: $18EA Free : $5E81 ---------------- BYTE [ COL1=$8DF0 COL2=$8DF1 COL3=$8DF2 COLBK=$8DF3 ZEILE,SPALTE,PIXN1,PIXN2 PIX2=$8DFE PIX1=$8DFF PIXGES DMA=559 KEY=764 ] WORD [ BS=88 DL=560 ] ARRAY [ INAME(16) ONAME(16) ] MAIN PEEK(708,COL1) PEEK(709,COL2) PEEK(710,COL3) PEEK(712,COLBK) CLR(142,31) DATA ($8E00) [ 0,240,66,$8000,2,0 78,$9000 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,78,$A018 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14,14 14,14,14,14,14,14,14,14,14 0,66,$8050 65,$8E00 ] DL=$8E00 BS=$8000 CLR(128,2) POS(4,0) ?("TIF-Konverter by STARSOFT Berlin") POS(0,1) ?("beta-Version") POS(15,1) ?("(c) 8/2000") -200 POS(2,2) ?("Converting... "); ?(" ") PIXN1=0 PIXN2=0 PIX1=0 PIX2=0 PIXGES=0 *HEIKO'S ROUTINE *------------------------------------ OPEN(1,4,0,INAME) BGET(1,8,1536) ZEILE=0 REPEAT SPALTE=0 REPEAT BGET(1,2,$8DFE) IF PIX1>0 .COPYBIT1 ELSE PIXN1=0 ENDIF IF PIX2>0 .COPYBIT2 ELSE PIXN2=0 ENDIF ADD(PIXN1,PIXN2,PIXGES) .AUSGABE SPALTE+ UNTIL SPALTE=40 ZEILE+ UNTIL ZEILE=192 CLOSE(1) *------------------------------------ POS(2,2) ?("(SHIFT) 1-4 -> Color RETURN ->"); ?(" Save") DLI(DLI) .COLOR POS(2,2) ?(" "); ?(" ") POS(2,2) ?("Saving... "); ?(" ") .SAVE POS(2,2) ?("Done... press SPACE "); ?(" ") KEY=255 REPEAT UNTIL KEY=33 KEY=255 JUMP(200) ENDMAIN *------------------------------------ PROC AUSGABE WORD [ X,Y ] BEGIN X=0 Y=0 MULT(ZEILE,40,X) ADD(X,$9000,Y) ADD(Y,SPALTE,X) POKE(X,PIXGES) ENDPROC *------------------------------------ INTER DLI BEGIN PUSH POKE(53274,0) POKE(53272,148) POKE(53270,10) POKE(53271,10) SYNC(15) POKE(53270,COL1) POKE(53271,COL2) POKE(53272,COL3) POKE(53274,COLBK) SYNC(193) POKE(53274,0) POKE(53272,148) POKE(53270,10) POKE(53271,10) PULL ENDDLI *------------------------------------ PROC COPYBIT1 BEGIN IF PIX1=51 PIXN1=15 JUMP(1) ENDIF IF PIX1=19 PIXN1=7 JUMP(1) ENDIF IF PIX1=49 PIXN1=13 JUMP(1) ENDIF IF PIX1=50 PIXN1=14 JUMP(1) ENDIF IF PIX1=35 PIXN1=11 JUMP(1) ENDIF IF PIX1=48 PIXN1=12 JUMP(1) ENDIF IF PIX1=17 PIXN1=5 JUMP(1) ENDIF IF PIX1=18 PIXN1=6 JUMP(1) ENDIF IF PIX1=34 PIXN1=10 JUMP(1) ENDIF IF PIX1=16 PIXN1=4 JUMP(1) ENDIF IF PIX1=32 PIXN1=8 JUMP(1) ENDIF IF PIX1=33 PIXN1=9 JUMP(1) ENDIF IF PIX1=1 PIXN1=1 JUMP(1) ENDIF IF PIX1=2 PIXN1=2 JUMP(1) ENDIF IF PIX1=3 PIXN1=3 ENDIF -1 ENDPROC PROC COPYBIT2 BEGIN IF PIX2=51 PIXN2=240 JUMP(2) ENDIF IF PIX2=19 PIXN2=112 JUMP(2) ENDIF IF PIX2=49 PIXN2=208 JUMP(2) ENDIF IF PIX2=50 PIXN2=224 JUMP(2) ENDIF IF PIX2=3 PIXN2=48 JUMP(2) ENDIF IF PIX2=2 PIXN2=32 JUMP(2) ENDIF IF PIX2=1 PIXN2=16 JUMP(2) ENDIF IF PIX2=35 PIXN2=176 JUMP(2) ENDIF IF PIX2=48 PIXN2=192 JUMP(2) ENDIF IF PIX2=17 PIXN2=80 JUMP(2) ENDIF IF PIX2=18 PIXN2=96 JUMP(2) ENDIF IF PIX2=34 PIXN2=160 JUMP(2) ENDIF IF PIX2=16 PIXN2=64 JUMP(2) ENDIF IF PIX2=32 PIXN2=128 JUMP(2) ENDIF IF PIX2=33 PIXN2=144 ENDIF -2 ENDPROC *------------------------------------ PROC COLOR BEGIN KEY=255 REPEAT IF KEY=31 * 1 * COL1+ KEY=255 ENDIF IF KEY=95 * SHIFT-1 * COL1- KEY=255 ENDIF IF KEY=30 * 2 * COL2+ KEY=255 ENDIF IF KEY=94 * SHIFT-2 * COL2- KEY=255 ENDIF IF KEY=26 * 3 * COL3+ KEY=255 ENDIF IF KEY=90 * SHIFT-3 * COL3- KEY=255 ENDIF IF KEY=24 * 4 * COLBK+ KEY=255 ENDIF IF KEY=88 * SHIFT-4* COLBK- KEY=255 ENDIF UNTIL KEY=12 ENDPROC *------------------------------------* PROC SAVE BEGIN OPEN(1,8,0,ONAME) BPUT(1,7680,$9000) BPUT(1,1,$8DF3) BPUT(1,3,$8DF0) CLOSE(1) ENDPROC