Hi qbits,
I am now tinkering your great prog on a real thing QL, QDOS v1.10.
ch=1 added.
I put -1 for INKEY$, meaning wait for a keypress.
Code: Select all
< 3070 k=CODE(INKEY$(-1))
---
> 3070 k=CODE(INKEY$(5))
For the swing, I added +4 step as suggested then also +8 step for the actual shot.
Code: Select all
< 3120 IF k=208:p=p+4:IF p>club:p=0
< 3130 IF k=216:p=p-4:IF p<0:p=0
---
> 3120 IF k=208:p=p+1:IF p>club:p=0
> 3130 IF k=216:p=p-1:IF p<0:p=0
308c306
< 3150 FOR a=0 TO p STEP 8
Running complete `diff' now gives:
Code: Select all
tcat@lynx:~/ql/sw/qbgolf$ diff QBGolf_bas QBGolf_org
6c6
< 150 device_filename$="mdv2_QBGolf_data":REMark user device_filename
---
> 150 device_filename$="flp1_QBGolf_data":REMark user device_filename
8,9c8
< 165 OPEN#2,con_:OPEN#1,scr_
< 170 MODE 4:WINDOW#0,372,62,134,192
---
> 170 MODE 4:WTV:WINDOW#0,372,62,134,192
46c45
< 540 IF k=27:Init_screens:Golf_close
---
> 540 IF k=27:Golf_close
53c52
< 610 ch=3:CURSOR#ch,72,154:CLS#ch,4:PRINT#ch,"Please wait - Initialising.."
---
> 610 ch=3:CURSOR#ch,72,154:CLS#ch,4:PRINT#ch,"Please wait - Initialsing.."
118c117
< 1260 LOCal i,x,y,r,e,a:ch=4:BLOCK#ch,124,36,0,42,4
---
> 1260 LOCal i,x,y,r,e,a:ch=4:BLOCK#ch,126,36,0,44,4
162c161
< 1700 ch=1:WINDOW#ch,90,60,412,gy:Green
---
> 1700 WINDOW#ch,90,60,412,gy:Green
180,181c179
< 1880 MODE 4:PAPER 0:INK 7:PRINT,"Bye..."
< 1885 STOP
---
> 1880 MODE 4:PAPER 0:INK 7:PRINT,"Bye...":PAUSE 50:WTV
199c197
< 2060 IF Gf(h,7)<=3:Stream
---
> 2060 IF Gf(h,8)<=3:Stream
201c199
< 2080 IF Gf(h,7)=5 AND par<>3:Lake
---
> 2080 IF Gf(h,8)=5 AND par<>3:Lake
300c298
< 3070 k=CODE(INKEY$(-1))
---
> 3070 k=CODE(INKEY$(5))
305,306c303,304
< 3120 IF k=208:p=p+4:IF p>club:p=0
< 3130 IF k=216:p=p-4:IF p<0:p=0
---
> 3120 IF k=208:p=p+1:IF p>club:p=0
> 3130 IF k=216:p=p-1:IF p<0:p=0
308c306
< 3150 FOR a=0 TO p STEP 8
---
> 3150 FOR a=0 TO p
EDIT, I also changed this line, so when at full swing does not come back to `0'.
Code: Select all
< 3120 IF k=208:p=p+4:IF p>club:p=club
---
> 3120 IF k=208:p=p+1:IF p>club:p=0
EDIT, updated
- QBGolf.zip
- QBits Golf Program Code
- (13.46 KiB) Downloaded 201 times
P.S. I have not read the article in the magazine yet, just wondering what your real name is.
Thanks for sharing it here.
Tom