appleiibot: asplode

This commit is contained in:
Vince Weaver 2022-07-28 02:43:59 -04:00
parent 96fc0fde29
commit 5dde1f4baa
4 changed files with 119 additions and 2 deletions

View File

@ -5,7 +5,7 @@ TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft
EMPTY_DISK = ../../empty_disk
all: appleiibot.dsk \
convert_to convert_back convert_qkumba make_boxes convert_vmw convert_tgreene make_hgr_boxes
convert_to convert_back convert_qkumba make_boxes convert_vmw convert_tgreene make_hgr_boxes make_points
appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
CIRCLES.BAS AUTUMN.BAS QKUMBA.BAS ASTEROID.BAS PERSON.BAS SHIP.BAS \
@ -25,7 +25,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
HORROR.BAS DIAMOND.BAS LEMM.BAS OOPS.BAS SPLIT.BAS PARTICLE.BAS \
PARTICLE_HGR.BAS DIAMOND_SCROLL.BAS RANDOM_SCROLL.BAS STAR_BOUNCE.BAS\
OOZE.BAS HORIZ_STAR.BAS SECRET_COLLECT.BAS PLANET.BAS PLANET_GR.BAS \
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS
cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
# cp empty.dsk appleiibot.dsk
# $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
@ -133,6 +133,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
$(DOS33) -y appleiibot.dsk SAVE A BOXES.BAS
$(DOS33) -y appleiibot.dsk SAVE A SOLARIS.BAS
$(DOS33) -y appleiibot.dsk SAVE A SOLARIS2.BAS
$(DOS33) -y appleiibot.dsk SAVE A ASPLODE.BAS
#appleiibot2.dsk: BOXES.BAS HELLO
# cp empty.dsk appleiibot2.dsk
@ -155,6 +156,14 @@ make_boxes.o: make_boxes.c
###
make_points: make_points.o
$(CC) $(LFLAGS) -o make_points make_points.o
make_points.o: make_points.c
$(CC) $(CFLAGS) -c make_points.c
###
make_hgr_boxes: make_hgr_boxes.o
$(CC) $(LFLAGS) -o make_hgr_boxes make_hgr_boxes.o
@ -745,6 +754,11 @@ SOLARIS.BAS: solaris.bas
SOLARIS2.BAS: solaris2.bas
$(TOKENIZE) < solaris2.bas > SOLARIS2.BAS
####
ASPLODE.BAS: asplode.bas
$(TOKENIZE) < asplode.bas > ASPLODE.BAS
####

View File

@ -0,0 +1,5 @@
0REM~&!:):C&`~:)d)dC:C~dCz`~d)y!~L+T+X2X8V=R@L@I=F8F2L+~N<R<R>N>N<~K.I2H8L=L;N9R9T;T=V7V2T.~K.J3P9T3T.T0P6L1K.~L5L7N8R8S7R5~N3N1R1R3!
1HGR:HCOLOR=5:DEFFNP(X)=3*PEEK(2054+I+X)-99
2IFFNP(0)=279THENHPLOTFNP(1),FNP(2):I=I+3
3HPLOTTOFNP(0),FNP(1):I=I+2:IFFNP(0)GOTO2
4?"HEAD A SPLODE"

View File

@ -0,0 +1,50 @@
279 16 0 77 25 # 0 Upper left
77 103 # 1 Down
15 189 # 2 Lower left
279 77 25 201 25 # 3 Right
201 103 # 4 Down
77 103 # 5 Done square
279 201 103 267 189 # 6 Lower Right
279 201 25 266 0 # 7 Upper right
279 129 30 153 30 # 8 Top head
165 51 # 9 Right head
165 69 # 10 Side head
159 84 # 11 Side head
147 93 # 12 Bottom right
129 93 # 13 Bottom head
120 84 # 14 Bottom left
111 69 # 15 Left
111 51 # 16 Left
129 30 # 17 Top Left
279 135 81 147 81 # 18 Top mouth
147 89 # 19 Right mouth
135 89 # 20 Bottom Mouth
135 81 # 21 Left Mouth
279 126 39 120 51 # 22 Left Horn
117 69 # 23 Left
129 84 # 24 Left
129 78 # 25 Left
135 72 # 26 Nose
147 72 # 27 Right
153 78 # 28 Right
153 84
159 66 # 29 Right
159 51 # 30 Right
153 39 # 31 Right Horn
279 127 39 123 54 # 32 Left Horn again
141 72 # 34
153 54
153 39 # Right Horn again
153 45
141 63 # Bottom point
129 48
127 39 # Back at start
279 129 60 129 66 # Left Eye
135 69
147 69
150 66
147 60
279 135 54 135 48 # Shield
147 48
147 54
0

View File

@ -0,0 +1,48 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
char buffer[1024];
char *ptr;
int a1,a2,a3,a4,a5;
char output[1024];
int out_ptr=0;
int add=33;
if (argc>1) {
add=atoi(argv[1]);
}
while(1) {
ptr=fgets(buffer,1024,stdin);
if (ptr==NULL) break;
if (buffer[0]=='#') continue;
sscanf(buffer,"%d %d %d %d %d",
&a1,&a2,&a3,&a4,&a5);
printf("%d %d %d %d %d\n",a1,a2,a3,a4,a5);
if (a1==279) {
output[out_ptr]=(a1/3)+add;
output[out_ptr+1]=(a2/3)+add;
output[out_ptr+2]=(a3/3)+add;
output[out_ptr+3]=(a4/3)+add;
output[out_ptr+4]=(a5/3)+add;
out_ptr+=5;
}
else if (a1==0) {
output[out_ptr]=(a1/3)+add;
out_ptr+=1;
break;
}
else {
output[out_ptr]=(a1/3)+add;
output[out_ptr+1]=(a2/3)+add;
out_ptr+=2;
}
}
output[out_ptr]=0;
printf("%s\n",output);
return 0;
}