From 489729bc169b52848de4511d6f98f2b07cf2fa6f Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 25 May 2021 16:24:29 -0400 Subject: [PATCH] appleiibot: gator for floppy day --- basic/appleiibot/Makefile | 10 +++++++++- basic/appleiibot/gator.bas | 2 ++ basic/appleiibot/make_boxes.c | 16 +++++++++++----- graphics/gr/boxes/gator.data | 27 +++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 basic/appleiibot/gator.bas create mode 100644 graphics/gr/boxes/gator.data diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index f7cebd1e..04315031 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -15,7 +15,9 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ FASTAR2.BAS BIN.BAS FALLING.BAS SNOW.BAS XMAS.BAS AN3.BAS PLASMA.BAS \ C64.BAS SIERPINSKI.BAS FAKES.BAS SIER.BAS DROPS.BAS RR.BAS RR_HGR.BAS \ COMBO.BAS WIRES.BAS PATTERN.BAS BALL.BAS LINES.BAS MOD9.BAS \ - XOR_ZOOM.BAS MOD9_HGR.BAS SIER_HGR.BAS MOVE.BAS SINE.BAS XDRAW128.BAS + XOR_ZOOM.BAS MOD9_HGR.BAS SIER_HGR.BAS MOVE.BAS SINE.BAS XDRAW128.BAS \ + GATOR.BAS + # cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk cp empty.dsk appleiibot.dsk $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD @@ -79,6 +81,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(DOS33) -y appleiibot.dsk SAVE A MOVE.BAS $(DOS33) -y appleiibot.dsk SAVE A SINE.BAS $(DOS33) -y appleiibot.dsk SAVE A XDRAW128.BAS + $(DOS33) -y appleiibot.dsk SAVE A GATOR.BAS #### @@ -242,6 +245,11 @@ E2.BAS: entropy_small.bas BIN.BAS: bin.bas $(TOKENIZE) < bin.bas > BIN.BAS +#### + +GATOR.BAS: gator.bas + $(TOKENIZE) < gator.bas > GATOR.BAS + #### diff --git a/basic/appleiibot/gator.bas b/basic/appleiibot/gator.bas new file mode 100644 index 00000000..2f72dcac --- /dev/null +++ b/basic/appleiibot/gator.bas @@ -0,0 +1,2 @@ +1GR:POKE49234,0:DEFFNP(X)=PEEK(2162+I*5+X)-35:FORI=0TO26:FORX=0TO(I=18)*9:COLOR=FNP(0):FORY=FNP(3)TOFNP(4):HLINFNP(1),FNP(2)ATY:NEXTY,X,I:GETA +2"*#J#R#,A%P(66DN(485?(399;(574@*677>*578=(::==2-@&1*AA34)=>//%,,0<>++/>(()#JOR'CJ@N'/JDK'02BC#DEAB#HIAB212LN267LN diff --git a/basic/appleiibot/make_boxes.c b/basic/appleiibot/make_boxes.c index 08eaf3cf..4cdc8137 100644 --- a/basic/appleiibot/make_boxes.c +++ b/basic/appleiibot/make_boxes.c @@ -1,4 +1,5 @@ #include +#include int main(int argc, char **argv) { @@ -7,6 +8,11 @@ int main(int argc, char **argv) { int color,x1,x2,y1,y2; char output[1024]; int out_ptr=0; + int add=' '; + + if (argc>1) { + add=atoi(argv[1]); + } while(1) { @@ -16,11 +22,11 @@ int main(int argc, char **argv) { 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; + output[out_ptr]=color+add; + output[out_ptr+1]=x1+add; + output[out_ptr+2]=x2+add; + output[out_ptr+3]=y1+add; + output[out_ptr+4]=y2+add; out_ptr+=5; } output[out_ptr]=0; diff --git a/graphics/gr/boxes/gator.data b/graphics/gr/boxes/gator.data new file mode 100644 index 00000000..05d04fea --- /dev/null +++ b/graphics/gr/boxes/gator.data @@ -0,0 +1,27 @@ +7 0 39 0 47 ; background ; C x1 x2 y1 y2 +0 9 30 2 45 ; floppy +5 19 19 33 43 ; opening +5 17 21 18 28 ; ring +5 16 22 22 24 ; ring +5 18 20 17 29 ; ring +7 19 20 20 27 ; hole +7 18 20 21 26 ; hole +5 23 23 26 26 ; index hole +15 10 29 3 14 ; label +7 30 30 16 17 ; write protect notch +6 26 27 12 12 ; blue apple +2 25 28 11 11 ; purple apple +1 25 28 10 10 ; red apple +9 25 27 9 9 ; orange apple +13 25 27 8 8 ; yellow apple +12 25 28 7 7 ; l.green +12 26 26 6 6 ; l.green +12 27 27 5 5 ; leaf +6 0 39 44 47 ; water +4 32 39 29 43 ; head +4 12 39 33 40 ; nose +4 13 15 31 32 ; nose +0 33 34 30 31 ; l. eye +0 37 38 30 31 ; r. eye +15 14 15 41 43 ; tooth +15 19 20 41 43 ; tooth