gr-utils: fix up one of the conversion utils

This commit is contained in:
Vince Weaver 2020-10-28 00:36:59 -04:00
parent 042af882c0
commit 03509cb5cb
4 changed files with 32 additions and 5 deletions

View File

@ -9,7 +9,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
CIRCLES.BAS AUTUMN.BAS QKUMBA.BAS ASTEROID.BAS PERSON.BAS SHIP.BAS \
CONCERT.BAS NYAN.BAS RASTER.BAS RASTER2.BAS RASTER3.BAS LOTS.BAS LOAD \
RASTER4.BAS RASTER5.BAS PUMPKIN.BAS PUMPKIN_SMALL.BAS LADY.BAS \
A2.BAS FOURAM.BAS FLOPPY.BAS QR.BAS A2_4EVER.BAS RLE.BAS
A2.BAS FOURAM.BAS FLOPPY.BAS QR.BAS A2_4EVER.BAS RLE.BAS RLE2.BAS
cp empty.dsk appleiibot.dsk
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
$(DOS33) -y appleiibot.dsk SAVE A E2.BAS
@ -38,6 +38,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
$(DOS33) -y appleiibot.dsk SAVE A QR.BAS
$(DOS33) -y appleiibot.dsk SAVE A A2_4EVER.BAS
$(DOS33) -y appleiibot.dsk SAVE A RLE.BAS
$(DOS33) -y appleiibot.dsk SAVE A RLE2.BAS
###
@ -223,5 +224,10 @@ RLE.BAS: rle.bas
####
RLE2.BAS: rle2.bas
$(TOKENIZE) < rle2.bas > RLE2.BAS
####
clean:
rm -f *~ *.o *.lst convert_to convert_from convert_qkumba make_boxes convert_back LOAD *.BAS

3
appleiibot/floppy2.bas Normal file
View File

@ -0,0 +1,3 @@
1REM_'> $^__XW?#__'\][C__!>W\Y_/&W:?\_SC=W/^?^1_]G_G_P=_Y_8><W?\/+, \/_S4&__S_T+C__\/]/P_/_3\_XYS_,X?@\\/K@/N$_CK"&OP_YO*B?^?^_*PA_'__;XX_#F9&$__1F9.X_?8F9&^_/8F9P_
2FORY=0TO159:Z=PEEK(2054+Y)-32:FORI=0TO5:Q%=Z/2:POKE50,(Q%*2-Z)*192+255:Z=Q%:IFY+I-164THEN?" ";
4NEXT I,Y:GETA

View File

@ -3,7 +3,7 @@ include ../Makefile.inc
CFLAGS = -g -Wall -O2
all: text2gr png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 \
png2sixbitmap png2six80 png2sixrle
png2sixbitmap png2six80 png2sixrle png2fourrle png2sixrle2
###
@ -53,6 +53,24 @@ png2sixrle: png2sixrle.o loadpng.o
png2sixrle.o: png2sixrle.c loadpng.h
$(CC) $(CFLAGS) -c png2sixrle.c
###
png2fourrle: png2fourrle.o loadpng.o
$(CC) $(LFLAGS) -o png2fourrle png2fourrle.o loadpng.o -lpng
png2fourrle.o: png2fourrle.c loadpng.h
$(CC) $(CFLAGS) -c png2fourrle.c
###
png2sixrle2: png2sixrle2.o loadpng.o
$(CC) $(LFLAGS) -o png2sixrle2 png2sixrle2.o loadpng.o -lpng
png2sixrle2.o: png2sixrle2.c loadpng.h
$(CC) $(CFLAGS) -c png2sixrle2.c
###
@ -102,8 +120,8 @@ png_to_40x96.o: png_to_40x96.c loadpng.h rle_common.h
###
install:
cp png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2six80 $(INSTALL_LOC)
cp png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2sixrle2 png2fourrle png2six80 $(INSTALL_LOC)
clean:
rm -f *~ *.o png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2six80
rm -f *~ *.o png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2fourrle png2sixrle2 png2six80

View File

@ -22,7 +22,7 @@ static int print_rle(int color, int run) {
ret=1;
}
if (run==1) {
printf("%c",(color&0xf)+16);
printf("%c",(color&0xf)+16+' ');
}
else {
printf("%c%c",(color&0xf)+' ',run+' ');