From b0c3736813957e6adbbea810974885734c025b76 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 9 Sep 2022 18:34:51 -0400 Subject: [PATCH] basic: add mystery --- basic/appleiibot/Makefile | 10 +++++++-- basic/appleiibot/make_points.c | 15 ++++++++++--- basic/appleiibot/mystery.bas | 4 ++++ basic/appleiibot/mystery.points | 39 +++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 basic/appleiibot/mystery.bas create mode 100644 basic/appleiibot/mystery.points diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index 8faed03a..d39ca36c 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -24,9 +24,9 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS \ 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 \ + OOZE.BAS HORIZ_STAR.BAS PLANET.BAS SECRET_COLLECT.BAS PLANET_GR.BAS \ BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \ - TARGET.BAS ELITE.BAS + TARGET.BAS ELITE.BAS MYSTERY.BAS cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk # cp empty.dsk appleiibot.dsk # $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD @@ -138,6 +138,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(DOS33) -y appleiibot.dsk SAVE A SOLARIS3.BAS $(DOS33) -y appleiibot.dsk SAVE A TARGET.BAS $(DOS33) -y appleiibot.dsk SAVE A ELITE.BAS + $(DOS33) -y appleiibot.dsk SAVE A MYSTERY.BAS #### @@ -774,6 +775,11 @@ TARGET.BAS: target.bas ELITE.BAS: elite.bas $(TOKENIZE) < elite.bas > ELITE.BAS +#### + +MYSTERY.BAS: mystery.bas + $(TOKENIZE) < mystery.bas > MYSTERY.BAS + #### diff --git a/basic/appleiibot/make_points.c b/basic/appleiibot/make_points.c index 1b8cf5ab..3ed7ba66 100644 --- a/basic/appleiibot/make_points.c +++ b/basic/appleiibot/make_points.c @@ -1,6 +1,15 @@ #include #include +//#define LINE_VALUE 279 +//#define STOP_VALUE 0 +//#define MODE_VALUE 3 + +#define LINE_VALUE 3 +#define STOP_VALUE 6 +#define MODE_VALUE 9 + + static int debug=1; /* if div=3 */ @@ -45,7 +54,7 @@ int main(int argc, char **argv) { sscanf(buffer,"%d %d %d %d %d", &a1,&a2,&a3,&a4,&a5); if (debug) fprintf(stderr,"%d %d %d %d %d\n",a1,a2,a3,a4,a5); - if (a1==279) { + if (a1==LINE_VALUE) { output[out_ptr]=((a1-xadjust)/div)+add; output[out_ptr+1]=((a2-xadjust)/div)+add; output[out_ptr+2]=((a3-xadjust)/div)+add; @@ -53,11 +62,11 @@ int main(int argc, char **argv) { output[out_ptr+4]=((a5-xadjust)/div)+add; out_ptr+=5; } - else if (a1==3) { + else if (a1==MODE_VALUE) { output[out_ptr]=((a1-xadjust)/div)+add; out_ptr+=1; } - else if (a1==0) { + else if (a1==STOP_VALUE) { output[out_ptr]=((a1-xadjust)/div)+add; out_ptr+=1; break; diff --git a/basic/appleiibot/mystery.bas b/basic/appleiibot/mystery.bas new file mode 100644 index 00000000..4366e65c --- /dev/null +++ b/basic/appleiibot/mystery.bas @@ -0,0 +1,4 @@ +1HGR:DEFFNP(X)=3*PEEK(2080+I+X)-99:REM"!!~!~T!T!!"&!&L1Q1$+!"1Q`Q`$1$"Y!`$z,zT"1LSLhT"R$R616"1<`J@H=D"HDLEMGMHKJHJHIJIJFGE +2IFFNP(0)=3THENHPLOTFNP(1),FNP(2):I=I+3 +3HPLOTTOFNP(0),FNP(1):I=I+2:IFI<108GOTO2 +4?"YOU ARE IN THE KITCHEN",,"THERE IS A REFRIGERATOR diff --git a/basic/appleiibot/mystery.points b/basic/appleiibot/mystery.points new file mode 100644 index 00000000..d916b38f --- /dev/null +++ b/basic/appleiibot/mystery.points @@ -0,0 +1,39 @@ +3 0 0 279 0 # outline + 279 153 + 0 153 + 0 0 +3 15 0 15 129 # refrig + 48 144 + 48 9 + 30 0 +3 48 144 189 144 + 189 9 + 48 9 +3 168 0 189 9 + 267 33 + 267 153 +3 48 129 150 129 + 213 153 +3 147 9 147 63 + 48 63 +3 48 81 189 81 + 147 63 +3 147 81 147 129 +3 84 105 117 105 # pitcher + 111 114 + 117 120 + 117 132 + 114 135 + 90 135 + 87 123 + 93 117 + 84 105 +3 117 105 129 108 # handle + 132 114 + 132 117 + 126 123 + 117 123 + 117 120 + 123 120 + 123 111 + 114 108