added updated mouse calls
This commit is contained in:
parent
207d9fe3d9
commit
80754dd5e5
|
@ -200,28 +200,33 @@ REM 349 WAVE 0,SIN
|
|||
517 PRINT " THERE WILL BE SEVEN REGIONS TO STUDY--TWO WHOLE AREA ONES"
|
||||
519 PRINT " OR THE SEPARATE REGIONS IDENTIFIED BY LETTERS."
|
||||
520 GOSUB 390
|
||||
523 FOR DLAY = 1 TO 2000: NEXT DLAY
|
||||
523 SLEEP
|
||||
525 CLS
|
||||
530 PUT (180, 70), B()
|
||||
535 PRINT "YOU MAY CHOOSE AN AREA TO DO BY PLACING THE MOUSE ARROW OVER THE"
|
||||
537 PRINT "LETTER FOR AN AREA AND CLICKING THE BUTTON A MOMENT."
|
||||
538 GOSUB 390
|
||||
539 FOR DLAY = 1 TO 2000: NEXT DLAY
|
||||
539 SLEEP
|
||||
540 CLS
|
||||
541 PUT (180, 70), B()
|
||||
542 PRINT "TO GET THE WHOLE AREA IN GENERAL, CLICK EITHER LETTER 'A' "
|
||||
543 PRINT "IN THE SPACE WEST OF AFRICA."
|
||||
544 GOSUB 400
|
||||
545 FOR DLAY = 1 TO 2000: NEXT DLAY
|
||||
545 SLEEP
|
||||
550 CLS
|
||||
551 PUT (180, 70), B()
|
||||
553 PRINT "CHOOSE YOUR AREA NOW.": GOSUB 400
|
||||
554
|
||||
REM 555 B = 0
|
||||
REM 557 B = MOUSE(0)
|
||||
REM 559 IF B <> -1 THEN 555
|
||||
560 CHX = 211
|
||||
561 CHY = 201
|
||||
554 CHX = 0
|
||||
555 CHY = 0
|
||||
556 B = 0
|
||||
557 Mouser CHX, CHY, B
|
||||
559 IF B <> -1 THEN 555
|
||||
560 PRINT CHX
|
||||
561 PRINT CHY
|
||||
562 PRINT "hard coding mouse x and y for now."
|
||||
563 SLEEP
|
||||
564 CHX = 211
|
||||
565 CHY = 201
|
||||
570 IF CHX > 210 AND CHX < 225 AND CHY > 200 AND CHY < 220 THEN 1000
|
||||
571 IF CHX > 210 AND CHX < 225 AND CHY > 225 AND CHY < 250 THEN 572 ELSE GOTO 573
|
||||
572 BUBU = 1: GOTO 1000
|
||||
|
@ -883,3 +888,10 @@ REM 559 IF B <> -1 THEN 555
|
|||
15000
|
||||
19000
|
||||
20000
|
||||
|
||||
SUB Mouser (x, y, b)
|
||||
mi = _MOUSEINPUT
|
||||
b = _MOUSEBUTTON(1)
|
||||
x = _MOUSEX
|
||||
y = _MOUSEY
|
||||
END SUB
|
||||
|
|
|
@ -3,11 +3,11 @@ The best BASIC compiler found so far is the one from QB64.org.
|
|||
|
||||
So far, if I place SCREEN 11 on the first line, the program runs until the map of africa is drawn with the region marks (N, S, etc.) and the prompt" CHOOSE YOUR AREA NOW. The program does not accept any input at that point.
|
||||
|
||||
Capturing MOUSE input does not seem to work.
|
||||
Mouse input needs to be refactored, mouse handling is more complex now. I added a subroutine that gets the CHX, CHY, and B params.
|
||||
|
||||
Or perhaps the input is accepted, but the fact that the checks for the mouse clicks branch off to labels not in this module, the code is just stuck here at around label 570.
|
||||
Replaced delay loops with sleep calls. Need to press a key to continue.
|
||||
|
||||
Code references labels not in this source file, e.g. 5000 to 20000.
|
||||
Code references labels not in this source file, e.g. 5000 to 20000, perhaps meant to end program
|
||||
|
||||
WAVE keyword does not seem to be supported, see line 114 (label 349)
|
||||
|
||||
|
|
Loading…
Reference in New Issue