appleiibot: compress the boxes

This commit is contained in:
Vince Weaver 2020-10-16 16:53:20 -04:00
parent e91e12cad1
commit da0ad65c3e
3 changed files with 50 additions and 3 deletions

View File

@ -3,12 +3,12 @@ include ../Makefile.inc
DOS33 = ../dos33fs-utils/dos33 DOS33 = ../dos33fs-utils/dos33
TOKENIZE = ../asoft_basic-utils/tokenize_asoft TOKENIZE = ../asoft_basic-utils/tokenize_asoft
all: appleiibot.dsk convert_to convert_back convert_qkumba all: appleiibot.dsk convert_to convert_back convert_qkumba make_boxes
appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
CIRCLES.BAS AUTUMN.BAS QKUMBA.BAS ASTEROID.BAS PERSON.BAS SHIP.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 \ CONCERT.BAS NYAN.BAS RASTER.BAS RASTER2.BAS RASTER3.BAS LOTS.BAS LOAD \
RASTER4.BAS RASTER5.BAS PUMPKIN.BAS RASTER4.BAS RASTER5.BAS PUMPKIN.BAS PUMPKIN_SMALL.BAS
cp empty.dsk appleiibot.dsk cp empty.dsk appleiibot.dsk
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
$(DOS33) -y appleiibot.dsk SAVE A E2.BAS $(DOS33) -y appleiibot.dsk SAVE A E2.BAS
@ -29,6 +29,16 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
$(DOS33) -y appleiibot.dsk SAVE A RASTER5.BAS $(DOS33) -y appleiibot.dsk SAVE A RASTER5.BAS
$(DOS33) -y appleiibot.dsk SAVE A LOTS.BAS $(DOS33) -y appleiibot.dsk SAVE A LOTS.BAS
$(DOS33) -y appleiibot.dsk SAVE A PUMPKIN.BAS $(DOS33) -y appleiibot.dsk SAVE A PUMPKIN.BAS
$(DOS33) -y appleiibot.dsk SAVE A PUMPKIN_SMALL.BAS
###
make_boxes: make_boxes.o
$(CC) $(LFLAGS) -o make_boxes make_boxes.o
make_boxes.o: make_boxes.c
$(CC) $(CFLAGS) -c make_boxes.c
### ###
@ -158,10 +168,15 @@ PUMPKIN.BAS: pumpkin.bas
#### ####
PUMPKIN_SMALL.BAS: pumpkin_small.bas
$(TOKENIZE) < pumpkin_small.bas > PUMPKIN_SMALL.BAS
####
LOTS.BAS: lots.bas LOTS.BAS: lots.bas
$(TOKENIZE) < lots.bas > LOTS.BAS $(TOKENIZE) < lots.bas > LOTS.BAS
#### ####
clean: clean:
rm -f *~ *.o *.lst convert_to convert_from convert_qkumba convert_back LOAD *.BAS rm -f *~ *.o *.lst convert_to convert_from convert_qkumba make_boxes convert_back LOAD *.BAS

30
appleiibot/make_boxes.c Normal file
View File

@ -0,0 +1,30 @@
#include <stdio.h>
int main(int argc, char **argv) {
char buffer[1024];
char *ptr;
int color,x1,x2,y1,y2;
char output[1024];
int out_ptr=0;
while(1) {
ptr=fgets(buffer,1024,stdin);
if (ptr==NULL) break;
sscanf(buffer,"%d %d %d %d %d",
&color,&x1,&x2,&y1,&y2);
output[out_ptr]=color+32;
output[out_ptr+1]=x1+32;
output[out_ptr+2]=x2+32;
output[out_ptr+3]=y1+32;
output[out_ptr+4]=y2+32;
out_ptr+=5;
}
output[out_ptr]=0;
printf("%s\n",output);
return 0;
}

View File

@ -0,0 +1,2 @@
0REM! G?O)+;*L)(>-J)&@0E)%A4>$15$)-+/26-8<26-*<?B-,:CD)./?A)67BD-346;-16:;
1DEFFNP(X)=PEEK(2054+X)-32:GR:POKE49234,0:FORI=0TO65STEP5:C=FNP(I):A=FNP(I+1):B=FNP(I+2):Q=FNP(I+3):Z=FNP(I+4):COLOR=C:FORY=QTOZ:HLINA,BATY:NEXTY,I