Jump to content
IGNORED

Console switches


billyj1285

Recommended Posts

Good afternoon everyone,

 

I have a really dumb question. I am sorry. I have looked it up and experimented, however I just cant figure this simple thing out.

 

I have a small start of a game. Its just a sprite going up and down right now. This is Batari basic by the way.

 

I just want to set the console reset switch to reset. I have tried the ifthen and I just cannot get it to work. Here is the listing.

I am also having trouble making that bottom row solid.

 

I am sorry. I am new and am just having a little trouble. any help would be apprciated.

 

Thanks,

Bj

 

 

  set kernel_options player1colors playercolors pfcolors
  player0x = 75
  player0y = 80
  
  COLUBK=$15
  


main

   playfield:
   ................................
   ................................
   ................................
   ................................
   ................................
   ................................
   ................................
   ................................
   ................................
   ................................
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
 

 
 f=f+1
  rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME...
  if f = 10 then player0:
        %01100110
        %00100100
        %00100100
        %11111111
        %00111100
        %00111100
        %00111100
        %00100100
end
   if f = 10 then player0color:
    $FC;
    $FC;
    $FC;
    $F4;
    $F4;
    $F2;
    $F0;
    $F0;
end
  if f = 20 then player0:
        %00000110
        %01100100
        %00100100
        %11111111
        %00111100
        %00111100
        %00111100
        %00100100
end
   if f = 20 then player0color:
    $FC;
    $FC;
    $FC;
    $F4;
    $F4;
    $F2;
    $F0;
    $F0;
end
  if f = 30 then player0:
        %01100000
        %00100110
        %00100100
        %11111111
        %00111100
        %00111100
        %00111100
        %00100100
end
   if f = 30 then player0color:
    $FC;
    $FC;
    $FC;
    $F4;
    $F4;
    $F2;
    $F0;
    $F0;
end

  
  drawscreen
  
  

  if joy0up then player0y = player0y - 1
  if joy0down then player0y = player0y + 1
  
 
  goto main
 

Link to comment
Share on other sites

Posting this in the batari Basic forum would be better so that more people who use bB would see it. The simplest example of a reset switch would be something like this:

 

 If switchreset then reboot

 

Looking at the manual hosted on RT's site has more information about using reset, such as using a bit to prevent reset from repeating when it is held down. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...