Jump to content
IGNORED

selecting some colors


freehabitat

Recommended Posts

hello,...

 

i thought about someting since a time.

 

the TIA shows 128(pal104) different colors.

for example, i choose 20 colors out of them. this selection is for a player/missile/whatever ...

and should change by any action (collision,firebutton,.. ).

 

how can i start with that? i am not shure how to tell the atari that it has only the selected to use and not the whole chart?

it should be simular to random color. just that i can do the step whitch changes the color.

 

hope this is to understand for others :) ??

 

best

f.

Link to comment
Share on other sites

If I understand correctly, you want to pre-define a list of 20 colors, use the first color for some object (e.g., player0), and then whenever some event occurs (e.g., pressing the fire button) the color of the object will advance to the next color in the list, and will cycle back to the beginning of the list after it has reached the end?

 

The easiest way to do that is with an array of ROM data:

 

   dim current_color = a
  current_color = 0
  player0:
  %11111111
  %11000011
  %11000011
  %11000011
  %11111111
end
  player0x = 80
  player0y = 44
loop
  COLUP0 = player0_color[current_color]
  drawscreen
  if joy0fire then current_color = current_color + 1
  if current_color = 20 then current_color = 0
  goto loop
  data player0_color
  $10,$14,$18,$1C,$40,$44,$48,$4C,$60,$64,$68,$6C,$80,$84,$88,$8C,$C0,$C4,$C8,$CC
end

Michael

Link to comment
Share on other sites

:) jop, thats what i am looking for.

 

 

data player0_color

 

thats the code i did not know,... thanks a lot

 

well,.. i tried to include the code in the frame_program but i was not that succsefull this time,... somehow my steering is blocked,...

 

i guess it´s only the order of priorities... should the loop for colors be a subroutine or something !?

 

thanks,

Tom

frames.02_col.bas

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