Jump to content
IGNORED

IntyBASIC Change Foreground Colors on BACKTAB?


First Spear
 Share

Recommended Posts

The "screen" command simply copies values from your data table (in your case "my_cards" ) to the backtab. Color information has to be included in the data table.

 

If you want to change the color used, you could either:

 

1. have a different "my_cards" data table for each desired color. or

2. have no color in the data table, and then write a fixup routine to add the color later...

			DEFINE 0,8,mybitmaps_0 
			Wait 
			SCREEN my_cards,0,80,9,8,9

	#color = CS_WHITE
	for r = 0 to 8
		#address = BACKTAB_ADRS + 80 + (20 * r)
		for c = 0 to 9
		 	poke #address, peek(#address) + #color
			#address = #address + 1
		next c
	next r

Catsfolly

  • Like 2
Link to comment
Share on other sites

I would make use of XOR if you want to fade in something e.g.

Colour would become:

#color=#fromColour  XOR #toColour


The central part of catsfolly's loop would become:

#data=peek(#address)
#data=#data XOR #color
poke #address,#data
#address=#address+1

Then you would make it into a procedure and call it as follows:-

rem Fade fromblack to blue.
#fromColour=CS_BLACK
#toColour=CS_BLUE
gosub FadeBlockIn
wait ' Wait for a few VBLANKSs before altering the colour again.
wait
wait

rem Fade from blue to white.
#fromColour=CS_BLUE
#toColour=CS_WHITE
gosub FadeBlockIn
wait
wait
wait

rem Fade from white to green.
#fromColour=CS_WHITE
#toColour=CS_GREEN
gosub FadeBlockIn
wait
wait
wait
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...
 Share

  • Recently Browsing   0 members

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