View Single Post
Old 24 July 2019, 16:29   #4
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 461
Here it is, it is compiled as a cli-executable.

And this is the sourcecode for it:

Code:
Screen Open 0,320,240,16,Lowres
Flash Off : Curs Off 
Pen 0 : Paper 1
Palette $F00,$F
X=0 : Y=0

Cls 

Repeat 
Z=Fire(1)

   If Z=-1 and Y=0 : Rem test if Joystick button is pressed and make sure it is pressed only once 
      If X=0
         Rem Cls 1
         Palette $F,$F00
      Else If X=1
         Rem Cls 2
         Palette $F00,$F
      End If 
      Y=1 : X=(X+1) mod 2
   End If 

   If Z=0 : Rem Fire-Button is released, Allow the usage of the fire button
      Y=0
   End If 
Until Inkey$=" " : Rem Space key ends the program
Attached Files
File Type: 7z ColorChanging.7z (31.6 KB, 34 views)

Last edited by Dan; 24 July 2019 at 16:36.
Dan is offline  
 
Page generated in 0.04484 seconds with 12 queries