Cmm2: Game: ChemiChaos - Fix the Mix, Save the Lab!
Author
Message
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6541
Posted: 06:25am 01 Feb 2021
I agree that there are a number of programming bugs here but the problem I see is: If a program is started from 'files' by using the mouse, an initial interrupt is triggered. If the same program is started from 'files' by using only the keyboard, the initial interrupt is NOT triggered.
This program will demonstrate the issue.
'mouse button initial test dim integer mp CLS MODE 1,8
mp = mm.info(option mouse) if mp = -1 then ' no mouse set mp = 0 ' assume PS/2 mouse - change to suit endif print "Mouse port ";mp
PAUSE 5000 GUI CURSOR ON
CONTROLLER MOUSE OPEN mp, leftclick, rightclick
PRINT "Mouse found is type ",MOUSE(t,mp)
DO : LOOP UNTIL inkey$<>""
CONTROLLER MOUSE CLOSE mp pause 20 GUI CURSOR OFF END
' SUB leftclick STATIC INTEGER n n=n+1 PRINT @(100,100)"left",n END SUB ' SUB rightclick STATIC INTEGER m m=m+1 PRINT @(200,100)"Right",m END SUB
Try running it with and without using the mouse. There is a 5 second delay to make sure that it is not my fingers doing the click.
If I use the right mouse button to scroll pages in 'files' before double-left-click to run the program, both interrupts are triggered.
I have only tried this with a PS/2 mouse. The HobbyTronics might be different.