Jump to content
IGNORED

Players 1-5 the same


atari2600land

Recommended Posts

Suppose I want players 1-5 the same. How would I go about doing this without addressing each player individually? (I tried searching for it, but came up with nothing. Apparently, the search function doesn't like the terms "players 1-5".)

You'll need to move the players separately, of course, and their colors, sizes, number of copies, and reflection flags, but if you want them to use the same *graphics* shapes without having to define them five times, you can just define the first player, and then copy that player's pointers and height to the other players:

 

   player1:
  %[b][/b]00111100
  %01000010
  %10011001
  %10100101
  %10000001
  %10100101
  %01000010
  %[b][/b]00111100
end

  player2pointerlo = player1pointerlo
  player2pointerhi = player1pointerhi
  player2height = player1height

  player3pointerlo = player1pointerlo
  player3pointerhi = player1pointerhi
  player3height = player1height

  player4pointerlo = player1pointerlo
  player4pointerhi = player1pointerhi
  player4height = player1height

  player5pointerlo = player1pointerlo
  player5pointerhi = player1pointerhi
  player5height = player1height

I think those are the correct variable names. Also, you might want to check RobertM's blog, because he raised this same issue in his blog, and batari posted a comment that shows how to do this with a loop, which could save a little ROM.

 

Michael

Edited by SeaGtGruff
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...