Jump to content
Sign in to follow this  
Cybearg

Setting Specific Background/Playfield Line Colors?

Recommended Posts

In my case I'm using the DPC+ kernel.

 

Is there a way to set the background or playfield color for a certain line without changing all the other line colors?

Share this post


Link to post
Share on other sites

RevEng or iesposta may have a better answer, but from what I've seen there is no command to do that. It's inefficient, but if you wanted to change a single line you could call bkcolors in a subroutine. Press fire in this demo to have one line of background color change from black to orange.

 

if joy0fire then gosub change else gosub normal
change
bkcolors:
$00
$00
$00
$00
$00
$00
$28
$00
$00
$00
$00
$00
$00
$00
$00
$00
end
return
normal
bkcolors:
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
end
return

move_test.txt

move_test.bin

Share this post


Link to post
Share on other sites

I hope there's a better way, because in my case, I have a playfield that's 32 units high and there are 36 possible color combinations for the playfield.

 

Which means at least 1152 bytes wasted in redundant statements, not to mention the cycles and bytes lost to the branching logic on ... goto statements.

 

I don't see why it's impossible, since the color is just a value loaded into the memory. Why can't those values be directly modified/accessed?

Edited by Cybearg

Share this post


Link to post
Share on other sites

I hope there's a better way, because in my case, I have a playfield that's 32 units high and there are 36 possible color combinations for the playfield.

 

Which means at least 1152 bytes wasted in redundant statements, not to mention the cycles and bytes lost to the branching logic on ... goto statements.

 

I don't see why it's impossible, since the color is just a value loaded into the memory. Why can't those values be directly modified/accessed?

Hopefully there is a better way, I just don't know what it is. ;) I agree that in your case that wouldn't be a good way to do it.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...